livebook/static/js/app.js
2023-03-02 21:13:05 +00:00

2 lines
3.7 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see app.js.LICENSE.txt */
(()=>{var t,i={96458:()=>{"use strict";!function(){var e=function(){if("function"==typeof window.CustomEvent)return window.CustomEvent;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}return e.prototype=window.Event.prototype,e}();function t(e,t){var i=document.createElement("input");return i.type="hidden",i.name=e,i.value=t,i}function i(e,i){var n=e.getAttribute("data-to"),o=t("_method",e.getAttribute("data-method")),s=t("_csrf_token",e.getAttribute("data-csrf")),r=document.createElement("form"),a=document.createElement("input"),l=e.getAttribute("target");r.method="get"===e.getAttribute("data-method")?"get":"post",r.action=n,r.style.display="hidden",l?r.target=l:i&&(r.target="_blank"),r.appendChild(s),r.appendChild(o),document.body.appendChild(r),a.type="submit",r.appendChild(a),a.click()}window.addEventListener("click",(function(t){var n=t.target;if(!t.defaultPrevented)for(;n&&n.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!n.dispatchEvent(o))return t.preventDefault(),t.stopImmediatePropagation(),!1;if(n.getAttribute("data-method"))return i(n,t.metaKey||t.shiftKey),t.preventDefault(),!1;n=n.parentNode}}),!1),window.addEventListener("phoenix.link.click",(function(e){var t=e.target.getAttribute("data-confirm");t&&!window.confirm(t)&&e.preventDefault()}),!1)}()},78249:function(e,t,i){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(42480)}catch(e){}var o=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),r={},a=r.lib={},l=a.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=l.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var s=0;s<o;s++){var r=i[s>>>2]>>>24-s%4*8&255;t[n+s>>>2]|=r<<24-(n+s)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=i[a>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(o());return new c.init(t,e)}}),h=r.enc={},d=h.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],o=0;o<i;o++){var s=t[o>>>2]>>>24-o%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(i,t/2)}},u=h.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],o=0;o<i;o++){var s=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(i,t)}},g=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,n=this._data,o=n.words,s=n.sigBytes,r=this.blockSize,a=s/(4*r),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*r,h=e.min(4*l,s);if(l){for(var d=0;d<l;d+=r)this._doProcessBlock(o,d);i=o.splice(0,l),n.sigBytes-=h}return new c.init(i,h)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(a.Hasher=p.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new m.HMAC.init(e,i).finalize(t)}}}),r.algo={});return r}(Math),n)},98269:function(e,t,i){var n,o,s;e.exports=(n=i(78249),s=(o=n).lib.WordArray,o.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,n=this._map;e.clamp();for(var o=[],s=0;s<i;s+=3)for(var r=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<i;a++)o.push(n.charAt(r>>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var t=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<i.length;o++)n[i.charCodeAt(o)]=o}var r=i.charAt(64);if(r){var a=e.indexOf(r);-1!==a&&(t=a)}return function(e,t,i){for(var n=[],o=0,r=0;r<t;r++)if(r%4){var a=i[e.charCodeAt(r-1)]<<r%4*2|i[e.charCodeAt(r)]>>>6-r%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return s.create(n,o)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},68214:function(e,t,i){var n;e.exports=(n=i(78249),function(e){var t=n,i=t.lib,o=i.WordArray,s=i.Hasher,r=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=r.MD5=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var s=this._hash.words,r=e[t+0],l=e[t+1],g=e[t+2],p=e[t+3],m=e[t+4],f=e[t+5],_=e[t+6],v=e[t+7],b=e[t+8],C=e[t+9],y=e[t+10],w=e[t+11],S=e[t+12],k=e[t+13],x=e[t+14],L=e[t+15],E=s[0],N=s[1],D=s[2],T=s[3];E=c(E,N,D,T,r,7,a[0]),T=c(T,E,N,D,l,12,a[1]),D=c(D,T,E,N,g,17,a[2]),N=c(N,D,T,E,p,22,a[3]),E=c(E,N,D,T,m,7,a[4]),T=c(T,E,N,D,f,12,a[5]),D=c(D,T,E,N,_,17,a[6]),N=c(N,D,T,E,v,22,a[7]),E=c(E,N,D,T,b,7,a[8]),T=c(T,E,N,D,C,12,a[9]),D=c(D,T,E,N,y,17,a[10]),N=c(N,D,T,E,w,22,a[11]),E=c(E,N,D,T,S,7,a[12]),T=c(T,E,N,D,k,12,a[13]),D=c(D,T,E,N,x,17,a[14]),E=h(E,N=c(N,D,T,E,L,22,a[15]),D,T,l,5,a[16]),T=h(T,E,N,D,_,9,a[17]),D=h(D,T,E,N,w,14,a[18]),N=h(N,D,T,E,r,20,a[19]),E=h(E,N,D,T,f,5,a[20]),T=h(T,E,N,D,y,9,a[21]),D=h(D,T,E,N,L,14,a[22]),N=h(N,D,T,E,m,20,a[23]),E=h(E,N,D,T,C,5,a[24]),T=h(T,E,N,D,x,9,a[25]),D=h(D,T,E,N,p,14,a[26]),N=h(N,D,T,E,b,20,a[27]),E=h(E,N,D,T,k,5,a[28]),T=h(T,E,N,D,g,9,a[29]),D=h(D,T,E,N,v,14,a[30]),E=d(E,N=h(N,D,T,E,S,20,a[31]),D,T,f,4,a[32]),T=d(T,E,N,D,b,11,a[33]),D=d(D,T,E,N,w,16,a[34]),N=d(N,D,T,E,x,23,a[35]),E=d(E,N,D,T,l,4,a[36]),T=d(T,E,N,D,m,11,a[37]),D=d(D,T,E,N,v,16,a[38]),N=d(N,D,T,E,y,23,a[39]),E=d(E,N,D,T,k,4,a[40]),T=d(T,E,N,D,r,11,a[41]),D=d(D,T,E,N,p,16,a[42]),N=d(N,D,T,E,_,23,a[43]),E=d(E,N,D,T,C,4,a[44]),T=d(T,E,N,D,S,11,a[45]),D=d(D,T,E,N,L,16,a[46]),E=u(E,N=d(N,D,T,E,g,23,a[47]),D,T,r,6,a[48]),T=u(T,E,N,D,v,10,a[49]),D=u(D,T,E,N,x,15,a[50]),N=u(N,D,T,E,f,21,a[51]),E=u(E,N,D,T,S,6,a[52]),T=u(T,E,N,D,p,10,a[53]),D=u(D,T,E,N,y,15,a[54]),N=u(N,D,T,E,l,21,a[55]),E=u(E,N,D,T,b,6,a[56]),T=u(T,E,N,D,L,10,a[57]),D=u(D,T,E,N,_,15,a[58]),N=u(N,D,T,E,k,21,a[59]),E=u(E,N,D,T,m,6,a[60]),T=u(T,E,N,D,w,10,a[61]),D=u(D,T,E,N,g,15,a[62]),N=u(N,D,T,E,C,21,a[63]),s[0]=s[0]+E|0,s[1]=s[1]+N|0,s[2]=s[2]+D|0,s[3]=s[3]+T|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;i[o>>>5]|=128<<24-o%32;var s=e.floor(n/4294967296),r=n;i[15+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),i[14+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(i.length+1),this._process();for(var a=this._hash,l=a.words,c=0;c<4;c++){var h=l[c];l[c]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return a},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,i,n,o,s,r){var a=e+(t&i|~t&n)+o+r;return(a<<s|a>>>32-s)+t}function h(e,t,i,n,o,s,r){var a=e+(t&n|i&~n)+o+r;return(a<<s|a>>>32-s)+t}function d(e,t,i,n,o,s,r){var a=e+(t^i^n)+o+r;return(a<<s|a>>>32-s)+t}function u(e,t,i,n,o,s,r){var a=e+(i^(t|~n))+o+r;return(a<<s|a>>>32-s)+t}t.MD5=s._createHelper(l),t.HmacMD5=s._createHmacHelper(l)}(Math),n.MD5)},52153:function(e,t,i){var n;e.exports=(n=i(78249),function(e){var t=n,i=t.lib,o=i.WordArray,s=i.Hasher,r=t.algo,a=[],l=[];!function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(a[o]=i(e.pow(n,.5))),l[o]=i(e.pow(n,1/3)),o++),n++}();var c=[],h=r.SHA256=s.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,n=i[0],o=i[1],s=i[2],r=i[3],a=i[4],h=i[5],d=i[6],u=i[7],g=0;g<64;g++){if(g<16)c[g]=0|e[t+g];else{var p=c[g-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,f=c[g-2],_=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;c[g]=m+c[g-7]+_+c[g-16]}var v=n&o^n&s^o&s,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),C=u+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&h^~a&d)+l[g]+c[g];u=d,d=h,h=a,a=r+C|0,r=s,s=o,o=n,n=C+(b+v)|0}i[0]=i[0]+n|0,i[1]=i[1]+o|0,i[2]=i[2]+s|0,i[3]=i[3]+r|0,i[4]=i[4]+a|0,i[5]=i[5]+h|0,i[6]=i[6]+d|0,i[7]=i[7]+u|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=e.floor(n/4294967296),i[15+(o+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(h),t.HmacSHA256=s._createHmacHelper(h)}(Math),n.SHA256)},94470:e=>{"use strict";var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},r=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var n,o=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!s)return!1;for(n in e);return void 0===n||t.call(e,n)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,i){if("__proto__"===i){if(!t.call(e,i))return;if(o)return o(e,i).value}return e[i]};e.exports=function e(){var t,i,n,o,c,h,d=arguments[0],u=1,g=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},u=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});u<g;++u)if(null!=(t=arguments[u]))for(i in t)n=l(d,i),d!==(o=l(t,i))&&(p&&o&&(r(o)||(c=s(o)))?(c?(c=!1,h=n&&s(n)?n:[]):h=n&&r(n)?n:{},a(d,{name:i,newValue:e(p,h,o)})):void 0!==o&&a(d,{name:i,newValue:o}));return d}},4612:e=>{e.exports=function e(t,i,n){function o(r,a){if(!i[r]){if(!t[r]){if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};t[r][0].call(c.exports,(function(e){return o(t[r][1][e]||e)}),c,c.exports,e,t,i,n)}return i[r].exports}for(var s=void 0,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s={width:"100%",height:"100%"},r=function(e){return Number(e)==Number(e)},a="classList"in document.documentElement?function(e,t){e.classList.add(t)}:function(e,t){var i=e.getAttribute("class")||"";e.setAttribute("class",i+" "+t)},l=function(){function e(t,i){var n=this;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._config={},this._lastRepaint=null,this._maxElementHeight=e.getMaxBrowserHeight(),this.refresh(t,i);var o=this._config;!function e(){var t=n._getScrollPosition(),i=n._lastRepaint;if(n._renderAnimationFrame=window.requestAnimationFrame(e),t!==i){var s=i?t-i:0;if(!i||s<0||s>n._averageHeight){var r=n._renderChunk();n._lastRepaint=t,!1!==r&&"function"==typeof o.afterRender&&o.afterRender()}}}()}return n(e,null,[{key:"create",value:function(t,i){return new e(t,i)}},{key:"mergeStyle",value:function(e,t){for(var i in t)e.style[i]!==t[i]&&(e.style[i]=t[i])}},{key:"getMaxBrowserHeight",value:function(){var t=document.createElement("div"),i=document.createElement("div");e.mergeStyle(t,{position:"absolute",height:"1px",opacity:0}),e.mergeStyle(i,{height:"1e7px"}),t.appendChild(i),document.body.appendChild(t);var n=i.offsetHeight;return document.body.removeChild(t),n}}]),n(e,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(t,i){var n;if(Object.assign(this._config,s,i),!t||1!==t.nodeType)throw new Error("HyperList requires a valid DOM Node container");this._element=t;var a=this._config,l=this._scroller||a.scroller||document.createElement(a.scrollerTagName||"tr");if("boolean"!=typeof a.useFragment&&(this._config.useFragment=!0),!a.generate)throw new Error("Missing required `generate` function");if(!r(a.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(a.itemHeight)&&!r(a.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());r(a.itemHeight)?this._itemHeights=Array(a.total).fill(a.itemHeight):this._itemHeights=a.itemHeight,Object.keys(s).filter((function(e){return e in a})).forEach((function(e){var t=a[e],i=r(t);if(t&&"string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid optional `"+e+"`, expected string or number");i&&(a[e]=t+"px")}));var c=Boolean(a.horizontal),h=a[c?"width":"height"];if(h){var d=r(h),u=!d&&"%"===h.slice(-1),g=d?h:parseInt(h.replace(/px|%/,""),10),p=window[c?"innerWidth":"innerHeight"];this._containerSize=u?p*g/100:r(h)?h:g}var m=a.scrollContainer,f=a.itemHeight*a.total,_=this._maxElementHeight;f>_&&console.warn(["HyperList: The maximum element height",_+"px has","been exceeded; please reduce your item height."].join(" "));var v={width:""+a.width,height:m?f+"px":""+a.height,overflow:m?"none":"auto",position:"relative"};e.mergeStyle(t,v),m&&e.mergeStyle(a.scrollContainer,{overflow:"auto"});var b=(o(n={opacity:"0",position:"absolute"},c?"height":"width","1px"),o(n,c?"width":"height",f+"px"),n);e.mergeStyle(l,b),this._scroller||t.appendChild(l);var C=this._computeScrollPadding();this._scrollPaddingBottom=C.bottom,this._scrollPaddingTop=C.top,this._scroller=l,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(a.total).fill(0),this._computePositions(0),this._renderChunk(null!==this._lastRepaint),"function"==typeof a.afterRender&&a.afterRender()}},{key:"_getRow",value:function(t){var i=this._config,n=i.generate(t),s=n.height;if(void 0!==s&&r(s)?(n=n.element,s!==this._itemHeights[t]&&(this._itemHeights[t]=s,this._computePositions(t),this._scrollHeight=this._computeScrollHeight(t))):s=this._itemHeights[t],!n||1!==n.nodeType)throw new Error("Generator did not return a DOM Node for index: "+t);a(n,i.rowClassName||"vrow");var l=this._itemPositions[t]+this._scrollPaddingTop;return e.mergeStyle(n,o({position:"absolute"},i.horizontal?"left":"top",l+"px")),n}},{key:"_getScrollPosition",value:function(){var e=this._config;return"function"==typeof e.overrideScrollPosition?e.overrideScrollPosition():this._element[e.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(e){var t=this._config,i=this._element,n=this._getScrollPosition(),o=t.total,s=t.reverse?this._getReverseFrom(n):this._getFrom(n)-1;if((s<0||s-this._screenItemsLen<0)&&(s=0),!e&&this._lastFrom===s)return!1;this._lastFrom=s;var r=s+this._cachedItemsLen;(r>o||r+this._cachedItemsLen>o)&&(r=o);var a=t.useFragment?document.createDocumentFragment():[],l=this._scroller;a[t.useFragment?"appendChild":"push"](l);for(var c=s;c<r;c++){var h=this._getRow(c);a[t.useFragment?"appendChild":"push"](h)}if(t.applyPatch)return t.applyPatch(i,a);i.innerHTML="",i.appendChild(a)}},{key:"_computePositions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this._config,i=t.total,n=t.reverse;e<1&&!n&&(e=1);for(var o=e;o<i;o++)n?0===o?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[o]=this._itemPositions[o-1]-this._itemHeights[o]:this._itemPositions[o]=this._itemHeights[o-1]+this._itemPositions[o-1]}},{key:"_computeScrollHeight",value:function(){var t,i=this,n=this._config,s=Boolean(n.horizontal),r=n.total,a=this._itemHeights.reduce((function(e,t){return e+t}),0)+this._scrollPaddingBottom+this._scrollPaddingTop;e.mergeStyle(this._scroller,(o(t={opacity:0,position:"absolute",top:"0px"},s?"height":"width","1px"),o(t,s?"width":"height",a+"px"),t));var l=this._itemHeights.slice(0).sort((function(e,t){return e-t})),c=Math.floor(r/2),h=r%2==0?(l[c]+l[c-1])/2:l[c],d=s?"clientWidth":"clientHeight",u=n.scrollContainer?n.scrollContainer:this._element,g=u[d]?u[d]:this._containerSize;return this._screenItemsLen=Math.ceil(g/h),this._containerSize=g,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,3*this._screenItemsLen),this._averageHeight=h,n.reverse&&window.requestAnimationFrame((function(){s?i._element.scrollLeft=a:i._element.scrollTop=a})),a}},{key:"_computeScrollPadding",value:function(){var e=this._config,t=Boolean(e.horizontal),i=e.reverse,n=window.getComputedStyle(this._element),o=function(e){var t=n.getPropertyValue("padding-"+e);return parseInt(t,10)||0};return t&&i?{bottom:o("left"),top:o("right")}:t?{bottom:o("right"),top:o("left")}:i?{bottom:o("top"),top:o("bottom")}:{bottom:o("bottom"),top:o("top")}}},{key:"_getFrom",value:function(e){for(var t=0;this._itemPositions[t]<e;)t++;return t}},{key:"_getReverseFrom",value:function(e){for(var t=this._config.total-1;t>0&&this._itemPositions[t]<e+this._containerSize;)t--;return t}}]),e}();i.default=l,t.exports=i.default},{}]},{},[1])(1)},18139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function h(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,u=1;function g(e){var t=e.match(i);t&&(d+=t.length);var n=e.lastIndexOf("\n");u=~n?e.length-n:u+e.length}function p(){var e={line:d,column:u};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:u},this.source=l.source}m.prototype.content=e;var f=[];function _(t){var i=new Error(l.source+":"+d+":"+u+": "+t);if(i.reason=t,i.filename=l.source,i.line=d,i.column=u,i.source=e,!l.silent)throw i;f.push(i)}function v(t){var i=t.exec(e);if(i){var n=i[0];return g(n),e=e.slice(n.length),i}}function b(){v(n)}function C(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var i=2;c!=e.charAt(i)&&("*"!=e.charAt(i)||"/"!=e.charAt(i+1));)++i;if(i+=2,c===e.charAt(i-1))return _("End of comment missing");var n=e.slice(2,i-2);return u+=2,g(n),e=e.slice(i),u+=2,t({type:"comment",comment:n})}}function w(){var e=p(),i=v(o);if(i){if(y(),!v(s))return _("property missing ':'");var n=v(r),l=e({type:"declaration",property:h(i[0].replace(t,c)),value:n?h(n[0].replace(t,c)):c});return v(a),l}}return b(),function(){var e,t=[];for(C(t);e=w();)!1!==e&&(t.push(e),C(t));return t}()}},48738:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},70729:e=>{"use strict";var t={};function i(e,n,o){var s,r,a,l,c,h="";for("string"!=typeof n&&(o=n,n=i.defaultChars),void 0===o&&(o=!0),c=function(e){var i,n,o=t[e];if(o)return o;for(o=t[e]=[],i=0;i<128;i++)n=String.fromCharCode(i),/^[0-9a-z]$/i.test(n)?o.push(n):o.push("%"+("0"+i.toString(16).toUpperCase()).slice(-2));for(i=0;i<e.length;i++)o[e.charCodeAt(i)]=e[i];return o}(n),s=0,r=e.length;s<r;s++)if(a=e.charCodeAt(s),o&&37===a&&s+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3)))h+=e.slice(s,s+3),s+=2;else if(a<128)h+=c[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1<r&&(l=e.charCodeAt(s+1))>=56320&&l<=57343){h+=encodeURIComponent(e[s]+e[s+1]),s++;continue}h+="%EF%BF%BD"}else h+=encodeURIComponent(e[s]);return h}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},1593:(e,t,i)=>{var n;self.MonacoEnvironment=(n={editorWorkerService:"editor.worker.js",json:"json.worker.js",html:"html.worker.js",css:"css.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"},{globalAPI:!0,getWorkerUrl:function(e,t){var o=i.p,s=(o?o.replace(/\/$/,"")+"/":"")+n[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(s)){var r=String(window.location),a=r.substr(0,r.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,a.length)!==a){/^(\/\/)/.test(s)&&(s=window.location.protocol+s);var l=new Blob(["/*"+t+'*/importScripts("'+s+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return s}}),i(29477),i(90236),i(71387),i(69317),i(54367),i(72102),i(55833),i(29575),i(85729),i(65125),i(23365),i(93740),i(14907),i(41895),i(36022),i(76917),i(22482),i(31633),i(78370),i(44125),i(61097),i(64970),i(43588),i(60628),i(22470),i(9427),i(19646),i(56353),i(84602),i(66348),i(63288),i(97830),i(97615),i(65766),i(76),i(57253),i(93519),i(77061),i(95313),i(38956),i(78944),i(48766),i(73945),i(45048),i(32894),i(102),i(98762),i(66677),i(24804),i(88088),i(15662),i(64662),i(52614),i(52954),i(79607),i(61271),i(70943),i(37181),i(86709),e.exports=i(7917),i(77365),i(43814),i(81905),i(72323),i(96337),i(40902),i(68423),i(56292),i(40605),i(43763)},16268:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PixelRatio:()=>c,addMatchMediaChangeListener:()=>l,getZoomFactor:()=>h,isAndroid:()=>v,isChrome:()=>p,isElectron:()=>_,isFirefox:()=>u,isSafari:()=>m,isStandalone:()=>C,isWebKit:()=>g,isWebkitWebView:()=>f});var n=i(4669),o=i(5976);class s{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}s.INSTANCE=new s;class r extends o.JT{constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;null===(t=this._mediaQueryList)||void 0===t||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class a extends o.JT{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new r);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function l(e,t){"string"==typeof e&&(e=window.matchMedia(e)),e.addEventListener("change",t)}const c=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,o.dk)(new a)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function h(){return s.INSTANCE.getZoomFactor()}const d=navigator.userAgent,u=d.indexOf("Firefox")>=0,g=d.indexOf("AppleWebKit")>=0,p=d.indexOf("Chrome")>=0,m=!p&&d.indexOf("Safari")>=0,f=!p&&!m&&g,_=d.indexOf("Electron/")>=0,v=d.indexOf("Android")>=0;let b=!1;if(window.matchMedia){const e=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=window.matchMedia("(display-mode: fullscreen)");b=e.matches,l(e,(({matches:e})=>{b&&t.matches||(b=e)}))}function C(){return b}},10161:(e,t,i)=>{"use strict";i.d(t,{D:()=>s});var n=i(16268),o=i(1432);const s={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||n.isStandalone()?0:navigator.keyboard||n.isSafari?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},23547:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(81170).v.text}},65321:(e,t,i)=>{"use strict";i.d(t,{$:()=>re,$Z:()=>ae,Ay:()=>W,Ce:()=>te,Cp:()=>le,D6:()=>k,Dx:()=>S,FK:()=>A,Fx:()=>P,GQ:()=>b,I8:()=>T,If:()=>M,OO:()=>H,PO:()=>g,R3:()=>ee,Re:()=>$,Ro:()=>L,Uh:()=>ce,Uw:()=>p,V3:()=>he,XT:()=>pe,_0:()=>Z,_F:()=>me,_h:()=>ge,_q:()=>_e,dS:()=>z,dp:()=>N,eg:()=>ve,fk:()=>K,go:()=>J,h:()=>Ce,i:()=>D,jL:()=>y,jg:()=>O,jt:()=>de,lI:()=>C,mc:()=>ie,mu:()=>v,nm:()=>f,sQ:()=>fe,tw:()=>G,uN:()=>q,uU:()=>F,vL:()=>Y,vY:()=>V,w:()=>I,wY:()=>ue,wn:()=>R,xQ:()=>E,zB:()=>Q});var n=i(16268),o=i(10161),s=i(59069),r=i(7448),a=i(17301),l=i(4669),c=i(70921),h=i(5976),d=i(66663),u=i(1432);function g(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function f(e,t,i,n){return new m(e,t,i,n)}function _(e){return function(t){return e(new r.n(t))}}const v=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=_(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new s.y(t))}}(i)),f(e,t,o,n)},b=function(e,t,i){return function(e,t,i){return f(e,u.gn&&o.D.pointerEvents?G.POINTER_DOWN:G.MOUSE_DOWN,t,i)}(e,_(t),i)};let C,y;class w{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,a.dL)(e)}}static sort(e,t){return t.priority-e.priority}}function S(e){return document.defaultView.getComputedStyle(e,null)}function k(e){if(e!==document.body)return new L(e.clientWidth,e.clientHeight);if(u.gn&&window.visualViewport)return new L(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new L(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new L(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new L(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}!function(){let e=[],t=null,i=!1,n=!1;const o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(w.sort),t.shift().execute();n=!1};y=(t,n=0)=>{const s=new w(t,n);return e.push(s),i||(i=!0,requestAnimationFrame(o)),s},C=(e,i)=>{if(n){const n=new w(e,i);return t.push(n),n}return y(e,i)}}();class x{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=S(e),o=n?n.getPropertyValue(t):"0";return x.convertToPixels(e,o)}static getBorderLeftWidth(e){return x.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return x.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return x.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return x.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return x.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return x.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return x.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return x.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return x.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return x.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return x.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return x.getDimension(e,"margin-bottom","marginBottom")}}class L{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new L(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof L?e:new L(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function E(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=B(e)?null:S(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=x.getBorderLeftWidth(e),i+=x.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function N(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function D(e){const t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:t.width,height:t.height}}function T(e){let t=e,i=1;do{const e=S(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==document.documentElement);return i}function I(e){const t=x.getMarginLeft(e)+x.getMarginRight(e);return e.offsetWidth+t}function A(e){const t=x.getBorderLeftWidth(e)+x.getBorderRightWidth(e),i=x.getPaddingLeft(e)+x.getPaddingRight(e);return e.offsetWidth-t-i}function M(e){const t=x.getBorderTopWidth(e)+x.getBorderBottomWidth(e),i=x.getPaddingTop(e)+x.getPaddingBottom(e);return e.offsetHeight-t-i}function R(e){const t=x.getMarginTop(e)+x.getMarginBottom(e);return e.offsetHeight+t}function O(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function P(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function F(e,t,i){return!!P(e,t,i)}function B(e){return e&&!!e.host&&!!e.mode}function H(e){return!!W(e)}function W(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return B(e)?e:null}function V(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function z(e=document.getElementsByTagName("head")[0]){const t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}L.None=new L(0,0);let U=null;function j(){return U||(U=z()),U}function K(e,t,i=j()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function q(e,t=j()){if(!t)return;const i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t<i.length;t++)-1!==i[t].selectorText.indexOf(e)&&n.push(t);for(let e=n.length-1;e>=0;e--)t.sheet.deleteRule(n[e])}function $(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const G={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:n.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.isWebKit?"webkitAnimationIteration":"animationiteration"},Q={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function Y(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function Z(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class X extends h.JT{static hasFocusWithin(e){const t=W(e);return O(t?t.activeElement:document.activeElement,e)}constructor(e){super(),this._onDidFocus=this._register(new l.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event;let t=X.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{X.hasFocusWithin(e)!==t&&(t?o():n())},this._register(f(e,G.FOCUS,n,!0)),this._register(f(e,G.BLUR,o,!0)),this._register(f(e,G.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(f(e,G.FOCUS_OUT,(()=>this._refreshStateHandler())))}}function J(e){return new X(e)}function ee(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function te(e,t){return e.insertBefore(t,e.firstChild),t}function ie(e,...t){e.innerText="",ee(e,...t)}const ne=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var oe;function se(e,t,i,...n){const o=ne.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==oe.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function re(e,t,...i){return se(oe.HTML,e,t,...i)}function ae(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function le(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ce(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function he(e){window.open(e,"_blank","noopener")}function de(e){const t=()=>{e(),i=y(t)};let i=y(t);return(0,h.OF)((()=>i.dispose()))}function ue(e){return e?`url('${d.Gi.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ge(e){return`'${e.replace(/'/g,"%27")}'`}function pe(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=pe(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function me(e,t=!1){const i=document.createElement("a");return c.v5("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),(0,h.OF)((()=>{c.ok("afterSanitizeAttributes")}))}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(oe||(oe={})),re.SVG=function(e,t,...i){return se(oe.SVG,e,t,...i)},d.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");const fe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class _e extends l.Q5{constructor(){super(),this._subscriptions=new h.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(f(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(f(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(f(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(f(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return _e.instance||(_e.instance=new _e),_e.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class ve extends h.JT{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(f(this.element,G.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)}))),this._register(f(this.element,G.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(f(this.element,G.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))}))),this._register(f(this.element,G.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)}))),this._register(f(this.element,G.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)})))}}const be=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function Ce(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=be.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups.tag||"div",r=document.createElement(s);o.groups.id&&(r.id=o.groups.id);const a=[];if(o.groups.class)for(const e of o.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups.name&&(l[o.groups.name]=r),n)for(const e of n)e instanceof HTMLElement?r.appendChild(e):"string"==typeof e?r.append(e):(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(ye(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(ye(e),t.toString());return l.root=r,l}function ye(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},70921:(e,t,i)=>{"use strict";i.d(t,{Nw:()=>X,ok:()=>ee,v5:()=>J});var n=Object.hasOwnProperty,o=Object.setPrototypeOf,s=Object.isFrozen,r=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor,l=Object.freeze,c=Object.seal,h=Object.create,d="undefined"!=typeof Reflect&&Reflect,u=d.apply,g=d.construct;u||(u=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),c||(c=function(e){return e}),g||(g=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(t))))});var p,m=x(Array.prototype.forEach),f=x(Array.prototype.pop),_=x(Array.prototype.push),v=x(String.prototype.toLowerCase),b=x(String.prototype.match),C=x(String.prototype.replace),y=x(String.prototype.indexOf),w=x(String.prototype.trim),S=x(RegExp.prototype.test),k=(p=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return g(p,t)});function x(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return u(e,t,n)}}function L(e,t){o&&o(e,null);for(var i=t.length;i--;){var n=t[i];if("string"==typeof n){var r=v(n);r!==n&&(s(t)||(t[i]=r),n=r)}e[n]=!0}return e}function E(e){var t=h(null),i=void 0;for(i in e)u(n,e,[i])&&(t[i]=e[i]);return t}function N(e,t){for(;null!==e;){var i=a(e,t);if(i){if(i.get)return x(i.get);if("function"==typeof i.value)return x(i.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var D=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),T=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=l(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),R=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=l(["#text"]),P=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),F=l(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=c(/\{\{[\s\S]*|[\s\S]*\}\}/gm),V=c(/<%[\s\S]*|[\s\S]*%>/gm),z=c(/^data-[\-\w.\u00B7-\uFFFF]/),U=c(/^aria-[\-\w]+$/),j=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=c(/^(?:\w+script|data):/i),q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function G(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var Q=function(){return"undefined"==typeof window?null:window},Y=function(e,t){if("object"!==(void 0===e?"undefined":$(e))||"function"!=typeof e.createPolicy)return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Z=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,a=t.Node,c=t.Element,h=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,g=t.Text,p=t.Comment,x=t.DOMParser,Z=t.trustedTypes,X=c.prototype,J=N(X,"cloneNode"),ee=N(X,"nextSibling"),te=N(X,"childNodes"),ie=N(X,"parentNode");if("function"==typeof r){var ne=o.createElement("template");ne.content&&ne.content.ownerDocument&&(o=ne.content.ownerDocument)}var oe=Y(Z,n),se=oe&&Fe?oe.createHTML(""):"",re=o,ae=re.implementation,le=re.createNodeIterator,ce=re.createDocumentFragment,he=re.getElementsByTagName,de=n.importNode,ue={};try{ue=E(o).documentMode?o.documentMode:{}}catch(e){}var ge={};i.isSupported="function"==typeof ie&&ae&&void 0!==ae.createHTMLDocument&&9!==ue;var pe=W,me=V,fe=z,_e=U,ve=K,be=q,Ce=j,ye=null,we=L({},[].concat(G(D),G(T),G(I),G(M),G(O))),Se=null,ke=L({},[].concat(G(P),G(F),G(B),G(H))),xe=null,Le=null,Ee=!0,Ne=!0,De=!1,Te=!1,Ie=!1,Ae=!1,Me=!1,Re=!1,Oe=!1,Pe=!0,Fe=!1,Be=!0,He=!0,We=!1,Ve={},ze=null,Ue=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),je=null,Ke=L({},["audio","video","img","source","image","track"]),qe=null,$e=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Ze=Ye,Xe=!1,Je=null,et=o.createElement("form"),tt=function(e){Je&&Je===e||(e&&"object"===(void 0===e?"undefined":$(e))||(e={}),e=E(e),ye="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS):we,Se="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR):ke,qe="ADD_URI_SAFE_ATTR"in e?L(E($e),e.ADD_URI_SAFE_ATTR):$e,je="ADD_DATA_URI_TAGS"in e?L(E(Ke),e.ADD_DATA_URI_TAGS):Ke,ze="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS):Ue,xe="FORBID_TAGS"in e?L({},e.FORBID_TAGS):{},Le="FORBID_ATTR"in e?L({},e.FORBID_ATTR):{},Ve="USE_PROFILES"in e&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=e.SAFE_FOR_TEMPLATES||!1,Ie=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Pe=!1!==e.RETURN_DOM_IMPORT,Fe=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,He=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,Ce=e.ALLOWED_URI_REGEXP||Ce,Ze=e.NAMESPACE||Ye,Te&&(Ne=!1),Oe&&(Re=!0),Ve&&(ye=L({},[].concat(G(O))),Se=[],!0===Ve.html&&(L(ye,D),L(Se,P)),!0===Ve.svg&&(L(ye,T),L(Se,F),L(Se,H)),!0===Ve.svgFilters&&(L(ye,I),L(Se,F),L(Se,H)),!0===Ve.mathMl&&(L(ye,M),L(Se,B),L(Se,H))),e.ADD_TAGS&&(ye===we&&(ye=E(ye)),L(ye,e.ADD_TAGS)),e.ADD_ATTR&&(Se===ke&&(Se=E(Se)),L(Se,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&L(qe,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ze===Ue&&(ze=E(ze)),L(ze,e.FORBID_CONTENTS)),He&&(ye["#text"]=!0),Ie&&L(ye,["html","head","body"]),ye.table&&(L(ye,["tbody"]),delete xe.tbody),l&&l(e),Je=e)},it=L({},["mi","mo","mn","ms","mtext"]),nt=L({},["foreignobject","desc","title","annotation-xml"]),ot=L({},T);L(ot,I),L(ot,A);var st=L({},M);L(st,R);var rt=function(e){var t=ie(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var i=v(e.tagName),n=v(t.tagName);if(e.namespaceURI===Qe)return t.namespaceURI===Ye?"svg"===i:t.namespaceURI===Ge?"svg"===i&&("annotation-xml"===n||it[n]):Boolean(ot[i]);if(e.namespaceURI===Ge)return t.namespaceURI===Ye?"math"===i:t.namespaceURI===Qe?"math"===i&&nt[n]:Boolean(st[i]);if(e.namespaceURI===Ye){if(t.namespaceURI===Qe&&!nt[n])return!1;if(t.namespaceURI===Ge&&!it[n])return!1;var o=L({},["title","style","font","a","script"]);return!st[i]&&(o[i]||!ot[i])}return!1},at=function(e){_(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},lt=function(e,t){try{_(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Re||Oe)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){var t=void 0,i=void 0;if(Me)e="<remove></remove>"+e;else{var n=b(e,/^[\r\n\t ]+/);i=n&&n[0]}var s=oe?oe.createHTML(e):e;if(Ze===Ye)try{t=(new x).parseFromString(s,"text/html")}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Xe?"":s}catch(e){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),Ze===Ye?he.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:r},ht=function(e){return le.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},dt=function(e){return!(e instanceof g||e instanceof p||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof u&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ut=function(e){return"object"===(void 0===a?"undefined":$(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":$(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},gt=function(e,t,n){ge[e]&&m(ge[e],(function(e){e.call(i,t,n,Je)}))},pt=function(e){var t=void 0;if(gt("beforeSanitizeElements",e,null),dt(e))return at(e),!0;if(b(e.nodeName,/[\u0080-\uFFFF]/))return at(e),!0;var n=v(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:n,allowedTags:ye}),!ut(e.firstElementChild)&&(!ut(e.content)||!ut(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return at(e),!0;if("select"===n&&S(/<template/i,e.innerHTML))return at(e),!0;if(!ye[n]||xe[n]){if(He&&!ze[n]){var o=ie(e)||e.parentNode,s=te(e)||e.childNodes;if(s&&o)for(var r=s.length-1;r>=0;--r)o.insertBefore(J(s[r],!0),ee(e))}return at(e),!0}return e instanceof c&&!rt(e)?(at(e),!0):"noscript"!==n&&"noembed"!==n||!S(/<\/no(script|embed)/i,e.innerHTML)?(Te&&3===e.nodeType&&(t=e.textContent,t=C(t,pe," "),t=C(t,me," "),e.textContent!==t&&(_(i.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(at(e),!0)},mt=function(e,t,i){if(Be&&("id"===t||"name"===t)&&(i in o||i in et))return!1;if(Ne&&!Le[t]&&S(fe,t));else if(Ee&&S(_e,t));else{if(!Se[t]||Le[t])return!1;if(qe[t]);else if(S(Ce,C(i,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(i,"data:")||!je[e])if(De&&!S(ve,C(i,be,"")));else if(i)return!1}return!0},ft=function(e){var t=void 0,n=void 0,o=void 0,s=void 0;gt("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(s=r.length;s--;){var l=t=r[s],c=l.name,h=l.namespaceURI;if(n=w(t.value),o=v(c),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr&&(lt(c,e),a.keepAttr))if(S(/\/>/i,n))lt(c,e);else{Te&&(n=C(n,pe," "),n=C(n,me," "));var d=e.nodeName.toLowerCase();if(mt(d,o,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),f(i.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)}},_t=function e(t){var i=void 0,n=ht(t);for(gt("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)gt("uponSanitizeShadowNode",i,null),pt(i)||(i.content instanceof s&&e(i.content),ft(i));gt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,o){var r=void 0,l=void 0,c=void 0,h=void 0,d=void 0;if((Xe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ut(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!i.isSupported){if("object"===$(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ut(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ae||tt(o),i.removed=[],"string"==typeof e&&(We=!1),We);else if(e instanceof a)1===(l=(r=ct("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l);else{if(!Re&&!Te&&!Ie&&-1===e.indexOf("<"))return oe&&Fe?oe.createHTML(e):e;if(!(r=ct(e)))return Re?null:se}r&&Me&&at(r.firstChild);for(var u=ht(We?e:r);c=u.nextNode();)3===c.nodeType&&c===h||pt(c)||(c.content instanceof s&&_t(c.content),ft(c),h=c);if(h=null,We)return e;if(Re){if(Oe)for(d=ce.call(r.ownerDocument);r.firstChild;)d.appendChild(r.firstChild);else d=r;return Pe&&(d=de.call(n,d,!0)),d}var g=Ie?r.outerHTML:r.innerHTML;return Te&&(g=C(g,pe," "),g=C(g,me," ")),oe&&Fe?oe.createHTML(g):g},i.setConfig=function(e){tt(e),Ae=!0},i.clearConfig=function(){Je=null,Ae=!1},i.isValidAttribute=function(e,t,i){Je||tt({});var n=v(e),o=v(t);return mt(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],_(ge[e],t))},i.removeHook=function(e){ge[e]&&f(ge[e])},i.removeHooks=function(e){ge[e]&&(ge[e]=[])},i.removeAllHooks=function(){ge={}},i}();Z.version,Z.isSupported;const X=Z.sanitize,J=(Z.setConfig,Z.clearConfig,Z.isValidAttribute,Z.addHook),ee=Z.removeHook;Z.removeHooks,Z.removeAllHooks},4850:(e,t,i)=>{"use strict";i.d(t,{Y:()=>o});var n=i(4669);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},38626:(e,t,i)=>{"use strict";i.d(t,{X:()=>s,Z:()=>n});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=o(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=o(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=o(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=o(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=o(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=o(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=o(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=o(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=o(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=o(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=o(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return"number"==typeof e?`${e}px`:e}function s(e){return new n(e)}},48764:(e,t,i)=>{"use strict";i.d(t,{BO:()=>s,IY:()=>o,az:()=>r});var n=i(65321);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==c(r.peek(),t);if(i&&(e=r.next()),i||0===c(e,t)||e!==r.peek())if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e;else{r.advance(),2===o.type&&(o=s.pop());const i=c(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},93911:(e,t,i)=>{"use strict";i.d(t,{C:()=>s});var n=i(65321),o=i(5976);class s{constructor(){this._hooks=new o.SL,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,o.OF)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(e){a=window}this._hooks.add(n.nm(a,n.tw.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.nm(a,n.tw.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},59069:(e,t,i)=>{"use strict";i.d(t,{y:()=>c});var n=i(16268),o=i(22258),s=i(8313),r=i(1432);const a=r.dz?256:2048,l=r.dz?2048:256;class c{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return o.kL.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.isFirefox){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(r.dz&&224===t)return 57}else if(n.isWebKit){if(91===t)return 57;if(r.dz&&93===t)return 57;if(!r.dz&&92===t)return 57}return o.H_[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.$M(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},77352:(e,t,i)=>{"use strict";i.d(t,{a:()=>L});var n=i(65321),o=i(70921),s=i(4850),r=i(48764),a=i(59069),l=i(7448),c=i(56811),h=i(17301),d=i(4669),u=i(59365),g=i(21212),p=i(44742),m=i(79579),f=i(5976);let _={};!function(){function e(e,t){t(_)}var t,i;e.amd=!0,t=this,i=function(e){function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var s=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(e){return c[e]};function d(e,t){if(t){if(s.test(e))return e.replace(r,h)}else if(a.test(e))return e.replace(l,h);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!_.test(i)&&(i=function(e,t){b[" "+e]||(C.test(e)?b[" "+e]=e+"/":b[" "+e]=L(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(w,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}var b={},C=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function k(e){for(var t,i,n=1;n<arguments.length;n++)for(i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function x(e,t){var i=e.replace(/\|/g,(function(e,t,i){for(var n=!1,o=t;--o>=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function L(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o<n;){var s=e.charAt(n-o-1);if(s!==t||i){if(s===t||!i)break;o++}else o++}return e.slice(0,n-o)}function E(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function N(e,t){if(t<1)return"";for(var i="";t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function D(e,t,i,n){var o=t.href,s=t.title?d(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:o,title:s,text:d(r)}}var T=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=L(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,o,s,r,a,l,c,h,d,u,g,p,m=t[1].trim(),f=m.length>1,_={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var v=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),h=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(r=2,g=h.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=h.slice(r),r+=t[1].length),l=!1,!h&&/^ *$/.test(d)&&(i+=d+"\n",e=e.substring(d.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(h=u=e.split("\n",1)[0],this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!y.test(h))&&!w.test(h)&&!b.test(h)&&!C.test(e);){if(h.search(/[^ ]/)>=r||!h.trim())g+="\n"+h.slice(r);else{if(l)break;g+="\n"+h}l||h.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}_.loose||(c?_.loose=!0:/\n *\n *$/.test(i)&&(c=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(g))&&(s="[ ] "!==o[0],g=g.replace(/^\[[ xX]\] +/,"")),_.items.push({type:"list_item",raw:i,task:!!o,checked:s,loose:!1,text:g}),_.raw+=i}_.items[_.items.length-1].raw=i.trimRight(),_.items[_.items.length-1].text=g.trimRight(),_.raw=_.raw.trimRight();var S=_.items.length;for(a=0;a<S;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);var k=_.items[a].tokens.filter((function(e){return"space"===e.type})),x=k.every((function(e){for(var t,i=0,o=n(e.raw.split(""));!(t=o()).done;)if("\n"===t.value&&(i+=1),i>1)return!0;return!1}));!_.loose&&k.length&&x&&(_.loose=!0,_.items[a].loose=!0)}return _}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:x(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o,s,r,a=i.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(i.align[n])?i.align[n]="right":/^ *:-+: *$/.test(i.align[n])?i.align[n]="center":/^ *:-+ *$/.test(i.align[n])?i.align[n]="left":i.align[n]=null;for(a=i.rows.length,n=0;n<a;n++)i.rows[n]=x(i.rows[n],i.header.length).map((function(e){return{text:e}}));for(a=i.header.length,o=0;o<a;o++)i.header[o].tokens=this.lexer.inline(i.header[o].text);for(a=i.rows.length,o=0;o<a;o++)for(r=i.rows[o],s=0;s<r.length;s++)r[s].tokens=this.lexer.inline(r[s].text);return i}}},i.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}},i.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var i="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}},i.text=function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}},i.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},i.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var n=L(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,o=0;o<i;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&--n<0)return o;return-1}(t[2],"()");if(o>-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(i)?r.slice(1):r.slice(1,-1)),D(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return D(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var s,r,a=n[0].length-1,l=a,c=0,h="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=h.exec(t));)if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=s.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+c),Math.min(a,r)%2){var d=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:d,tokens:this.lexer.inlineTokens(d)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else c+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=d(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=d(this.options.mangle?t(o[1]):o[1])):i=d(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=d(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=d(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):d(n[0]):n[0]:d(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),I={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};I.def=m(I.def).replace("label",I._label).replace("title",I._title).getRegex(),I.bullet=/(?:[*+-]|\d{1,9}[.)])/,I.listItemStart=m(/^( *)(bull) */).replace("bull",I.bullet).getRegex(),I.list=m(I.list).replace(/bull/g,I.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+I.def.source+")").getRegex(),I._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",I._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,I.html=m(I.html,"i").replace("comment",I._comment).replace("tag",I._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I.paragraph=m(I._paragraph).replace("hr",I.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I._tag).getRegex(),I.blockquote=m(I.blockquote).replace("paragraph",I.paragraph).getRegex(),I.normal=k({},I),I.gfm=k({},I.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),I.gfm.table=m(I.gfm.table).replace("hr",I.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I._tag).getRegex(),I.gfm.paragraph=m(I._paragraph).replace("hr",I.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",I.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I._tag).getRegex(),I.pedantic=k({},I.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",I._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,paragraph:m(I.normal._paragraph).replace("hr",I.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",I.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var A={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function M(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function R(e){var t,i,n="",o=e.length;for(t=0;t<o;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}A._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",A.punctuation=m(A.punctuation).replace(/punctuation/g,A._punctuation).getRegex(),A.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,A.escapedEmSt=/\\\*|\\_/g,A._comment=m(I._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),A.emStrong.lDelim=m(A.emStrong.lDelim).replace(/punct/g,A._punctuation).getRegex(),A.emStrong.rDelimAst=m(A.emStrong.rDelimAst,"g").replace(/punct/g,A._punctuation).getRegex(),A.emStrong.rDelimUnd=m(A.emStrong.rDelimUnd,"g").replace(/punct/g,A._punctuation).getRegex(),A._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,A._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,A._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,A.autolink=m(A.autolink).replace("scheme",A._scheme).replace("email",A._email).getRegex(),A._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,A.tag=m(A.tag).replace("comment",A._comment).replace("attribute",A._attribute).getRegex(),A._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,A._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,A._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,A.link=m(A.link).replace("label",A._label).replace("href",A._href).replace("title",A._title).getRegex(),A.reflink=m(A.reflink).replace("label",A._label).replace("ref",I._label).getRegex(),A.nolink=m(A.nolink).replace("ref",I._label).getRegex(),A.reflinkSearch=m(A.reflinkSearch,"g").replace("reflink",A.reflink).replace("nolink",A.nolink).getRegex(),A.normal=k({},A),A.pedantic=k({},A.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",A._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",A._label).getRegex()}),A.gfm=k({},A.normal,{escape:m(A.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),A.gfm.url=m(A.gfm.url,"i").replace("email",A.gfm._extended_email).getRegex(),A.breaks=k({},A.gfm,{br:m(A.br).replace("{2,}","*").getRegex(),text:m(A.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var O=function(){function i(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new T,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var i={block:I.normal,inline:A.normal};this.options.pedantic?(i.block=I.pedantic,i.inline=A.pedantic):this.options.gfm&&(i.block=I.gfm,this.options.breaks?i.inline=A.breaks:i.inline=A.gfm),this.tokenizer.rules=i}i.lex=function(e,t){return new i(t).lex(e)},i.lexInline=function(e,t){return new i(t).inlineTokens(e)};var n,o,s=i.prototype;return s.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},s.blockTokens=function(e,t){var i,n,o,s,r=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,i){return t+" ".repeat(i.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(i=n.call({lexer:r},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),1===i.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(o=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(o)))n=t[t.length-1],s&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},s.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},s.inlineTokens=function(e,t){var i,n,o,s=this;void 0===t&&(t=[]);var r,a,l,c=e;if(this.tokens.links){var h=Object.keys(this.tokens.links);if(h.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(c));)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,r.index)+"["+N("a",r[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,r.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:s},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,c,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,R))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,R))){if(o=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;s.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(o,M))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:I,inline:A}}}],null&&t(n.prototype,null),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),P=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+d(n,!0)+'">'+(i?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:d(e,!0))+"</code></pre>\n"},i.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+n.slug(i))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},i.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"},i.listitem=function(e){return"<li>"+e+"</li>\n"},i.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},i.paragraph=function(e){return"<p>"+e+"</p>\n"},i.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},i.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"},i.strong=function(e){return"<strong>"+e+"</strong>"},i.em=function(e){return"<em>"+e+"</em>"},i.codespan=function(e){return"<code>"+e+"</code>"},i.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.del=function(e){return"<del>"+e+"</del>"},i.link=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<a href="'+d(e)+'"';return t&&(n+=' title="'+t+'"'),n+">"+i+"</a>"},i.image=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+(this.options.xhtml?"/>":">")},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),H=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,c,h,d,u,p,m,f,_,v,b,C,y,w="",S=e.length;for(i=0;i<S;i++)if(d=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type])||!1===(y=this.options.extensions.renderers[d.type].call({parser:this},d))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))switch(d.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(d.tokens),d.depth,g(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",s=d.header.length,n=0;n<s;n++)l+=this.renderer.tablecell(this.parseInline(d.header[n].tokens),{header:!0,align:d.align[n]});for(c+=this.renderer.tablerow(l),h="",s=d.rows.length,n=0;n<s;n++){for(l="",r=(a=d.rows[n]).length,o=0;o<r;o++)l+=this.renderer.tablecell(this.parseInline(a[o].tokens),{header:!1,align:d.align[o]});h+=this.renderer.tablerow(l)}w+=this.renderer.table(c,h);continue;case"blockquote":h=this.parse(d.tokens),w+=this.renderer.blockquote(h);continue;case"list":for(u=d.ordered,p=d.start,m=d.loose,s=d.items.length,h="",n=0;n<s;n++)v=(_=d.items[n]).checked,b=_.task,f="",_.task&&(C=this.renderer.checkbox(v),m?_.tokens.length>0&&"paragraph"===_.tokens[0].type?(_.tokens[0].text=C+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&"text"===_.tokens[0].tokens[0].type&&(_.tokens[0].tokens[0].text=C+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:C}):f+=C),f+=this.parse(_.tokens,m),h+=this.renderer.listitem(f,b,v);w+=this.renderer.list(h,u,p);continue;case"html":w+=this.renderer.html(d.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(h=d.tokens?this.parseInline(d.tokens):d.text;i+1<S&&"text"===e[i+1].type;)h+="\n"+((d=e[++i]).tokens?this.parseInline(d.tokens):d.text);w+=t?this.renderer.paragraph(h):h;continue;default:var k='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}else w+=y||"";return w},i.parseInline=function(e,t){t=t||this.renderer;var i,n,o,s="",r=e.length;for(i=0;i<r;i++)if(n=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type])||!1===(o=this.options.extensions.renderers[n.type].call({parser:this},n))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type))switch(n.type){case"escape":case"text":s+=t.text(n.text);break;case"html":s+=t.html(n.text);break;case"link":s+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":s+=t.image(n.href,n.title,n.text);break;case"strong":s+=t.strong(this.parseInline(n.tokens,t));break;case"em":s+=t.em(this.parseInline(n.tokens,t));break;case"codespan":s+=t.codespan(n.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(n.tokens,t));break;default:var a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}else s+=o||"";return s},t}();function W(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),E(t=k({},W.defaults,t||{})),i){var n,o=t.highlight;try{n=O.lex(e,t)}catch(e){return i(e)}var s=function(e){var s;if(!e)try{t.walkTokens&&W.walkTokens(n,t.walkTokens),s=H.parse(n,t)}catch(t){e=t}return t.highlight=o,e?i(e):i(null,s)};if(!o||o.length<3)return s();if(delete t.highlight,!n.length)return s();var r=0;return W.walkTokens(n,(function(e){"code"===e.type&&(r++,setTimeout((function(){o(e.text,e.lang,(function(t,i){if(t)return s(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),0==--r&&s()}))}),0))})),void(0===r&&s())}function a(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}try{var l=O.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(W.walkTokens(l,t.walkTokens)).then((function(){return H.parse(l,t)})).catch(a);W.walkTokens(l,t.walkTokens)}return H.parse(l,t)}catch(e){a(e)}}W.options=W.setOptions=function(t){var i;return k(W.defaults,t),i=W.defaults,e.defaults=i,W},W.getDefaults=o,W.defaults=e.defaults,W.use=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n,o=k.apply(void 0,[{}].concat(t)),s=W.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(n=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=s.renderers?s.renderers[e.name]:null;s.renderers[e.name]=t?function(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];var s=e.renderer.apply(this,n);return!1===s&&(s=t.apply(this,n)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");s[e.level]?s[e.level].unshift(e.tokenizer):s[e.level]=[e.tokenizer],e.start&&("block"===e.level?s.startBlock?s.startBlock.push(e.start):s.startBlock=[e.start]:"inline"===e.level&&(s.startInline?s.startInline.push(e.start):s.startInline=[e.start]))}e.childTokens&&(s.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=W.defaults.renderer||new P,i=function(i){var n=t[i];t[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=e.renderer[i].apply(t,s);return!1===a&&(a=n.apply(t,s)),a}};for(var n in e.renderer)i(n);o.renderer=t}(),e.tokenizer&&function(){var t=W.defaults.tokenizer||new T,i=function(i){var n=t[i];t[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=e.tokenizer[i].apply(t,s);return!1===a&&(a=n.apply(t,s)),a}};for(var n in e.tokenizer)i(n);o.tokenizer=t}(),e.walkTokens){var t=W.defaults.walkTokens;o.walkTokens=function(i){var n=[];return n.push(e.walkTokens.call(this,i)),t&&(n=n.concat(t.call(this,i))),n}}n&&(o.extensions=s),W.setOptions(o)}))},W.walkTokens=function(e,t){for(var i,o=[],s=function(){var e=i.value;switch(o=o.concat(t.call(W,e)),e.type){case"table":for(var s,r=n(e.header);!(s=r()).done;){var a=s.value;o=o.concat(W.walkTokens(a.tokens,t))}for(var l,c=n(e.rows);!(l=c()).done;)for(var h,d=n(l.value);!(h=d()).done;){var u=h.value;o=o.concat(W.walkTokens(u.tokens,t))}break;case"list":o=o.concat(W.walkTokens(e.items,t));break;default:W.defaults.extensions&&W.defaults.extensions.childTokens&&W.defaults.extensions.childTokens[e.type]?W.defaults.extensions.childTokens[e.type].forEach((function(i){o=o.concat(W.walkTokens(e[i],t))})):e.tokens&&(o=o.concat(W.walkTokens(e.tokens,t)))}},r=n(e);!(i=r()).done;)s();return o},W.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");E(t=k({},W.defaults,t||{}));try{var i=O.lexInline(e,t);return t.walkTokens&&W.walkTokens(i,t.walkTokens),H.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},W.Parser=H,W.parser=H.parse,W.Renderer=P,W.TextRenderer=F,W.Lexer=O,W.lexer=O.lex,W.Tokenizer=T,W.Slugger=B,W.parse=W;var V=W.options,z=W.setOptions,U=W.use,j=W.walkTokens,K=W.parseInline,q=W,$=H.parse,G=O.lex;e.Lexer=O,e.Parser=H,e.Renderer=P,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=T,e.getDefaults=o,e.lexer=G,e.marked=W,e.options=V,e.parse=q,e.parseInline=K,e.parser=$,e.setOptions=z,e.use=U,e.walkTokens=j,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports?i(exports):e.amd?e(0,i):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),_.Lexer||exports.Lexer,_.Parser||exports.Parser,_.Renderer||exports.Renderer,_.Slugger||exports.Slugger,_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.getDefaults||exports.getDefaults,_.lexer||exports.lexer;var v=_.marked||exports.marked,b=(_.options||exports.options,_.parse||exports.parse,_.parseInline||exports.parseInline,_.parser||exports.parser,_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(23897)),C=i(66663),y=i(36248),w=i(95935),S=i(97295),k=i(70666);const x=Object.freeze({image:(e,t,i)=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,u.v1)(e)),o.push(`src="${(0,u.d9)(e)}"`)),i&&o.push(`alt="${(0,u.d9)(i)}"`),t&&o.push(`title="${(0,u.d9)(t)}"`),n.length&&(o=o.concat(n)),"<img "+o.join(" ")+">"},paragraph:e=>`<p>${e}</p>`,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=(0,u.oR)(i)),t="string"==typeof t?(0,u.d9)((0,u.oR)(t)):"",`<a href="${e=(e=(0,u.oR)(e)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}" title="${t||e}">${i}</a>`)});function L(e,t={},i={}){var o;const u=new f.SL;let m=!1;const _=(0,r.az)(t),w=function(t){let i;try{i=(0,b.Q)(decodeURIComponent(t))}catch(e){}return i?(i=(0,y.rs)(i,(t=>e.uris&&e.uris[t]?k.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},L=function(t,i){const n=e.uris&&e.uris[t];let o=k.o.revive(n);return i?t.startsWith(C.lg.data+":")?t:(o||(o=k.o.parse(t)),C.Gi.uriToBrowserUri(o).toString(!0)):o?k.o.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:w(o.query)})),o.toString()):t},D=new v.Renderer;D.image=x.image,D.link=x.link,D.paragraph=x.paragraph;const T=[];if(t.codeBlockRenderer&&(D.code=(e,i)=>{const n=p.a.nextId(),o=t.codeBlockRenderer(function(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}(i),e);return T.push(o.then((e=>[n,e]))),`<div class="code" data-code="${n}">${(0,S.YU)(e)}</div>`}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset.href;o&&(e.baseUri&&(o=E(k.o.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){(0,h.dL)(e)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.Y(_,"click")),r=t.actionHandler.disposables.add(new s.Y(_,"auxclick"));t.actionHandler.disposables.add(d.ju.any(o.event,r.event)((e=>{const t=new l.n(e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.nm(_,"keydown",(e=>{const t=new a.y(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=D;let I=null!==(o=e.value)&&void 0!==o?o:"";I.length>1e5&&(I=`${I.substr(0,1e5)}…`),e.supportThemeIcons&&(I=(0,g.f$)(I));let A=v.parse(I,i);e.supportThemeIcons&&(A=(0,c.T)(A).map((e=>"string"==typeof e?e:e.outerHTML)).join(""));const M=(new DOMParser).parseFromString(N(e,A),"text/html");if(M.body.querySelectorAll("img").forEach((t=>{const i=t.getAttribute("src");if(i){let n=i;try{e.baseUri&&(n=E(k.o.from(e.baseUri),n))}catch(e){}t.src=L(n,!0)}})),M.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.removeAttribute("href"),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=L(i,!1);e.baseUri&&(n=E(k.o.from(e.baseUri),i)),t.dataset.href=n}})),_.innerHTML=N(e,M.body.innerHTML),T.length>0&&Promise.all(T).then((e=>{var i,o;if(m)return;const s=new Map(e),r=_.querySelectorAll("div[data-code]");for(const e of r){const t=s.get(null!==(i=e.dataset.code)&&void 0!==i?i:"");t&&n.mc(e,t)}null===(o=t.asyncRenderCallback)||void 0===o||o.call(t)})),t.asyncRenderCallback)for(const e of _.getElementsByTagName("img")){const i=u.add(n.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:_,dispose:()=>{m=!0,u.dispose()}}}function E(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,w.i3)(e,t).toString():(0,w.i3)((0,w.XX)(e),t).toString()}function N(e,t){const{config:i,allowedSchemes:s}=function(e){const t=[C.lg.http,C.lg.https,C.lg.mailto,C.lg.data,C.lg.file,C.lg.vscodeFileResource,C.lg.vscodeRemote,C.lg.vscodeRemoteResource];return e.isTrusted&&t.push(C.lg.command),{config:{ALLOWED_TAGS:[...n.sQ],ALLOWED_ATTR:D,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);o.v5("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName);else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}));const r=n._F(s);try{return o.Nw(t,Object.assign(Object.assign({},i),{RETURN_TRUSTED_TYPE:!0}))}finally{o.ok("uponSanitizeAttribute"),r.dispose()}}const D=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width"];new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]),new m.o((()=>{const e=new v.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}))},7448:(e,t,i)=>{"use strict";i.d(t,{n:()=>l,q:()=>c});var n=i(16268);let o=!1,s=null;function r(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return o=!0,null}catch(e){return o=!0,null}return e.parent}var a=i(1432);class l{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);const t=class{static getSameOriginWindowChain(){if(!s){s=[];let e,t=window;do{e=r(t),e?s.push({window:t,iframeElement:t.frameElement||null}):s.push({window:t,iframeElement:null}),t=e}while(t)}return s.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;const o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class c{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.isFirefox&&!a.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.isSafari&&a.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.isFirefox&&!a.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;null===(e=this.browserEvent)||void 0===e||e.preventDefault()}stopPropagation(){var e;null===(e=this.browserEvent)||void 0===e||e.stopPropagation()}}},50795:(e,t,i)=>{"use strict";var n;i.d(t,{B:()=>n}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i=Object.assign({},t),n=Object.assign({},t),o=Object.assign({},t);let s=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,d()}function c(){1===r.input&&(performance.mark("input/end"),r.input=2)}function h(){1===r.render&&(performance.mark("render/end"),r.render=2)}function d(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",o),s++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/s,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(c)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(h),d())},e.getAndClearMeasurements=function(){if(0===s)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(o),sampleCount:s};return m(t),m(i),m(n),m(o),s=0,e}}(n||(n={}))},10553:(e,t,i)=>{"use strict";i.d(t,{o:()=>c,t:()=>n});var n,o=i(65321),s=i(9488),r=i(49898),a=i(5976),l=i(91741);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class c extends a.JT{constructor(){super(),this.dispatched=!1,this.targets=new l.S,this.ignoreTargets=new l.S,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(o.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(o.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(o.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){if(!c.isTouchDevice())return a.JT.None;c.INSTANCE||(c.INSTANCE=new c);const t=c.INSTANCE.targets.push(e);return(0,a.OF)(t)}static ignoreTarget(e){if(!c.isTouchDevice())return a.JT.None;c.INSTANCE||(c.INSTANCE=new c);const t=c.INSTANCE.ignoreTargets.push(e);return(0,a.OF)(t)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i<o;i++){const o=e.targetTouches.item(i);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:t,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[t],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};const s=this.newGestureEvent(n.Start,o.target);s.pageX=o.pageX,s.pageY=o.pageY,this.dispatchEvent(s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){const t=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,r=e.changedTouches.length;o<r;o++){const r=e.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}const a=this.activeTouches[r.identifier],l=Date.now()-a.initialTimeStamp;if(l<c.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){const e=this.newGestureEvent(n.Tap,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(l>=c.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){const e=s.Gb(a.rollingPageX),i=s.Gb(a.rollingPageY),n=s.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],o=e-a.rollingPageX[0],r=i-a.rollingPageY[0],l=[...this.targets].filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>c.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,s,r,a,l,h){this.handle=o.jL((()=>{const o=Date.now(),d=o-t;let u=0,g=0,p=!0;i+=c.SCROLL_FRICTION*d,a+=c.SCROLL_FRICTION*d,i>0&&(p=!1,u=s*i*d),a>0&&(p=!1,g=l*a*d);const m=this.newGestureEvent(n.Change);m.translationX=u,m.translationY=g,e.forEach((e=>e.dispatchEvent(m))),p||this.inertia(e,o,i,s,r+u,a,l,h+g)}))}onTouchMove(e){const t=Date.now();for(let i=0,o=e.changedTouches.length;i<o;i++){const o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}const r=this.activeTouches[o.identifier],a=this.newGestureEvent(n.Change,r.initialTarget);a.translationX=o.pageX-s.Gb(r.rollingPageX),a.translationY=o.pageY-s.Gb(r.rollingPageY),a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}c.SCROLL_FRICTION=-.005,c.HOLD_DELAY=700,c.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([r.H],c,"isTouchDevice",null)},88609:(e,t,i)=>{"use strict";i.d(t,{gU:()=>N,YH:()=>E,Lc:()=>D});var n=i(16268),o=i(23547),s=i(65321),r=i(10553),a=i(51433),l=i(4850),c=i(59069),h=i(77352),d=i(43799),u=i(9488),g=i(4669),p=i(22258),m=i(5976),f=i(1432),_=i(63580);const v=s.$,b="selectOption.entry.template";class C{get templateId(){return b}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=s.R3(e,v(".option-text")),t.detail=s.R3(e,v(".option-detail")),t.decoratorRight=s.R3(e,v(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class y extends m.JT{constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=y.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new g.Q5,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return b}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=s.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=s.R3(this.selectDropDownContainer,v(".select-box-details-pane"));const t=s.R3(this.selectDropDownContainer,v(".select-box-dropdown-container-width-control")),i=s.R3(t,v(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",s.R3(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=s.dS(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(s.nm(this.selectDropDownContainer,s.tw.DRAG_START,(e=>{s.zB.stop(e,!0)})))}registerListeners(){let e;this._register(s.mu(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}))),this._register(s.nm(this.selectElement,s.tw.CLICK,(e=>{s.zB.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.MOUSE_DOWN,(e=>{s.zB.stop(e)}))),this._register(s.nm(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(s.nm(this.selectElement,"touchend",(t=>{s.zB.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.KEY_DOWN,(e=>{const t=new c.y(e);let i=!1;f.dz?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),s.zB.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){u.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",o=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",s=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=o,this.selectElement.style.borderColor=s}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=s.XT(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const o=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=o,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(e){}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=s.i(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),o=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),r=t.top-y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,a=this.selectElement.offsetWidth,l=this.setWidthControlElement(this.widthControlElement),c=Math.max(l,Math.round(a)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,u=h+n+d,g=Math.floor((o-n-d)/this.getHeight()),p=Math.floor((r-n-d)/this.getHeight());if(e)return!(t.top+t.height>window.innerHeight-22||t.top<y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||g<1&&p<1||(g<y.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),0));if(t.top+t.height>window.innerHeight-22||t.top<y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||0===this._dropDownPosition&&g<1||1===this._dropDownPosition&&p<1)return this.hideSelectDropDown(!0),!1;if(0===this._dropDownPosition){if(this._isVisible&&g+p<1)return this.hideSelectDropDown(!0),!1;u>o&&(h=g*this.getHeight())}else u>r&&(h=p*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+n+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+n+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=s.w(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=s.R3(e,v(".select-box-dropdown-list-container")),this.listRenderer=new C,this.selectList=new d.aV("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,_.NC)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.Y(this.selectDropDownListContainer,"keydown")),i=g.ju.chain(t.event).filter((()=>this.selectList.length>0)).map((e=>new c.y(e)));this._register(i.filter((e=>3===e.keyCode)).on((e=>this.onEnter(e)),this)),this._register(i.filter((e=>2===e.keyCode)).on((e=>this.onEnter(e)),this)),this._register(i.filter((e=>9===e.keyCode)).on((e=>this.onEscape(e)),this)),this._register(i.filter((e=>16===e.keyCode)).on((e=>this.onUpArrow(e)),this)),this._register(i.filter((e=>18===e.keyCode)).on((e=>this.onDownArrow(e)),this)),this._register(i.filter((e=>12===e.keyCode)).on(this.onPageDown,this)),this._register(i.filter((e=>11===e.keyCode)).on(this.onPageUp,this)),this._register(i.filter((e=>14===e.keyCode)).on(this.onHome,this)),this._register(i.filter((e=>13===e.keyCode)).on(this.onEnd,this)),this._register(i.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=80&&e.keyCode<=108)).on(this.onCharacter,this)),this._register(s.nm(this.selectList.getHTMLElement(),s.tw.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(s.nm(this.selectDropDownContainer,s.tw.FOCUS_OUT,(e=>{this._isVisible&&!s.jg(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;s.zB.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n<this.options.length&&!o&&(this.selected=n,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,t){const i=e=>{for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes.item(t);"img"===(n.tagName&&n.tagName.toLowerCase())?e.removeChild(n):i(n)}},n=(0,h.a)({value:e,supportThemeIcons:!0},{actionHandler:t});return n.element.classList.add("select-box-description-markdown"),i(n.element),n.element}onListFocus(e){this._isVisible&&this._hasDetails&&this.updateDetail(e.indexes[0])}updateDetail(e){var t,i;this.selectionDetailsPane.innerText="";const n=this.options[e],o=null!==(t=null==n?void 0:n.description)&&void 0!==t?t:"",s=null!==(i=null==n?void 0:n.descriptionIsMarkdown)&&void 0!==i&&i;if(o){if(s){const e=n.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(o,e))}else this.selectionDetailsPane.innerText=o;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){s.zB.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){s.zB.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){s.zB.stop(e,!0);const t=this.options[this.selected+1].isDisabled;if(t&&this.options.length>this.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(s.zB.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){s.zB.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onPageDown(e){s.zB.stop(e),this.selectList.focusNextPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){s.zB.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){s.zB.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=p.kL.toString(e.keyCode);let i=-1;for(let n=0;n<this.options.length-1;n++)if(i=(n+this.selected+1)%this.options.length,this.options[i].text.charAt(0).toUpperCase()===t&&!this.options[i].isDisabled){this.select(i),this.selectList.setFocus([i]),this.selectList.reveal(this.selectList.getFocus()[0]),s.zB.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}y.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,y.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3;class w extends m.JT{constructor(e,t,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new g.Q5),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(r.o.addTarget(this.selectElement)),[r.t.Tap].forEach((e=>{this._register(s.nm(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(s.mu(this.selectElement,"click",(e=>{s.zB.stop(e,!0)}))),this._register(s.mu(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(s.mu(this.selectElement,"keydown",(e=>{let t=!1;f.dz?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&u.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&"string"==typeof this.options[this.selected].text?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){var e,t,i;this.selectElement&&(this.selectElement.style.backgroundColor=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",this.selectElement.style.color=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",this.selectElement.style.borderColor=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"")}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}}var S=i(93794);class k extends S.${constructor(e,t,i,n,o){super(),f.dz&&!(null==o?void 0:o.useCustomDrawn)?this.selectBoxDelegate=new w(e,t,n,o):this.selectBoxDelegate=new y(e,t,i,n,o),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}var x=i(74741),L=i(98401);class E extends m.JT{get action(){return this._action}constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof x.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new x.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.isFirefox&&this._register((0,s.nm)(e,s.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(o.g.TEXT,this._action.label)})))),this._register((0,s.nm)(t,r.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.nm)(t,s.tw.MOUSE_DOWN,(e=>{i||s.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),f.dz&&this._register((0,s.nm)(t,s.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.CLICK,(e=>{s.zB.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.DBLCLICK,(e=>{s.zB.stop(e,!0)}))),[s.tw.MOUSE_UP,s.tw.MOUSE_OUT].forEach((e=>{this._register((0,s.nm)(t,e,(e=>{s.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;s.zB.stop(e,!0);const n=L.Jp(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=(0,a.g)(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class N extends E{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,s.R3)(this.element,(0,s.$)("a.action-label"))),this.label&&(this._action.id===x.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,s.R3)(this.element,(0,s.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=_.NC({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}class D extends E{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new k(i,n,o,s,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}},90317:(e,t,i)=>{"use strict";i.d(t,{o:()=>h});var n=i(65321),o=i(59069),s=i(88609),r=i(74741),a=i(4669),l=i(5976),c=i(98401);class h extends l.JT{constructor(e,t={}){var i,c,h,d,u,g;let p,m;switch(super(),this._actionRunnerDisposables=this._register(new l.SL),this.viewItemDisposables=this._register(new l.b2),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new a.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new a.Q5({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new a.Q5),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new a.Q5),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(c=this.options.orientation)&&void 0!==c?c:0,this._triggerKeys={keyDown:null!==(d=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keyDown)&&void 0!==d&&d,keys:null!==(g=null===(u=this.options.triggerKeys)||void 0===u?void 0:u.keys)&&void 0!==g?g:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new r.Wi,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:p=[15],m=[17];break;case 1:p=[16],m=[18],this.domNode.className+=" vertical"}this._register(n.nm(this.domNode,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;p&&(t.equals(p[0])||t.equals(p[1]))?i=this.focusPrevious():m&&(t.equals(m[0])||t.equals(m[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof s.YH&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.nm(this.domNode,n.tw.KEY_UP,(e=>{const t=new o.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.vY()!==this.domNode&&n.jg(n.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof s.YH&&e.isEnabled()));e instanceof s.YH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof s.YH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(n.jg(n.vY(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach((t=>t.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t<this.actionsList.childNodes.length;t++)if(this.actionsList.childNodes[t]===e)return this.viewItems[t].action}}push(e,t={}){const i=Array.isArray(e)?e:[e];let o=c.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new s.gU(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.nm(i,n.tw.CONTEXT_MENU,(e=>{n.zB.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.YH&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),o++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,l.B9)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.PO(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===r.Z0.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===r.Z0.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const o=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(o){let n=!0;c.mf(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&c.mf(o.isEnabled)&&!o.isEnabled()&&(n=!1),o.action.id===r.Z0.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.YH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return i=this,n=void 0,s=function*(){yield this._actionRunner.run(e,t)},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}dispose(){this._context=void 0,this.viewItems=(0,l.B9)(this.viewItems),this.getContainer().remove(),super.dispose()}}},85152:(e,t,i)=>{"use strict";i.d(t,{Z9:()=>d,i7:()=>u,wW:()=>h});var n=i(65321),o=i(1432);let s,r,a,l,c;function h(e){s=document.createElement("div"),s.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};l=i(),c=i(),e.appendChild(s)}function d(e){s&&(r.textContent!==e?(n.PO(a),g(r,e)):(n.PO(r),g(a,e)))}function u(e){s&&(o.dz?d(e):l.textContent!==e?(n.PO(c),g(l,e)):(n.PO(l),g(c,e)))}function g(e,t){n.PO(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},67488:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(65321),o=i(97295);class s{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=(0,o.WU)(this.countFormat,this.count),this.element.title=(0,o.WU)(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},61364:(e,t,i)=>{"use strict";i.d(t,{C:()=>d});var n=i(65321),o=i(88609),s=i(59069),r=i(10553),a=i(74741),l=i(4669);class c extends a.Wi{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.tw.CLICK,n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this.element,e,(e=>n.zB.stop(e,!0))));for(const e of[n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this._label,e,(e=>{e instanceof MouseEvent&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.nm)(this._label,n.tw.KEY_UP,(e=>{const t=new s.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(r.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class h extends c{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class d extends o.YH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new h(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}},3070:(e,t,i)=>{"use strict";i.d(t,{V:()=>d});var n=i(65321),o=i(51307),s=i(77927),r=i(93794),a=i(4669),l=i(63580),c=i(5976);const h=l.NC("defaultLabel","input");class d extends r.${constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new c.SL,this.additionalToggles=[],this._onDidOptionChange=this._register(new a.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.Q5),this._onKeyUp=this._register(new a.Q5),this._onCaseSensitiveKeyDown=this._register(new a.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||h,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",d=i.appendRegexLabel||"",u=i.history||[],g=!!i.flexibleHeight,p=!!i.flexibleWidth,m=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new s.pG(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:u,showHistoryHint:i.showHistoryHint,flexibleHeight:g,flexibleWidth:p,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new o.eH(Object.assign({appendTitle:d,isChecked:!1},i.toggleStyles))),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new o.Qx(Object.assign({appendTitle:l,isChecked:!1},i.toggleStyles))),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new o.rk(Object.assign({appendTitle:r,isChecked:!1},i.toggleStyles))),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(document.activeElement);if(i>=0){let o=-1;t.equals(17)?o=(i+1)%e.length:t.equals(15)&&(o=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):o>=0&&e[o].focus(),n.zB.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"block":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(n.nm(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.nm(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const e of this.additionalToggles)e.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){var t,i,n,o,s,r;for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new c.SL;for(const t of null!=e?e:[])this.additionalTogglesDisposables.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display="block"),this.inputBox.paddingRight=(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(o=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==o?o:0)+(null!==(r=null===(s=this.regex)||void 0===s?void 0:s.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},51307:(e,t,i)=>{"use strict";i.d(t,{Qx:()=>h,eH:()=>d,rk:()=>c});var n=i(82900),o=i(73046),s=i(63580);const r=s.NC("caseDescription","Match Case"),a=s.NC("wordsDescription","Match Whole Word"),l=s.NC("regexDescription","Use Regular Expression");class c extends n.Z{constructor(e){super({icon:o.l.caseSensitive,title:r+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends n.Z{constructor(e){super({icon:o.l.wholeWord,title:a+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class d extends n.Z{constructor(e){super({icon:o.l.regex,title:l+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},34650:(e,t,i)=>{"use strict";i.d(t,{q:()=>r});var n=i(65321),o=i(56811),s=i(36248);class r{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=n.R3(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=r.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&s.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t<i.start){const n=this.text.substring(t,i.start);this.supportIcons?e.push(...(0,o.T)(n)):e.push(n),t=i.start}const s=this.text.substring(t,i.end),r=n.$("span.highlight",void 0,...this.supportIcons?(0,o.T)(s):[s]);i.extraClasses&&r.classList.add(...i.extraClasses),e.push(r),t=i.end}if(t<this.text.length){const i=this.text.substring(t);this.supportIcons?e.push(...(0,o.T)(i)):e.push(i)}n.mc(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,((e,o)=>{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},59834:(e,t,i)=>{"use strict";i.d(t,{g:()=>h});var n=i(65321),o=i(34650),s=i(51433),r=i(5976),a=i(36248),l=i(61134);class c{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class h extends r.JT{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new c(n.R3(e,n.$(".monaco-icon-label")))),this.labelContainer=n.R3(this.domNode.element,n.$(".monaco-icon-label-container"));const i=n.R3(this.labelContainer,n.$("span.monaco-icon-name-container"));(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new u(i,!!t.supportIcons):this.nameNode=new d(i),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];if(i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled")),this.domNode.className=n.join(" "),this.labelContainer.className=s.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof o.q?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?o.q.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=(0,s.g)(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else(0,s.O)(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new c(n.R3(this.labelContainer,n.$("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=new o.q(n.R3(t.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new c(n.R3(t.element,n.$("span.label-description"))))}return this.descriptionNode}}class d{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,a.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const o=e[i],s=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${i}`;n.R3(this.container,n.$("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},o)),i<e.length-1&&n.R3(this.container,n.$("span.label-separator",void 0,(null==t?void 0:t.separator)||"/"))}}}}class u{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,a.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new o.q(n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,null==t?void 0:t.matches,void 0,null==t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(null==t?void 0:t.separator)||"/",s=function(e,t,i){if(!i)return;let n=0;return e.map((e=>{const o={start:n,end:n+e.length},s=i.map((e=>l.e.intersect(o,e))).filter((e=>!l.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let r=0;r<e.length;r++){const a=e[r],l=s?s[r]:void 0,c=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${r}`,h=n.$("a.label-name",{id:c,"data-icon-label-count":e.length,"data-icon-label-index":r,role:"treeitem"});new o.q(n.R3(this.container,h),{supportIcons:this.supportIcons}).set(a,l,void 0,null==t?void 0:t.labelEscapeNewLines),r<e.length-1&&n.R3(h,n.$("span.label-separator",void 0,i))}}}}},51433:(e,t,i)=>{"use strict";i.d(t,{O:()=>u,g:()=>p});var n=i(65321),o=i(15393),s=i(71050),r=i(59365),a=i(21212),l=i(5976),c=i(98401),h=i(63580),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function u(e,t){(0,c.HD)(t)?e.title=(0,a.x$)(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}class g{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return d(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(void 0===e||(0,c.HD)(e)||e instanceof HTMLElement)o=e;else if((0,c.mf)(e.markdown)){this._hoverWidget||this.show((0,h.NC)("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new s.A;const i=this._cancellationTokenSource.token;if(o=yield e.markdown(i),void 0===o&&(o=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else o=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(o,t,i)}))}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o=Object.assign({content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(o,t)}null==n||n.dispose()}hasContent(e){return!(!e||(0,r.Fr)(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function p(e,t,i,s){let r,a;const c=(t,i)=>{var n;t&&(null==a||a.dispose(),a=void 0),i&&(null==r||r.dispose(),r=void 0),null===(n=e.onDidHideHover)||void 0===n||n.call(e)},h=(n,r,l)=>new o._F((()=>d(this,void 0,void 0,(function*(){a&&!a.isDisposed||(a=new g(e,l||t,n>0),yield a.update(i,r,s))}))),n),u=n.nm(t,n.tw.MOUSE_OVER,(()=>{if(r)return;const i=new l.SL;i.add(n.nm(t,n.tw.MOUSE_LEAVE,(e=>c(!1,e.fromElement===t)),!0)),i.add(n.nm(t,n.tw.MOUSE_DOWN,(()=>c(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{o.x=e.x+10,e.target instanceof HTMLElement&&e.target.classList.contains("action-label")&&c(!0,!0)};i.add(n.nm(t,n.tw.MOUSE_MOVE,e,!0))}i.add(h(e.delay,!1,o)),r=i}),!0);return{show:e=>{c(!1,!0),h(0,e)},hide:()=>{c(!0,!0)},update:(e,t)=>d(this,void 0,void 0,(function*(){i=e,yield null==a?void 0:a.update(i,void 0,t)})),dispose:()=>{u.dispose(),c(!0,!0)}}}},56811:(e,t,i)=>{"use strict";i.d(t,{T:()=>r});var n=i(65321),o=i(25670);const s=new RegExp(`(\\\\)?\\$\\((${o.k.iconNameExpression}(?:${o.k.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=s.exec(e));){o=i.index||0,n<o&&t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:a({id:r}))}return n<e.length&&t.push(e.substring(n)),t}function a(e){const t=n.$("span");return t.classList.add(...o.k.asClassNameArray(e)),t}},77927:(e,t,i)=>{"use strict";i.d(t,{pG:()=>_,g4:()=>m});var n=i(65321),o=i(4850),s=i(48764),r=i(90317),a=i(85152),l=i(9802),c=i(93794),h=i(4669);class d{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class u{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()===this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new d(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var g=i(63580);const p=n.$,m={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class f extends c.${constructor(e,t,i){var s;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new h.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new h.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(s=this.options.tooltip)&&void 0!==s?s:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.R3(e,p(".monaco-inputbox.idle"));const a=this.options.flexibleHeight?"textarea":"input",c=n.R3(this.element,p(".ibwrapper"));if(this.input=n.R3(c,p(a+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.R3(c,p("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new l.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.Y(document,"selectionchange")),i=h.ju.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===c}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.XT(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.w(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var o,r;if(!this.message)return null;e=n.R3(i,p(".monaco-inputbox-container")),t();const a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?(0,s.BO)(this.message.content,a):(0,s.IY)(this.message.content,a);l.classList.add(this.classForType(this.message.type));const c=this.stylesForType(this.message.type);return l.style.backgroundColor=null!==(o=c.background)&&void 0!==o?o:"",l.style.color=null!==(r=c.foreground)&&void 0!==r?r:"",l.style.border=c.border?`1px solid ${c.border}`:"",n.R3(e,l),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?g.NC("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?g.NC("alertWarningMessage","Warning: {0}",this.message.content):g.NC("alertInfoMessage","Info: {0}",this.message.content),a.Z9(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const o=this.options.inputBoxStyles,s=null!==(e=o.inputBackground)&&void 0!==e?e:"",r=null!==(t=o.inputForeground)&&void 0!==t?t:"",a=null!==(i=o.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=s,this.element.style.color=r,this.input.style.backgroundColor="inherit",this.input.style.color=r,this.element.style.border=`1px solid ${n.XT(a,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class _ extends f{constructor(e,t,i){const n=g.NC({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),o=` or ⇅ ${n}`,s=` (⇅ ${n})`;super(e,t,i),this._onDidFocus=this._register(new h.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h.Q5),this.onDidBlur=this._onDidBlur.event,this.history=new u(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,a.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.i7(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},55496:(e,t,i)=>{"use strict";i.d(t,{e:()=>l});var n=i(65321),o=i(8030),s=i(36248),r=i(63580);const a=n.$;class l{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow;const o=this.options.keybindingLabelForeground;this.domNode=n.R3(e,a(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&l.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){var e;if(this.clear(),this.keybinding){const[t,i]=this.keybinding.getChords();t&&this.renderChord(this.domNode,t,this.matches?this.matches.firstPart:null),i&&(n.R3(this.domNode,a("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,i,this.matches?this.matches.chordPart:null));const o=null!==(e=this.options.disableTitle)&&void 0!==e&&e?void 0:this.keybinding.getAriaLabel()||void 0;void 0!==o?this.domNode.title=o:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){n.PO(this.domNode),this.keyElements.clear()}renderChord(e,t,i){const n=o.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,o){n.R3(e,this.createKeyElement(t,i?".highlight":"")),o&&n.R3(e,a("span.monaco-keybinding-key-separator",void 0,o))}renderUnbound(e){n.R3(e,this.createKeyElement((0,r.NC)("unbound","Unbound")))}createKeyElement(e,t=""){const i=a("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),this.labelBackground&&(i.style.backgroundColor=this.labelBackground),this.labelBorder&&(i.style.borderColor=this.labelBorder),this.labelBottomBorder&&(i.style.borderBottomColor=this.labelBottomBorder),this.labelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`),i}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,s.fS)(e.firstPart,t.firstPart)&&(0,s.fS)(e.chordPart,t.chordPart)}}},25707:(e,t,i)=>{"use strict";i.d(t,{kX:()=>S,Bv:()=>E});var n=i(23547),o=i(65321),s=i(4850),r=i(10553),a=i(9802),l=i(9488),c=i(15393),h=i(49898),d=i(4669),u=i(5976),g=i(61134),p=i(76633);function m(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=g.e.intersect(e,n.range);g.e.isEmpty(t)||i.push({range:t,size:n.size})}return i}function f({start:e,end:t},i){return{start:e+i,end:t+i}}class _{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=m({start:0,end:e},this.groups),s=m({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:f(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e<s)return t+Math.floor((e-i)/n.size);t+=o,i=s}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const o=n.range.end-n.range.start,s=i+o;if(e<s)return t+(e-i)*n.size;t+=o*n.size,i=s}return-1}}class v{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)i=this.transactionNodesPendingRemoval.has(t.domNode),i&&this.transactionNodesPendingRemoval.delete(t.domNode);else{const i=(0,o.$)(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.getRenderer(e).renderTemplate(i)}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const e of this.transactionNodesPendingRemoval)this.doRemoveNode(e);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),function(e){var t;try{null===(t=e.parentElement)||void 0===t||t.removeChild(e)}catch(e){}}(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach(((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var b=i(17301),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const y={CurrentDragAndDropData:void 0},w={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class L{constructor(e){(null==e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class E{get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=w){var s,l,h,g,m,f,b,C,y,S,k,x;if(this.virtualDelegate=t,this.domId="list_id_"+ ++E.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new c.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.JT.None,this.onDragLeaveTimeout=u.JT.None,this.disposables=new u.SL,this._onDidChangeContentHeight=new d.Q5,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new _;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(s=n.horizontalScrolling)&&void 0!==s?s:w.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new L(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(null!==(l=n.transformOptimization)&&void 0!==l?l:w.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=new p.Rm({forceIntegerValues:!0,smoothScrollDuration:null!==(h=n.smoothScrolling)&&void 0!==h&&h?125:0,scheduleAtNextAnimationFrame:e=>(0,o.jL)(e)}),this.scrollableElement=this.disposables.add(new a.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(g=n.alwaysConsumeMouseWheel)&&void 0!==g?g:w.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(m=n.verticalScrollMode)&&void 0!==m?m:w.verticalScrollMode,useShadows:null!==(f=n.useShadows)&&void 0!==f?f:w.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,o.nm)(this.rowsContainer,r.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(b=n.setRowLineHeight)&&void 0!==b?b:w.setRowLineHeight,this.setRowHeight=null!==(C=n.setRowHeight)&&void 0!==C?C:w.setRowHeight,this.supportDynamicHeights=null!==(y=n.supportDynamicHeights)&&void 0!==y?y:w.supportDynamicHeights,this.dnd=null!==(S=n.dnd)&&void 0!==S?S:w.dnd,this.layout(null===(k=n.initialSize)||void 0===k?void 0:k.height,null===(x=n.initialSize)||void 0===x?void 0:x.width)}updateOptions(e){let t;void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t=Object.assign(Object.assign({},null!=t?t:{}),{scrollByPage:e.scrollByPage})),void 0!==e.mouseWheelScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),void 0!==e.fastScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=g.e.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=g.e.intersect(a,n),c=g.e.relativeComplement(a,n),h=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.JT.None,checkedDisposable:u.JT.None})));let d;0===e&&t>=this.items.length?(this.rangeMap=new _,this.rangeMap.splice(0,0,h),d=this.items,this.items=h):(this.rangeMap.splice(e,t,h),d=this.items.splice(e,t,...h));const p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=f(l,p),b=g.e.intersect(m,v);for(let e=b.start;e<b.end;e++)this.updateItemInDOM(this.items[e],e);const C=g.e.relativeComplement(v,m);for(const e of C)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);const y=c.map((e=>f(e,p))),w=[{start:e,end:e+i.length},...y].map((e=>g.e.intersect(m,e))),S=this.getNextToLastElement(w);for(const e of w)for(let t=e.start;t<e.end;t++){const e=this.items[t],i=r.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,S,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),d.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),i=this.rangeMap.positionAt(e.start+1);return-1!==i&&(i-t)/2+t<this.scrollTop?e.start+1:e.start}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"==typeof e?e:(0,o.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,o.FK)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.e.relativeComplement(r,e),l=g.e.relativeComplement(e,r),c=this.getNextToLastElement(a);if(s){const t=g.e.intersect(e,r);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}this.cache.transact((()=>{for(const e of l)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);for(const e of a)for(let t=e.start;t<e.end;t++)this.insertItemInDOM(t,c)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];let s=!1;if(!n.row)if(i)n.row=i;else{const e=this.cache.alloc(n.templateId);n.row=e.row,s=e.isReusingConnectedDomNode}const r=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",r);const a=this.accessibilityProvider.isChecked(n.element);if("boolean"==typeof a)n.row.domNode.setAttribute("aria-checked",String(!!a));else if(a){const e=e=>n.row.domNode.setAttribute("aria-checked",String(!!e));e(a.value),n.checkedDisposable=a.onDidChange(e)}!s&&n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const l=this.renderers.get(n.templateId);if(!l)throw new Error(`No renderer found for template id ${n.templateId}`);null==l||l.renderElement(n.element,e,n.row.templateData,n.size);const c=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!c,c&&(n.dragStartDisposable=(0,o.nm)(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,c,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,o.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return d.ju.map(this.disposables.add(new s.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return d.ju.map(this.disposables.add(new s.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return d.ju.filter(d.ju.map(this.disposables.add(new s.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return d.ju.map(this.disposables.add(new s.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return d.ju.map(this.disposables.add(new s.Y(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return d.ju.any(d.ju.map(this.disposables.add(new s.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),d.ju.map(this.disposables.add(new s.Y(this.domNode,r.t.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return d.ju.map(this.disposables.add(new s.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return d.ju.map(this.disposables.add(new s.Y(this.rowsContainer,r.t.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var s,r;if(!i.dataTransfer)return;const a=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.g.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(a,i)),void 0===e&&(e=String(a.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||document.body})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new S(a),y.CurrentDragAndDropData=new k(a),null===(r=(s=this.dnd).onDragStart)||void 0===r||r.call(s,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y.CurrentDragAndDropData&&"vscode-ui"===y.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(y.CurrentDragAndDropData)this.currentDragData=y.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new x}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof i?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof i&&0===i.effect?"copy":"move",n="boolean"!=typeof i&&i.feedback?i.feedback:void 0===e.index?[-1]:[e.index],n=(0,l.EB)(n).filter((e=>e>=-1&&e<this.length)).sort(((e,t)=>e-t)),n=-1===n[0]?[-1]:n,o=this.currentDragFeedback,s=n,Array.isArray(o)&&Array.isArray(s)?(0,l.fS)(o,s):o===s)return!0;var o,s;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,u.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of n){const i=this.items[e];i.dropTarget=!0,null===(t=i.row)||void 0===t||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,u.OF)((()=>{var e;for(const t of n){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,c.Vg)((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,c.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){0!==r&&this.eventuallyUpdateScrollDimensions();const t=g.e.relativeComplement(n,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=g.e.relativeComplement(a,n);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,i=e<this.items.length?this.items[e].row:null,n=i?i.domNode:null;this.insertItemInDOM(t,n)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof o){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,n=this.elementTop(o)-s+t;this.setScrollTop(n,i)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){var t,i,n;const o=this.items[e];if(this.virtualDelegate.getDynamicHeight){const e=this.virtualDelegate.getDynamicHeight(o.element);if(null!==e){const t=o.size;return o.size=e,o.lastDynamicHeightWidth=this.renderWidth,e-t}}if(!o.hasDynamicHeight||o.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(o.element))return 0;const s=o.size;if(o.row)return o.row.domNode.style.height="",o.size=o.row.domNode.offsetHeight,o.lastDynamicHeightWidth=this.renderWidth,o.size-s;const{row:r}=this.cache.alloc(o.templateId);r.domNode.style.height="",this.rowsContainer.appendChild(r.domNode);const a=this.renderers.get(o.templateId);if(!a)throw new b.he("Missing renderer for templateId: "+o.templateId);return a.renderElement(o.element,e,r.templateData,void 0),o.size=r.domNode.offsetHeight,null===(t=a.disposeElement)||void 0===t||t.call(a,o.element,e,r.templateData,void 0),null===(n=(i=this.virtualDelegate).setDynamicHeight)||void 0===n||n.call(i,o.element,o.size),o.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(r.domNode),this.cache.release(r),o.size-s}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){var e;if(this.items){for(const t of this.items)if(t.row){const i=this.renderers.get(t.row.templateId);i&&(null===(e=i.disposeElement)||void 0===e||e.call(i,t.element,-1,t.row.templateData,void 0),i.disposeTemplate(t.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,u.B9)(this.disposables)}}E.InstanceCount=0,C([h.H],E.prototype,"onMouseClick",null),C([h.H],E.prototype,"onMouseDblClick",null),C([h.H],E.prototype,"onMouseMiddleClick",null),C([h.H],E.prototype,"onMouseDown",null),C([h.H],E.prototype,"onMouseOver",null),C([h.H],E.prototype,"onContextMenu",null),C([h.H],E.prototype,"onTouchStart",null),C([h.H],E.prototype,"onTap",null)},43799:(e,t,i)=>{"use strict";i.d(t,{wD:()=>W,aV:()=>G,sx:()=>H,AA:()=>C,iK:()=>I,cK:()=>D,hD:()=>T,wn:()=>F,Zo:()=>P,uZ:()=>V});var n=i(65321),o=i(4850),s=i(59069),r=i(10553),a=i(85152);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var c=i(9488),h=i(15393),d=i(41264),u=i(49898),g=i(4669),p=i(75392),m=i(5976),f=i(59870),_=i(1432),v=i(98401);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var C,y,w=i(25707),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class x{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index<e?n.push(o):o.index>=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class L{get name(){return this._trait}get renderer(){return new x(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Q5,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[...this.sortedIndexes.filter((t=>t<e)),...i.map(((t,i)=>t?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=s)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;r.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(j),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=U(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.ry)(this.sortedIndexes,e,j)>=0}dispose(){(0,m.B9)(this._onChange)}}S([u.H],L.prototype,"renderer",null);class E extends L{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class N{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function D(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function T(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&T(e.parentElement)}function I(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&I(e.parentElement)}class A{get onKeyDown(){return this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event).filter((e=>!D(e.target))).map((e=>new s.y(e))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new m.SL,this.multipleSelectionDisposables=new m.SL,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.w6)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}S([u.H],A.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(C||(C={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(y||(y={}));const M=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class R{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=y.Idle,this.mode=C.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new m.SL,this.disposables=new m.SL,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:C.Automatic}enable(){if(this.enabled)return;let e=!1;const t=this.enabledDisposables.add(g.ju.chain(this.enabledDisposables.add(new o.Y(this.view.domNode,"keydown")).event)).filter((e=>!D(e.target))).filter((()=>this.mode===C.Automatic||this.triggered)).map((e=>new s.y(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.zB.stop(e,!0))).map((e=>e.browserEvent.key)).event,i=g.ju.debounce(t,(()=>null),800,void 0,void 0,this.enabledDisposables);g.ju.reduce(g.ju.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,a.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=y.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===y.Idle?1:0;this.state=y.Typing;for(let t=0;t<this.list.length;t++){const o=(i+t+n)%this.list.length,s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),r=s&&s.toString();if(void 0===r||(0,p.Ji)(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class O{constructor(e,t){this.list=e,this.view=t,this.disposables=new m.SL,this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(t.domNode,"keydown")).event)).filter((e=>!D(e.target))).map((e=>new s.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function P(e){return _.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function F(e){return e.browserEvent.shiftKey}const B={isSelectionSingleChangeEvent:P,isSelectionRangeChangeEvent:F};class H{constructor(e){this.list=e,this.disposables=new m.SL,this._onPointer=new g.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||B),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.o.addTarget(e.getHTMLElement()))),g.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||B))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){T(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(D(e.browserEvent.target)||T(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(D(e.browserEvent.target)||T(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(D(e.browserEvent.target)||T(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,c.w6)(n,o+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o<e.length&&e[o]===t+(o-i);)n.push(e[o++]);return n}(U(r,[i]),i);if(0===a.length)return;const l=U(s,function(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]<t[o]?i.push(e[n++]):o++}return i}(r,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class W{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const o=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${o} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${o} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${o} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${o} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const r=(0,n.XT)(e.listFocusAndSelectionOutline,(0,n.XT)(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));r&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${o}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const a=(0,n.XT)(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");a&&s.push(`.monaco-list${o} .monaco-list-row.focused.selected { outline: 1px dotted ${a}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${o} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${o} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${o} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&s.push(`\n\t\t\t\t.monaco-list${o}.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.tableColumnsBorder&&s.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&s.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=s.join("\n")}}const V={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:d.Il.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:d.Il.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:d.Il.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},z={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function U(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]<t[o]?i.push(e[n++]):i.push(t[o++])}return i}const j=(e,t)=>e-t;class K{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){var o;let s=0;for(const r of this.renderers)null===(o=r.disposeElement)||void 0===o||o.call(r,e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class q{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class ${constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class G{get onDidChangeFocus(){return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event)).map((e=>new s.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.zB.stop(e,!0))).filter((()=>!1)).event,i=this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keyup")).event)).forEach((()=>e=!1)).map((e=>new s.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.zB.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,r=this.disposables.add(g.ju.chain(this.view.onContextMenu)).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return g.ju.any(t,i,r)}get onKeyDown(){return this.disposables.add(new o.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,o,s=z){var r,a,c,h;this.user=e,this._options=s,this.focus=new L("focused"),this.anchor=new L("anchor"),this.eventBufferer=new g.E7,this._ariaLabel="",this.disposables=new m.SL,this._onDidDispose=new g.Q5,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new E("listbox"!==d);const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(u.push(new q(this.accessibilityProvider)),null===(c=(a=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===c||c.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new K(e.templateId,[...u,e])));const p=Object.assign(Object.assign({},s),{dnd:s.dnd&&new $(this,s.dnd)});if(this.view=this.createListView(t,i,o,p),this.view.domNode.setAttribute("role",d),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.dS)(this.view.domNode);this.styleController=new W(e,this.view.domId)}if(this.spliceable=new l([new N(this.focus,this.view,s.identityProvider),new N(this.selection,this.view,s.identityProvider),new N(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new O(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new A(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||M;this.typeNavigationController=new R(this,this.view,s.keyboardNavigationLabelProvider,null!==(h=s.keyboardNavigationEventFilter)&&void 0!==h?h:()=>!0,e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new w.Bv(e,t,i,n)}createMouseController(e){return new H(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}focusNextPage(e,t){return k(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return k(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.getFocus()[0];if(o!==i&&(void 0===o||o>=i)){const n=this.findNextIndex(i,!1,t);n>-1&&o!==n?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e>=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map((e=>this.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,v.hj)(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*(0,f.uZ)(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}S([u.H],G.prototype,"onDidChangeFocus",null),S([u.H],G.prototype,"onDidChangeSelection",null),S([u.H],G.prototype,"onContextMenu",null),S([u.H],G.prototype,"onKeyDown",null),S([u.H],G.prototype,"onDidFocus",null)},96542:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n="monaco-mouse-cursor-text"},73098:(e,t,i)=>{"use strict";i.d(t,{g:()=>b,l:()=>n});var n,o=i(65321),s=i(4850),r=i(10553),a=i(15393),l=i(49898),c=i(4669),h=i(5976),d=i(1432),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));const g=new c.Q5,p=new c.Q5;class m{constructor(){this.disposables=new h.SL}get onPointerMove(){return this.disposables.add(new s.Y(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new s.Y(window,"mouseup")).event}dispose(){this.disposables.dispose()}}u([l.H],m.prototype,"onPointerMove",null),u([l.H],m.prototype,"onPointerUp",null);class f{get onPointerMove(){return this.disposables.add(new s.Y(this.el,r.t.Change)).event}get onPointerUp(){return this.disposables.add(new s.Y(this.el,r.t.End)).event}constructor(e){this.el=e,this.disposables=new h.SL}dispose(){this.disposables.dispose()}}u([l.H],f.prototype,"onPointerMove",null),u([l.H],f.prototype,"onPointerUp",null);class _{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}u([l.H],_.prototype,"onPointerMove",null),u([l.H],_.prototype,"onPointerUp",null);const v="pointer-events-disabled";class b extends h.JT{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,o.R3)(this.el,(0,o.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,h.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new s.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new s.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,o.R3)(this.el,(0,o.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,h.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new s.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new s.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new a.vp(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new c.Q5),this._onDidStart=this._register(new c.Q5),this._onDidChange=this._register(new c.Q5),this._onDidReset=this._register(new c.Q5),this._onDidEnd=this._register(new c.Q5),this.orthogonalStartSashDisposables=this._register(new h.SL),this.orthogonalStartDragHandleDisposables=this._register(new h.SL),this.orthogonalEndSashDisposables=this._register(new h.SL),this.orthogonalEndDragHandleDisposables=this._register(new h.SL),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,o.R3)(e,(0,o.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),d.dz&&this.el.classList.add("mac");const n=this._register(new s.Y(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new m)),this));const l=this._register(new s.Y(this.el,"dblclick")).event;this._register(l(this.onPointerDoublePress,this));const u=this._register(new s.Y(this.el,"mouseenter")).event;this._register(u((()=>b.onMouseEnter(this))));const _=this._register(new s.Y(this.el,"mouseleave")).event;this._register(_((()=>b.onMouseLeave(this)))),this._register(r.o.addTarget(this.el));const v=this._register(new s.Y(this.el,r.t.Start)).event;this._register(v((e=>this.onPointerStart(e,new f(this.el))),this));const C=this._register(new s.Y(this.el,r.t.Tap)).event;let y;this._register(C((e=>{if(y)return clearTimeout(y),y=void 0,void this.onPointerDoublePress(e);clearTimeout(y),y=setTimeout((()=>y=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(g.event((e=>{this.size=e,this.layout()})))),this._register(p.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){o.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new _(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _(t))),!this.state)return;const n=document.getElementsByTagName("iframe");for(const e of n)e.classList.add(v);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=(0,o.dS)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":d.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":d.dz?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},g=new h.SL;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{o.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{o.zB.stop(e,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of n)e.classList.remove(v)}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&b.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&b.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){b.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&i instanceof HTMLElement)return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},9802:(e,t,i)=>{"use strict";i.d(t,{s$:()=>E,Io:()=>S,NB:()=>x,$Z:()=>L});var n=i(16268),o=i(65321),s=i(38626),r=i(7448),a=i(93911),l=i(93794),c=i(15393),h=i(25670);class d extends l.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...h.k.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a.C),this._register(o.mu(this.bgDomNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(o.mu(this.domNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new c.zh),this._pointerdownScheduleRepeatTimer=this._register(new c._F)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}var u=i(5976);class g extends u.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(1432);class m extends l.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a.C),this._shouldRender=!0,this.domNode=(0,s.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(o.nm(this.domNode.domNode,o.tw.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new d(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(o.nm(this.slider.domNode,o.tw.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=o.i(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(p.ED&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class f{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new f(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),c=(r-l)/(n-i),h=o*c;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=f._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}var _=i(73046);class v extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.l.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:_.l.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.l.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:_.l.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(4669),y=i(76633);class w{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){const t=window.devicePixelRatio/(0,n.getZoomFactor)();p.ED||p.IJ?this.accept(Date.now(),e.deltaX/t,e.deltaY/t):this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){const n=new w(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}S.INSTANCE=new S;class k extends l.${get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new C.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new c._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.q(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(o.nm(this._listenOnDomNode,o.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=S.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!p.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class x extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>o.jL(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class L extends k{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class E extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>o.jL(e)});super(e,t,i),this._register(i),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},23937:(e,t,i)=>{"use strict";i.d(t,{M:()=>b,z:()=>C});var n=i(65321),o=i(4850),s=i(73098),r=i(9802),a=i(9488),l=i(41264),c=i(4669),h=i(5976),d=i(59870),u=i(76633),g=i(98401);const p={separatorBorder:l.Il.transparent};class m{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=(0,d.uZ)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class f extends m{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class _ extends m{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v,b;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(v||(v={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(b||(b={}));class C extends h.JT{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,s,a,l,h;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v.Idle,this._onDidSashChange=this._register(new c.Q5),this._onDidSashReset=this._register(new c.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(s=t.inverseAltBehavior)&&void 0!==s&&s,this.proportionalLayout=null===(a=t.proportionalLayout)||void 0===a||a,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.R3)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=new u.Rm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:n.jL}),this.scrollableElement=this._register(new r.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(l=t.scrollbarVisibility)&&void 0!==l?l:1:2,horizontal:1===this.orientation?null!==(h=t.scrollbarVisibility)&&void 0!==h?h:1:2},this.scrollable));const d=this._register(new o.Y(this.viewContainer,"scroll")).event;this._register(d((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||p),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=this.proportions[i];"number"==typeof o?t+=o:e-=n.size}for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=this.proportions[i];"number"==typeof o&&(n.size=(0,d.uZ)(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.w6)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout?e.size/this.contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,h.F8)((0,n.nm)(document.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.nm)(document.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.w6)(o,-1),t=(0,a.w6)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(s,h),u=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:r,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,h=this.resize(t,c,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-h,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,d.uZ)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==v.Idle)throw new Error("Cant modify splitview");if(this.state=v.Busy,e<0||e>=this.viewItems.length)return;const i=(0,a.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,d.uZ)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=v.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,d.uZ)(i,t.minimumSize,t.maximumSize);const n=(0,a.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),d=(0,h.OF)((()=>this.viewContainer.removeChild(r))),u=(0,h.F8)(l,d);let g;g="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const p=0===this.orientation?new f(r,e,g,u):new _(r,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new s.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new s.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=c.ju.map(t.onDidStart,n)(this.onSashStart,this),r=c.ju.map(t.onDidChange,n)(this.onSashChange,this),l=c.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),d=l(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.w6)(e,-1),n=(0,a.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),g=(0,h.F8)(o,r,d,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let m;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(m=[t.index]),o||this.relayout([i],m),this.state=v.Idle,o||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const h=(0,a.w6)(e,-1),u=(0,a.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a.zI)(h,e),(0,a.zI)(u,e);if(n)for(const e of n)(0,a.al)(h,e),(0,a.al)(u,e);const g=h.map((e=>this.viewItems[e])),p=h.map((e=>i[e])),m=u.map((e=>this.viewItems[e])),f=u.map((e=>i[e])),_=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),C=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),y=Math.max(_,C,s),w=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&c){const e=this.viewItems[c.index],i=t<c.limitDelta;S=i!==e.visible,e.setVisible(i,c.size)}if(S)return this.resize(e,t,i,n,o,s,r);for(let e=0,i=t=(0,d.uZ)(t,y,w);e<g.length;e++){const t=g[e],n=(0,d.uZ)(p[e]+i,t.minimumSize,t.maximumSize);i-=n-p[e],t.size=n}for(let e=0,i=t;e<m.length;e++){const t=m[e],n=(0,d.uZ)(f[e]-i,t.minimumSize,t.maximumSize);i+=n-f[e],t.size=n}return t}distributeEmptySpace(e){const t=this.viewItems.reduce(((e,t)=>e+t.size),0);let i=this.size-t;const n=(0,a.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)(0,a.zI)(n,e);for(const e of o)(0,a.al)(n,e);"number"==typeof e&&(0,a.al)(n,e);for(let e=0;0!==i&&e<n.length;e++){const t=this.viewItems[n[e]],o=(0,d.uZ)(t.size+i,t.minimumSize,t.maximumSize);i-=o-t.size,t.size=o}}layoutViews(){this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e<this.sashItems.length;e++){const{sash:n}=this.sashItems[e];r+=this.viewItems[e].size;const l=!(t[e]&&s[e+1]),c=!(i[e]&&o[e+1]);if(l&&c){const i=(0,a.w6)(e,-1),s=(0,a.w6)(e+1,this.viewItems.length),l=this.findFirstSnapIndex(i),c=this.findFirstSnapIndex(s),h="number"==typeof l&&!this.viewItems[l].visible,d="number"==typeof c&&!this.viewItems[c].visible;h&&o[e]&&(r>0||this.startSnappingEnabled)?n.state=1:d&&t[e]&&(r<this.contentSize||this.endSnappingEnabled)?n.state=2:n.state=0}else n.state=l&&!c?1:!l&&c?2:3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),(0,h.B9)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},82900:(e,t,i)=>{"use strict";i.d(t,{D:()=>r,Z:()=>a});var n=i(93794),o=i(25670),s=i(4669);const r={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class a extends n.${constructor(e){super(),this._onChange=this._register(new s.Q5),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.Q5),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.k.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},93794:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(65321),o=i(59069),s=i(7448),r=i(10553),a=i(5976);class l extends a.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new s.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new s.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new s.n(e)))))}onmouseleave(e,t){this._register(n.nm(e,n.tw.MOUSE_LEAVE,(e=>t(new s.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){return r.o.ignoreTarget(e)}}},74741:(e,t,i)=>{"use strict";i.d(t,{Wi:()=>l,Z0:()=>c,aU:()=>a,eZ:()=>d,wY:()=>h,xw:()=>u});var n=i(4669),o=i(5976),s=i(63580),r=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return r(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onWillRun=this._register(new n.Q5),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return r(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return r(this,void 0,void 0,(function*(){yield e.run(t)}))}}class c{constructor(){this.id=c.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new c,...i]:i);return t}run(){return r(this,void 0,void 0,(function*(){}))}}c.ID="vs.actions.separator";class h{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}run(){return r(this,void 0,void 0,(function*(){}))}}class d extends a{constructor(){super(d.ID,s.NC("submenu.empty","(empty)"),void 0,!1)}}function u(e){var t,i;return{id:e.id,label:e.label,class:void 0,enabled:null===(t=e.enabled)||void 0===t||t,checked:null!==(i=e.checked)&&void 0!==i&&i,run:()=>r(this,void 0,void 0,(function*(){return e.run()})),tooltip:e.label}}d.ID="vs.actions.empty"},9488:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!i(e[n],t[n]))return!1;return!0}function r(e,t){const i=e.length-1;t<i&&(e[t]=e[i]),e.pop()}function a(e,t,i){return function(n,o){let s=0,r=n-1;for(;s<=r;){const n=(s+r)/2|0,o=i(e[n],t);if(o<0)s=n+1;else{if(!(o>0))return n;r=n-1}}return-(s+1)}(e.length)}function l(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i<n;){const o=Math.floor((i+n)/2);t(e[o])?n=o:i=o+1}return i}function c(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e<o.length?c(e,o,i):e<o.length+r.length?r[0]:c(e-(o.length+r.length),s,i)}function h(e,t){const i=[];let n;for(const o of e.slice(0).sort(t))n&&0===t(n[0],o)?n.push(o):(n=[o],i.push(n));return i}function d(e){return e.filter((e=>!!e))}function u(e){let t=0;for(let i=0;i<e.length;i++)e[i]&&(e[t]=e[i],t+=1);e.length=t}function g(e){return!Array.isArray(e)||0===e.length}function p(e){return Array.isArray(e)&&e.length>0}function m(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function f(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,t);if(-1!==i)return e[i]}function _(e,t){return e.length>0?e[0]:t}function v(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;e<t;e++)n.push(e);else for(let e=i;e>t;e--)n.push(e);return n}function b(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function w(e,t){for(const i of t)e.push(i)}function S(e){return Array.isArray(e)?e:[e]}function k(e,t,i,n){const o=x(e,t),s=e.splice(o,i);return function(e,t,i){const n=x(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;t<s;t++)e[t+n]=i[t]}(e,o,n),s}function x(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var L;function E(e,t){return(i,n)=>t(e(i),e(n))}i.d(t,{Dc:()=>D,EB:()=>m,Gb:()=>n,H9:()=>A,HW:()=>c,JH:()=>o,LS:()=>r,Of:()=>p,Rs:()=>u,VJ:()=>I,W$:()=>M,XY:()=>g,Xh:()=>_,Zv:()=>b,_2:()=>S,al:()=>y,dF:()=>f,db:()=>k,fS:()=>s,fv:()=>N,jV:()=>T,kX:()=>d,lG:()=>l,ry:()=>a,tT:()=>E,vA:()=>w,vM:()=>h,w6:()=>v,zI:()=>C}),function(e){e.isLessThan=function(e){return e<0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(L||(L={}));const N=(e,t)=>e-t;function D(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>0&&(i=o)}return i}function T(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>=0&&(i=o)}return i}function I(e,t){return D(e,((e,i)=>-t(e,i)))}class A{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class M{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new M((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new M((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||L.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}M.empty=new M((e=>{}))},35146:(e,t,i)=>{"use strict";i.d(t,{DM:()=>a,eZ:()=>r,ok:()=>o,vE:()=>s});var n=i(17301);function o(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function r(e){e()||(e(),(0,n.dL)(new n.he("Assertion Failed")))}function a(e,t){let i=0;for(;i<e.length-1;){if(!t(e[i],e[i+1]))return!1;i++}return!0}},15393:(e,t,i)=>{"use strict";i.d(t,{Aq:()=>E,CR:()=>x,J8:()=>d,PG:()=>u,Ps:()=>b,To:()=>S,Ue:()=>k,Vg:()=>v,Vs:()=>_,_F:()=>C,eP:()=>g,jT:()=>L,pY:()=>w,rH:()=>f,vp:()=>m,zS:()=>D,zh:()=>y});var n=i(71050),o=i(17301),s=i(4669),r=i(5976),a=i(1432),l=i(5635),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},h=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}};function d(e){return!!e&&"function"==typeof e.then}function u(e){const t=new n.A,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),n(new o.FU)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function g(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class p{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}class m{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===l.n?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new o.FU),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class f{constructor(e){this.delayer=new m(e),this.throttler=new p}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function _(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n(new o.FU)}))})):u((t=>_(e,t)))}function v(e,t=0){const i=setTimeout(e,t);return(0,r.OF)((()=>clearTimeout(i)))}function b(e,t=(e=>!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class C{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class y{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class w{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let S;S="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{(0,a.fn)((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class k{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=S((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class x{get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.resolved=!0,t()}))}cancel(){new Promise((e=>{this.errorCallback(new o.FU),this.rejected=!0,e()}))}}var L;!function(e){e.settled=function(e){return c(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>c(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(L||(L={}));class E{static fromArray(e){return new E((t=>{t.emitMany(e)}))}static fromPromise(e){return new E((t=>c(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new E((t=>c(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>c(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new E((t=>c(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n,o;return c(this,void 0,void 0,(function*(){var s,r,a,l;try{for(i=!0,n=h(e);!(s=(o=yield n.next()).done);){l=o.value,i=!1;try{const e=l;t.emitOne(e)}finally{i=!0}}}catch(e){r={error:e}}finally{try{i||s||!(a=n.return)||(yield a.call(n))}finally{if(r)throw r.error}}}))})))}))))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new s.Q5,queueMicrotask((()=>c(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>c(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};yield s.ju.toPromise(this._onStateChanged.event)}}))}}static map(e,t){return new E((i=>c(this,void 0,void 0,(function*(){var n,o,s,r;try{for(var a,l=!0,c=h(e);!(n=(a=yield c.next()).done);){r=a.value,l=!1;try{const e=r;i.emitOne(t(e))}finally{l=!0}}}catch(e){o={error:e}}finally{try{l||n||!(s=c.return)||(yield s.call(c))}finally{if(o)throw o.error}}}))))}map(e){return E.map(this,e)}static filter(e,t){return new E((i=>c(this,void 0,void 0,(function*(){var n,o,s,r;try{for(var a,l=!0,c=h(e);!(n=(a=yield c.next()).done);){r=a.value,l=!1;try{const e=r;t(e)&&i.emitOne(e)}finally{l=!0}}}catch(e){o={error:e}}finally{try{l||n||!(s=c.return)||(yield s.call(c))}finally{if(o)throw o.error}}}))))}filter(e){return E.filter(this,e)}static coalesce(e){return E.filter(e,(e=>!!e))}coalesce(){return E.coalesce(this)}static toPromise(e){var t,i,n,o,s,r,a;return c(this,void 0,void 0,(function*(){const l=[];try{for(t=!0,i=h(e);n=yield i.next(),!(o=n.done);){a=n.value,t=!1;try{const e=a;l.push(e)}finally{t=!0}}}catch(e){s={error:e}}finally{try{t||o||!(r=i.return)||(yield r.call(i))}finally{if(s)throw s.error}}return l}))}toPromise(){return E.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}E.EMPTY=E.fromArray([]);class N extends E{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function D(e){const t=new n.A,i=e(t.token);return new N(t,(e=>c(this,void 0,void 0,(function*(){var n,s,r,a;const l=t.token.onCancellationRequested((()=>{l.dispose(),t.dispose(),e.reject(new o.FU)}));try{try{for(var c,d=!0,u=h(i);!(n=(c=yield u.next()).done);){a=c.value,d=!1;try{const i=a;if(t.token.isCancellationRequested)return;e.emitOne(i)}finally{d=!0}}}catch(e){s={error:e}}finally{try{d||n||!(r=u.return)||(yield r.call(u))}finally{if(s)throw s.error}}l.dispose(),t.dispose()}catch(i){l.dispose(),t.dispose(),e.reject(i)}}))))}},53060:(e,t,i)=>{"use strict";i.d(t,{Ag:()=>l,Cg:()=>d,KN:()=>s,Q$:()=>h,T4:()=>c,mP:()=>r,oq:()=>a});const n="undefined"!=typeof Buffer;let o;class s{static wrap(e){return n&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new s(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return n?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}}function r(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function a(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function l(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function c(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function d(e,t,i){e[i]=t}},701:(e,t,i)=>{"use strict";i.d(t,{b:()=>o,t:()=>n});class n{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class o{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}},71050:(e,t,i)=>{"use strict";i.d(t,{A:()=>a,T:()=>s});var n=i(4669);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(s||(s={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}},73046:(e,t,i)=>{"use strict";i.d(t,{l:()=>a,u:()=>r});var n=i(98401);const o=Object.create(null);function s(e,t){if((0,n.HD)(t)){const i=o[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return o[e]=t,{id:e}}function r(){return o}const a={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),dropDownButton:s("drop-down-button",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circle:s("circle",60092),circleOutline:s("circle-outline",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),compareChanges:s("compare-changes",60157),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueClosed:s("issue-closed",60324),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),bracket:s("bracket",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package_:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolCustomColor:s("symbol-customcolor",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),debugAlt:s("debug-alt",60305),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),exportIcon:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnspecified:s("workspace-unspecified",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newLine:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),heartFilled:s("heart-filled",60420),map:s("map",60421),mapFilled:s("map-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left")}},41264:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{Il:()=>a,VS:()=>o,tx:()=>r});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const h=(a+r)/2,d=r-a;if(d>0){switch(c=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),r){case t:l=(i-n)/d+(i<n?6:0);break;case i:l=(n-t)/d+2;break;case n:l=(t-i)/d+4}l*=60,l=Math.round(l)}return new s(l,c,h,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),c=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),a=0===o?0:s/o;let l;return l=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new r(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[c,h,d]=[0,0,0];return t<60?(c=r,h=a):t<120?(c=a,h=r):t<180?(h=r,d=a):t<240?(h=a,d=r):t<300?(c=a,d=r):t<=360&&(c=r,d=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),d=Math.round(255*(d+l)),new o(c,h,d,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:s}=this.rgba;return new a(new o(t,i,n,s*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new o(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}a.white=new a(new o(255,255,255,1)),a.black=new a(new o(0,0,0,1)),a.red=new a(new o(255,0,0,1)),a.blue=new a(new o(0,0,255,1)),a.green=new a(new o(0,255,0,1)),a.cyan=new a(new o(0,255,255,1)),a.lightgrey=new a(new o(211,211,211,1)),a.transparent=new a(new o(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function n(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6));return new e(new o(i,s,r,1))}if(9===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6)),a=16*n(t.charCodeAt(7))+n(t.charCodeAt(8));return new e(new o(i,s,r,a/255))}if(4===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3));return new e(new o(16*i+i,16*s+s,16*r+r))}if(5===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3)),a=n(t.charCodeAt(4));return new e(new o(16*i+i,16*s+s,16*r+r,(16*a+a)/255))}return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(a||(a={}))},73278:(e,t,i)=>{"use strict";i.d(t,{Hl:()=>l,Ix:()=>a,Z0:()=>c,ZO:()=>r});var n=i(9488),o=i(98e3),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function r(e){return{id:(0,o.R)(),asString:()=>s(this,void 0,void 0,(function*(){return e})),asFile:()=>{},value:"string"==typeof e?e:void 0}}function a(e,t,i){return{id:(0,o.R)(),asString:()=>s(this,void 0,void 0,(function*(){return""})),asFile:()=>({name:e,uri:t,data:i}),value:void 0}}class l{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,t]of this._entries.entries())for(const i of t)yield[e,i]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[t,i]of this.entries())e(i,t)}toKey(e){return e.toLowerCase()}}const c=Object.freeze({create:e=>(0,n.EB)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>c.split(e).filter((e=>!e.startsWith("#")))})},49898:(e,t,i)=>{"use strict";function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{"use strict";i.d(t,{Hs:()=>h,a$:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(89954);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function r(e,t,i){return new h(new s(e),new s(t)).ComputeDiff(i).changes}class a{static Assert(e,t){if(!e)throw new Error(t)}}class l{static Copy(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}static Copy2(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}}class c{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=h._getElements(e),[r,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=(0,o.Cv)(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){return!!this.ElementsAreEqual(e,t)&&h._getStrictElement(this._originalSequence,e)===h._getStrictElement(this._modifiedSequence,t)}static _getStrictElement(e,t){return"function"==typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,o){const s=[!1];let r=this.ComputeDiffRecursive(e,t,i,n,s);return o&&(r=this.PrettifyChanges(r)),{quitEarly:s[0],changes:r}}ComputeDiffRecursive(e,t,i,o,s){for(s[0]=!1;e<=t&&i<=o&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,r,l,s),h=r[0],d=l[0];if(null!==c)return c;if(!s[0]){const r=this.ComputeDiffRecursive(e,h,i,d,s);let a=[];return a=s[0]?[new n(h+1,t-(h+1)+1,d+1,o-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,h,d,u,g,p,m,f,_,v,b){let C=null,y=null,w=new c,S=t,k=i,x=p[0]-_[0]-o,L=-1073741824,E=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t<k&&h[t-1]<h[t+1]?(m=(u=h[t+1])-x-o,u<L&&w.MarkNextChange(),L=u,w.AddModifiedElement(u+1,m),x=t+1-e):(m=(u=h[t-1]+1)-x-o,u<L&&w.MarkNextChange(),L=u-1,w.AddOriginalElement(u,m+1),x=t-1-e),E>=0&&(e=(h=this.m_forwardHistory[E])[0],S=1,k=h.length-1)}while(--E>=-1);if(C=w.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==C&&C.length>0){const i=C[C.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}y=[new n(e,g-e+1,t,f-t+1)]}else{w=new c,S=r,k=a,x=p[0]-_[0]-l,L=1073741824,E=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+s;e===S||e<k&&d[e-1]>=d[e+1]?(m=(u=d[e+1]-1)-x-l,u>L&&w.MarkNextChange(),L=u+1,w.AddOriginalElement(u+1,m+1),x=e+1-s):(m=(u=d[e-1])-x-l,u>L&&w.MarkNextChange(),L=u,w.AddModifiedElement(u+1,m+1),x=e-1-s),E>=0&&(s=(d=this.m_reverseHistory[E])[0],S=1,k=d.length-1)}while(--E>=-1);y=w.getChanges()}return this.ConcatenateChanges(C,y)}ComputeRecursionPoint(e,t,i,o,s,r,a){let c=0,h=0,d=0,u=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(o-i),f=m+1,_=new Int32Array(f),v=new Int32Array(f),b=o-i,C=t-e,y=e-i,w=t-o,S=(C-b)%2==0;_[b]=e,v[C]=t,a[0]=!1;for(let k=1;k<=m/2+1;k++){let m=0,x=0;d=this.ClipDiagonalBound(b-k,k,b,f),u=this.ClipDiagonalBound(b+k,k,b,f);for(let e=d;e<=u;e+=2){c=e===d||e<u&&_[e-1]<_[e+1]?_[e+1]:_[e-1]+1,h=c-(e-b)-y;const i=c;for(;c<t&&h<o&&this.ElementsAreEqual(c+1,h+1);)c++,h++;if(_[e]=c,c+h>m+x&&(m=c,x=h),!S&&Math.abs(e-C)<=k-1&&c>=v[e])return s[0]=c,r[0]=h,i<=v[e]&&k<=1448?this.WALKTRACE(b,d,u,y,C,g,p,w,_,v,c,t,s,h,o,r,S,a):null}const L=(m-e+(x-i)-k)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,L))return a[0]=!0,s[0]=m,r[0]=x,L>0&&k<=1448?this.WALKTRACE(b,d,u,y,C,g,p,w,_,v,c,t,s,h,o,r,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(C-k,k,C,f),p=this.ClipDiagonalBound(C+k,k,C,f);for(let n=g;n<=p;n+=2){c=n===g||n<p&&v[n-1]>=v[n+1]?v[n+1]-1:v[n-1],h=c-(n-C)-w;const l=c;for(;c>e&&h>i&&this.ElementsAreEqual(c,h);)c--,h--;if(v[n]=c,S&&Math.abs(n-b)<=k&&c<=_[n])return s[0]=c,r[0]=h,l>=_[n]&&k<=1448?this.WALKTRACE(b,d,u,y,C,g,p,w,_,v,c,t,s,h,o,r,S,a):null}if(k<=1447){let e=new Int32Array(u-d+2);e[0]=b-d+1,l.Copy2(_,d,e,1,u-d+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=C-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,d,u,y,C,g,p,w,_,v,c,t,s,h,o,r,S,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,s=i.originalLength>0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!r||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const e=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!e)break;i.originalStart++,i.modifiedStart++}const a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(t<n||c<o)break;if(s&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(r&&!this.ModifiedElementsAreEqual(c,c+i.modifiedLength))break;const h=(t===n&&c===o?5:0)+this._boundaryScore(t,i.originalLength,c,i.modifiedLength);h>l&&(l=h,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const i=e[t-1],n=e[t],o=n.originalStart-i.originalStart-i.originalLength,s=i.originalStart,r=n.originalStart+n.originalLength,a=r-s,l=i.modifiedStart,c=n.modifiedStart+n.modifiedLength,h=c-l;if(o<5&&a<20&&h<20){const e=this._findBetterContiguousSequence(s,a,l,h,o);if(e){const[t,s]=e;t===i.originalStart+i.originalLength&&s===i.modifiedStart+i.modifiedLength||(i.originalLength=t-i.originalStart,i.modifiedLength=s-i.modifiedStart,n.originalStart=t+o,n.modifiedStart=s+o,n.originalLength=r-n.originalStart,n.modifiedLength=c-n.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,o){if(t<o||n<o)return null;const s=e+t-o+1,r=i+n-o+1;let a=0,l=0,c=0;for(let t=e;t<s;t++)for(let e=i;e<r;e++){const i=this._contiguousSequenceScore(t,e,o);i>0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;n+=this._originalStringElements[e+o].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const o=t%2==0;return e<0?o===(i%2==0)?0:1:o===((n-i-1)%2==0)?n-1:n-2}}},17301:(e,t,i)=>{"use strict";i.d(t,{B8:()=>g,Cp:()=>s,F0:()=>h,FU:()=>c,L6:()=>u,b1:()=>d,dL:()=>o,he:()=>m,n2:()=>l,ri:()=>r});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(p.isErrorNoTelemetry(e))throw new p(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function s(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:p.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function h(){const e=new Error(a);return e.name=e.message,e}function d(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class p extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof p)return e;const t=new p;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class m extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,m.prototype)}}},4669:(e,t,i)=>{"use strict";i.d(t,{D0:()=>v,E7:()=>y,F3:()=>p,K3:()=>_,Q5:()=>g,SZ:()=>b,ZD:()=>w,ju:()=>n,z5:()=>C});var n,o=i(17301),s=i(88289),r=i(5976),a=i(91741),l=i(84013);!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t,i){return a(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return a(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function o(e,t,i){return a(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function s(e,t,n,o){let s=n;return i(e,(e=>(s=t(s,e),s)),o)}function a(e,t){let i;const n=new g({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){null==i||i.dispose()}});return null==t||t.add(n),n.event}function l(e,t,i=100,n=!1,o,s){let r,a,l,c=0;const h=new g({leakWarningThreshold:o,onWillAddFirstListener(){r=e((e=>{c++,a=t(a,e),n&&!l&&(h.fire(a),a=void 0);const o=()=>{const e=a;a=void 0,l=void 0,(!n||c>1)&&h.fire(e),c=0};"number"==typeof i?(clearTimeout(l),l=setTimeout(o,i)):void 0===l&&(l=0,queueMicrotask(o))}))},onDidRemoveLastListener(){r.dispose()}});return null==s||s.add(h),h.event}function c(e,t=((e,t)=>e===t),i){let n,s=!0;return o(e,(e=>{const i=s||!t(e,n);return s=!1,n=e,i}),i)}e.None=()=>r.JT.None,e.defer=function(e,t){return l(e,(()=>{}),0,void 0,void 0,t)},e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,r.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.debounce=l,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,void 0,n)},e.latch=c,e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):r.fire(e)}));const s=()=>{null==n||n.forEach((e=>r.fire(e))),n=null},r=new g({onWillAddFirstListener(){o||(o=e((e=>r.fire(e))))},onDidAddFirstListener(){n&&(t?setTimeout(s):s())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return r.event};class h{constructor(e){this.event=e,this.disposables=new r.SL}map(e){return new h(i(this.event,e,this.disposables))}forEach(e){return new h(n(this.event,e,this.disposables))}filter(e){return new h(o(this.event,e,this.disposables))}reduce(e,t){return new h(s(this.event,e,t,this.disposables))}latch(){return new h(c(this.event,void 0,this.disposables))}debounce(e,t=100,i=!1,n){return new h(l(this.event,e,t,i,n,this.disposables))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}dispose(){this.disposables.dispose()}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new r.SL,t(e,i)}n(void 0);const o=e((e=>n(e)));return(0,r.OF)((()=>{o.dispose(),null==i||i.dispose()}))};class d{constructor(e,t){this.obs=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new g(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handleChange(e,t){this._hasChanged=!0}endUpdate(e){0==--this._counter&&this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this.obs.get()))}}e.fromObservable=function(e,t){return new d(e,t).emitter.event}}(n||(n={}));class c{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${c._idPool++}`,c.all.add(this)}start(e){this._stopWatch=new l.G(!0),this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}c.all=new Set,c._idPool=0;class h{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t<i)return;this._stacks||(this._stacks=new Map);const n=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,n+1),this._warnCountdown-=1,this._warnCountdown<=0){let e;this._warnCountdown=.5*i;let n=0;for(const[t,i]of this._stacks)(!e||n<i)&&(e=t,n=i);console.warn(`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${n}):`),console.warn(e)}return()=>{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}}class d{static create(){var e;return new d(null!==(e=(new Error).stack)&&void 0!==e?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class u{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new r.dt}invoke(e){this.callback.call(this.callbackThis,e)}}class g{constructor(e){var t,i,n,o,s;this._disposed=!1,this._options=e,this._leakageMon=(null===(t=this._options)||void 0===t?void 0:t.leakWarningThreshold)?new h(null!==(n=null===(i=this._options)||void 0===i?void 0:i.leakWarningThreshold)&&void 0!==n?n:-1):void 0,this._perfMon=(null===(o=this._options)||void 0===o?void 0:o._profName)?new c(this._options._profName):void 0,this._deliveryQueue=null===(s=this._options)||void 0===s?void 0:s.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),null===(e=this._deliveryQueue)||void 0===e||e.clear(this),null===(i=null===(t=this._options)||void 0===t?void 0:t.onDidRemoveLastListener)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,o,s;if(this._listeners||(this._listeners=new a.S),this._leakageMon&&this._listeners.size>3*this._leakageMon.threshold)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),r.JT.None;const l=this._listeners.isEmpty();let c,h;l&&(null===(n=this._options)||void 0===n?void 0:n.onWillAddFirstListener)&&this._options.onWillAddFirstListener(this),this._leakageMon&&this._listeners.size>=Math.ceil(.2*this._leakageMon.threshold)&&(h=d.create(),c=this._leakageMon.check(h,this._listeners.size+1));const g=new u(e,t,h),p=this._listeners.push(g);l&&(null===(o=this._options)||void 0===o?void 0:o.onDidAddFirstListener)&&this._options.onDidAddFirstListener(this),(null===(s=this._options)||void 0===s?void 0:s.onDidAddListener)&&this._options.onDidAddListener(this,e,t);const m=g.subscription.set((()=>{null==c||c(),!this._disposed&&(p(),this._options&&this._options.onDidRemoveLastListener)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onDidRemoveLastListener(this))}));return i instanceof r.SL?i.add(m):Array.isArray(i)&&i.push(m),m}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new m);for(const t of this._listeners)this._deliveryQueue.push(this,t,e);null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),null===(i=this._perfMon)||void 0===i||i.stop()}}hasListeners(){return!!this._listeners&&!this._listeners.isEmpty()}}class p{constructor(){this._queue=new a.S}get size(){return this._queue.size}push(e,t,i){this._queue.push(new f(e,t,i))}clear(e){const t=new a.S;for(const i of this._queue)i.emitter!==e&&t.push(i);this._queue=t}deliver(){for(;this._queue.size>0;){const e=this._queue.shift();try{e.listener.invoke(e.event)}catch(e){(0,o.dL)(e)}}}}class m extends p{clear(e){this._queue.clear()}}class f{constructor(e,t,i){this.emitter=e,this.listener=t,this.event=i}}class _ extends g{constructor(e){super(e),this._isPaused=0,this._eventQueue=new a.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class v extends _{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class b extends g{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class C{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new g({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),(0,r.OF)((0,s.I)((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class y{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class w{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.JT.None,this.emitter=new g({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},15527:(e,t,i)=>{"use strict";i.d(t,{KM:()=>h,ej:()=>a,fn:()=>l,oP:()=>u,yj:()=>c});var n=i(88721),o=i(1432),s=i(97295);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.KR.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.KR.sep){if(!e)return"";const i=e.length,o=e.charCodeAt(0);if(r(o)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;n<i&&!r(e.charCodeAt(n));n++);if(o!==n&&!r(e.charCodeAt(n+1)))for(n+=1;n<i;n++)if(r(e.charCodeAt(n)))return e.slice(0,n+1).replace(/[\\/]/g,t)}return t}if(d(o)&&58===e.charCodeAt(1))return r(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let s=e.indexOf("://");if(-1!==s)for(s+=3;s<i;s++)if(r(e.charCodeAt(s)))return e.slice(0,s+1);return""}function h(e,t,i,o=n.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,s.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===o&&i--,e.charAt(i)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function d(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e,t=o.ED){return!!t&&d(e.charCodeAt(0))&&58===e.charCodeAt(1)}},75392:(e,t,i)=>{"use strict";i.d(t,{CL:()=>z,EW:()=>j,Ji:()=>r,KZ:()=>w,Oh:()=>N,Sy:()=>c,ir:()=>l,jB:()=>D,l7:()=>q,mB:()=>T,mX:()=>U,or:()=>s});var n=i(43702),o=i(97295);function s(...e){return function(t,i){for(let n=0,o=e.length;n<o;n++){const o=e[n](t,i);if(o)return o}return null}}a.bind(void 0,!1);const r=a.bind(void 0,!0);function a(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?o.ok(i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}function l(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function c(e,t){return h(e.toLowerCase(),t.toLowerCase(),0,0)}function h(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=h(e,t,i+1,n+1))?v({start:n,end:n+1},o):null}return h(e,t,i,n+1)}function d(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function g(e){return 48<=e&&e<=57}function p(e){return 32===e||9===e||10===e||13===e}const m=new Set;function f(e){return p(e)||m.has(e)}function _(e){return d(e)||u(e)||g(e)}function v(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function b(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(u(t)||g(t)||i>0&&!_(e.charCodeAt(i-1)))return i}return e.length}function C(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=C(e,t,i+1,n+1);!o&&(s=b(t,s))<t.length;)o=C(e,t,i+1,s),s++;return null===o?null:v({start:n,end:n+1},o)}}function y(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){let t=0,i=0,n=0,o=0;for(let s=0;s<e.length;s++)n=e.charCodeAt(s),u(n)&&t++,d(n)&&i++,p(n)&&o++;return 0!==t&&0!==i||0!==o?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r<e.length;r++)s=e.charCodeAt(r),u(s)&&t++,d(s)&&i++,_(s)&&n++,g(s)&&o++;return{upperPercent:t/e.length,lowerPercent:i/e.length,alphaPercent:n/e.length,numericPercent:o/e.length}}(t);if(!function(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o<t.length&&null===(n=C(e,t,0,o));)o=b(t,o+1);return n}function w(e,t,i=!1){if(!t||0===t.length)return null;let n=null,o=0;for(e=e.toLowerCase(),t=t.toLowerCase();o<t.length&&null===(n=S(e,t,0,o,i));)o=k(t,o+1);return n}function S(e,t,i,n,o){if(i===e.length)return[];if(n===t.length)return null;if((s=e.charCodeAt(i))===(r=t.charCodeAt(n))||f(s)&&f(r)){let s=null,r=n+1;if(s=S(e,t,i+1,n+1,o),!o)for(;!s&&(r=k(t,r))<t.length;)s=S(e,t,i+1,r,o),r++;return s?e.charCodeAt(i)!==t.charCodeAt(n)?s:v({start:n,end:n+1},s):null}return null;var s,r}function k(e,t){for(let i=t;i<e.length;i++)if(f(e.charCodeAt(i))||i>0&&f(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>m.add(e.charCodeAt(0))));const x=s(r,y,l),L=s(r,y,c),E=new n.z6(1e4);function N(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=E.get(e);n||(n=new RegExp(o.un(e),"i"),E.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?L(e,t):x(e,t)}function D(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i<r;i++){const r=j(e,t,i,n,o,s,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(r)return r}return[0,s]}function T(e){if(void 0===e)return[];const t=[],i=e[1];for(let n=e.length-1;n>1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const I=128;function A(){const e=[],t=[];for(let e=0;e<=I;e++)t[e]=0;for(let i=0;i<=I;i++)e.push(t.slice(0));return e}function M(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const R=M(256),O=M(256),P=A(),F=A(),B=A();function H(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!o.C8(i)}}function W(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function V(e,t,i){return t[e]!==i[e]}var z;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(z||(z={}));class U{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function j(e,t,i,n,o,s,r=U.default){const a=e.length>I?I:e.length,l=n.length>I?I:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t<i&&o<s;)e[t]===n[o]&&(r&&(R[t]=o),t+=1),o+=1;return t===i}(t,i,a,o,s,l,!0))return;!function(e,t,i,n,o,s){let r=e-1,a=t-1;for(;r>=i&&a>=n;)o[r]===s[a]&&(O[r]=a,r--),a--}(a,l,i,s,t,o);let c=1,h=1,d=i,u=s;const g=[!1];for(c=1,d=i;d<a;c++,d++){const r=R[d],p=O[d],m=d+1<a?O[d+1]:l;for(h=r-s+1,u=r;u<m;h++,u++){let a=Number.MIN_SAFE_INTEGER,m=!1;u<=p&&(a=K(e,t,d,i,n,o,u,l,s,0===P[c-1][h-1],g));let f=0;a!==Number.MAX_SAFE_INTEGER&&(m=!0,f=a+F[c-1][h-1]);const _=u>r,v=_?F[c][h-1]+(P[c][h-1]>0?-5:0):0,b=u>r+1&&P[c][h-1]>0,C=b?F[c][h-2]+(P[c][h-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))F[c][h]=C,B[c][h]=3,P[c][h]=0;else if(_&&(!m||v>=f))F[c][h]=v,B[c][h]=2,P[c][h]=0;else{if(!m)throw new Error("not possible");F[c][h]=f,B[c][h]=1,P[c][h]=P[c-1][h-1]+1}}}if(!g[0]&&!r.firstMatchCanBeWeak)return;c--,h--;const p=[F[c][h],s];let m=0,f=0;for(;c>=1;){let e=h;do{const t=B[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+c-1]===o[s+h-1]&&!V(e+s-1,n,o)&&m+1>P[c][e]&&(e=h),e===h?m++:m=1,f||(f=e),c--,h=e-1,p.push(h)}l===a&&r.boostFullMatch&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function K(e,t,i,n,o,s,r,a,l,c,h){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let d=1,u=!1;return r===i-n?d=e[i]===o[r]?7:5:!V(r,o,s)||0!==r&&V(r-1,o,s)?!H(s,r)||0!==r&&H(s,r-1)?(H(s,r-1)||W(s,r-1))&&(d=5,u=!0):d=5:(d=e[i]===o[r]?7:5,u=!0),d>1&&i===n&&(h[0]=!0),u||(u=V(r,o,s)||H(s,r-1)||W(s,r-1)),i===n?r>l&&(d-=u?3:5):d+=c?u?2:0:u?0:1,r+1===a&&(d-=u?3:5),d}function q(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=j(e,t,i,n,o,s,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;r<t;r++){const t=$(e,r);if(t){const e=j(t,t.toLowerCase(),i,n,o,s,a);e&&(e[0]-=3,(!l||e[0]>l[0])&&(l=e))}}}return l}(e,t,i,n,o,s,0,r)}function $(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}U.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}},88289:(e,t,i)=>{"use strict";function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},89954:(e,t,i)=>{"use strict";i.d(t,{Cv:()=>a,SP:()=>s,vp:()=>o,yP:()=>d});var n=i(97295);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>s(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),s(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i<n;i++)t=r(e.charCodeAt(i),t);return t}function l(e,t,i=32){const n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let o=0;o<i;o++)e[t+o]=n}function h(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length<t;)e=i+e;return e}((e>>>0).toString(16),t/4)}class d{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);;){let l=o;if(n.ZG(o)){if(!(s+1<t)){a=o;break}{const t=e.charCodeAt(s+1);n.YK(t)?(s++,l=n.rL(o,t)):l=65533}}else n.YK(o)&&(l=65533);if(r=this._push(i,r,l),s++,!(s<t))break;o=e.charCodeAt(s)}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),h(this._h0)+h(this._h1)+h(this._h2)+h(this._h3)+h(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=d._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,c=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&c,n=1518500249):t<40?(i=r^a^c,n=1859775393):t<60?(i=r&a|r&c|a&c,n=2400959708):(i=r^a^c,n=3395469782),o=l(s,5)+i+h+n+e.getUint32(4*t,!1)&4294967295,h=c,c=a,a=l(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+h&4294967295}}d._bigBlock32=new DataView(new ArrayBuffer(320))},59365:(e,t,i)=>{"use strict";i.d(t,{CP:()=>a,Fr:()=>l,W5:()=>r,d9:()=>c,oR:()=>h,v1:()=>d});var n=i(17301),o=i(21212),s=i(97295);class r{constructor(e="",t=!1){var i,o,s;if(this.value=e,"string"!=typeof this.value)throw(0,n.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(o=t.supportThemeIcons)&&void 0!==o&&o,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,o.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>"&nbsp;".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,s.ec)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function a(e){return l(e)?!e.value:!Array.isArray(e)||e.every(a)}function l(e){return e instanceof r||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function c(e){return e.replace(/"/g,"&quot;")}function h(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function d(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},21212:(e,t,i)=>{"use strict";i.d(t,{Gt:()=>f,Ho:()=>m,JL:()=>g,Qo:()=>l,f$:()=>h,x$:()=>u});var n=i(75392),o=i(97295),s=i(25670);const r=new RegExp(`\\$\\(${s.k.iconNameExpression}(?:${s.k.iconModifierExpression})?\\)`,"g"),a=new RegExp(`(\\\\)?${r.source}`,"g");function l(e){return e.replace(a,((e,t)=>t?e:`\\${e}`))}const c=new RegExp(`\\\\${r.source}`,"g");function h(e){return e.replace(c,(e=>`\\${e}`))}const d=new RegExp(`(\\s)?(\\\\)?${r.source}(\\s)?`,"g");function u(e){return-1===e.indexOf("$(")?e:e.replace(d,((e,t,i,n)=>i?e:t||n||""))}function g(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const p=new RegExp(`\\$\\(${s.k.iconNameCharacter}+\\)`,"g");function m(e){p.lastIndex=0;let t="";const i=[];let n=0;for(;;){const o=p.lastIndex,s=p.exec(e),r=e.substring(o,null==s?void 0:s.index);if(r.length>0){t+=r;for(let e=0;e<r.length;e++)i.push(n)}if(!s)break;n+=s[0].length}return{text:t,iconOffsets:i}}function f(e,t,i=!1){const{text:s,iconOffsets:r}=t;if(!r||0===r.length)return(0,n.Oh)(e,s,i);const a=(0,o.j3)(s," "),l=s.length-a.length,c=(0,n.Oh)(e,a,i);if(c)for(const e of c){const t=r[e.start+l]+l;e.start+=t,e.end+=t}return c}},44742:(e,t,i)=>{"use strict";i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},77173:(e,t,i)=>{"use strict";i.d(t,{F:()=>o});var n=i(4669);const o=new class{constructor(){this._onDidChange=new n.Q5,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}},53725:(e,t,i)=>{"use strict";var n;i.d(t,{$:()=>n}),function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let t=0;t<i;t++){const t=o.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>o}]}}(n||(n={}))},22258:(e,t,i)=>{"use strict";i.d(t,{H_:()=>a,Vd:()=>u,gx:()=>m,kL:()=>p});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},c=[],h=Object.create(null),d=Object.create(null),u=[],g=[];for(let e=0;e<=193;e++)u[e]=-1;for(let e=0;e<=127;e++)g[e]=-1;var p;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,m,f,_,v,b,C,y,w]=e;if(n[m]||(n[m]=!0,c[m]=f,h[f]=m,d[f.toLowerCase()]=m,p&&(u[m]=_,0!==_&&3!==_&&5!==_&&4!==_&&6!==_&&57!==_&&(g[_]=m))),!i[_]){if(i[_]=!0,!v)throw new Error(`String representation missing for key code ${_} around scan code ${f}`);o.define(_,v),s.define(_,y||v),r.define(_,w||y||v)}b&&(a[b]=_),C&&(l[C]=_)}g[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(p||(p={}))},8030:(e,t,i)=>{"use strict";i.d(t,{X4:()=>r,jC:()=>a,xo:()=>s});var n=i(63580);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=i(s);if(null===r)return null;n[o]=l(s,r,this.modifierLabels[e])}return n.join(" ")}}const s=new o({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.NC({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.NC({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.NC({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),r=new o({ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:n.NC({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),a=new o({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function l(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}new o({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"})},8313:(e,t,i)=>{"use strict";i.d(t,{$M:()=>r,Z9:()=>o,aZ:()=>l,f1:()=>c});var n=i(17301);function o(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}function s(e,t){const i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return e instanceof r&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.b1)("chords");this.chords=e}}class l{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}class c{}},79579:(e,t,i)=>{"use strict";i.d(t,{o:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5976:(e,t,i)=>{"use strict";i.d(t,{B9:()=>a,F8:()=>l,JT:()=>d,Jz:()=>m,L6:()=>g,OF:()=>c,SL:()=>h,Wf:()=>r,XK:()=>u,b2:()=>f,dk:()=>s,dt:()=>p});var n=i(88289),o=i(53725);function s(e){return e}function r(e){return"function"==typeof e.dispose&&0===e.dispose.length}function a(e){if(o.$.is(e)){const t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function l(...e){const t=c((()=>a(e)));return t}function c(e){const t={dispose:(0,n.I)((()=>{e()}))};return t}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{a(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}h.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new h,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}d.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class g{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class p{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>void 0!==t,this.dispose=()=>{t&&(t(),t=void 0)},this}}class m{constructor(e){this.object=e}dispose(){}}class f{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{a(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},91741:(e,t,i)=>{"use strict";i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},43702:(e,t,i)=>{"use strict";var n,o;i.d(t,{Y9:()=>r,z6:()=>l});class s{constructor(e,t){this.uri=e,this.value=t}}class r{constructor(e,t){this[n]="ResourceMap",e instanceof r?(this.map=new Map(e.map),this.toKey=null!=t?t:r.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:r.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}r.defaultToKey=e=>e.toString();class a{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},23897:(e,t,i)=>{"use strict";i.d(t,{Q:()=>s});var n=i(53060),o=i(70666);function s(e){let t=JSON.parse(e);return t=r(t),t}function r(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags);case 16:return new Date(e.source)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=r(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=r(e[i],t+1))}return e}},81170:(e,t,i)=>{"use strict";i.d(t,{v:()=>n});const n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},66663:(e,t,i)=>{"use strict";i.d(t,{Gi:()=>c,WX:()=>a,lg:()=>n});var n,o=i(17301),s=i(1432),r=i(70666);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm"}(n||(n={}));const a=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${n.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return o.dL(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const a=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(c+=`&tkn=${encodeURIComponent(l)}`),r.o.from({scheme:s.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${a}`,path:this._remoteResourcesPath,query:c})}};class l{uriToBrowserUri(e){return e.scheme===n.vscodeRemote?a.rewrite(e):e.scheme===n.file&&(s.tY||s.n2&&s.li.origin===`${n.vscodeFileResource}://${l.FALLBACK_AUTHORITY}`)?e.with({scheme:n.vscodeFileResource,authority:e.authority||l.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}l.FALLBACK_AUTHORITY="vscode-app";const c=new l;var h;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:r.o.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=null==n?void 0:n.get(i);if(o)return t.get(o)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e["vscode-coi"]=o}}(h||(h={}))},59870:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{N:()=>s,nM:()=>o,uZ:()=>n});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class s{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}},36248:(e,t,i)=>{"use strict";i.d(t,{$E:()=>d,I8:()=>o,IU:()=>u,_A:()=>s,fS:()=>h,jB:()=>c,rs:()=>a});var n=i(98401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?o(i):i})),t}function s(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const o=e[i];"object"!=typeof o||Object.isFrozen(o)||(0,n.fU)(o)||t.push(o)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if(Array.isArray(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?c(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function h(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!h(e[i],t[i]))return!1}else{const o=[];for(n in e)o.push(n);o.sort();const s=[];for(n in t)s.push(n);if(s.sort(),!h(o,s))return!1;for(i=0;i<o.length;i++)if(!h(e[o[i]],t[o[i]]))return!1}return!0}function d(e){const t=[];for(const i of function(e){let t=[],i=Object.getPrototypeOf(e);for(;Object.prototype!==i;)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function u(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},88721:(e,t,i)=>{"use strict";i.d(t,{EZ:()=>E,XX:()=>L,DZ:()=>N,Fv:()=>S,KR:()=>w,Gf:()=>x,DB:()=>k,ir:()=>D,Ku:()=>C});var n=i(1432);let o;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else o="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const s=o.cwd,r=o.env,a=o.platform,l=46,c=47,h=92,d=58;class u extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new u(t,"string",e)}const p="win32"===a;function m(e){return e===c||e===h}function f(e){return e===c}function _(e){return e>=65&&e<=90||e>=97&&e<=122}function v(e,t,i,n){let o="",s=0,r=-1,a=0,h=0;for(let d=0;d<=e.length;++d){if(d<e.length)h=e.charCodeAt(d);else{if(n(h))break;h=c}if(n(h)){if(r===d-1||1===a);else if(2===a){if(o.length<2||2!==s||o.charCodeAt(o.length-1)!==l||o.charCodeAt(o.length-2)!==l){if(o.length>2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=d,a=0;continue}if(0!==o.length){o="",s=0,r=d,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,d)}`:o=e.slice(r+1,d),s=d-r-1;r=d,a=0}else h===l&&-1!==a?++a:a=-1}return o}function b(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new u("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const C={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=s():(a=r[`=${t}`]||s(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===h)&&(a=`${t}\\`));const l=a.length;let c=0,u="",p=!1;const f=a.charCodeAt(0);if(1===l)m(f)&&(c=1,p=!0);else if(m(f))if(p=!0,m(a.charCodeAt(1))){let e=2,t=e;for(;e<l&&!m(a.charCodeAt(e));)e++;if(e<l&&e!==t){const i=a.slice(t,e);for(t=e;e<l&&m(a.charCodeAt(e));)e++;if(e<l&&e!==t){for(t=e;e<l&&!m(a.charCodeAt(e));)e++;e!==l&&e===t||(u=`\\\\${i}\\${a.slice(t,e)}`,c=e)}}}else c=1;else _(f)&&a.charCodeAt(1)===d&&(u=a.slice(0,2),c=2,l>2&&m(a.charCodeAt(2))&&(p=!0,c=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(i=`${a.slice(c)}\\${i}`,n=p,p&&t.length>0)break}return i=v(i,!n,"\\",m),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return f(s)?"\\":e;if(m(s))if(o=!0,m(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!m(e.charCodeAt(o));)o++;if(o<t&&o!==s){const r=e.slice(s,o);for(s=o;o<t&&m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!m(e.charCodeAt(o));)o++;if(o===t)return`\\\\${r}\\${e.slice(s)}\\`;o!==s&&(i=`\\\\${r}\\${e.slice(s,o)}`,n=o)}}}else n=1;else _(s)&&e.charCodeAt(1)===d&&(i=e.slice(0,2),n=2,t>2&&m(e.charCodeAt(2))&&(o=!0,n=3));let r=n<t?v(e.slice(n),!o,"\\",m):"";return 0!==r.length||o||(r="."),r.length>0&&m(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return m(i)||t>2&&_(i)&&e.charCodeAt(1)===d&&m(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n<e.length;++n){const o=e[n];g(o,"path"),o.length>0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&m(i.charCodeAt(0))){++o;const e=i.length;e>1&&m(i.charCodeAt(1))&&(++o,e>2&&(m(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o<t.length&&m(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return C.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=C.resolve(e),n=C.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===h;)o++;let s=e.length;for(;s-1>o&&e.charCodeAt(s-1)===h;)s--;const r=s-o;let a=0;for(;a<t.length&&t.charCodeAt(a)===h;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===h;)l--;const c=l-a,d=r<c?r:c;let u=-1,p=0;for(;p<d;p++){const i=e.charCodeAt(o+p);if(i!==t.charCodeAt(a+p))break;i===h&&(u=p)}if(p!==d){if(-1===u)return n}else{if(c>d){if(t.charCodeAt(a+p)===h)return n.slice(a+p+1);if(2===p)return n.slice(a+p)}r>d&&(e.charCodeAt(o+p)===h?u=p:2===p&&(u=3)),-1===u&&(u=0)}let m="";for(p=o+u+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==h||(m+=0===m.length?"..":"\\..");return a+=u,m.length>0?`${m}${n.slice(a,l)}`:(n.charCodeAt(a)===h&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=C.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(_(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return m(o)?e:".";if(m(o)){if(i=n=1,m(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!m(e.charCodeAt(o));)o++;if(o===t)return e;o!==s&&(i=n=o+1)}}}}else _(o)&&e.charCodeAt(1)===d&&(i=t>2&&m(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(m(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&_(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(m(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(m(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===d&&_(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(m(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:b.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return m(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(m(o)){if(n=1,m(e.charCodeAt(1))){let t=2,o=t;for(;t<i&&!m(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&m(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&!m(e.charCodeAt(t));)t++;t===i?n=t:t!==o&&(n=t+1)}}}}else if(_(o)&&e.charCodeAt(1)===d){if(i<=2)return t.root=t.dir=e,t;if(n=2,m(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,c=!0,h=e.length-1,u=0;for(;h>=n;--h)if(o=e.charCodeAt(h),m(o)){if(!c){r=h+1;break}}else-1===a&&(c=!1,a=h+1),o===l?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);return-1!==a&&(-1===s||0===u||1===u&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y=(()=>{if(p){const e=/\\/g;return()=>{const t=s().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>s()})(),w={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:y();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===c)}return t=v(t,!i,"/",f),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return 0===(e=v(e,!t,"/",f)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===c),join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];g(n,"path"),n.length>0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":w.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=w.resolve(e))===(t=w.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=n<o?n:o;let r=-1,a=0;for(;a<s;a++){const i=e.charCodeAt(1+a);if(i!==t.charCodeAt(1+a))break;i===c&&(r=a)}if(a===s)if(o>s){if(t.charCodeAt(1+a)===c)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===c?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==c||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==c)-1===n&&(o=!1,n=r+1),a===l?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:b.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,h=e.length-1,d=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==c)-1===r&&(a=!1,r=h+1),t===l?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);else if(!a){s=h+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===d||1===d&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};w.win32=C.win32=C,w.posix=C.posix=w;const S=p?C.normalize:w.normalize,k=p?C.resolve:w.resolve,x=p?C.relative:w.relative,L=p?C.dirname:w.dirname,E=p?C.basename:w.basename,N=p?C.extname:w.extname,D=p?C.sep:w.sep},1432:(e,t,i)=>{"use strict";i.d(t,{$L:()=>D,ED:()=>x,G6:()=>U,IJ:()=>E,OS:()=>F,dK:()=>R,dz:()=>L,fn:()=>P,gn:()=>I,i7:()=>V,li:()=>C,n2:()=>T,r:()=>W,tY:()=>N,tq:()=>A,un:()=>j,vU:()=>z});var n,o=i(63580);const s="en";let r,a,l=!1,c=!1,h=!1,d=!1,u=!1,g=!1,p=!1,m=!1,f=!1,_=!1,v=s,b=null;const C="object"==typeof self?self:"object"==typeof i.g?i.g:{};let y;void 0!==C.vscode&&void 0!==C.vscode.process?y=C.vscode.process:"undefined"!=typeof process&&(y=process);const w="string"==typeof(null===(n=null==y?void 0:y.versions)||void 0===n?void 0:n.electron),S=w&&"renderer"===(null==y?void 0:y.type);if("object"!=typeof navigator||S)if("object"==typeof y){l="win32"===y.platform,c="darwin"===y.platform,h="linux"===y.platform,d=h&&!!y.env.SNAP&&!!y.env.SNAP_REVISION,p=w,f=!!y.env.CI||!!y.env.BUILD_ARTIFACTSTAGINGDIRECTORY,r=s,v=s;const e=y.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];r=t.locale,v=i||s,b=t._translationsConfigFile}catch(e){}u=!0}else console.error("Unable to resolve platform.");else a=navigator.userAgent,l=a.indexOf("Windows")>=0,c=a.indexOf("Macintosh")>=0,m=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=a.indexOf("Linux")>=0,_=(null==a?void 0:a.indexOf("Mobi"))>=0,g=!0,r=o.aj(o.NC({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||s,v=r;let k=0;c?k=1:l?k=3:h&&(k=2);const x=l,L=c,E=h,N=u,D=g,T=g&&"function"==typeof C.importScripts,I=m,A=_,M=a,R=v,O="function"==typeof C.postMessage&&!C.importScripts,P=(()=>{if(O){const e=[];C.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeScheduleAsyncWork)return e.splice(i,1),void n.callback()}}));let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),C.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),F=c||m?2:l?1:3;let B=!0,H=!1;function W(){if(!H){H=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const V=!!(M&&M.indexOf("Chrome")>=0),z=!!(M&&M.indexOf("Firefox")>=0),U=!!(!V&&M&&M.indexOf("Safari")>=0),j=!!(M&&M.indexOf("Edg/")>=0);M&&M.indexOf("Android")},61134:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(n||(n={}))},95935:(e,t,i)=>{"use strict";i.d(t,{AH:()=>v,DZ:()=>m,EZ:()=>p,Hx:()=>g,SF:()=>d,Vb:()=>S,Vo:()=>_,XX:()=>f,Xy:()=>u,i3:()=>C,lX:()=>b,z_:()=>c});var n=i(15527),o=i(66663),s=i(88721),r=i(1432),a=i(97295),l=i(70666);function c(e){return(0,l.q)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===o.lg.file)return n.KM(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(y(e.authority,t.authority))return n.KM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.o.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return s.KR.basename(e.path)}extname(e){return s.KR.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.lg.file?t=l.o.file(s.XX(c(e))).path:(t=s.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.lg.file?l.o.file(s.Fv(c(e))).path:s.KR.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!y(e.authority,t.authority))return;if(e.scheme===o.lg.file){const i=s.Gf(c(e),c(t));return r.ED?n.ej(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);e<t&&(i.charCodeAt(e)===a.charCodeAt(e)||i.charAt(e).toLowerCase()===a.charAt(e).toLowerCase());e++);i=a.substr(0,e)+i.substr(e)}return s.KR.relative(i,a)}resolvePath(e,t){if(e.scheme===o.lg.file){const i=l.o.file(s.DB(c(e),t));return e.with({authority:i.authority,path:i.path})}return t=n.fn(t),e.with({path:s.KR.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&"/"===e.path[0]}isEqualAuthority(e,t){return e===t||void 0!==e&&void 0!==t&&(0,a.qq)(e,t)}hasTrailingPathSeparator(e,t=s.ir){if(e.scheme===o.lg.file){const i=c(e);return i.length>n.yj(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.ir){return w(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.ir){let i=!1;if(e.scheme===o.lg.file){const o=c(e);i=void 0!==o&&o.length===n.yj(o).length&&o[o.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||w(e,t)?e:e.with({path:e.path+"/"})}}const d=new h((()=>!1)),u=(new h((e=>e.scheme!==o.lg.file||!r.IJ)),new h((e=>!0)),d.isEqual.bind(d)),g=(d.isEqualOrParent.bind(d),d.getComparisonKey.bind(d),d.basenameOrAuthority.bind(d)),p=d.basename.bind(d),m=d.extname.bind(d),f=d.dirname.bind(d),_=d.joinPath.bind(d),v=d.normalizePath.bind(d),b=d.relativePath.bind(d),C=d.resolvePath.bind(d),y=(d.isAbsolutePath.bind(d),d.isEqualAuthority.bind(d)),w=d.hasTrailingPathSeparator.bind(d);var S;d.removeTrailingPathSeparator.bind(d),d.addTrailingPathSeparator.bind(d),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(S||(S={}))},76633:(e,t,i)=>{"use strict";i.d(t,{Rm:()=>r});var n=i(4669),o=i(5976);class s{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.JT{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new s(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e<t?(r=e+.75*i,a=t-.75*i):(r=e-.75*i,a=t+.75*i),n=l(e,r),o=l(a,t),s=.33,function(e){return e<s?n(e/s):o((e-s)/(1-s))}}var n,o,s;return l(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new a(e,i,!1)}return new a(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return c.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new c(e,t,n,i)}}},14603:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n,o=i(97295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?o.qq(t,s)?e.Error:o.qq(i,s)||o.qq("warn",s)?e.Warning:o.qq(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const s=n},84013:(e,t,i)=>{"use strict";i.d(t,{G:()=>s});var n=i(1432);const o=n.li.performance&&"function"==typeof n.li.performance.now;class s{static create(e=!0){return new s(e)}constructor(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n.li.performance.now():Date.now()}}},97295:(e,t,i)=>{"use strict";i.d(t,{$i:()=>q,B4:()=>se,C8:()=>Y,GF:()=>f,HO:()=>V,IO:()=>_,J_:()=>z,K7:()=>Q,Kw:()=>J,LC:()=>C,Mh:()=>A,P1:()=>M,PJ:()=>ee,Qe:()=>$,R1:()=>m,T5:()=>E,TT:()=>k,Ut:()=>j,V8:()=>y,W1:()=>H,WU:()=>l,YK:()=>O,YU:()=>c,ZG:()=>R,ZH:()=>F,ZK:()=>re,ab:()=>G,c1:()=>Z,df:()=>D,ec:()=>h,fy:()=>d,j3:()=>u,j_:()=>L,m5:()=>r,mK:()=>N,mr:()=>v,oH:()=>ne,oL:()=>g,ok:()=>I,ow:()=>w,qq:()=>T,qu:()=>S,rL:()=>P,uS:()=>X,un:()=>p,uq:()=>b,vH:()=>W,vU:()=>ae,zY:()=>x});var n,o=i(701),s=i(79579);function r(e){return!e||"string"!=typeof e||0===e.trim().length}const a=/{(\d+)}/g;function l(e,...t){return 0===t.length?e:e.replace(a,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function h(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function d(e,t=" "){return g(u(e,t),t)}function u(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function m(e){return e.replace(/\*/g,"")}function f(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=h(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function v(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function b(e){return e.split(/\r\n|\r|\n/)}function C(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function y(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function w(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function S(e,t){return e<t?-1:e>t?1:0}function k(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){const n=e.charCodeAt(i),s=t.charCodeAt(o);if(n<s)return-1;if(n>s)return 1}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function x(e,t){return L(e,t,0,e.length,0,t.length)}function L(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){let r=e.charCodeAt(i),a=t.charCodeAt(o);if(r===a)continue;if(r>=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,o,s);N(r)&&(r-=32),N(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function E(e){return e>=48&&e<=57}function N(e){return e>=97&&e<=122}function D(e){return e>=65&&e<=90}function T(e,t){return e.length===t.length&&0===L(e,t)}function I(e,t){const i=t.length;return!(t.length>e.length)&&0===L(e,t,0,i)}function A(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function M(e,t){const i=Math.min(e.length,t.length);let n;const o=e.length-1,s=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(s-n))return n;return i}function R(e){return 55296<=e&&e<=56319}function O(e){return 56320<=e&&e<=57343}function P(e,t){return t-56320+(e-55296<<10)+65536}function F(e,t,i){const n=e.charCodeAt(i);if(R(n)&&i+1<t){const t=e.charCodeAt(i+1);if(O(t))return P(n,t)}return n}class B{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=function(e,t){const i=e.charCodeAt(t-1);if(O(i)&&t>1){const n=e.charCodeAt(t-2);if(R(n))return P(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=F(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class H{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new B(e,t)}nextGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(te(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(te(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function W(e,t){return new H(e,t).nextGraphemeLength()}function V(e,t){return new H(e,t).prevGraphemeLength()}function z(e,t){t>0&&O(e.charCodeAt(t))&&t--;const i=t+W(e,t);return[i-V(e,i),i]}let U;function j(e){return U||(U=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),U.test(e)}const K=/^[\t\n\r\x20-\x7E]*$/;function q(e){return K.test(e)}const $=/[\u2028\u2029]/;function G(e){return $.test(e)}function Q(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Y(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Z=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ie{static getInstance(){return ie._INSTANCE||(ie._INSTANCE=new ie),ie._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ne(e,t){if(0===e)return 0;const i=function(e,t){const i=new B(t,e);let n=i.prevCodePoint();for(;oe(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Y(n))return;let o=i.offset;return o>0&&8205===i.prevCodePoint()&&(o=i.offset),o}(e,t);if(void 0!==i)return i;const n=new B(t,e);return n.prevCodePoint(),n.offset}function oe(e){return 127995<=e&&e<=127999}ie._INSTANCE=null;const se=" ";class re{static getInstance(e){return re.cache.get(Array.from(e))}static getLocales(){return re._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}n=re,re.ambiguousCharacterData=new s.o((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),re.cache=new o.t((e=>{function t(e){const t=new Map;for(let i=0;i<e.length;i+=2)t.set(e[i],e[i+1]);return t}function i(e,t){if(!e)return t;const i=new Map;for(const[n,o]of e)t.has(n)&&i.set(n,o);return i}const o=n.ambiguousCharacterData.value;let s,r=e.filter((e=>!e.startsWith("_")&&e in o));0===r.length&&(r=["_default"]);for(const e of r)s=i(s,t(o[e]));const a=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(o._common),s);return new re(a)})),re._locales=new s.o((()=>Object.keys(re.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class ae{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(ae.getRawData())),this._data}static isInvisibleCharacter(e){return ae.getData().has(e)}static get codePoints(){return ae.getData()}}ae._data=void 0},5635:(e,t,i)=>{"use strict";i.d(t,{n:()=>n});const n=Symbol("MicrotaskDelay")},4767:(e,t,i)=>{"use strict";i.d(t,{Id:()=>c});var n=i(97295);class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}class s{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(46===this._value.charCodeAt(this._to)){if(!e)break;this._from++}else e=!1;return this}cmp(e){return this._caseSensitive?(0,n.TT)(e,this._value,0,e.length,this._from,this._to):(0,n.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class r{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let t=e.length-1;t>=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?(0,n.TT)(e,this._value,0,e.length,this._from,this._to):(0,n.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class a{constructor(e,t){this._ignorePathCasing=e,this._ignoreQueryAndFragment=t,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new r(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(e)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return(0,n.zY)(e,this._value.scheme);if(2===this._states[this._stateIdx])return(0,n.zY)(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return(0,n.qu)(e,this._value.query);if(5===this._states[this._stateIdx])return(0,n.qu)(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class l{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e,t;return null!==(t=null===(e=this.left)||void 0===e?void 0:e.height)&&void 0!==t?t:0}get heightRight(){var e,t;return null!==(t=null===(e=this.right)||void 0===e?void 0:e.height)&&void 0!==t?t:0}}class c{static forUris(e=(()=>!1),t=(()=>!1)){return new c(new a(e,t))}static forStrings(){return new c(new o)}static forConfigKeys(){return new c(new s)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},25670:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n,o,s=i(73046);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(s.l.error);const[,o,r]=n,a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=o.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(o||(o={}))},98401:(e,t,i)=>{"use strict";function n(e){return"string"==typeof e}function o(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return void 0===e}function h(e){return!d(e)}function d(e){return c(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(d(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"==typeof e}function m(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)f(e[n],t[n])}function f(e,t){if(n(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(p(t)){try{if(e instanceof t)return}catch(e){}if(!d(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function _(e){return null===e?void 0:e}i.d(t,{$K:()=>h,D8:()=>m,HD:()=>n,Jp:()=>d,Kn:()=>o,TW:()=>a,cW:()=>g,f6:()=>_,fU:()=>s,hj:()=>r,jn:()=>l,mf:()=>p,o8:()=>c,p_:()=>u})},85427:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{A:()=>o,K:()=>n})},70666:(e,t,i)=>{"use strict";i.d(t,{o:()=>u,q:()=>v});var n=i(88721),o=i(1432);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,o,s=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,i||c),this.query=n||c,this.fragment=o||c,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===s?s=this.fragment:null===s&&(s=c),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new p(t,i,n,o,s)}static parse(e,t=!1){const i=d.exec(e);return i?new p(i[2]||c,w(i[4]||c),w(i[5]||c),w(i[7]||c),w(i[9]||c),t):new p(c,c,c,c,c)}static file(e){let t=c;if(o.ED&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new p("file",t,e,c,c)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.ED&&"file"===e.scheme?u.file(n.Ku.join(v(e,!0),...t)).path:n.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=o.ED?1:void 0;class p extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,i){let n,o=-1;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=m[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function _(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=m[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function v(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.ED&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const i=t?_:f;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=h,n+=h),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:f(l,!1,!1)),n}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(y)?e.replace(y,(e=>C(e))):e}},98e3:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});const n=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e};const t=new Uint8Array(16),i=[];for(let e=0;e<256;e++)i.push(e.toString(16).padStart(2,"0"));return function(){e(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let n=0,o="";return o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o}}()},67746:(e,t,i)=>{"use strict";i.d(t,{Jq:()=>o,X5:()=>n,jG:()=>s});const n={ctrlCmd:!1,alt:!1};var o,s;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(s||(s={})),new class{constructor(e){this.options=e}}},25552:(e,t,i)=>{"use strict";i.d(t,{H:()=>g});var n=i(1593),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c={};l(c,n,"default");var h={},d={},u=class{static getOrCreate(e){return d[e]||(d[e]=new u(e)),d[e]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,h[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function g(e){const t=e.id;h[t]=e,c.languages.register(e);const i=u.getOrCreate(t);c.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),c.languages.onLanguage(t,(async()=>{const e=await i.load();c.languages.setLanguageConfiguration(t,e.conf)}))}},56292:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(75).then(i.bind(i,62075))})},43814:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(240).then(i.bind(i,92240))})},40902:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({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:()=>i.e(571).then(i.bind(i,2571))})},43763:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(295).then(i.bind(i,62295))})},77365:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(954).then(i.bind(i,42954))})},96337:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(778).then(i.bind(i,27778))})},81905:(e,t,i)=>{"use strict";i.r(t),(0,i(25552).H)({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>i.e(902).then(i.bind(i,4902))})},52136:(e,t,i)=>{"use strict";i.d(t,{N:()=>o});var n=i(38626);function o(e,t){e instanceof n.Z?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},54534:(e,t,i)=>{"use strict";i.d(t,{I:()=>s});var n=i(5976),o=i(4669);class s extends n.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},27231:(e,t,i)=>{"use strict";i.d(t,{g:()=>g});var n=i(16268),o=i(4669),s=i(5976),r=i(52136);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,r.N)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,r.N)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,r.N)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");l._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}var c=i(64141),h=i(27374);class d extends s.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new u,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new u,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new h.pR({pixelRatio:n.PixelRatio.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const o=new a(e,t);return i.push(o),null==n||n.push(o),o}_actualReadFontInfo(e){const t=[],i=[],o=this._createRequest("n",0,t,i),s=this._createRequest("",0,t,null),r=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),d=this._createRequest("1",0,t,i),u=this._createRequest("2",0,t,i),g=this._createRequest("3",0,t,i),p=this._createRequest("4",0,t,i),m=this._createRequest("5",0,t,i),f=this._createRequest("6",0,t,i),_=this._createRequest("7",0,t,i),v=this._createRequest("8",0,t,i),b=this._createRequest("9",0,t,i),C=this._createRequest("→",0,t,i),y=this._createRequest("→",0,t,null),w=this._createRequest("·",0,t,i),S=this._createRequest(String.fromCharCode(11825),0,t,null),k="|/-_ilm%";for(let e=0,n=k.length;e<n;e++)this._createRequest(k.charAt(e),0,t,i),this._createRequest(k.charAt(e),1,t,i),this._createRequest(k.charAt(e),2,t,i);!function(e,t){new l(e,t).read()}(e,t);const x=Math.max(a.width,d.width,u.width,g.width,p.width,m.width,f.width,_.width,v.width,b.width);let L=e.fontFeatureSettings===c.n0.OFF;const E=i[0].width;for(let e=1,t=i.length;L&&e<t;e++){const t=E-i[e].width;if(t<-.001||t>.001){L=!1;break}}let N=!0;return L&&y.width!==E&&(N=!1),y.width>C.width&&(N=!1),new h.pR({pixelRatio:n.PixelRatio.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:r.width,middotWidth:w.width,wsmiddotWidth:S.width,maxDigitWidth:x},!0)}}class u{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const g=new d},37940:(e,t,i)=>{"use strict";i.d(t,{n:()=>o});var n=i(4669);const o=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}}},35715:(e,t,i)=>{"use strict";i.d(t,{Fz:()=>b,Nl:()=>_,RA:()=>f,Tj:()=>y,pd:()=>n});var n,o=i(16268),s=i(65321),r=i(4850),a=i(59069),l=i(50795),c=i(15393),h=i(4669),d=i(5976),u=i(81170),g=i(97295),p=i(15887),m=i(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const f={forceCopyWithSyntaxHighlighting:!1};class _{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}_.INSTANCE=new _;class v{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class b extends d.JT{get textAreaState(){return this._textAreaState}constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new h.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new h.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new h.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new h.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new h.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new h.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new h.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new h.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new h.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new h.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new h.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new c.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new c.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=p.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.y(e);(109===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),o=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.y(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.al&&console.log("[compositionstart]",e);const t=new v;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&o&&o.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===o.code||"ArrowLeft"===o.code))return p.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.al&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.al&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p.un.readFromTextArea(this._textArea,this._textAreaState),t=p.un.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.al&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.ZG(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=C.getTextData(e.clipboardData);t&&(i=i||_.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.nm(document,"selectionchange",(t=>{if(l.B.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const c=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(c[0],c[1],c[2]),d=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(d[0],d[1],d[2]),g=new m.Y(h.lineNumber,h.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};_.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&C.setTextData(e.clipboardData,t.text,t.html,i)}}class C{static getTextData(e){const t=e.getData(u.v.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]}static setTextData(e,t,i,n){e.setData(u.v.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class y extends d.JT{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.Y(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.Y(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.Y(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.Y(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.Y(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.Y(this._actual,"beforeinput")).event,this.onInput=this._register(new r.Y(this._actual,"input")).event,this.onCut=this._register(new r.Y(this._actual,"cut")).event,this.onCopy=this._register(new r.Y(this._actual,"copy")).event,this.onPaste=this._register(new r.Y(this._actual,"paste")).event,this.onFocus=this._register(new r.Y(this._actual,"focus")).event,this.onBlur=this._register(new r.Y(this._actual,"blur")).event,this._onSyntheticTap=this._register(new h.Q5),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.B.onKeyDown()))),this._register(this.onBeforeInput((()=>l.B.onBeforeInput()))),this._register(this.onInput((()=>l.B.onInput()))),this._register(this.onKeyUp((()=>l.B.onKeyUp()))),this._register(s.nm(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=s.Ay(this._actual);return e?e.activeElement===this._actual:!!s.Uw(this._actual)&&document.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=s.Ay(n);r=a?a.activeElement:document.activeElement;const l=r===n,c=n.selectionStart,h=n.selectionEnd;if(l&&c===t&&h===i)o.isFirefox&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.isFirefox&&window.parent!==window&&n.focus());try{const e=s.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s._0(n,e)}catch(e){}}}}},15887:(e,t,i)=>{"use strict";i.d(t,{al:()=>s,ee:()=>a,un:()=>r});var n=i(97295),o=i(24314);const s=!1;class r{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(s=t.newlineCountBeforeSelection),new r(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,o,s,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(o=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==o?o:null,t,1)}const c=this.value.substring(this.selectionStart,e);if(-1===c.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(s=this.selection)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:null,c,1);const h=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,h,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const o=Math.min(n.Mh(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(o,e.value.length-r),l=t.value.substring(o,t.value.length-r),c=e.selectionStart-o,h=e.selectionEnd-o,d=t.selectionStart-o,u=t.selectionEnd-o;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${h}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${d}, selectionEnd: ${u}`)),d===u){const t=e.selectionStart-o;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:h-c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,c=e.selectionEnd-i,h=t.selectionStart-i,d=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${h}, selectionEnd: ${d}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:d-a.length}}}r.EMPTY=new r("",0,0,null,void 0);class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.e(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const s=500,l=a._getPageOfLine(t.startLineNumber,i),c=a._getRangeForPage(l,i),h=a._getPageOfLine(t.endLineNumber,i),d=a._getRangeForPage(h,i);let u=c.intersectRanges(new o.e(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(u,1)>s){const t=e.modifyPosition(u.getEndPosition(),-500);u=o.e.fromPositions(t,u.getEndPosition())}const g=e.getValueInRange(u,1),p=e.getLineCount(),m=e.getLineMaxColumn(p);let f=d.intersectRanges(new o.e(t.endLineNumber,t.endColumn,p,m));if(n&&e.getValueLengthInRange(f,1)>s){const t=e.modifyPosition(f.getStartPosition(),s);f=o.e.fromPositions(f.getStartPosition(),t)}const _=e.getValueInRange(f,1);let v;if(l===h||l+1===h)v=e.getValueInRange(t,1);else{const i=c.intersectRanges(t),n=d.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>1e3&&(v=v.substring(0,s)+String.fromCharCode(8230)+v.substring(v.length-s,v.length)),new r(g+v+_,g.length,g.length+v.length,t,u.endLineNumber-u.startLineNumber)}}},69317:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CoreEditingCommands:()=>E,CoreEditorCommand:()=>w,CoreNavigationCommands:()=>m,EditorScroll_:()=>g,RevealLine_:()=>p});var n=i(63580),o=i(16268),s=i(98401),r=i(85152),a=i(16830),l=i(11640),c=i(55343),h=i(50187),d=i(24314);class u{static columnSelect(e,t,i,n,o,s){const r=Math.abs(o-i)+1,a=i>o,l=n>s,u=n<s,g=[];for(let o=0;o<r;o++){const r=i+(a?-o:o),p=e.columnFromVisibleColumn(t,r,n),m=e.columnFromVisibleColumn(t,r,s),f=e.visibleColumnFromColumn(t,new h.L(r,p)),_=e.visibleColumnFromColumn(t,new h.L(r,m));if(u){if(f>s)continue;if(_<n)continue}if(l){if(_>n)continue;if(f<s)continue}g.push(new c.rS(new d.e(r,p,r,p),0,0,new h.L(r,m),0))}if(0===g.length)for(let e=0;e<r;e++){const n=i+(a?-e:e),o=t.getLineMaxColumn(n);g.push(new c.rS(new d.e(n,o,n,o),0,0,new h.L(n,o),0))}return{viewStates:g,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:o,toVisualColumn:s}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new h.L(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){const o=n?e.pageSize:1,s=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const o=n?e.pageSize:1,s=Math.min(t.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}}var g,p,m,f=i(29436),_=i(28108),v=i(51336),b=i(29102),C=i(38819),y=i(49989);class w extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.HD(t.to)||!s.o8(t.by)&&!s.HD(t.by)||!s.o8(t.value)&&!s.hj(t.value)||!s.o8(t.revealCursor)&&!s.jn(t.revealCursor))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"},e.parse=function(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Right:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.Left:i=4;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;case e.RawUnit.Editor:n=5;break;case e.RawUnit.Column:n=6;break;default:n=2}return{direction:i,unit:n,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(g||(g={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.hj(t.lineNumber)&&!s.HD(t.lineNumber)||!s.o8(t.at)&&!s.HD(t.at))},schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(p||(p={}));class S{constructor(e){e.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0))}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends w{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>c.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new h.L(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class m extends w{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,m._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=m,e.CursorMove=(0,a.fK)(new m);class f extends w{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends w{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;i<r;i++){const r=n[i];if((!o||r.modelState.selection.containsPosition(o))&&(!s||r.viewState.selection.containsPosition(s)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=(0,a.fK)(new class extends w{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class v extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=(0,a.fK)(new v({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=(0,a.fK)(new v({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class C extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.modelState.position.lineNumber;t[i]=c.Vi.fromModelState(n.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=(0,a.fK)(new C({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=(0,a.fK)(new C({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1311}}}));class y extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=(0,a.fK)(new y({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.NC("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=(0,a.fK)(new y({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.NC("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class k extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],s=o.modelState.position.lineNumber,r=e.model.getLineMaxColumn(s);i[n]=c.Vi.fromModelState(o.modelState.move(this._inSelectionMode,s,r,0))}return i}}e.CursorLineEnd=(0,a.fK)(new k({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=(0,a.fK)(new k({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1315}}}));class x extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=(0,a.fK)(new x({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=(0,a.fK)(new x({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3086,mac:{primary:3088}}}));class L extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=(0,a.fK)(new L({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=(0,a.fK)(new L({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3085,mac:{primary:3090}}}));class E extends w{constructor(){super({id:"editorScroll",precondition:void 0,description:g.description})}determineScrollMethod(e){return[6].includes(e.unit)&&[4,2].includes(e.direction)?this._runHorizontalEditorScroll.bind(this):[1,2,3,4,5,6].includes(e.unit)&&[1,3].includes(e.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(e,t){const i=g.parse(t);if(!i)return;const n=this.determineScrollMethod(i);n&&n(e,t.source,i)}_runVerticalEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[_.P.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,i.select)])}e.viewLayout.setScrollPosition({scrollTop:n},0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.viewLayout.getFutureViewport(),n=e.getCompletelyVisibleViewRangeAtScrollTop(i.top),o=e.coordinatesConverter.convertViewRangeToModelRange(n);let s;s=1===t.direction?Math.max(1,o.startLineNumber-t.value):Math.min(e.model.getLineCount(),o.startLineNumber+t.value);const r=e.coordinatesConverter.convertModelPositionToViewPosition(new h.L(s,1));return e.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber)}if(5===t.unit){let i=0;return 3===t.direction&&(i=e.model.getLineCount()-e.cursorConfig.pageSize),e.viewLayout.getVerticalOffsetForLineNumber(i)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.viewLayout.getCurrentScrollTop()+n*e.cursorConfig.lineHeight}_runHorizontalEditorScroll(e,t,i){const n=this._computeDesiredScrollLeft(e,i);e.viewLayout.setScrollPosition({scrollLeft:n},0)}_computeDesiredScrollLeft(e,t){const i=(4===t.direction?-1:1)*t.value;return e.viewLayout.getCurrentScrollLeft()+i*e.cursorConfig.typicalHalfwidthCharacterWidth}}e.EditorScrollImpl=E,e.EditorScroll=(0,a.fK)(new E),e.ScrollLineUp=(0,a.fK)(new class extends w{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollPageUp=(0,a.fK)(new class extends w{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollEditorTop=(0,a.fK)(new class extends w{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollLineDown=(0,a.fK)(new class extends w{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollPageDown=(0,a.fK)(new class extends w{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollEditorBottom=(0,a.fK)(new class extends w{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollLeft=(0,a.fK)(new class extends w{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Left,by:g.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollRight=(0,a.fK)(new class extends w{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Right,by:g.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:i.source})}});class N extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0))}}e.WordSelect=(0,a.fK)(new N({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=(0,a.fK)(new N({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=(0,a.fK)(new class extends w{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0),s=n[i];o[i]=_.P.word(e,s,s.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class D extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),2!==t.revealType&&e.revealPrimaryCursor(t.source,!1,!0))}}e.LineSelect=(0,a.fK)(new D({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=(0,a.fK)(new D({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class T extends w{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=(0,a.fK)(new T({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=(0,a.fK)(new T({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.CancelSelection=(0,a.fK)(new class extends w{constructor(){super({id:"cancelSelection",precondition:b.u.hasNonEmptySelection,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=(0,a.fK)(new class extends w{constructor(){super({id:"removeSecondaryCursors",precondition:b.u.hasMultipleSelections,kbOpts:{weight:1,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0),(0,r.i7)(n.NC("removedCursor","Removed secondary cursors"))}}),e.RevealLine=(0,a.fK)(new class extends w{constructor(){super({id:"revealLine",precondition:void 0,description:p.description})}runCoreEditorCommand(e,t){const i=t,n=i.lineNumber||0;let o="number"==typeof n?n+1:parseInt(n)+1;o<1&&(o=1);const s=e.model.getLineCount();o>s&&(o=s);const r=new d.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends S{constructor(){super(a.Sq)}runDOMCommand(){o.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends w{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.Vi.fromModelSelection(t.selection)]))}})}(m||(m={}));const k=C.Ao.and(b.u.textInputFocus,b.u.columnSelection);function x(e,t){y.W.registerKeybindingRule({id:e,primary:t,when:k,weight:1})}function L(e){return e.register(),e}var E;x(m.CursorColumnSelectLeft.id,1039),x(m.CursorColumnSelectRight.id,1041),x(m.CursorColumnSelectUp.id,1040),x(m.CursorColumnSelectPageUp.id,1035),x(m.CursorColumnSelectDown.id,1042),x(m.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends S{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(86))return t.getModel().undo()}},e.Redo=new class extends S{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(86))return t.getModel().redo()}}}(E||(E={}));class N extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function D(e,t){L(new N("default:"+e,e)),L(new N(e,e,t))}D("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),D("replacePreviousChar"),D("compositionType"),D("compositionStart"),D("compositionEnd"),D("paste"),D("cut")},49889:(e,t,i)=>{"use strict";i.d(t,{d:()=>_,B:()=>p});var n=i(23547),o=i(73278),s=i(81170),r=i(70666),a=i(43702),l=i(23897),c=i(50988),h=i(89872);const d="CodeEditors",u="CodeFiles";const g={DragAndDropContribution:"workbench.contributions.dragAndDrop"};h.B.add(g.DragAndDropContribution,new class{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}});function p(e){const t=new o.Hl;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,o.ZO)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,m(n))}}return t}function m(e){const t=e.path?r.o.parse(e.path):void 0;return(0,o.Ix)(e.name,t,(()=>{return t=this,i=void 0,o=function*(){return new Uint8Array(yield e.arrayBuffer())},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}))}const f=Object.freeze([d,u,n.g.RESOURCES]);function _(e,t,i=!1){var p;if(t.dataTransfer&&(i||!e.has(s.v.uriList))){const i=function(e){var t;const i=[];if(e.dataTransfer&&e.dataTransfer.types.length>0){const o=e.dataTransfer.getData(d);if(o)try{i.push(...(0,l.Q)(o))}catch(e){}else try{const t=e.dataTransfer.getData(n.g.RESOURCES);i.push(...function(e){const t=[];if(e){const i=JSON.parse(e);for(const e of i)if(e.indexOf(":")>0){const{selection:i,uri:n}=(0,c.xI)(r.o.parse(e));t.push({resource:n,options:{selection:i}})}}return t}(t))}catch(e){}if(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)for(let t=0;t<e.dataTransfer.files.length;t++){const n=e.dataTransfer.files[t];if(n&&n.path)try{i.push({resource:r.o.file(n.path),isExternal:!0,allowWorkspaceOpen:!0})}catch(e){}}const s=e.dataTransfer.getData(u);if(s)try{const e=JSON.parse(s);for(const t of e)i.push({resource:r.o.file(t),isExternal:!0,allowWorkspaceOpen:!0})}catch(e){}const a=h.B.as(g.DragAndDropContribution).getAll();for(const t of a){const n=e.dataTransfer.getData(t.dataFormatKey);if(n)try{i.push(...t.getEditorInputs(n))}catch(e){}}}const o=[],s=new a.Y9;for(const e of i)e.resource?s.has(e.resource)||(o.push(e),s.set(e.resource,!0)):o.push(e);return o}(t).filter((e=>e.resource)).map((e=>e.resource.toString()));for(const e of null===(p=t.dataTransfer)||void 0===p?void 0:p.items){const t=e.getAsFile();t&&i.push(t.path?r.o.file(t.path).toString():t.name)}i.length&&e.replace(s.v.uriList,(0,o.ZO)(o.Z0.create(i)))}for(const t of f)e.delete(t)}},65520:(e,t,i)=>{"use strict";i.d(t,{CL:()=>o,Pi:()=>r,QI:()=>s});var n=i(96518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function r(e){return o(e)?e:s(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&o(e.activeCodeEditor)?e.activeCodeEditor:null}},29994:(e,t,i)=>{"use strict";i.d(t,{AL:()=>v,N5:()=>f,Pp:()=>p,YN:()=>c,gy:()=>m,kG:()=>g,rU:()=>h,t7:()=>b,tC:()=>_});var n=i(65321),o=i(93911),s=i(7448),r=i(15393),a=i(5976),l=i(73910);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new h(this.x-window.scrollX,this.y-window.scrollY)}}class h{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new c(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class d{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.i(e);return new d(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new u(s,r)}class m extends s.n{constructor(e,t,i){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new c(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class f{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.nm(e,n.tw.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.nm(e,n.tw.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.nm(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.nm(e,n.tw.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.nm(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o.C),this._keydownListener=null}startMonitoring(e,t,i,o,s){this._keydownListener=n.mu(document,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{o(new m(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.pY((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const o=this._counter++;i=new C(t,`dyn-rule-${this._instanceId}-${o}`,n.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}b._idPool=0;class C{constructor(e,t,i,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElement=n.dS(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?(0,l.n_1)(n.id):n,i+=`\n\t${y(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function y(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},16830:(e,t,i)=>{"use strict";i.d(t,{AJ:()=>C,QG:()=>T,Qr:()=>N,R6:()=>S,Sq:()=>P,Uc:()=>n,_K:()=>I,_l:()=>w,fK:()=>E,jY:()=>k,kz:()=>O,mY:()=>b,n_:()=>R,rn:()=>D,sb:()=>L,x1:()=>x});var n,o=i(63580),s=i(70666),r=i(11640),a=i(50187),l=i(73733),c=i(88216),h=i(84144),d=i(94565),u=i(38819),g=i(72065),p=i(49989),m=i(89872),f=i(10829),_=i(98401),v=i(43557);class b{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.W.registerKeybindingRule(i)}}d.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){h.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class C extends b{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e].implementation===i)return void this._implementations.splice(e,1)}}}runCommand(e,t){const i=e.get(v.VZ);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const o=n.implementation(e,t);if(o){if(i.trace(`Command '${this.id}' was handled by '${n.name}'.`),"boolean"==typeof o)return;return o}}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class y extends b{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class w extends b{static bindToContribution(e){return class extends w{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){const o=e(i);o&&this._callback(o,n)}}}static runEditorCommand(e,t,i,n){const o=e.get(r.$),s=o.getFocusedCodeEditor()||o.getActiveCodeEditor();if(s)return s.invokeWithinContext((e=>{if(e.get(u.i6).contextMatchesRules((0,_.f6)(i)))return n(e,s,t)}))}runCommand(e,t){return w.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class S extends w{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=h.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(S.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(f.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class k extends S{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}run(e,t,i){for(const n of this._implementations){const o=n[1](e,t,i);if(o){if("boolean"==typeof o)return;return o}}}}class x extends h.Ke{run(e,...t){const i=e.get(r.$),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext((e=>{if(e.get(u.i6).contextMatchesRules((0,_.f6)(this.desc.precondition)))return this.runEditorCommand(e,n,...t)}))}}function L(e,t){d.P.registerCommand(e,(function(e,...i){const n=e.get(g.TG),[o,r]=i;(0,_.p_)(s.o.isUri(o)),(0,_.p_)(a.L.isIPosition(r));const h=e.get(l.q).getModel(o);if(h){const e=a.L.lift(r);return n.invokeFunction(t,h,e,...i.slice(2))}return e.get(c.S).createModelReference(o).then((e=>new Promise(((o,s)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,a.L.lift(r),i.slice(2)))}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function E(e){return A.INSTANCE.registerEditorCommand(e),e}function N(e){const t=new e;return A.INSTANCE.registerEditorAction(t),t}function D(e){return A.INSTANCE.registerEditorAction(e),e}function T(e){A.INSTANCE.registerEditorAction(e)}function I(e,t,i){A.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return A.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return A.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return A.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return A.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return A.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class A{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function M(e){return e.register(),e}A.INSTANCE=new A,m.B.add("editor.contributions",A.INSTANCE);const R=M(new C({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.NC("undo","Undo"),order:1}]}));M(new y(R,{id:"default:undo",precondition:void 0}));const O=M(new C({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:h.eH.CommandPalette,group:"",title:o.NC("redo","Redo"),order:1}]}));M(new y(O,{id:"default:redo",precondition:void 0}));const P=M(new C({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.eH.MenubarSelectionMenu,group:"1_basic",title:o.NC({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.NC("selectAll","Select All"),order:1}]}))},66007:(e,t,i)=>{"use strict";i.d(t,{Gl:()=>l,fo:()=>a,vu:()=>r});var n=i(72065),o=i(70666),s=i(98401);const r=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(c.is(e))return c.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,s.Kn)(e)&&o.o.isUri(e.resource)&&(0,s.Kn)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{static is(e){return e instanceof c||(0,s.Kn)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof c?e:new c(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},11640:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(72065).yh)("codeEditorService")},43407:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});class n{static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new n(t,i,e.getPosition())}constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},56325:(e,t,i)=>{"use strict";i.d(t,{Gm:()=>Wo});var n=i(36357),o=i(16830);let s=class{constructor(e,t){}dispose(){}};var r,a;s.ID="editor.contrib.markerDecorations",s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.i,function(e,t){a(e,t,r)})],s),(0,o._K)(s.ID,s,0);var l=i(63580),c=i(65321),h=i(17301),d=i(4669),u=i(5976),g=i(66663),p=i(16268),m=i(9488),f=i(36248),_=i(1432),v=i(54534),b=i(27231);class C{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=C._read(e,this.key);this.migrate(t,(t=>C._read(e,t)),((t,i)=>C._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function y(e,t){C.items.push(new C(e,t))}function w(e,t){y(e,((i,n,o)=>{if(void 0!==i)for(const[n,s]of t)if(i===n)return void o(e,s)}))}C.items=[],w("wordWrap",[[!0,"on"],[!1,"off"]]),w("lineNumbers",[[!0,"on"],[!1,"off"]]),w("cursorBlinking",[["visible","solid"]]),w("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),w("renderLineHighlight",[[!0,"line"],[!1,"none"]]),w("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),w("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),w("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),w("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),w("autoIndent",[[!1,"advanced"],[!0,"full"]]),w("matchBrackets",[[!0,"always"],[!1,"never"]]),w("renderFinalNewline",[[!0,"on"],[!1,"off"]]),w("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),y("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),y("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),y("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const S={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};y("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(S))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),y("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),y("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),y("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}));var k=i(37940),x=i(64141),L=i(82334),E=i(27374),N=i(31106);let D=class extends u.JT{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new d.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new d.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new x.LJ,this.isSimpleWidget=e,this._containerObserver=this._register(new v.I(i,t.dimension)),this._rawOptions=R(t),this._validatedOptions=M.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(L.C.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(k.n.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(b.g.onDidChange((()=>this._recomputeOptions()))),this._register(p.PixelRatio.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=M.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=E.E4.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:k.n.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return M.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:T(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:p.isWebKit||p.isFirefox,pixelRatio:p.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return b.g.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=R(e);M.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=M.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}};function T(){let e="";return p.isSafari||p.isWebkitWebView||(e+="no-user-select "),p.isSafari&&(e+="no-minimap-shadow ",e+="enable-user-select "),_.dz&&(e+="mac "),e}D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,N.F)],D);class I{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class A{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class M{static validateOptions(e){const t=new I;for(const i of x.Bc){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new A;for(const n of x.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&m.fS(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!M._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of x.Bc){const s=!M._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new x.Bb(i):null}static applyUpdate(e,t){let i=!1;for(const n of x.Bc)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function R(e){const t=f.I8(e);return function(e){C.items.forEach((t=>t.apply(e)))}(t),t}var O=i(11640),P=i(3860),F=i(38626),B=i(10553),H=i(7448),W=i(29994);class V extends u.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class z extends V{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class U{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(n);for(let e=0;e<n;e++)o[e]=i[n-e-1];return o}}class j extends class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class K{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class q{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const n=e[i];t[i]=new q(n.left,n.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class ${constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class G{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class Q{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class Y{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort($.compare);const t=[];let i=0,n=e[0];for(let o=1,s=e.length;o<s;o++){const s=e[o];n.left+n.width+.9>=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;o<s;o++){const s=e[o];n[o]=new $(Math.max(0,(s.left-t)/i),s.width/i)}return this._mergeAdjacentRanges(n)}static readHorizontalRanges(e,t,i,n,o,s,r,a){const l=e.children.length-1;if(0>l)return null;if((t=Math.min(l,Math.max(0,t)))===(n=Math.min(l,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let c=e.children[t].firstChild,h=e.children[n].firstChild;if(c&&h||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!h&&0===o&&n>0&&(h=e.children[n-1].firstChild,o=1073741824)),!c||!h)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(h.textContent.length,Math.max(0,o));const d=this._readClientRects(c,i,h,o,a);return this._createHorizontalRangesFromClientRects(d,s,r)}}var Z=i(92550),X=i(91557),J=i(92321);const ee=!!_.tY||!(_.IJ||p.isFirefox||p.isSafari);let te=!0;class ie{readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}}class ne{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(47),o=i.get(35);this.renderWhitespace="off"===o?i.get(93):"none",this.renderControlCharacters=i.get(88),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(30),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(63),this.stopRenderingLineAfter=i.get(111),this.fontLigatures=i.get(48)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class oe{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,F.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,J.c3)(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=Z.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if((0,J.c3)(s.themeType)||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t<n&&((0,J.c3)(s.themeType)&&r.push(new Z.Kp(t,n,"inline-selected-text",0)),"selection"===this._options.renderWhitespace&&(a||(a=[]),a.push(new X.zG(t-1,n-1))))}}const l=new X.IJ(s.useMonospaceOptimizations,s.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,r,o.tabSize,o.startVisibleColumn,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==x.n0.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;n.appendString('<div style="top:'),n.appendString(String(t)),n.appendString("px;height:"),n.appendString(String(this._options.lineHeight)),n.appendString('px;" class="'),n.appendString(oe.CLASS_NAME),n.appendString('">');const c=(0,X.d1)(l,n);n.appendString("</div>");let h=null;return te&&ee&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===c.containsForeignElements&&(h=new se(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),h||(h=le(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof se}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof se?this._renderedViewLine.monospaceAssumptionsAreValid():te}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof se&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new Q(!0,[new $(this.getWidth(),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new Q(!1,s):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}oe.CLASS_NAME="view-line";class se{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e<n;e++)this._keyColumnPixelOffsetCache[e]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){if(!this.domNode||this.input.lineContent.length<300){const e=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*e)}return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||-1!==this._cachedWidth}monospaceAssumptionsAreValid(){if(!this.domNode)return te;if(this.input.lineContent.length<300){const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),te=!1)}return te}toSlowRenderedLine(){return le(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new $(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=Y.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i.clientRectDeltaLeft,i.clientRectScale,i.endNode);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new X.Nd(o,i),n)}}class re{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new $(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new $(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=Y.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(i),s=Y.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new $(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return Y.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new X.Nd(o,i),n)}}class ae extends re{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left<i&&(e.width=i-e.left)}}return s}}const le=p.isWebKit?function(e,t,i,n,o){return new ae(e,t,i,n,o)}:function(e,t,i,n,o){return new re(e,t,i,n,o)};var ce,he=i(50187),de=i(24314),ue=i(7988),ge=i(47128);class pe{constructor(e=null){this.hitTarget=e,this.type=0}}class me{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}!function(e){e.createFromDOMInfo=function(e,t,i){const n=e.getPositionFromDOMInfo(t,i);return n?new me(n,t,null):new pe(t)}}(ce||(ce={}));class fe{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class _e{static _deduceRage(e,t=null){return!t&&e?new de.e(e.lineNumber,e.column,e.lineNumber,e.column):null!=t?t:null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,o,s){return{type:e,element:t,mouseColumn:i,position:n,range:o,detail:s}}static createViewZone(e,t,i,n,o){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:o}}static createContentText(e,t,i,n,o){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:o}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t,i,n){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:i,outsideDistance:n}}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class ve{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class be{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(138),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(63),this.stickyTabStops=n.get(110),this.typicalHalfwidthCharacterWidth=n.get(47).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return be.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new he.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new he.L(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t<n?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.viewModel.getLineCount(),t=this._context.viewModel.getLineMaxColumn(e);return{range:new de.e(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(t);return{range:new de.e(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return be._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Ce extends class{constructor(e,t,i,n){this.editorPos=t,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Se._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=U.collect(o,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?ue.i.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return _e.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return _e.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return _e.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return _e.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return _e.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return _e.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return _e.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return _e.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return _e.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new Ce(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const ye={isAfterLines:!0};function we(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class Se{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=U.collect(t,this._viewHelper.viewDomNode);return!(!ve.isChildOfContentWidgets(i)&&!ve.isChildOfOverflowingContentWidgets(i)&&!ve.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,o){const s=new be(this._context,this._viewHelper,e),r=new Ce(s,t,i,n,o);try{const e=Se._createMouseTarget(s,r,!1);if(6===e.type&&s.stickyTabStops&&null!==e.position){const t=Se._snapToSoftTabBoundary(e.position,s.viewModel),i=de.e.fromPositions(t,t).plusRange(e.range);return r.fulfillContentText(t,i,e.detail)}return e}catch(e){return r.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfillUnknown();const n=Se._doHitTest(e,t);return 1===n.type?Se.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let o=null;return o=o||Se._hitTestContentWidget(e,n),o=o||Se._hitTestOverlayWidget(e,n),o=o||Se._hitTestMinimap(e,n),o=o||Se._hitTestScrollbarSlider(e,n),o=o||Se._hitTestViewZone(e,n),o=o||Se._hitTestMargin(e,n),o=o||Se._hitTestViewCursor(e,n),o=o||Se._hitTestTextArea(e,n),o=o||Se._hitTestViewLines(e,n,i),o=o||Se._hitTestScrollbar(e,n),o||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(ve.isChildOfContentWidgets(t.targetPath)||ve.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(ve.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfillContentText(e.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const s of i){if(n<s.contentLeft)continue;if(n>s.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return ve.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,s):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s)))}return null}static _hitTestViewLines(e,t,i){if(!ve.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new he.L(1,1),ye);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new he.L(i,n),ye)}if(i){if(ve.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=we(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new he.L(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=we(t.mouseContentHorizontalOffset-n),s=new he.L(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=Se._doHitTest(e,t);return 1===n.type?Se.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(ve.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new he.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ve.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new he.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(ve.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new he.L(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(138),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Se._getMouseColumn(n,t.get(47).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=we(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const c=l.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const h=[];if(h.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&h.push({offset:t.left,column:r-1})}if(r<e.viewModel.getLineMaxColumn(s)){const t=e.visibleRangeForPosition(s,r+1);t&&h.push({offset:t.left,column:r+1})}h.sort(((e,t)=>e.offset-t.offset));const d=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=d.clientX&&d.clientX<=u.right;let p=null;for(let e=1;e<h.length;e++){const i=h[e-1],o=h[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=o.offset){p=new de.e(s,i.column,s,o.column),n=Math.abs(i.offset-t.mouseContentHorizontalOffset)<Math.abs(o.offset-t.mouseContentHorizontalOffset)?new he.L(s,i.column):new he.L(s,o.column);break}}return t.fulfillContentText(n,p,{mightBeForeignElement:!g||!!o,injectedText:o})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),o=n+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&t.mouseVerticalOffset>o)){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new W.YN(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=c.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=ke.getInstance();for(let n=0;n<s.length+1;n++){if(r=e.getCharWidth(s.charAt(n),i)/2,a+=r,t<a){l=n;break}a+=r}}n.setStart(o.firstChild,l),n.setEnd(o.firstChild,l)}return n}(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new pe;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===oe.CLASS_NAME?ce.createFromDOMInfo(e,t,n.startOffset):new pe(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===oe.CLASS_NAME?ce.createFromDOMInfo(e,o,o.textContent.length):new pe(o)}return new pe}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===oe.CLASS_NAME?ce.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new pe(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===oe.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return ce.createFromDOMInfo(e,t,0)}else if(s===oe.CLASS_NAME)return ce.createFromDOMInfo(e,i.offsetNode,0)}return new pe(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),o=ge.l.atomicPosition(i,e.column-1,n,2);return-1!==o?new he.L(e.lineNumber,o+1):e}static _doHitTest(e,t){let i=new pe;if("function"==typeof document.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),1===i.type){const t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new me(n,i.spanNode,t))}return i}}class ke{static getInstance(){return ke._INSTANCE||(ke._INSTANCE=new ke),ke._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}ke._INSTANCE=null;var xe=i(9802);class Le extends V{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Se(this._context,i),this._mouseDownOperation=this._register(new Ee(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,((e,t)=>this._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(138).height;const n=new W.N5(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=c.nm(document,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new W.gy(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(c.nm(this.viewHelper.viewDomNode,c.tw.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=xe.Io.INSTANCE;let t=0,i=L.C.getZoomLevel(),n=!1,o=0;function s(e){return _.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(c.nm(this.viewHelper.viewDomNode,c.tw.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(72))return;const a=new H.q(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(s(r)){const e=L.C.getZoomLevel(),t=a.deltaY>0?1:-1;L.C.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=L.C.getZoomLevel(),n=s(r),o=0),t=Date.now(),o+=a.deltaY,n&&(L.C.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(138)){const e=this._context.configuration.options.get(138).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new W.rU(e,t).toPageCoordinates(),n=(0,W.kG)(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;const o=(0,W.Pp)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=c.Ay(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,t){const i=this._createMouseTarget(e,!0),n=6===i.type||7===i.type,o=2===i.type||3===i.type||4===i.type,s=3===i.type,r=this._context.configuration.options.get(103),a=8===i.type||5===i.type,l=9===i.type;let c=e.leftButton||e.middleButton;_.dz&&e.leftButton&&e.ctrlKey&&(c=!1);const h=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||s&&r))h(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(h(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class Ee extends u.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new W.AL(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new Ne(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new Te,this._currentSelection=new P.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(86)&&o.get(32)&&!o.get(19)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){const i=t.y-e.posy,s=Math.max(n.getCurrentScrollTop()-i,0),r=be.getZoneAtCoord(this._context,s);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return _e.createOutsideEditor(o,e,"above",i)}const a=n.getLineNumberAtVerticalOffset(s);return _e.createOutsideEditor(o,new he.L(a,1),"above",i)}if(e.posy>t.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=be.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return _e.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return _e.createOutsideEditor(o,new he.L(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posx<t.x){const i=t.x-e.posx;return _e.createOutsideEditor(o,new he.L(s,1),"left",i)}if(e.posx>t.x+t.width){const n=e.posx-t.x-t.width;return _e.createOutsideEditor(o,new he.L(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return _e.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new he.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class Ne extends u.JT{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new De(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class De extends u.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=c.jL((()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(63),t=this._context.configuration.options.get(138).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(63),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),o="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let s;{const e=(0,W.kG)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(138).horizontalScrollbarHeight,i=new W.YN(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,W.Pp)(this._viewHelper.viewDomNode,e,i);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}s.position&&s.position.lineNumber===o||(s="above"===this._position.outsidePosition?_e.createOutsideEditor(this._position.mouseColumn,new he.L(o,1),"above",this._position.outsideDistance):_e.createOutsideEditor(this._position.mouseColumn,new he.L(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=c.jL((()=>this._execute()))}}class Te{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Te.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Te.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Ie=i(10161),Ae=i(35715);class Me extends Le{constructor(e,t,i){super(e,t,i),this._register(B.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Contextmenu,(e=>this._onContextMenu(new W.gy(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(c.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new W.tC(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new W.gy(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Re extends Le{constructor(e,t,i){super(e,t,i),this._register(B.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,B.t.Contextmenu,(e=>this._onContextMenu(new W.gy(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new W.gy(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Ae.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Oe extends u.JT{constructor(e,t,i){super(),_.gn&&Ie.D.pointerEvents?this.handler=this._register(new Me(e,t,i)):window.TouchEvent?this.handler=this._register(new Re(e,t,i)):this.handler=this._register(new Le(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Pe=i(97295),Fe=i(52136),Be=i(15887);class He extends V{}var We=i(97781),Ve=i(8625);class ze extends He{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new he.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(63);const t=e.get(64);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(89);const i=e.get(138);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new he.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=_.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i,r=this._getLineRenderLineNumber(e);if(!r){s[n]="";continue}let a="";if(e===o&&0===this._context.viewModel.getLineLength(e)){if("off"===this._renderFinalNewline){s[n]="";continue}"dimmed"===this._renderFinalNewline&&(a=" dimmed-line-number")}e===this._activeLineNumber&&(a=" active-line-number"),s[n]=`<div class="${ze.CLASS_NAME}${t}${a}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${r}</div>`}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}ze.CLASS_NAME="line-numbers",(0,We.Ic)(((e,t)=>{const i=e.getColor(Ve.hw),n=e.getColor(Ve.Bj);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class Ue extends z{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(138);this._canUseLayerHinting=!t.get(29),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,F.X)(document.createElement("div")),this._domNode.setClassName(Ue.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,F.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Ue.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);return this._canUseLayerHinting=!t.get(29),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}Ue.CLASS_NAME="glyph-margin",Ue.OUTER_CLASS_NAME="margin";var je=i(24929),Ke=i(96542),qe=i(96887),$e=i(41264),Ge=i(77173);class Qe{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new he.L(this.modelLineNumber,this.distanceToModelLineStart+1),i=new he.L(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const Ye=p.isFirefox;class Ze extends z{constructor(e,t,i){super(e),this._primaryCursorPosition=new he.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,o=n.get(138);this._setAccessibilityOptions(n),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=n.get(47),this._lineHeight=n.get(63),this._emptySelectionClipboard=n.get(34),this._copyWithSyntaxHighlighting=n.get(22),this._visibleTextArea=null,this._selections=[new P.Y(1,1,1,1)],this._modelSelections=[new P.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,F.X)(document.createElement("textarea")),U.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Ke.S}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:s}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=s*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(118))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l.NC("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,F.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},a={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,_.ED),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(Ae.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(_.dz&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Be.un(i,i.length,i.length,de.e.fromPositions(t),0)}const t=500;if(_.dz&&!e.isEmpty()&&r.getValueLengthInRange(e,0)<t){const t=r.getValueInRange(e,0);return new Be.un(t,0,t.length,e,0)}if(p.isSafari&&!e.isEmpty()){const e="vscode-placeholder";return new Be.un(e,0,e.length,null,void 0)}return Be.un.EMPTY}if(p.isAndroid){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Be.un(i,n,n,de.e.fromPositions(t),0)}return Be.un.EMPTY}return Be.ee.fromEditorSelection(r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},c=this._register(new Ae.Tj(this.textArea.domNode));this._textAreaInput=this._register(new Ae.Fz(a,c,_.OS,p)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Be.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Be.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,h=o.substring(0,o.length-l),{tabSize:d}=this._context.viewModel.model.getOptions(),u=function(e,t,i){if(0===e.length)return 0;const n=document.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const o=document.createElement("span");(0,Fe.N)(o,t),o.style.whiteSpace="pre",o.style.tabSize=i*t.spaceWidth+"px",o.append(e),n.appendChild(o),document.body.appendChild(n);const s=o.offsetWidth;return document.body.removeChild(n),s}(h,this._fontInfo,d);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,de.e.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Qe(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Ke.S} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Ke.S}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(Ge.F.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,je.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,je.u)(this._context.configuration.options.get(124));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Pe.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?l.NC("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",_.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===x.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(138).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(47);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=Ye?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(47),this._lineHeight=t.get(63),this._emptySelectionClipboard=t.get(34),this._copyWithSyntaxHighlighting=t.get(22),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(118))),(e.hasChanged(31)||e.hasChanged(86))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Ge.F.enabled||e.get(31)&&e.get(86)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new he.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(a<this._contentLeft){const e=this._contentLeft-a;a+=e,r+=e,l-=e}l>this._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),h=c.tokens.findTokenIndexAtOffset(i.column-1),d=h===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(d?c.tokens.getPresentation(h):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(qe.RW.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(t<this._contentLeft||t>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(_.dz){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:Ye?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:Ye?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,Fe.N)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?$e.Il.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(54)?i.setClassName("monaco-editor-background textAreaCover "+Ue.OUTER_CLASS_NAME):0!==n.get(64).renderType?i.setClassName("monaco-editor-background textAreaCover "+ze.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}var Xe=i(69317);class Je{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Xe.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new he.L(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(74)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(74)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=_.IJ&&t.get(101),n=t.get(19);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Xe.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Xe.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Xe.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Xe.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Xe.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Xe.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Xe.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Xe.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Xe.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Xe.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Xe.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Xe.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Xe.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class et{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return et.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}var tt,it=i(50072);class nt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(o,s)}onLinesChanged(e,t){const i=e+t-1;if(0===this.getCount())return!1;const n=this.getStartLineNumber(),o=this.getEndLineNumber();let s=!1;for(let t=e;t<=i;t++)t>=n&&t<=o&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let e=0;e<i;e++)s[e]=this._createLine();const r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),c=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(s).concat(l),c}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let o=0,s=e.length;o<s;o++){const s=e[o];if(s.toLineNumber<t||s.fromLineNumber>i)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class ot{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new nt((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,F.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(138)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new st(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class st{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||i<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=i-t+1,o.lines=[];for(let e=t;e<=i;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,n),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),n,t),o.rendLineNumberStart>t){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<i){const e=o.rendLineNumberStart+o.linesLength,s=i;e<=s&&(this._insertLinesAfter(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=e.lines.concat(s)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){st._ttPolicy&&(i=st._ttPolicy.createHTML(i));const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let s=this.domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");st._ttPolicy&&(t=st._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){const o=e.lines[t];if(i[t]){const e=n.firstChild,t=o.getDomNode();t.parentNode.replaceChild(e,t),o.setDomNode(e)}}}_finishRendering(e,t,i){const n=st._sb,o=e.linesLength,s=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<o;e++){const t=s[e];a[e]=!1,t.getDomNode()||t.renderLine(e+r,i[e],this.viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=s[e];(l[e]=!1,a[e])||o.renderLine(e+r,i[e],this.viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}st._ttPolicy=null===(tt=window.trustedTypes)||void 0===tt?void 0:tt.createPolicy("editorViewLayer",{createHTML:e=>e}),st._sb=new it.HT(1e5);class rt extends z{constructor(e){super(e),this._visibleLines=new ot(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(47);(0,Fe.N)(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new at(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);const n=this._context.configuration.options.get(47);return(0,Fe.N)(this.domNode,n),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter((e=>e.shouldRender()));for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class at{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(63),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,F.X)(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(63)}renderLine(e,t,i,n){let o="";for(let t=0,n=this._dynamicOverlays.length;t<n;t++)o+=this._dynamicOverlays[t].render(i.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,n.appendString('<div style="position:absolute;top:'),n.appendString(String(t)),n.appendString("px;width:100%;height:"),n.appendString(String(this._lineHeight)),n.appendString('px;">'),n.appendString(o),n.appendString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class lt extends rt{constructor(e){super(e);const t=this._context.configuration.options.get(138);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(138);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class ct extends rt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(138);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,Fe.N)(this.domNode,t.get(47))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,Fe.N)(this.domNode,t.get(47));const i=t.get(138);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class ht extends z{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,F.X)(document.createElement("div")),U.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,F.X)(document.createElement("div")),U.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new dt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,o){this._widgets[e.getId()].setPosition(t,i,n,o),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class dt{constructor(e,t,i){this._primaryAnchor=new ut(null,null),this._secondaryAnchor=new ut(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,F.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(138);this._fixedOverflowWidgets=n.get(39),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(63),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(63),e.hasChanged(138)){const e=t.get(138);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new ut(null,null);const n=t.model.validatePosition(e);if(t.coordinatesConverter.modelPositionIsVisible(n)){const o=t.coordinatesConverter.convertModelPositionToViewPosition(n,null!=i?i:void 0);return new ut(e,o)}return new ut(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=o-i,l=s>=i,c=r,h=n.viewportHeight-r>=i;let d=e.left;return d+t>n.scrollLeft+n.viewportWidth&&(d=n.scrollLeft+n.viewportWidth-t),d<n.scrollLeft&&(d=n.scrollLeft),{fitsAbove:l,aboveTop:a,fitsBelow:h,belowTop:c,left:d}}_layoutHorizontalSegmentInPage(e,t,i,n){const o=Math.max(15,t.left-n),s=Math.min(t.left+t.width+n,e.width-15);let r=t.left+i-window.scrollX;if(r+n>s){const e=r-(s-n);r-=e,i-=e}if(r<o){const e=r-o;r-=e,i-=e}return[i,r]}_layoutBoxInPage(e,t,i,n){const o=e.top-i,s=e.top+e.height,r=c.i(this._viewDomNode.domNode),a=r.top+o-window.scrollY,l=r.top+s-window.scrollY,h=c.D6(document.body),[d,u]=this._layoutHorizontalSegmentInPage(h,r,e.left-n.scrollLeft+this._contentLeft,t),g=a>=22,p=l+i<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:g,aboveTop:Math.max(a,22),fitsBelow:p,belowTop:l,left:u}:{fitsAbove:g,aboveTop:o,fitsBelow:p,belowTop:s,left:d}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new gt(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new pt(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(47);let o=t.left;return o=o<e.left?Math.max(o,e.left-i+n.typicalFullwidthCharacterWidth):Math.min(o,e.left+i-n.typicalFullwidthCharacterWidth),new pt(e.top,o,e.height)}_prepareRenderWidget(e){if(!this._preference||0===this._preference.length)return null;const{primary:t,secondary:i}=this._getAnchorsCoordinates(e);if(!t)return null;if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=mt(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{const e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(e.width),this._cachedDomNodeOffsetHeight=Math.round(e.height)}}const n=this._reduceAnchorCoordinates(t,i,this._cachedDomNodeOffsetWidth);let o;o=this.allowEditorOverflow?this._layoutBoxInPage(n,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(n,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(const t of this._preference)if(1===t){if(!o)return null;if(2===e||o.fitsAbove)return{coordinate:new gt(o.aboveTop,o.left),position:1}}else{if(2!==t)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new gt(n.top,n.left)),position:0}:{coordinate:new gt(n.top,n.left),position:0};if(!o)return null;if(2===e||o.fitsBelow)return{coordinate:new gt(o.belowTop,o.left),position:2}}return null}onBeforeRender(e){this._primaryAnchor.viewPosition&&this._preference&&(this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&mt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&mt(this._actual.afterRender,this._actual,this._renderData.position)}}class ut{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class gt{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class pt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function mt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}class ft extends He{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(138);this._lineHeight=t.get(63),this._renderLineHighlight=t.get(90),this._renderLineHighlightOnlyWhenFocus=t.get(91),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new P.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),m.fS(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);return this._lineHeight=t.get(63),this._renderLineHighlight=t.get(90),this._renderLineHighlightOnlyWhenFocus=t.get(91),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s<o&&this._cursorLineNumbers[s]<e;)s++;s<o&&this._cursorLineNumbers[s]===e?r[n]=t:r[n]=""}this._renderData=r}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class _t extends ft{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class vt extends ft{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,We.Ic)(((e,t)=>{const i=e.getColor(Ve.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ve.Mm)){const i=e.getColor(Ve.Mm);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),(0,J.c3)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class bt extends He{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(63),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(63),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e];o.options.className&&(i[n++]=o)}i=i.sort(((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:de.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++)r[e-o]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!r.options.isWholeLine)continue;const a='<div class="cdr '+r.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(r.range.startLineNumber,o),c=Math.min(r.range.endLineNumber,s);for(let e=l;e<=c;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null;for(let l=0,c=t.length;l<c;l++){const c=t[l];if(c.options.isWholeLine)continue;const h=c.options.className,d=Boolean(c.options.showIfCollapsed);let u=c.range;d&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new de.e(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),s===h&&r===d&&de.e.areIntersectingOrTouching(a,u)?a=de.e.plusRange(a,u):(null!==s&&this._renderNormalDecoration(e,a,s,r,n,o,i),s=h,r=d,a=u)}null!==s&&this._renderNormalDecoration(e,a,s,r,n,o,i)}_renderNormalDecoration(e,t,i,n,o,s,r){const a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t.outsideRenderedLine)continue;const l=t.lineNumber-s;if(n&&1===t.ranges.length){const e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){const i=Math.round(e.left+e.width/2),n=Math.max(0,Math.round(i-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new q(n,this._typicalHalfwidthCharacterWidth)}}for(let e=0,n=t.ranges.length;e<n;e++){const n=t.ranges[e],s='<div class="cdr '+i+'" style="left:'+String(n.left)+"px;width:"+String(n.width)+"px;height:"+o+'px;"></div>';r[l]+=s}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Ct extends z{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(97),r=o.get(71),a=o.get(37),l=o.get(100),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,We.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new xe.$Z(t.domNode,h,this._context.viewLayout.getScrollable())),U.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,F.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(c.nm(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(c.nm(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(c.nm(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(c.nm(this.scrollbarDomNode.domNode,"scroll",(e=>d(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(138);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(69).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(97)||e.hasChanged(71)||e.hasChanged(37)){const e=this._context.configuration.options,t=e.get(97),i=e.get(71),n=e.get(37),o=e.get(100),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(138)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,We.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class yt{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class wt extends He{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1));let o=null,s=0;for(let r=0,a=i.length;r<a;r++){const a=i[r],l=a.className;let c=Math.max(a.startLineNumber,e)-e;const h=Math.min(a.endLineNumber,t)-e;o===l?(c=Math.max(s+1,c),s=Math.max(s,h)):(o=l,s=h);for(let e=c;e<=s;e++)n[e].push(o)}return n}}class St extends wt{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(138);this._lineHeight=t.get(63),this._glyphMargin=t.get(54),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);return this._lineHeight=t.get(63),this._glyphMargin=t.get(54),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.glyphMarginClassName;s&&(i[n++]=new yt(o.range.startLineNumber,o.range.endLineNumber,s))}return i}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._lineHeight.toString(),s='" style="left:'+this._glyphMarginLeft.toString()+"px;width:"+this._glyphMarginWidth.toString()+"px;height:"+o+'px;"></div>',r=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?r[i]="":r[i]='<div class="cgmr codicon '+o.join(" ")+s}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var kt=i(98401),xt=i(1516),Lt=i(65094);class Et extends He{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(139),n=t.get(47);this._lineHeight=t.get(63),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(139),n=t.get(47);return this._lineHeight=t.get(63),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,c=this._primaryPosition,h=this.getGuidesByLine(s,Math.min(r+1,this._context.viewModel.getLineCount()),c),d=[];for(let c=s;c<=r;c++){const r=c-s,u=h[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new he.L(c,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=-1===t.column?p+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new he.L(c,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new he.L(c,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`<div class="core-guide ${t.className} ${s}" style="left:${i}px;height:${l}px;width:${r}px"></div>`}d[r]=g}this._renderResult=d}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Lt.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Lt.s6.EnabledForActive:Lt.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const h=n?n[i-e]:[],d=new m.H9(h),u=o?o[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===h.length)&&s<=i&&i<=r&&e===a;t.push(...d.takeWhile((e=>e.visibleColumn<n))||[]);const c=d.peek();c&&c.visibleColumn===n&&!c.horizontalLine||t.push(new Lt.UO(n,-1,o?"core-guide-indent-active":"core-guide-indent",null,-1,-1))}t.push(...d.takeWhile((e=>!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Nt(e){if(!e||!e.isTransparent())return e}(0,We.Ic)(((e,t)=>{const i=[{bracketColor:Ve.zJ,guideColor:Ve.oV,guideColorActive:Ve.Qb},{bracketColor:Ve.Vs,guideColor:Ve.m$,guideColorActive:Ve.m3},{bracketColor:Ve.CE,guideColor:Ve.DS,guideColorActive:Ve.To},{bracketColor:Ve.UP,guideColor:Ve.lS,guideColorActive:Ve.L7},{bracketColor:Ve.r0,guideColor:Ve.Jn,guideColorActive:Ve.HV},{bracketColor:Ve.m1,guideColor:Ve.YF,guideColorActive:Ve.f9}],n=new xt.W,o=i.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=Nt(null!==(i=Nt(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=Nt(null!==(n=Nt(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(kt.$K);if(o.length>0){for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var Dt=i(15393);class Tt{constructor(){this._currentVisibleRange=new de.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class It{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class At{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){const i=t[e];s=Math.min(s,i.startLineNumber),r=Math.max(r,i.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=r}}class Mt extends z{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new ot(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,o=n.get(47),s=n.get(139);this._lineHeight=n.get(63),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=n.get(94),this._cursorSurroundingLines=n.get(26),this._cursorSurroundingLinesStyle=n.get(27),this._canUseLayerHinting=!n.get(29),this._viewLineOptions=new ne(i,this._context.theme.type),U.write(this.domNode,7),this.domNode.setClassName(`view-lines ${Ke.S}`),(0,Fe.N)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Dt.pY((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Dt.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Tt,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(109).enabled,this._maxNumberStickyLines=n.get(109).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new oe(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(139)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(47),n=t.get(139);return this._lineHeight=t.get(63),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(94),this._cursorSurroundingLines=t.get(26),this._cursorSurroundingLinesStyle=t.get(27),this._canUseLayerHinting=!t.get(29),this._stickyScrollEnabled=t.get(109).enabled,this._maxNumberStickyLines=t.get(109).maxLineCount,(0,Fe.N)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(138)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new ne(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new It(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new At(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new he.L(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(n<o||n>s)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.viewModel.getLineMinColumn(n);return r<a&&(r=a),new he.L(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===oe.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=de.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new ie(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new he.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>c)continue;const h=e===n.startLineNumber?n.startColumn:1,d=e===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,h,d,r);if(u){if(t&&e<i){const t=a;a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new he.L(e+1,1)).lineNumber,t!==a&&(u.ranges[u.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[s++]=new K(u.outsideRenderedLine,e,q.from(u.ranges))}}return 0===s?null:o}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new ie(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new G(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),_.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,o,s){const r=e.top,a=e.height,l=r+a;let c,h,d;if(o&&o.length>0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;i<n;i++){const n=o[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}c=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(e),d=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return-1;c=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),d=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}let u,g=0,p=0;if("mouse"!==t&&!i||"default"!==this._cursorSurroundingLinesStyle){const e=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);g=this._stickyScrollEnabled?Math.max(e,this._maxNumberStickyLines)*this._lineHeight:e*this._lineHeight,p=Math.max(0,e-1)*this._lineHeight}else i||(g=this._lineHeight);if(i||0!==s&&4!==s||(p+=this._lineHeight),h-=g,d+=p,d-h>a){if(!c)return-1;u=h}else if(5===s||6===s)if(6===s&&r<=h&&d<=l)u=r;else{const e=h-Math.max(5*this._lineHeight,.2*a),t=d-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=h&&d<=l)u=r;else{const e=(h+d)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,h,d,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(138),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(s=Math.max(0,s-Mt.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,o,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)<r?o?i:s?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e:i}}Mt.HORIZONTAL_EXTRA_PX=30;class Rt extends wt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(138);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(138);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.linesDecorationsClassName;s&&(i[n++]=new yt(o.range.startLineNumber,o.range.endLineNumber,s));const r=o.options.firstLineDecorationClassName;r&&(i[n++]=new yt(o.range.startLineNumber,o.range.startLineNumber,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let a="";for(let e=0,t=r.length;e<t;e++)a+='<div class="cldr '+r[e]+o;s[i]=a}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class Ot extends wt{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.marginClassName;s&&(i[n++]=new yt(o.range.startLineNumber,o.range.endLineNumber,s))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let r="";for(let e=0,t=s.length;e<t;e++)r+='<div class="cmdr '+s[e]+'" style=""></div>';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var Pt=i(93911);class Ft{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ft._clamp(e),this.g=Ft._clamp(t),this.b=Ft._clamp(i),this.a=Ft._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}Ft.Empty=new Ft(0,0,0,0);class Bt extends u.JT{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,u.dk)(new Bt)),this._INSTANCE}constructor(){super(),this._onDidChange=new d.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(qe.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=qe.RW.getColorMap();if(!e)return this._colors=[Ft.Empty],void(this._backgroundIsLight=!0);this._colors=[Ft.Empty];for(let t=1;t<e.length;t++){const i=e[t].rgba;this._colors[t]=new Ft(i.r,i.g,i.b,Math.round(255*i.a))}const t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Bt._INSTANCE=null;var Ht=i(1118),Wt=i(73910);const Vt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var zt=i(85427);class Ut{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Ut.soften(e,.8),this.charDataLight=Ut.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=(0,zt.K)(e[n]*t);return i}renderChar(e,t,i,n,o,s,r,a,l,c,h){const d=1*this.scale,u=2*this.scale,g=h?1:u;if(t+d>e.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,C=o.r-_,y=o.g-v,w=o.b-b,S=Math.max(s,a),k=e.data;let x=m*d*u,L=i*f+4*t;for(let e=0;e<g;e++){let e=L;for(let t=0;t<d;t++){const t=p[x++]/255*(s/255);k[e++]=_+C*t,k[e++]=v+y*t,k[e++]=b+w*t,k[e++]=S}L+=f}}blockRenderChar(e,t,i,n,o,s,r,a){const l=1*this.scale,c=2*this.scale,h=a?1:c;if(t+l>e.width||i+h>e.height)return void console.warn("bad render request outside image data");const d=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),C=e.data;let y=i*d+4*t;for(let e=0;e<h;e++){let e=y;for(let t=0;t<l;t++)C[e++]=f,C[e++]=_,C[e++]=v,C[e++]=b;y+=d}}}var jt=i(88289);const Kt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},qt=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=Kt[e[i]]<<4|15&Kt[e[i+1]];return t},$t={1:(0,jt.I)((()=>qt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,jt.I)((()=>qt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class Gt{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=$t[e]?new Ut($t[e](),e):Gt.createFromSampleData(Gt.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of Vt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=Gt._downsample(e,t);return new Ut(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n<r;n++){const o=n/r*16,c=(n+1)/r*16;for(let n=0;n<s;n++){const r=n/s*10,h=(n+1)/s*10;let d=0,u=0;for(let i=o;i<c;i++){const n=t+3840*Math.floor(i),o=1-(i-Math.floor(i));for(let t=r;t<h;t++){const i=1-(t-Math.floor(t)),s=n+4*Math.floor(t),r=i*o;u+=r,d+=e[s]*e[s+3]/255*r}}const g=d/u;l=Math.max(l,g),i[a++]=(0,zt.K)(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,o=new Uint8ClampedArray(n);let s=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,o,s,t)),s+=i,r+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)o[t]*=e}return o}}var Qt=i(84973);class Yt{constructor(e,t,i){const n=e.options,o=n.get(136),s=n.get(138),r=s.minimap,a=n.get(47),l=n.get(69);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(99),this.paddingTop=n.get(80).top,this.paddingBottom=n.get(80).bottom,this.showSlider=l.showSlider,this.autohide=l.autohide,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(63),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=s.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,jt.I)((()=>Gt.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Yt._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Yt._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Wt.kVY);return i?new Ft(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Wt.Itd);return t?Ft._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Zt{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,o,s,r,a,l,c,h){const d=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(c-o),h=l*s,d=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new Zt(l,c,d,s,h,i,g,1,Math.min(r,u))}let m;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/d)}else{const e=o/p;m=Math.floor(e*u/d)}const f=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;v=Math.max(v,e-1)}_=v>0?(f+r+v-o/p-1)*u/d:Math.max(0,(f+r)*u/d-m),_=Math.min(e.minimapHeight-m,_);const b=_/(c-o),C=l*b;if(g>=f+r+v)return new Zt(l,c,_>0,b,C,m,f,1,r);{let i,o;i=t>1?t+f:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-C*d/u));s<f?(o=f-s+1,s=1):(o=0,s=Math.max(1,s-f)),h&&h.scrollHeight===c&&(h.scrollTop>l&&(s=Math.min(s,h.startLineNumber),o=Math.max(o,h.topPaddingLineCount)),h.scrollTop<l&&(s=Math.max(s,h.startLineNumber),o=Math.min(o,h.topPaddingLineCount)));const a=Math.min(r,s-o+g-1),_=(l-n)/p;let v;return v=l>e.paddingTop?(t-s+o+_)*u/d:l/e.paddingTop*(o+_)*u/d,new Zt(l,c,!0,b,v,m,o,s,a)}}}class Xt{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Xt.INVALID=new Xt(-1);class Jt{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new nt((()=>Xt.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class ei{constructor(e,t,i,n){this._backgroundFillData=ei._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,o=i.g,s=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4);let l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=o,a[l+2]=s,a[l+3]=r,l+=4;return a}}class ti{static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const{minimapLineCount:n}=x.gk.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),o=t/n,s=o/2;if(!i||0===i.minimapLines.length){const e=[];if(e[0]=1,n>1){for(let t=0,i=n-1;t<i;t++)e[t]=Math.round(t*o+s);e[n-1]=t}return[new ti(o,e),[]]}const r=i.minimapLines,a=r.length,l=[];let c=0,h=0,d=1,u=[],g=null;for(let e=0;e<n;e++){const i=Math.max(d,Math.round(e*o)),p=Math.max(i,Math.round((e+1)*o));for(;c<a&&r[c]<i;){if(u.length<10){const e=c+1+h;g&&"deleted"===g.type&&g._oldIndex===c-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:c,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),h--}c++}let m;if(c<a&&r[c]<=p)m=r[c],c++;else if(m=0===e?1:e+1===n?t:Math.round(e*o+s),u.length<10){const t=c+1+h;g&&"inserted"===g.type&&g._i===e-1?g.insertToLineNumber++:(g={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},u.push(g)),h++}l[e]=m,d=m}if(u.length<10)for(;c<a;){const e=c+1+h;g&&"deleted"===g.type&&g._oldIndex===c-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:c,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),h--,c++}else u=[{type:"flush"}];return[new ti(o,l),u]}constructor(e,t){this.samplingRatio=e,this.minimapLines=t}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]<e.fromLineNumber);o--)this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),n=Math.max(n,o)):this.minimapLines[o]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class ii extends z{constructor(e){super(e),this.tokensColorTracker=Bt.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Yt(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=ti.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new ni(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new Yt(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return!!t&&this._actual.onLinesChanged(t[0],t[1]-t[0]+1)}return this._actual.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i-t+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){const t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=ti.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o<s;o++)i[o]?n[o]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+o-1]):n[o]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new P.Y(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new de.e(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new de.e(e,1,t,this._context.viewModel.getLineMaxColumn(t));const n=this._context.viewModel.getDecorationsInViewport(i,!0);if(this._samplingState){const e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new Ht.$l(new de.e(n,i.startColumn,o,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new de.e(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class ni extends u.JT{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Wt.ov3),this._domNode=(0,F.X)(document.createElement("div")),U.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,F.X)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,F.X)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,F.X)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,F.X)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,F.X)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=c.mu(this._domNode.domNode,c.tw.POINTER_DOWN,(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=c.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new Pt.C,this._sliderPointerDownListener=c.mu(this._slider.domNode,c.tw.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=B.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=c.nm(this._domNode.domNode,B.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=c.nm(this._domNode.domNode,B.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=c.mu(this._domNode.domNode,B.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const o=(e,o)=>{const s=c.i(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(_.ED&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ei(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Wt.ov3),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Zt.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(de.e.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new oi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,s),this._renderDecorationsLineHighlights(l,i,c,e,s);const h=new oi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,h,e,s,a,r,n),this._renderDecorationsHighlights(l,i,h,e,s,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,c]=t;for(let e=l;e<=c;e++)i.set(e,!0);const h=n.getYForLineNumber(l,o),d=n.getYForLineNumber(c,o);r>=h||(r>s&&e.fillRect(x.y0,s,e.canvas.width,r-s),s=h),r=d}r>s&&e.fillRect(x.y0,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==Qt.F5.Inline)continue;const c=n.intersectWithViewport(a.range);if(!c)continue;const[h,d]=c,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=s.get(u.toString());g||(g=u.transparent(.5).toString(),s.set(u.toString(),g)),e.fillStyle=g;for(let t=h;t<=d;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(h,o);e.fillRect(x.y0,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[c,h]=t;for(let t=c;t<=h;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[h,d]=c,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let c=h;c<=d;c++)switch(t.position){case Qt.F5.Inline:this.renderDecorationOnLine(e,i,l.range,u,n,c,o,o,s,r,a);continue;case Qt.F5.Gutter:{const t=n.getYForLineNumber(c,o),i=2;this.renderDecoration(e,u,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,c,h){const d=o.getYForLineNumber(s,a);if(d+r<0||d>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,c,h),_=this.getXOffsetForPosition(t,s,m,l,c,h);this.renderDecoration(e,n,f,d,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return x.y0;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[x.y0];let a=x.y0;for(let e=1;e<i.length+1;e++){const t=i.charCodeAt(e-1),l=a+(9===t?n*o:Pe.K7(t)?2*o:o);if(l>=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:s}renderDecoration(e,t,i,n,o,s){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,s)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Jt(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[s,r,a]=ni._renderUntouchedLines(o,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,d=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,y=d.a/255,w=new Ft(Math.round((d.r-h.r)*y+h.r),Math.round((d.g-h.g)*y+h.g),Math.round((d.b-h.b)*y+h.b),255);let S=e.topPaddingLineCount*n;const k=[];for(let e=0,s=i-t+1;e<s;e++)a[e]&&ni._renderLine(o,w,d.a,p,m,v,g,u,f,S,C,c,l[e],_,n),k[e]=new Xt(S),S+=n;const x=-1===s?0:s,L=(-1===r?o.height:r)-x;return this._canvas.domNode.getContext("2d").putImageData(o,0,0,0,x,o.width,L),new Jt(e,o,k)}static _renderUntouchedLines(e,t,i,n,o,s){const r=[];if(!s){for(let e=0,t=n-i+1;e<t;e++)r[e]=!0;return[-1,-1,r]}const a=s._get(),l=a.imageData.data,c=a.rendLineNumberStart,h=a.lines,d=h.length,u=e.width,g=e.data,p=(n-i+1)*o*u*4;let m=-1,f=-1,_=-1,v=-1,b=-1,C=-1,y=t*o;for(let e=i;e<=n;e++){const t=e-i,n=e-c,s=n>=0&&n<d?h[n].dy:-1;if(-1===s){r[t]=!0,y+=o;continue}const a=s*u*4,w=(s+o)*u*4,S=y*u*4,k=(y+o)*u*4;v===a&&C===S?(v=w,C=k):(-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),_=a,v=w,b=S,C=k),r[t]=!1,y+=o}return-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),[-1===m?-1:m/(4*u),-1===f?-1:f/(4*u),r]}static _renderLine(e,t,i,n,o,s,r,a,l,c,h,d,u,g,p){const m=u.content,f=u.tokens,_=e.width-s,v=1===p;let b=x.y0,C=0,y=0;for(let u=0,p=f.getCount();u<p;u++){const p=f.getEndOffset(u),w=f.getForeground(u),S=r.getColor(w);for(;C<p;C++){if(b>_)return;const r=m.charCodeAt(C);if(9===r){const e=d-(C+y)%d;y+=e-1,b+=e*s}else if(32===r)b+=s;else{const d=Pe.K7(r)?2:1;for(let u=0;u<d;u++)if(2===o?l.blockRenderChar(e,b,c+h,S,a,t,i,v):l.renderChar(e,b,c+h,r,S,a,t,i,g,n,v),b+=s,b>_)return}}}}}class oi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class si extends z{constructor(e){super(e);const t=this._context.configuration.options.get(138);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,F.X)(document.createElement("div")),U.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(138);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,F.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.setTop("")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._renderWidget(this._widgets[i])}}}class ri{constructor(e,t){const i=e.options;this.lineHeight=i.get(63),this.pixelRatio=i.get(136),this.overviewRulerLanes=i.get(79),this.renderBorder=i.get(78);const n=t.getColor(Ve.zw);this.borderColor=n?n.toString():null,this.hideCursor=i.get(56);const o=t.getColor(Ve.n0);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const s=i.get(69),r=s.enabled,a=s.side,l=t.getColor(Ve.e_),c=qe.RW.getDefaultBackground();this.backgroundColor=l||(r&&"right"===a?c:null);const h=i.get(138).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,u]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=u}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&$e.Il.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class ai extends z{constructor(e){super(e),this._domNode=(0,F.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=qe.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new ri(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(he.L.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?$e.Il.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");this._domNode.setDisplay("block");const t=this._settings.canvasWidth,i=this._settings.canvasHeight,n=this._settings.lineHeight,o=this._context.viewLayout,s=i/this._context.viewLayout.getScrollHeight(),r=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=a/2|0,c=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(c.fillStyle=$e.Il.Format.CSS.formatHexA(e),c.fillRect(0,0,t,i)):(c.clearRect(0,0,t,i),c.fillStyle=$e.Il.Format.CSS.formatHexA(e),c.fillRect(0,0,t,i)):c.clearRect(0,0,t,i);const h=this._settings.x,d=this._settings.w;r.sort(Ht.SQ.cmp);for(const e of r){const t=e.color,r=e.data;c.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=r.length/3;e<t;e++){const t=r[3*e],m=r[3*e+1],f=r[3*e+2];let _=o.getVerticalOffsetForLineNumber(m)*s|0,v=(o.getVerticalOffsetForLineNumber(f)+n)*s|0;if(v-_<a){let e=(_+v)/2|0;e<l?e=l:e+l>i&&(e=i-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&c.fillRect(h[u],g,d[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}c.fillRect(h[u],g,d[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,t=e/2|0,n=this._settings.x[7],r=this._settings.w[7];c.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let h=0,d=this._cursorPositions.length;h<d;h++){const d=this._cursorPositions[h];let u=o.getVerticalOffsetForLineNumber(d.lineNumber)*s|0;u<t?u=t:u+t>i&&(u=i-t);const g=u-t,p=g+e;g>l+1?(0!==h&&c.fillRect(n,a,r,l-a),a=g,l=p):p>l&&(l=p)}c.fillRect(n,a,r,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,i),c.stroke(),c.moveTo(0,0),c.lineTo(t,0),c.stroke())}}var li=i(30665);class ci extends V{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,F.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new li.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(63)),this._zoneManager.setPixelRatio(i.get(136)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(63)&&(this._zoneManager.setLineHeight(t.get(63)),this._render()),e.hasChanged(136)&&(this._zoneManager.setPixelRatio(t.get(136)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}class hi extends z{constructor(e){super(e),this.domNode=(0,F.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(96),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(96),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:i}=this._context.viewModel.model.getOptions(),n=i;let o=t-e;for(;o>0;){const e=(0,F.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}class di extends z{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(97);this._useShadows=t.useShadows,this._domNode=(0,F.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(138);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(97);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class ui{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class gi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function pi(e){return new ui(e)}function mi(e){return new gi(e.lineNumber,e.ranges.map(pi))}class fi extends He{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(63),this._roundedSelection=t.get(95),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(63),this._roundedSelection=t.get(95),this._typicalHalfwidthCharacterWidth=t.get(47).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e<i.length;e++)i[e].lineNumber===n&&(o=i[e].ranges[0]);const r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!s&&e>=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e<i;e++){const r=t[e].ranges[0],a=r.left,l=r.left+r.width,c={top:0,bottom:0},h={top:0,bottom:0};if(e>0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;_i(a-i)<n?c.top=2:a>i&&(c.top=1),_i(l-o)<n?h.top=2:i<l&&l<o&&(h.top=1)}else o&&(c.top=o.startStyle.top,h.top=o.endStyle.top);if(e+1<i){const i=t[e+1].ranges[0].left,o=t[e+1].ranges[0].left+t[e+1].ranges[0].width;_i(a-i)<n?c.bottom=2:i<a&&a<o&&(c.bottom=1),_i(l-o)<n?h.bottom=2:l<o&&(h.bottom=1)}else s&&(c.bottom=s.startStyle.bottom,h.bottom=s.endStyle.bottom);r.startStyle=c,r.endStyle=h}}_getVisibleRangesWithStyle(e,t,i){const n=(t.linesVisibleRangesForRange(e,!0)||[]).map(mi);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,h=n.length;c<h;c++){const h=n[c],d=h.lineNumber,u=d-t,g=!i||d!==l&&d!==a?s:r,p=i&&d===a?1:0;let m="",f="";for(let e=0,t=h.ranges.length;e<t;e++){const t=h.ranges[e];if(o){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(p,g,fi.SELECTION_CLASS_NAME,t.left-fi.ROUNDED_PIECE_WIDTH,fi.ROUNDED_PIECE_WIDTH);let i=fi.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+fi.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+fi.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(p,g,i,t.left-fi.ROUNDED_PIECE_WIDTH,fi.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(p,g,fi.SELECTION_CLASS_NAME,t.left+t.width,fi.ROUNDED_PIECE_WIDTH);let e=fi.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+fi.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+fi.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(p,g,e,t.left+t.width,fi.ROUNDED_PIECE_WIDTH)}}let i=fi.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+fi.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+fi.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+fi.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+fi.SELECTION_BOTTOM_RIGHT)}f+=this._createSelectionPiece(p,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=f}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];const o=[];for(let n=0,s=this._selections.length;n<s;n++){const s=this._selections[n];if(s.isEmpty()){o[n]=null;continue}const r=this._getVisibleRangesWithStyle(s,e,this._previousFrameVisibleRangesWithStyle[n]);o[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function _i(e){return e<0?-e:e}fi.SELECTION_CLASS_NAME="selected-text",fi.SELECTION_TOP_LEFT="top-left-radius",fi.SELECTION_BOTTOM_LEFT="bottom-left-radius",fi.SELECTION_TOP_RIGHT="top-right-radius",fi.SELECTION_BOTTOM_RIGHT="bottom-right-radius",fi.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",fi.ROUNDED_PIECE_WIDTH=10,(0,We.Ic)(((e,t)=>{const i=e.getColor(Wt.yb5);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class vi{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}class bi{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(47);this._cursorStyle=t.get(25),this._lineHeight=t.get(63),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(28),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,F.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Ke.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,Fe.N)(this._domNode,i),this._domNode.setDisplay("none"),this._position=new he.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(47);return this._cursorStyle=t.get(25),this._lineHeight=t.get(63),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(28),this._typicalHalfwidthCharacterWidth),(0,Fe.N)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=Pe.J_(i,t-1);return[new he.L(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===x.d2.Line||this._cursorStyle===x.d2.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;let r;this._cursorStyle===x.d2.Line?(r=c.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),r>2&&(t=o,i=this._getTokenClassName(n))):r=c.Uh(1);let a=s.left,l=0;r>=2&&a>=1&&(l=1,a-=l);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new vi(h,a,l,r,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new de.e(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],l="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===x.d2.Block&&(t=o,i=this._getTokenClassName(n));let h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==x.d2.Underline&&this._cursorStyle!==x.d2.UnderlineThin||(h+=this._lineHeight-2,d=2),new vi(h,a.left,0,l,d,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Ke.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class Ci extends z{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(86),this._cursorBlinking=t.get(23),this._cursorStyle=t.get(25),this._cursorSmoothCaretAnimation=t.get(24),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new bi(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,F.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Dt._F,this._cursorFlatBlinkInterval=new Dt.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(86),this._cursorBlinking=t.get(23),this._cursorStyle=t.get(25),this._cursorSmoothCaretAnimation=t.get(24),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t,i){const n=this._secondaryCursors.length!==t.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==i;if(this._primaryCursor.onCursorPositionChanged(e,n),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new bi(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e],n)}onCursorStateChanged(e){const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),e.reason);const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet((()=>{this._isVisible?this._hide():this._show()}),Ci.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),Ci.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case x.d2.Line:e+=" cursor-line-style";break;case x.d2.Block:e+=" cursor-block-style";break;case x.d2.Underline:e+=" cursor-underline-style";break;case x.d2.LineThin:e+=" cursor-line-thin-style";break;case x.d2.BlockOutline:e+=" cursor-block-outline-style";break;case x.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){const t=[];let i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,o=this._secondaryCursors.length;n<o;n++){const o=this._secondaryCursors[n].render(e);o&&(t[i++]=o)}this._renderData=t}getLastRenderData(){return this._renderData}}Ci.BLINK_INTERVAL=500,(0,We.Ic)(((e,t)=>{const i=e.getColor(Ve.n0);if(i){let n=e.getColor(Ve.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),(0,J.c3)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const yi=()=>{throw new Error("Invalid change accessor")};class wi extends z{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(138);this._lineHeight=t.get(63),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,F.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,F.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o<s;o++){const s=n[o],r=this._zones[s],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;const l=t.get(s);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(s,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}})),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);return this._lineHeight=t.get(63),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(63)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return void 0!==e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new he.L(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity),o=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!o,afterViewLineNumber:n.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace((i=>{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{e(t)}catch(e){(0,h.dL)(e)}}(e,n),n.addZone=yi,n.removeZone=yi,n.layoutZone=yi})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,F.X)(t.domNode),marginDomNode:t.marginDomNode?(0,F.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,h.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,h.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;t<n;t++){const n=o[t],s=this._zones[n];let r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",s.isVisible||(s.domNode.setAttribute("monaco-visible-view-zone","true"),s.isVisible=!0),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(s.isVisible&&(s.domNode.removeAttribute("monaco-visible-view-zone"),s.isVisible=!1),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),s.domNode.setTop(r),s.domNode.setHeight(a),s.domNode.setDisplay(l),s.marginDomNode&&(s.marginDomNode.setTop(r),s.marginDomNode.setHeight(a),s.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}class Si{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class ki{constructor(e,t,i){this.configuration=e,this.theme=new Si(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}class xi{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new de.e(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Li extends z{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.domNode=(0,F.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options.get(138),i=t.contentWidth-t.verticalScrollbarWidth;return this.contentWidth!==i&&(this.contentWidth=i,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let i,o,s=this.blocks[t];s||(s=this.blocks[t]=(0,F.X)(document.createElement("div")),this.domNode.appendChild(s)),n.options.blockIsAfterEnd?(i=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),o=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(i=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),o=n.range.isEmpty()?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)),s.setClassName("blockDecorations-block "+n.options.blockClassName),s.setLeft(e.scrollLeft),s.setWidth(this.contentWidth),s.setTop(i),s.setHeight(o-i),t++}for(let e=t;e<this.blocks.length;e++)this.blocks[e].domNode.remove();this.blocks.length=t}}var Ei=i(50795);class Ni extends He{constructor(e){super(),this._context=e,this._options=new Di(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=new Di(this._context.configuration);return this._options.equals(t)?e.hasChanged(138):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if("none"===this._options.renderWhitespace)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber-t+1,n=new Array(i);for(let e=0;e<i;e++)n[e]=!0;const o=this._context.viewModel.getMinimapLinesRenderingData(e.viewportData.startLineNumber,e.viewportData.endLineNumber,n);this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){const i=t-e.viewportData.startLineNumber,n=o.data[i];let s=null;if("selection"===this._options.renderWhitespace){const e=this._selection;for(const i of e){if(i.endLineNumber<t||i.startLineNumber>t)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,o=i.endLineNumber===t?i.endColumn:n.maxColumn;e<o&&(s||(s=[]),s.push(new X.zG(e-1,o-1)))}}this._renderResult[i]=this._applyRenderWhitespace(e,t,s,n)}}_applyRenderWhitespace(e,t,i,n){if("selection"===this._options.renderWhitespace&&!i)return"";if("trailing"===this._options.renderWhitespace&&n.continuesWithWrappedLine)return"";const o=this._context.theme.getColor(Ve.dI),s=this._options.renderWithSVG,r=n.content,a=-1===this._options.stopRenderingLineAfter?r.length:Math.min(this._options.stopRenderingLineAfter,r.length),l=n.continuesWithWrappedLine,c=n.minColumn-1,h="boundary"===this._options.renderWhitespace,d="trailing"===this._options.renderWhitespace,u=this._options.lineHeight,g=this._options.middotWidth,p=this._options.wsmiddotWidth,m=this._options.spaceWidth,f=Math.abs(p-m)<Math.abs(g-m)?11825:183,_=this._options.canUseHalfwidthRightwardsArrow;let v,b="",C=!1,y=Pe.LC(r);-1===y?(C=!0,y=a,v=a):v=Pe.ow(r);let w=0,S=i&&i[w],k=0;for(let n=c;n<a;n++){const o=r.charCodeAt(n);if(S&&n>=S.endOffset&&(w++,S=i&&i[w]),9!==o&&32!==o)continue;if(d&&!C&&n<=v)continue;if(h&&n>=y&&n<=v&&32===o){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1<a?r.charCodeAt(n+1):0;if(32!==e&&32!==t)continue}if(h&&l&&n===a-1){const e=n-1>=0?r.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const c=e.visibleRangeForPosition(new he.L(t,n+1));c&&(s?(k=Math.max(k,c.left),b+=9===o?this._renderArrow(u,m,c.left):`<circle cx="${(c.left+m/2).toFixed(2)}" cy="${(u/2).toFixed(2)}" r="${(m/7).toFixed(2)}" />`):b+=9===o?`<div class="mwh" style="left:${c.left}px;height:${u}px;">${_?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:`<div class="mwh" style="left:${c.left}px;height:${u}px;">${String.fromCharCode(f)}</div>`)}return s?(k=Math.round(k+m),`<svg style="position:absolute;width:${k}px;height:${u}px" viewBox="0 0 ${k} ${u}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+b+"</svg>"):b}_renderArrow(e,t,i){const n=e/2,o=i,s={x:0,y:t/7/2},r={x:.8*t,y:s.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},c={x:l.x+.35*r.x,y:l.y-.35*r.x};return`<path d="M ${[s,r,a,l,c,{x:c.x,y:-c.y},{x:l.x,y:-l.y},{x:a.x,y:-a.y},{x:r.x,y:-r.y},{x:s.x,y:-s.y}].map((e=>`${(o+e.x).toFixed(2)} ${(n+e.y).toFixed(2)}`)).join(" L ")}" />`}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Di{constructor(e){const t=e.options,i=t.get(47),n=t.get(35);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(93),this.renderWithSVG=!0):(this.renderWhitespace=t.get(93),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(63),this.stopRenderingLineAfter=t.get(111)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Ti extends V{constructor(e,t,i,n,o,s){super(),this._selections=[new P.Y(1,1,1,1)],this._renderAnimationFrame=null;const r=new Je(t,n,o,e);this._context=new ki(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new Ze(this._context,r,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,F.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,F.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,F.X)(document.createElement("div")),U.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Ct(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Mt(this._context,this._linesContent),this._viewZones=new wi(this._context),this._viewParts.push(this._viewZones);const a=new ai(this._context);this._viewParts.push(a);const l=new di(this._context);this._viewParts.push(l);const c=new lt(this._context);this._viewParts.push(c),c.addDynamicOverlay(new _t(this._context)),c.addDynamicOverlay(new fi(this._context)),c.addDynamicOverlay(new Et(this._context)),c.addDynamicOverlay(new bt(this._context)),c.addDynamicOverlay(new Ni(this._context));const h=new ct(this._context);this._viewParts.push(h),h.addDynamicOverlay(new vt(this._context)),h.addDynamicOverlay(new St(this._context)),h.addDynamicOverlay(new Ot(this._context)),h.addDynamicOverlay(new Rt(this._context)),h.addDynamicOverlay(new ze(this._context));const d=new Ue(this._context);d.getDomNode().appendChild(this._viewZones.marginDomNode),d.getDomNode().appendChild(h.getDomNode()),this._viewParts.push(d),this._contentWidgets=new ht(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Ci(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new si(this._context),this._viewParts.push(this._overlayWidgets);const u=new hi(this._context);this._viewParts.push(u);const g=new Li(this._context);this._viewParts.push(g);const p=new ii(this._context);if(this._viewParts.push(p),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(p.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),s?s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Oe(this._context,r,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){Ei.B.onRenderStart(),this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new fe(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new he.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(138);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(135)+" "+(0,We.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=c.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){(0,h.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!c.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new xi(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new j(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.tokenizeViewport()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new he.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?et.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new ci(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,o,s,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(o=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==o?o:null,null!==(r=null===(s=e.position)||void 0===s?void 0:s.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}var Ii=i(30653),Ai=i(96518),Mi=i(29102),Ri=i(82948),Oi=i(55343);class Pi{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Oi.rS(new de.e(1,1,1,1),0,0,new he.L(1,1),0),new Oi.rS(new de.e(1,1,1,1),0,0,new he.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Oi.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?P.Y.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):P.Y.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new Oi.rS(de.e.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=Pi._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new Oi.rS(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Oi.rS(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Oi.rS(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new he.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new he.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new de.e(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Oi.rS(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class Fi{constructor(e){this.context=e,this.cursors=[new Pi(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,m.VJ)(this.cursors,(0,m.tT)((e=>e.viewState.position),he.L.compare)).viewState.position}getBottomMostViewPosition(){return(0,m.jV)(this.cursors,(0,m.tT)((e=>e.viewState.position),he.L.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Oi.Vi.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(t<i){const e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){const e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.cursors.length-2)}for(let t=0;t<i;t++)this.cursors[t+1].setState(this.context,e[t].modelState,e[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new Pi(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return 1===this.cursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((0,m.tT)((e=>e.selection),de.e.compareRangesUsingStarts));for(let i=0;i<t.length-1;i++){const n=t[i],o=t[i+1],s=n.selection,r=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=r.isEmpty()||s.isEmpty()?r.getStartPosition().isBeforeOrEqual(s.getEndPosition()):r.getStartPosition().isBefore(s.getEndPosition()),a){const s=n.index<o.index?i:i+1,r=n.index<o.index?i+1:i,a=t[r].index,l=t[s].index,c=t[r].selection,h=t[s].selection;if(!c.equalsSelection(h)){const i=c.plusRange(h),n=c.selectionStartLineNumber===c.startLineNumber&&c.selectionStartColumn===c.startColumn,o=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let r,d;a===this.lastAddedCursorIndex?(r=n,this.lastAddedCursorIndex=l):r=o,d=r?new P.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new P.Y(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[s].selection=d;const u=Oi.Vi.fromModelSelection(d);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class Bi{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var Hi=i(29436),Wi=i(51336),Vi=i(14706);class zi{constructor(){this.type=0}}class Ui{constructor(){this.type=1}}class ji{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Ki{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class qi{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class $i{constructor(){this.type=5}}class Gi{constructor(e){this.type=6,this.isFocused=e}}class Qi{constructor(){this.type=7}}class Yi{constructor(){this.type=8}}class Zi{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class Xi{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Ji{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class en{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class tn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class nn{constructor(e){this.theme=e,this.type=14}}class on{constructor(e){this.type=15,this.ranges=e}}class sn{constructor(){this.type=16}}class rn{constructor(){this.type=17}}class an extends u.JT{constructor(){super(),this._onEvent=this._register(new d.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++){const i=this._outgoingEvents[t].kind===e.kind?this._outgoingEvents[t].attemptToMerge(e):null;if(i)return void(this._outgoingEvents[t]=i)}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new ln),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const t of e)this._addOutgoingEvent(t);t.length>0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class ln{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class cn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new cn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class hn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new hn(this.oldHasFocus,e.hasFocus)}}class dn{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new dn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class un{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class gn{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class pn{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0}isNoOp(){return pn._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(e){return e.kind!==this.kind?null:new pn(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class mn{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class fn{constructor(e){this.event=e,this.kind=7}isNoOp(){return!1}attemptToMerge(e){return null}}class _n{constructor(e){this.event=e,this.kind=8}isNoOp(){return!1}attemptToMerge(e){return null}}class vn{constructor(e){this.event=e,this.kind=9}isNoOp(){return!1}attemptToMerge(e){return null}}class bn{constructor(e){this.event=e,this.kind=10}isNoOp(){return!1}attemptToMerge(e){return null}}class Cn{constructor(e){this.event=e,this.kind=11}isNoOp(){return!1}attemptToMerge(e){return null}}class yn{constructor(e){this.event=e,this.kind=12}isNoOp(){return!1}attemptToMerge(e){return null}}class wn extends u.JT{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new Bi(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new Fi(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,u.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new Bi(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let o=!1;const s=this.context.cursorConfig.multiCursorLimit;null!==n&&n.length>s&&(n=n.slice(0,s),o=!0);const r=Sn.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=de.e.fromPositions(r[0],r[0]),e.emitViewEvent(new en(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){const i=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];let o=1,s=1;n.position&&n.position.lineNumber&&(o=n.position.lineNumber),n.position&&n.position.column&&(s=n.position.column);let r=o,a=s;n.selectionStart&&n.selectionStart.lineNumber&&(r=n.selectionStart.lineNumber),n.selectionStart&&n.selectionStart.column&&(a=n.selectionStart.column),i.push({selectionStartLineNumber:r,selectionStartColumn:a,positionLineNumber:o,positionColumn:s})}this.setStates(e,"restoreState",0,Oi.Vi.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,t){if(t instanceof Vi.D8){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const i=t.rawContentChangedEvent;if(this._knownModelVersionId=i.versionId,this._isHandling)return;const n=i.containsEvent(1);if(this._prevEditOperationType=0,n)this._cursors.dispose(),this._cursors=new Fi(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&i.resultingSelection&&i.resultingSelection.length>0){const t=Oi.Vi.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Oi.Vi.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Oi.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o<s;o++)i.push({range:e[o],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[o],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],i),s=this._model.deltaDecorations([],n);this._autoClosedActions.push(new kn(this._model,o,s))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=class{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e<t;e++)n.model._setTrackedRange(n.trackedRanges[e],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,o=this._getLoserCursorMap(n);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const s=[];for(let e=0,t=n.length;e<t;e++)o.hasOwnProperty(n[e].identifier.major.toString())||s.push(n[e]);i.hadTrackedEditOperation&&s.length>0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor,s=[];for(let i=0;i<e.selectionsBefore.length;i++)n[i].length>0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new P.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new P.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(const e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let o=0,s=t.length;o<s;o++){const s=t[o];if(s){const t=this._getEditOperationsFromCommand(e,o,s);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){const n=[];let o=0;const s=(e,s,r=!1)=>{de.e.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=P.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,h.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-de.e.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;i<e.length;i++){const n=e[i-1],o=e[i];if(de.e.getStartPosition(n.range).isBefore(de.e.getEndPosition(o.range))){let s;s=n.identifier.major>o.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===s&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof Wi.g_&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=Sn.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Ki(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new pn(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t<i;t++){const[i,n]=o[t],a=e[t],l=a.range.startLineNumber,c=a.range.startColumn-1+i,h=a.range.startColumn-1+n;s.push(new de.e(l,h+1,l,h+2)),r.push(new de.e(l,c+1,l,h+2))}const t=n(e);return t&&(this._isHandling=!0),t}));a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),s.length>0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=Sn.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,h.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return kn.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Ln(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Wi.u6.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i<e;){const e=Pe.vH(t,i),n=t.substr(i,e);this._executeEditOperation(Wi.u6.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),n)),i+=e}}else this._executeEditOperation(Wi.u6.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))}),e,i)}compositionType(e,t,i,n,o,s){if(0!==t.length||0!==i||0!==n)this._executeEdit((()=>{this._executeEditOperation(Wi.u6.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new P.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(Wi.u6.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(Hi.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Oi.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new Oi.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class Sn{static from(e,t){return new Sn(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class kn{static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let e=0;e<this._autoClosedEnclosingDecorations.length;e++){const i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[e]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(de.e.compareRangesUsingStarts),e.sort(de.e.compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class xn{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class Ln{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new xn(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=Ln._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=Ln._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e<t;e++)n.push(Ln._deduceOutcome(this._original[e],i[e]));return n}static _deduceOutcome(e,t){const i=Math.min(e.startSelection,t.startSelection,Pe.Mh(e.text,t.text)),n=Math.min(e.text.length-e.endSelection,t.text.length-t.endSelection,Pe.P1(e.text,t.text)),o=e.text.substring(i,e.text.length-n),s=t.text.substring(i,t.text.length-n);return new Wi.Nu(o,e.startSelection-i,e.endSelection-i,s,t.startSelection-i,t.endSelection-i)}}var En=i(68801),Nn=i(82963),Dn=i(76633);class Tn{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class In{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class An{constructor(e,t,i,n){this._instanceId=Pe.PJ(++An.INSTANCE_COUNT),this._pendingChanges=new Tn,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n<o;){const s=n+o>>>1;t===e[s].afterLineNumber?i<e[s].ordinal?o=s:n=s+1:t<e[s].afterLineNumber?o=s:n=s+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(e,i,n,o)=>{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new In(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=An.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++)e<=this._arr[i].afterLineNumber&&(this._arr[i].afterLineNumber+=t-e+1)}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._checkPendingChanges(),this._lineHeight*this._lineCount+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=i+((n-i|0)/2|0)|0;if(t[o].afterLineNumber<e){if(o+1>=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t<this._arr.length?t:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e,t=!1){let i;return this._checkPendingChanges(),i=(e|=0)>1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return this._checkPendingChanges(),e>this.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){return 0!==this._paddingBottom&&(this._checkPendingChanges(),e>=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n<o;){const t=(n+o)/2|0,s=0|this.getVerticalOffsetForLineNumber(t);if(e>=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let h=o,d=h;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,d-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){if(-1===f){const t=h,n=h+i;(t<=m&&m<n||t>m)&&(f=e)}for(h+=i,p[e-n]=d,d+=i;c===e;)d+=l,h+=l,r++,r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(h>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return v<b&&o<e&&v++,v<b&&_+i>t&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t<i;){const n=Math.floor((t+i)/2),o=this.getVerticalOffsetForWhitespaceIndex(n);if(e>=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}An.INSTANCE_COUNT=0;class Mn{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Rn extends u.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Mn(0,0,0,0),this._scrollable=this._register(new Dn.Rm({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new cn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class On extends u.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(138),s=n.get(80);this._linesLayout=new An(t,n.get(63),s.top,s.bottom),this._scrollable=this._register(new Rn(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Mn(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(108)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(63)&&this._linesLayout.setLineHeight(t.get(63)),e.hasChanged(80)){const e=t.get(80);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(138)){const e=t.get(138),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new Mn(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(108)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(97);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(99)?o+=Math.max(0,t-n.get(63)-n.get(80).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Mn(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Ht.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Ht.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(139),n=t.get(47),o=t.get(138);if(i.isViewportWrapping){const i=t.get(69);return e>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?e+o.verticalScrollbarWidth:e}{const i=t.get(98)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i+o.verticalScrollbarWidth,s)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Mn(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var Pn=i(30168),Fn=i(77378);function Bn(e,t){return null===e?t?Wn.INSTANCE:Vn.INSTANCE:new Hn(e,t)}class Hn{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Vi.gk(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=Vi.gk.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=Un(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let h,d=null;if(l){d=[];let e=0,t=0;for(let i=0;i<a.getOutputLineCount();i++){const n=new Array;d[i]=n;const o=i>0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;t<l.length;){const r=c[t].content.length,h=l[t]+e,d=h+r;if(h>s)break;if(o<d){const e=c[t];if(e.inlineClassName){const t=i>0?a.wrappedTextIndentLength:0,r=t+Math.max(h-o,0),l=t+Math.min(d-o,s);r!==l&&n.push(new Ht.Wx(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(d<=s))break;e+=r,t++}}}h=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:Fn.A.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e<i+n;e++){const t=o+e-i;s[t]?r[t]=this._getViewLineData(h,d?d[e]:null,e):r[t]=null}}_getViewLineData(e,t,i){this._assertVisible();const n=this._projectionData,o=i>0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=Un(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,h=l.length+1,d=i+1<this.getViewLineCount(),u=0===i?0:n.breakOffsetsVisibleColumn[i-1];return new Ht.IP(l,d,c,h,u,a,t)}getModelColumnOfViewPosition(e,t){return this._assertVisible(),this._projectionData.translateToInputOffset(e,t-1)+1}getViewPositionOfModelPosition(e,t,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(t-1,i).toPosition(e)}getViewLineNumberOfModelPosition(e,t){return this._assertVisible(),e+this._projectionData.translateToOutputPosition(t-1).outputLineIndex}normalizePosition(e,t,i){const n=t.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,t.column-1,i).toPosition(n)}getInjectedTextAt(e,t){return this._projectionData.getInjectedText(e,t-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class Wn{constructor(){}isVisible(){return!0}setVisible(e){return e?this:Vn.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){const n=e.tokenization.getLineTokens(t),o=n.getLineContent();return new Ht.IP(o,!1,1,o.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,o,s,r){s[o]?r[o]=this.getViewLineData(e,t,0):r[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new he.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i){return t}getInjectedTextAt(e,t){return null}}Wn.INSTANCE=new Wn;class Vn{constructor(){}isVisible(){return!1}setVisible(e){return e?Wn.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,s,r){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}Vn.INSTANCE=new Vn;const zn=[""];function Un(e){if(e>=zn.length)for(let t=1;t<=e;t++)zn[t]=jn(t);return zn[e]}function jn(e){return new Array(e+1).join(" ")}var Kn=i(90310);class qn{constructor(e,t,i,n,o,s,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Qn(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new m.H9(Vi.gk.fromDecorations(n));for(let e=0;e<o;e++){const n=r.takeWhile((t=>t.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(de.e.compareRangesUsingStarts);let h=1,d=0,u=-1,g=u+1<c.length?d+1:o+2;for(let e=0;e<o;e++){const t=e+1;t===g&&(u++,h=c[u].startLineNumber,d=c[u].endLineNumber,g=u+1<c.length?d+1:o+2);const i=t>=h&&t<=d,n=Bn(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Kn.Ck(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(de.e.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;e<s;e++){const s=t[e];s.startLineNumber>o+1?(i.push(new de.e(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new de.e(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(de.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}const n=t.map((e=>({range:e,options:Ri.qx.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let s=1,r=0,a=-1,l=a+1<o.length?r+1:this.modelLineProjections.length+2,c=!1;for(let e=0;e<this.modelLineProjections.length;e++){const t=e+1;t===l&&(a++,s=o[a].startLineNumber,r=o[a].endLineNumber,l=a+1<o.length?r+1:this.modelLineProjections.length+2);let i=!1;if(t>=s&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(c=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,c=this.wordBreak===o;if(s&&r&&a&&l&&c)return!1;const h=s&&r&&!a&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let d=null;if(h){d=[];for(let e=0,t=this.modelLineProjections.length;e<t;e++)d[e]=this.modelLineProjections[e].getProjectionData()}return this._constructLines(!1,d),!0}createLineBreaksComputer(){return("advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;const n=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,o=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new Xi(n,o)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const o=t>2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;e<t;e++){const t=Bn(n[e],!o);a.push(t);const i=t.getViewLineCount();r+=i,l[e]=i}return this.modelLineProjections=this.modelLineProjections.slice(0,t-1).concat(a).concat(this.modelLineProjections.slice(t-1)),this.projectedModelLineLineCounts.insertValues(t-1,l),new Ji(s,s+r-1)}onModelLineChanged(e,t,i){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];const n=t-1,o=this.modelLineProjections[n].getViewLineCount(),s=Bn(i,this.modelLineProjections[n].isVisible());this.modelLineProjections[n]=s;const r=this.modelLineProjections[n].getViewLineCount();let a=!1,l=0,c=-1,h=0,d=-1,u=0,g=-1;return o>r?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+r-1,u=c+1,g=u+(o-r)-1,a=!0):o<r?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+o-1,h=c+1,d=h+(r-o)-1,a=!0):(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+r-1),this.projectedModelLineLineCounts.setValue(n,r),[a,l<=c?new Zi(l,c-l+1):null,h<=d?new Ji(h,d):null,u<=g?new Xi(u,g):null]}acceptVersionId(e){this._validModelVersionId=e,1!==this.modelLineProjections.length||this.modelLineProjections[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new $n(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new he.L(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new he.L(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t<s;t++)r.push(new $n(e,t))}if(!t.isVisible()&&s){const t=new he.L(e-1,this.model.getLineMaxColumn(e-1)+1),i=de.e.fromPositions(s,t);o.push(new Gn(i,r)),r=[],s=null}else t.isVisible()&&!s&&(s=new he.L(e,1))}if(s){const e=de.e.fromPositions(s,this.getModelEndPositionOfViewLine(n));o.push(new Gn(e,r))}return o}getViewLinesBracketGuides(e,t,i,n){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,s=[];for(const i of this.getViewLineInfosGroupedByModelRanges(e,t)){const e=i.modelRange.startLineNumber,t=this.model.guides.getLinesBracketGuides(e,i.modelRange.endLineNumber,o,n);for(const n of i.viewLines){const i=t[n.modelLineNumber-e].map((e=>{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumber<n.modelLineWrappedLineIdx)return;if(!e.horizontalLine)return e;let t=-1;if(-1!==e.column){const i=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.column);if(i.lineNumber===n.modelLineWrappedLineIdx)t=i.column;else if(i.lineNumber<n.modelLineWrappedLineIdx)t=this.getMinColumnOfViewLine(n);else if(i.lineNumber>n.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===n.modelLineWrappedLineIdx?new Lt.UO(e.visibleColumn,t,e.className,new Lt.vW(e.horizontalLine.top,i.column),-1,-1):o.lineNumber<n.modelLineWrappedLineIdx||-1!==e.visibleColumn?void 0:new Lt.UO(e.visibleColumn,t,e.className,new Lt.vW(e.horizontalLine.top,this.getMaxColumnOfViewLine(n)),-1,-1)}));s.push(i.filter((e=>!!e)))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let h=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(h=0===n?1:2),s.push(l),r.push(h),null===c&&(c=new he.L(e+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const h=t-e+1,d=new Array(h);let u=0;for(let e=0,t=o.length;e<t;e++){let t=o[e];const i=Math.min(h-u,s[e]),n=r[e];let a;a=2===n?0:1===n?1:i;for(let e=0;e<i;e++)e===a&&(t=0),d[u++]=t}return d}getViewLineContent(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineContent(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineLength(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineLength(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMinColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMaxColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineData(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineData(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.projectedModelLineLineCounts.getIndexOf(e-1);let o=e;const s=n.index,r=n.remainder,a=[];for(let n=s,l=this.model.getLineCount();n<l;n++){const l=this.modelLineProjections[n];if(!l.isVisible())continue;const c=n===s?r:0;let h=l.getViewLineCount()-c,d=!1;if(o+h>t&&(d=!0,h=t-o+1),l.getViewLinesData(this.model,n+1,c,h,o-e,i,a),o+=h,d)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);t<a&&(t=a),t>l&&(t=l);const c=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new he.L(o+1,c)).equals(i)?new he.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new de.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new he.L(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new de.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new he.L(e,t)),o=n.lineNumber,s=n.column;let r=o-1,a=!1;for(;r>0&&!this.modelLineProjections[r].isVisible();)r--,a=!0;if(0===r&&!this.modelLineProjections[r].isVisible())return new he.L(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(r);let c;return c=a?this.modelLineProjections[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1),i):this.modelLineProjections[o-1].getViewPositionOfModelPosition(l,s,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return de.e.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new de.e(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n){const o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new de.e(o.lineNumber,1,s.lineNumber,s.column),t,i,n);let r=[];const a=o.lineNumber-1,l=s.lineNumber-1;let c=null;for(let e=a;e<=l;e++)if(this.modelLineProjections[e].isVisible())null===c&&(c=new he.L(e+1,e===a?o.column:1));else if(null!==c){const o=this.model.getLineMaxColumn(e);r=r.concat(this.model.getDecorationsInRange(new de.e(c.lineNumber,c.column,e,o),t,i,n)),c=null}null!==c&&(r=r.concat(this.model.getDecorationsInRange(new de.e(c.lineNumber,c.column,s.lineNumber,s.column),t,i,n)),c=null),r.sort(((e,t)=>{const i=de.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i}));const h=[];let d=0,u=null;for(const e of r){const t=e.id;u!==t&&(u=t,h[d++]=e)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class $n{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Gn{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Qn{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Yn{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Zn(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Xi(t,i)}onModelLinesInserted(e,t,i,n){return new Ji(t,i)}onModelLineChanged(e,t,i){return[!1,new Zi(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;e<i;e++)n[e]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){const t=this.model.tokenization.getLineTokens(e),i=t.getLineContent();return new Ht.IP(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);const o=[];for(let n=e;n<=t;n++){const t=n-e;o[t]=i[t]?this.getViewLineData(n):null}return o}getDecorationsInRange(e,t,i,n){return this.model.getDecorationsInRange(e,t,i,n)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class Zn{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class Xn extends u.JT{constructor(e,t,i,n,o,s,r,a){if(super(),this.languageConfigurationService=r,this._themeService=a,this.hiddenAreasModel=new to,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new an,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Oi.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new Dt.pY((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new Dt.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Jn.create(this.model),this.model.isTooLargeForTokenization())this._lines=new Yn(this.model);else{const e=this._configuration.options,t=e.get(47),i=e.get(132),s=e.get(139),r=e.get(131),a=e.get(123);this._lines=new qn(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new wn(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new On(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new tn(e)),this._eventDispatcher.emitOutgoingEvent(new dn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new Pn.CU(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Bt.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new sn)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new nn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new de.e(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenization.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Gi(e)),this._eventDispatcher.emitOutgoingEvent(new hn(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new zi)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Ui)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new he.L(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new no(t,this._viewportStart.startLineDelta)}return new no(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(47),s=n.get(132),r=n.get(139),a=n.get(131),l=n.get(123);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new $i),e.emitViewEvent(new Yi),e.emitViewEvent(new qi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(86)&&(this._decorations.reset(),e.emitViewEvent(new qi(null))),e.emitViewEvent(new ji(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Oi.LM.shouldRecreate(t)&&(this.cursorConfig=new Oi.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof Vi.fV?e.rawContentChangedEvent.changes:e.changes,s=e instanceof Vi.fV?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){const i=e.detail[t];let n=e.injectedTexts[t];n&&(n=n.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new m.H9(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new $i),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,c]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Yi),t.emitViewEvent(new qi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Vi.fV&&t.emitOutgoingEvent(new bn(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i<n;i++){const n=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new he.L(n.fromLineNumber,1)).lineNumber,s=this.coordinatesConverter.convertModelPositionToViewPosition(new he.L(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:s}}this._eventDispatcher.emitSingleViewEvent(new on(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitOutgoingEvent(new yn(e))}))),this._register(this.model.onDidChangeLanguageConfiguration((e=>{this._eventDispatcher.emitSingleViewEvent(new Qi),this.cursorConfig=new Oi.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new vn(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Oi.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new _n(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new $i),e.emitViewEvent(new Yi),e.emitViewEvent(new qi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Oi.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Cn(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new qi(e)),this._eventDispatcher.emitOutgoingEvent(new fn(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let o=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(i),o&&(e.emitViewEvent(new $i),e.emitViewEvent(new Yi),e.emitViewEvent(new qi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new gn)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(138),t=this._configuration.options.get(63),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new de.e(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;e<t;e++){const t=i[e].startLineNumber,l=i[e].endLineNumber;l<s||t>a||(s<t&&(n[o++]=new de.e(s,r,t-1,this.model.getLineMaxColumn(t-1))),s=l+1,r=1)}return(s<a||s===a&&r<l)&&(n[o++]=new de.e(s,r,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new de.e(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new de.e(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new he.L(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:o}}reduceRestoreState(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Pe.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Pe.ow(this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e,t=!1){return this._decorations.getDecorationsViewportData(e,t).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const i=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,i)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map((t=>t.toInlineDecoration(e)))]),new Ht.wA(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Ht.ud(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,x.$J)(this._configuration.options)),i=new eo;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(de.e.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===En.bd)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new de.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(47),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===x.hL.fontFamily?r=x.hL.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${x.hL.fontFamily}`),{mode:i,html:`<div style="color: ${s[1]};background-color: ${s[2]};font-family: ${r};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,s)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.tokenization.getLineTokens(e),c=l.getLineContent(),h=e===i?n-1:0,d=e===o?s-1:c.length;a+=""===c?"<br>":(0,Nn.Fq)(c,l.inflate(),t,h,d,r,_.ED)}return a}_getColorMap(){const e=qe.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=$e.Il.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector((n=>this._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new mn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new de.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new en(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new de.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new en(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new en(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new rn),this._eventDispatcher.emitOutgoingEvent(new un))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Jn{static create(e){const t=e._setTrackedRange(null,new de.e(1,1,1,1),1);return new Jn(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new he.L(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new de.e(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class eo{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new Ht.SQ(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class to{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&io(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,o=0;for(;n<e.length&&o<t.length;){const s=e[n],r=t[o];if(s.endLineNumber<r.startLineNumber-1)i.push(e[n++]);else if(r.endLineNumber<s.startLineNumber-1)i.push(t[o++]);else{const e=Math.min(s.startLineNumber,r.startLineNumber),t=Math.max(s.endLineNumber,r.endLineNumber);i.push(new de.e(e,1,t,1)),n++,o++}}for(;n<e.length;)i.push(e[n++]);for(;o<t.length;)i.push(t[o++]);return i}(e,t)),[]);return io(this.ranges,e)||(this.ranges=e),this.ranges}}function io(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].equalsRange(t[i]))return!1;return!0}class no{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;const i=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),n=t.getVerticalOffsetForLineNumber(i.lineNumber);t.setScrollPosition({scrollTop:n+this.startLineDelta},1)}}var oo=i(94565),so=i(38819),ro=i(72065),ao=i(60972),lo=i(59422),co=i(44906),ho=i(35146);class uo{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;e<this.injectionOffsets.length&&i>this.injectionOffsets[e];e++)i<this.injectionOffsets[e]+this.injectionOptions[e].content.length?i=this.injectionOffsets[e]:i-=this.injectionOptions[e].content.length;return i}translateToOutputPosition(e,t=2){let i=e;if(null!==this.injectionOffsets)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n])&&(1===t||e!==this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(e,t=2){let i=0,n=this.breakOffsets.length-1,o=0,s=0;for(;i<=n;){o=i+(n-i)/2|0;const r=this.breakOffsets[o];if(s=o>0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e<s)n=o-1;else{if(!(e>=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new mo(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new mo(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e<this.getOutputLineCount()-1&&t===this.getMaxOutputOffset(e))return new mo(e+1,this.getMinOutputOffset(e+1));return new mo(e,t)}outputPositionToOffsetInInputWithInjections(e,t){return e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&go(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(po(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!go(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!po(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t];)e+=this.injectionOptions[t+1].content.length,t++;return e}if(0===t||3===t){let e=i.offsetInInputWithInjections,t=i.injectedTextIndex;for(;t-1>=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,ho.vE)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;o<t.length;o++){const s=i[o].content.length,r=t[o]+n,a=t[o]+n+s;if(r>e)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function go(e){return null==e||e===Qt.RM.Right||e===Qt.RM.Both}function po(e){return null==e||e===Qt.RM.Left||e===Qt.RM.Both}class mo{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new he.L(e+this.outputLineIndex,this.outputOffset+1)}}class fo{static create(e){return new fo(e.get(127),e.get(126))}constructor(e,t){this.classifier=new _o(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let e=0,h=s.length;e<h;e++){const h=r[e],d=a[e];!d||d.injectionOptions||h?c[e]=yo(this.classifier,s[e],h,t,i,l,n,o):c[e]=Co(this.classifier,d,s[e],t,i,l,n,o)}return vo.length=0,bo.length=0,c}}}}class _o extends co.N{constructor(e,t){super(0);for(let t=0;t<e.length;t++)this.set(e.charCodeAt(t),1);for(let e=0;e<t.length;e++)this.set(t.charCodeAt(e),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let vo=[],bo=[];function Co(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const c="keepAll"===a,h=t.breakOffsets,d=t.breakOffsetsVisibleColumn,u=xo(i,n,o,s,r),g=o-u,p=vo,m=bo;let f=0,_=0,v=0,b=o;const C=h.length;let y=0;if(y>=0){let e=Math.abs(d[y]-b);for(;y+1<C;){const t=Math.abs(d[y+1]-b);if(t>=e)break;e=t,y++}}for(;y<C;){let t=y<0?0:h[y],o=y<0?0:d[y];_>t&&(t=_,o=v);let r=0,a=0,u=0,w=0;if(o<=b){let v=o,C=0===t?0:i.charCodeAt(t-1),y=0===t?0:e.get(C),S=!0;for(let o=t;o<l;o++){const t=o,l=i.charCodeAt(o);let h,d;if(Pe.ZG(l)?(o++,h=0,d=2):(h=e.get(l),d=wo(l,v,n,s)),t>_&&ko(0,y,l,h,c)&&(r=t,a=v),v+=d,v>b){t>_?(u=t,w=v-d):(u=o+1,w=v),v-a>g&&(r=0),S=!1;break}C=l,y=h}if(S){f>0&&(p[f]=h[h.length-1],m[f]=d[h.length-1],f++);break}}if(0===r){let l=o,h=i.charCodeAt(t),d=e.get(h),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let m,f;if(Pe.YK(o)?(n--,m=0,f=2):(m=e.get(o),f=Pe.K7(o)?s:1),l<=b){if(0===u&&(u=t,w=l),l<=b-g)break;if(ko(0,m,h,d,c)){r=t,a=l;break}}l-=f,h=o,d=m}if(0!==r){const e=g-(w-a);if(e<=n){const t=i.charCodeAt(u);let o;o=Pe.ZG(t)?2:wo(t,w,n,s),e-o<0&&(r=0)}}if(p){y--;continue}}if(0===r&&(r=u,a=w),r<=_){const e=i.charCodeAt(_);Pe.ZG(e)?(r=_+2,a=v+2):(r=_+1,a=v+wo(e,v,n,s))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;y<0||y<C&&d[y]<a;)y++;let S=Math.abs(d[y]-b);for(;y+1<C;){const e=Math.abs(d[y+1]-b);if(e>=S)break;S=e,y++}}return 0===f?null:(p.length=f,m.length=f,vo=t.breakOffsets,bo=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function yo(e,t,i,n,o,s,r,a){const l=Vi.gk.applyInjectedText(t,i);let c,h;if(i&&i.length>0?(c=i.map((e=>e.options)),h=i.map((e=>e.column-1))):(c=null,h=null),-1===o)return c?new uo(h,c,[l.length],[],0):null;const d=l.length;if(d<=1)return c?new uo(h,c,[l.length],[],0):null;const u="keepAll"===a,g=xo(l,n,o,s,r),p=o-g,m=[],f=[];let _=0,v=0,b=0,C=o,y=l.charCodeAt(0),w=e.get(y),S=wo(y,0,n,s),k=1;Pe.ZG(y)&&(S+=1,y=l.charCodeAt(1),w=e.get(y),k++);for(let t=k;t<d;t++){const i=t,o=l.charCodeAt(t);let r,a;Pe.ZG(o)?(t++,r=0,a=2):(r=e.get(o),a=wo(o,S,n,s)),ko(0,w,o,r,u)&&(v=i,b=S),S+=a,S>C&&((0===v||S-b>p)&&(v=i,b=S-a),m[_]=v,f[_]=b,_++,C=b+p,v=0),y=o,w=r}return 0!==_||i&&0!==i.length?(m[_]=d,f[_]=S,new uo(h,c,m,f,g)):null}function wo(e,t,i,n){return 9===e?i-t%i:Pe.K7(e)||e<32?n:1}function So(e,t){return t-e%t}function ko(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function xo(e,t,i,n,o){let s=0;if(0!==o){const r=Pe.LC(e);if(-1!==r){for(let i=0;i<r;i++)s+=9===e.charCodeAt(i)?So(s,t):1;const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++)s+=So(s,t);s+n>i&&(s=0)}}return s}var Lo;const Eo=null===(Lo=window.trustedTypes)||void 0===Lo?void 0:Lo.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class No{static create(){return new No}constructor(){}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>function(e,t,i,n,o,s,r){var a;function l(t){const i=r[t];if(i){const n=Vi.gk.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new uo(s,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=l(i);return t}const c=Math.round(n*t.typicalHalfwidthCharacterWidth),h=3===o?2:2===o?1:0,d=Math.round(i*h),u=Math.ceil(t.spaceWidth*d),g=document.createElement("div");(0,Fe.N)(g,t);const p=new it.HT(1e4),m=[],f=[],_=[],v=[],b=[];for(let n=0;n<e.length;n++){const s=Vi.gk.applyInjectedText(e[n],r[n]);let a=0,l=0,h=c;if(0!==o)if(a=Pe.LC(s),-1===a)a=0;else{for(let e=0;e<a;e++)l+=9===s.charCodeAt(e)?i-l%i:1;const e=Math.ceil(t.spaceWidth*l);e+t.typicalFullwidthCharacterWidth>c?(a=0,l=0):h=c-e}const d=s.substr(a),g=Do(d,l,i,h,p,u);m[n]=a,f[n]=l,_[n]=d,v[n]=g[0],b[n]=g[1]}const C=p.build(),y=null!==(a=null==Eo?void 0:Eo.createHTML(C))&&void 0!==a?a:C;g.innerHTML=y,g.style.position="absolute",g.style.top="10000","keepAll"===s?(g.style.wordBreak="keep-all",g.style.overflowWrap="anywhere"):(g.style.wordBreak="inherit",g.style.overflowWrap="break-word"),document.body.appendChild(g);const w=document.createRange(),S=Array.prototype.slice.call(g.children,0),k=[];for(let t=0;t<e.length;t++){const e=To(w,S[t],_[t],v[t]);if(null===e){k[t]=l(t);continue}const i=m[t],n=f[t]+d,o=b[t],s=[];for(let t=0,i=e.length;t<i;t++)s[t]=o[e[t]];if(0!==i)for(let t=0,n=e.length;t<n;t++)e[t]+=i;let a,c;const h=r[t];h?(a=h.map((e=>e.options)),c=h.map((e=>e.column-1))):(a=null,c=null),k[t]=new uo(c,a,e,s,n)}return document.body.removeChild(g),k}(s,e,t,i,n,o,r)}}}function Do(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('<div style="text-indent: -'),o.appendString(e),o.appendString("px; padding-left: "),o.appendString(e),o.appendString("px; box-sizing: border-box; width:")}else o.appendString('<div style="width:');o.appendString(String(n)),o.appendString('px;">');const r=e.length;let a=t,l=0;const c=[],h=[];let d=0<r?e.charCodeAt(0):0;o.appendString("<span>");for(let t=0;t<r;t++){0!==t&&t%16384==0&&o.appendString("</span><span>"),c[t]=l,h[t]=a;const n=d;d=t+1<r?e.charCodeAt(t+1):0;let s=1,u=1;switch(n){case 9:s=i-a%i,u=s;for(let e=1;e<=s;e++)e<s?o.appendCharCode(160):o.appendASCIICharCode(32);break;case 32:32===d?o.appendCharCode(160):o.appendASCIICharCode(32);break;case 60:o.appendString("&lt;");break;case 62:o.appendString("&gt;");break;case 38:o.appendString("&amp;");break;case 0:o.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.appendCharCode(65533);break;default:Pe.K7(n)&&u++,n<32?o.appendCharCode(9216+n):o.appendCharCode(n)}l+=s,a+=u}return o.appendString("</span>"),c[e.length]=l,h[e.length]=a,o.appendString("</div>"),[c,h]}function To(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{Io(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function Io(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||Ao(e,t,i[n],i[n+1]),r=r||Ao(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,c=Ao(e,t,i[l],i[l+1]);Io(e,t,i,n,o,l,c,a),Io(e,t,i,l,c,s,r,a)}function Ao(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var Mo=i(92896),Ro=i(51381),Oo=i(71922);class Po extends u.JT{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new u.b2),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?(0,h.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,Dt.To)((()=>{this._instantiateSome(1)}))),this._register((0,Dt.To)((()=>{this._instantiateSome(2)}))),this._register((0,Dt.To)((()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,Dt.To)((()=>{this._instantiateSome(1)}),50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,h.dL)(e)}}}}var Fo=function(e,t){return function(i,n){t(i,n,e)}};let Bo=0;class Ho{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){(0,u.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Wo=class e extends u.JT{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,r,a,l,u,g,p,m){super(),this.languageConfigurationService=p,this._deliveryQueue=new d.F3,this._contributions=this._register(new Po),this._onDidDispose=this._register(new d.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Vo({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Vo({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new zo(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new zo(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new zo(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new zo(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new zo(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new zo(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new d.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection();const f=Object.assign({},t);let _;this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++Bo,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,f,g)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(138)){const e=t.get(138);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=u,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new Uo(this,this._contextKeyService)),this._register(new jo(this,this._contextKeyService,m)),this._instantiationService=n.createChild(new ao.y([so.i6,this._contextKeyService])),this._modelData=null,this._focusTracker=new Ko(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},_=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const e of o.Uc.getEditorActions()){if(this._actions.has(e.id)){(0,h.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new Ii.p(e.id,e.label,e.alias,(0,kt.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions.set(t.id,t)}const v=()=>!this._configuration.options.get(86)&&this._configuration.options.get(33).enabled;this._register(new c.eg(this._domElement,{onDragEnter:()=>{},onDragOver:e=>{if(!v())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:e=>{return t=this,i=void 0,o=function*(){if(!v())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new D(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ai.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Mo.w.getWordAtPosition(this._modelData.model,this._configuration.options.get(124),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(t,i=!1){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1,i):-1}getTopForPosition(t,i){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,i,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(t,i=!1){return this._modelData?e._getVerticalOffsetAfterPosition(this._modelData,t,1,i):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>de.e.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return ue.i.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!he.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!de.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new de.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!he.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new de.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=P.Y.isISelection(e),n=de.e.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new P.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new de.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!de.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(de.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!P.Y.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e=this._contributions.saveViewState();return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?e.length>0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,h.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel,r=s.getSelection().getStartPosition();s.paste(t,i,n,e);const a=s.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new de.e(r.lineNumber,r.column,a.lineNumber,a.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,h.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(86)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(86)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(86))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new qo(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,x.$J)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,x.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(138)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(138);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(63)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,Fe.N)(e,this._configuration.options.get(47))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount()),e.onBeforeAttached();const i=new Xn(this._id,this._configuration,e,No.create(),fo.create(this._configuration.options),(e=>c.jL(e)),this.languageConfigurationService,this._themeService);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(76),t=l.NC("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(lo.zb.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:l.NC("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i<n;i++)e[i]=t.selections[i].getPosition();const i={position:e[0],secondaryPositions:e.slice(1),reason:t.reason,source:t.source};this._onDidChangeCursorPosition.fire(i);const n={selection:t.selections[0],secondarySelections:t.selections.slice(1),modelVersionId:t.modelVersionId,oldSelections:t.oldSelections,oldModelVersionId:t.oldModelVersionId,source:t.source,reason:t.reason};this._onDidChangeCursorSelection.fire(n);break}case 7:this._onDidChangeModelDecorations.fire(t.event);break;case 8:this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(t.event);break;case 10:this._onDidChangeModelContent.fire(t.event);break;case 11:this._onDidChangeModelOptions.fire(t.event);break;case 12:this._onDidChangeModelTokens.fire(t.event)}})));const[n,o]=this._createView(i);if(o){this._domElement.appendChild(n.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addOverlayWidget(this._overlayWidgets[i])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new Ho(e,i,n,o,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new et(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new Ti(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(t){const i=[{range:new de.e(t.lineNumber,t.column,t.lineNumber,t.column),options:e.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(i),this.revealPosition(t,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};Wo.dropIntoEditorDecorationOptions=Ri.qx.register({description:"workbench-dnd-target",className:"dnd-target"}),Wo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Fo(3,ro.TG),Fo(4,O.$),Fo(5,oo.H),Fo(6,so.i6),Fo(7,We.XE),Fo(8,lo.lT),Fo(9,N.F),Fo(10,Ro.c_),Fo(11,Oo.p)],Wo);class Vo extends u.JT{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new d.Q5(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d.Q5(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class zo extends d.Q5{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Uo extends u.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Mi.u.editorSimpleInput.bindTo(t),this._editorFocus=Mi.u.focus.bindTo(t),this._textInputFocus=Mi.u.textInputFocus.bindTo(t),this._editorTextFocus=Mi.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Mi.u.tabMovesFocus.bindTo(t),this._editorReadonly=Mi.u.readOnly.bindTo(t),this._inDiffEditor=Mi.u.inDiffEditor.bindTo(t),this._editorColumnSelection=Mi.u.columnSelection.bindTo(t),this._hasMultipleSelections=Mi.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Mi.u.hasNonEmptySelection.bindTo(t),this._canUndo=Mi.u.canUndo.bindTo(t),this._canRedo=Mi.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(137)),this._editorReadonly.set(e.get(86)),this._inDiffEditor.set(e.get(58)),this._editorColumnSelection.set(e.get(19))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class jo extends u.JT{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Mi.u.languageId.bindTo(t),this._hasCompletionItemProvider=Mi.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Mi.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Mi.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Mi.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Mi.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Mi.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Mi.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Mi.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Mi.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Mi.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Mi.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Mi.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Mi.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Mi.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Mi.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Mi.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Mi.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Mi.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Mi.u.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===g.lg.walkThroughSnippet)})):this.reset()}}class Ko extends u.JT{constructor(e){super(),this._onChange=this._register(new d.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(c.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}class qo{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}}}const $o=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),Go=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function Qo(e){return $o+encodeURIComponent(e.toString())+Go}const Yo=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Zo=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');(0,We.Ic)(((e,t)=>{const i=e.getColor(Wt.lXJ);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Qo(i)}") repeat-x bottom left; }`);const n=e.getColor(Wt.uoC);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Qo(n)}") repeat-x bottom left; }`);const o=e.getColor(Wt.c63);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Qo(o)}") repeat-x bottom left; }`);const s=e.getColor(Wt.Dut);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return Yo+encodeURIComponent(e.toString())+Zo}(s)}") no-repeat bottom left; }`);const r=e.getColor(Ve.zu);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},84527:(e,t,i)=>{"use strict";i.d(t,{H:()=>m});var n=i(36248),o=i(11640),s=i(56325),r=i(94565),a=i(38819),l=i(72065),c=i(59422),h=i(97781),d=i(31106),u=i(51381),g=i(71922),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.Gm{constructor(e,t,i,n,o,s,r,a,l,c,h,d){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,c,h,d),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([p(3,l.TG),p(4,o.$),p(5,r.H),p(6,a.i6),p(7,h.XE),p(8,c.lT),p(9,d.F),p(10,u.c_),p(11,g.p)],m)},61329:(e,t,i)=>{"use strict";i.d(t,{OY:()=>s,Sj:()=>r,T4:()=>o,Uo:()=>a,hP:()=>l});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition())}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromRange(i,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},10291:(e,t,i)=>{"use strict";i.d(t,{U:()=>d});var n=i(97295),o=i(7988),s=i(24314),r=i(3860),a=i(1615),l=i(51381);const c=Object.create(null);function h(e,t){if(t<=0)return"";c[e]||(c[e]=["",e]);const i=c[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let d=class e{static unshiftIndent(e,t,i,n,s){const r=o.i.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.i.prevIndentTabStop(r,n)/n)}return h("\t",o.i.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,s){const r=o.i.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.i.nextIndentTabStop(r,n)/n)}return h("\t",o.i.nextRenderTabStop(r,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(t,i){const r=this._selection.startLineNumber;let l=this._selection.endLineNumber;1===this._selection.endColumn&&r!==l&&(l-=1);const{tabSize:c,indentSize:d,insertSpaces:u}=this._opts,g=r===l;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(r))&&(this._useLastEditRangeForCursorEndPosition=!0);let h=0,p=0;for(let m=r;m<=l;m++,h=p){p=0;const l=t.getLineContent(m);let f,_=n.LC(l);if((!this._opts.isUnshift||0!==l.length&&0!==_)&&(g||this._opts.isUnshift||0!==l.length)){if(-1===_&&(_=l.length),m>1&&o.i.visibleColumnFromColumn(l,_+1,c)%d!=0&&t.tokenization.isCheapToTokenize(m-1)){const e=(0,a.A)(this._opts.autoIndent,t,new s.e(m-1,t.getLineMaxColumn(m-1),m-1,t.getLineMaxColumn(m-1)),this._languageConfigurationService);if(e){if(p=h,e.appendText)for(let t=0,i=e.appendText.length;t<i&&p<d&&32===e.appendText.charCodeAt(t);t++)p++;e.removeText&&(p=Math.max(0,p-e.removeText));for(let e=0;e<p&&0!==_&&32===l.charCodeAt(_-1);e++)_--}}this._opts.isUnshift&&0===_||(f=this._opts.isUnshift?e.unshiftIndent(l,_+1,c,d,u):e.shiftIndent(l,_+1,c,d,u),this._addEditOperation(i,new s.e(m,1,m,_+1),f),m!==r||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===t.getLineLength(r)&&(this._useLastEditRangeForCursorEndPosition=!0);const e=u?h(" ",d):"\t";for(let o=r;o<=l;o++){const a=t.getLineContent(o);let l=n.LC(a);if((!this._opts.isUnshift||0!==a.length&&0!==l)&&(g||this._opts.isUnshift||0!==a.length)&&(-1===l&&(l=a.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,d);for(let e=0;e<l;e++)if(9===a.charCodeAt(e)){l=e+1;break}this._addEditOperation(i,new s.e(o,1,o,l+1),"")}else this._addEditOperation(i,new s.e(o,1,o,1),e),o!==r||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){const e=t.getInverseEditOperations()[0];return new r.Y(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new r.Y(i.startLineNumber,e,i.endLineNumber,i.endColumn):new r.Y(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}};var u,g;d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(u=2,g=l.c_,function(e,t){g(e,t,u)})],d)},800:(e,t,i)=>{"use strict";i.d(t,{Pe:()=>p,ei:()=>g,wk:()=>l});var n=i(64141),o=i(22075),s=i(63580),r=i(23193),a=i(89872);const l=Object.freeze({id:"editor",order:5,type:"object",title:s.NC("editorConfigurationTitle","Editor"),scope:5}),c=Object.assign(Object.assign({},l),{properties:{"editor.tabSize":{type:"number",default:o.D.tabSize,minimum:1,markdownDescription:s.NC("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:s.NC("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:o.D.insertSpaces,markdownDescription:s.NC("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:o.D.detectIndentation,markdownDescription:s.NC("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:o.D.trimAutoWhitespace,description:s.NC("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:o.D.largeFileOptimizations,description:s.NC("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:s.NC("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[s.NC("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),s.NC("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),s.NC("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:s.NC("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[s.NC("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),s.NC("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),s.NC("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:s.NC("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:s.NC("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:s.NC("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:s.NC("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:s.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:s.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:s.NC("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:s.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:s.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:s.NC("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:s.NC("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:s.NC("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:s.NC("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:s.NC("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:s.NC("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:s.NC("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[s.NC("wordWrap.off","Lines will never wrap."),s.NC("wordWrap.on","Lines will wrap at the viewport width."),s.NC("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["smart","experimental"],default:"smart",markdownEnumDescriptions:[s.NC("diffAlgorithm.smart","Uses the default diffing algorithm."),s.NC("diffAlgorithm.experimental","Uses an experimental diffing algorithm.")]}}});for(const e of n.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(h=t).type||void 0!==h.anyOf)c.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(c.properties[e]=t[e])}var h;let d=null;function u(){return null===d&&(d=Object.create(null),Object.keys(c.properties).forEach((e=>{d[e]=!0}))),d}function g(e){return u()[`editor.${e}`]||!1}function p(e){return u()[`diffEditor.${e}`]||!1}a.B.as(r.IP.Configuration).registerConfiguration(c)},64141:(e,t,i)=>{"use strict";i.d(t,{$J:()=>I,Av:()=>M,BH:()=>H,Bb:()=>h,Bc:()=>F,Bo:()=>N,LJ:()=>d,NY:()=>S,O7:()=>_,Zc:()=>b,d2:()=>L,gk:()=>T,hL:()=>P,n0:()=>E,qt:()=>R,rk:()=>g,y0:()=>c});var n=i(63580),o=i(1432),s=i(270),r=i(9488),a=i(36248),l=i(22075);const c=8;class h{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class d{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&r.fS(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=p(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new g(e,i)}class m{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class f{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class v extends f{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class C extends f{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,o,s){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return C.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class y extends f{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(y.float(e,this.defaultValue))}}class w extends f{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return w.string(e,this.defaultValue)}}function S(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class k extends f{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return S(e,this.defaultValue,this._allowedValues)}}class x extends u{constructor(e,t,i,n,o,s,r){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var L;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(L||(L={}));class E extends u{constructor(){super(48,"fontLigatures",E.OFF,{anyOf:[{type:"boolean",description:n.NC("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n.NC("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n.NC("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?E.OFF:"true"===e?E.ON:e:Boolean(e)?E.ON:E.OFF}}E.OFF='"liga" off, "calt" off',E.ON='"liga" on, "calt" on';class N extends u{constructor(){super(51,"fontVariations",N.OFF,{anyOf:[{type:"boolean",description:n.NC("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:n.NC("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:n.NC("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?N.OFF:"true"===e?N.TRANSLATE:e:Boolean(e)?N.TRANSLATE:N.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}N.OFF="normal",N.TRANSLATE="translate";class D extends u{constructor(){super(50,"fontWeight",P.fontWeight,{anyOf:[{type:"number",minimum:D.MINIMUM_VALUE,maximum:D.MAXIMUM_VALUE,errorMessage:n.NC("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:D.SUGGESTION_VALUES}],default:P.fontWeight,description:n.NC("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(C.clampedInt(e,P.fontWeight,D.MINIMUM_VALUE,D.MAXIMUM_VALUE))}}D.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],D.MINIMUM_VALUE=1,D.MAXIMUM_VALUE=1e3;class T extends m{constructor(){super(138)}compute(e,t,i){return T.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:Math.floor(e.viewLineCount/o)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,C=d?2:3;let y=Math.floor(o*n);const w=y/o;let S=!1,k=!1,x=C*u,L=u/o,E=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:d}=T.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o});if(_/d>1)S=!0,k=!0,u=1,x=1,L=u/o;else{let n=!1,h=u+1;if("fit"===p){const e=Math.ceil((s+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>y}if("fill"===p||n){S=!0;const n=u;x=Math.min(a*o,Math.max(1,Math.floor(1/c))),b&&r&&v<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),u=Math.min(h,Math.max(1,Math.floor(x/C))),u>n&&(E=Math.min(2,u/n)),L=u/o/E,y=Math.ceil(Math.max(i,s+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const N=Math.floor(g*L),D=Math.min(N,Math.max(0,Math.floor((v-f-2)*L/(l+L)))+c);let I=Math.floor(o*D);const A=I/o;return I=Math.floor(I*E),{renderMinimap:d?1:2,minimapLeft:"left"===m?0:i-D-f,minimapWidth:D,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:u,minimapLineHeight:x,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:A,minimapCanvasOuterHeight:w}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,h=e.get(130),u="inherit"===h?e.get(129):h,g="inherit"===u?e.get(125):u,p=e.get(128),m=t.isDominatedByLongLines,f=e.get(54),_=0!==e.get(64).renderType,v=e.get(65),b=e.get(99),C=e.get(80),y=e.get(69),w=e.get(97),S=w.verticalScrollbarSize,k=w.verticalHasArrows,x=w.arrowSize,L=w.horizontalScrollbarSize,E=e.get(40),N="never"!==e.get(104);let D=e.get(62);E&&N&&(D+=16);let I=0;if(_){const e=Math.max(s,v);I=Math.round(e*a)}let A=0;f&&(A=o);let M=0,R=M+A,O=R+I,P=O+D;const F=i-A-I-D;let B=!1,H=!1,W=-1;"inherit"===u&&m?(B=!0,H=!0):"on"===g||"bounded"===g?H=!0:"wordWrapColumn"===g&&(W=p);const V=T._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:C.top,paddingBottom:C.bottom,minimap:y,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:F,isViewportWrapping:H},t.memory||new d);0!==V.renderMinimap&&0===V.minimapLeft&&(M+=V.minimapWidth,R+=V.minimapWidth,O+=V.minimapWidth,P+=V.minimapWidth);const z=F-V.minimapWidth,U=Math.max(1,Math.floor((z-S-2)/r)),j=k?x:0;return H&&(W=Math.max(1,U),"bounded"===g&&(W=Math.min(W,p))),{width:i,height:n,glyphMarginLeft:M,glyphMarginWidth:A,lineNumbersLeft:R,lineNumbersWidth:I,decorationsLeft:O,decorationsWidth:D,contentLeft:P,contentWidth:z,minimap:V,viewportColumn:U,isWordWrapMinified:B,isViewportWrapping:H,wrappingColumn:W,verticalScrollbarWidth:S,horizontalScrollbarHeight:L,overviewRuler:{top:j,width:S,height:n-2*j,right:0}}}}function I(e){const t=e.get(92);return"editable"===t?e.get(86):"on"!==t}function A(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const M="inUntrustedWorkspace",R={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function O(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const P={fontFamily:o.dz?"Menlo, Monaco, 'Courier New', monospace":o.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.dz?12:14,lineHeight:0,letterSpacing:0},F=[];function B(e){return F[e.id]=e,e}const H={acceptSuggestionOnCommitCharacter:B(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n.NC("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:B(new k(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n.NC("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n.NC("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:B(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n.NC("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),n.NC("accessibilitySupport.on","Optimize for usage with a Screen Reader"),n.NC("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:n.NC("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:B(new C(3,"accessibilityPageSize",10,1,1073741824,{description:n.NC("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:B(new w(4,"ariaLabel",n.NC("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:B(new k(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.NC("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n.NC("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n.NC("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:B(new k(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",n.NC("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:n.NC("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:B(new k(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n.NC("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n.NC("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:B(new k(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.NC("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n.NC("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n.NC("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:B(new x(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[n.NC("editor.autoIndent.none","The editor will not insert indentation automatically."),n.NC("editor.autoIndent.keep","The editor will keep the current line's indentation."),n.NC("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n.NC("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n.NC("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n.NC("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:B(new v(10,"automaticLayout",!1)),autoSurround:B(new k(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n.NC("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n.NC("editor.autoSurround.quotes","Surround with quotes but not brackets."),n.NC("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n.NC("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:B(new class extends u{constructor(){const e={enabled:l.D.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:l.D.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:n.NC("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:n.NC("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:B(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.NC("editor.guides.bracketPairs.true","Enables bracket pair guides."),n.NC("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),n.NC("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:n.NC("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.NC("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),n.NC("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),n.NC("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:n.NC("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:n.NC("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:n.NC("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[n.NC("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),n.NC("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),n.NC("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:n.NC("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:O(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:O(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:O(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:B(new v(110,"stickyTabStops",!1,{description:n.NC("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:B(new v(14,"codeLens",!0,{description:n.NC("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:B(new w(15,"codeLensFontFamily","",{description:n.NC("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:B(new C(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:n.NC("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:B(new v(17,"colorDecorators",!0,{description:n.NC("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorsLimit:B(new C(18,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:n.NC("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:B(new v(19,"columnSelection",!1,{description:n.NC("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:B(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(20,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n.NC("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n.NC("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:B(new v(21,"contextmenu",!0)),copyWithSyntaxHighlighting:B(new v(22,"copyWithSyntaxHighlighting",!0,{description:n.NC("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:B(new x(23,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:n.NC("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:B(new k(24,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[n.NC("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),n.NC("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),n.NC("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:n.NC("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:B(new x(25,"cursorStyle",L.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return L.Line;case"block":return L.Block;case"underline":return L.Underline;case"line-thin":return L.LineThin;case"block-outline":return L.BlockOutline;case"underline-thin":return L.UnderlineThin}}),{description:n.NC("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:B(new C(26,"cursorSurroundingLines",0,0,1073741824,{description:n.NC("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:B(new k(27,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n.NC("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n.NC("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n.NC("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:B(new C(28,"cursorWidth",0,0,1073741824,{markdownDescription:n.NC("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:B(new v(29,"disableLayerHinting",!1)),disableMonospaceOptimizations:B(new v(30,"disableMonospaceOptimizations",!1)),domReadOnly:B(new v(31,"domReadOnly",!1)),dragAndDrop:B(new v(32,"dragAndDrop",!0,{description:n.NC("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:B(new class extends v{constructor(){super(34,"emptySelectionClipboard",!0,{description:n.NC("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:B(new class extends u{constructor(){const e={enabled:!0};super(33,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:n.NC("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(e){return e&&"object"==typeof e?{enabled:_(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),stickyScroll:B(new class extends u{constructor(){const e={enabled:!1,maxLineCount:5};super(109,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:n.NC("editor.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:n.NC("editor.stickyScroll.","Defines the maximum number of sticky lines to show.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:C.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10)}}}),experimentalWhitespaceRendering:B(new k(35,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[n.NC("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),n.NC("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),n.NC("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:n.NC("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:B(new w(36,"extraEditorClassName","")),fastScrollSensitivity:B(new y(37,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:n.NC("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:B(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(38,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n.NC("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[n.NC("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),n.NC("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),n.NC("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:n.NC("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n.NC("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),n.NC("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),n.NC("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:n.NC("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n.NC("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n.NC("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n.NC("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":S(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":S(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:B(new v(39,"fixedOverflowWidgets",!1)),folding:B(new v(40,"folding",!0,{description:n.NC("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:B(new k(41,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n.NC("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n.NC("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n.NC("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:B(new v(42,"foldingHighlight",!0,{description:n.NC("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:B(new v(43,"foldingImportsByDefault",!1,{description:n.NC("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:B(new C(44,"foldingMaximumRegions",5e3,10,65e3,{description:n.NC("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:B(new v(45,"unfoldOnClickAfterEndOfLine",!1,{description:n.NC("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:B(new w(46,"fontFamily",P.fontFamily,{description:n.NC("fontFamily","Controls the font family.")})),fontInfo:B(new class extends m{constructor(){super(47)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:B(new E),fontSize:B(new class extends f{constructor(){super(49,"fontSize",P.fontSize,{type:"number",minimum:6,maximum:100,default:P.fontSize,description:n.NC("fontSize","Controls the font size in pixels.")})}validate(e){const t=y.float(e,this.defaultValue);return 0===t?P.fontSize:y.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:B(new D),fontVariations:B(new N),formatOnPaste:B(new v(52,"formatOnPaste",!1,{description:n.NC("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:B(new v(53,"formatOnType",!1,{description:n.NC("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:B(new v(54,"glyphMargin",!0,{description:n.NC("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:B(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n.NC("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),n.NC("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),n.NC("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(55,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n.NC("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n.NC("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n.NC("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n.NC("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n.NC("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n.NC("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:n.NC("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:n.NC("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:n.NC("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:n.NC("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:n.NC("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:S(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:S(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:S(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:S(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:S(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:S(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:w.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:w.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:w.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:w.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:w.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:B(new v(56,"hideCursorInOverviewRuler",!1,{description:n.NC("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:B(new class extends u{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(57,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n.NC("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:n.NC("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n.NC("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:n.NC("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:C.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),above:_(t.above,this.defaultValue.above)}}}),inDiffEditor:B(new v(58,"inDiffEditor",!1)),letterSpacing:B(new y(60,"letterSpacing",P.letterSpacing,(e=>y.clamp(e,-5,20)),{description:n.NC("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:B(new class extends u{constructor(){const e={enabled:!0};super(61,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n.NC("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:_(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:B(new class extends u{constructor(){super(62,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):C.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?C.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:B(new class extends y{constructor(){super(63,"lineHeight",P.lineHeight,(e=>y.clamp(e,0,150)),{markdownDescription:n.NC("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:B(new class extends u{constructor(){super(64,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n.NC("lineNumbers.off","Line numbers are not rendered."),n.NC("lineNumbers.on","Line numbers are rendered as absolute number."),n.NC("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n.NC("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n.NC("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:B(new C(65,"lineNumbersMinChars",5,1,300)),linkedEditing:B(new v(66,"linkedEditing",!1,{description:n.NC("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:B(new v(67,"links",!0,{description:n.NC("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:B(new k(68,"matchBrackets","always",["always","near","never"],{description:n.NC("matchBrackets","Highlight matching brackets.")})),minimap:B(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(69,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n.NC("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:n.NC("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n.NC("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n.NC("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n.NC("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n.NC("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n.NC("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n.NC("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n.NC("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n.NC("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n.NC("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:S(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:S(t.side,this.defaultValue.side,["right","left"]),showSlider:S(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:C.clampedInt(t.scale,1,1,3),maxColumn:C.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:B(new k(70,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:B(new y(71,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:n.NC("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:B(new v(72,"mouseWheelZoom",!1,{markdownDescription:n.NC("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:B(new v(73,"multiCursorMergeOverlapping",!0,{description:n.NC("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:B(new x(74,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[n.NC("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n.NC("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n.NC({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:B(new k(75,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n.NC("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n.NC("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n.NC("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:B(new C(76,"multiCursorLimit",1e4,1,1e5,{markdownDescription:n.NC("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:B(new v(77,"occurrencesHighlight",!0,{description:n.NC("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:B(new v(78,"overviewRulerBorder",!0,{description:n.NC("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:B(new C(79,"overviewRulerLanes",3,0,3)),padding:B(new class extends u{constructor(){super(80,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n.NC("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n.NC("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:C.clampedInt(t.top,0,0,1e3),bottom:C.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:B(new class extends u{constructor(){const e={enabled:!0,cycle:!0};super(81,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n.NC("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n.NC("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:B(new k(82,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n.NC("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n.NC("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n.NC("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:B(new v(83,"definitionLinkOpensInPeek",!1,{description:n.NC("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:B(new class extends u{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[n.NC("on","Quick suggestions show inside the suggest widget"),n.NC("inline","Quick suggestions show as ghost text"),n.NC("off","Quick suggestions are disabled")]}];super(84,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:n.NC("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:n.NC("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:n.NC("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:n.NC("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"==typeof t?t?"on":"off":S(t,this.defaultValue.other,o),r="boolean"==typeof i?i?"on":"off":S(i,this.defaultValue.comments,o),a="boolean"==typeof n?n?"on":"off":S(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}),quickSuggestionsDelay:B(new C(85,"quickSuggestionsDelay",10,0,1073741824,{description:n.NC("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:B(new v(86,"readOnly",!1)),renameOnType:B(new v(87,"renameOnType",!1,{description:n.NC("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n.NC("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:B(new v(88,"renderControlCharacters",!0,{description:n.NC("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:B(new k(89,"renderFinalNewline",o.IJ?"dimmed":"on",["off","on","dimmed"],{description:n.NC("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:B(new k(90,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n.NC("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n.NC("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:B(new v(91,"renderLineHighlightOnlyWhenFocus",!1,{description:n.NC("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:B(new k(92,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:B(new k(93,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n.NC("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n.NC("renderWhitespace.selection","Render whitespace characters only on selected text."),n.NC("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:n.NC("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:B(new C(94,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:B(new v(95,"roundedSelection",!0,{description:n.NC("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:B(new class extends u{constructor(){const e=[],t={type:"number",description:n.NC("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(96,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n.NC("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n.NC("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:C.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:C.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:B(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(97,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.NC("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),n.NC("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),n.NC("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:n.NC("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.NC("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),n.NC("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),n.NC("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:n.NC("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:n.NC("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:n.NC("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:n.NC("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=C.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=C.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:C.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:A(t.vertical,this.defaultValue.vertical),horizontal:A(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:C.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:C.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:B(new C(98,"scrollBeyondLastColumn",4,0,1073741824,{description:n.NC("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:B(new v(99,"scrollBeyondLastLine",!0,{description:n.NC("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:B(new v(100,"scrollPredominantAxis",!0,{description:n.NC("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:B(new v(101,"selectionClipboard",!0,{description:n.NC("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.IJ})),selectionHighlight:B(new v(102,"selectionHighlight",!0,{description:n.NC("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:B(new v(103,"selectOnLineNumbers",!0)),showFoldingControls:B(new k(104,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[n.NC("showFoldingControls.always","Always show the folding controls."),n.NC("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),n.NC("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n.NC("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:B(new v(105,"showUnused",!0,{description:n.NC("showUnused","Controls fading out of unused code.")})),showDeprecated:B(new v(133,"showDeprecated",!0,{description:n.NC("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:B(new class extends u{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(134,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:n.NC("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[n.NC("editor.inlayHints.on","Inlay hints are enabled"),n.NC("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",o.dz?"Ctrl+Option":"Ctrl+Alt"),n.NC("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",o.dz?"Ctrl+Option":"Ctrl+Alt"),n.NC("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:n.NC("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:n.NC("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:n.NC("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:S(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:C.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:w.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:B(new k(106,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n.NC("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n.NC("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n.NC("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n.NC("snippetSuggestions.none","Do not show snippet suggestions.")],description:n.NC("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:B(new class extends u{constructor(){super(107,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n.NC("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:B(new v(108,"smoothScrolling",!1,{description:n.NC("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:B(new C(111,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:B(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(112,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n.NC("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n.NC("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n.NC("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n.NC("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n.NC("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n.NC("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[n.NC("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),n.NC("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),n.NC("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),n.NC("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:n.NC("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n.NC("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n.NC("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n.NC("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:n.NC("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n.NC("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n.NC("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n.NC("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n.NC("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:S(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:S(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:S(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:B(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover"};super(59,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:n.NC("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[n.NC("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),n.NC("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:n.NC("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:S(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:S(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"])}}}),suggestFontSize:B(new C(113,"suggestFontSize",0,0,1e3,{markdownDescription:n.NC("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:B(new C(114,"suggestLineHeight",0,0,1e3,{markdownDescription:n.NC("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:B(new v(115,"suggestOnTriggerCharacters",!0,{description:n.NC("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:B(new k(116,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n.NC("suggestSelection.first","Always select the first suggestion."),n.NC("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n.NC("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n.NC("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:B(new k(117,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n.NC("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n.NC("tabCompletion.off","Disable tab completions."),n.NC("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n.NC("tabCompletion","Enables tab completions.")})),tabIndex:B(new C(118,"tabIndex",0,-1,1073741824)),unicodeHighlight:B(new class extends u{constructor(){const e={nonBasicASCII:M,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:M,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(119,"unicodeHighlight",e,{[R.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,M],default:e.nonBasicASCII,description:n.NC("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[R.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:n.NC("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[R.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:n.NC("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[R.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,M],default:e.includeComments,description:n.NC("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[R.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,M],default:e.includeStrings,description:n.NC("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[R.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:n.NC("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[R.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:n.NC("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(a.fS(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(a.fS(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:O(t.nonBasicASCII,M,[!0,!1,M]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:O(t.includeComments,M,[!0,!1,M]),includeStrings:O(t.includeStrings,M,[!0,!1,M]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:B(new k(120,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n.NC("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n.NC("unusualLineTerminators.off","Unusual line terminators are ignored."),n.NC("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n.NC("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:B(new v(121,"useShadowDOM",!0)),useTabStops:B(new v(122,"useTabStops",!0,{description:n.NC("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:B(new k(123,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[n.NC("wordBreak.normal","Use the default line break rule."),n.NC("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:n.NC("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:B(new w(124,"wordSeparators",s.vu,{description:n.NC("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:B(new k(125,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n.NC("wordWrap.off","Lines will never wrap."),n.NC("wordWrap.on","Lines will wrap at the viewport width."),n.NC({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n.NC({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n.NC({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:B(new w(126,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:B(new w(127,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥+")),wordWrapColumn:B(new C(128,"wordWrapColumn",80,1,1073741824,{markdownDescription:n.NC({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:B(new k(129,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:B(new k(130,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:B(new class extends m{constructor(){super(135)}compute(e,t,i){const n=["monaco-editor"];return t.get(36)&&n.push(t.get(36)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(70)?n.push("mouse-default"):"copy"===t.get(70)&&n.push("mouse-copy"),t.get(105)&&n.push("showUnused"),t.get(133)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:B(new class extends m{constructor(){super(136)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:B(new class extends m{constructor(){super(137)}compute(e,t,i){return!!t.get(86)||e.tabFocusMode}}),layoutInfo:B(new T),wrappingInfo:B(new class extends m{constructor(){super(139)}compute(e,t,i){const n=t.get(138);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:B(new class extends u{constructor(){super(131,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[n.NC("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n.NC("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n.NC("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n.NC("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n.NC("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:B(new class extends u{constructor(){super(132,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[n.NC("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n.NC("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:n.NC("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return S(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})}},82334:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var n=i(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},27374:(e,t,i)=>{"use strict";i.d(t,{E4:()=>a,pR:()=>l});var n=i(1432),o=i(64141),s=i(82334);const r=n.dz?1.5:1.35;class a{static createFromValidatedSettings(e,t,i){const n=e.get(46),o=e.get(50),s=e.get(49),r=e.get(48),l=e.get(51),c=e.get(63),h=e.get(60);return a._create(n,o,s,r,l,c,h,t,i)}static _create(e,t,i,n,l,c,h,d,u){0===c?c=r*i:c<8&&(c*=i),(c=Math.round(c))<8&&(c=8);const g=1+(u?0:.1*s.C.getZoomLevel());return i*=g,c*=g,l===o.Bo.TRANSLATE&&("normal"===t||"bold"===t?l=o.Bo.OFF:(l=`'wght' ${parseInt(t,10)}`,t="normal")),new a({pixelRatio:d,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:l,lineHeight:c,letterSpacing:h})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=o.hL.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},44906:(e,t,i)=>{"use strict";i.d(t,{N:()=>o,q:()=>s});var n=i(85427);class o{constructor(e){const t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},7988:(e,t,i)=>{"use strict";i.d(t,{i:()=>o});var n=i(97295);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const o=Math.min(t-1,e.length),s=e.substring(0,o),r=new n.W1(s);let a=0;for(;!r.eol();){const e=n.ZH(s,o,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length,s=new n.W1(e);let r=0,a=1;for(;!s.eol();){const l=n.ZH(e,o,s.offset);s.nextGraphemeLength();const c=this._nextVisibleColumn(l,r,i),h=s.offset+1;if(c>=t)return c-t<t-r?h:a;r=c,a=h}return o+1}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}},69386:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var n=i(24314);class o{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8625:(e,t,i)=>{"use strict";i.d(t,{Bj:()=>f,CE:()=>E,DS:()=>R,HV:()=>z,Jn:()=>P,Kh:()=>a,L7:()=>V,Mm:()=>l,Qb:()=>B,Re:()=>S,To:()=>W,UP:()=>N,Vs:()=>L,YF:()=>F,Ym:()=>g,dI:()=>d,eS:()=>k,e_:()=>v,f9:()=>U,fY:()=>h,hw:()=>p,lK:()=>w,lS:()=>O,m$:()=>M,m1:()=>T,m3:()=>H,m9:()=>y,n0:()=>c,oV:()=>A,r0:()=>D,tR:()=>u,ts:()=>I,zJ:()=>x,zu:()=>b,zw:()=>_});var n=i(63580),o=i(41264),s=i(73910),r=i(97781);const a=(0,s.P6G)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.P6G)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.lRK},n.NC("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=((0,s.P6G)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.NC("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.P6G)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),(0,s.P6G)("editor.symbolHighlightBackground",{dark:s.MUv,light:s.MUv,hcDark:null,hcLight:null},n.NC("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.P6G)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),(0,s.P6G)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hcDark:o.Il.white,hcLight:"#0F4A85"},n.NC("caret","Color of the editor cursor."))),h=(0,s.P6G)("editorCursor.background",null,n.NC("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),d=(0,s.P6G)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.NC("editorWhitespaces","Color of whitespace characters in the editor.")),u=(0,s.P6G)("editorIndentGuide.background",{dark:d,light:d,hcDark:d,hcLight:d},n.NC("editorIndentGuides","Color of the editor indentation guides.")),g=(0,s.P6G)("editorIndentGuide.activeBackground",{dark:d,light:d,hcDark:d,hcLight:d},n.NC("editorActiveIndentGuide","Color of the active editor indentation guides.")),p=(0,s.P6G)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorLineNumbers","Color of editor line numbers.")),m=(0,s.P6G)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.xL1,hcLight:s.xL1},n.NC("editorActiveLineNumber","Color of editor active line number"),!1,n.NC("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),f=((0,s.P6G)("editorLineNumber.activeForeground",{dark:m,light:m,hcDark:m,hcLight:m},n.NC("editorActiveLineNumber","Color of editor active line number")),(0,s.P6G)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),_=((0,s.P6G)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorRuler","Color of the editor rulers.")),(0,s.P6G)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.NC("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.P6G)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.NC("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.P6G)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.lRK,hcLight:s.lRK},n.NC("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.P6G)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.NC("editorOverviewRulerBorder","Color of the overview ruler border."))),v=(0,s.P6G)("editorOverviewRuler.background",null,n.NC("editorOverviewRulerBackground","Background color of the editor overview ruler.")),b=((0,s.P6G)("editorGutter.background",{dark:s.cvW,light:s.cvW,hcDark:s.cvW,hcLight:s.cvW},n.NC("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.P6G)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:s.lRK},n.NC("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.P6G)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),C=((0,s.P6G)("editorGhostText.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:o.Il.fromHex("#292929").transparent(.8)},n.NC("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.P6G)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.P6G)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorGhostTextBackground","Background color of the ghost text in the editor.")),new o.Il(new o.VS(0,122,204,.6))),y=(0,s.P6G)("editorOverviewRuler.rangeHighlightForeground",{dark:C,light:C,hcDark:C,hcLight:C},n.NC("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),w=(0,s.P6G)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},n.NC("overviewRuleError","Overview ruler marker color for errors.")),S=(0,s.P6G)("editorOverviewRuler.warningForeground",{dark:s.uoC,light:s.uoC,hcDark:s.pW3,hcLight:s.pW3},n.NC("overviewRuleWarning","Overview ruler marker color for warnings.")),k=(0,s.P6G)("editorOverviewRuler.infoForeground",{dark:s.c63,light:s.c63,hcDark:s.T83,hcLight:s.T83},n.NC("overviewRuleInfo","Overview ruler marker color for infos.")),x=(0,s.P6G)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.NC("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),L=(0,s.P6G)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.NC("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),E=(0,s.P6G)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.NC("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),N=(0,s.P6G)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),D=(0,s.P6G)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),T=(0,s.P6G)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),I=(0,s.P6G)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Il(new o.VS(255,18,18,.8)),light:new o.Il(new o.VS(255,18,18,.8)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:""},n.NC("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),A=(0,s.P6G)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),M=(0,s.P6G)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),R=(0,s.P6G)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),O=(0,s.P6G)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),P=(0,s.P6G)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),F=(0,s.P6G)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),B=(0,s.P6G)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),H=(0,s.P6G)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),W=(0,s.P6G)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),V=(0,s.P6G)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),z=(0,s.P6G)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),U=(0,s.P6G)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,s.P6G)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},n.NC("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.P6G)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},n.NC("editorUnicodeHighlight.background","Background color used to highlight unicode characters.")),(0,r.Ic)(((e,t)=>{const i=e.getColor(s.cvW),n=e.getColor(a),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}))},23795:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;s<r;s++){const a=e.charCodeAt(s);13===a?(0===t&&(i=s),t++,s+1<r&&10===e.charCodeAt(s+1)?(o|=2,s++):o|=3,n=s+1):10===a&&(o|=1,0===t&&(i=s),t++,n=s+1)}return 0===t&&(i=e.length),[t,i,e.length-n,o]}i.d(t,{Q:()=>n})},83158:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(97295),o=i(7988);function s(e,t,i){let s=n.LC(e);return-1===s&&(s=e.length),function(e,t,i){let n=0;for(let i=0;i<e.length;i++)"\t"===e.charAt(i)?n=o.i.nextIndentTabStop(n,t):n++;let s="";if(!i){const e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)s+="\t"}for(let e=0;e<n;e++)s+=" ";return s}(e.substring(0,s),t,i)+e.substring(s)}},50187:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return n.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){const i=0|e.lineNumber,n=0|t.lineNumber;return i===n?(0|e.column)-(0|t.column):i-n}clone(){return new n(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new n(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}}},24314:(e,t,i)=>{"use strict";i.d(t,{e:()=>o});var n=i(50187);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),s>c?(s=c,r=h):s===c&&(r=Math.min(r,h)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return o.collapseToEnd(this)}static collapseToEnd(e){return new o(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new o(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;return i===n?(0|e.endColumn)-(0|t.endColumn):i-n}return i-n}return i-n}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}}},3860:(e,t,i)=>{"use strict";i.d(t,{Y:()=>s});var n=i(50187),o=i(24314);class s extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}static createWithDirection(e,t,i,n,o){return 0===o?new s(e,t,i,n):new s(i,n,e,t)}}},50072:(e,t,i)=>{"use strict";i.d(t,{HT:()=>u,kH:()=>d,oe:()=>h});var n=i(97295),o=i(1432),s=i(53060);let r,a,l;function c(){return r||(r=new TextDecoder("UTF-16LE")),r}function h(){return l||(l=o.r()?c():(a||(a=new TextDecoder("UTF-16BE")),a)),l}function d(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let o=0;for(let r=0;r<i;r++){const i=s.mP(e,t);t+=2,n[o++]=String.fromCharCode(i)}return n.join("")}(e,t,i):c().decode(n)}class u{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return h().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}},93033:(e,t,i)=>{"use strict";i.d(t,{b:()=>a,q:()=>r});var n=i(53060),o=i(50072);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let s=0;s<o;s++)n.oq(e,t.charCodeAt(s),i),i+=2;return i}static _readString(e,t){const i=n.Ag(e,t);return t+=4,(0,o.kH)(e,t,i)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(e,t){return n.T4(e,this.oldPosition,t),t+=4,n.T4(e,this.newPosition,t),t+=4,t=r._writeString(e,this.oldText,t),r._writeString(e,this.newText,t)}static read(e,t,i){const o=n.Ag(e,t);t+=4;const s=n.Ag(e,t);t+=4;const a=r._readString(e,t);t+=r._writeStringSize(a);const l=r._readString(e,t);return t+=r._writeStringSize(l),i.push(new r(o,a,s,l)),t}}function a(e,t){return null===e||0===e.length?t:new l(e,t).compress()}class l{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=l._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=l._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let o,s;if(n.oldEnd===i.newEnd)o=i,s=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,r]=l._splitPrev(i,n.oldLength);o=e,s=n,i=r,n=this._getCurr(++t)}else{const[t,r]=l._splitCurr(n,i.newLength);o=i,s=t,i=this._getPrev(++e),n=r}this._result[this._resultLen++]=new r(o.oldPosition,o.oldText,s.newPosition,s.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=s.newLength-s.oldLength}const o=l._merge(this._result);return l._removeNoOps(o)}_acceptCurr(e){this._result[this._resultLen++]=l._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=l._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new r(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new r(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new r(e.oldPosition,e.oldText,e.newPosition,i),new r(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new r(e.oldPosition,i,e.newPosition,e.newText),new r(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;const t=[];let i=0,n=e[0];for(let o=1;o<e.length;o++){const s=e[o];n.oldEnd===s.oldPosition?n=new r(n.oldPosition,n.oldText+s.oldText,n.newPosition,n.newText+s.newText):(t[i++]=n,n=s)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;const t=[];let i=0;for(let n=0;n<e.length;n++){const o=e[n];o.oldText!==o.newText&&(t[i++]=o)}return t}}},22075:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},24929:(e,t,i)=>{"use strict";i.d(t,{u:()=>s});var n=i(44906);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}const s=function(e){const t={};return e=>(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},270:(e,t,i)=>{"use strict";i.d(t,{Af:()=>r,eq:()=>a,t2:()=>c,vu:()=>s});var n=i(53725),o=i(91741);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const l=new o.S;function c(e,t,i,o,s){if(s||(s=n.$.first(l)),i.length>s.maxLen){let n=e-s.maxLen/2;return n<0?n=0:o+=n,c(e,t,i=i.substring(n,e+s.maxLen/2),o,s)}const r=Date.now(),a=e-1-o;let d=-1,u=null;for(let e=1;!(Date.now()-r>=s.timeBudget);e++){const n=a-s.windowSize*e;t.lastIndex=Math.max(0,n);const o=h(t,i,a,d);if(!o&&u)break;if(u=o,n<=0)break;d=n}if(u){const e={word:u[0],startColumn:o+1+u.index,endColumn:o+1+u.index+u[0].length};return t.lastIndex=0,e}return null}function h(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},47128:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(7988);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l<o;l++){if(l===t)return[r,a,s];switch(s%i==0&&(r=l,a=s),e.charCodeAt(l)){case 32:s+=1;break;case 9:s=n.i.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===o?[r,a,s]:[-1,-1,-1]}static atomicPosition(e,t,i,s){const r=e.length,[a,l,c]=o.whitespaceVisibleColumn(e,t,i);if(-1===c)return-1;let h;switch(s){case 0:h=!0;break;case 1:h=!1;break;case 2:if(c%i==0)return t;h=c%i<=i/2}if(h){if(-1===a)return-1;let t=l;for(let o=a;o<r;++o){if(t===l+i)return a;switch(e.charCodeAt(o)){case 32:t+=1;break;case 9:t=n.i.nextRenderTabStop(t,i);break;default:return-1}}return t===l+i?a:-1}const d=n.i.nextRenderTabStop(c,i);let u=c;for(let o=t;o<r;o++){if(u===d)return o;switch(e.charCodeAt(o)){case 32:u+=1;break;case 9:u=n.i.nextRenderTabStop(u,i);break;default:return-1}}return u===d?r:-1}}},29436:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(97295),o=i(61329),s=i(55343),r=i(7988),a=i(10839),l=i(24314),c=i(50187);class h{static deleteRight(e,t,i,n){const s=[];let r=3!==e;for(let e=0,c=n.length;e<c;e++){const c=n[e];let h=c;if(h.isEmpty()){const e=c.getPosition(),n=a.o.right(t,i,e);h=new l.e(n.lineNumber,n.column,e.lineNumber,e.column)}h.isEmpty()?s[e]=null:(h.startLineNumber!==h.endLineNumber&&(r=!0),s[e]=new o.T4(h,""))}return[r,s]}static isAutoClosingPairDelete(e,t,i,n,o,r,a){if("never"===t&&"never"===i)return!1;if("never"===e)return!1;for(let l=0,c=r.length;l<c;l++){const c=r[l],h=c.getPosition();if(!c.isEmpty())return!1;const d=o.getLineContent(h.lineNumber);if(h.column<2||h.column>=d.length+1)return!1;const u=d.charAt(h.column-2),g=n.get(u);if(!g)return!1;if((0,s.LN)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=d.charAt(h.column-1);let m=!1;for(const e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t<i;t++){const i=a[t];if(h.lineNumber===i.startLineNumber&&h.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){const n=[];for(let e=0,t=i.length;e<t;e++){const t=i[e].getPosition(),s=new l.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new o.T4(s,"")}return[!0,n]}static deleteLeft(e,t,i,n,s){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,s))return this._runAutoClosingPairDelete(t,i,n);const r=[];let a=2!==e;for(let e=0,s=n.length;e<s;e++){const s=h.getDeleteRange(n[e],i,t);s.isEmpty()?r[e]=null:(s.startLineNumber!==s.endLineNumber&&(a=!0),r[e]=new o.T4(s,""))}return[a,r]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const o=e.getPosition();if(i.useTabStops&&o.column>1){const e=t.getLineContent(o.lineNumber),s=n.LC(e),a=-1===s?e.length+1:s+1;if(o.column<=a){const e=i.visibleColumnFromColumn(t,o),n=r.i.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.e(o.lineNumber,s,o.lineNumber,o.column)}}return l.e.fromPositions(h.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>c.L.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,a=i.length;s<a;s++){const a=i[s];if(a.isEmpty())if(e.emptySelectionClipboard){const e=a.getPosition();let i,c,h,d;e.lineNumber<t.getLineCount()?(i=e.lineNumber,c=1,h=e.lineNumber+1,d=1):e.lineNumber>1&&(null==r?void 0:r.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),h=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,h=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber));const u=new l.e(i,c,h,d);r=u,u.isEmpty()?n[s]=null:n[s]=new o.T4(u,"")}else n[s]=null;else n[s]=new o.T4(a,"")}return new s.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},28108:(e,t,i)=>{"use strict";i.d(t,{N:()=>n,P:()=>h});var n,o=i(98401),s=i(55343),r=i(10839),a=i(92896),l=i(50187),c=i(24314);class h{static addCursorDown(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateDown(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateDown(e.cursorConfig,e,l.viewState))}return n}static addCursorUp(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateUp(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateUp(e.cursorConfig,e,l.viewState))}return n}static moveToBeginningOfLine(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];n[o]=this._moveToLineStart(e,s,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,o=n===t.modelState.position.column,s=t.viewState.position.lineNumber,r=e.getLineFirstNonWhitespaceColumn(s);return o||n===r?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return s.Vi.fromViewState(r.o.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return s.Vi.fromModelState(r.o.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){const o=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];o[s]=this._moveToLineEnd(e,r,i,n)}return o}static _moveToLineEnd(e,t,i,n){const o=t.viewState.position,s=e.getLineMaxColumn(o.lineNumber),r=o.column===s,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),c=s-o.column==l-a.column;return r||c?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return s.Vi.fromViewState(r.o.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return s.Vi.fromModelState(r.o.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.selection.startLineNumber,a=e.model.getLineCount();let h,d=o.modelState.selection.endLineNumber;d===a?h=e.model.getLineMaxColumn(a):(d++,h=1),i[n]=s.Vi.fromModelState(new s.rS(new c.e(r,1,r,1),0,0,new l.L(d,h),0))}return i}static moveToBeginningOfBuffer(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return s.Vi.fromModelState(new s.rS(new c.e(1,1,1,1),0,0,new l.L(i,n),0))}static line(e,t,i,n,o){const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i){const t=e.model.getLineCount();let i=r.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new c.e(r.lineNumber,1,i,n),2,0,new l.L(i,n),0))}const h=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<h)return s.Vi.fromViewState(t.viewState.move(!0,a.lineNumber,1,0));if(r.lineNumber>h){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new c.e(i,n,i,n),0,0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=this.findPositionInViewportIfOutside(e,r,s,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){const o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new s.Vi(t.modelState,t.viewState);{let a;a=o>i.endLineNumber-1?i.endLineNumber-1:o<i.startLineNumber?i.startLineNumber:o;const l=r.o.vertical(e.cursorConfig,e,o,t.viewState.position.column,t.viewState.leftoverVisibleColumns,a,!1);return s.Vi.fromViewState(t.viewState.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveRight(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveDownByViewLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveDown(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveDownByModelLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveDown(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveUpByViewLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveUp(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveUpByModelLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveUp(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveToViewPosition(e,t,i,n,o){return s.Vi.fromViewState(t.viewState.move(i,n,o,0))}static _moveToModelPosition(e,t,i,n,o){return s.Vi.fromModelState(t.modelState.move(i,n,o,0))}static _moveToViewMinColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMinColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewCenterColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(r)+e.getLineMinColumn(r))/2);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewMaxColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMaxColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}}!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!o.Kn(e))return!1;const t=e;return!(!o.HD(t.to)||!o.o8(t.select)&&!o.jn(t.select)||!o.o8(t.by)&&!o.HD(t.by)||!o.o8(t.value)&&!o.hj(t.value))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(n||(n={}))},10839:(e,t,i)=>{"use strict";i.d(t,{o:()=>h});var n=i(55343),o=i(7988),s=i(50187),r=i(24314),a=i(97295),l=i(47128);class c{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class h{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-a.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new s.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=l.l.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new s.L(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?h.leftPositionAtomicSoftTabs(t,i,e.tabSize):h.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(h.clipPositionColumn(n,t),0),l=h.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new s.L(e.lineNumber,h.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=a.vH(e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new s.L(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,o){if(i<e.getLineIndentColumn(t)){const o=e.getLineContent(t),r=l.l.atomicPosition(o,i-1,n,1);if(-1!==r)return new s.L(t,r+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?h.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):h.rightPosition(t,i.lineNumber,i.column);return new c(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.endLineNumber,r=i.selection.endColumn;else{const n=i.position.delta(void 0,o-1),a=t.normalizePosition(h.clipPositionColumn(n,t),1),l=h.right(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static vertical(e,t,i,n,r,a,l,h){const d=o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+r,u=t.getLineCount(),g=1===i&&1===n,p=i===u&&n===t.getLineMaxColumn(i),m=a<i?g:p;if((i=a)<1?(i=1,n=l?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):i>u?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,d),r=m?0:d-o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==h){const e=new s.L(i,n),o=t.normalizePosition(e,h);r+=n-o.column,i=o.lineNumber,n=o.column}return new c(i,n,r)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);const a=h.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const o=i.selection,a=h.down(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=h.down(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),0,a.leftoverVisibleColumns,new s.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r,3)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);const a=h.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const o=i.selection,a=h.up(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=h.up(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),0,a.leftoverVisibleColumns,new s.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s<o&&this._isBlankLine(t,s);)s++;for(;s<o&&!this._isBlankLine(t,s);)s++;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToBeginningOfLine(e,t,i,n){const o=i.position.lineNumber,s=t.getLineMinColumn(o),r=t.getLineFirstNonWhitespaceColumn(o)||s;let a;return a=i.position.column===r?s:r,i.move(n,o,a,0)}static moveToEndOfLine(e,t,i,n,o){const s=i.position.lineNumber,r=t.getLineMaxColumn(s);return i.move(n,s,r,o?1073741824-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){const o=t.getLineCount(),s=t.getLineMaxColumn(o);return i.move(n,o,s,0)}}},51336:(e,t,i)=>{"use strict";i.d(t,{Nu:()=>y,u6:()=>b,g_:()=>C});var n=i(17301),o=i(97295),s=i(61329),r=i(10291),a=i(24314),l=i(3860);class c{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class h{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new l.Y(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}var d=i(55343),u=i(24929),g=i(50187),p=i(49119),m=i(51381),f=i(19111),_=i(75383),v=i(1615);class b{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return n}static outdent(e,t,i){const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return n}static shiftIndent(e,t,i){return i=i||1,r.U.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,r.U.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){const o=[];for(let e=0,t=i.length;e<t;e++)o[e]=new s.T4(i[e],n[e]);return new d.Tp(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,o){const r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e],l=t.getPosition();if(o&&!t.isEmpty()&&(o=!1),o&&n.indexOf("\n")!==n.length-1&&(o=!1),o){const i=new a.e(l.lineNumber,1,l.lineNumber,1);r[e]=new s.hP(i,n,t,!0)}else r[e]=new s.T4(t,n)}return new d.Tp(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n)return null;if(1===t.length)return null;if(s&&s.length===t.length)return s;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));const e=o.uq(i);if(e.length===t.length)return e}return null}static paste(e,t,i,n,o,s){const r=this._distributePasteToCursors(e,i,n,o,s);return r?(i=i.sort(a.e.compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,s="";const r=(0,_.r7)(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,s=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),l=(0,v.A)(e.autoIndent,t,new a.e(n,r,n,r),e.languageConfigurationService);l&&(s=l.indentation+l.appendText)}return n&&(n===p.wU.Indent&&(s=b.shiftIndent(e,s)),n===p.wU.Outdent&&(s=b.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;e<s;e++)o+=" "}else o="\t";return new s.T4(i,o,n)}static tab(e,t,i){const n=[];for(let o=0,l=i.length;o<l;o++){const l=i[o];if(l.isEmpty()){const i=t.getLineContent(l.startLineNumber);if(/^\s*$/.test(i)&&t.tokenization.isCheapToTokenize(l.startLineNumber)){let r=this._goodIndentForLine(e,t,l.startLineNumber);r=r||"\t";const c=e.normalizeIndentation(r);if(!i.startsWith(c)){n[o]=new s.T4(new a.e(l.startLineNumber,1,l.startLineNumber,i.length+1),c,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,l,!0)}else{if(l.startLineNumber===l.endLineNumber){const i=t.getLineMaxColumn(l.startLineNumber);if(1!==l.startColumn||l.endColumn!==i){n[o]=this._replaceJumpToNextIndent(e,t,l,!1);continue}}n[o]=new r.U(l,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static compositionType(e,t,i,n,o,s,r,a){const l=n.map((e=>this._compositionType(i,e,o,s,r,a)));return new d.Tp(4,l,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const l=t.getPosition(),c=Math.max(1,l.column-n),h=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),d=new a.e(l.lineNumber,c,l.lineNumber,h);return e.getValueInRange(d)===i&&0===r?null:new s.Uo(d,i,0,r)}static _typeCommand(e,t,i){return i?new s.Sj(e,t,!0):new s.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return b._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const s=t.getLineContent(n.startLineNumber),r=o.V8(s).substring(0,n.startColumn-1);return b._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}const r=(0,v.A)(e.autoIndent,t,n,e.languageConfigurationService);if(r){if(r.indentAction===p.wU.None)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.Indent)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.IndentOutdent){const t=e.normalizeIndentation(r.indentation),o=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+o+"\n"+t;return i?new s.Sj(n,a,!0):new s.Uo(n,a,-1,o.length-t.length,!0)}if(r.indentAction===p.wU.Outdent){const t=b.unshiftIndent(e,r.indentation);return b._typeCommand(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const r=(0,_.UF)(e.autoIndent,t,n,{unshiftIndent:t=>b.unshiftIndent(e,t),shiftIndent:t=>b.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),h=o.LC(c);if(n=h>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.Sj(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.Uo(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return b._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.tokenization.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=(0,m.u0)(t,i.startLineNumber,i.startColumn),s=(0,_.$9)(e.autoIndent,t,i,n,{shiftIndent:t=>b.shiftIndent(e,t),unshiftIndent:t=>b.unshiftIndent(e,t)},e.languageConfigurationService);if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s<r;s++){const r=i[s];if(!r.isEmpty())return!1;const a=r.getPosition(),l=t.getLineContent(a.lineNumber);if(l.charAt(a.column-1)!==o)return!1;const c=(0,d.LN)(o);if(92===(a.column>2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++){const t=n[e].getPosition(),i=new a.e(t.lineNumber,t.column,t.lineNumber,t.column+1);r[e]=new s.T4(i,o)}return new d.Tp(4,r,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=n.some((e=>t.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i)if(t.getValueInRange(new a.e(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}o&&(s=e)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){const s=(0,d.LN)(n),r=s?e.autoClosingQuotes:e.autoClosingBrackets,a=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===r)return null;for(const e of i)if(!e.isEmpty())return null;const l=i.map((e=>{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),c=this._findAutoClosingPairOpen(e,t,l.map((e=>new g.L(e.lineNumber,e.beforeColumn))),n);if(!c)return null;const h=this._findContainedAutoClosingPair(e,c),p=h?h.close:"";let m=!0;for(const i of l){const{lineNumber:o,beforeColumn:s,afterColumn:l}=i,h=t.getLineContent(o),d=h.substring(0,s-1),g=h.substring(l-1);if(g.startsWith(p)||(m=!1),g.length>0){const t=g.charAt(0);if(!b._isBeforeClosingBrace(e,g)&&!a(t))return null}if(1===c.open.length&&("'"===n||'"'===n)&&"always"!==r){const t=(0,u.u)(e.wordSeparators);if(d.length>0){const e=d.charCodeAt(d.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);const _=t.tokenization.getLineTokens(o),v=(0,f.wH)(_,s-1);if(!c.shouldAutoClose(v,s-v.firstCharOffset))return null;const C=c.findNeutralCharacter();if(C){const e=t.tokenization.getTokenTypeIfInsertingCharacter(o,s,C);if(!c.isOK(e))return null}}return m?c.close.substring(0,c.close.length-p.length):c.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;e<t;e++){const t=n[e];a[e]=new C(t,o,!s,r)}return new d.Tp(4,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return(0,d.LN)(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!b._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=(0,d.LN)(n);for(const e of i){if(e.isEmpty())return!1;let i=!0;for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const o=t.getLineContent(n),s=n===e.startLineNumber?e.startColumn-1:0,r=n===e.endLineNumber?e.endColumn-1:o.length,a=o.substring(s,r);if(/[^ \t]/.test(a)){i=!1;break}}if(i)return!1;if(o&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){const i=t.getValueInRange(e);if((0,d.LN)(i))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,o){const s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],r=t.surroundingPairs[o];s[e]=new c(i,o,r)}return new d.Tp(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.tokenization.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,r,l){if(!t.electricChars.hasOwnProperty(l)||!r.isEmpty())return null;const c=r.getPosition();i.tokenization.forceTokenization(c.lineNumber);const h=i.tokenization.getLineTokens(c.lineNumber);let u;try{u=t.onElectricCharacter(l,h,c.column)}catch(e){return(0,n.dL)(e),null}if(!u)return null;if(u.matchOpenBracket){const n=(h.getLineContent()+l).lastIndexOf(u.matchOpenBracket)+1,r=i.bracketPairs.findMatchingBracketUp(u.matchOpenBracket,{lineNumber:c.lineNumber,column:n},500);if(r){if(r.startLineNumber===c.lineNumber)return null;const n=i.getLineContent(r.startLineNumber),h=o.V8(n),u=t.normalizeIndentation(h),g=i.getLineContent(c.lineNumber),p=i.getLineFirstNonWhitespaceColumn(c.lineNumber)||c.column,m=u+g.substring(p-1,c.column-1)+l,f=new a.e(c.lineNumber,1,c.lineNumber,c.column),_=new s.T4(f,m);return new d.Tp(w(m,e),[_],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,o,r){if(!n)return null;let l=null;for(const e of n)if(null===l)l=e.insertedText;else if(l!==e.insertedText)return null;if(!l||1!==l.length)return null;const c=l;let u=!1;for(const e of n)if(0!==e.deletedText.length){u=!0;break}if(u){if(!b._shouldSurroundChar(t,c)||!t.surroundingPairs.hasOwnProperty(c))return null;const e=(0,d.LN)(c);for(const t of n){if(0!==t.deletedSelectionStart||t.deletedSelectionEnd!==t.deletedText.length)return null;if(/^[ \t]+$/.test(t.deletedText))return null;if(e&&(0,d.LN)(t.deletedText))return null}const i=[];for(const e of o){if(!e.isEmpty())return null;i.push(e.getPosition())}if(i.length!==n.length)return null;const s=[];for(let e=0,o=i.length;e<o;e++)s.push(new h(i[e],n[e].deletedText,t.surroundingPairs[c]));return new d.Tp(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(t,i,o,r,c)){const e=o.map((e=>new s.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new d.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const g=this._getAutoClosingPairClose(t,i,o,c,!0);return null!==g?this._runAutoClosingOpenCharType(e,t,i,o,c,!0,g):null}static typeWithInterceptors(e,t,i,n,o,r,a){if(!e&&"\n"===a){const e=[];for(let t=0,s=o.length;t<s;t++)e[t]=b._enter(i,n,!1,o[t]);return new d.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){const e=[];let t=!1;for(let s=0,r=o.length;s<r;s++)if(e[s]=this._runAutoIndentType(i,n,o[s],a),!e[s]){t=!0;break}if(!t)return new d.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(i,n,o,r,a))return this._runAutoClosingOvertype(t,i,n,o,a);if(!e){const e=this._getAutoClosingPairClose(i,n,o,a,!1);if(e)return this._runAutoClosingOpenCharType(t,i,n,o,a,!1,e)}if(!e&&this._isSurroundSelectionType(i,n,o,a))return this._runSurroundSelectionType(t,i,n,o,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const e=this._typeInterceptorElectricChar(t,i,n,o[0],a);if(e)return e}const l=[];for(let e=0,t=o.length;e<t;e++)l[e]=new s.T4(o[e],a);const c=w(a,t);return new d.Tp(c,l,{shouldPushStackElementBefore:S(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++)r[e]=new s.T4(n[e],o);const a=w(o,e);return new d.Tp(a,r,{shouldPushStackElementBefore:S(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;o<r;o++){let r=i[o].positionLineNumber;if(1===r)n[o]=new s.Sj(new a.e(1,1,1,1),"\n");else{r--;const i=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new a.e(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,s=i.length;o<s;o++){const s=i[o].positionLineNumber,r=t.getLineMaxColumn(s);n[o]=this._enter(e,t,!1,new a.e(s,r,s,r))}return n}static lineBreakInsert(e,t,i){const n=[];for(let o=0,s=i.length;o<s;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class C extends s.Uo{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new a.e(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new a.e(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,t)}}class y{constructor(e,t,i,n,o,s){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=o,this.insertedSelectionEnd=s}}function w(e,t){return" "===e?5===t||6===t?6:5:4}function S(e,t){return!(!x(e)||x(t))||5!==e&&k(e)!==k(t)}function k(e){return 6===e||5===e?"space":e}function x(e){return 4===e||5===e||6===e}},92896:(e,t,i)=>{"use strict";i.d(t,{L:()=>h,w:()=>c});var n=i(97295),o=i(55343),s=i(29436),r=i(24929),a=i(50187),l=i(24314);class c{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){const i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=e.length;for(let s=n;s<o;s++){const n=e.charCodeAt(s),o=t.get(n);if(1===o)return s;if(1===i&&2===o)return s;if(2===i&&0===o)return s}return o}static _findNextWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0;const o=e.length;for(let s=i.column-1;s<o;s++){const i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,o-1),o):null}static _findStartOfWord(e,t,i,n){for(let o=n;o>=0;o--){const n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=c._findPreviousWordOnLine(e,t,new a.L(o,s));if(0===n)return new a.L(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=c._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=c._findPreviousWordOnLine(e,t,new a.L(o,r.start+1));return new a.L(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=c._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95===t&&95!==r)return new a.L(i,e);if(45===t&&45!==r)return new a.L(i,e);if((n.mK(t)||n.T5(t))&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t)||n.T5(t))return new a.L(i,e)}}return new a.L(i,1)}static moveWordRight(e,t,i,n){let o=i.lineNumber,s=i.column,r=!1;s===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(r=!0,o+=1,s=1);let l=c._findNextWordOnLine(e,t,new a.L(o,s));if(2===n)l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=c._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.end+1:t.getLineMaxColumn(o);else if(3===n){for(r&&(s=0);l&&(2===l.wordType||l.start+1<=s);)l=c._findNextWordOnLine(e,t,new a.L(o,l.end+1));s=l?l.start+1:t.getLineMaxColumn(o)}else l&&!r&&s>=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i<e.getLineCount()?new a.L(i+1,1):t;const s=e.getLineContent(i);for(let e=t.column+1;e<o;e++){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95!==t&&95===r)return new a.L(i,e);if(45!==t&&45===r)return new a.L(i,e);if((n.mK(t)||n.T5(t))&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t)||n.T5(t))return new a.L(i,e)}}return new a.L(i,o)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),o=t.column-2,s=n.ow(i,o);return s+1<o?new l.e(t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(s.A.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const t=e.selection.getPosition();return new l.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const h=new a.L(o.positionLineNumber,o.positionColumn);let d=h.lineNumber,u=h.column;if(1===d&&1===u)return null;if(r){const e=this._deleteWordLeftWhitespace(n,h);if(e)return e}let g=c._findPreviousWordOnLine(i,n,h);return 0===t?g?u=g.start+1:u>1?u=1:(d--,u=n.getLineMaxColumn(d)):(g&&u<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.L(d,g.start+1))),g?u=g.end+1:u>1?u=1:(d--,u=n.getLineMaxColumn(d))),new l.e(d,u,h.lineNumber,h.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+1<n&&this._charAtIsWhitespace(i,s+1);)s++;return new l.e(t.lineNumber,o+1,t.lineNumber,s+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),o=n.length;if(0===o)return i.lineNumber>1?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new l.e(i.lineNumber,1,i.lineNumber+1,1):new l.e(i.lineNumber,1,i.lineNumber,1);const s=e=>e.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-1<o&&this._charAtIsWhitespace(n,i-1);)s=!0,i++;if(!s)for(;t>1&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},h=c._findPreviousWordOnLine(e,t,i);if(h&&s(h))return a(h);const d=c._findNextWordOnLine(e,t,i);return d&&s(d)?a(d):h&&d?r(h.end+1,d.start+1):h?r(h.start+1,h.end+1):d?r(d.start+1,d.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n<i;n++){const t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,o=this._findFirstNonWhitespaceChar(i,n);return n+1<o?new l.e(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,s=e.whitespaceHeuristics;if(!o.isEmpty())return o;const r=new a.L(o.positionLineNumber,o.positionColumn);let h=r.lineNumber,d=r.column;const u=n.getLineCount(),g=n.getLineMaxColumn(h);if(h===u&&d===g)return null;if(s){const e=this._deleteWordRightWhitespace(n,r);if(e)return e}let p=c._findNextWordOnLine(i,n,r);return 2===t?p?d=p.end+1:d<g||h===u?d=g:(h++,p=c._findNextWordOnLine(i,n,new a.L(h,1)),d=p?p.start+1:n.getLineMaxColumn(h)):(p&&d>=p.start+1&&(p=c._findNextWordOnLine(i,n,new a.L(h,p.end+1))),p?d=p.start+1:d<g||h===u?d=g:(h++,p=c._findNextWordOnLine(i,n,new a.L(h,1)),d=p?p.start+1:n.getLineMaxColumn(h))),new l.e(h,d,r.lineNumber,r.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartRight(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new l.e(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=(0,r.u)(t),o=c._findPreviousWordOnLine(n,e,i);if(o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end)return c._createWordAtPosition(e,i.lineNumber,o);const s=c._findNextWordOnLine(n,e,i);return s&&1===s.wordType&&s.start<=i.column-1&&i.column-1<=s.end?c._createWordAtPosition(e,i.lineNumber,s):null}static word(e,t,i,n,s){const h=(0,r.u)(e.wordSeparators),d=c._findPreviousWordOnLine(h,t,s),u=c._findNextWordOnLine(h,t,s);if(!n){let e,i;return d&&1===d.wordType&&d.start<=s.column-1&&s.column-1<=d.end?(e=d.start+1,i=d.end+1):u&&1===u.wordType&&u.start<=s.column-1&&s.column-1<=u.end?(e=u.start+1,i=u.end+1):(e=d?d.end+1:1,i=u?u.start+1:t.getLineMaxColumn(s.lineNumber)),new o.rS(new l.e(s.lineNumber,e,s.lineNumber,i),1,0,new a.L(s.lineNumber,i),0)}let g,p;d&&1===d.wordType&&d.start<s.column-1&&s.column-1<d.end?(g=d.start+1,p=d.end+1):u&&1===u.wordType&&u.start<s.column-1&&s.column-1<u.end?(g=u.start+1,p=u.end+1):(g=s.column,p=s.column);const m=s.lineNumber;let f;if(i.selectionStart.containsPosition(s))f=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){f=g;const e=new a.L(m,f);i.selectionStart.containsPosition(e)&&(f=i.selectionStart.endColumn)}else{f=p;const e=new a.L(m,f);i.selectionStart.containsPosition(e)&&(f=i.selectionStart.startColumn)}return i.move(!0,m,f,0)}}class h extends c{static deleteWordPartLeft(e){const t=d([c.deleteWordLeft(e,0),c.deleteWordLeft(e,2),c._deleteWordPartLeft(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=d([c.deleteWordRight(e,0),c.deleteWordRight(e,2),c._deleteWordPartRight(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=d([c.moveWordLeft(e,t,i,0),c.moveWordLeft(e,t,i,2),c._moveWordPartLeft(t,i)]);return n.sort(a.L.compare),n[2]}static moveWordPartRight(e,t,i){const n=d([c.moveWordRight(e,t,i,0),c.moveWordRight(e,t,i,2),c._moveWordPartRight(t,i)]);return n.sort(a.L.compare),n[0]}}function d(e){return e.filter((e=>Boolean(e)))}},55343:(e,t,i)=>{"use strict";i.d(t,{LM:()=>u,LN:()=>v,Tp:()=>_,Vi:()=>g,rS:()=>f});var n=i(50187),o=i(24314),s=i(3860),r=i(19111),a=i(7988),l=i(83158);const c=()=>!0,h=()=>!1,d=e=>" "===e||"\t"===e;class u{static shouldRecreate(e){return e.hasChanged(138)||e.hasChanged(124)||e.hasChanged(34)||e.hasChanged(73)||e.hasChanged(75)||e.hasChanged(76)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(122)||e.hasChanged(47)||e.hasChanged(86)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(138),r=o.get(47);this.readOnly=o.get(86),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(110),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(122),this.wordSeparators=o.get(124),this.emptySelectionClipboard=o.get(34),this.copyWithSyntaxHighlighting=o.get(22),this.multiCursorMergeOverlapping=o.get(73),this.multiCursorPaste=o.get(75),this.multiCursorLimit=o.get(76),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const e of a)this.surroundingPairs[e.open]=e.close}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.wH)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return d;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return c;case"never":return h}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(n<o)return o;const s=e.getLineMaxColumn(t);return n>s?s:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){const t=s.Y.liftSelection(e),i=new f(o.e.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class p{constructor(e){this.modelState=e,this.viewState=null}}class m{constructor(e){this.modelState=null,this.viewState=e}}class f{constructor(e,t,i,n,o){this.selectionStart=e,this.selectionStartKind=t,this.selectionStartLeftoverVisibleColumns=i,this.position=n,this.leftoverVisibleColumns=o,this._singleCursorStateBrand=void 0,this.selection=f._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.selectionStartKind===e.selectionStartKind&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,s){return e?new f(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new n.L(t,i),s):new f(new o.e(t,i,t,i),0,s,new n.L(t,i),s)}static _computeSelection(e,t){return e.isEmpty()||!t.isBeforeOrEqual(e.getStartPosition())?s.Y.fromPositions(e.getStartPosition(),t):s.Y.fromPositions(e.getEndPosition(),t)}}class _{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function v(e){return"'"===e||'"'===e||"`"===e}},30653:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},96518:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},29102:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});var n,o=i(63580),s=i(38819);!function(e){e.editorSimpleInput=new s.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new s.uy("editorTextFocus",!1,o.NC("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.uy("editorFocus",!1,o.NC("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.uy("textInputFocus",!1,o.NC("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.uy("editorReadonly",!1,o.NC("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new s.uy("inDiffEditor",!1,o.NC("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new s.uy("editorColumnSelection",!1,o.NC("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.uy("editorHasSelection",!1,o.NC("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.uy("editorHasMultipleSelections",!1,o.NC("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.uy("editorTabMovesFocus",!1,o.NC("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new s.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new s.uy("canUndo",!1,!0),e.canRedo=new s.uy("canRedo",!1,!0),e.hoverVisible=new s.uy("editorHoverVisible",!1,o.NC("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new s.uy("inCompositeEditor",void 0,o.NC("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.uy("editorLangId","",o.NC("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.uy("editorHasCompletionItemProvider",!1,o.NC("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.uy("editorHasCodeActionsProvider",!1,o.NC("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.uy("editorHasCodeLensProvider",!1,o.NC("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.uy("editorHasDefinitionProvider",!1,o.NC("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.uy("editorHasDeclarationProvider",!1,o.NC("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.uy("editorHasImplementationProvider",!1,o.NC("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.uy("editorHasTypeDefinitionProvider",!1,o.NC("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.uy("editorHasHoverProvider",!1,o.NC("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.uy("editorHasDocumentHighlightProvider",!1,o.NC("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.uy("editorHasDocumentSymbolProvider",!1,o.NC("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.uy("editorHasReferenceProvider",!1,o.NC("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.uy("editorHasRenameProvider",!1,o.NC("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.uy("editorHasSignatureHelpProvider",!1,o.NC("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.uy("editorHasInlayHintsProvider",!1,o.NC("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.uy("editorHasDocumentFormattingProvider",!1,o.NC("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.uy("editorHasDocumentSelectionFormattingProvider",!1,o.NC("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.uy("editorHasMultipleDocumentFormattingProvider",!1,o.NC("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.NC("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},45797:(e,t,i)=>{"use strict";i.d(t,{N:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!=(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},96887:(e,t,i)=>{"use strict";i.d(t,{mY:()=>l,gX:()=>n,MY:()=>r,DI:()=>b,AD:()=>y,gl:()=>c,bw:()=>o,WW:()=>s,uZ:()=>a,WU:()=>_,RW:()=>w,hG:()=>v,vx:()=>C});var n,o,s,r,a,l,c,h=i(73046),d=i(70666),u=i(24314),g=i(4669),p=i(5976),m=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class f extends p.JT{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return m(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return m(this,void 0,void 0,(function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class _{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class b{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}function C(e){return e&&d.o.isUri(e.uri)&&u.e.isIRange(e.range)&&(u.e.isIRange(e.originSelectionRange)||u.e.isIRange(e.targetSelectionRange))}!function(e){const t=new Map;t.set(0,h.l.symbolMethod),t.set(1,h.l.symbolFunction),t.set(2,h.l.symbolConstructor),t.set(3,h.l.symbolField),t.set(4,h.l.symbolVariable),t.set(5,h.l.symbolClass),t.set(6,h.l.symbolStruct),t.set(7,h.l.symbolInterface),t.set(8,h.l.symbolModule),t.set(9,h.l.symbolProperty),t.set(10,h.l.symbolEvent),t.set(11,h.l.symbolOperator),t.set(12,h.l.symbolUnit),t.set(13,h.l.symbolValue),t.set(15,h.l.symbolEnum),t.set(14,h.l.symbolConstant),t.set(15,h.l.symbolEnum),t.set(16,h.l.symbolEnumMember),t.set(17,h.l.symbolKeyword),t.set(27,h.l.symbolSnippet),t.set(18,h.l.symbolText),t.set(19,h.l.symbolColor),t.set(20,h.l.symbolFile),t.set(21,h.l.symbolReference),t.set(22,h.l.symbolCustomColor),t.set(23,h.l.symbolFolder),t.set(24,h.l.symbolTypeParameter),t.set(25,h.l.account),t.set(26,h.l.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=h.l.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(n||(n={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(o||(o={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(s||(s={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(r||(r={})),function(e){const t=new Map;t.set(0,h.l.symbolFile),t.set(1,h.l.symbolModule),t.set(2,h.l.symbolNamespace),t.set(3,h.l.symbolPackage),t.set(4,h.l.symbolClass),t.set(5,h.l.symbolMethod),t.set(6,h.l.symbolProperty),t.set(7,h.l.symbolField),t.set(8,h.l.symbolConstructor),t.set(9,h.l.symbolEnum),t.set(10,h.l.symbolInterface),t.set(11,h.l.symbolFunction),t.set(12,h.l.symbolVariable),t.set(13,h.l.symbolConstant),t.set(14,h.l.symbolString),t.set(15,h.l.symbolNumber),t.set(16,h.l.symbolBoolean),t.set(17,h.l.symbolArray),t.set(18,h.l.symbolObject),t.set(19,h.l.symbolKey),t.set(20,h.l.symbolNull),t.set(21,h.l.symbolEnumMember),t.set(22,h.l.symbolStruct),t.set(23,h.l.symbolEvent),t.set(24,h.l.symbolOperator),t.set(25,h.l.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=h.l.symbolProperty),i}}(a||(a={}));class y{constructor(e){this.value=e}}y.Comment=new y("comment"),y.Imports=new y("imports"),y.Region=new y("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(l||(l={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(c||(c={}));const w=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new g.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,p.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new f(this,e,t);return this._factories.set(e,n),(0,p.OF)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return m(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}get(e){return this._map.get(e)||null}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},75383:(e,t,i)=>{"use strict";i.d(t,{$9:()=>h,UF:()=>c,n8:()=>l,r7:()=>a,tI:()=>d});var n=i(97295),o=i(49119),s=i(19111),r=i(51381);function a(e,t,i,s=!0,r){if(e<4)return null;const a=r.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!a)return null;if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const l=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}(t,i,a);if(l<0)return null;if(l<1)return{indentation:"",action:null};const c=t.getLineContent(l);if(a.shouldIncrease(c)||a.shouldIndentNextLine(c))return{indentation:n.V8(c),action:o.wU.Indent,line:l};if(a.shouldDecrease(c))return{indentation:n.V8(c),action:null,line:l};{if(1===l)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};const e=l-1,i=a.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(s)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};for(let e=l;e>0;e--){const i=t.getLineContent(e);if(a.shouldIncrease(i))return{indentation:n.V8(i),action:o.wU.Indent,line:e};if(a.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(a.shouldDecrease(i))return{indentation:n.V8(i),action:null,line:e}}return{indentation:n.V8(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,s,r,l){if(e<4)return null;const c=l.getLanguageConfiguration(i);if(!c)return null;const h=l.getLanguageConfiguration(i).indentRulesSupport;if(!h)return null;const d=a(e,t,s,void 0,l),u=t.getLineContent(s);if(d){const i=d.line;if(void 0!==i){let a=!0;for(let e=i;e<s-1;e++)if(!/^\s*$/.test(t.getLineContent(e))){a=!1;break}if(a){const s=c.onEnter(e,"",t.getLineContent(i),"");if(s){let e=n.V8(t.getLineContent(i));return s.removeText&&(e=e.substring(0,e.length-s.removeText)),s.indentAction===o.wU.Indent||s.indentAction===o.wU.IndentOutdent?e=r.shiftIndent(e):s.indentAction===o.wU.Outdent&&(e=r.unshiftIndent(e)),h.shouldDecrease(u)&&(e=r.unshiftIndent(e)),s.appendText&&(e+=s.appendText),n.V8(e)}}}return h.shouldDecrease(u)?d.action===o.wU.Indent?d.indentation:r.unshiftIndent(d.indentation):d.action===o.wU.Indent?r.shiftIndent(d.indentation):d.indentation}return null}function c(e,t,i,l,c){if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);const h=t.tokenization.getLineTokens(i.startLineNumber),d=(0,s.wH)(h,i.startColumn-1),u=d.getLineContent();let g,p,m=!1;d.firstCharOffset>0&&h.getLanguageId(0)!==d.languageId?(m=!0,g=u.substr(0,i.startColumn-1-d.firstCharOffset)):g=h.getLineContent().substring(0,i.startColumn-1),p=i.isEmpty()?u.substr(i.startColumn-1-d.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-d.firstCharOffset);const f=c.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!f)return null;const _=g,v=n.V8(g),b={tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?_:t.getLineContent(e)},C=n.V8(h.getLineContent()),y=a(e,b,i.startLineNumber+1,void 0,c);if(!y){const e=m?C:v;return{beforeEnter:e,afterEnter:e}}let w=m?C:y.indentation;return y.action===o.wU.Indent&&(w=l.shiftIndent(w)),f.shouldDecrease(p)&&(w=l.unshiftIndent(w)),{beforeEnter:m?C:v,afterEnter:w}}function h(e,t,i,n,s,l){if(e<4)return null;const c=(0,r.n2)(t,i.startLineNumber,i.startColumn);if(c.firstCharOffset)return null;const h=l.getLanguageConfiguration(c.languageId).indentRulesSupport;if(!h)return null;const d=c.getLineContent(),u=d.substr(0,i.startColumn-1-c.firstCharOffset);let g;if(g=i.isEmpty()?d.substr(i.startColumn-1-c.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-c.firstCharOffset),!h.shouldDecrease(u+g)&&h.shouldDecrease(u+n+g)){const n=a(e,t,i.startLineNumber,!1,l);if(!n)return null;let r=n.indentation;return n.action!==o.wU.Indent&&(r=s.unshiftIndent(r)),r}return null}function d(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},1615:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(49119),o=i(51381);function s(e,t,i,s){const r=(0,o.n2)(t,i.startLineNumber,i.startColumn),a=s.getLanguageConfiguration(r.languageId);if(!a)return null;const l=r.getLineContent(),c=l.substr(0,i.startColumn-1-r.firstCharOffset);let h;h=i.isEmpty()?l.substr(i.startColumn-1-r.firstCharOffset):(0,o.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);let d="";if(i.startLineNumber>1&&0===r.firstCharOffset){const e=(0,o.n2)(t,i.startLineNumber-1);e.languageId===r.languageId&&(d=e.getLineContent())}const u=a.onEnter(e,d,c,h);if(!u)return null;const g=u.indentAction;let p=u.appendText;const m=u.removeText||0;p?g===n.wU.Indent&&(p="\t"+p):p=g===n.wU.Indent||g===n.wU.IndentOutdent?"\t":"";let f=(0,o.u0)(t,i.startLineNumber,i.startColumn);return m&&(f=f.substring(0,f.length-m)),{indentAction:g,appendText:p,removeText:m,indentation:f}}},72042:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});const n=(0,i(72065).yh)("languageService")},49119:(e,t,i)=>{"use strict";var n;i.d(t,{V6:()=>o,c$:()=>s,wU:()=>n}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(0===e.getTokenCount())return!0;const i=e.findTokenIndexAtOffset(t-2),n=e.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(e,t){for(let i=e;i<=t;i++){const e=String.fromCharCode(i);if(!this.open.includes(e)&&!this.close.includes(e))return e}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class s{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)r(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),r(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),r(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),r(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&r(this.autoClosingPairsCloseSingleChar,t.close,t)}}function r(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}},51381:(e,t,i)=>{"use strict";i.d(t,{c_:()=>T,u0:()=>R,n2:()=>O});var n=i(4669),o=i(5976),s=i(97295),r=i(270),a=i(49119),l=i(19111);class c{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";var h=i(9488),d=i(34302);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,h.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=d.Vr.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const c=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(17301);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e<o;e++){const o=this._regExpRules[e];if([{reg:o.beforeText,text:i},{reg:o.afterText,text:n},{reg:o.previousLineText,text:t}].every((e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){const t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.wU.IndentOutdent}}if(e>=2&&i.length>0)for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.wU.Indent};return null}static _createOpenBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dL)(e),null}}}var _=i(72065),v=i(33108),b=i(72042),C=i(65026),y=i(68801),w=i(701);class S{constructor(e,t){let i;this.languageId=e,i=t.colorizedBracketPairs?k(t.colorizedBracketPairs.map((e=>[e[0],e[1]]))):t.brackets?k(t.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):[];const n=new w.b((e=>{const t=new Set;return{info:new L(this,e,t),closing:t}})),o=new w.b((e=>{const t=new Set;return{info:new E(this,e,t),opening:t}}));for(const[e,t]of i){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function k(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class E extends x{constructor(e,t,i){super(e,t),this.closedBrackets=i,this.isOpeningBracket=!1}closes(e){if(e.languageId===this.languageId&&e.config!==this.config)throw new m.he("Brackets from different language configuration cannot be used.");return this.closedBrackets.has(e)}getClosedBrackets(){return[...this.closedBrackets]}}var N=function(e,t){return function(i,n){t(i,n,e)}};class D{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const T=(0,_.yh)("languageConfigurationService");let I=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(A));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new D(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new D(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new D(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new V(e,{});o=new V(e,{})}const s=function(e,t){const i=t.getValue(A.brackets,{overrideIdentifier:e}),n=t.getValue(A.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:M(i),colorizedBracketPairs:M(n)}}(o.languageId,i),r=F([o.underlyingConfig,s]);return new V(o.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([N(0,v.Ui),N(1,b.O)],I);const A={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function M(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function R(e,t,i){const n=e.getLineContent(t);let o=s.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}function O(e,t,i){e.tokenization.forceTokenization(t);const n=e.tokenization.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new B(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)((()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new V(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(B.cmp),F(this._entries.map((e=>e.configuration))))}}function F(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class B{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class H{constructor(e){this.languageId=e}}class W extends o.JT{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._register(this.register(y.bd,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new H(e)),(0,o.OF)((()=>{s.dispose(),this._onDidChange.fire(new H(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class V{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=V._handleComments(this.underlyingConfig),this.characterPair=new c(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new d.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.z)(T,I,1)},68801:(e,t,i)=>{"use strict";i.d(t,{bd:()=>c,dQ:()=>l});var n=i(63580),o=i(4669),s=i(89872),r=i(81170),a=i(23193);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return this._languages}};s.B.add("editor.modesRegistry",l);const c="plaintext";l.registerLanguage({id:c,extensions:[".txt"],aliases:[n.NC("plainText.alias","Plain Text"),"text"],mimetypes:[r.v.text]}),s.B.as(a.IP.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},276:(e,t,i)=>{"use strict";i.d(t,{Dy:()=>r,Ri:()=>s,TJ:()=>o});var n=i(96887);const o=new class{clone(){return this}equals(e){return this===e}};function s(e,t){return new n.hG([new n.WU(0,"",e)],t)}function r(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e<<0|2<<24)>>>0,new n.DI(i,null===t?o:t)}},19111:(e,t,i)=>{"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n);let r=n;for(;r+1<i&&e.getLanguageId(r+1)===s;)r++;let a=n;for(;a>0&&e.getLanguageId(a-1)===s;)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{Bu:()=>s,wH:()=>n});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function s(e){return 0!=(3&e)}},34302:(e,t,i)=>{"use strict";i.d(t,{EA:()=>a,Vr:()=>p});var n=i(97295),o=i(50072),s=i(24314);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e<t;e++)i[e]=e;const n=(e,t)=>{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e<t;e++)i[e]===s&&(i[e]=o)};for(let s=0;s<t;s++){const r=e[s];for(let a=s+1;a<t;a++)n(r,e[a])&&o(i[s],i[a])}const s=[];for(let n=0;n<t;n++){const o=[],r=[];for(let s=0;s<t;s++)if(i[s]===n){const[t,i]=e[s];o.push(t),r.push(i)}o.length>0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(c),o.reverse(),u(o)}(t.open,t.close,i,n),function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(c),o.reverse(),u(o.map(g))}(t.open,t.close,i,n)))),this.forwardRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t)}(this.brackets),this.reversedRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t.map(g))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function l(e,t,i,n){for(let o=0,s=t.length;o<s;o++){if(o===i)continue;const s=t[o];for(const t of s.open)t.indexOf(e)>=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function h(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function d(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function u(e){const t=`(${e.map(d).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,a=o[0].length;if(0===a)return null;const l=n+r;return new s.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},82963:(e,t,i)=>{"use strict";i.d(t,{C2:()=>l,Fq:()=>c});var n=i(97295),o=i(77378),s=i(96887),r=i(276);const a={getInitialState:()=>r.TJ,tokenizeEncoded:(e,t,i)=>(0,r.Dy)(0,i)};function l(e,t,i){return n=this,o=void 0,l=function*(){if(!i)return h(t,e.languageIdCodec,a);const n=yield s.RW.getOrCreate(i);return h(t,e.languageIdCodec,n||a)},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{a(l.next(e))}catch(e){t(e)}}function s(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,s)}a((l=l.apply(n,o||[])).next())}));var n,o,r,l}function c(e,t,i,n,o,s,r){let a="<div>",l=n,c=0,h=!0;for(let d=0,u=t.getCount();d<u;d++){const u=t.getEndOffset(d);if(u<=n)continue;let g="";for(;l<u&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:{let e=s-(l+c)%s;for(c+=e-1;e>0;)r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0),e--;break}case 60:g+="&lt;",h=!1;break;case 62:g+="&gt;",h=!1;break;case 38:g+="&amp;",h=!1;break;case 0:g+="&#00;",h=!1;break;case 65279:case 8232:case 8233:case 133:g+="<22>",h=!1;break;case 13:g+="&#8203",h=!1;break;case 32:r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0);break;default:g+=String.fromCharCode(t),h=!1}}if(a+=`<span style="${t.getInlineStyle(d,i)}">${g}</span>`,u>o||l>=o)break}return a+="</div>",a}function h(e,t,i){let s='<div class="monaco-tokenized-source">';const r=n.uq(e);let a=i.getInitialState();for(let e=0,l=r.length;e<l;e++){const l=r[e];e>0&&(s+="<br/>");const c=i.tokenizeEncoded(l,!0,a);o.A.convertToEndOffset(c.tokens,l.length);const h=new o.A(c.tokens,l,t).inflate();let d=0;for(let e=0,t=h.getCount();e<t;e++){const t=h.getClassName(e),i=h.getEndOffset(e);s+=`<span class="${t}">${n.YU(l.substring(d,i))}</span>`,d=i}a=c.endState}return s+="</div>",s}},84973:(e,t,i)=>{"use strict";i.d(t,{F5:()=>o,Hf:()=>c,Qi:()=>h,RM:()=>s,Tx:()=>d,dJ:()=>a,je:()=>u,pt:()=>g,sh:()=>n,tk:()=>l});var n,o,s,r=i(36248);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(o||(o={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class h{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class d{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class u{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},41720:(e,t,i)=>{"use strict";i.d(t,{BH:()=>f,Dm:()=>v,Kd:()=>l,Y0:()=>c,n2:()=>_});var n=i(17301),o=i(7988),s=i(45035),r=i(61761);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,s.Ii)(n,t.length)),i&&(n=(0,s.Ii)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,s.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class c extends a{static create23(e,t,i,n=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,s.Ii)(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,s.Ii)(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new d(o,e.listHeight+1,e,t,i,r):new h(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(s.xl,0,[],r.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new n.he;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){const e=this.getChild(n);t=(0,s.Ii)(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){const o=this.getChild(e);o&&(i=Math.min(i,o.computeMinIndentation(n,t)),n=(0,s.Ii)(n,o.length))}return this.cachedMinIndentation=i,i}}class h extends c{get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,t,i,n,o,s){super(e,t,s),this._item1=i,this._item2=n,this._item3=o}deepClone(){return new h(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class d extends h{toMutable(){return new h(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class u extends c{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}constructor(e,t,i,n){super(e,t,n),this._children=i}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new u(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class g extends u{toMutable(){return new u(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const p=[];class m extends a{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return p}deepClone(){return this}}class f extends m{get kind(){return 0}get missingOpeningBracketIds(){return r.tS.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){const i=(0,s.Hw)(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,r=(0,s.W9)((0,s.Ii)(e,this.length))+1;let a=Number.MAX_SAFE_INTEGER;for(let e=n;e<=r;e++){const i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);if(0===i)continue;const s=o.i.visibleColumnFromColumn(n,i,t.getOptions().tabSize);a=Math.min(a,s)}return a}}class _ extends m{static create(e,t,i){return new _(e,t,i)}get kind(){return 1}get missingOpeningBracketIds(){return r.tS.getEmpty()}constructor(e,t,i){super(e),this.bracketInfo=t,this.bracketIds=i}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class v extends m{get kind(){return 3}constructor(e,t){super(t),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}},2442:(e,t,i)=>{"use strict";i.d(t,{Q:()=>o,Y:()=>s});var n=i(45035);class o{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class s{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>r.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,n.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,n.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(!(0,n.By)(i,e))break;{this.nextEditIdx++;const e=(0,n.Hw)(i),o=(0,n.Hw)(this.translateOldToCur(t.endOffsetBeforeObj)),s=e.lineCount-o.lineCount;this.deltaOldToNewLineCount+=s;const r=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,a=e.columnCount-o.columnCount;this.deltaOldToNewColumnCount=r+a,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class r{static from(e){return new r(e.startOffset,e.endOffset,e.newLength)}constructor(e,t,i){this.endOffsetBeforeObj=(0,n.Hw)(t),this.endOffsetAfterObj=(0,n.Hw)((0,n.Ii)(e,i)),this.offsetObj=(0,n.Hw)(e)}}},35382:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var n=i(97295),o=i(41720),s=i(45035),r=i(61761),a=i(6735);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const n=new Map;for(const t of e.bracketsNew.openingBrackets){const e=(0,s.Hg)(0,t.bracketText.length),l=i(t),c=r.tS.getEmpty().add(l,r.Qw);n.set(t.bracketText,new a.WU(e,1,l,c,o.n2.create(e,t,c)))}for(const t of e.bracketsNew.closingBrackets){const e=(0,s.Hg)(0,t.bracketText.length);let l=r.tS.getEmpty();const c=t.getClosedBrackets();for(const e of c)l=l.add(i(e),r.Qw);n.set(t.bracketText,new a.WU(e,2,i(c[0]),l,o.n2.create(e,t,l)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){let t=(0,n.ec)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class c{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},45035:(e,t,i)=>{"use strict";i.d(t,{BE:()=>_,By:()=>b,F_:()=>g,Hg:()=>h,Hw:()=>d,Ii:()=>p,PZ:()=>y,Qw:()=>w,VR:()=>v,W9:()=>u,Zq:()=>C,av:()=>r,oR:()=>S,rM:()=>f,tQ:()=>m,xd:()=>l,xl:()=>a});var n=i(97295),o=i(24314);class s{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function r(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}s.zero=new s(0,0);const a=0;function l(e){return 0===e}const c=Math.pow(2,26);function h(e,t){return e*c+t}function d(e){const t=e,i=Math.floor(t/c);return new s(i,t-i*c)}function u(e){return Math.floor(e/c)}function g(e){return e}function p(e,t){let i=e+t;return t>=c&&(i-=e%c),i}function m(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function f(e,t){return e===t}function _(e,t){const i=e,n=t;if(n-i<=0)return a;const o=Math.floor(i/c),s=Math.floor(n/c),r=n-s*c;return o===s?h(0,r-(i-o*c)):h(s-o,r)}function v(e,t){return e<t}function b(e,t){return e<=t}function C(e,t){return e>=t}function y(e){return h(e.lineNumber-1,e.column-1)}function w(e,t){const i=e,n=Math.floor(i/c),s=i-n*c,r=t,a=Math.floor(r/c),l=r-a*c;return new o.e(n+1,s+1,a+1,l+1)}function S(e){const t=(0,n.uq)(e);return h(t.length-1,t[t.length-1].length)}},13883:(e,t,i)=>{"use strict";i.d(t,{w:()=>g});var n=i(41720),o=i(2442),s=i(61761),r=i(45035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const o=i>>1;for(let s=0;s<o;s++){const o=s<<1;e[s]=n.Y0.create23(e[o],e[o+1],o+3===i?e[o+2]:null,t)}i=o}return n.Y0.create23(e[0],e[1],i>=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function c(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const o=[];let s;for(;;){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(t.unappendChild(),s,null,!1):(t.appendChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(e,s,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const o=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let s=t;for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(s,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(s,e,null,!1):e}(t,e)}class h{constructor(e){this.lastOffset=r.xl,this.nextNodes=[e],this.offsets=[r.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.VR)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,r.VR)(e,n))return;if((0,r.VR)(n,e))if((0,r.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=d(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=d(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=d(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function d(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new h(i):void 0,this.positionMapper=new o.Y(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(s.tS.getEmpty());return e||(e=n.Y0.getEmpty()),e}parseList(e){const t=[];for(;;){let i=this.tryReadChildFromCache(e);if(!i){const t=this.tokenizer.peek();if(!t||2===t.kind&&t.bracketIds.intersects(e))break;i=this.parseChild(e)}4===i.kind&&0===i.childrenLength||t.push(i)}const i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t<e.length&&e[t].listHeight===n;)t++;return t-i>=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())l(n,o)<=l(o,e)?(n=c(n,o),o=e):o=c(o,e);return c(n,o)}(t):a(t,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.xd)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!(0,r.VR)(i.length,t))&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e){this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new n.Dm(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),o=this.parseList(i),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),n.Kd.create(t.astNode,o,s.astNode)):n.Kd.create(t.astNode,o,null)}default:throw new Error("unexpected")}}}},61761:(e,t,i)=>{"use strict";i.d(t,{FE:()=>r,Qw:()=>s,tS:()=>o});const n=[];class o{static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<<i|this.items;return e===this.items?this:o.create(e,this.additionalItems)}n--;const s=this.additionalItems.slice(0);for(;s.length<n;)s.push(0);return s[n]|=1<<(31&i),o.create(this.items,s)}merge(e){const t=this.items|e.items;if(this.additionalItems===n&&e.additionalItems===n)return t===this.items?this:t===e.items?e:o.create(t,n);const i=[];for(let t=0;t<Math.max(this.additionalItems.length,e.additionalItems.length);t++){const n=this.additionalItems[t]||0,o=e.additionalItems[t]||0;i.push(n|o)}return o.create(t,i)}intersects(e){if(0!=(this.items&e.items))return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(0!=(this.additionalItems[t]&e.additionalItems[t]))return!0;return!1}}o.cache=new Array(129),o.empty=o.create(0,n);const s={getKey:e=>e};class r{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:(e,t,i)=>{"use strict";i.d(t,{WU:()=>l,g:()=>d,xH:()=>c});var n=i(17301),o=i(45797),s=i(41720),r=i(45035),a=i(61761);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class c{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new h(this.textModel,this.bracketTokens),this._offset=r.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.Hg)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.Ii)(this._offset,e);const t=(0,r.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,s=n.getCount();let a=null;if(this.lineTokenOffset<s){const l=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<s&&l===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const c=0===o.N.getTokenType(l),h=o.N.containsBalancedBrackets(l),d=n.getEndOffset(this.lineTokenOffset);if(h&&c&&this.lineCharOffset<d){const e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,d),i=this.bracketTokens.getSingleLanguageBracketTokens(e),o=i.regExpGlobal;if(o){o.lastIndex=0;const e=o.exec(t);e&&(a=i.getToken(e[0]),a&&(this.lineCharOffset+=e.index))}}if(i+=d-this.lineCharOffset,a){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=a;break}return this.lineCharOffset+=(0,r.F_)(a.length),a}this.lineTokenOffset++,this.lineCharOffset=d}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3)break}if(i>1500)break}const n=(0,r.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new s.BH(n))}}class d{constructor(e,t){this.text=e,this._offset=r.xl,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let c,h=0,d=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.Hg)(0,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(0,e))));const m=[];for(let e=0;e<60;e++)m.push(new l((0,r.Hg)(1,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(1,e))));if(n)for(n.lastIndex=0;null!==(c=n.exec(e));){const e=c.index,i=c[0];if("\n"===i)h++,d=e+1;else{if(u!==e){let t;if(g===h){const i=e-u;if(i<p.length)t=p[i];else{const e=(0,r.Hg)(0,i);t=new l(e,0,-1,a.tS.getEmpty(),new s.BH(e))}}else{const i=h-g,n=e-d;if(1===i&&n<m.length)t=m[n];else{const e=(0,r.Hg)(i,n);t=new l(e,0,-1,a.tS.getEmpty(),new s.BH(e))}}o.push(t)}o.push(t.getToken(i)),u=e+i.length,g=h}}const f=e.length;if(u!==f){const e=g===h?(0,r.Hg)(0,f-u):(0,r.Hg)(h-g,f-d);o.push(new l(e,0,-1,a.tS.getEmpty(),new s.BH(e)))}this.length=(0,r.Hg)(h,f-d),this.tokens=o}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new n.B8}}},95215:(e,t,i)=>{"use strict";i.d(t,{NL:()=>m,e9:()=>p});var n=i(63580),o=i(17301),s=i(3860),r=i(70666),a=i(93033),l=i(53060),c=i(95935);function h(e){return e.toString()}class d{static create(e,t){const i=e.getAlternativeVersionId(),n=g(e);return new d(i,i,n,n,t,t,[])}constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;o<n;o++){const n=l.Ag(e,t);t+=4;const o=l.Ag(e,t);t+=4;const r=l.Ag(e,t);t+=4;const a=l.Ag(e,t);t+=4,i.push(new s.Y(n,o,r,a))}return t}serialize(){let e=10+d._writeSelectionsSize(this.beforeCursorState)+d._writeSelectionsSize(this.afterCursorState)+4;for(const t of this.changes)e+=t.writeSize();const t=new Uint8Array(e);let i=0;l.T4(t,this.beforeVersionId,i),i+=4,l.T4(t,this.afterVersionId,i),i+=4,l.Cg(t,this.beforeEOL,i),i+=1,l.Cg(t,this.afterEOL,i),i+=1,i=d._writeSelections(t,this.beforeCursorState,i),i=d._writeSelections(t,this.afterCursorState,i),l.T4(t,this.changes.length,i),i+=4;for(const e of this.changes)i=e.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=l.Ag(t,i);i+=4;const o=l.Ag(t,i);i+=4;const s=l.Q$(t,i);i+=1;const r=l.Q$(t,i);i+=1;const c=[];i=d._readSelections(t,i,c);const h=[];i=d._readSelections(t,i,h);const u=l.Ag(t,i);i+=4;const g=[];for(let e=0;e<u;e++)i=a.q.read(t,i,g);return new d(n,o,s,r,c,h,g)}}class u{get type(){return 0}get resource(){return r.o.isUri(this.model)?this.model:this.model.uri}constructor(e,t,i,n){this.label=e,this.code=t,this.model=i,this._data=d.create(i,n)}toString(){return(this._data instanceof d?this._data:d.deserialize(this._data)).changes.map((e=>e.toString())).join(", ")}matchesResource(e){return(r.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof d}append(e,t,i,n,o){this._data instanceof d&&this._data.append(e,t,i,n,o)}close(){this._data instanceof d&&(this._data=this._data.serialize())}open(){this._data instanceof d||(this._data=d.deserialize(this._data))}undo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof d&&(this._data=this._data.serialize()),this._data.byteLength+168}}function g(e){return"\n"===e.getEOL()?0:1}function p(e){return!!e&&(e instanceof u||e instanceof class{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=h(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=h(e);return this._editStackElementsMap.has(t)}setModel(e){const t=h(r.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=h(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=h(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=h(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);p(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);p(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(p(i)&&i.canAppend(this._model))return i;const o=new u(n.NC("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=m._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),g(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},1516:(e,t,i)=>{"use strict";i.d(t,{W:()=>d,l:()=>h});var n=i(9488),o=i(97295),s=i(7988),r=i(24314),a=i(94954),l=i(59616),c=i(65094);class h extends a.U{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){l=t,c=e;break}}}};let d=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===d){d=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,u=e;break}}}if(-1!==g&&(-2===g||g<e-1)){g=-1,p=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,C=0,y=0;for(let o=0;_||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r<t)&&(_=!1),o>1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let w=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,w=Math.ceil(e/this.textModel.getOptions().indentSize)):(h(r),w=this._getIndentLevelForWhitespaceLine(s,a,c))}let S=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(d=g-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&S>=0&&y+1===S){_=!1,f=g,v=g,C=S;continue}if(r>=1&&w>=0&&w-1===y){b=!1,f=r,v=r,C=w;continue}if(f=e,v=e,C=y,0===C)return{startLineNumber:f,endLineNumber:v,indent:C}}_&&(w>=C?f=r:_=!1),b&&(S>=C?v=g:b=!1)}else y=w}return{startLineNumber:f,endLineNumber:v,indent:C}}getLinesBracketGuides(e,t,i,s){var a;const l=[];for(let i=e;i<=t;i++)l.push([]);const h=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.e(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let u;if(i&&h.length>0){const o=(e<=i.lineNumber&&i.lineNumber<=t?h:this.textModel.bracketPairs.getBracketPairsInRange(r.e.fromPositions(i)).toArray()).filter((e=>r.e.strictContainsPosition(e.range,i)));u=null===(a=(0,n.dF)(o,(e=>!0)))||void 0===a?void 0:a.range}const g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new d;for(const i of h){if(!i.closingBracketRange)continue;const n=u&&i.range.equalsRange(u);if(!n&&!s.includeInactive)continue;const r=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(s.highlightActive&&n?" "+p.activeClassName:""),a=i.openingBracketRange.getStartPosition(),h=i.closingBracketRange.getStartPosition(),d=s.horizontalGuides===c.s6.Enabled||s.horizontalGuides===c.s6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){d&&l[i.range.startLineNumber-e].push(new c.UO(-1,i.openingBracketRange.getEndPosition().column,r,new c.vW(!1,h.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(h),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1);let v=!1;o.LC(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))<i.closingBracketRange.startColumn-1&&(v=!0);const b=Math.max(a.lineNumber,e),C=Math.min(h.lineNumber,t),y=v?1:0;for(let t=b;t<C+y;t++)l[t-e].push(new c.UO(_,-1,r,null,t===a.lineNumber?a.column:-1,t===h.lineNumber?h.column:-1));d&&(a.lineNumber>=e&&f>_&&l[a.lineNumber-e].push(new c.UO(_,-1,r,new c.vW(!1,a.column),-1,-1)),h.lineNumber<=t&&m>_&&l[h.lineNumber-e].push(new c.UO(_,-1,r,new c.vW(!v,h.column),-1,-1)))}for(const e of l)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return l}getVisibleColumnFromPosition(e){return s.i.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,h=-1;for(let o=e;o<=t;o++){const t=o-e,d=this._computeIndentLevel(o-1);if(d>=0)a=o-1,l=d,r[t]=Math.ceil(d/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c<o-1)){c=-1,h=-1;for(let e=o;e<i;e++){const t=this._computeIndentLevel(e);if(t>=0){c=e,h=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,h)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t<i?1+Math.floor(t/n.indentSize):t===i||e?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}}class d{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,t,i){return this.getInlineClassNameOfLevel(i?t:e)}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}},39125:(e,t,i)=>{"use strict";i.d(t,{nD:()=>D,Lv:()=>L,Nr:()=>k,Xp:()=>S});var n=i(50187),o=i(24314),s=i(84973);class r{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==a)return l(this.right);let e=this;for(;e.parent!==a&&e.parent.left!==e;)e=e.parent;return e.parent===a?a:e.parent}prev(){if(this.left!==a)return c(this.left);let e=this;for(;e.parent!==a&&e.parent.right!==e;)e=e.parent;return e.parent===a?a:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const a=new r(null,0);function l(e){for(;e.left!==a;)e=e.left;return e}function c(e){for(;e.right!==a;)e=e.right;return e}function h(e){return e===a?0:e.size_left+e.piece.length+h(e.right)}function d(e){return e===a?0:e.lf_left+e.piece.lineFeedCnt+d(e.right)}function u(){a.parent=a}function g(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==a&&(i.left.parent=t),i.parent=t.parent,t.parent===a?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function p(e,t){const i=t.left;t.left=i.right,i.right!==a&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===a?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function m(e,t){let i,n;if(t.left===a?(n=t,i=n.right):t.right===a?(n=t,i=n.left):(n=l(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),u(),void(e.root.parent=a);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,v(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,v(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==a&&(n.left.parent=n),n.right!==a&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,v(e,n)),t.detach(),i.parent.left===i){const t=h(i),n=d(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,_(e,i.parent,o,s)}}if(v(e,i.parent),o)return void u();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,g(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,p(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,g(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,p(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,g(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,p(e,i.parent),i=e.root));i.color=0,u()}function f(e,t){for(v(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&g(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,p(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&p(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,g(e,t.parent.parent))}e.root.color=0}function _(e,t,i,n){for(;t!==e.root&&t!==a;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function v(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=h((t=t.parent).left)-t.size_left,n=d(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}a.parent=a,a.left=a,a.right=a,a.color=0;var b=i(77277);const C=65535;function y(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class w{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function S(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t<o;t++){const s=e.charCodeAt(t);13===s?t+1<o&&10===e.charCodeAt(t+1)?(i[n++]=t+2,t++):i[n++]=t+1:10===s&&(i[n++]=t+1)}return t?y(i):i}function k(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a<l;a++){const c=t.charCodeAt(a);13===c?a+1<l&&10===t.charCodeAt(a+1)?(s++,e[i++]=a+2,a++):(n++,e[i++]=a+1):10===c?(o++,e[i++]=a+1):r&&9!==c&&(c<32||c>126)&&(r=!1)}const a=new w(y(e),n,o,s,r);return e.length=0,a}class x{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class L{constructor(e,t){this.buffer=e,this.lineStarts=t}}class E{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==a&&e.iterate(e.root,(e=>(e!==a&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class N{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n<i.length;n++){const o=i[n];(null===o.node.parent||o.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class D{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new L("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=a,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t<i;t++)if(e[t].buffer.length>0){e[t].lineStarts||(e[t].lineStarts=S(e[t].buffer));const i=new x(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new N(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const s=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(o<=t||o+l<i)return n+=a,o+=l,!0;const c=n.replace(/\r\n|\r|\n/g,e);return s.push(new L(c,S(c))),n=a,o=l,!0})),o>0){const t=n.replace(/\r\n|\r|\n/g,e);s.push(new L(t,S(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new E(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==a;)if(n.left!==a&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const o=e;for(;t!==a;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){const e=o-this.getOffsetAt(i+1,1);return new n.L(i+1,e+1)}return new n.L(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===a){const t=o-e-this.getOffsetAt(i+1,1);return new n.L(i+1,t+1)}t=t.right}return new n.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==a;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===a)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const l=this._buffers[s.bufferIndex].buffer,c=this._buffers[s.bufferIndex].lineStarts,h=s.start.line,d=s.end.line;let u=c[h]+s.start.column;if(n&&(10===l.charCodeAt(u)&&(u++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(h===d)return this._EOLNormalized||13!==l.charCodeAt(u+r-1)?i+=l.substr(u,r):(n=!0,i+=l.substr(u,r-1)),!0;i+=this._EOLNormalized?l.substring(u,Math.max(u,c[h+1]-this._EOLLength)):l.substring(u,c[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;n<d;n++)i=this._EOLNormalized?l.substring(c[n],c[n+1]-this._EOLLength):l.substring(c[n],c[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==l.charCodeAt(c[d]+s.end.column-1)?i=l.substr(c[d],s.end.column):(n=!0,0===s.end.column?t--:i=l.substr(c[d],s.end.column-1)),!0})),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){const t=e.node.next();if(!t)return 0;const i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{const t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){const i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){const t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,s,r,a,l,c,h,d){const u=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),p=this.offsetInBuffer(e.piece.bufferIndex,s),m=this.offsetInBuffer(e.piece.bufferIndex,r);let f;const _={line:0,column:0};let v,C;t._wordSeparators?(v=u.buffer.substring(p,m),C=e=>e+p,t.reset(0)):(v=u.buffer,C=e=>e,t.reset(p));do{if(f=t.next(v),f){if(C(f.index)>=m)return h;this.positionInBuffer(e,C(f.index)-g,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,s,_),r=_.line===s.line?_.column-s.column+n:_.column+1,a=r+f[0].length;if(d[h++]=(0,b.iE)(new o.e(i+t,r,i+t,a),f,l),C(f.index)+f[0].length>=m)return h;if(h>=c)return h}}while(f);return h}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new b.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,h,t,i,n,s,o),o;let d=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=d===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,d,p,c,this.positionInBuffer(u,g-h),t,i,n,s,o),s>=n)return o;d+=l}const h=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const a=this.getLineContent(d).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,h,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(d).substr(h),d,h,s,o,i,n),s>=n)return o;d++,a=this.nodeAt2(d,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){const a=d===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(d).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=d===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,d,g,c,h,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,r,a,l,c,h){const d=e.wordSeparators;if(!c&&e.simpleSearch){const t=e.simpleSearch,c=t.length,u=i.length;let g=-c;for(;-1!==(g=i.indexOf(t,g+c));)if((!d||(0,b.cM)(d,i,u,g,c))&&(l[a++]=new s.tk(new o.e(n,g+1+r,n,g+1+c+r),null),a>=h))return a;return a}let u;t.reset(0);do{if(u=t.next(i),u&&(l[a++]=(0,b.iE)(new o.e(n,u.index+1+r,n,u.index+1+u[0].length+r),u,c),a>=h))return a}while(u);return a}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==a){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.length<C)return this.appendToNode(i,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){const e=[];let o=new x(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new x(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let e=0;e<l.length;e++)c=this.rbInsertRight(c,l[e]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{const e=this.createNewPieces(t);let i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===a)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,s=n.node;if(o===s){const s=this.positionInBuffer(o,i.remainder),r=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){const e=o.next();return m(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,r),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return i.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,s),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,s,r),void this.computeBufferMetadata())}const r=[],l=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,l),this._searchCache.validate(e),0===o.piece.length&&r.push(o);const c=this.positionInBuffer(s,n.remainder);this.deleteNodeHead(s,c),0===s.piece.length&&r.push(s);for(let e=o.next();e!==a&&e!==s;e=e.next())r.push(e);const h=0===o.piece.length?o.prev():o;this.deleteNodes(r),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const n=t.piece,o={line:n.start.line+1,column:0},s=new x(n.bufferIndex,o,n.end,this.getLineFeedCnt(n.bufferIndex,o,n.end),n.length-1);t.piece=s,e+="\n",_(this,t,-1,-1),0===t.piece.length&&i.push(t)}const n=this.createNewPieces(e);let o=this.rbInsertLeft(t,n[n.length-1]);for(let e=n.length-2;e>=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e<i.length;e++)o=this.rbInsertRight(o,i[e]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,o=e.piece.bufferIndex,s=this._buffers[o].lineStarts,r=s[n.start.line]+n.start.column+t;let a=n.start.line,l=n.end.line,c=0,h=0,d=0;for(;a<=l&&(c=a+(l-a)/2|0,d=s[c],c!==l);)if(h=s[c+1],r<d)l=c-1;else{if(!(r>=h))break;a=c+1}return i?(i.line=c,i.column=r-d,null):{line:c,column:r-d}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)m(this,e[t])}createNewPieces(e){if(e.length>C){const t=[];for(;e.length>C;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,C),e=e.substring(C));const o=S(n);t.push(new x(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new L(n,o))}const i=S(e);return t.push(new x(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new L(e,i)),t}let t=this._buffers[0].buffer.length;const i=S(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,r={line:s,column:o-this._buffers[0].lineStarts[s]},a=new x(0,n,r,this.getLineFeedCnt(0,n,r),o-t);return this._lastChangeBufferPos=r,[a]}getLineRawContent(e,t=0){let i=this.root,n="";const o=this._searchCache.get2(e);if(o){i=o.node;const s=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),r=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt!==e){const n=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return r.substring(a+s,a+n-t)}n=r.substring(a+s,a+i.piece.length)}else{let o=0;const s=e;for(;i!==a;)if(i.left!==a&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==a;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==a;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,c=r-o,h=i.length+c;e.piece=new x(i.bufferIndex,i.start,s,a,h),_(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),c=i.length+l;e.piece=new x(i.bufferIndex,s,i.end,r,c),_(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new x(n.bufferIndex,n.start,l,c,h),_(this,e,h-r,c-a);const d=new x(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=S(t,!1);for(let e=0;e<o.length;e++)o[e]+=n;if(i){const e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const s=this._buffers[0].lineStarts.length-1,r={line:s,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[s]},a=e.piece.length+t.length,l=e.piece.lineFeedCnt,c=this.getLineFeedCnt(0,e.piece.start,r),h=c-l;e.piece=new x(e.piece.bufferIndex,e.piece.start,r,c,a),this._lastChangeBufferPos=r,_(this,e,t.length,h)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==a;)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==a;)if(i.left!==a&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==a;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===a||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==a&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new x(e.piece.bufferIndex,e.piece.start,o,r,s),_(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new x(t.piece.bufferIndex,a,t.piece.end,c,l),_(this,t,-1,-1),0===t.piece.length&&i.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;e<i.length;e++)m(this,i[e])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)m(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new x(e.bufferIndex,t,e.end,o,n),_(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===a)return t(a);const i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===a)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),o=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,o)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new r(t,1);if(i.left=a,i.right=a,i.parent=a,i.size_left=0,i.lf_left=0,this.root===a)this.root=i,i.color=0;else if(e.right===a)e.right=i,i.parent=e;else{const t=l(e.right);t.left=i,i.parent=t}return f(this,i),i}rbInsertLeft(e,t){const i=new r(t,1);if(i.left=a,i.right=a,i.parent=a,i.size_left=0,i.lf_left=0,this.root===a)this.root=i,i.color=0;else if(e.left===a)e.left=i,i.parent=e;else{const t=c(e.left);t.right=i,i.parent=t}return f(this,i),i}}},91567:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(4669),o=i(97295),s=i(24314),r=i(84973),a=i(39125),l=i(23795),c=i(93033),h=i(5976);class d extends h.JT{constructor(e,t,i,o,s,r,l){super(),this._onDidChangeContent=this._register(new n.Q5),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=o,this._mightContainUnusualLineTerminators=s,this._pieceTree=new a.nD(e,i,l)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),o=this.getPositionAt(i);return new s.e(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);let o=0;const s=this._getEndOfLine(t),r=this.getEOL();return s.length!==r.length&&(o=(s.length-r.length)*(e.endLineNumber-e.startLineNumber)),n-i+o}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let t=n;t<=s;t++){const r=this.getLineContent(t),a=t===n?e.startColumn-1:0,l=t===s?e.endColumn-1:r.length;for(let e=a;e<l;e++)o.ZG(r.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=o.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=o.ow(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,a=this._mightContainNonBasicASCII,h=!0,u=[];for(let t=0;t<e.length;t++){const i=e[t];h&&i._isTracked&&(h=!1);const r=i.range;if(i.text){let e=!0;a||(e=!o.$i(i.text),a=e),!n&&e&&(n=o.Ut(i.text)),!s&&e&&(s=o.ab(i.text))}let c="",d=0,g=0,p=0;if(i.text){let e;[d,g,p,e]=(0,l.Q)(i.text);const t=this.getEOL(),n="\r\n"===t?2:1;c=0===e||e===n?i.text:i.text.replace(/\r\n|\r|\n/g,t)}u[t]={sortIndex:t,identifier:i.identifier||null,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r),text:c,eolCount:d,firstLineLength:g,lastLineLength:p,forceMoveMarkers:Boolean(i.forceMoveMarkers),isAutoWhitespaceEdit:i.isAutoWhitespaceEdit||!1}}u.sort(d._sortOpsAscending);let g=!1;for(let e=0,t=u.length-1;e<t;e++){const t=u[e].range.getEndPosition(),i=u[e+1].range.getStartPosition();if(i.isBeforeOrEqual(t)){if(i.isBefore(t))throw new Error("Overlapping ranges are not allowed!");g=!0}}h&&(u=this._reduceOperations(u));const p=i||t?d._getInverseEditRanges(u):[],m=[];if(t)for(let e=0;e<u.length;e++){const t=u[e],i=p[e];if(t.isAutoWhitespaceEdit&&t.range.isEmpty())for(let e=i.startLineNumber;e<=i.endLineNumber;e++){let n="";e===i.startLineNumber&&(n=this.getLineContent(t.range.startLineNumber),-1!==o.LC(n))||m.push({lineNumber:e,oldContent:n})}}let f=null;if(i){let e=0;f=[];for(let t=0;t<u.length;t++){const i=u[t],n=p[t],o=this.getValueInRange(i.range),s=i.rangeOffset+e;e+=i.text.length-o.length,f[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:o,textChange:new c.q(i.rangeOffset,o,s,i.text)}}g||f.sort(((e,t)=>e.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=a;const _=this._doApplyEdits(u);let v=null;if(t&&m.length>0){m.sort(((e,t)=>t.lineNumber-e.lineNumber)),v=[];for(let e=0,t=m.length;e<t;e++){const t=m[e].lineNumber;if(e>0&&m[e-1].lineNumber===t)continue;const i=m[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===o.LC(n)&&v.push(t)}}return this._onDidChangeContent.fire(),new r.je(f,_,v)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new s.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const c=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.range;t=t||n.forceMoveMarkers,c.push(this.getValueInRange(new s.e(r,a,o.startLineNumber,o.startColumn))),n.text.length>0&&c.push(n.text),r=o.endLineNumber,a=o.endColumn}const h=c.join(""),[d,u,g]=(0,l.Q)(h);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:h,eolCount:d,firstLineLength:u,lastLineLength:g,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(d._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],o=n.range.startLineNumber,r=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(o===a&&r===l&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new s.e(o,r,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,o=null;for(let r=0,a=e.length;r<a;r++){const a=e[r];let l,c,h;if(o?o.range.endLineNumber===a.range.startLineNumber?(l=i,c=n+(a.range.startColumn-o.range.endColumn)):(l=i+(a.range.startLineNumber-o.range.endLineNumber),c=a.range.startColumn):(l=a.range.startLineNumber,c=a.range.startColumn),a.text.length>0){const e=a.eolCount+1;h=1===e?new s.e(l,c,l,c+a.firstLineLength):new s.e(l,c,l+e-1,a.lastLineLength+1)}else h=new s.e(l,c,l,c);i=h.endLineNumber,n=h.endColumn,t.push(h),o=a}return t}static _sortOpsAscending(e,t){const i=s.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=s.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}},89676:(e,t,i)=>{"use strict";i.d(t,{M:()=>a});var n=i(97295),o=i(39125),s=i(91567);class r{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e<n;e++){const n=i[e].buffer.replace(/\r\n|\r|\n/g,t),s=(0,o.Xp)(n);i[e]=new o.Lv(n,s)}const n=new s.A(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class a{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&n.uS(e)&&(this.BOM=n.c1,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=(0,o.Nr)(this._tmpLineStarts,e);this.chunks.push(new o.Lv(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=n.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=n.ab(e))}finish(e=!0){return this._finish(),new r(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=(0,o.Xp)(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}},90310:(e,t,i)=>{"use strict";i.d(t,{Ck:()=>r,oQ:()=>s});var n=i(9488),o=i(85427);class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,o.A)(e);const i=this.values,n=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.A)(e),t=(0,o.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=(0,o.A)(e),t=(0,o.A)(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e<s)i=n-1;else{if(!(e>=o))break;t=n+1}return new a(n,e-s)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e<t;e++){const t=this._values[e],i=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n<t;n++)this._indexBySum[i+n]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,t){this._values[e]!==t&&(this._values[e]=t,this._invalidate(e))}}class a{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}},82948:(e,t,i)=>{"use strict";i.d(t,{HS:()=>nt,qx:()=>ot,yO:()=>Qe});var n=i(9488),o=i(41264),s=i(17301),r=i(4669),a=i(5976),l=i(97295),c=i(70666),h=i(23795),d=i(83158),u=i(50187),g=i(24314),p=i(3860),m=i(22075),f=i(72042),_=i(51381),v=i(84973),b=i(19111),C=i(34302);class y{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class w extends class{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}var S=i(2442),k=i(35382),x=i(45035),L=i(13883),E=i(61761),N=i(6735);function D(e,t){if(0===e.length)return t;const i=new n.H9(T(e)),o=T(t);let s,r=x.xl;function a(e){const t=[];for(;;){if(void 0!==s&&!(0,x.xd)(s)||!(0,x.xd)(r)){let i;void 0!==e&&(0,x.By)(e,r)?(i=e,r=(0,x.BE)(e,r),e=x.xl):(i=r,void 0!==e&&(e=(0,x.BE)(r,e)),r=x.xl),void 0===s?t.push({oldLength:i,newLength:void 0}):(t.push({oldLength:s,newLength:i}),s=x.xl)}if(void 0!==e&&(0,x.xd)(e))break;const n=i.dequeue();if(!n){void 0!==e&&t.push({oldLength:e,newLength:void 0});break}void 0===n.newLength?(r=n.oldLength,s=void 0):(s=n.oldLength,r=n.newLength)}return t}const l=[];function c(e,t,i){if(l.length>0&&(0,x.rM)(l[l.length-1].endOffset,e)){const e=l[l.length-1];l[l.length-1]=new S.Q(e.startOffset,t,(0,x.Ii)(e.newLength,i))}else l.push({startOffset:e,endOffset:t,newLength:i})}let h=x.xl;for(const e of o){const t=a(e.oldLength);if(void 0!==e.newLength){const i=(0,x.tQ)(t,(e=>e.oldLength)),n=(0,x.Ii)(h,i);c(h,n,e.newLength),h=n}else for(const e of t){const t=h;h=(0,x.Ii)(h,e.oldLength),void 0!==e.newLength&&c(t,h,e.newLength)}}const d=a(void 0);for(const e of d){const t=h;h=(0,x.Ii)(h,e.oldLength),void 0!==e.newLength&&c(t,h,e.newLength)}return l}function T(e){const t=[];let i=x.xl;for(const n of e){const e=(0,x.BE)(i,n.startOffset);(0,x.xd)(e)||t.push({oldLength:e});const o=(0,x.BE)(n.startOffset,n.endOffset);t.push({oldLength:o,newLength:n.newLength}),i=n.endOffset}return t}class I extends a.JT{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.Q5,this.denseKeyProvider=new E.FE,this.brackets=new k.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],0===e.tokenization.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new N.g(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,L.w)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.tokenization.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new S.Q((0,x.Hg)(e.fromLineNumber-1,0),(0,x.Hg)(e.toLineNumber,0),(0,x.Hg)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map((e=>{const t=g.e.lift(e.range);return new S.Q((0,x.PZ)(t.getStartPosition()),(0,x.PZ)(t.getEndPosition()),(0,x.oR)(e.text))})).reverse();this.handleEdits(t,!1)}handleEdits(e,t){const i=D(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=D(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,o=new N.xH(this.textModel,this.brackets);return(0,L.w)(o,e,n,i)}getBracketsInRange(e){this.flushQueue();const t=(0,x.Hg)(e.startLineNumber-1,e.startColumn-1),i=(0,x.Hg)(e.endLineNumber-1,e.endColumn-1);return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;R(n,x.xl,n.length,t,i,e,0,0,new Map)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,x.PZ)(e.getStartPosition()),o=(0,x.PZ)(e.getEndPosition());return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,s=new O(e,t,this.textModel);P(n,x.xl,n.length,i,o,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return M(t,x.xl,t.length,(0,x.PZ)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return A(t,x.xl,t.length,(0,x.PZ)(e))}}function A(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=(0,x.Ii)(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if((0,x.VR)(i,n)){const o=A(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,x.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function M(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(i=(0,x.Ii)(t,o.length),(0,x.VR)(n,i)){const e=M(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,x.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function R(e,t,i,n,o,s,r,a,l,c=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let c=0;c<a;c++){const a=e.getChild(c);if(a){if(i=(0,x.Ii)(t,a.length),(0,x.By)(t,o)&&(0,x.Zq)(i,n)){if((0,x.Zq)(i,o)){e=a;continue e}if(!R(a,t,i,n,o,s,r,0,l))return!1}t=i}}return!0}case 2:{let c=0;if(l){let t=l.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,l.set(e.openingBracket.text,t)}const h=e.childrenLength;for(let d=0;d<h;d++){const h=e.getChild(d);if(h){if(i=(0,x.Ii)(t,h.length),(0,x.By)(t,o)&&(0,x.Zq)(i,n)){if((0,x.Zq)(i,o)){e=h,r++,a=c+1;continue e}if(!R(h,t,i,n,o,s,r+1,c+1,l,!e.closingBracket))return!1}t=i}}return null==l||l.set(e.openingBracket.text,c),!0}case 3:{const e=(0,x.Qw)(t,i);return s(new y(e,r-1,0,!0))}case 1:{const e=(0,x.Qw)(t,i);return s(new y(e,r-1,a-1,c))}case 0:return!0}}class O{constructor(e,t,i){this.push=e,this.includeMinIndentation=t,this.textModel=i}}function P(e,t,i,n,o,s,r,a){var l;if(r>200)return!0;let c=!0;if(2===e.kind){let h=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),h=t,t++,a.set(e.openingBracket.text,t)}const d=(0,x.Ii)(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),c=s.push(new w((0,x.Qw)(t,i),(0,x.Qw)(t,d),e.closingBracket?(0,x.Qw)((0,x.Ii)(d,(null===(l=e.child)||void 0===l?void 0:l.length)||x.xl),i):void 0,r,h,e,u)),t=d,c&&e.child){const l=e.child;if(i=(0,x.Ii)(t,l.length),(0,x.By)(t,o)&&(0,x.Zq)(i,n)&&(c=P(l,t,i,n,o,s,r+1,a),!c))return!1}null==a||a.set(e.openingBracket.text,h)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,x.Ii)(i,t.length),(0,x.By)(e,o)&&(0,x.By)(n,i)&&(c=P(t,e,i,n,o,s,r,a),!c))return!1}}return c}class F extends a.JT{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new a.SL;this.bracketPairsTree.value=(e=i.add(new I(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||n.W$.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||n.W$.empty}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||n.W$.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(g.e.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?W(this._findMatchingBracketUp(r,n,B(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(g.e.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.tT)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),g.e.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=B(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,b.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e<o;e++){const i=t.getStartOffset(e);if(i>=a)break;if((0,b.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!(0,b.Bu)(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),c=null;for(;;){const n=C.Vr.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof H)return null;c=i}}a=n.endColumn-1}if(c)return c}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,b.Bu)(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=C.Vr.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof H?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof H?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return H.INSTANCE;const c=C.Vr.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,c=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,b.Bu)(i.getStandardTokenType(r));if(t)h?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}h=t}if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return H.INSTANCE;const c=C.Vr.findNextBracketInRange(o,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;r<o;r++){const t=i.getLanguageId(r)===n&&!(0,b.Bu)(i.getStandardTokenType(r));if(t)h||(l=i.getStartOffset(r)),c=i.getEndOffset(r);else if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}h=t}if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}findPrevBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketBefore(i))||null;let n=null,o=null,s=null;for(let e=i.lineNumber;e>=1;e--){const t=this.textModel.tokenization.getLineTokens(e),r=t.getCount(),a=this.textModel.getLineContent(e);let l=r-1,c=a.length,h=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),c=i.column-1,h=i.column-1;const e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let d=!0;for(;l>=0;l--){const i=t.getLanguageId(l);if(n!==i){if(o&&s&&d&&c!==h){const t=C.Vr.findPrevBracketInRange(o.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(s,t);d=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const r=!!o&&!(0,b.Bu)(t.getStandardTokenType(l));if(r)d?c=t.getStartOffset(l):(c=t.getStartOffset(l),h=t.getEndOffset(l));else if(s&&o&&d&&c!==h){const t=C.Vr.findPrevBracketInRange(o.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(s,t)}d=r}if(s&&o&&d&&c!==h){const t=C.Vr.findPrevBracketInRange(o.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let o=null,s=null,r=null;for(let e=i.lineNumber;e<=n;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,h=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),c=i.column-1,h=i.column-1;const e=t.getLanguageId(l);o!==e&&(o=e,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let d=!0;for(;l<n;l++){const i=t.getLanguageId(l);if(o!==i){if(r&&s&&d&&c!==h){const t=C.Vr.findNextBracketInRange(s.forwardRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t);d=!1}o=i,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}const n=!!s&&!(0,b.Bu)(t.getStandardTokenType(l));if(n)d||(c=t.getStartOffset(l)),h=t.getEndOffset(l);else if(r&&s&&d&&c!==h){const t=C.Vr.findNextBracketInRange(s.forwardRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t)}d=n}if(r&&s&&d&&c!==h){const t=C.Vr.findNextBracketInRange(s.forwardRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t)}}return null}findEnclosingBrackets(e,t){const i=this.textModel.validatePosition(e);if(this.canBuildAST){const e=g.e.fromPositions(i),t=this.getBracketPairsInRange(g.e.fromPositions(i,i)).findLast((t=>void 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=B(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;s.set(e,i)}r=s.get(e)};let l=0;const c=(e,t,i,o,s)=>{for(;;){if(n&&++l%100==0&&!n())return H.INSTANCE;const a=C.Vr.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?r[h.index]++:h.isClose(c)&&r[h.index]--,-1===r[h.index]))return this._matchFoundBracket(a,h,!1,n);o=a.endColumn-1}return null};let h=null,d=null;for(let e=i.lineNumber;e<=o;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===i.lineNumber){s=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(s);h!==e&&(h=e,d=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,d))}let u=!0;for(;s<n;s++){const i=t.getLanguageId(s);if(h!==i){if(d&&u&&r!==l){const t=c(d,e,o,r,l);if(t)return W(t);u=!1}h=i,d=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,d)}const n=!!d&&!(0,b.Bu)(t.getStandardTokenType(s));if(n)u||(r=t.getStartOffset(s)),l=t.getEndOffset(s);else if(d&&u&&r!==l){const t=c(d,e,o,r,l);if(t)return W(t)}u=n}if(d&&u&&r!==l){const t=c(d,e,o,r,l);if(t)return W(t)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.textModel.getValueInRange(t);i=i.toLowerCase();const n=e.getBracketInfo(i);return n?{range:t,bracketInfo:n}:null}}function B(e){if(void 0===e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class H{constructor(){this._searchCanceledBrand=void 0}}function W(e){return e instanceof H?null:e}H.INSTANCE=new H;var V=i(8625),z=i(97781);class U extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new j,this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new g.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class j{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,z.Ic)(((e,t)=>{const i=[V.zJ,V.Vs,V.CE,V.UP,V.r0,V.m1],n=new j;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(V.ts)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var K=i(95215),q=i(1516);class ${constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function G(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s<t&&s<n&&e.charCodeAt(s)===i.charCodeAt(s);s++);let r=0,a=0;for(let i=s;i<t;i++)32===e.charCodeAt(i)?r++:a++;let l=0,c=0;for(let e=s;e<n;e++)32===i.charCodeAt(e)?l++:c++;if(r>0&&a>0)return;if(l>0&&c>0)return;const h=Math.abs(a-c),d=Math.abs(r-l);if(0===h)return o.spacesDiff=d,void(d>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));d%h!=0||(o.spacesDiff=d/h)}function Q(e,t,i){const n=Math.min(e.getLineCount(),1e4);let o=0,s=0,r="",a=0;const l=[2,4,6,8,3,5,7],c=[0,0,0,0,0,0,0,0,0],h=new $;for(let l=1;l<=n;l++){const n=e.getLineLength(l),d=e.getLineContent(l),u=n<=65536;let g=!1,p=0,m=0,f=0;for(let t=0,i=n;t<i;t++){const i=u?d.charCodeAt(t):e.getLineCharCode(l,t);if(9===i)f++;else{if(32!==i){g=!0,p=t;break}m++}}if(!g)continue;if(f>0?o++:m>1&&s++,G(r,a,d,p,h),h.looksLikeAlignment&&(!i||t!==h.spacesDiff))continue;const _=h.spacesDiff;_<=8&&c[_]++,r=d,a=p}let d=i;o!==s&&(d=o<s);let u=t;if(d){let e=d?0:.1*n;l.forEach((t=>{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:d,tabSize:u}}function Y(e){return(1&e.metadata)>>>0}function Z(e,t){e.metadata=254&e.metadata|t<<0}function X(e){return(2&e.metadata)>>>1==1}function J(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function ee(e){return(4&e.metadata)>>>2==1}function te(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ie(e,t){e.metadata=231&e.metadata|t<<3}function ne(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class oe{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Z(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,te(this,!1),ie(this,1),ne(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,J(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;te(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),ie(this,this.options.stickiness),ne(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const se=new oe(null,0,0);se.parent=se,se.left=se,se.right=se,Z(se,0);class re{constructor(){this.root=se,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===se?[]:function(e,t,i,n,o,s){let r=e.root,a=0,l=0,c=0,h=0;const d=[];let u=0;for(;r!==se;)if(X(r))J(r.left,!1),J(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!X(r.left)){if(l=a+r.maxEnd,l<t){J(r,!0);continue}if(r.left!==se){r=r.left;continue}}if(c=a+r.start,c>i)J(r,!0);else{if(h=a+r.end,h>=t){r.setCachedOffsets(c,h,s);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),o&&ee(r)&&(e=!1),e&&(d[u++]=r)}J(r,!0),r.right===se||X(r.right)||(a+=r.delta,r=r.right)}}return J(e.root,!1),d}(this,e,t,i,n,o)}search(e,t,i){return this.root===se?[]:function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=[];let c=0;for(;o!==se;){if(X(o)){J(o.left,!1),J(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==se&&!X(o.left)){o=o.left;continue}r=s+o.start,a=s+o.end,o.setCachedOffsets(r,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&ee(o)&&(e=!1),e&&(l[c++]=o),J(o,!0),o.right===se||X(o.right)||(s+=o.delta,o=o.right)}return J(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==se;)X(i)?(J(i.left,!1),J(i.right,!1),i=i.parent):i.left===se||X(i.left)?(i.ownerId===t&&(n[o++]=i),J(i,!0),i.right===se||X(i.right)||(i=i.right)):i=i.left;return J(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==se;)X(t)?(J(t.left,!1),J(t.right,!1),t=t.parent):t.left===se||X(t.left)?t.right===se||X(t.right)?(i[n++]=t,J(t,!0)):t=t.right:t=t.left;return J(e.root,!1),i}(this)}insert(e){ce(this,e),this._normalizeDeltaIfNecessary()}delete(e){he(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let c=0;for(;n!==se;)if(X(n))J(n.left,!1),J(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!X(n.left)){if(s=o+n.maxEnd,s<t){J(n,!0);continue}if(n.left!==se){n=n.left;continue}}r=o+n.start,r>i?J(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),J(n,!0),n.right===se||X(n.right)||(o+=n.delta,n=n.right))}return J(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;e<t;e++)he(this,o[e]);this._normalizeDeltaIfNecessary(),function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=n-(i-t);for(;o!==se;)if(X(o))J(o.left,!1),J(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),me(o),o=o.parent;else{if(!X(o.left)){if(r=s+o.maxEnd,r<t){J(o,!0);continue}if(o.left!==se){o=o.left;continue}}a=s+o.start,a>i?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),J(o,!0)):(J(o,!0),o.right===se||X(o.right)||(s+=o.delta,o=o.right))}J(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;s<r;s++){const r=o[s];r.start=r.cachedAbsoluteStart,r.end=r.cachedAbsoluteEnd,le(r,e,e+t,i,n),r.maxEnd=r.end,ce(this,r)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==se;)t.left===se||X(t.left)?t.right===se||X(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,me(t),J(t,!0),J(t.left,!1),J(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;J(e.root,!1)}(this))}}function ae(e,t,i,n){return e<i||!(e>i)&&1!==n&&(2===n||t)}function le(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,c=n,h=Math.min(l,c),d=e.start;let u=!1;const g=e.end;let p=!1;t<=d&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&ae(d,r,t,e)&&(u=!0),!p&&ae(g,a,t,e)&&(p=!0)}if(h>0&&!o){const e=l>c?2:0;!u&&ae(d,r,t+h,e)&&(u=!0),!p&&ae(g,a,t+h,e)&&(p=!0)}{const n=o?1:0;!u&&ae(d,r,i,n)&&(e.start=t+c,u=!0),!p&&ae(g,a,i,n)&&(e.end=t+c,p=!0)}const m=c-l;u||(e.start=Math.max(0,d+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function ce(e,t){if(e.root===se)return t.parent=se,t.left=se,t.right=se,Z(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;)if(r=o,a=s,l=n.start+i,c=n.end+i,(r===l?a-c:r-l)<0){if(n.left===se){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===se){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,c;t.parent=n,t.left=se,t.right=se,Z(t,1)}(e,t),fe(t.parent);let i=t;for(;i!==e.root&&1===Y(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,ue(e,i)),Z(i.parent,0),Z(i.parent.parent,1),ge(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,ge(e,i)),Z(i.parent,0),Z(i.parent.parent,1),ue(e,i.parent.parent))}return Z(e.root,0),t}function he(e,t){let i,n;if(t.left===se?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===se?(i=t.left,n=t):(n=function(e){for(;e.left!==se;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,Z(i,0),t.detach(),de(),me(i),void(e.root.parent=se);const o=1===Y(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,Z(n,Y(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==se&&(n.left.parent=n),n.right!==se&&(n.right.parent=n)),t.detach(),o)return fe(i.parent),n!==t&&(fe(n),fe(n.parent)),void de();let s;for(fe(i),fe(i.parent),n!==t&&(fe(n),fe(n.parent));i!==e.root&&0===Y(i);)i===i.parent.left?(s=i.parent.right,1===Y(s)&&(Z(s,0),Z(i.parent,1),ue(e,i.parent),s=i.parent.right),0===Y(s.left)&&0===Y(s.right)?(Z(s,1),i=i.parent):(0===Y(s.right)&&(Z(s.left,0),Z(s,1),ge(e,s),s=i.parent.right),Z(s,Y(i.parent)),Z(i.parent,0),Z(s.right,0),ue(e,i.parent),i=e.root)):(s=i.parent.left,1===Y(s)&&(Z(s,0),Z(i.parent,1),ge(e,i.parent),s=i.parent.left),0===Y(s.left)&&0===Y(s.right)?(Z(s,1),i=i.parent):(0===Y(s.left)&&(Z(s.right,0),Z(s,1),ue(e,s),s=i.parent.left),Z(s,Y(i.parent)),Z(i.parent,0),Z(s.left,0),ge(e,i.parent),i=e.root));Z(i,0),de()}function de(){se.parent=se,se.delta=0,se.start=0,se.end=0}function ue(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==se&&(i.left.parent=t),i.parent=t.parent,t.parent===se?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,me(t),me(i)}function ge(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==se&&(i.right.parent=t),i.parent=t.parent,t.parent===se?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,me(t),me(i)}function pe(e){let t=e.end;if(e.left!==se){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==se){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function me(e){e.maxEnd=pe(e)}function fe(e){for(;e!==se;){const t=pe(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}var _e=i(91567),ve=i(89676),be=i(77277),Ce=i(270),ye=i(94954),we=i(77378),Se=i(96887),ke=i(276),xe=i(84013);class Le{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class Ee{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new Le(e,[t]))}finalize(){return this._tokens}}var Ne=i(15393),De=i(1432);class Te{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,t){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e<t;e++)i[e]=this._default;this._store=n.Zv(this._store,e,i)}}class Ie{get invalidLineStartIndex(){return this._firstLineNeedsTokenization}constructor(e,t){this.tokenizationSupport=e,this.initialState=t,this._lineBeginState=new Te(null),this._lineNeedsTokenization=new Te(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}markMustBeTokenized(e){this._lineNeedsTokenization.set(e,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,e)}getBeginState(e){return this._lineBeginState.get(e)}setEndState(e,t,i){if(this._lineNeedsTokenization.set(t,!1),this._firstLineNeedsTokenization=t+1,t===e-1)return;const n=this._lineBeginState.get(t+1);if(null===n||!i.equals(n))return this._lineBeginState.set(t+1,i),void this.markMustBeTokenized(t+1);let o=t+1;for(;o<e&&!this._lineNeedsTokenization.get(o);)o++;this._firstLineNeedsTokenization=o}applyEdits(e,t){this.markMustBeTokenized(e.startLineNumber-1),this._lineBeginState.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineNeedsTokenization.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineBeginState.insert(e.startLineNumber,t),this._lineNeedsTokenization.insert(e.startLineNumber,t)}}class Ae extends a.JT{constructor(e,t,i){super(),this._textModel=e,this._tokenizationPart=t,this._languageIdCodec=i,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(Se.RW.onDidChange((e=>{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush)this._resetTokenizationState();else{if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t<i;t++){const i=e.changes[t],[n]=(0,h.Q)(i.text);this._tokenizationStateStore.applyEdits(i.range,n)}this._beginBackgroundTokenization()}}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(e){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}_resetTokenizationState(){const[e,t]=function(e,t){if(e.isTooLargeForTokenization())return[null,null];const i=Se.RW.get(t.getLanguageId());if(!i)return[null,null];let n;try{n=i.getInitialState()}catch(e){return(0,s.dL)(e),[null,null]}return[i,n]}(this._textModel,this._tokenizationPart);this._tokenizationStateStore=e&&t?new Ie(e,t):null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ne.To)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()<t?(0,De.fn)(i):this._beginBackgroundTokenization())};i()}_backgroundTokenizeForAtLeast1ms(){const e=this._textModel.getLineCount(),t=new Ee,i=xe.G.create(!1);do{if(i.elapsed()>1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}tokenizeViewport(e,t){const i=new Ee;this._tokenizeViewport(i,e,t),this._tokenizationPart.setTokens(i.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(e){const t=new Ee;this._updateTokensUntilLine(t,e),this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=Me(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,s,!0,i),a=new we.A(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const s=this._tokenizationStateStore.getBeginState(n-1);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=Me(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,s);return new we.A(c.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationStateStore&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_isTokenizationComplete(){return!!this._tokenizationStateStore&&this._tokenizationStateStore.invalidLineStartIndex>=this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),o=t-1;for(let t=this._tokenizationStateStore.invalidLineStartIndex;t<=o;t++){const o=this._textModel.getLineContent(t+1),s=this._tokenizationStateStore.getBeginState(t),r=Me(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,o,!0,s);e.add(t+1,r.tokens),this._tokenizationStateStore.setEndState(n,t,r.endState),t=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore)return;if(i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,i);let n=this._textModel.getLineFirstNonWhitespaceColumn(t);const o=[];let s=null;for(let e=t-1;n>1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t<n&&(o.push(this._textModel.getLineContent(e)),n=t,s=this._tokenizationStateStore.getBeginState(e-1),s))break}s||(s=this._tokenizationStateStore.initialState);const r=this._textModel.getLanguageId();let a=s;for(let e=o.length-1;e>=0;e--)a=Me(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=Me(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function Me(e,t,i,n,o,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,r.clone())}catch(e){(0,s.dL)(e)}return a||(a=(0,ke.Dy)(e.encodeLanguageId(t),r)),we.A.convertToEndOffset(a.tokens,n.length),a}const Re=new Uint32Array(0).buffer;class Oe{static deleteBeginning(e,t){return null===e||e===Re?e:Oe.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===Re)return e;const i=Pe(e),n=i[i.length-2];return Oe.delete(e,t,n)}static delete(e,t,i){if(null===e||e===Re||t===i)return e;const n=Pe(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return Re;const s=we.A.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(i<n[s<<1]){const r=i-t;for(let e=s;e<o;e++)n[e<<1]-=r;return e}let a,l;r!==t?(n[s<<1]=t,a=s+1<<1,l=t):(a=s<<1,l=r);const c=i-t;for(let e=s+1;e<o;e++){const t=n[e<<1]-c;t>l&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const h=new Uint32Array(a);return h.set(n.subarray(0,a),0),h.buffer}static append(e,t){if(t===Re)return e;if(e===Re)return t;if(null===e)return e;if(null===t)return null;const i=Pe(e),n=Pe(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e<o;e++)s[r++]=n[e<<1]+a,s[r++]=n[1+(e<<1)];return s.buffer}static insert(e,t,i){if(null===e||e===Re)return e;const n=Pe(e),o=n.length>>>1;let s=we.A.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e<o;e++)n[e<<1]+=i;return e}}function Pe(e){return e instanceof Uint32Array?e:new Uint32Array(e)}var Fe=i(45797);class Be{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==Re)return new we.A(Pe(n),i,this._languageIdCodec);const o=new Uint32Array(2);return o[0]=i.length,o[1]=He(this._languageIdCodec.encodeLanguageId(e)),new we.A(o,i,this._languageIdCodec)}static _massageTokens(e,t,i){const n=i?Pe(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=Fe.N.getLanguageId(n[1])!==e),!t)return Re}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=He(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e<t;e++)i[e]=null;this._lineTokens=n.Zv(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,o){const s=Be._massageTokens(this._languageIdCodec.encodeLanguageId(e),i,n);this._ensureLine(t);const r=this._lineTokens[t];return this._lineTokens[t]=s,!!o&&!Be._equals(r,s)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=Pe(e),n=Pe(t);if(i.length!==n.length)return!1;for(let e=0,t=i.length;e<t;e++)if(i[e]!==n[e])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new u.L(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=Oe.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=Oe.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=Oe.deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=Oe.append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=Oe.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Oe.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=Oe.insert(this._lineTokens[n],e.column-1,i))}}function He(e){return(32768|e<<0|2<<24|1024)>>>0}class We{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;e<t;e++){const n=this._pieces[e];if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};continue}const[s,r]=n.split(i);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[We._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,c=0;const h=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e<s;e++){const i=n.getStartCharacter(e),s=n.getEndCharacter(e),a=n.getMetadata(e),l=((1&a?2048:0)|(2&a?4096:0)|(4&a?8192:0)|(8&a?16384:0)|(16&a?16744448:0)|(32&a?4278190080:0))>>>0,c=~l>>>0;for(;r<o&&t.getEndOffset(r)<=i;)h(t.getEndOffset(r),t.getMetadata(r)),r++;for(r<o&&t.getStartOffset(r)<i&&h(i,t.getMetadata(r));r<o&&t.getEndOffset(r)<s;)h(t.getEndOffset(r),t.getMetadata(r)&c|a&l),r++;if(r<o)h(s,t.getMetadata(r)&c|a&l),t.getEndOffset(r)===s&&r++;else{const e=Math.min(Math.max(0,r-1),o-1);h(s,t.getMetadata(e)&c|a&l)}}for(;r<o;)h(t.getEndOffset(r),t.getMetadata(r)),r++;return new we.A(new Uint32Array(a),t.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let o=i+Math.floor((n-i)/2);if(e[o].endLineNumber<t)i=o+1;else{if(!(e[o].startLineNumber>t)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}class Ve extends ye.U{constructor(e,t,i,n,o){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this.bracketPairsTextModelPart=n,this._languageId=o,this._onDidChangeLanguage=this._register(new r.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new r.Q5),this._tokens=new Be(this._languageService.languageIdCodec),this._semanticTokens=new We(this._languageService.languageIdCodec),this._tokenization=new Ae(i,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))}acceptEdit(e,t,i,n,o){this._tokens.acceptEdit(e,i,n),this._semanticTokens.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(e){this._tokenization.handleDidChangeContent(e)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(e,t=!1){if(0!==e.length){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];let o=0,s=0,r=!1;for(let e=n.startLineNumber;e<=n.endLineNumber;e++)r?(this._tokens.setTokens(this._languageId,e-1,this._textModel.getLineLength(e),n.getLineTokens(e),!1),s=e):this._tokens.setTokens(this._languageId,e-1,this._textModel.getLineLength(e),n.getLineTokens(e),!0)&&(r=!0,o=e,s=e);r&&t.push({fromLineNumber:o,toLineNumber:s})}t.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._textModel.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getTokenTypeIfInsertingCharacter(e,t,i){const n=this._textModel.validatePosition(new u.L(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this._textModel.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=Ve._findLanguageBoundaries(n,o),a=(0,Ce.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=Ve._findLanguageBoundaries(n,o-1),a=(0,Ce.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n<s&&e.getLanguageId(n)===i;n++)o=e.getEndOffset(n);return[n,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(e,t){const i=this._textModel.validatePosition(new u.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}setLanguageId(e,t="api"){if(this._languageId===e)return;const i={oldLanguage:this._languageId,newLanguage:e,source:t};this._languageId=e,this.bracketPairsTextModelPart.handleDidChangeLanguage(i),this._tokenization.handleDidChangeLanguage(i),this._onDidChangeLanguage.fire(i),this._onDidChangeLanguageConfiguration.fire({})}}var ze=i(14706),Ue=i(64862),je=function(e,t){return function(i,n){t(i,n,e)}};function Ke(e,t){let i;return i="string"==typeof e?function(e){const t=new ve.M;return t.acceptChunk(e),t.finish()}(e):v.Hf(e)?function(e){const t=new ve.M;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let qe=0;class $e{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ge=()=>{throw new Error("Invalid change accessor")};let Qe=class e extends a.JT{static resolveOptions(e,t){if(t.detectIndentation){const i=Q(e,t.tabSize,t.insertSpaces);return new v.dJ({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.dJ(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(t,i,n,o=null,s,a,h){super(),this._undoRedoService=s,this._languageService=a,this._languageConfigurationService=h,this._onWillDispose=this._register(new r.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new at((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.Q5),this._eventEmitter=this._register(new lt),this._deltaDecorationCallCnt=0,qe++,this.id="$model"+qe,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==o?c.o.parse("inmemory://model/"+qe):o,this._attachedEditorCount=0;const{textBuffer:d,disposable:u}=Ke(t,n.defaultEOL);this._buffer=d,this._bufferDisposable=u,this._options=e.resolveOptions(this._buffer,n),this._bracketPairs=this._register(new F(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new q.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=new Ve(this._languageService,this._languageConfigurationService,this,this._bracketPairs,i);const p=this._buffer.getLineCount(),m=this._buffer.getValueLengthInRange(new g.e(1,1,p,this._buffer.getLineLength(p)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=m>e.LARGE_FILE_SIZE_THRESHOLD||p>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=m>e._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.PJ(qe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Xe,this._commandManager=new K.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new _e.A([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new ze.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,s.b1)();const{textBuffer:t,disposable:i}=Ke(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new Xe,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ze.dQ([new ze.Jx],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,s),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ze.dQ([new ze.CZ],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const n=t[i],o=n.range,s=n.cachedAbsoluteStart-n.start,r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);n.cachedAbsoluteStart=r,n.cachedAbsoluteEnd=a,n.cachedVersionId=e,n.start=r-s,n.end=a-s,me(n)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new v.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Q(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,d.x)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new $e(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===s&&r===l&&a===c&&e instanceof g.e&&!(e instanceof p.Y)?e:new g.e(o,s,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new u.L(1,1);if(n>s)return new u.L(s,this.getLineMaxColumn(s));if(o<=1)return new u.L(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new u.L(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(l.ZG(e))return new u.L(n,o-1)}return new u.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof u.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=l.ZG(e),a=l.ZG(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof g.e&&!(e instanceof p.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===s&&o===r?new g.e(n,o-1,s,r-1):i&&a?new g.e(n,o-1,s,r+1):i?new g.e(n,o-1,s,r):new g.e(n,o,s,r+1):new g.e(n,o,s,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new g.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>g.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>g.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new be.bc(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,s,r)}else c=t=>be.pM.findMatches(this,new be.bc(e,i,n,o),t,s,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new be.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new g.e(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,s,1);return be.pM.findNextMatch(this,new be.bc(e,i,n,o),r,s),c.length>0?c[0]:(l=new g.e(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),c=this.findMatchesLineByLine(l,t,s,1),c.length>0?c[0]:null)}return be.pM.findNextMatch(this,new be.bc(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return be.pM.findPreviousMatch(this,new be.bc(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Qi?e:new v.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const i=t.map((e=>({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;t<o;t++){const o=e[t];let s=!1;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,n=t.startLineNumber>o.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;e<n;e++){const n=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(n);let s=!0;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,r=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new g.e(n,1,n,o);t.push(new v.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e<t;e++){const t=r[e],[i,n,o]=(0,h.Q)(t.text);this._tokenizationTextModelPart.acceptEdit(t.range,t.text,i,n,o),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,o=r.length;i<o;i++){const o=r[i],[a]=(0,h.Q)(o.text);this._onDidChangeDecorations.fire();const l=o.range.startLineNumber,c=o.range.endLineNumber,d=c-l,g=a,p=Math.min(d,g),m=g-d,f=s-t-m+l,_=f,v=f+g,b=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new u.L(_,1)),this.getOffsetAt(new u.L(v,this.getLineMaxColumn(v))),0),C=ze.gk.fromDecorations(b),y=new n.H9(C);for(let t=p;t>=0;t--){const i=l+t,n=f+t;y.takeFromEndWhile((e=>e.lineNumber>n));const o=y.takeFromEndWhile((e=>e.lineNumber===n));e.push(new ze.rU(i,this.getLineContent(n),o))}if(p<d){const t=l+p;e.push(new ze.lN(t+1,c))}if(p<g){const i=new n.H9(C),o=l+p,r=g-p,a=s-t-r+o+1,c=[],h=[];for(let e=0;e<r;e++){const t=a+e;h[e]=this.getLineContent(t),i.takeWhile((e=>e.lineNumber<t)),c[e]=i.takeWhile((e=>e.lineNumber===t))}e.push(new ze.Tx(o+1,l+g,h,c))}t+=m}this._emitContentChangedEvent(new ze.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new ze.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new ze.D8(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,rt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,s.dL)(e)}return i.addDecoration=Ge,i.changeDecoration=Ge,i.changeDecorationOptions=Ge,i.removeDecoration=Ge,i.deltaDecorations=Ge,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,s.dL)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:st[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(st[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._decorationsTree.delete(i),delete this._decorations[i.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1){const s=this.getLineCount(),r=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a),c=new g.e(r,1,a,l),h=this._getDecorationsInRange(c,i,o);return(0,n.vA)(h,this._decorationProvider.getDecorationsInRange(c,i,o)),h}getDecorationsInRange(e,t=0,i=!1,o=!1){const s=this.validateRange(e),r=this._getDecorationsInRange(s,t,i);return(0,n.vA)(r,this._decorationProvider.getDecorationsInRange(s,t,i,o)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return ze.gk.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let s=0;const r=i.length;let a=0;this._onDidChangeDecorations.beginDeferredEmit();try{const l=new Array(r);for(;s<o||a<r;){let c=null;if(s<o){do{c=this._decorations[t[s++]]}while(!c&&s<o);if(c){if(c.options.after){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(c.options.before){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(c),this._onDidChangeDecorations.checkAffectedAndFire(c.options)}}if(a<r){if(!c){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;c=new oe(t,0,0),this._decorations[t]=c}const t=i[a],o=this._validateRangeRelaxedNoAllocations(t.range),s=rt(t.options),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),h=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);c.ownerId=e,c.reset(n,r,h,o),c.setOptions(s),c.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),c.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(s),this._decorationsTree.insert(c),l[a]=c.id,a++}else c&&delete this._decorations[c.id]}return l}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setMode(e,t){this.tokenization.setLanguageId(e,t)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Ye(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ze(e){return!!e.options.after||!!e.options.before}Qe._MODEL_SYNC_LIMIT=52428800,Qe.LARGE_FILE_SIZE_THRESHOLD=20971520,Qe.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,Qe.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:m.D.tabSize,indentSize:m.D.indentSize,insertSpaces:m.D.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:m.D.trimAutoWhitespace,largeFileOptimizations:m.D.largeFileOptimizations,bracketPairColorizationOptions:m.D.bracketPairColorizationOptions},Qe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([je(4,Ue.tJ),je(5,f.O),je(6,_.c_)],Qe);class Xe{constructor(){this._decorationsTree0=new re,this._decorationsTree1=new re,this._injectedTextDecorationsTree=new re}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o){const s=e.getVersionId(),r=this._intervalSearch(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_intervalSearch(e,t,i,n,o){const s=this._decorationsTree0.intervalSearch(e,t,i,n,o),r=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return s.concat(r).concat(a)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const o=e.getVersionId(),s=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,s)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),s=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Ze(e)?this._injectedTextDecorationsTree.insert(e):Ye(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ze(e)?this._injectedTextDecorationsTree.delete(e):Ye(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ze(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Ye(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Je(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class et{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class tt extends et{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:v.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class it extends et{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?o.Il.fromHex(e):t.getColor(e.id)}}class nt{static from(e){return e instanceof nt?e:new nt(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class ot{static register(e){return new ot(e)}static createDynamic(e){return new ot(e)}constructor(e){var t,i,n;this.description=e.description,this.blockClassName=e.blockClassName?Je(e.blockClassName):null,this.blockIsAfterEnd=null!==(t=e.blockIsAfterEnd)&&void 0!==t?t:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Je(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new tt(e.overviewRuler):null,this.minimap=e.minimap?new it(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?Je(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Je(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Je(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Je(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Je(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Je(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Je(e.afterContentClassName):null,this.after=e.after?nt.from(e.after):null,this.before=e.before?nt.from(e.before):null,this.hideInCommentTokens=null!==(i=e.hideInCommentTokens)&&void 0!==i&&i,this.hideInStringTokens=null!==(n=e.hideInStringTokens)&&void 0!==n&&n}}ot.EMPTY=ot.register({description:"empty"});const st=[ot.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ot.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ot.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ot.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function rt(e){return e instanceof ot?e:ot.createDynamic(e)}class at extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}}class lt extends a.JT{constructor(){super(),this._fastEmitter=this._register(new r.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},94954:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(5976);class o extends n.JT{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},77277:(e,t,i)=>{"use strict";i.d(t,{bc:()=>l,cM:()=>u,iE:()=>c,pM:()=>d,sz:()=>g});var n=i(97295),o=i(24929),s=i(50187),r=i(24314),a=i(84973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){const n=e.charCodeAt(t);if(10===n)return!0;if(92===n){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}function c(e,t,i){if(!i)return new a.tk(e,null);const n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.tk(e,n)}class h{constructor(e){const t=[];let i=0;for(let n=0,o=e.length;n<o;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;for(;i<n;){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class d{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new g(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(o),a=t+o+c):a=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-c;l=a+s.length+e}else l=a+s.length;const h=e.getPositionAt(a),d=e.getPositionAt(l);return new r.e(h.lineNumber,h.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(r):null,l=[];let d,u=0;for(i.reset(0);d=i.next(r);)if(l[u++]=c(this._getMultilineMatchRange(e,s,r,a,d.index,d[0]),d,n),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<o;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,s,n,o);if(r<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,s,n,o)}return s}static _findMatchesInLine(e,t,i,n,o,s,l,h){const d=e.wordSeparators;if(!l&&e.simpleSearch){const l=e.simpleSearch,c=l.length,g=t.length;let p=-c;for(;-1!==(p=t.indexOf(l,p+c));)if((!d||u(d,t,g,p,c))&&(s[o++]=new a.tk(new r.e(i,p+1+n,i,p+1+c+n),null),o>=h))return o;return o}const p=new g(e.wordSeparators,e.regex);let m;p.reset(0);do{if(m=p.next(t),m&&(s[o++]=c(new r.e(i,m.index+1+n,i,m.index+1+m[0].length+n),m,l),o>=h))return o}while(m);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),d=e.getValueInRange(new r.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new h(d):null;i.reset(t.column-1);const g=i.next(d);return g?c(this._getMultilineMatchRange(e,a,d,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?c(new r.e(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=c(new r.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function u(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||u(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},59616:(e,t,i)=>{"use strict";function n(e,t){let i=0,n=0;const o=e.length;for(;n<o;){const o=e.charCodeAt(n);if(32===o)i++;else{if(9!==o)break;i=i-i%t+t}n++}return n===o?-1:i}i.d(t,{q:()=>n})},85215:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("editorWorkerService")},89510:(e,t,i)=>{"use strict";i.d(t,{OG:()=>S,ML:()=>b,KO:()=>y,Jc:()=>v,Vl:()=>m,Vj:()=>f});var n=i(71050),o=i(17301),s=i(70666),r=i(73733),a=i(94565),l=i(98401),c=i(53060),h=i(1432);function d(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t+0],n=e[t+1],o=e[t+2],s=e[t+3];e[t+0]=s,e[t+1]=o,e[t+2]=n,e[t+3]=i}}(t),c.KN.wrap(t)}(t)}var u=i(24314),g=i(71922),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function m(e){return e&&!!e.data}function f(e){return e&&Array.isArray(e.edits)}class _{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function v(e,t){return e.has(t)}function b(e,t,i,n,o){return p(this,void 0,void 0,(function*(){const s=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=yield Promise.all(s.map((e=>p(this,void 0,void 0,(function*(){let s,r=null;try{s=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){r=e,s=null}return s&&(m(s)||f(s))||(s=null),new _(e,s,r)})))));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}))}class C{constructor(e,t){this.provider=e,this.tokens=t}}function y(e,t){return e.has(t)}function w(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function S(e,t,i,n){return p(this,void 0,void 0,(function*(){const s=w(e,t),r=yield Promise.all(s.map((e=>p(this,void 0,void 0,(function*(){let s;try{s=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.Cp)(e),s=null}return s&&m(s)||(s=null),new C(e,s)})))));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}))}a.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof s.o);const n=e.get(r.q).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(g.p),c=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return c?c[0].getLegend():e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),a.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof s.o);const o=e.get(r.q).getModel(i);if(!o)return;const{documentSemanticTokensProvider:c}=e.get(g.p);if(!v(c,o))return e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const h=yield b(c,o,null,null,n.T.None);if(!h)return;const{provider:u,tokens:p}=h;if(!p||!m(p))return;const f=d({id:0,type:"full",data:p.data});return p.resultId&&u.releaseDocumentSemanticTokens(p.resultId),f})))),a.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,l.p_)(i instanceof s.o);const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(g.p),h=w(c,a);if(0===h.length)return;if(1===h.length)return h[0].getLegend();if(!o||!u.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),h[0].getLegend();const d=yield S(c,a,u.e.lift(o),n.T.None);return d?d.provider.getLegend():void 0})))),a.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,l.p_)(i instanceof s.o),(0,l.p_)(u.e.isIRange(o));const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(g.p),h=yield S(c,a,u.e.lift(o),n.T.None);return h&&h.tokens?d({id:0,type:"full",data:h.tokens.data}):void 0}))))},88191:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(89954),o=i(43702),s=i(59870),r=i(65026),a=i(72065),l=i(43557),c=i(50988);const h=(0,a.yh)("ILanguageFeatureDebounceService");var d;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(d||(d={}));class u{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new o.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.SP)(d.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,s.uZ)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new s.N(6),this._cache.set(i,n));const o=(0,s.uZ)(n.update(t),this._min,this._max);return(0,c.xn)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new s.nM;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,s.uZ)(e,this._min,this._max)}}let g=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:Math.pow(r,2),l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,c=`${d.of(e)},${r}${l?","+l:""}`;let h=this._data.get(c);return h||(h=new u(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a),this._data.set(c,h)),h}_overallAverage(){const e=new s.nM;for(const t of this._data.values())e.update(t.default());return e.value}};var p,m;g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(p=0,m=l.VZ,function(e,t){m(e,t,p)})],g),(0,r.z)(h,g,1)},71922:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("ILanguageFeaturesService")},36357:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});const n=(0,i(72065).yh)("markerDecorationsService")},73733:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});const n=(0,i(72065).yh)("modelService")},51200:(e,t,i)=>{"use strict";i.d(t,{b$:()=>P,e3:()=>F,tw:()=>B});var n=i(4669),o=i(5976),s=i(1432),r=i(17301),a=i(82948),l=i(22075),c=i(68801),h=i(72042),d=i(73733),u=i(71765),g=i(33108),p=i(15393),m=i(71050),f=i(97781),_=i(43557),v=i(64862),b=i(89954),C=i(95215),y=i(66663),w=i(88802),S=i(89510),k=i(36248),x=i(51381),L=i(88191),E=i(84013),N=i(71922),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};function I(e){return e.toString()}function A(e){const t=new b.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class M{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e,t){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageId,t))),this.model.setMode(e.languageId,t)}}const R=s.IJ||s.dz?1:2;class O{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let P=class e extends o.JT{constructor(e,t,i,o,s,r,a,l,c){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new W(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0),this._register(new H(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,c))}static _readModelOptions(e,t){var i;let n=l.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=Math.max(t,1))}let s=l.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=R;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let c=l.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(c="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let h=l.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(h="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=l.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:c,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);o=e._readModelOptions({editor:s,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(t){const i=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let o=0,s=n.length;o<s;o++){const s=n[o],r=this._models[s],a=r.model.getLanguageId(),l=r.model.uri;if(t&&!t.affectsConfiguration("editor",{overrideIdentifier:a,resource:l})&&!t.affectsConfiguration("files.eol",{overrideIdentifier:a,resource:l}))continue;const c=i[a+l],h=this.getCreationOptions(a,l,r.model.isForSimpleWidget);e._setModelOptionsForModel(r.model,h,c)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&(0,k.fS)(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(I(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(I(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(I(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new a.yO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(I(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=A(s)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,C.e9)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,C.e9)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,C.e9)(e)&&e.matchesResource(i))),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=I(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const l=new M(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=l,l}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,c.bd,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t,i){if(!t)return;const n=this._models[I(e.uri)];n&&n.setLanguage(t,i)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=I(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===y.lg.file||e.scheme===y.lg.vscodeRemote||e.scheme===y.lg.vscodeUserData||e.scheme===y.lg.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(t){const i=I(t.uri),n=this._models[i],o=this._undoRedoService.getUriComparisonKey(t.uri)!==t.uri.toString();let s=!1,r=0;if(o||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(t.uri)){const e=this._undoRedoService.getElements(t.uri);if(e.past.length>0||e.future.length>0){for(const i of e.past)(0,C.e9)(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)(0,C.e9)(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!o&&r>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,C.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new O(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,A(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageId(),s=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),r=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,r,s),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};P.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,P=D([T(0,g.Ui),T(1,u.y),T(2,f.XE),T(3,_.VZ),T(4,v.tJ),T(5,h.O),T(6,x.c_),T(7,L.A),T(8,N.p)],P);const F="editor.semanticHighlighting";function B(e,t,i){var n;const o=null===(n=i.getValue(F,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let H=class extends o.JT{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null),this._semanticStyling=e;const r=e=>{this._watchers[e.uri.toString()]=new z(e,this._semanticStyling,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];B(e,i,n)?t||r(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{B(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(F)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};H=D([T(1,d.q),T(2,f.XE),T(3,g.Ui),T(4,L.A),T(5,N.p)],H);class W extends o.JT{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new w.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class V{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let z=class e extends o.JT{constructor(t,i,n,s,r){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new p.pY((()=>this._fetchDocumentSemanticTokensNow()),e.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.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 a=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const e of this._provider.all(t))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(n.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.Jc)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));const e=new m.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,S.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],s=this._model.onDidChangeContent((e=>{o.push(e)})),a=new E.G(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(r.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||r.dL(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s<o;s++)i[n+s]=e[t+s]}_setDocumentSemanticTokens(t,i,n,o){const s=this._currentDocumentResponse,r=()=>{(o.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)t&&i&&t.releaseDocumentSemanticTokens(i.resultId);else if(t&&n){if(!i)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,S.Vj)(i)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===i.edits.length)i={resultId:i.resultId,data:s.data};else{let t=0;for(const e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;const o=s.data,r=new Uint32Array(o.length+t);let a=o.length,l=r.length;for(let t=i.edits.length-1;t>=0;t--){const c=i.edits[t];if(c.start>o.length)return n.warnInvalidEditStart(s.resultId,i.resultId,t,c.start,o.length),void this._model.tokenization.setSemanticTokens(null,!0);const h=a-(c.start+c.deleteCount);h>0&&(e._copy(o,a-h,r,l-h,h),l-=h),c.data&&(e._copy(c.data,0,r,l-c.data.length,c.data.length),l-=c.data.length),a=c.start}a>0&&e._copy(o,0,r,0,a),i={resultId:i.resultId,data:r}}}if((0,S.Vl)(i)){this._currentDocumentResponse=new V(t,i.resultId,i.data);const e=(0,w.h)(i,n,this._model.getLanguageId());if(o.length>0)for(const t of o)for(const i of e)for(const e of t.changes)i.applyEdit(e.range,e.text);this._model.tokenization.setSemanticTokens(e,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};z.REQUEST_MIN_DELAY=300,z.REQUEST_MAX_DELAY=2e3,z=D([T(2,f.XE),T(3,L.A),T(4,N.p)],z)},88216:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(72065).yh)("textModelService")},88802:(e,t,i)=>{"use strict";i.d(t,{$:()=>p,h:()=>m});var n=i(45797),o=i(97781),s=i(43557),r=i(50187),a=i(24314),l=i(23795);class c{static create(e,t){return new c(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new c(this._startLineNumber,n),new c(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=(0,l.Q)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new a.e(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),o=this._getDeltaLine(n);if(o<e)t=n+1;else{if(!(o>e)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;s<i&&this._getDeltaLine(s+1)===e;)s++;return new d(this._tokens.subarray(4*o,4*s+4))}i=n-1}}return this._getDeltaLine(t)===e?new d(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const o=this._tokens,s=this._tokenCount;let r=0,a=!1,l=0;for(let c=0;c<s;c++){const s=4*c,h=o[s],d=o[s+1],u=o[s+2],g=o[s+3];if((h>e||h===e&&u>=t)&&(h<i||h===i&&d<=n))a=!0;else{if(0===r&&(l=h),a){const e=4*r;o[e]=h-l,o[e+1]=d,o[e+2]=u,o[e+3]=g}r++}}return this._tokenCount=r,l}split(e,t,i,n){const o=this._tokens,s=this._tokenCount,r=[],a=[];let l=r,c=0,d=0;for(let r=0;r<s;r++){const s=4*r,h=o[s],u=o[s+1],g=o[s+2],p=o[s+3];if(h>e||h===e&&g>=t){if(h<i||h===i&&u<=n)continue;l!==a&&(l=a,c=0,d=h)}l[c++]=h-d,l[c++]=u,l[c++]=g,l[c++]=p}return[new h(new Uint32Array(r)),new h(new Uint32Array(a)),d]}acceptDeleteRange(e,t,i,n,o){const s=this._tokens,r=this._tokenCount,a=n-t;let l=0,c=!1;for(let h=0;h<r;h++){const d=4*h;let u=s[d],g=s[d+1],p=s[d+2];const m=s[d+3];if(u<t||u===t&&p<=i){l++;continue}if(u===t&&g<i)u===n&&p>o?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){c=!0;continue}p-=o-i}else if(u<n||u===n&&g<o){if(!(u===n&&p>o)){c=!0;continue}u===t?(g=i,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>n){if(0===a&&!c){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s<l;s++){const l=4*s;let c=a[l],h=a[l+1],d=a[l+2];if(!(c<e||c===e&&d<t)){if(c===e&&d===t){if(!r)continue;d+=1}else if(c===e&&h<t&&t<d)0===i?d+=n:d=t;else{if(c===e&&h===t&&r)continue;if(c===e)if(c+=i,0===i)h+=n,d+=n;else{const e=d-h;h=o+(h-t),d=h+e}else c+=i}a[l]=c,a[l+1]=h,a[l+2]=d}}}}class d{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var u=i(72042),g=function(e,t){return function(i,n){t(i,n,e)}};let p=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new _}getMetadata(e,t,i){const o=this._languageService.languageIdCodec.encodeLanguageId(i),r=this._hashTable.get(e,t,o);let a;if(r)a=r.metadata,this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.N.getForeground(a)}, fontStyle ${n.N.getFontStyle(a).toString(2)}`);else{let r=this._legend.tokenTypes[e];const l=[];if(r){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&l.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===s.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);void 0===n?a=2147483647:(a=0,void 0!==n.italic&&(a|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(a|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(a|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(a|=8|(n.strikethrough?8:0)<<11),n.foreground&&(a|=16|n.foreground<<15),0===a&&(a=2147483647))}else this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.N.getForeground(a)}, fontStyle ${n.N.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function m(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,h=0;for(;a<o;){const e=a;let d=Math.min(e+s,o);if(d<o){let t=d;for(;t-1>e&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1<o&&0===n[5*e];)e++;d=e}else d=t}let u=new Uint32Array(4*(d-e)),g=0,p=0,m=0,f=0;for(;a<d;){const e=5*a,o=n[e],s=n[e+1],r=l+o|0,c=0===o?h+s|0:s,d=c+n[e+2]|0,_=n[e+3],v=n[e+4];if(d<=c)t.warnInvalidLengthSemanticTokens(r,c+1);else if(m===r&&f>c)t.warnOverlappingSemanticTokens(r,c+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===p&&(p=r),u[g]=r-p,u[g+1]=c,u[g+2]=d,u[g+3]=e,g+=4,m=r,f=d)}l=r,h=c,a++}g!==u.length&&(u=u.subarray(0,g));const _=c.create(p,u);r.push(_)}return r}p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(1,o.XE),g(2,u.O),g(3,s.VZ)],p);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class _{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let o=this._elements[n];for(;o;){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===i)return o;o=o.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new f(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}_._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},71765:(e,t,i)=>{"use strict";i.d(t,{V:()=>o,y:()=>s});var n=i(72065);const o=(0,n.yh)("textResourceConfigurationService"),s=(0,n.yh)("textResourcePropertiesService")},31446:(e,t,i)=>{"use strict";i.d(t,{a:()=>l});var n=i(24314),o=i(77277),s=i(97295),r=i(35146),a=i(270);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,h=i?i.endLineNumber:e.getLineCount(),d=new c(t),u=d.getCandidateCodePoints();let g;var p;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((p=Array.from(u),`[${s.ec(p.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const m=new o.sz(null,g),f=[];let _,v=!1,b=0,C=0,y=0;e:for(let t=l,i=h;t<=i;t++){const i=e.getLineContent(t),o=i.length;m.reset(0);do{if(_=m.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);s.ZG(t)&&e--}if(l+1<o){const e=i.charCodeAt(l-1);s.ZG(e)&&l++}const c=i.substring(e,l);let h=(0,a.t2)(e+1,a.Af,i,0);h&&h.endColumn<=e+1&&(h=null);const u=d.shouldHighlightNonBasicASCII(c,h?h.word:null);if(0!==u){3===u?b++:2===u?C++:1===u?y++:(0,r.vE)(u);const i=1e3;if(f.length>=i){v=!0;break e}f.push(new n.e(t,e+1,t,l+1))}}}while(_)}return{ranges:f,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:C,nonBasicAsciiCharacterCount:y}}static computeUnicodeHighlightReason(e,t){const i=new c(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=s.ZK.getLocales().filter((e=>!s.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.vU.codePoints)h(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=s.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||s.vU.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!h(e)&&s.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function h(e){return" "===e||"\n"===e||"\t"===e}},70902:(e,t,i)=>{"use strict";var n,o,s,r,a,l,c,h,d,u,g,p,m,f,_,v,b,C,y,w,S,k,x,L,E,N,D,T,I,A,M,R,O,P,F,B,H,W;i.d(t,{E$:()=>L,F5:()=>k,Ij:()=>l,In:()=>F,Lu:()=>D,MG:()=>x,MY:()=>u,OI:()=>H,RM:()=>v,VD:()=>y,Vi:()=>h,WW:()=>R,ZL:()=>w,_x:()=>d,a$:()=>M,a7:()=>s,ao:()=>n,bw:()=>C,cR:()=>O,cm:()=>r,d2:()=>B,eB:()=>S,g4:()=>I,g_:()=>A,gl:()=>b,gm:()=>m,jl:()=>f,np:()=>o,py:()=>N,r3:()=>c,r4:()=>P,rf:()=>g,sh:()=>E,up:()=>W,vQ:()=>T,wT:()=>p,wU:()=>_,we:()=>a}),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(o||(o={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(c||(c={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(h||(h={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(d||(d={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(g||(g={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.colorDecoratorsLimit=18]="colorDecoratorsLimit",e[e.columnSelection=19]="columnSelection",e[e.comments=20]="comments",e[e.contextmenu=21]="contextmenu",e[e.copyWithSyntaxHighlighting=22]="copyWithSyntaxHighlighting",e[e.cursorBlinking=23]="cursorBlinking",e[e.cursorSmoothCaretAnimation=24]="cursorSmoothCaretAnimation",e[e.cursorStyle=25]="cursorStyle",e[e.cursorSurroundingLines=26]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=27]="cursorSurroundingLinesStyle",e[e.cursorWidth=28]="cursorWidth",e[e.disableLayerHinting=29]="disableLayerHinting",e[e.disableMonospaceOptimizations=30]="disableMonospaceOptimizations",e[e.domReadOnly=31]="domReadOnly",e[e.dragAndDrop=32]="dragAndDrop",e[e.dropIntoEditor=33]="dropIntoEditor",e[e.emptySelectionClipboard=34]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=35]="experimentalWhitespaceRendering",e[e.extraEditorClassName=36]="extraEditorClassName",e[e.fastScrollSensitivity=37]="fastScrollSensitivity",e[e.find=38]="find",e[e.fixedOverflowWidgets=39]="fixedOverflowWidgets",e[e.folding=40]="folding",e[e.foldingStrategy=41]="foldingStrategy",e[e.foldingHighlight=42]="foldingHighlight",e[e.foldingImportsByDefault=43]="foldingImportsByDefault",e[e.foldingMaximumRegions=44]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=45]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=46]="fontFamily",e[e.fontInfo=47]="fontInfo",e[e.fontLigatures=48]="fontLigatures",e[e.fontSize=49]="fontSize",e[e.fontWeight=50]="fontWeight",e[e.fontVariations=51]="fontVariations",e[e.formatOnPaste=52]="formatOnPaste",e[e.formatOnType=53]="formatOnType",e[e.glyphMargin=54]="glyphMargin",e[e.gotoLocation=55]="gotoLocation",e[e.hideCursorInOverviewRuler=56]="hideCursorInOverviewRuler",e[e.hover=57]="hover",e[e.inDiffEditor=58]="inDiffEditor",e[e.inlineSuggest=59]="inlineSuggest",e[e.letterSpacing=60]="letterSpacing",e[e.lightbulb=61]="lightbulb",e[e.lineDecorationsWidth=62]="lineDecorationsWidth",e[e.lineHeight=63]="lineHeight",e[e.lineNumbers=64]="lineNumbers",e[e.lineNumbersMinChars=65]="lineNumbersMinChars",e[e.linkedEditing=66]="linkedEditing",e[e.links=67]="links",e[e.matchBrackets=68]="matchBrackets",e[e.minimap=69]="minimap",e[e.mouseStyle=70]="mouseStyle",e[e.mouseWheelScrollSensitivity=71]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=72]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=73]="multiCursorMergeOverlapping",e[e.multiCursorModifier=74]="multiCursorModifier",e[e.multiCursorPaste=75]="multiCursorPaste",e[e.multiCursorLimit=76]="multiCursorLimit",e[e.occurrencesHighlight=77]="occurrencesHighlight",e[e.overviewRulerBorder=78]="overviewRulerBorder",e[e.overviewRulerLanes=79]="overviewRulerLanes",e[e.padding=80]="padding",e[e.parameterHints=81]="parameterHints",e[e.peekWidgetDefaultFocus=82]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=83]="definitionLinkOpensInPeek",e[e.quickSuggestions=84]="quickSuggestions",e[e.quickSuggestionsDelay=85]="quickSuggestionsDelay",e[e.readOnly=86]="readOnly",e[e.renameOnType=87]="renameOnType",e[e.renderControlCharacters=88]="renderControlCharacters",e[e.renderFinalNewline=89]="renderFinalNewline",e[e.renderLineHighlight=90]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=91]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=92]="renderValidationDecorations",e[e.renderWhitespace=93]="renderWhitespace",e[e.revealHorizontalRightPadding=94]="revealHorizontalRightPadding",e[e.roundedSelection=95]="roundedSelection",e[e.rulers=96]="rulers",e[e.scrollbar=97]="scrollbar",e[e.scrollBeyondLastColumn=98]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=99]="scrollBeyondLastLine",e[e.scrollPredominantAxis=100]="scrollPredominantAxis",e[e.selectionClipboard=101]="selectionClipboard",e[e.selectionHighlight=102]="selectionHighlight",e[e.selectOnLineNumbers=103]="selectOnLineNumbers",e[e.showFoldingControls=104]="showFoldingControls",e[e.showUnused=105]="showUnused",e[e.snippetSuggestions=106]="snippetSuggestions",e[e.smartSelect=107]="smartSelect",e[e.smoothScrolling=108]="smoothScrolling",e[e.stickyScroll=109]="stickyScroll",e[e.stickyTabStops=110]="stickyTabStops",e[e.stopRenderingLineAfter=111]="stopRenderingLineAfter",e[e.suggest=112]="suggest",e[e.suggestFontSize=113]="suggestFontSize",e[e.suggestLineHeight=114]="suggestLineHeight",e[e.suggestOnTriggerCharacters=115]="suggestOnTriggerCharacters",e[e.suggestSelection=116]="suggestSelection",e[e.tabCompletion=117]="tabCompletion",e[e.tabIndex=118]="tabIndex",e[e.unicodeHighlighting=119]="unicodeHighlighting",e[e.unusualLineTerminators=120]="unusualLineTerminators",e[e.useShadowDOM=121]="useShadowDOM",e[e.useTabStops=122]="useTabStops",e[e.wordBreak=123]="wordBreak",e[e.wordSeparators=124]="wordSeparators",e[e.wordWrap=125]="wordWrap",e[e.wordWrapBreakAfterCharacters=126]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=127]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=128]="wordWrapColumn",e[e.wordWrapOverride1=129]="wordWrapOverride1",e[e.wordWrapOverride2=130]="wordWrapOverride2",e[e.wrappingIndent=131]="wrappingIndent",e[e.wrappingStrategy=132]="wrappingStrategy",e[e.showDeprecated=133]="showDeprecated",e[e.inlayHints=134]="inlayHints",e[e.editorClassName=135]="editorClassName",e[e.pixelRatio=136]="pixelRatio",e[e.tabFocusMode=137]="tabFocusMode",e[e.layoutInfo=138]="layoutInfo",e[e.wrappingInfo=139]="wrappingInfo"}(p||(p={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(m||(m={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(f||(f={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(_||(_={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(v||(v={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(b||(b={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(C||(C={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.Semicolon=80]="Semicolon",e[e.Equal=81]="Equal",e[e.Comma=82]="Comma",e[e.Minus=83]="Minus",e[e.Period=84]="Period",e[e.Slash=85]="Slash",e[e.Backquote=86]="Backquote",e[e.BracketLeft=87]="BracketLeft",e[e.Backslash=88]="Backslash",e[e.BracketRight=89]="BracketRight",e[e.Quote=90]="Quote",e[e.OEM_8=91]="OEM_8",e[e.IntlBackslash=92]="IntlBackslash",e[e.Numpad0=93]="Numpad0",e[e.Numpad1=94]="Numpad1",e[e.Numpad2=95]="Numpad2",e[e.Numpad3=96]="Numpad3",e[e.Numpad4=97]="Numpad4",e[e.Numpad5=98]="Numpad5",e[e.Numpad6=99]="Numpad6",e[e.Numpad7=100]="Numpad7",e[e.Numpad8=101]="Numpad8",e[e.Numpad9=102]="Numpad9",e[e.NumpadMultiply=103]="NumpadMultiply",e[e.NumpadAdd=104]="NumpadAdd",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=106]="NumpadSubtract",e[e.NumpadDecimal=107]="NumpadDecimal",e[e.NumpadDivide=108]="NumpadDivide",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.AudioVolumeMute=112]="AudioVolumeMute",e[e.AudioVolumeUp=113]="AudioVolumeUp",e[e.AudioVolumeDown=114]="AudioVolumeDown",e[e.BrowserSearch=115]="BrowserSearch",e[e.BrowserHome=116]="BrowserHome",e[e.BrowserBack=117]="BrowserBack",e[e.BrowserForward=118]="BrowserForward",e[e.MediaTrackNext=119]="MediaTrackNext",e[e.MediaTrackPrevious=120]="MediaTrackPrevious",e[e.MediaStop=121]="MediaStop",e[e.MediaPlayPause=122]="MediaPlayPause",e[e.LaunchMediaPlayer=123]="LaunchMediaPlayer",e[e.LaunchMail=124]="LaunchMail",e[e.LaunchApp2=125]="LaunchApp2",e[e.Clear=126]="Clear",e[e.MAX_VALUE=127]="MAX_VALUE"}(y||(y={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(w||(w={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(S||(S={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(k||(k={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(x||(x={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(L||(L={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(E||(E={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(N||(N={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(D||(D={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(T||(T={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(I||(I={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(A||(A={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(M||(M={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(R||(R={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(O||(O={})),function(e){e[e.Deprecated=1]="Deprecated"}(P||(P={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(F||(F={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(B||(B={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(H||(H={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(W||(W={}))},20913:(e,t,i)=>{"use strict";i.d(t,{B8:()=>c,Oe:()=>n,UX:()=>a,aq:()=>l,iN:()=>d,ld:()=>r,qq:()=>s,ug:()=>o,xi:()=>h});var n,o,s,r,a,l,c,h,d,u=i(63580);!function(e){e.noSelection=u.NC("noSelection","No selection"),e.singleSelectionRange=u.NC("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=u.NC("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=u.NC("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=u.NC("multiSelection","{0} selections"),e.emergencyConfOn=u.NC("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=u.NC("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=u.NC("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=u.NC("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=u.NC("readonlyEditor"," in a read-only code editor"),e.editableEditor=u.NC("editableEditor"," in a code editor"),e.changeConfigToOnMac=u.NC("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=u.NC("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=u.NC("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=u.NC("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=u.NC("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=u.NC("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=u.NC("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=u.NC("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=u.NC("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=u.NC("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=u.NC("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=u.NC("showAccessibilityHelpAction","Show Accessibility Help")}(n||(n={})),function(e){e.inspectTokensAction=u.NC("inspectTokens","Developer: Inspect Tokens")}(o||(o={})),function(e){e.gotoLineActionLabel=u.NC("gotoLineActionLabel","Go to Line/Column...")}(s||(s={})),function(e){e.helpQuickAccessActionLabel=u.NC("helpQuickAccess","Show all Quick Access Providers")}(r||(r={})),function(e){e.quickCommandActionLabel=u.NC("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.NC("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=u.NC("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.NC("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=u.NC("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=u.NC("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(c||(c={})),function(e){e.toggleHighContrast=u.NC("toggleHighContrast","Toggle High Contrast Theme")}(h||(h={})),function(e){e.bulkEditServiceSummary=u.NC("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},14706:(e,t,i)=>{"use strict";i.d(t,{CZ:()=>l,D8:()=>h,Jx:()=>n,Tx:()=>a,dQ:()=>c,fV:()=>d,gk:()=>o,lN:()=>r,rU:()=>s});class n{constructor(){this.changeType=1}}class o{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,o=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing;return new c(i,n,o,s)}}class h{constructor(e){this.changes=e}}class d{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=c.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=d._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new d(t,i)}static _mergeChangeEvents(e,t){return{changes:[].concat(e.changes).concat(t.changes),eol:t.eol,versionId:t.versionId,isUndoing:e.isUndoing||t.isUndoing,isRedoing:e.isRedoing||t.isRedoing,isFlush:e.isFlush||t.isFlush}}}},65094:(e,t,i)=>{"use strict";var n;i.d(t,{UO:()=>o,s6:()=>n,vW:()=>s}),function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(n||(n={}));class o{constructor(e,t,i,n,o,s){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e==(-1!==t))throw new Error}}class s{constructor(e,t){this.top=e,this.endColumn=t}}},77378:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(45797);class o{static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t<o;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.N.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.N.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.N.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.N.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.N.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.N.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t<i;t++)e[t<<1]=e[t+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const o=i+Math.floor((n-i)/2),s=e[o<<1];if(s===t)return o+1;s<t?i=o+1:s>t&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const o=t<this._tokensCount?this._tokens[t<<1]:-1,a=i<e.length?e[i]:null;if(-1!==o&&(null===a||o<=a.offset)){n+=this._text.substring(r,o);const e=this._tokens[1+(t<<1)];s.push(n.length,e),t++,r=o}else{if(!a)break;if(a.offset>r){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this._languageIdCodec)}}o.defaultTokenMetadata=33587200;class s{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t<n&&!(e.getStartOffset(t)>=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof s&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},92550:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>o,k:()=>a});var n=i(97295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!o._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;const n=t+1,s=i+1,r=i-t,a=[];let l=0;for(const t of e)t.endColumn<=n||t.startColumn>=s||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let r=0;for(let a=0,l=e.length;a<l;a++){const l=e[a],c=l.range;if(c.endLineNumber<t||c.startLineNumber>t)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const h=c.startLineNumber===t?c.startColumn:i,d=c.endLineNumber===t?c.endColumn:n;s[r++]=new o(h,d,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class s{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new s(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new s(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],o=new r;let s=0;for(let r=0,a=t.length;r<a;r++){const a=t[r];let l=a.startColumn,c=a.endColumn;const h=a.className,d=1===a.type?2:2===a.type?4:0;if(l>1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.ZG(t)&&c--}const u=l-1,g=c-2;s=o.consumeLowerThan(u,s,i),0===o.count&&(s=u),o.insert(g,h,d)}return o.consumeLowerThan(1073741824,s,i),i}}},91557:(e,t,i)=>{"use strict";i.d(t,{Nd:()=>h,zG:()=>l,IJ:()=>c,d1:()=>g,tF:()=>m});var n=i(63580),o=i(97295),s=i(50072),r=i(92550);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class c{constructor(e,t,i,n,o,s,a,l,c,h,d,u,g,p,m,f,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.Kp.compare),this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset<t.startOffset?-1:1)),Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&r.Kp.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class h{constructor(e,t){this.partIndex=e,this.charIndex=t}}class d{static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=d.getPartIndex(t),n=d.getCharIndex(t);return new h(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;o+1<s;){const e=o+s>>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=d.getPartIndex(r),c=d.getCharIndex(r);let h;return h=l!==d.getPartIndex(a)?t:d.getCharIndex(a),i-c<=h-i?o:s}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("<span>");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendString('<span class="'),t.appendString(s.className),t.appendString('"></span>'),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendString("</span>");const s=new d(1,i+n);return s.setColumnInfo(1,i,0,0),new u(s,!1,o)}return t.appendString("<span><span></span></span>"),new u(new d(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,s=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,a=e.lineContent,l=e.len,c=e.isOverflowing,h=e.overflowingCharCount,g=e.parts,p=e.fauxIndentLength,m=e.tabSize,f=e.startVisibleColumn,v=e.containsRTL,b=e.spaceWidth,C=e.renderSpaceCharCode,y=e.renderWhitespace,w=e.renderControlCharacters,S=new d(l+1,g.length);let k=!1,x=0,L=f,E=0,N=0,D=0;v?t.appendString('<span dir="ltr">'):t.appendString("<span>");for(let e=0,n=g.length;e<n;e++){const n=g[e],c=n.endIndex,h=n.type,d=n.containsRTL,u=0!==y&&n.isWhitespace(),f=u&&!i&&("mtkw"===h||!r),v=x===c&&n.isPseudoAfter();if(E=0,t.appendString("<span "),d&&t.appendString('style="unicode-bidi:isolate" '),t.appendString('class="'),t.appendString(f?"mtkz":h),t.appendASCIICharCode(34),u){let i=0;{let e=x,t=L;for(;e<c;e++){const n=0|(9===a.charCodeAt(e)?m-t%m:1);i+=n,e>=p&&(t+=n)}}for(f&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x<c;x++){let i,n;if(S.setColumnInfo(x+1,e-D,E,N),D=0,9===a.charCodeAt(x)){i=m-L%m|0,n=i,!s||n>1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(C),t.appendCharCode(8204);E+=i,N+=n,x>=p&&(L+=n)}}else for(t.appendASCIICharCode(62);x<c;x++){S.setColumnInfo(x+1,e-D,E,N),D=0;const i=a.charCodeAt(x);let n=1,s=1;switch(i){case 9:n=m-L%m,s=n;for(let e=1;e<=n;e++)t.appendCharCode(160);break;case 32:t.appendCharCode(160);break;case 60:t.appendString("&lt;");break;case 62:t.appendString("&gt;");break;case 38:t.appendString("&amp;");break;case 0:w?t.appendCharCode(9216):t.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.appendCharCode(65533);break;default:o.K7(i)&&s++,w&&i<32?t.appendCharCode(9216+i):w&&127===i?t.appendCharCode(9249):w&&_(i)?(t.appendString("[U+"),t.appendString(i.toString(16).toUpperCase().padStart(4,"0")),t.appendString("]"),n=8,s=n):t.appendCharCode(i)}E+=n,N+=s,x>=p&&(L+=s)}v?D++:D=0,x>=l&&!k&&n.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,E,N)),t.appendString("</span>")}return k||S.setColumnInfo(l+1,g.length-1,E,N),c&&(t.appendString('<span class="mtkoverflow">'),t.appendString(n.NC("showMore","Show more ({0})",function(e){return e<1024?n.NC("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(h))),t.appendString("</span>")),t.appendString("</span>"),new u(S,v,r)}(function(e){const t=e.lineContent;let i,n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,n=t.length-e.stopRenderingLineAfter,s=e.stopRenderingLineAfter):(i=!1,n=0,s=t.length);let l=function(e,t,i,n,s){const r=[];let l=0;n>0&&(r[l++]=new a(n,"",0,!1));let c=n;for(let h=0,d=i.getCount();h<d;h++){const d=i.getEndOffset(h);if(d<=n)continue;const u=i.getClassName(h);if(d>=s){const i=!!t&&o.Ut(e.substring(c,s));r[l++]=new a(s,u,0,i);break}const g=!!t&&o.Ut(e.substring(c,d));r[l++]=new a(d,u,0,g),c=d}return r}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,s);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){const i=[];let n=new a(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;o<t;o++)_(e.charCodeAt(o))&&(o>n.endIndex&&(n=new a(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new a(o+1,"mtkcontrol",s.metadata,!1),i.push(n));o>n.endIndex&&(n=new a(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}(t,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){const s=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,h=e.useMonospaceOptimizations,d=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,m=[];let f=0,_=0,v=n[_].type,b=n[_].containsRTL,C=n[_].endIndex;const y=n.length;let w,S=!1,k=o.LC(t);-1===k?(S=!0,k=i,w=i):w=o.ow(t);let x=!1,L=0,E=d&&d[L],N=c%l;for(let e=r;e<i;e++){const s=t.charCodeAt(e);let c;if(E&&e>=E.endOffset&&(L++,E=d&&d[L]),e<k||e>w)c=!0;else if(9===s)c=!0;else if(32===s)if(u)if(x)c=!0;else{const n=e+1<i?t.charCodeAt(e+1):0;c=32===n||9===n}else c=!0;else c=!1;if(c&&d&&(c=!!E&&E.startOffset<=e&&E.endOffset>e),c&&g&&(c=S||e>w),c&&b&&e>=k&&e<=w&&(c=!1),x){if(!c||!h&&N>=l){if(p)for(let t=(f>0?m[f-1].endIndex:r)+1;t<=e;t++)m[f++]=new a(t,"mtkw",1,!1);else m[f++]=new a(e,"mtkw",1,!1);N%=l}}else(e===C||c&&e>r)&&(m[f++]=new a(e,v,0,b),N%=l);for(9===s?N=l:o.K7(s)?N+=2:N++,x=c;e===C&&(_++,_<y);)v=n[_].type,b=n[_].containsRTL,C=n[_].endIndex}let D=!1;if(x)if(s&&u){const e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(D=!0)}else D=!0;if(D)if(p)for(let e=(f>0?m[f-1].endIndex:r)+1;e<=i;e++)m[f++]=new a(e,"mtkw",1,!1);else m[f++]=new a(i,"mtkw",1,!1);else m[f++]=new a(i,v,0,b);return m}(e,t,s,l));let c=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?c|=1:2===i.type&&(c|=2)}l=function(e,t,i,n){n.sort(r.Kp.compare);const o=r.k.normalize(e,n),s=o.length;let l=0;const c=[];let h=0,d=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],n=t.endIndex,r=t.type,u=t.metadata,g=t.containsRTL;for(;l<s&&o[l].startOffset<n;){const e=o[l];if(e.startOffset>d&&(d=e.startOffset,c[h++]=new a(d,r,u,g)),!(e.endOffset+1<=n)){d=n,c[h++]=new a(d,r+" "+e.className,u|e.metadata,g);break}d=e.endOffset+1,c[h++]=new a(d,r+" "+e.className,u|e.metadata,g),l++}n>d&&(d=n,c[h++]=new a(d,r,u,g))}const u=i[i.length-1].endIndex;if(l<s&&o[l].startOffset===u)for(;l<s&&o[l].startOffset===u;){const e=o[l];c[h++]=new a(d,e.className,e.metadata,!1),l++}return c}(t,0,l,e.lineDecorations)}return e.containsRTL||(l=function(e,t,i){let n=0;const o=[];let s=0;if(i)for(let i=0,r=t.length;i<r;i++){const r=t[i],l=r.endIndex;if(n+50<l){const t=r.type,i=r.metadata,c=r.containsRTL;let h=-1,d=n;for(let r=n;r<l;r++)32===e.charCodeAt(r)&&(h=r),-1!==h&&r-d>=50&&(o[s++]=new a(h+1,t,i,c),d=h+1,h=-1);d!==l&&(o[s++]=new a(l,t,i,c))}else o[s++]=r;n=l}else for(let e=0,i=t.length;e<i;e++){const i=t[e],r=i.endIndex,l=r-n;if(l>50){const e=i.type,t=i.metadata,c=i.containsRTL,h=Math.ceil(l/50);for(let i=1;i<h;i++){const r=n+50*i;o[s++]=new a(r,e,t,c)}o[s++]=new a(r,e,t,c)}else o[s++]=i;n=r}return o}(t,l,!e.isBasicASCII||e.fontLigatures)),new f(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,s,i,n,l,c,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class p{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function m(e){const t=new s.HT(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class f{constructor(e,t,i,n,o,s,r,a,l,c,h,d,u,g,p,m){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=h,this.containsRTL=d,this.spaceWidth=u,this.renderSpaceCharCode=g,this.renderWhitespace=p,this.renderControlCharacters=m}}function _(e){return e<32?9!==e:127===e||e>=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:(e,t,i)=>{"use strict";i.d(t,{$l:()=>d,$t:()=>c,IP:()=>a,SQ:()=>u,Wx:()=>h,l_:()=>s,ud:()=>r,wA:()=>l});var n=i(97295),o=i(24314);class s{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class r{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class l{constructor(e,t,i,n,o,s,r,a,c,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,s),this.containsRTL=l.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=c,this.startVisibleColumn=h}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class c{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new c(new o.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class d{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class u{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.color<t.color?-1:e.color>t.color?1:0:e.zIndex-t.zIndex}}},30665:(e,t,i)=>{"use strict";i.d(t,{EY:()=>o,Tj:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class s{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(o.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),o=i/Math.floor(this._outerHeight),s=Math.floor(4*this._pixelRatio/2),r=[];for(let a=0,l=this._zones.length;a<l;a++){const l=this._zones[a];if(!e){const e=l.getColorZones();if(e){r.push(e);continue}}const c=this._getVerticalOffsetForLine(l.startLineNumber),h=0===l.heightInLines?this._getVerticalOffsetForLine(l.endLineNumber)+t:c+l.heightInLines*t,d=Math.floor(o*c),u=Math.floor(o*h);let g=Math.floor((d+u)/2),p=u-g;p<s&&(p=s),g-p<0&&(g=p),g+p>i&&(g=i-p);const m=l.color;let f=this._color2Id[m];f||(f=++this._lastAssignedId,this._color2Id[m]=f,this._id2Color[f]=m);const _=new n(g-p,g+p,f);l.setColorZone(_),r.push(_)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},30168:(e,t,i)=>{"use strict";i.d(t,{$t:()=>c,CU:()=>a,Fd:()=>l,zg:()=>h});var n=i(50187),o=i(24314),s=i(1118),r=i(64141);class a{constructor(e,t,i,n,o){this._cachedOnlyMinimapDecorations=null,this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new o.e(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new s.$l(l,a),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e,t=!1){let i=null!==this._cachedModelDecorationsResolver;return i=i&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),i=i&&this._cachedOnlyMinimapDecorations===t,i||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,t),this._cachedModelDecorationsResolverViewRange=e,this._cachedOnlyMinimapDecorations=t),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1){const i=new o.e(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(i,t).inlineDecorations[0]}_getDecorationsInRange(e,t){const i=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$J)(this.configuration.options),t),n=e.startLineNumber,a=e.endLineNumber,c=[];let h=0;const d=[];for(let e=n;e<=a;e++)d[e-n]=[];for(let e=0,t=i.length;e<t;e++){const t=i[e],r=t.options;if(!l(this.model,t))continue;const u=this._getOrCreateViewModelDecoration(t),g=u.range;if(c[h++]=u,r.inlineClassName){const e=new s.$t(g,r.inlineClassName,r.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(n,g.startLineNumber),i=Math.min(a,g.endLineNumber);for(let o=t;o<=i;o++)d[o-n].push(e)}if(r.beforeContentClassName&&n<=g.startLineNumber&&g.startLineNumber<=a){const e=new s.$t(new o.e(g.startLineNumber,g.startColumn,g.startLineNumber,g.startColumn),r.beforeContentClassName,1);d[g.startLineNumber-n].push(e)}if(r.afterContentClassName&&n<=g.endLineNumber&&g.endLineNumber<=a){const e=new s.$t(new o.e(g.endLineNumber,g.endColumn,g.endLineNumber,g.endColumn),r.afterContentClassName,2);d[g.endLineNumber-n].push(e)}}return{decorations:c,inlineDecorations:d}}}function l(e,t){return!(t.options.hideInCommentTokens&&c(e,t)||t.options.hideInStringTokens&&h(e,t))}function c(e,t){return d(e,t.range,(e=>1===e))}function h(e,t){return d(e,t.range,(e=>2===e))}function d(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<o.getCount()&&!(r&&o.getStartOffset(a)>t.endColumn-1);){if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}},90236:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectionAnchorSet:()=>u});var n=i(85152),o=i(59365),s=i(22258),r=i(16830),a=i(3860),l=i(29102),c=i(63580),h=i(38819),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const u=new h.uy("selectionAnchorSet",!1);let g=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=u.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(a.Y.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new o.W5).appendText((0,c.NC)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,n.Z9)((0,c.NC)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(a.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var p,m;g.ID="editor.contrib.selectionAnchorController",g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(p=1,m=h.i6,function(e,t){m(e,t,p)})],g);class f extends r.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,c.NC)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,s.gx)(2089,2080),weight:100}})}run(e,t){var i;return d(this,void 0,void 0,(function*(){null===(i=g.get(t))||void 0===i||i.setSelectionAnchor()}))}}class _ extends r.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,c.NC)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:u})}run(e,t){var i;return d(this,void 0,void 0,(function*(){null===(i=g.get(t))||void 0===i||i.goToSelectionAnchor()}))}}class v extends r.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,c.NC)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:u,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,s.gx)(2089,2089),weight:100}})}run(e,t){var i;return d(this,void 0,void 0,(function*(){null===(i=g.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}class b extends r.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,c.NC)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:u,kbOpts:{kbExpr:l.u.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return d(this,void 0,void 0,(function*(){null===(i=g.get(t))||void 0===i||i.cancelSelectionAnchor()}))}}(0,r._K)(g.ID,g,4),(0,r.Qr)(f),(0,r.Qr)(_),(0,r.Qr)(v),(0,r.Qr)(b)},71387:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BracketMatchingController:()=>C});var n=i(15393),o=i(5976),s=i(16830),r=i(50187),a=i(24314),l=i(3860),c=i(29102),h=i(84973),d=i(82948),u=i(63580),g=i(84144),p=i(73910),m=i(97781);const f=(0,p.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},u.NC("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class _ extends s.R6{constructor(){super({id:"editor.action.jumpToBracket",label:u.NC("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;null===(i=C.get(t))||void 0===i||i.jumpToBracket()}}class v extends s.R6{constructor(){super({id:"editor.action.selectToBracket",label:u.NC("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let o=!0;i&&!1===i.selectBrackets&&(o=!1),null===(n=C.get(t))||void 0===n||n.selectToBracket(o)}}class b{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class C extends o.JT{static get(e){return e.getContribution(C.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(68),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(68)&&(this._matchBrackets=this._editor.getOption(68),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.Y(o.lineNumber,o.column,o.lineNumber,o.column):new l.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(s){s.sort(a.e.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),c=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=c,c=e}}r&&c&&i.push(new l.Y(r.lineNumber,r.column,c.lineNumber,c.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let t=0,i=e.length;t<i;t++){const i=e[t];i.isEmpty()&&(o[s++]=i.getStartPosition())}o.length>1&&o.sort(r.L.compare);const a=[];let l=0,c=0;const h=n.length;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(;c<h&&n[c].position.isBefore(i);)c++;if(c<h&&n[c].position.equals(i))a[l++]=n[c];else{let e=t.bracketPairs.matchBracket(i,20),n=C._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;e||"always"!==this._matchBrackets||(e=t.bracketPairs.findEnclosingBrackets(i,20),n=C._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new b(i,e,n)}}this._lastBracketsData=a,this._lastVersionId=i}}C.ID="editor.contrib.bracketMatchingController",C._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=d.qx.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,m.EN)(f),position:h.sh.Center}}),C._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=d.qx.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,s._K)(C.ID,C,1),(0,s.Qr)(v),(0,s.Qr)(_),g.BH.appendMenuItem(g.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:u.NC({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},54367:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(29102),s=i(24314),r=i(3860);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.e(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,o,i,o),a)}else{const r=new s.e(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new r.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new r.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(63580);class c extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.NC("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.u.writable})}}),(0,n.Qr)(class extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.NC("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.u.writable})}})},72102:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(61329),s=i(10839),r=i(24314),a=i(29102),l=i(63580);class c extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.NC("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],a=t.getSelections();for(const e of a){if(!e.isEmpty())continue;const t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;const c=a===l?e.getPosition():s.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),h=s.o.leftPosition(i,c),d=s.o.leftPosition(i,h),u=i.getValueInRange(r.e.fromPositions(d,h)),g=i.getValueInRange(r.e.fromPositions(h,c)),p=r.e.fromPositions(d,c);n.push(new o.T4(p,g+u))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(c)},55833:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CopyAction:()=>v,CutAction:()=>_,PasteAction:()=>b});var n=i(16268),o=i(1432),s=i(35715),r=i(16830),a=i(11640),l=i(29102),c=i(63580),h=i(84144),d=i(84972);const u="9_cutcopypaste",g=o.tY||document.queryCommandSupported("cut"),p=o.tY||document.queryCommandSupported("copy"),m=void 0!==navigator.clipboard&&!n.isFirefox||document.queryCommandSupported("paste");function f(e){return e.register(),e}const _=g?f(new r.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.NC({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:h.eH.EditorContext,group:u,title:c.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1},{menuId:h.eH.CommandPalette,group:"",title:c.NC("actions.clipboard.cutLabel","Cut"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1}]})):void 0,v=p?f(new r.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.NC({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:h.eH.EditorContext,group:u,title:c.NC("actions.clipboard.copyLabel","Copy"),order:2},{menuId:h.eH.CommandPalette,group:"",title:c.NC("actions.clipboard.copyLabel","Copy"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.NC("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;h.BH.appendMenuItem(h.eH.MenubarEditMenu,{submenu:h.eH.MenubarCopy,title:{value:c.NC("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),h.BH.appendMenuItem(h.eH.EditorContext,{submenu:h.eH.EditorContextCopy,title:{value:c.NC("copy as","Copy As"),original:"Copy As"},group:u,order:3}),h.BH.appendMenuItem(h.eH.EditorContext,{submenu:h.eH.EditorContextShare,title:{value:c.NC("share","Share"),original:"Share"},group:"11_share",order:-1});const b=m?f(new r.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.NC({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:h.eH.EditorContext,group:u,title:c.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4},{menuId:h.eH.CommandPalette,group:"",title:c.NC("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4}]})):void 0;class C extends r.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:c.NC("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(34)&&t.getSelection().isEmpty()||(s.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.RA.forceCopyWithSyntaxHighlighting=!1))}}function y(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(a.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(34),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}y(_,"cut"),y(v,"copy"),b&&(b.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(a.$),n=e.get(d.p),r=i.getFocusedCodeEditor();return!(!r||!r.hasTextFocus())&&(!(!document.execCommand("paste")&&o.$L)||(l=void 0,c=void 0,u=function*(){const e=yield n.readText();if(""!==e){const t=s.Nl.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=r.getOption(34)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),r.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}},new((h=void 0)||(h=Promise))((function(e,t){function i(e){try{o(u.next(e))}catch(e){t(e)}}function n(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof h?o:new h((function(e){e(o)}))).then(i,n)}o((u=u.apply(l,c||[])).next())}))));var l,c,h,u})),b.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),p&&(0,r.Qr)(C)},75396:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>w,LR:()=>A,MN:()=>k,RB:()=>y,TM:()=>L,UX:()=>I,aI:()=>D,sh:()=>S,uH:()=>x});var n=i(9488),o=i(71050),s=i(17301),r=i(5976),a=i(70666),l=i(66007),c=i(24314),h=i(3860),d=i(71922),u=i(73733),g=i(16467),p=i(63580),m=i(94565),f=i(59422),_=i(90535),v=i(10829),b=i(87997),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const y="editor.action.codeAction",w="editor.action.refactor",S="editor.action.refactor.preview",k="editor.action.sourceAction",x="editor.action.organizeImports",L="editor.action.fixAll";class E extends r.JT{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?E.codeActionsPreferredComparator(e,t):-1:(0,n.Of)(t.diagnostics)?1:E.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(E.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.yN.QuickFix.contains(new b.yN(e.kind))&&!!e.isPreferred))}}const N={actions:[],documentation:void 0};function D(e,t,i,o,a,l){var c;return C(this,void 0,void 0,(function*(){const h=o.filter||{},d={only:null===(c=h.include)||void 0===c?void 0:c.value,trigger:o.type},u=new g.YQ(t,l),p=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.EU)(i,new b.yN(e))))))}(e,t,h),m=new r.SL,f=p.map((e=>C(this,void 0,void 0,(function*(){try{a.report(e);const n=yield e.provideCodeActions(t,i,d,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return N;const o=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,b.Yl)(h,e))),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new b.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new b.yN(e.kind)))return t.command}(e,o,h.include);return{actions:o.map((t=>new b.bA(t,e))),documentation:s}}catch(e){if((0,s.n2)(e))throw e;return(0,s.Cp)(e),N}})))),_=e.onDidChange((()=>{const i=e.all(t);(0,n.fS)(i,p)||u.cancel()}));try{const i=yield Promise.all(f),s=i.map((e=>e.actions)).flat(),r=[...(0,n.kX)(i.map((e=>e.documentation))),...T(e,t,o,s)];return new E(s,r,m)}finally{_.dispose(),u.dispose()}}))}function*T(e,t,i,n){var o,s,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(o=a._getAdditionalMenuItems)||void 0===o?void 0:o.call(a,{trigger:i.type,only:null===(r=null===(s=i.filter)||void 0===s?void 0:s.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var I;function A(e,t,i,n,s=o.T.None){var r;return C(this,void 0,void 0,(function*(){const o=e.get(l.vu),a=e.get(m.H),c=e.get(v.b),h=e.get(f.lT);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),yield t.resolve(s),!s.isCancellationRequested){if((null===(r=t.action.edit)||void 0===r?void 0:r.edits.length)&&!(yield o.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==I.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return;if(t.action.command)try{yield a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);h.error("string"==typeof t?t:p.NC("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}))}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions"}(I||(I={})),m.P.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,r){return C(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,s.b1)();const{codeActionProvider:l}=e.get(d.p),g=e.get(u.q).getModel(t);if(!g)throw(0,s.b1)();const p=h.Y.isISelection(i)?h.Y.liftSelection(i):c.e.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,s.b1)();const m="string"==typeof n?new b.yN(n):void 0,f=yield D(l,g,p,{type:1,triggerAction:b.aQ.Default,filter:{includeSourceActions:!0,include:m}},_.Ex.None,o.T.None),v=[],C=Math.min(f.validActions.length,"number"==typeof r?r:0);for(let e=0;e<C;e++)v.push(f.validActions[e].resolve(o.T.None));try{return yield Promise.all(v),f.validActions.map((e=>e.action))}finally{setTimeout((()=>f.dispose()),100)}}))}))},79527:(e,t,i)=>{"use strict";i.d(t,{S5:()=>Me,dW:()=>Ee,G6:()=>ke,Hv:()=>Ae,o$:()=>Ie,E7:()=>Le,Eb:()=>Ne,UG:()=>De,VQ:()=>Te});var n=i(79579),o=i(5976),s=i(97295),r=i(16830),a=i(29102),l=i(71922),c=i(75396),h=i(65321),d=i(17301),u=i(50187),g=i(87997),p=i(91847);let m=class e{constructor(e){this.keybindingService=e}getResolver(){const t=new n.o((()=>this.keybindingService.getKeybindings().filter((t=>e.codeActionCommands.indexOf(t.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===c.uH?t={kind:g.yN.SourceOrganizeImports.value}:e.command===c.TM&&(t={kind:g.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},g.wZ.fromUser(t,{kind:g.yN.None,apply:"never"}))}))));return e=>{if(e.kind){const i=this.bestKeybindingForCodeAction(e,t.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};var f,_;m.codeActionCommands=[c.Bb,c.RB,c.MN,c.uH,c.TM],m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(f=0,_=p.d,function(e,t){_(e,t,f)})],m);var v=i(73046),b=(i(71713),i(63580));const C=Object.freeze({kind:g.yN.Empty,title:(0,b.NC)("codeAction.widget.id.more","More Actions...")}),y=Object.freeze([{kind:g.yN.QuickFix,title:(0,b.NC)("codeAction.widget.id.quickfix","Quick Fix...")},{kind:g.yN.RefactorExtract,title:(0,b.NC)("codeAction.widget.id.extract","Extract..."),icon:v.l.wrench},{kind:g.yN.RefactorInline,title:(0,b.NC)("codeAction.widget.id.inline","Inline..."),icon:v.l.wrench},{kind:g.yN.RefactorRewrite,title:(0,b.NC)("codeAction.widget.id.convert","Rewrite..."),icon:v.l.wrench},{kind:g.yN.RefactorMove,title:(0,b.NC)("codeAction.widget.id.move","Move..."),icon:v.l.wrench},{kind:g.yN.SurroundWith,title:(0,b.NC)("codeAction.widget.id.surround","Surround With..."),icon:v.l.symbolSnippet},{kind:g.yN.Source,title:(0,b.NC)("codeAction.widget.id.source","Source Action..."),icon:v.l.symbolFile},C]);var w=i(27753),S=i(90317),k=i(34650),x=i(55496),L=i(43799),E=i(25670),N=i(1432),D=i(5606),T=i(86253),I=i(73910),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};const R="acceptSelectedCodeAction",O="previewSelectedCodeAction";class P{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,o;i.text.textContent=null!==(o=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==o?o:""}disposeTemplate(e){}}let F=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new x.e(e,N.OS)}}renderElement(e,t,i){var n,o,s;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=E.k.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,I.n_1)(e.group.icon.color.id))):(i.icon.className=E.k.asClassName(v.l.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=V(e.label),e.keybinding?(i.keybinding.set(e.keybinding),h.$Z(i.keybinding.element)):h.Cp(i.keybinding.element);const r=null===(o=this._keybindingService.lookupKeybinding(R))||void 0===o?void 0:o.getLabel(),a=null===(s=this._keybindingService.lookupKeybinding(O))||void 0===s?void 0:s.getLabel();if(i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:r&&a?this._supportsPreview?i.container.title=(0,b.NC)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",r,a):i.container.title=(0,b.NC)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",r):i.container.title="",e.description){const t=new k.q(h.R3(i.container,h.$("span.label-description")));t.element.classList.add("action-list-description"),t.set(e.description)}}disposeTemplate(e){}};F=A([M(1,p.d)],F);class B extends UIEvent{constructor(){super("acceptSelectedAction")}}class H extends UIEvent{constructor(){super("previewSelectedAction")}}let W=class extends o.JT{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new L.aV(e,this.domNode,r,[new F(t,this._keybindingService),new P],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?V(null==e?void 0:e.label):"";return e.disabled&&(t=(0,b.NC)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,b.NC)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(T.O2),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this._list.domFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const n=this._allMenuItems.map(((e,t)=>{const i=document.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0})),o=Math.max(...n,e),s=Math.min(i,.7*document.body.clientHeight);return this._list.layout(s,o),this.domNode.style.height=`${s}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new H:new B;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof H):this._list.setSelection([])}onListHover(e){this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function V(e){return e.replace(/\r\n|\r|\n/g," ")}W=A([M(4,D.u),M(5,p.d)],W);var z=i(84144),U=i(38819),j=i(65026),K=i(72065),q=function(e,t){return function(i,n){t(i,n,e)}};const $={Visible:new U.uy("codeActionMenuVisible",!1,(0,b.NC)("codeActionMenuVisible","Whether the action widget list is visible"))},G=(0,K.yh)("actionWidgetService");let Q=class extends o.JT{get isVisible(){return $.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new o.XK)}show(e,t,i,n,o,s,r){const a=$.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(W,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(){var e;null===(e=this._list.value)||void 0===e||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,!this._list.value)throw new Error("List has no value");s.appendChild(this._list.value.domNode);const r=new o.SL,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add(h.nm(l,h.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),r.add(h.nm(d,h.tw.POINTER_MOVE,(()=>d.remove()))),r.add(h.nm(d,h.tw.MOUSE_DOWN,(()=>d.remove())));let u=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(s.appendChild(e.getContainer().parentElement),r.add(e),u=e.getContainer().offsetWidth)}const g=null===(n=this._list.value)||void 0===n?void 0:n.layout(u);s.style.width=`${g}px`;const p=r.add(h.go(e));return r.add(p.onDidBlur((()=>this.hide()))),r}_createActionBar(e,t){if(!t.length)return;const i=h.$(e),n=new S.o(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};Q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([q(0,D.u),q(1,U.i6),q(2,K.TG)],Q),(0,j.z)(G,Q,1);const Y=1100;(0,z.r1)(class extends z.Ke{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,b.NC)("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$.Visible,keybinding:{weight:Y,primary:9,secondary:[1033]}})}run(e){e.get(G).hide()}}),(0,z.r1)(class extends z.Ke{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,b.NC)("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$.Visible,keybinding:{weight:Y,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(G);t instanceof Q&&t.focusPrevious()}}),(0,z.r1)(class extends z.Ke{constructor(){super({id:"selectNextCodeAction",title:{value:(0,b.NC)("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$.Visible,keybinding:{weight:Y,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(G);t instanceof Q&&t.focusNext()}}),(0,z.r1)(class extends z.Ke{constructor(){super({id:R,title:{value:(0,b.NC)("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$.Visible,keybinding:{weight:Y,primary:3,secondary:[2132]}})}run(e){const t=e.get(G);t instanceof Q&&t.acceptSelected()}}),(0,z.r1)(class extends z.Ke{constructor(){super({id:O,title:{value:(0,b.NC)("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$.Visible,keybinding:{weight:Y,primary:2051}})}run(e){const t=e.get(G);t instanceof Q&&t.acceptSelected(!0)}});var Z,X=i(94565),J=i(33108),ee=i(10553),te=i(4669),ie=i(98401),ne=i(59616);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(Z||(Z={}));let oe=class e extends o.JT{constructor(e,t,i,n){super(),this._editor=e,this._onClick=this._register(new te.Q5),this.onClick=this._onClick.event,this._state=Z.Hidden,this._domNode=h.$("div.lightBulbWidget"),this._register(ee.o.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register(h.GQ(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=h.i(this._domNode),n=this._editor.getOption(63);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(o+=n),this._onClick.fire({x:e.posx,y:t+i+o,actions:this.state.actions,trigger:this.state.trigger})}))),this._register(h.nm(this._domNode,"mouseenter",(e=>{1==(1&e.buttons)&&this.hide()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(61)&&!this._editor.getOption(61).enabled&&this.hide()}))),this._register(te.ju.runAndSubscribe(n.onDidUpdateKeybindings,(()=>{var e,o;this._preferredKbLabel=(0,ie.f6)(null===(e=n.lookupKeybinding(i))||void 0===e?void 0:e.getLabel()),this._quickFixKbLabel=(0,ie.f6)(null===(o=n.lookupKeybinding(t))||void 0===o?void 0:o.getLabel()),this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(61).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,c=o.get(47),h=s.getLineContent(r),d=(0,ne.q)(h,l),u=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=r;if(!(c.spaceWidth*d>22))if(r>1&&!u(r-1))g-=1;else if(u(r+1)){if(a*c.spaceWidth<22)return this.hide()}else g+=1;this.state=new Z.Showing(t,i,n,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==Z.Hidden&&(this.state=Z.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){1===this.state.type&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...E.k.asClassNameArray(v.l.lightBulb)),this._domNode.classList.add(...E.k.asClassNameArray(v.l.lightbulbAutofix)),this._preferredKbLabel)?this.title=b.NC("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):(this._domNode.classList.remove(...E.k.asClassNameArray(v.l.lightbulbAutofix)),this._domNode.classList.add(...E.k.asClassNameArray(v.l.lightBulb)),this._quickFixKbLabel?this.title=b.NC("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=b.NC("codeAction","Show Code Actions"))}set title(e){this._domNode.title=e}};oe._posPref=[0],oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,p.d)],oe);var se,re=function(e,t){return function(i,n){t(i,n,e)}},ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let le=class extends o.JT{constructor(e,t,i,s,r,a,l,c){super(),this._editor=e,this.delegate=s,this._configurationService=a,this._actionWidgetService=l,this._commandService=c,this._activeCodeActions=this._register(new o.XK),se.set(this,!1),this._showDisabled=!1,this._lightBulbWidget=new n.o((()=>{const e=this._register(r.createInstance(oe,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.actions,e,{includeDisabledActions:!1,fromLightbulb:!0})))),e})),this._resolver=r.createInstance(m),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)})(this,se,!0,"f"),super.dispose()}update(e){var t,i,n,o,s;return ae(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let r;try{r=yield e.actions}catch(e){return void(0,d.dL)(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,se,"f"))if(this._lightBulbWidget.value.update(r,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,r);if(t){try{this._lightBulbWidget.value.hide(),yield this.delegate.applyCodeAction(t,!1,!1)}finally{r.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,r);if(t&&t.action.disabled)return null===(n=w.O.get(this._editor))||void 0===n||n.showMessage(t.action.disabled,e.trigger.context.position),void r.dispose()}}const t=!!(null===(o=e.trigger.filter)||void 0===o?void 0:o.include);if(e.trigger.context&&(!r.allActions.length||!t&&!r.validActions.length))return null===(s=w.O.get(this._editor))||void 0===s||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=r,void r.dispose();this._activeCodeActions.value=r,this.showCodeActionList(r,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?r.dispose():this._activeCodeActions.value=r}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i){return ae(this,void 0,void 0,(function*(){const n=this._editor.getDomNode();if(!n)return;const o=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!o.length)return;const s=u.L.isIPosition(t)?this.toCoords(t):t,r={onSelect:(e,t)=>ae(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0,t||!1),this._actionWidgetService.hide()})),onHide:()=>{var e;null===(e=this._editor)||void 0===e||e.focus()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:C,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title})));const n=y.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new g.yN(t.action.kind):g.yN.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const o=[];for(const e of n)if(e.actions.length){o.push({kind:"header",group:e.group});for(const t of e.actions)o.push({kind:"action",item:t,group:e.group,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}return o}(o,this._shouldShowHeaders(),this._resolver.getResolver()),r,s,n,this._getActionBarActions(e,t,i))}))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,h.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.commandArguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,b.NC)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,b.NC)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};se=new WeakMap,le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(4,K.TG),re(5,J.Ui),re(6,G),re(7,X.H)],le);var ce,he=i(98674),de=i(90535),ue=i(15393),ge=i(95935),pe=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const me=new U.uy("supportedCodeAction","");class fe extends o.JT{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new ue._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,ge.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.aQ.Default})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.aQ.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n={trigger:e,selection:t,position:t.getStartPosition()};return this._signalChange(n),n}}var _e;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if((0,d.n2)(e))return ve;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(_e||(_e={}));const ve={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class be extends o.JT{constructor(e,t,i,n,s){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._codeActionOracle=this._register(new o.XK),this._state=_e.Empty,this._onDidChangeState=this._register(new te.Q5),this.onDidChangeState=this._onDidChangeState.event,ce.set(this,!1),this._supportedCodeActions=me.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){pe(this,ce,"f")||(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)}(this,ce,!0,"f"),super.dispose(),this.setState(_e.Empty,!0))}_update(){if(pe(this,ce,"f"))return;this._codeActionOracle.value=void 0,this.setState(_e.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(86)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new fe(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(_e.Empty);const n=(0,ue.PG)((i=>(0,c.aI)(this._registry,e,t.selection,t.trigger,de.Ex.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new _e.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.aQ.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||pe(this,ce,"f")||this._onDidChangeState.fire(e))}}ce=new WeakMap;var Ce=function(e,t){return function(i,n){t(i,n,e)}};function ye(e){return U.Ao.regex(me.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}function we(e,t,i,n){const o=g.wZ.fromUser(t,{kind:g.yN.Refactor,apply:"never"});return xe(e,"string"==typeof(null==t?void 0:t.kind)?o.preferred?b.NC("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",t.kind):b.NC("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",t.kind):o.preferred?b.NC("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):b.NC("editor.action.refactor.noneMessage","No refactorings available"),{include:g.yN.Refactor.contains(o.kind)?o.kind:g.yN.None,onlyIncludePreferredActions:o.preferred},o.apply,i,n)}const Se={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:b.NC("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:b.NC("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[b.NC("args.schema.apply.first","Always apply the first returned code action."),b.NC("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),b.NC("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:b.NC("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let ke=class e extends o.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,o,s,r){super(),this._instantiationService=s,this._editor=e,this._model=this._register(new be(this._editor,r.codeActionProvider,t,i,o)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new n.o((()=>this._register(s.createInstance(le,e,Le.Id,Me.Id,{applyCodeAction:(e,t,i)=>{return n=this,o=void 0,r=function*(){try{yield this._applyCodeAction(e,i)}finally{t&&this._trigger({type:2,triggerAction:g.aQ.QuickFix,filter:{}})}},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}}))))}update(e){this._ui.value.update(e)}showCodeActions(e,t,i){return this._ui.value.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n,o){var s;if(!this._editor.hasModel())return;null===(s=w.O.get(this._editor))||void 0===s||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r},preview:o})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t){return this._instantiationService.invokeFunction(c.LR,e,c.UX.FromCodeActions,{preview:t,editor:this._editor})}};function xe(e,t,i,n,o=!1,s=g.aQ.Default){if(e.hasModel()){const r=ke.get(e);null==r||r.manualTriggerAtCurrentPosition(t,s,i,n,o)}}ke.ID="editor.contrib.codeActionController",ke=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ce(1,he.lT),Ce(2,U.i6),Ce(3,de.ek),Ce(4,K.TG),Ce(5,l.p)],ke);class Le extends r.R6{constructor(){super({id:Le.Id,label:b.NC("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:U.Ao.and(a.u.writable,a.u.hasCodeActionsProvider),kbOpts:{kbExpr:a.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return xe(t,b.NC("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,!1,g.aQ.QuickFix)}}Le.Id="editor.action.quickFix";class Ee extends r._l{constructor(){super({id:c.RB,precondition:U.Ao.and(a.u.writable,a.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:Se}]}})}runEditorCommand(e,t,i){const n=g.wZ.fromUser(i,{kind:g.yN.Empty,apply:"ifSingle"});return xe(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?b.NC("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):b.NC("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?b.NC("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):b.NC("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Ne extends r.R6{constructor(){super({id:c.Bb,label:b.NC("refactor.label","Refactor..."),alias:"Refactor...",precondition:U.Ao.and(a.u.writable,a.u.hasCodeActionsProvider),kbOpts:{kbExpr:a.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:U.Ao.and(a.u.writable,ye(g.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:Se}]}})}run(e,t,i){return we(t,i,!1,g.aQ.Refactor)}}class De extends r.R6{constructor(){super({id:c.sh,label:b.NC("refactor.preview.label","Refactor with Preview..."),alias:"Refactor Preview...",precondition:U.Ao.and(a.u.writable,a.u.hasCodeActionsProvider),description:{description:"Refactor Preview...",args:[{name:"args",schema:Se}]}})}run(e,t,i){return we(t,i,!0,g.aQ.RefactorPreview)}}class Te extends r.R6{constructor(){super({id:c.MN,label:b.NC("source.label","Source Action..."),alias:"Source Action...",precondition:U.Ao.and(a.u.writable,a.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:U.Ao.and(a.u.writable,ye(g.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:Se}]}})}run(e,t,i){const n=g.wZ.fromUser(i,{kind:g.yN.Source,apply:"never"});return xe(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?b.NC("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):b.NC("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?b.NC("editor.action.source.noneMessage.preferred","No preferred source actions available"):b.NC("editor.action.source.noneMessage","No source actions available"),{include:g.yN.Source.contains(n.kind)?n.kind:g.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,void 0,g.aQ.SourceAction)}}class Ie extends r.R6{constructor(){super({id:c.uH,label:b.NC("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:U.Ao.and(a.u.writable,ye(g.yN.SourceOrganizeImports)),kbOpts:{kbExpr:a.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return xe(t,b.NC("editor.action.organize.noneMessage","No organize imports action available"),{include:g.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",void 0,g.aQ.OrganizeImports)}}class Ae extends r.R6{constructor(){super({id:c.TM,label:b.NC("fixAll.label","Fix All"),alias:"Fix All",precondition:U.Ao.and(a.u.writable,ye(g.yN.SourceFixAll))})}run(e,t){return xe(t,b.NC("fixAll.noneMessage","No fix all action available"),{include:g.yN.SourceFixAll,includeSourceActions:!0},"ifSingle",void 0,g.aQ.FixAll)}}class Me extends r.R6{constructor(){super({id:Me.Id,label:b.NC("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:U.Ao.and(a.u.writable,ye(g.yN.QuickFix)),kbOpts:{kbExpr:a.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return xe(t,b.NC("editor.action.autoFix.noneMessage","No auto fixes available"),{include:g.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",void 0,g.aQ.AutoFix)}}Me.Id="editor.action.autoFix"},29575:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(800),s=i(79527),r=i(63580),a=i(23193),l=i(89872);(0,n._K)(s.G6.ID,s.G6,3),(0,n.Qr)(s.E7),(0,n.Qr)(s.Eb),(0,n.Qr)(s.UG),(0,n.Qr)(s.VQ),(0,n.Qr)(s.o$),(0,n.Qr)(s.S5),(0,n.Qr)(s.Hv),(0,n.fK)(new s.dW),l.B.as(a.IP.Configuration).registerConfiguration(Object.assign(Object.assign({},o.wk),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:r.NC("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))},87997:(e,t,i)=>{"use strict";i.d(t,{EU:()=>r,Yl:()=>a,aQ:()=>n,bA:()=>h,wZ:()=>c,yN:()=>s});var n,o=i(17301);class s{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+s.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new s(this.value+s.sep+e)}}function r(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>l(t,i,e.include)))||!e.includeSourceActions&&s.Source.contains(t))}function a(e,t){const i=t.kind?new s(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>l(i,t,e.include)))||!e.includeSourceActions&&i&&s.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function l(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}s.sep=".",s.None=new s("@@none@@"),s.Empty=new s(""),s.QuickFix=new s("quickfix"),s.Refactor=new s("refactor"),s.RefactorExtract=s.Refactor.append("extract"),s.RefactorInline=s.Refactor.append("inline"),s.RefactorMove=s.Refactor.append("move"),s.RefactorRewrite=s.Refactor.append("rewrite"),s.Source=new s("source"),s.SourceOrganizeImports=s.Source.append("organizeImports"),s.SourceFixAll=s.Source.append("fixAll"),s.SurroundWith=s.Refactor.append("surround"),function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(n||(n={}));class c{static fromUser(e,t){return e&&"object"==typeof e?new c(c.getKindFromUser(e,t.kind),c.getApplyFromUser(e,t.apply),c.getPreferredUser(e)):new c(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new s(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class h{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t,i,n,s,r;return i=this,n=void 0,r=function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,o.Cp)(e)}t&&(this.action.edit=t.edit)}return this},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(o,a)}l((r=r.apply(i,n||[])).next())}))}}},85729:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeLensContribution:()=>U});var n=i(15393),o=i(17301),s=i(5976),r=i(43407),a=i(16830),l=i(64141),c=i(29102),h=i(71050),d=i(98401),u=i(70666),g=i(73733),p=i(94565),m=i(71922),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class _{constructor(){this.lenses=[],this._disposables=new s.SL}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function v(e,t,i){return f(this,void 0,void 0,(function*(){const n=e.ordered(t),s=new Map,r=new _,a=n.map(((e,n)=>f(this,void 0,void 0,(function*(){s.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumber<t.symbol.range.startLineNumber?-1:e.symbol.range.startLineNumber>t.symbol.range.startLineNumber?1:s.get(e.provider)<s.get(t.provider)?-1:s.get(e.provider)>s.get(t.provider)?1:e.symbol.range.startColumn<t.symbol.range.startColumn?-1:e.symbol.range.startColumn>t.symbol.range.startColumn?1:0)),r}))}p.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,d.p_)(u.o.isUri(i)),(0,d.p_)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(m.p),a=e.get(g.q).getModel(i);if(!a)throw(0,o.b1)();const l=[],c=new s.SL;return v(r,a,h.T.None).then((e=>{c.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,h.T.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var b=i(88289),C=i(43702),y=i(24314),w=i(65026),S=i(72065),k=i(26904);const x=(0,S.yh)("ICodeLensCache");class L{constructor(e,t){this.lineCount=e,this.data=t}}let E=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new C.z6(20,.75),(0,n.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,b.I)(e.onWillSaveState)((i=>{i.reason===k.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new _;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new L(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new y.e(e,1,e,11)});const o=new _;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new L(i.lineCount,o))}}catch(e){}}};var N,D;E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(N=0,D=k.Uy,function(e,t){D(e,t,N)})],E),(0,w.z)(x,E,1);var T=i(65321),I=i(56811),A=i(82948);class M{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class R{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+R._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t<e.length;t++){const o=e[t];if(o&&(n=!0,o.command)){const n=(0,I.T)(o.command.title.trim());o.command.id?(i.push(T.$("a",{id:String(t),title:o.command.tooltip,role:"button"},...n)),this._commands.set(String(t),o.command)):i.push(T.$("span",{title:o.command.tooltip},...n)),t+1<e.length&&i.push(T.$("span",void 0," | "))}}n?(T.mc(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):T.mc(this._domNode,T.$("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}R._idPool=0;class O{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let e=0,i=t.length;e<i;e++)this._addDecorationsCallbacks[e](t[e])}}const P=A.qx.register({collapseOnReplaceEdit:!0,description:"codelens"});class F{constructor(e,t,i,n,o,s){let r;this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];const a=[];this._data.forEach(((e,t)=>{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:P},(e=>this._decorationIds[t]=e)),r=r?y.e.plusRange(r,e.symbol.range):y.e.lift(e.symbol.range)})),this._viewZone=new M(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new R(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||y.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:P},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:e}=this._data[t];e.command=i.command||e.command}}}getCommand(e){var t;return null===(t=this._contentWidget)||void 0===t?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var B=i(63580),H=i(59422),W=i(41157),V=i(88191),z=function(e,t){return function(i,n){t(i,n,e)}};let U=class{constructor(e,t,i,o,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=o,this._notificationService=r,this._codeLensCache=a,this._disposables=new s.SL,this._localToDispose=new s.SL,this._lenses=[],this._oldCodeLensModels=new s.SL,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new n.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(47)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(63)/this._editor.getOption(49));let t=this._editor.getOption(16);return(!t||t<5)&&(t=.9*this._editor.getOption(49)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(47),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.hL.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add((0,n.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.pY((()=>{var t;const s=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,n.PG)((t=>v(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const n=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=n,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),o.dL)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,s.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new O;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,s.OF)((()=>{if(this._editor.getModel()){const e=r.Z.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new O;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const o of e.lenses){const e=o.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(o):(n=[o],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=r.Z.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new O;let o=0,r=0;for(;r<i.length&&o<this._lenses.length;){const e=i[r][0].symbol.range.startLineNumber,a=this._lenses[o].getLineNumber();a<e?(this._lenses[o].dispose(n,t),this._lenses.splice(o,1)):a===e?(this._lenses[o].updateCodeLensSymbols(i[r],n),r++,o++):(this._lenses.splice(o,0,new F(i[r],this._editor,n,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;o<this._lenses.length;)this._lenses[o].dispose(n,t),this._lenses.splice(o,1);for(;r<i.length;)this._lenses.push(new F(i[r],this._editor,n,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],s=[];if(this._lenses.forEach((e=>{const n=e.computeIfNecessary(t);n&&(i.push(n),s.push(e))})),0===i.length)return;const r=Date.now(),a=(0,n.PG)((e=>{const n=i.map(((i,n)=>{const r=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(r[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{r[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||s[n].isDisposed()||s[n].updateCommands(r)}))}));return Promise.all(n)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};U.ID="css.editor.codeLens",U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([z(1,m.p),z(2,V.A),z(3,p.H),z(4,H.lT),z(5,x)],U),(0,a._K)(U.ID,U,1),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:c.u.hasCodeLensProvider,label:(0,B.NC)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,s=function*(){if(!t.hasModel())return;const i=e.get(W.eJ),n=e.get(p.H),o=e.get(H.lT),s=t.getSelection().positionLineNumber,r=t.getContribution(U.ID);if(!r)return;const a=r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=yield i.pick(l,{canPickMany:!1});if(c){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(e){o.error(e)}}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}})},65125:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ColorContribution:()=>G});var n=i(5976),o=i(16830),s=i(24314),r=i(15393),a=i(41264),l=i(17301),c=i(84013),h=i(97295),d=i(29994),u=i(82948),g=i(88191),p=i(71922),m=i(71050),f=i(70666),_=i(73733),v=i(94565);function b(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}v.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof f.o))throw(0,l.b1)();const{colorProvider:n}=e.get(p.p),o=e.get(_.q).getModel(i);if(!o)throw(0,l.b1)();const s=[],r=n.ordered(o).reverse().map((e=>Promise.resolve(e.provideDocumentColors(o,m.T.None)).then((e=>{if(Array.isArray(e))for(const t of e)s.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(r).then((()=>s))})),v.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:r}=n;if(!(o instanceof f.o&&Array.isArray(i)&&4===i.length&&s.e.isIRange(r)))throw(0,l.b1)();const[a,c,h,d]=i,{colorProvider:u}=e.get(p.p),g=e.get(_.q).getModel(o);if(!g)throw(0,l.b1)();const v={range:r,color:{red:a,green:c,blue:h,alpha:d}},b=[],C=u.ordered(g).reverse().map((e=>Promise.resolve(e.provideColorPresentations(g,v,m.T.None)).then((e=>{Array.isArray(e)&&b.push(...e)}))));return Promise.all(C).then((()=>b))}));var C=i(33108),y=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let S=class e extends n.JT{constructor(t,i,o,s){super(),this._editor=t,this._configurationService=i,this._languageFeaturesService=o,this._localToDispose=this._register(new n.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new d.t7(this._editor),this._colorDecorationClassRefs=this._register(new n.SL),this._debounceInformation=s.for(o.colorProvider,"Document Colors",{min:e.RECOMPUTE_TIME}),this._register(t.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(t.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(o.colorProvider.onDidChange((()=>this.onModelChanged()))),this._register(t.onDidChangeConfiguration((e=>{const t=this._isEnabled;this._isEnabled=this.isEnabled(),(t!==this._isEnabled||e.hasChanged(18))&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(17)}getDecoratorLimit(){return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new r._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,r.PG)((e=>{return t=this,i=void 0,o=function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new c.G(!1),n=yield function(e,t,i){const n=[],o=e.ordered(t).reverse().map((e=>Promise.resolve(e.provideDocumentColors(t,i)).then((t=>{if(Array.isArray(t))for(const i of t)n.push({colorInfo:i,provider:e})}))));return Promise.all(o).then((()=>n))}(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),n},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),l.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:u.qx.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[];for(let i=0;i<e.length&&t.length<this.getDecoratorLimit();i++){const{red:n,green:o,blue:s,alpha:r}=e[i].colorInfo.color,l=new a.VS(Math.round(255*n),Math.round(255*o),Math.round(255*s),r),c=`rgba(${l.r}, ${l.g}, ${l.b}, ${l.a})`,d=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:c}));t.push({range:{startLineNumber:e[i].colorInfo.range.startLineNumber,startColumn:e[i].colorInfo.range.startColumn,endLineNumber:e[i].colorInfo.range.endLineNumber,endColumn:e[i].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:h.B4,inlineClassName:`${d.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:w}}})}this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(s.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};S.ID="editor.contrib.colorDetector",S.RECOMPUTE_TIME=1e3,S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([y(1,C.Ui),y(2,p.p),y(3,g.A)],S),(0,o._K)(S.ID,S,1);var k=i(4669);class x{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new k.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new k.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new k.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let e=0;e<this.colorPresentations.length;e++)if(t.toLowerCase()===this.colorPresentations[e].label){i=e;break}if(-1===i){const e=t.split("(")[0].toLowerCase();for(let t=0;t<this.colorPresentations.length;t++)if(this.colorPresentations[t].label.toLowerCase().startsWith(e)){i=t;break}}-1!==i&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}var L=i(16268),E=i(65321),N=i(93911),D=i(93794),T=i(63580),I=i(73910);const A=E.$;class M extends n.JT{constructor(e,t,i){super(),this.model=t,this.domNode=A(".colorpicker-header"),E.R3(e,this.domNode),this.pickedColorNode=E.R3(this.domNode,A(".picked-color"));const n=(0,T.NC)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this.pickedColorNode.setAttribute("title",n);const o=E.R3(this.domNode,A(".original-color"));o.style.backgroundColor=a.Il.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(I.yJx)||a.Il.white,this._register(i.onDidColorThemeChange((e=>{this.backgroundColor=e.getColor(I.yJx)||a.Il.white}))),this._register(E.nm(this.pickedColorNode,E.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(E.nm(o,E.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=a.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=a.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(A(".codicon.codicon-color-mode"))}}class R extends n.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=A(".colorpicker-body"),E.R3(e,this.domNode),this.saturationBox=new O(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new F(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new B(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new a.Il(new a.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new a.Il(new a.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new a.Il(new a.tx(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class O extends n.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new k.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new k.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=A(".saturation-wrap"),E.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",E.R3(this.domNode,this.canvas),this.selection=A(".saturation-selection"),E.R3(this.domNode,this.selection),this.layout(),this._register(E.nm(this.domNode,E.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new N.C);const t=E.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=E.nm(document,E.tw.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new a.Il(new a.tx(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=a.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class P extends n.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new k.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new k.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=E.R3(e,A(".strip")),this.overlay=E.R3(this.domNode,A(".overlay")),this.slider=E.R3(this.domNode,A(".slider")),this.slider.style.top="0px",this._register(E.nm(this.domNode,E.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new N.C),i=E.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=E.nm(document,E.tw.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class F extends P{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new a.Il(new a.VS(t,i,n,1)),s=new a.Il(new a.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class B extends P{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class H extends D.${constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(L.PixelRatio.onDidChange((()=>this.layout())));const o=A(".colorpicker-widget");e.appendChild(o);const s=new M(o,this.model,n);this.body=new R(o,this.model,this.pixelRatio),this._register(s),this._register(this.body)}layout(){this.body.layout()}}var W=i(97781),V=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class z{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let U=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return r.Aq.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return V(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=S.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecoration(i))continue;const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return V(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:r,blue:l,alpha:c}=t.color,h=new a.VS(Math.round(255*o),Math.round(255*r),Math.round(255*l),c),d=new a.Il(h),u=yield b(e,t,i,m.T.None),g=new x(d,[],0);return g.colorPresentations=u||[],g.guessColorPresentation(d,n),new z(this,s.e.lift(t.range),g,i)}))}renderHoverParts(e,t){if(0===t.length||!this._editor.hasModel())return n.JT.None;const i=new n.SL,o=t[0],r=this._editor.getModel(),a=o.model,l=i.add(new H(e.fragment,a,this._editor.getOption(136),this._themeService));e.setColorPicker(l);let c=new s.e(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const h=()=>{let t,i;if(a.presentation.textEdit){t=[a.presentation.textEdit],i=new s.e(a.presentation.textEdit.range.startLineNumber,a.presentation.textEdit.range.startColumn,a.presentation.textEdit.range.endLineNumber,a.presentation.textEdit.range.endColumn);const e=this._editor.getModel()._setTrackedRange(null,i,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t),i=this._editor.getModel()._getTrackedRange(e)||i}else t=[{range:c,text:a.presentation.label,forceMoveMarkers:!1}],i=c.setEndPosition(c.endLineNumber,c.startColumn+a.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t);a.presentation.additionalTextEdits&&(t=[...a.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",t),e.hide()),this._editor.pushUndoStop(),c=i},d=e=>b(r,{range:c,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},o.provider,m.T.None).then((e=>{a.colorPresentations=e||[]}));return i.add(a.onColorFlushed((e=>{d(e).then(h)}))),i.add(a.onDidChangeColor(d)),i}};var j,K;U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(j=1,K=W.XE,function(e,t){K(e,t,j)})],U);var q=i(9427),$=i(66520);class G extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(6!==t.type)return;if(!t.detail.injectedText)return;if(t.detail.injectedText.options.attachedData!==w)return;if(!t.range)return;const i=this._editor.getContribution(q.ModesHoverController.ID);if(i&&!i.isColorPickerVisible()){const e=new s.e(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(e,1,0,!1)}}}G.ID="editor.contrib.colorContribution",(0,o._K)(G.ID,G,2),$.Ae.register(U)},23365:(e,t,i)=>{"use strict";i.r(t);var n=i(22258),o=i(16830),s=i(24314),r=i(29102),a=i(51381),l=i(69386),c=i(50187),h=i(3860);class d{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let o=0;o<n;o++){const n=e.charCodeAt(i+o),s=t.charCodeAt(o);if(n!==s&&!(n>=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,h=e.endColumn,u=o.getLineContent(a),g=o.getLineContent(c);let p,m=u.lastIndexOf(t,l-1+t.length),f=g.indexOf(i,h-1-i.length);if(-1!==m&&-1!==f)if(a===c)u.substring(m+t.length,f).indexOf(i)>=0&&(m=-1,f=-1);else{const e=u.substring(m+t.length),n=g.substring(0,f);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(m=-1,f=-1)}-1!==m&&-1!==f?(n&&m+t.length<u.length&&32===u.charCodeAt(m+t.length)&&(t+=" "),n&&f>0&&32===g.charCodeAt(f-1)&&(i=" "+i,f-=1),p=d._createRemoveBlockCommentOperations(new s.e(a,m+t.length+1,c,f+1),t,i)):(p=d._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return s.e.isEmpty(e)?n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.h.insert(new c.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.h.insert(new c.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new h.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new h.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(97295);class g{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;e<n;e++)a[e]={ignore:!1,commentStr:r,commentStrOffset:0,commentStrLength:r.length};return a}static _analyzeLines(e,t,i,n,o,s,r,a){let l,c=!0;l=0===e||1!==e;for(let a=0,h=n.length;a<h;a++){const h=n[a],g=o+a;if(g===o&&r){h.ignore=!0;continue}const p=i.getLineContent(g),m=u.LC(p);if(-1!==m){if(c=!1,h.ignore=!1,h.commentStrOffset=m,l&&!d._haystackHasNeedleAtOffset(p,h.commentStr,m)&&(0===e?l=!1:1===e||(h.ignore=!0)),l&&t){const e=m+h.commentStrLength;e<p.length&&32===p.charCodeAt(e)&&(h.commentStrLength+=1)}}else h.ignore=s,h.commentStrOffset=p.length}if(0===e&&c){l=!1;for(let e=0,t=n.length;e<t;e++)n[e].ignore=!1}return{supported:!0,shouldRemoveComments:l,lines:n}}static _gatherPreflightData(e,t,i,n,o,s,r,a){const l=g._gatherPreflightCommentStrings(i,n,o,a);return null===l?{supported:!1}:g._analyzeLines(e,t,i,l,n,s,r,a)}_executeLineComments(e,t,i,n){let o;i.shouldRemoveComments?o=g._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(g._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new c.L(n.positionLineNumber,n.positionColumn);for(let i=0,n=o.length;i<n;i++)t.addEditOperation(o[i].range,o[i].text),s.e.isEmpty(o[i].range)&&s.e.getStartPosition(o[i].range).equals(r)&&e.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(o[i].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let o=t.startLineNumber,r=t.endLineNumber;const a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(o).lastIndexOf(i,a-1),c=e.getLineContent(r).indexOf(n,t.endColumn-1-i.length);return-1!==l&&-1===c&&(c=e.getLineContent(o).indexOf(n,l+i.length),r=o),-1===l&&-1!==c&&(l=e.getLineContent(r).lastIndexOf(i,c),o=r),!t.isEmpty()||-1!==l&&-1!==c||(l=e.getLineContent(o).indexOf(i),-1!==l&&(c=e.getLineContent(o).indexOf(n,l+i.length))),-1!==l&&32===e.getLineContent(o).charCodeAt(l+i.length)&&(i+=" "),-1!==c&&32===e.getLineContent(r).charCodeAt(c-1)&&(n=" "+n,c-=1),-1!==l&&-1!==c?d._createRemoveBlockCommentOperations(new s.e(o,l+i.length+1,r,c+1),i,n):null}_executeBlockComment(e,t,i){e.tokenization.tokenizeIfCheap(i.startLineNumber);const n=e.getLanguageIdAtPosition(i.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;const r=o.blockCommentStartToken,a=o.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,r,a);if(!l){if(i.isEmpty()){const t=e.getLineContent(i.startLineNumber);let n=u.LC(t);-1===n&&(n=t.length),l=d._createAddBlockCommentOperations(new s.e(i.startLineNumber,n+1,i.startLineNumber,t.length+1),r,a,this._insertSpace)}else l=d._createAddBlockCommentOperations(new s.e(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),r,a,this._insertSpace);1===l.length&&(this._deltaColumn=r.length+1)}this._selectionId=t.trackSelection(i);for(const e of l)t.addEditOperation(e.range,e.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine)return t.addEditOperation(new s.e(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":"\n"),void(this._selectionId=t.trackSelection(i));i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=g._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new h.Y(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];o.ignore||i.push(l.h.delete(new s.e(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){const s=e[o];s.ignore||i.push(l.h.insert(new c.L(t+o,s.commentStrOffset+1),s.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let o,s,r=1073741824;for(let o=0,s=t.length;o<s;o++){if(t[o].ignore)continue;const s=e.getLineContent(i+o);let a=0;for(let e=0,i=t[o].commentStrOffset;a<r&&e<i;e++)a=g.nextVisibleColumn(a,n,9===s.charCodeAt(e),1);a<r&&(r=a)}r=Math.floor(r/n)*n;for(let a=0,l=t.length;a<l;a++){if(t[a].ignore)continue;const l=e.getLineContent(i+a);let c=0;for(o=0,s=t[a].commentStrOffset;c<r&&o<s;o++)c=g.nextVisibleColumn(c,n,9===l.charCodeAt(o),1);t[a].commentStrOffset=c>r?o-1:o}}}var p=i(63580),m=i(84144);class f extends o.R6{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=[],o=t.getModel().getOptions(),r=t.getOption(20),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let c=l[0];for(let e=1;e<l.length;e++){const t=l[e];c.selection.endLineNumber===t.selection.startLineNumber&&(c.index<t.index?t.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=t))}for(const e of l)n.push(new g(i,e.selection,o.tabSize,this._type,r.insertSpace,r.ignoreEmptyLines,e.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class _ extends o.R6{constructor(){super({id:"editor.action.blockComment",label:p.NC("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:m.eH.MenubarEditMenu,group:"5_insert",title:p.NC({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=t.getOption(20),o=[],s=t.getSelections();for(const e of s)o.push(new d(e,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,o.Qr)(class extends f{constructor(){super(0,{id:"editor.action.commentLine",label:p.NC("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:m.eH.MenubarEditMenu,group:"5_insert",title:p.NC({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}),(0,o.Qr)(class extends f{constructor(){super(1,{id:"editor.action.addCommentLine",label:p.NC("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,n.gx)(2089,2081),weight:100}})}}),(0,o.Qr)(class extends f{constructor(){super(2,{id:"editor.action.removeCommentLine",label:p.NC("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,n.gx)(2089,2099),weight:100}})}}),(0,o.Qr)(_)},93740:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ContextMenuController:()=>_});var n=i(65321),o=i(88609),s=i(74741),r=i(5976),a=i(1432),l=i(16830),c=i(29102),h=i(63580),d=i(84144),u=i(38819),g=i(5606),p=i(91847),m=i(33108),f=function(e,t){return function(i,n){t(i,n,e)}};let _=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,o,s,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=o,this._keybindingService=s,this._menuService=a,this._configurationService=l,this._toDispose=new r.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&n.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(21)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(21))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(21))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?d.eH.SimpleEditorContext:d.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(const t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof d.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new s.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new s.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(57);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=n.i(this._editor.getDomNode()),o=i.left+e.left,s=i.top+e.top+e.height;t={x:o,y:s}}const s=this._editor.getOption(121)&&!a.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new o.gU(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new o.gU(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;const t=this._editor.getOption(69);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t,o,r,a)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const l=e=>()=>{this._configurationService.updateValue(o,e)},c=[];for(const e of a)c.push(n({label:e.label,checked:r===e.value,run:l(e.value)}));return((e,t)=>new s.wY("menu-action-"+ ++i,e,t,void 0))(e,c)},r=[];r.push(n({label:h.NC("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),r.push(new s.Z0),r.push(n({label:h.NC("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),r.push(o(h.NC("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:h.NC("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:h.NC("context.minimap.size.fill","Fill"),value:"fill"},{label:h.NC("context.minimap.size.fit","Fit"),value:"fit"}])),r.push(o(h.NC("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:h.NC("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:h.NC("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(121)&&!a.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>r,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};_.ID="editor.contrib.contextmenu",_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(1,g.i),f(2,g.u),f(3,u.i6),f(4,p.d),f(5,d.co),f(6,m.Ui)],_);class v extends l.R6{constructor(){super({id:"editor.action.showContextMenu",label:h.NC("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:c.u.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=_.get(t))||void 0===i||i.showContextMenu()}}(0,l._K)(_.ID,_,2),(0,l.Qr)(v)},14907:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(800),s=i(23547),r=i(65321),a=i(15393),l=i(73278),c=i(5976),h=i(81170),d=i(66663),u=i(98e3),g=i(49889),p=i(66007),m=i(24314),f=i(3860),_=i(71922),v=i(16467),b=i(35084),C=i(63580),y=i(84972),w=i(33108),S=i(90535),k=function(e,t){return function(i,n){t(i,n,e)}},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const L="application/vnd.code.copyMetadata";let E=class extends c.JT{constructor(e,t,i,n,o,s){super(),this._bulkEditService=t,this._clipboardService=i,this._configurationService=n,this._languageFeaturesService=o,this._progressService=s,this._editor=e;const a=e.getContainerDomNode();this._register((0,r.nm)(a,"copy",(e=>this.handleCopy(e)))),this._register((0,r.nm)(a,"cut",(e=>this.handleCopy(e)))),this._register((0,r.nm)(a,"paste",(e=>this.handlePaste(e)),!0))}arePasteActionsEnabled(e){return!!this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:e.uri})||e.uri.scheme===d.lg.vscodeNotebookCell}handleCopy(e){var t;if(!e.clipboardData||!this._editor.hasTextFocus())return;const i=this._editor.getModel(),n=this._editor.getSelections();if(!i||!(null==n?void 0:n.length))return;if(!this.arePasteActionsEnabled(i))return;const o=[...n],s=n[0],r=s.isEmpty();if(r){if(!this._editor.getOption(34))return;o[0]=new m.e(s.startLineNumber,0,s.startLineNumber,i.getLineLength(s.startLineNumber))}const l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter((e=>!!e.prepareDocumentPaste));if(!l.length)return void this.setCopyMetadata(e.clipboardData,{wasFromEmptySelection:r});const c=(0,g.B)(e.clipboardData),h=(0,u.R)();this.setCopyMetadata(e.clipboardData,{id:h,wasFromEmptySelection:r});const d=(0,a.PG)((e=>x(this,void 0,void 0,(function*(){const t=yield Promise.all(l.map((t=>t.prepareDocumentPaste(i,o,c,e))));for(const e of t)null==e||e.forEach(((e,t)=>{c.replace(t,e)}));return c}))));null===(t=this._currentClipboardItem)||void 0===t||t.dataTransferPromise.cancel(),this._currentClipboardItem={handle:h,dataTransferPromise:d}}setCopyMetadata(e,t){e.setData(L,JSON.stringify(t))}handlePaste(e){var t,i,n,o;return x(this,void 0,void 0,(function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;const s=this._editor.getSelections();if(!(null==s?void 0:s.length)||!this._editor.hasModel())return;const r=this._editor.getModel();if(!this.arePasteActionsEnabled(r))return;let a;const c=null===(t=e.clipboardData)||void 0===t?void 0:t.getData(L);c&&"string"==typeof c&&(a=JSON.parse(c));const d=this._languageFeaturesService.documentPasteEditProvider.ordered(r);if(!d.length)return;e.preventDefault(),e.stopImmediatePropagation();const u=new v.Dl(this._editor,3);try{const t=(0,g.B)(e.clipboardData);if((null==a?void 0:a.id)&&(null===(i=this._currentClipboardItem)||void 0===i?void 0:i.handle)===a.id){const e=yield this._currentClipboardItem.dataTransferPromise;if(u.token.isCancellationRequested)return;e.forEach(((e,i)=>{t.replace(i,e)}))}if(!t.has(h.v.uriList)){const e=yield this._clipboardService.readResources();if(u.token.isCancellationRequested)return;e.length&&t.append(h.v.uriList,(0,l.ZO)(l.Z0.create(e)))}t.delete(L);const c=yield this._progressService.withProgress({location:15,delay:750,title:(0,C.NC)("pasteProgressTitle","Running paste handlers..."),cancellable:!0},(()=>this.getProviderPasteEdit(d,t,r,s,u.token)),(()=>u.cancel()));if(u.token.isCancellationRequested)return;if(c){const e="string"==typeof c.insertText?b.Yj.escape(c.insertText):c.insertText.snippet,t={edits:[new p.Gl(r.uri,{range:f.Y.liftSelection(this._editor.getSelection()),text:e,insertAsSnippet:!0}),...null!==(o=null===(n=c.additionalEdit)||void 0===n?void 0:n.edits)&&void 0!==o?o:[]]};return void(yield this._bulkEditService.apply(t,{editor:this._editor}))}yield this.applyDefaultPasteHandler(t,a,u.token)}finally{u.dispose()}}))}getProviderPasteEdit(e,t,i,n,o){return(0,a.eP)((()=>x(this,void 0,void 0,(function*(){for(const s of e){if(o.isCancellationRequested)return;if(!N(s,t))continue;const e=yield s.provideDocumentPasteEdits(i,n,t,o);if(e)return e}})))(),o)}applyDefaultPasteHandler(e,t,i){var n;return x(this,void 0,void 0,(function*(){const o=null!==(n=e.get(h.v.text))&&void 0!==n?n:e.get("text");if(!o)return;const s=yield o.asString();i.isCancellationRequested||this._editor.trigger("keyboard","paste",{text:s,pasteOnNewLine:null==t?void 0:t.wasFromEmptySelection,multicursorText:null})}))}};function N(e,t){return e.pasteMimeTypes.some((e=>e.toLowerCase()===s.g.FILES.toLowerCase()?[...t.values()].some((e=>e.asFile())):t.has(e)))}E.ID="editor.contrib.copyPasteActionController",E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([k(1,p.vu),k(2,y.p),k(3,w.Ui),k(4,_.p),k(5,S.R9)],E);var D=i(23193),T=i(89872);(0,n._K)(E.ID,E,0),T.B.as(D.IP.Configuration).registerConfiguration(Object.assign(Object.assign({},o.wk),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:C.NC("pasteActions","Enable/disable running edits from extensions on paste."),default:!1}}}))},41895:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorRedo:()=>d,CursorUndo:()=>h,CursorUndoRedoController:()=>c});var n=i(5976),o=i(16830),s=i(29102),r=i(63580);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i<t;i++)if(!this.selections[i].equalsSelection(e.selections[i]))return!1;return!0}}class l{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class c extends n.JT{static get(e){return e.getContribution(c.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}c.ID="editor.contrib.cursorUndoRedoController";class h extends o.R6{constructor(){super({id:"cursorUndo",label:r.NC("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=c.get(t))||void 0===n||n.cursorUndo()}}class d extends o.R6{constructor(){super({id:"cursorRedo",label:r.NC("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=c.get(t))||void 0===n||n.cursorRedo()}}(0,o._K)(c.ID,c,0),(0,o.Qr)(h),(0,o.Qr)(d)},36022:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DragAndDropController:()=>u});var n=i(5976),o=i(1432),s=i(16830),r=i(50187),a=i(24314),l=i(3860),c=i(82948);class h{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber<this.selection.endLineNumber?this.targetSelection=new l.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new l.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,(this.selection.startLineNumber,this.selection.endLineNumber,this.targetPosition.column-this.selection.endColumn+this.selection.startColumn),this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new l.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn):this.targetSelection=this.selection}computeCursorState(e,t){return this.targetSelection}}function d(e){return o.dz?e.altKey:e.ctrlKey}class u extends n.JT{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(32)&&!this._editor.getOption(19)&&(d(e)&&(this._modifierPressed=!0),this._mouseDown&&d(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(32)&&!this._editor.getOption(19)&&(d(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===u.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}d(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new r.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new l.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(d(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(u.ID,new h(this._dragSelection,t,d(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new a.e(e.lineNumber,e.column,e.lineNumber,e.column),options:u._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}u.ID="editor.contrib.dragAndDrop",u.TRIGGER_KEY_VALUE=o.dz?6:5,u._DECORATION_OPTIONS=c.qx.register({description:"dnd-target",className:"dnd-target"}),(0,s._K)(u.ID,u,2)},76917:(e,t,i)=>{"use strict";i.r(t);var n=i(71050),o=i(98401),s=i(70666),r=i(88216),a=i(30335),l=i(94565);l.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return i=this,l=void 0,h=function*(){const[i]=t;(0,o.p_)(s.o.isUri(i));const l=e.get(a.Je),c=e.get(r.S),h=yield c.createModelReference(i);try{return(yield l.getOrCreate(h.object.textEditorModel,n.T.None)).getTopLevelSymbols()}finally{h.dispose()}},new((c=void 0)||(c=Promise))((function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function o(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):(i=t.value,i instanceof c?i:new c((function(e){e(i)}))).then(n,o)}s((h=h.apply(i,l||[])).next())}));var i,l,c,h}))},30335:(e,t,i)=>{"use strict";i.d(t,{C3:()=>C,H3:()=>b,Je:()=>y,sT:()=>v});var n=i(9488),o=i(71050),s=i(17301),r=i(53725),a=i(43702),l=i(50187),c=i(24314),h=i(88191),d=i(72065),u=i(65026),g=i(73733),p=i(5976),m=i(71922),f=function(e,t){return function(i,n){t(i,n,e)}};class _{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class v extends _{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends _{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class C extends _{static create(e,t,i){const r=new o.A(i),a=new C(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{var n;const o=_.findId(`provider_${i}`,a),l=new b(o,a,null!==(n=e.displayName)&&void 0!==n?n:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])C._makeOutlineElement(t,l);return l}),(e=>((0,s.Cp)(e),l))).then((e=>{_.empty(e)?e.remove():a._groups.set(o,e)}))})),h=e.onDidChange((()=>{const i=e.ordered(t);(0,n.fS)(i,l)||r.cancel()}));return Promise.all(c).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?C.create(e,t,i):a._compact())).finally((()=>{h.dispose()}))}static _makeOutlineElement(e,t){const i=_.findId(e,t),n=new v(i,t,e);if(e.children)for(const t of e.children)C._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.$.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof v?e.push(t.symbol):e.push(...r.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return C._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.L.compare(c.e.getStartPosition(e.range),c.e.getStartPosition(t.range))||l.L.compare(c.e.getEndPosition(t.range),c.e.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&C._flattenDocumentSymbols(e,n.children,n.name)}}const y=(0,d.yh)("IOutlineModelService");let w=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.SL,this._cache=new a.z6(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return i=this,s=void 0,a=function*(){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.fS)(r.provider,s)){const t=new o.A;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:t,promise:C.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return yield r.promise}finally{a.dispose()}},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,o)}l((a=a.apply(i,s||[])).next())}));var i,s,r,a}};w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(0,m.p),f(1,h.A),f(2,g.q)],w),(0,u.z)(y,w,1)},22482:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DropIntoEditorController:()=>w});var n=i(15393),o=i(73278),s=i(5976),r=i(81170),a=i(95935),l=i(70666),c=i(49889),h=i(16830),d=i(66007),u=i(24314),g=i(71922),p=i(16467),m=i(35084),f=i(63580),_=i(90535),v=i(40382),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}},y=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let w=class extends s.JT{constructor(e,t,i,n,o){super(),this._bulkEditService=t,this._languageFeaturesService=i,this._progressService=n,this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event)))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new S(o))}onDropIntoEditor(e,t,i){var o,s;return y(this,void 0,void 0,(function*(){if(!i.dataTransfer||!e.hasModel())return;const r=e.getModel(),a=r.getVersionId(),l=yield this.extractDataTransferData(i);if(0===l.size)return;if(e.getModel().getVersionId()!==a)return;const c=new p.Dl(e,1);try{const i=this._languageFeaturesService.documentOnDropEditProvider.ordered(r),h=yield this._progressService.withProgress({location:15,delay:750,title:(0,f.NC)("dropProgressTitle","Running drop handlers..."),cancellable:!0},(()=>(0,n.eP)((()=>y(this,void 0,void 0,(function*(){for(const e of i){const i=yield e.provideDocumentOnDropEdits(r,t,l,c.token);if(c.token.isCancellationRequested)return;if(i)return i}})))(),c.token)),(()=>{c.cancel()}));if(c.token.isCancellationRequested||e.getModel().getVersionId()!==a)return;if(h){const i="string"==typeof h.insertText?m.Yj.escape(h.insertText):h.insertText.snippet,n={edits:[new d.Gl(r.uri,{range:new u.e(t.lineNumber,t.column,t.lineNumber,t.column),text:i,insertAsSnippet:!0}),...null!==(s=null===(o=h.additionalEdit)||void 0===o?void 0:o.edits)&&void 0!==s?s:[]]};return void(yield this._bulkEditService.apply(n,{editor:e}))}}finally{c.dispose()}}))}extractDataTransferData(e){return y(this,void 0,void 0,(function*(){if(!e.dataTransfer)return new o.Hl;const t=(0,c.B)(e.dataTransfer);return(0,c.d)(t,e),t}))}};w.ID="editor.contrib.dropIntoEditorController",w=b([C(1,d.vu),C(2,g.p),C(3,_.R9),C(4,v.ec)],w);let S=class{constructor(e){this._workspaceContextService=e}provideDocumentOnDropEdits(e,t,i,n){var o;return y(this,void 0,void 0,(function*(){const e=i.get(r.v.uriList);if(e){const t=yield e.asString(),i=this.getUriListInsertText(t);if(i)return{insertText:i}}const t=null!==(o=i.get("text"))&&void 0!==o?o:i.get(r.v.text);if(t)return{insertText:yield t.asString()}}))}getUriListInsertText(e){const t=[];for(const i of o.Z0.parse(e))try{t.push(l.o.parse(i))}catch(e){}if(t.length)return t.map((e=>{const t=this._workspaceContextService.getWorkspaceFolder(e);if(t){const i=(0,a.lX)(t.uri,e);if(i)return i}return e.fsPath})).join(" ")}};S=b([C(0,v.ec)],S),(0,h._K)(w.ID,w,2)},16467:(e,t,i)=>{"use strict";i.d(t,{yy:()=>f,Dl:()=>_,YQ:()=>v});var n=i(97295),o=i(24314),s=i(71050),r=i(5976),a=i(16830),l=i(38819),c=i(91741),h=i(72065),d=i(65026),u=i(63580);const g=(0,h.yh)("IEditorCancelService"),p=new l.uy("cancellableOperation",!1,(0,u.NC)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,d.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.i6)),tokens:new c.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class m extends s.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class f{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof f))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new f(e,this.flags))}}class _ extends m{constructor(e,t,i,n){super(e,n),this._listener=new r.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends s.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},31633:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CommonFindController:()=>nt,FindController:()=>ot,MatchFindAction:()=>ct,MoveToMatchFindAction:()=>ut,NextMatchFindAction:()=>ht,NextSelectionMatchFindAction:()=>pt,PreviousMatchFindAction:()=>dt,PreviousSelectionMatchFindAction:()=>mt,SelectionMatchFindAction:()=>gt,StartFindAction:()=>st,StartFindReplaceAction:()=>ft,StartFindWithArgsAction:()=>at,StartFindWithSelectionAction:()=>lt,getSelectionSearchString:()=>it});var n=i(15393),o=i(5976),s=i(97295),r=i(16830),a=i(29102),l=i(9488),c=i(61329),h=i(50187),d=i(24314),u=i(3860),g=i(77277),p=i(84973),m=i(82948),f=i(73910),_=i(97781);class v{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===v._FIND_MATCH_DECORATION||t===v._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,o=this._decorations.length;n<o;n++){const o=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(o)){t=this._decorations[n],i=n+1;break}}return null===this._highlightedDecorationId&&null===t||this._editor.changeDecorations((e=>{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,v._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,v._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new d.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,v._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=v._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=v._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,s=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t<i;t++){const i=e[t].range;a+s>=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new d.e(r,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}o.push({range:new d.e(r,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,i=e.length;t<i;t++)s[t]={range:e[t].range,options:n};this._decorations=i.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach((e=>i.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,v._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;t<i;t++){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.startLineNumber<e.lineNumber)){if(n.startLineNumber>e.lineNumber)return n;if(!(n.startColumn<e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}v._CURRENT_FIND_MATCH_DECORATION=m.qx.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,_.EN)(f.Fm_),position:p.sh.Center},minimap:{color:(0,_.EN)(f.SUY),position:p.F5.Inline}}),v._FIND_MATCH_DECORATION=m.qx.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,_.EN)(f.Fm_),position:p.sh.Center},minimap:{color:(0,_.EN)(f.SUY),position:p.F5.Inline}}),v._FIND_MATCH_NO_OVERVIEW_DECORATION=m.qx.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),v._FIND_MATCH_ONLY_OVERVIEW_DECORATION=m.qx.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,_.EN)(f.Fm_),position:p.sh.Center}}),v._RANGE_HIGHLIGHT_DECORATION=m.qx.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),v._FIND_SCOPE_DECORATION=m.qx.register({description:"find-scope",className:"findScope",isWholeLine:!0});class b{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){const e=[];for(let t=0;t<this._ranges.length;t++)e.push({range:this._ranges[t],text:this._replaceStrings[t]});e.sort(((e,t)=>d.e.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t<e.length;t++)n.range.endLineNumber===e[t].range.startLineNumber&&n.range.endColumn===e[t].range.startColumn?(n.range=n.range.plusRange(e[t].range),n.text=n.text+e[t].text):(i.push(n),n=e[t]);i.push(n);for(const e of i)t.addEditOperation(e.range,e.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function C(e,t){if(e&&""!==e[0]){const i=y(e,t,"-"),n=y(e,t,"_");return i&&!n?w(e,t,"-"):!i&&n?w(e,t,"_"):e[0].toUpperCase()===e[0]?t.toUpperCase():e[0].toLowerCase()===e[0]?t.toLowerCase():s.Kw(e[0][0])&&t.length>0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function y(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function w(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=C([o[t]],e)+i})),s.slice(0,-1)}class S{constructor(e){this.staticValue=e,this.kind=0}}class k{constructor(e){this.pieces=e,this.kind=1}}class x{static fromStaticValue(e){return new x([L.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new S(e[0].staticValue):this._state=new k(e):this._state=new S("")}buildReplaceString(e,t){if(0===this._state.kind)return t?C(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t<n;t++){const n=this._state.pieces[t];if(null!==n.staticValue){i+=n.staticValue;continue}let o=x._substitute(n.matchIndex,e);if(null!==n.caseOps&&n.caseOps.length>0){const e=[],t=n.caseOps.length;let i=0;for(let s=0,r=o.length;s<r;s++){if(i>=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class L{static staticValue(e){return new L(e,-1,null)}static caseOps(e,t){return new L(null,e,t)}constructor(e,t,i){this.staticValue=e,this.matchIndex=t,i&&0!==i.length?this.caseOps=i.slice(0):this.caseOps=null}}class E{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){0!==e.length&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=L.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=L.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=L.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new x(this._result)}}var N=i(38819);const D=new N.uy("findWidgetVisible",!1),T=(D.toNegated(),new N.uy("findInputFocussed",!1)),I=new N.uy("replaceInputFocussed",!1),A={primary:545,mac:{primary:2593}},M={primary:565,mac:{primary:2613}},R={primary:560,mac:{primary:2608}},O={primary:554,mac:{primary:2602}},P={primary:558,mac:{primary:2606}},F="editor.action.nextMatchFindAction",B="editor.action.previousMatchFindAction",H="closeFindWidget",W="toggleFindCaseSensitive",V="toggleFindWholeWord",z="toggleFindRegex",U="toggleFindInSelection",j="togglePreserveCase",K="editor.action.replaceOne",q="editor.action.replaceAll",$=19999;class G{constructor(e,t){this._toDispose=new o.SL,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new n._F,this._decorations=new v(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new n.pY((()=>this.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,o.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new d.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,$);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,l.lG)(n.map((e=>e.range)),(e=>d.e.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(38).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new h.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<$){let t=this._decorations.matchBeforePosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),t=this._decorations.matchBeforePosition(e)),void(t&&this._setCurrentFindMatch(t))}if(this._cannotFind())return;const i=this._decorations.getFindScope(),n=G._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());const{lineNumber:o,column:s}=e,r=this._editor.getModel();let a=new h.L(o,s),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null,!1);return l&&l.range.isEmpty()&&l.range.getStartPosition().equals(a)&&(a=this._prevSearchPosition(a),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null,!1)),l?t||n.containsRange(l.range)?void this._setCurrentFindMatch(l.range):this._moveToPrevMatch(l.range.getStartPosition(),!0):void 0}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new h.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<$){let t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}const t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;const o=this._decorations.getFindScope(),s=G._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());const{lineNumber:r,column:a}=e,l=this._editor.getModel();let c=new h.L(r,a),d=l.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null,t);return i&&d&&d.range.isEmpty()&&d.range.getStartPosition().equals(c)&&(c=this._nextSearchPosition(c),d=l.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null,t)),d?n||s.containsRange(d.range)?d:this._getNextMatch(d.range.getEndPosition(),t,i,!0):null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){const t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?function(e){if(!e||0===e.length)return new x(null);const t=[],i=new E(e);for(let n=0,o=e.length;n<o;n++){const s=e.charCodeAt(n);if(92!==s){if(36===s){if(n++,n>=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1<o){const o=e.charCodeAt(n+1);if(48<=o&&o<=57){n++,r=10*r+(o-48),i.emitUnchanged(n-2),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}}else{if(n++,n>=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}(this._state.replaceString):x.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new c.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new h.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>G._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=$?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(124):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern();let r;const a=this._state.preserveCase;r=s.hasReplacementPatterns||a?n.replace(t,(function(){return s.buildReplaceString(arguments,a)})):n.replace(t,s.buildReplaceString(null,a));const l=new c.hP(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;e<o;e++)n[e]=t.buildReplaceString(i[e].matches,this._state.preserveCase);const o=new b(this._editor.getSelection(),i.map((e=>e.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new u.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;e<n;e++)if(t[e].equalsRange(i)){t=[i].concat(t.slice(0,e)).concat(t.slice(e+1));break}this._editor.setSelections(t)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var Q=i(65321),Y=i(51307),Z=i(93794);class X extends Z.${constructor(e,t,i){super(),this._hideSoon=this._register(new n.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o={inputActiveOptionBorder:(0,f.n_1)(f.PRb),inputActiveOptionForeground:(0,f.n_1)(f.Pvw),inputActiveOptionBackground:(0,f.n_1)(f.XEs)};this.caseSensitive=this._register(new Y.rk(Object.assign({appendTitle:this._keybindingLabelFor(W),isChecked:this._state.matchCase},o))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new Y.Qx(Object.assign({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.wholeWord},o))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new Y.eH(Object.assign({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.isRegex},o))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Q.nm(this._domNode,Q.tw.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(Q.nm(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return X.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}X.ID="editor.contrib.findOptionsWidget";var J=i(4669);function ee(e,t){return 1===e||2!==e&&t}class te extends o.JT{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ee(this._isRegexOverride,this._isRegex)}get wholeWord(){return ee(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ee(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ee(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new J.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(d.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!d.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,o.isRegex=!0),a!==this.wholeWord&&(s=!0,o.wholeWord=!0),l!==this.matchCase&&(s=!0,o.matchCase=!0),c!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=$}}var ie=i(85152),ne=i(82900),oe=i(73098),se=i(73046),re=i(17301),ae=i(1432),le=i(63580),ce=i(22980);function he(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}var de=i(59554),ue=i(25670),ge=i(92321),pe=i(98401),me=i(86253);const fe=(0,de.q5)("find-selection",se.l.selection,le.NC("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),_e=(0,de.q5)("find-collapsed",se.l.chevronRight,le.NC("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),ve=(0,de.q5)("find-expanded",se.l.chevronDown,le.NC("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),be=(0,de.q5)("find-replace",se.l.replace,le.NC("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Ce=(0,de.q5)("find-replace-all",se.l.replaceAll,le.NC("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),ye=(0,de.q5)("find-previous-match",se.l.arrowUp,le.NC("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),we=(0,de.q5)("find-next-match",se.l.arrowDown,le.NC("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Se=le.NC("label.find","Find"),ke=le.NC("placeholder.find","Find"),xe=le.NC("label.previousMatchButton","Previous Match"),Le=le.NC("label.nextMatchButton","Next Match"),Ee=le.NC("label.toggleSelectionFind","Find in Selection"),Ne=le.NC("label.closeButton","Close"),De=le.NC("label.replace","Replace"),Te=le.NC("placeholder.replace","Replace"),Ie=le.NC("label.replaceButton","Replace"),Ae=le.NC("label.replaceAllButton","Replace All"),Me=le.NC("label.toggleReplaceButton","Toggle Replace"),Re=le.NC("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",$),Oe=le.NC("label.matchesLocation","{0} of {1}"),Pe=le.NC("label.noResults","No results"),Fe=419;let Be=69;const He="ctrlEnterReplaceAll.windows.donotask",We=ae.dz?256:2048;class Ve{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function ze(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function Ue(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEnd<i.value.length&&e.stopPropagation()}class je extends Z.${constructor(e,t,i,s,r,a,l,c,h){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=s,this._keybindingService=r,this._contextKeyService=a,this._storageService=c,this._notificationService=h,this._ctrlEnterReplaceAllWarningPrompted=!!c.getBoolean(He,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new n.vp(500),this._register((0,o.OF)((()=>this._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(86)&&(this._codeEditor.getOption(86)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(138)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(38)){const e=this._codeEditor.getOption(38).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(38).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new Ve(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){const e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=T.bindTo(a),this._findFocusTracker=this._register(Q.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=I.bindTo(a),this._replaceFocusTracker=this._register(Q.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(38).addExtraSpaceOnTop&&(this._viewZone=new Ve(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return je.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(86)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Q.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,re.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Be+"px",this._state.matchesCount>=$?this._matchesCount.title=Re:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=$&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.WU(Oe,i,t)}else e=Pe;this._matchesCount.appendChild(document.createTextNode(e)),(0,ie.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Be=Math.max(Be,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Pe)return""===i?le.NC("ariaSearchNoResultEmpty","{0} found",e):le.NC("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=le.NC("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return le.NC("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(86);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(38).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(38).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Q.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&r<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const i=Q.xQ(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(38).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(38).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new Ve(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(80).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Q.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,s=!1;if(this._resized&&Q.w(this._domNode)>Fe)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Q.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-Be>=t&&(s=!0),447+i-Be>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",s),this._domNode.classList.toggle("reduced-find-widget",o),s||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._resized){this._findInput.inputBox.layout();const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||d.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ze(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Ue(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||(ae.ED&&ae.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(le.NC("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(He,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ze(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Ue(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new ce.Yb(null,this._contextViewProvider,{width:221,label:Se,placeholder:ke,appendCaseSensitiveLabel:this._keybindingLabelFor(W),appendWholeWordsLabel:this._keybindingLabelFor(V),appendRegexLabel:this._keybindingLabelFor(z),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>he(this._keybindingService),inputBoxStyles:me.Hc,toggleStyles:me.pl},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ae.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Ke({label:xe+this._keybindingLabelFor(B),icon:ye,onTrigger:()=>{(0,pe.cW)(this._codeEditor.getAction(B)).run().then(void 0,re.dL)}})),this._nextBtn=this._register(new Ke({label:Le+this._keybindingLabelFor(F),icon:we,onTrigger:()=>{(0,pe.cW)(this._codeEditor.getAction(F)).run().then(void 0,re.dL)}}));const e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ne.Z({icon:fe,title:Ee+this._keybindingLabelFor(U),isChecked:!1,inputActiveOptionBackground:(0,f.n_1)(f.XEs),inputActiveOptionBorder:(0,f.n_1)(f.PRb),inputActiveOptionForeground:(0,f.n_1)(f.Pvw)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ke({label:Ne+this._keybindingLabelFor(H),icon:de.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new ce.Nq(null,void 0,{label:De,placeholder:Te,appendPreserveCaseLabel:this._keybindingLabelFor(j),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>he(this._keybindingService),inputBoxStyles:me.Hc,toggleStyles:me.pl},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new Ke({label:Ie+this._keybindingLabelFor(K),icon:be,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new Ke({label:Ae+this._keybindingLabelFor(q),icon:Ce,onTrigger:()=>{this._controller.replaceAll()}}));const i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ke({label:Me,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(i),this._resizeSash=new oe.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=Fe;this._register(this._resizeSash.onDidStart((()=>{o=Q.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=o+e.startX-e.currentX;t<Fe||t>(parseFloat(Q.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Q.w(this._domNode);if(e<Fe)return;let t=Fe;if(!this._resized||e===Fe){const e=this._codeEditor.getLayoutInfo();t=e.width-28-e.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode)),this._findInput.inputBox.layout()})))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)}}je.ID="editor.contrib.findWidget";class Ke extends Z.${constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+ue.k.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,(e=>{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ue.k.asClassNameArray(_e)),this._domNode.classList.add(...ue.k.asClassNameArray(ve))):(this._domNode.classList.remove(...ue.k.asClassNameArray(ve)),this._domNode.classList.add(...ue.k.asClassNameArray(_e)))}}(0,_.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(f.MUv)),i(".currentFindMatch",e.getColor(f.nyM)),i(".findScope",e.getColor(f.jUe)),i(".find-widget",e.getColor(f.D0T));const n=e.getColor(f.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const o=e.getColor(f.A42);o&&t.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);const s=e.getColor(f.EiJ);s&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,ge.c3)(e.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=e.getColor(f.pnM);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=e.getColor(f.gkn);a&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,ge.c3)(e.type)?"dashed":"solid"} ${a}; }`);const l=e.getColor(f.lRK);l&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=e.getColor(f.Hfx);c&&t.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const h=e.getColor(f.Ido);h&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);const d=e.getColor(f.Ng6);if(d)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${d}; }`);else{const i=e.getColor(f.D1_);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const u=e.getColor(f.lUq);u&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${u} !important;\n\t\t}\n\t`);const g=e.getColor(f.R80);g&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${g}; }`)}));var qe=i(84144),$e=i(84972),Ge=i(5606),Qe=i(91847),Ye=i(59422),Ze=i(41157),Xe=i(26904),Je=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},et=function(e,t){return function(i,n){t(i,n,e)}},tt=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function it(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let nt=class e extends o.JT{get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}constructor(e,t,i,o){super(),this._editor=e,this._findWidgetVisible=D.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=o,this._updateHistoryDelayer=new n.vp(500),this._state=this._register(new te),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(38).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!T.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return tt(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if("single"===e.seedSearchStringFromSelection){const t=it(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=s.ec(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=it(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new G(this._editor,this._state))}))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return tt(this,void 0,void 0,(function*(){return this._editor.getOption(38).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(38).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};nt.ID="editor.contrib.findController",nt=Je([et(1,N.i6),et(2,Xe.Uy),et(3,$e.p)],nt);let ot=class extends nt{constructor(e,t,i,n,o,s,r,a){super(e,i,r,a),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return tt(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let o=!1;switch(this._editor.getOption(38).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":o=!!n&&n.startLineNumber!==n.endLineNumber}e.updateSearchScope=e.updateSearchScope||o,yield i._start.call(this,e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new je(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new X(this._editor,this._state,this._keybindingService))}};ot=Je([et(1,Ge.u),et(2,N.i6),et(3,Qe.d),et(4,_.XE),et(5,Ye.lT),et(6,Xe.Uy),et(7,$e.p)],ot);const st=(0,r.rn)(new r.jY({id:"actions.find",label:le.NC("startFindAction","Find"),alias:"Find",precondition:N.Ao.or(a.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:qe.eH.MenubarEditMenu,group:"3_find",title:le.NC({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));st.addImplementation(0,((e,t,i)=>{const n=nt.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(38).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(38).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(38).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop})}));const rt={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:le.NC("actions.find.isRegexOverride",'Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:le.NC("actions.find.wholeWordOverride",'Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:le.NC("actions.find.matchCaseOverride",'Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:le.NC("actions.find.preserveCaseOverride",'Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},findInSelection:{type:"boolean"}}}}]};class at extends r.R6{constructor(){super({id:"editor.actions.findWithArgs",label:le.NC("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:rt})}run(e,t,i){return tt(this,void 0,void 0,(function*(){const e=nt.get(t);if(e){const n=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(38).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(38).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(38).loop},n),e.setGlobalBufferTerm(e.getState().searchString)}}))}}class lt extends r.R6{constructor(){super({id:"actions.findWithSelection",label:le.NC("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return tt(this,void 0,void 0,(function*(){const e=nt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class ct extends r.R6{run(e,t){return tt(this,void 0,void 0,(function*(){const e=nt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(38).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(38).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop}),this._run(e))}))}}class ht extends ct{constructor(){super({id:F,label:le.NC("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:a.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:N.Ao.and(a.u.focus,T),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}class dt extends ct{constructor(){super({id:B,label:le.NC("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:a.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:N.Ao.and(a.u.focus,T),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class ut extends r.R6{constructor(){super({id:"editor.action.goToMatchFindAction",label:le.NC("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:D})}run(e,t,i){const n=nt.get(t);if(!n)return;const o=e.get(Ze.eJ).createInputBox();o.placeholder=le.NC("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",n.getState().matchesCount),o.onDidChangeValue((e=>{const t=parseInt(e);!isNaN(t)&&t>0&&t<=n.getState().matchesCount?o.validationMessage=void 0:o.validationMessage=le.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)})),o.onDidAccept((()=>{const e=parseInt(o.value);!isNaN(e)&&e>0&&e<=n.getState().matchesCount?(n.goToMatch(e-1),o.hide()):o.validationMessage=le.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)})),o.onDidHide((()=>{o.dispose()})),o.show()}}class gt extends r.R6{run(e,t){return tt(this,void 0,void 0,(function*(){const e=nt.get(t);if(!e)return;const i=it(t,"single",!1);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop}),this._run(e))}))}}class pt extends gt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:le.NC("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:a.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class mt extends gt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:le.NC("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:a.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const ft=(0,r.rn)(new r.jY({id:"editor.action.startFindReplaceAction",label:le.NC("startReplace","Replace"),alias:"Replace",precondition:N.Ao.or(a.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:qe.eH.MenubarEditMenu,group:"3_find",title:le.NC({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));ft.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(86))return!1;const n=nt.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(38).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(38).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(38).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop})})),(0,r._K)(nt.ID,ot,0),(0,r.Qr)(at),(0,r.Qr)(lt),(0,r.Qr)(ht),(0,r.Qr)(dt),(0,r.Qr)(ut),(0,r.Qr)(pt),(0,r.Qr)(mt);const _t=r._l.bindToContribution(nt.get);(0,r.fK)(new _t({id:H,precondition:D,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N.Ao.and(a.u.focus,N.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.fK)(new _t({id:W,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),(0,r.fK)(new _t({id:V,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:M.primary,mac:M.mac,win:M.win,linux:M.linux}})),(0,r.fK)(new _t({id:z,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,r.fK)(new _t({id:U,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.fK)(new _t({id:j,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.fK)(new _t({id:K,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:3094}})),(0,r.fK)(new _t({id:K,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N.Ao.and(a.u.focus,I),primary:3}})),(0,r.fK)(new _t({id:q,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:2563}})),(0,r.fK)(new _t({id:q,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N.Ao.and(a.u.focus,I),primary:void 0,mac:{primary:2051}}})),(0,r.fK)(new _t({id:"editor.action.selectAllMatches",precondition:D,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:515}}))},78370:(e,t,i)=>{"use strict";i.r(t),i.d(t,{FoldingController:()=>le});var n=i(15393),o=i(17301),s=i(22258),r=i(5976),a=i(97295),l=i(98401),c=i(43407),h=i(16830),d=i(29102),u=i(96887),g=i(51381),p=i(4669);const m={0:" ",1:"u",2:"r"},f=16777215,_=4278190080;class v{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!=(this._states[t]&1<<i)}set(e,t){const i=e/32|0,n=e%32,o=this._states[i];this._states[i]=t?o|1<<n:o&~(1<<n)}}class b{constructor(e,t,i){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new v(e.length),this._userDefinedStates=new v(e.length),this._recoveredStates=new v(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;i<n;i++){const n=this._startIndexes[i],o=this._endIndexes[i];if(n>f||o>f)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;e.length>0&&!t(n,o);)e.pop();const s=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&s)<<24),this._endIndexes[i]=o+((65280&s)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&f}getEndLineNumber(e){return this._endIndexes[e]&f}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),i=!0);return i}toRegion(e){return new C(this,e)}getParentIndex(e){this.ensureParentIndices();const t=((this._startIndexes[e]&_)>>>24)+((this._endIndexes[e]&_)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t<i;){const n=Math.floor((t+i)/2);e<this.getStartLineNumber(n)?i=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;t<this.length;t++)e[t]=`[${m[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&f,endLineNumber:this._endIndexes[e]&f,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){const t=e.length,i=new Uint32Array(t),n=new Uint32Array(t);let o=[],s=!1;for(let r=0;r<t;r++){const t=e[r];i[r]=t.startLineNumber,n[r]=t.endLineNumber,o.push(t.type),t.type&&(s=!0)}s||(o=void 0);const r=new b(i,n,o);for(let i=0;i<t;i++)e[i].isCollapsed&&r.setCollapsed(i,!0),r.setSource(i,e[i].source);return r}static sanitizeAndMerge(e,t,i){i=null!=i?i:Number.MAX_VALUE;const n=(e,t)=>Array.isArray(e)?i=>i<t?e[i]:void 0:i=>i<t?e.toFoldRange(i):void 0,o=n(e,e.length),s=n(t,t.length);let r=0,a=0,l=o(0),c=s(0);const h=[];let d,u=0;const g=[];for(;l||c;){let e;if(c&&(!l||l.startLineNumber>=c.startLineNumber))l&&l.startLineNumber===c.startLineNumber?(1===c.source?e=c:(e=l,e.isCollapsed=c.isCollapsed&&l.endLineNumber===c.endLineNumber,e.source=0),l=o(++r)):(e=c,c.isCollapsed&&0===c.source&&(e.source=2)),c=s(++a);else{let t=a,i=c;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=s(++t)}l=o(++r)}if(e){for(;d&&d.endLineNumber<e.startLineNumber;)d=h.pop();e.endLineNumber>e.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!d||d.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,d&&h.push(d),d=e)}}return g}}class C{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}var y=i(89954);class w{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new p.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new b(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{for(;n<e;){const e=this._regions.getEndLineNumber(n),t=this._regions.isCollapsed(n);if(e<=o){const o=0!==this.regions.getSource(n);i.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(t,e<=s,o))}t&&e>s&&(s=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;e<this._regions.length;e++){const n=this._regions.toFoldRange(e);0!==n.source&&i(n)||t.push(n)}this.updatePost(b.fromFoldRanges(t))}update(e,t=[]){const i=this._currentFoldedOrManualRanges(t),n=b.sanitizeAndMerge(e,i,this._textModel.getLineCount());this.updatePost(b.fromFoldRanges(n))}updatePost(e){const t=[];let i=-1;for(let n=0,o=e.length;n<o;n++){const o=e.getStartLineNumber(n),s=e.getEndLineNumber(n),r=e.isCollapsed(n),a=0!==e.getSource(n),l={startLineNumber:o,startColumn:this._textModel.getLineMaxColumn(o),endLineNumber:s,endColumn:this._textModel.getLineMaxColumn(s)+1};t.push({range:l,options:this._decorationProvider.getDecorationOption(r,s<=i,a)}),r&&s>i&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t<n&&n<=i)return!0;return!1},i=[];for(let e=0,n=this._regions.length;e<n;e++){let n=this.regions.isCollapsed(e);const o=this.regions.getSource(e);if(n||0!==o){const s=this._regions.toFoldRange(e),r=this._textModel.getDecorationRange(this._editorDecorationIds[e]);r&&(n&&(t(r.startLineNumber,r.endLineNumber)||r.endLineNumber-r.startLineNumber!=s.endLineNumber-s.startLineNumber)&&(n=!1),i.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:s.type,isCollapsed:n,source:o}))}}return i}getMemento(){const e=this._currentFoldedOrManualRanges(),t=[],i=this._textModel.getLineCount();for(let n=0,o=e.length;n<o;n++){const o=e[n];if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],o=this._textModel.getLineCount();for(const s of e){if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>o)continue;const e=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);s.checksum&&e!==s.checksum||n.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,type:void 0,isCollapsed:null===(t=s.isCollapsed)||void 0===t||t,source:null!==(i=s.source)&&void 0!==i?i:0})}const s=b.sanitizeAndMerge(this._regions,n,o);this.updatePost(b.fromFoldRanges(s))}_getLinesChecksum(e,t){return(0,y.vp)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s<r;s++){const n=this._regions.toRegion(s);if(!(this._regions.getStartLineNumber(s)<o))break;for(;e.length>0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e<s;e++){const n=this._regions.toRegion(e);if(!(this._regions.getStartLineNumber(e)<o))break;t&&!t(n)||i.push(n)}return i}}function S(e,t,i=Number.MAX_VALUE,n){const o=[];if(n&&n.length>0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...s)}}else{const n=e.getRegionsInside(null,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...n)}e.toggleCollapseState(o)}function k(e,t,i,n){const o=[];for(const s of n){const n=e.getAllRegionsAtLine(s,((e,n)=>e.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function x(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function L(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){const i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function E(e,t,i){const n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}var N=i(9488),D=i(24314),T=i(23795);class I{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new p.Q5,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,T.Q)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i<r.length;i++){if(!r.isCollapsed(i))continue;const a=r.getStartLineNumber(i)+1,l=r.getEndLineNumber(i);o<=a&&l<=s||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===a&&this._hiddenRanges[n].endLineNumber===l?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new D.e(a,1,l,1))),o=a,s=l)}(this._hasLineChanges||e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==A(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=A(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n<s;n++){let s=e[n];const r=o(s.startLineNumber);r&&(s=s.setStartPosition(r,i.getLineMaxColumn(r)),t=!0);const a=o(s.endLineNumber);a&&(s=s.setEndPosition(a,i.getLineMaxColumn(a)),t=!0),e[n]=s}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function A(e,t){const i=(0,N.lG)(e,(e=>t<e.startLineNumber))-1;return i>=0&&e[i].endLineNumber>=t?e[i]:null}var M=i(59616);class R{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=P){const o=e.getOptions().tabSize,s=new O(n);let r;i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let i=e.getLineCount();i>0;i--){const n=e.getLineContent(i),l=(0,M.q)(n,o);let c,h=a[a.length-1];if(-1!==l){if(r&&(c=n.match(r))){if(!c[1]){a.push({indent:-2,endAbove:i,line:i});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,h=a[e],s.insertFirst(i,h.line,l),h.line=i,h.indent=l,h.endAbove=i;continue}}}if(h.indent>l){do{a.pop(),h=a[a.length-1]}while(h.indent>l);const e=h.endAbove-1;e-i>=1&&s.insertFirst(i,e,l)}h.indent===l?h.endAbove=i:a.push({indent:l,endAbove:i,line:i})}else t&&(h.endAbove=i)}return s.toIndentRanges(e)}(this.editorModel,i,n,this.foldingRangesLimit))}}class O{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>f||t>f)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.report({limited:!1,computed:this._length});const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new b(e,t)}{this._foldingRangesLimit.report({limited:t,computed:this._length});let i=0,n=this._indentOccurrences.length;for(let e=0;e<this._indentOccurrences.length;e++){const o=this._indentOccurrences[e];if(o){if(o+i>t){n=e;break}i+=o}}const o=e.getOptions().tabSize,s=new Uint32Array(t),r=new Uint32Array(t);for(let a=this._length-1,l=0;a>=0;a--){const c=this._startIndexes[a],h=e.getLineContent(c),d=(0,M.q)(h,o);(d<n||d===n&&i++<t)&&(s[l]=c,r[l]=this._endIndexes[a],l++)}return new b(s,r)}}}const P={limit:5e3,report:()=>{}};var F=i(63580),B=i(38819),H=i(73046),W=i(84973),V=i(82948),z=i(73910),U=i(59554),j=i(97781),K=i(25670);const q=(0,z.P6G)("editor.foldBackground",{light:(0,z.ZnX)(z.hEj,.3),dark:(0,z.ZnX)(z.hEj,.3),hcDark:null,hcLight:null},(0,F.NC)("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,z.P6G)("editorGutter.foldingControlForeground",{dark:z.XZx,light:z.XZx,hcDark:z.XZx,hcLight:z.XZx},(0,F.NC)("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const $=(0,U.q5)("folding-expanded",H.l.chevronDown,(0,F.NC)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),G=(0,U.q5)("folding-collapsed",H.l.chevronRight,(0,F.NC)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Q=(0,U.q5)("folding-manual-collapsed",G,(0,F.NC)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),Y=(0,U.q5)("folding-manual-expanded",$,(0,F.NC)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),Z={color:(0,j.EN)(q),position:W.F5.Inline};class X{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?X.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?X.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:X.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:X.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?X.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:X.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?X.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:X.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?X.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:X.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?X.MANUALLY_EXPANDED_VISUAL_DECORATION:X.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}X.COLLAPSED_VISUAL_DECORATION=V.qx.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName(G)}),X.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=V.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z,isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName(G)}),X.MANUALLY_COLLAPSED_VISUAL_DECORATION=V.qx.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName(Q)}),X.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=V.qx.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z,isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName(Q)}),X.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=V.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),X.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=V.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z,isWholeLine:!0}),X.EXPANDED_VISUAL_DECORATION=V.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+K.k.asClassName($)}),X.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=V.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName($)}),X.MANUALLY_EXPANDED_VISUAL_DECORATION=V.qx.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+K.k.asClassName(Y)}),X.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=V.qx.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:K.k.asClassName(Y)}),X.NO_CONTROLS_EXPANDED_RANGE_DECORATION=V.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),X.HIDDEN_RANGE_DECORATION=V.qx.register({description:"folding-hidden-range-decoration",stickiness:1});const J={};class ee{constructor(e,t,i,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id="syntax",this.disposables=new r.SL,o&&this.disposables.add(o);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let n=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,J,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),o.Cp)));return Promise.all(s).then((e=>n))}(this.providers,this.editorModel,e).then((t=>{var i,n;return t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new te(t);let o;const s=[];for(const e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class te{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>f||t>f)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.report({limited:!1,computed:this._length});const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;i<this._length;i++)e[i]=this._startIndexes[i],t[i]=this._endIndexes[i];return new b(e,t,this._types)}{this._foldingRangesLimit.report({limited:e,computed:this._length});let t=0,i=this._nestingLevelCounts.length;for(let n=0;n<this._nestingLevelCounts.length;n++){const o=this._nestingLevelCounts[n];if(o){if(o+t>e){i=n;break}t+=o}}const n=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let r=0,a=0;r<this._length;r++){const l=this._nestingLevels[r];(l<i||l===i&&t++<e)&&(n[a]=this._startIndexes[r],o[a]=this._endIndexes[r],s[a]=this._types[r],a++)}return new b(n,o,s)}}}var ie=i(59422),ne=i(88191),oe=i(84013),se=i(71922),re=function(e,t){return function(i,n){t(i,n,e)}};const ae=new B.uy("foldingEnabled",!1);let le=class e extends r.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new r.SL),this._onDidChangeFoldingLimit=new p.Q5,this.editor=e;const a=this.editor.getOptions();this._isEnabled=a.get(40),this._useFoldingProviders="indentation"!==a.get(41),this._unfoldOnClickAfterEndOfLine=a.get(45),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(43),this._foldingLimitReporter={get limit(){return e.getOptions().get(44)},report:e=>{this._foldingLimitInfo&&e.limited===this._foldingLimitInfo.limited||(this._foldingLimitInfo=e,this._onDidChangeFoldingLimit.fire(e))}},this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new X(e),this.foldingDecorationProvider.showFoldingControls=a.get(104),this.foldingDecorationProvider.showFoldingHighlights=a.get(42),this.foldingEnabled=ae.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(40)&&(this._isEnabled=this.editor.getOptions().get(40),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(44)&&this.onModelChanged(),e.hasChanged(104)||e.hasChanged(42)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(104),this.foldingDecorationProvider.showFoldingHighlights=e.get(42),this.triggerFoldingModelChanged()}e.hasChanged(41)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(41),this.onFoldingStrategyChanged()),e.hasChanged(45)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(45)),e.hasChanged(43)&&(this._foldingImportsByDefault=this.editor.getOptions().get(43))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new w(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new I(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.vp(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(t){var i,n;if(this.rangeProvider)return this.rangeProvider;const o=new R(t,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=o,this._useFoldingProviders&&this.foldingModel){const s=this.languageFeaturesService.foldingRangeProvider.ordered(this.foldingModel.textModel),r=null!==(n=null===(i=e._foldingRangeSelector)||void 0===i?void 0:i.call(e,s,t))&&void 0!==n?n:s;r.length>0&&(this.rangeProvider=new ee(t,r,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,o))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new oe.G(!0),i=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=(0,n.PG)((e=>i.compute(e)));return o.then((i=>{if(i&&o===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(u.AD.Imports.value,!0);e&&(n=c.Z.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections(),s=o?o.map((e=>e.startLineNumber)):[];e.update(i,s),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>((0,o.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,o.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<5)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&n.push(e);!o&&i&&0!==n.length||n.push(s)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};le.ID="editor.contrib.folding",le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(1,B.i6),re(2,g.c_),re(3,ie.lT),re(4,ne.A),re(5,se.p)],le);class ce extends h.R6{runEditorCommand(e,t,i){const n=e.get(g.c_),o=le.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function he(e){if(!l.o8(e)){if(!l.Kn(e))return!1;const t=e;if(!l.o8(t.levels)&&!l.hj(t.levels))return!1;if(!l.o8(t.direction)&&!l.HD(t.direction))return!1;if(!(l.o8(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(l.hj)))return!1}return!0}class de extends ce{getFoldingLevel(){return parseInt(this.id.substr(de.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){const o=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}de.ID_PREFIX="editor.foldLevel",de.ID=e=>de.ID_PREFIX+e,(0,h._K)(le.ID,le,0),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.unfold",label:F.NC("unfoldAction.label","Unfold"),alias:"Unfold",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:he,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?k(t,!1,o,s):S(t,!1,o,s)}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.unfoldRecursively",label:F.NC("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2137),weight:100}})}invoke(e,t,i,n){S(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.fold",label:F.NC("foldAction.label","Fold"),alias:"Fold",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:he,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?function(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,o):"up"===r?k(t,!0,s||1,o):S(t,!0,s||1,o)}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.foldRecursively",label:F.NC("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2135),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);S(t,!0,Number.MAX_VALUE,n)}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.foldAll",label:F.NC("foldAllAction.label","Fold All"),alias:"Fold All",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2069),weight:100}})}invoke(e,t,i){S(t,!0)}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.unfoldAll",label:F.NC("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2088),weight:100}})}invoke(e,t,i){S(t,!1)}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.foldAllBlockComments",label:F.NC("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2133),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())E(t,u.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;n&&n.blockCommentStartToken&&L(t,new RegExp("^\\s*"+(0,a.ec)(n.blockCommentStartToken)),!0)}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.foldAllMarkerRegions",label:F.NC("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())E(t,u.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&L(t,new RegExp(n.markers.start),!0)}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:F.NC("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())E(t,u.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&L(t,new RegExp(n.markers.start),!1)}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.foldAllExcept",label:F.NC("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2131),weight:100}})}invoke(e,t,i){x(t,!0,this.getSelectedLines(i))}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.unfoldAllExcept",label:F.NC("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2129),weight:100}})}invoke(e,t,i){x(t,!1,this.getSelectedLines(i))}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.toggleFold",label:F.NC("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2090),weight:100}})}invoke(e,t,i){!function(e,t,i){const n=[];for(const t of i){const i=e.getRegionAtLine(t);if(i){i.isCollapsed;n.push(i),0}}e.toggleCollapseState(n)}(t,0,this.getSelectedLines(i))}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.gotoParentFold",label:F.NC("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.gotoPreviousFold",label:F.NC("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber<e)return i.startLineNumber;i=i.regionIndex>0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.gotoNextFold",label:F.NC("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex<t.regions.length))return null;if(i=t.regions.toRegion(i.regionIndex+1),i.startLineNumber>=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex<t.regions.length?t.regions.toRegion(i.regionIndex+1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:F.NC("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2130),weight:100}})}invoke(e,t,i){var n;const o=[],s=i.getSelections();if(s){for(const e of s){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(o.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(o.length>0){o.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=b.sanitizeAndMerge(t.regions,o,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(b.fromFoldRanges(e))}}}}),(0,h.Qr)(class extends ce{constructor(){super({id:"editor.removeManualFoldingRanges",label:F.NC("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2132),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)(0,h.QG)(new de({id:de.ID(e),label:F.NC("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:ae,kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,s.gx)(2089,2048|21+e),weight:100}}))},44125:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(82334),s=i(63580);class r extends n.R6{constructor(){super({id:"editor.action.fontZoomIn",label:s.NC("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()+1)}}class a extends n.R6{constructor(){super({id:"editor.action.fontZoomOut",label:s.NC("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()-1)}}class l extends n.R6{constructor(){super({id:"editor.action.fontZoomReset",label:s.NC("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){o.C.setZoomLevel(0)}}(0,n.Qr)(r),(0,n.Qr)(a),(0,n.Qr)(l)},58823:(e,t,i)=>{"use strict";i.d(t,{xC:()=>N,Zg:()=>L,x$:()=>D,Qq:()=>I,Qs:()=>M});var n=i(85152),o=i(9488),s=i(71050),r=i(17301),a=i(53725),l=i(91741),c=i(98401),h=i(70666),d=i(16467),u=i(65520),g=i(50187),p=i(24314),m=i(3860),f=i(85215),_=i(88216),v=i(35120),b=i(63580),C=i(94565);class y{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var w=i(72065),S=i(71922),k=i(43557),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function L(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;i<e.length;i++)t=p.e.plusRange(t,e[i].range);const{startLineNumber:i,endLineNumber:o}=t;i===o?1===e.length?(0,n.Z9)(b.NC("hint11","Made 1 formatting edit on line {0}",i)):(0,n.Z9)(b.NC("hintn1","Made {0} formatting edits on line {1}",e.length,i)):1===e.length?(0,n.Z9)(b.NC("hint1n","Made 1 formatting edit between lines {0} and {1}",i,o)):(0,n.Z9)(b.NC("hintnn","Made {0} formatting edits between lines {1} and {2}",e.length,i,o))}function E(e,t,i){const n=[],o=new Set,s=e.ordered(i);for(const e of s)n.push(e),e.extensionId&&o.add(y.toKey(e.extensionId));const r=t.ordered(i);for(const e of r){if(e.extensionId){if(o.has(y.toKey(e.extensionId)))continue;o.add(y.toKey(e.extensionId))}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits:(t,i,n)=>e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return n}class N{static setFormatterSelector(e){return{dispose:N._selectors.unshift(e)}}static select(e,t,i){return x(this,void 0,void 0,(function*(){if(0===e.length)return;const n=a.$.first(N._selectors);return n?yield n(e,t,i):void 0}))}}function D(e,t,i,n,o,s){return x(this,void 0,void 0,(function*(){const r=e.get(w.TG),{documentRangeFormattingEditProvider:a}=e.get(S.p),l=(0,u.CL)(t)?t.getModel():t,c=a.ordered(l),h=yield N.select(c,l,n);h&&(o.report(h),yield r.invokeFunction(T,h,t,i,s))}))}function T(e,t,i,n,s){return x(this,void 0,void 0,(function*(){const r=e.get(f.p),a=e.get(k.VZ);let l,c;(0,u.CL)(i)?(l=i.getModel(),c=new d.Dl(i,5,void 0,s)):(l=i,c=new d.YQ(i,s));const h=[];let g=0;for(const e of(0,o._2)(n).sort(p.e.compareRangesUsingStarts))g>0&&p.e.areIntersectingOrTouching(h[g-1],e)?h[g-1]=p.e.fromPositions(h[g-1].getStartPosition(),e.getEndPosition()):g=h.push(e);const _=e=>x(this,void 0,void 0,(function*(){var i,n;a.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const o=(yield t.provideDocumentRangeFormattingEdits(l,e,l.getFormattingOptions(),c.token))||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,o),o})),b=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>p.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>p.e.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(p.e.intersectRanges(i.range,e.range))return!0;return!1},C=[],y=[];try{for(const e of h){if(c.token.isCancellationRequested)return!0;y.push(yield _(e))}for(let e=0;e<h.length;++e)for(let t=e+1;t<h.length;++t){if(c.token.isCancellationRequested)return!0;if(b(y[e],y[t])){const i=p.e.plusRange(h[e],h[t]),n=yield _(i);h.splice(t,1),h.splice(e,1),h.push(i),y.splice(t,1),y.splice(e,1),y.push(n),e=0,t=0}}for(const e of y){if(c.token.isCancellationRequested)return!0;const t=yield r.computeMoreMinimalEdits(l.uri,e);t&&C.push(...t)}}finally{c.dispose()}if(0===C.length)return!1;if((0,u.CL)(i))v.V.execute(i,C,!0),L(C),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=C,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],C.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function I(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const s=e.get(w.TG),r=e.get(S.p),a=(0,u.CL)(t)?t.getModel():t,l=E(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),c=yield N.select(l,a,i);c&&(n.report(c),yield s.invokeFunction(A,c,t,i,o))}))}function A(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const s=e.get(f.p);let r,a,l;(0,u.CL)(i)?(r=i.getModel(),a=new d.Dl(i,5,void 0,o)):(r=i,a=new d.YQ(i,o));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if((0,u.CL)(i))v.V.execute(i,l,2!==n),2!==n&&(L(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function M(e,t,i,n,o,s,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,o,s,a)).catch(r.Cp).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}N._selectors=new l.S,C.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){return x(this,void 0,void 0,(function*(){const[i,n,a]=t;(0,c.p_)(h.o.isUri(i)),(0,c.p_)(p.e.isIRange(n));const l=e.get(_.S),d=e.get(f.p),u=e.get(S.p),g=yield l.createModelReference(i);try{return function(e,t,i,n,s,a){return x(this,void 0,void 0,(function*(){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,s,a)).catch(r.Cp);if((0,o.Of)(l))return yield e.computeMoreMinimalEdits(i.uri,l)}}))}(d,u,g.object.textEditorModel,p.e.lift(n),a,s.T.None)}finally{g.dispose()}}))})),C.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return x(this,void 0,void 0,(function*(){const[i,n]=t;(0,c.p_)(h.o.isUri(i));const a=e.get(_.S),l=e.get(f.p),d=e.get(S.p),u=yield a.createModelReference(i);try{return function(e,t,i,n,s){return x(this,void 0,void 0,(function*(){const a=E(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,s)).catch(r.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(i.uri,a)}}))}(l,d,u.object.textEditorModel,n,s.T.None)}finally{u.dispose()}}))})),C.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return x(this,void 0,void 0,(function*(){const[i,n,o,r]=t;(0,c.p_)(h.o.isUri(i)),(0,c.p_)(g.L.isIPosition(n)),(0,c.p_)("string"==typeof o);const a=e.get(_.S),l=e.get(f.p),d=e.get(S.p),u=yield a.createModelReference(i);try{return M(l,d,u.object.textEditorModel,g.L.lift(n),o,r,s.T.None)}finally{u.dispose()}}))}))},61097:(e,t,i)=>{"use strict";i.r(t);var n=i(9488),o=i(71050),s=i(17301),r=i(22258),a=i(5976),l=i(16830),c=i(11640),h=i(44906),d=i(24314),u=i(29102),g=i(85215),p=i(71922),m=i(58823),f=i(35120),_=i(63580),v=i(94565),b=i(38819),C=i(72065),y=i(90535),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}},k=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let x=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new a.SL,this._sessionDisposables=new a.SL,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(53)&&this._update()})))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(53))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new h.q;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new o.A,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return s.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t<n;t++)if(e.changes[t].range.endLineNumber<=i.lineNumber)return s.cancel(),void r.dispose()}));(0,m.Qs)(this._workerService,this._languageFeaturesService,t,i,e,t.getFormattingOptions(),s.token).then((e=>{s.token.isCancellationRequested||(0,n.Of)(e)&&(f.V.execute(this._editor,e,!0),(0,m.Zg)(e))})).finally((()=>{r.dispose()}))}};x.ID="editor.contrib.autoFormat",x=w([S(1,p.p),S(2,g.p)],x);let L=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.SL,this._callOnModel=new a.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(52)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(m.x$,this.editor,e,2,y.Ex.None,o.T.None).catch(s.dL))}};L.ID="editor.contrib.formatOnPaste",L=w([S(1,p.p),S(2,C.TG)],L);class E extends l.R6{constructor(){super({id:"editor.action.formatDocument",label:_.NC("formatDocument.label","Format Document"),alias:"Format Document",precondition:b.Ao.and(u.u.notInCompositeEditor,u.u.writable,u.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return k(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(C.TG),n=e.get(y.ek);yield n.showWhile(i.invokeFunction(m.Qq,t,1,y.Ex.None,o.T.None),250)}}))}}class N extends l.R6{constructor(){super({id:"editor.action.formatSelection",label:_.NC("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:b.Ao.and(u.u.writable,u.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:u.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return k(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(C.TG),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new d.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(y.ek);yield r.showWhile(i.invokeFunction(m.x$,t,s,1,y.Ex.None,o.T.None),250)}))}}(0,l._K)(x.ID,x,2),(0,l._K)(L.ID,L,2),(0,l.Qr)(E),(0,l.Qr)(N),v.P.registerCommand("editor.action.format",(e=>k(void 0,void 0,void 0,(function*(){const t=e.get(c.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(v.H);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))))},35120:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});var n=i(69386),o=i(24314),s=i(43407);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=s.Z.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},64970:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerController:()=>ne,NextMarkerAction:()=>se});var n=i(73046),o=i(5976),s=i(16830),r=i(11640),a=i(50187),l=i(24314),c=i(29102),h=i(9488),d=i(4669),u=i(91741),g=i(97295),p=i(70666),m=i(65026),f=i(72065),_=i(98674),v=i(33108),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};class y{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let w=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new d.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new o.SL,this._markers=[],this._nextIdx=-1,p.o.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,g.qu)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.e.compareRangesUsingStarts(e,t)||_.ZL.compare(e.severity,t.severity):_.ZL.compare(e.severity,t.severity)||l.e.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.o.isUri(e)?e:void 0,severities:_.ZL.Error|_.ZL.Warning|_.ZL.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new y(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,h.ry)(this._markers,{resource:e.uri},((e,t)=>(0,g.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;i<this._markers.length;i++){let o=l.e.lift(this._markers[i]);if(o.isEmpty()){const t=e.getWordAtPosition(o.getStartPosition());t&&(o=new l.e(o.startLineNumber,t.startColumn,o.startLineNumber,t.endColumn))}if(t&&(o.containsPosition(t)||t.isBeforeOrEqual(o.getStartPosition()))){this._nextIdx=i,n=!0;break}if(this._markers[i].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;const n=this._nextIdx;return-1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex((t=>t.resource.toString()===e.toString()));if(!(i<0))for(;i<this._markers.length;i++)if(l.e.containsPosition(this._markers[i],t))return new y(this._markers[i],i+1,this._markers.length)}};w=b([C(1,_.lT),C(2,v.Ui)],w);const S=(0,f.yh)("IMarkerNavigationService");let k=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new u.S}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new w(e,this._markerService,this._configService)}};k=b([C(0,_.lT),C(1,v.Ui)],k),(0,m.z)(S,k,1);var x,L=i(63580),E=i(84144),N=i(38819),D=i(59554),T=i(65321),I=i(9802),A=i(41264),M=i(95935),R=i(52049),O=i(22444),P=i(44349),F=i(50988),B=i(25670),H=i(14603);!function(e){e.className=function(e){switch(e){case H.Z.Ignore:return"severity-ignore "+B.k.asClassName(n.l.info);case H.Z.Info:return B.k.asClassName(n.l.info);case H.Z.Warning:return B.k.asClassName(n.l.warning);case H.Z.Error:return B.k.asClassName(n.l.error);default:return""}}}(x||(x={}));var W=i(73910),V=i(97781),z=function(e,t){return function(i,n){t(i,n,e)}};class U{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.SL,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(T.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new I.NB(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=((null==t?void 0:t.length)||0)+"()".length;o&&(s+="string"==typeof o?o.length:o.value.length);const r=(0,g.uq)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);T.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=T.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},T.R3(this._codeLink,T.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(T.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,h.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(63))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(47),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.ZL.Error:t=L.NC("Error","Error");break;case _.ZL.Warning:t=L.NC("Warning","Warning");break;case _.ZL.Info:t=L.NC("Info","Info");break;case _.ZL.Hint:t=L.NC("Hint","Hint")}let i=L.NC("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let j=class e extends R.vk{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new o.SL,this._onDidSelectRelatedInformation=new d.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.ZL.Warning,this._backgroundColor=A.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(ee);let t=G,i=Q;this._severity===_.ZL.Warning?(t=Y,i=Z):this._severity===_.ZL.Info&&(t=X,i=J);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(R.IH),secondaryHeadingColor:e.getColor(R.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(0,O.vr)(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=T.R3(e,T.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new U(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.e.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?L.NC("problems","{0} of {1} problems",t,i):L.NC("change","{0} of {1} problem",t,i);this.setTitle((0,M.EZ)(r.uri),e)}this._icon.className=`codicon ${x.className(_.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};j.TitleMenu=new E.eH("gotoErrorTitleMenu"),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([z(1,V.XE),z(2,F.v4),z(3,E.co),z(4,f.TG),z(5,N.i6),z(6,P.e)],j);const K=(0,W.kwl)(W.lXJ,W.b6y),q=(0,W.kwl)(W.uoC,W.pW3),$=(0,W.kwl)(W.c63,W.T83),G=(0,W.P6G)("editorMarkerNavigationError.background",{dark:K,light:K,hcDark:W.lRK,hcLight:W.lRK},L.NC("editorMarkerNavigationError","Editor marker navigation widget error color.")),Q=(0,W.P6G)("editorMarkerNavigationError.headerBackground",{dark:(0,W.ZnX)(G,.1),light:(0,W.ZnX)(G,.1),hcDark:null,hcLight:null},L.NC("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Y=(0,W.P6G)("editorMarkerNavigationWarning.background",{dark:q,light:q,hcDark:W.lRK,hcLight:W.lRK},L.NC("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Z=(0,W.P6G)("editorMarkerNavigationWarning.headerBackground",{dark:(0,W.ZnX)(Y,.1),light:(0,W.ZnX)(Y,.1),hcDark:"#0C141F",hcLight:(0,W.ZnX)(Y,.2)},L.NC("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),X=(0,W.P6G)("editorMarkerNavigationInfo.background",{dark:$,light:$,hcDark:W.lRK,hcLight:W.lRK},L.NC("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),J=(0,W.P6G)("editorMarkerNavigationInfo.headerBackground",{dark:(0,W.ZnX)(X,.1),light:(0,W.ZnX)(X,.1),hcDark:null,hcLight:null},L.NC("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ee=(0,W.P6G)("editorMarkerNavigation.background",{dark:W.cvW,light:W.cvW,hcDark:W.cvW,hcLight:W.cvW},L.NC("editorMarkerNavigationBackground","Editor marker navigation widget background."));var te=function(e,t){return function(i,n){t(i,n,e)}},ie=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ne=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new o.SL,this._editor=e,this._widgetVisible=ae.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(j,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,i){var n,o;return ie(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(s.move(t,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&(null===(n=e.get(r))||void 0===n||n.close(),null===(o=e.get(r))||void 0===o||o.nagivate(t,i))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}))}};ne.ID="editor.contrib.markerController",ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([te(1,S),te(2,N.i6),te(3,r.$),te(4,f.TG)],ne);class oe extends s.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return ie(this,void 0,void 0,(function*(){t.hasModel()&&(null===(i=ne.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}))}}class se extends oe{constructor(){super(!0,!1,{id:se.ID,label:se.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:578,weight:100},menuOpts:{menuId:j.TitleMenu,title:se.LABEL,icon:(0,D.q5)("marker-navigation-next",n.l.arrowDown,L.NC("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}se.ID="editor.action.marker.next",se.LABEL=L.NC("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class re extends oe{constructor(){super(!1,!1,{id:re.ID,label:re.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:1602,weight:100},menuOpts:{menuId:j.TitleMenu,title:re.LABEL,icon:(0,D.q5)("marker-navigation-previous",n.l.arrowUp,L.NC("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}re.ID="editor.action.marker.prev",re.LABEL=L.NC("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,s._K)(ne.ID,ne,4),(0,s.Qr)(se),(0,s.Qr)(re),(0,s.Qr)(class extends oe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:L.NC("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:66,weight:100},menuOpts:{menuId:E.eH.MenubarGoMenu,title:L.NC({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,s.Qr)(class extends oe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:L.NC("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:1090,weight:100},menuOpts:{menuId:E.eH.MenubarGoMenu,title:L.NC({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const ae=new N.uy("markersNavigationVisible",!1),le=s._l.bindToContribution(ne.get);(0,s.fK)(new le({id:"closeMarkersNavigation",precondition:ae,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.u.focus,primary:9,secondary:[1033]}}))},60628:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefinitionAction:()=>ie,SymbolNavigationAction:()=>te,SymbolNavigationAnchor:()=>ee});var n=i(16268),o=i(85152),s=i(15393),r=i(22258),a=i(1432),l=i(98401),c=i(70666),h=i(16467),d=i(65520),u=i(16830),g=i(11640),p=i(84527),m=i(50187),f=i(24314),_=i(29102),v=i(96887),b=i(27376),C=i(1293),y=i(4669),w=i(5976),S=i(95935),k=i(63580),x=i(38819),L=i(65026),E=i(72065),N=i(91847),D=i(49989),T=i(59422),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const M=new x.uy("hasSymbols",!1,(0,k.NC)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),R=(0,E.yh)("ISymbolNavigationService");let O=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=M.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new P(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if((0,S.Xy)(e.uri,n.uri))s=!0,r=r||f.e.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,w.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:f.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,k.NC)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,k.NC)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};O=I([A(0,x.i6),A(1,g.$),A(2,T.lT),A(3,N.d)],O),(0,L.z)(R,O,1),(0,u.fK)(new class extends u._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:M,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(R).revealNext(t)}}),D.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:M,primary:9,handler(e){e.get(R).reset()}});let P=class{constructor(e){this._listener=new Map,this._disposables=new w.SL,this._onDidChange=new y.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,w.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,w.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};P=I([A(0,g.$)],P);var F,B,H,W,V,z,U,j,K=i(27753),q=i(52049),$=i(84144),G=i(94565),Q=i(90535),Y=i(40184),Z=i(71922),X=i(53725),J=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};$.BH.appendMenuItem($.eH.EditorContext,{submenu:$.eH.EditorContextPeek,title:k.NC("peek.submenu","Peek"),group:"navigation",order:100});class ee{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof ee||!(!m.L.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class te extends u.x1{static all(){return te._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of X.$.wrap(t.menu))i.id!==$.eH.EditorContext&&i.id!==$.eH.EditorContextPeek||(i.when=x.Ao.and(e.precondition,i.when));return t}constructor(e,t){super(te._patchConfig(t)),this.configuration=e,te._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(T.lT),a=e.get(g.$),l=e.get(Q.ek),c=e.get(R),d=e.get(Z.p),u=e.get(E.TG),p=t.getModel(),m=t.getPosition(),f=ee.is(i)?i:new ee(p,m),_=new h.Dl(t,5),v=(0,s.eP)(this._getLocationModel(d,f.model,f.position,_.token),_.token).then((e=>J(this,void 0,void 0,(function*(){var s;if(!e||_.token.isCancellationRequested)return;let r;if((0,o.Z9)(e.ariaMessage),e.referenceAt(p.uri,m)){const e=this._getAlternativeCommand(t);!te._activeAlternativeCommands.has(e)&&te._allSymbolNavigationCommands.has(e)&&(r=te._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(m);null===(s=K.O.get(t))||void 0===s||s.showMessage(this._getNoResultFoundMessage(e),m)}}else{if(1!==l||!r)return this._onResult(a,c,t,e,n);te._activeAlternativeCommands.add(this.desc.id),u.invokeFunction((e=>r.runEditorCommand(e,t,i,n).finally((()=>{te._activeAlternativeCommands.delete(this.desc.id)}))))}}))),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return l.showWhile(v,250),v}_onResult(e,t,i,n,o){return J(this,void 0,void 0,(function*(){const s=this._getGoToPreference(i);if(i instanceof p.H||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}))}_openReference(e,t,i,n,o){return J(this,void 0,void 0,(function*(){let s;if((0,v.vx)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=yield t.openCodeEditor({resource:i.uri,options:{selection:f.e.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}))}_openInPeek(e,t,i){const n=b.J.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),(0,s.PG)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}te._allSymbolNavigationCommands=new Map,te._activeAlternativeCommands=new Set;class ie extends te{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.nD)(e.definitionProvider,t,i,n),k.NC("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?k.NC("noResultWord","No definition found for '{0}'",e.word):k.NC("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(55).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(55).multipleDefinitions}}const ne=a.$L&&!(0,n.isStandalone)()?2118:70;(0,$.r1)(((F=class e extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{value:k.NC("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:k.NC({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:x.Ao.and(_.u.hasDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:ne,weight:100},menu:[{id:$.eH.EditorContext,group:"navigation",order:1.1},{id:$.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),G.P.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",F)),(0,$.r1)(((B=class e extends ie{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,title:{value:k.NC("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:x.Ao.and(_.u.hasDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:(0,r.gx)(2089,ne),weight:100}}),G.P.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",B)),(0,$.r1)(((H=class e extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,title:{value:k.NC("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:x.Ao.and(_.u.hasDefinitionProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:$.eH.EditorContextPeek,group:"peek",order:2}}),G.P.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",H));class oe extends te{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.zq)(e.declarationProvider,t,i,n),k.NC("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?k.NC("decl.noResultWord","No declaration found for '{0}'",e.word):k.NC("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(55).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(55).multipleDeclarations}}(0,$.r1)(((W=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{value:k.NC("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:k.NC({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:x.Ao.and(_.u.hasDeclarationProvider,_.u.isInWalkThroughSnippet.toNegated()),menu:[{id:$.eH.EditorContext,group:"navigation",order:1.3},{id:$.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?k.NC("decl.noResultWord","No declaration found for '{0}'",e.word):k.NC("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",W)),(0,$.r1)(class extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:k.NC("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:x.Ao.and(_.u.hasDeclarationProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),menu:{id:$.eH.EditorContextPeek,group:"peek",order:3}})}});class se extends te{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.L3)(e.typeDefinitionProvider,t,i,n),k.NC("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?k.NC("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):k.NC("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(55).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(55).multipleTypeDefinitions}}(0,$.r1)(((V=class e extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{value:k.NC("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:k.NC({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:x.Ao.and(_.u.hasTypeDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:0,weight:100},menu:[{id:$.eH.EditorContext,group:"navigation",order:1.4},{id:$.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",V)),(0,$.r1)(((z=class e extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:{value:k.NC("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:x.Ao.and(_.u.hasTypeDefinitionProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),menu:{id:$.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",z));class re extends te{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.f4)(e.implementationProvider,t,i,n),k.NC("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?k.NC("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):k.NC("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(55).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(55).multipleImplementations}}(0,$.r1)(((U=class e extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{value:k.NC("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:k.NC({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:x.Ao.and(_.u.hasImplementationProvider,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:2118,weight:100},menu:[{id:$.eH.EditorContext,group:"navigation",order:1.45},{id:$.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",U)),(0,$.r1)(((j=class e extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:{value:k.NC("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:x.Ao.and(_.u.hasImplementationProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:3142,weight:100},menu:{id:$.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",j));class ae extends te{_getNoResultFoundMessage(e){return e?k.NC("references.no","No references found for '{0}'",e.word):k.NC("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(55).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(55).multipleReferences}}(0,$.r1)(class extends ae{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:k.NC("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:k.NC({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:x.Ao.and(_.u.hasReferenceProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:_.u.editorTextFocus,primary:1094,weight:100},menu:[{id:$.eH.EditorContext,group:"navigation",order:1.45},{id:$.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.aA)(e.referenceProvider,t,i,!0,n),k.NC("ref.title","References"))}))}}),(0,$.r1)(class extends ae{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:k.NC("references.action.label","Peek References"),original:"Peek References"},precondition:x.Ao.and(_.u.hasReferenceProvider,q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),menu:{id:$.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(yield(0,Y.aA)(e.referenceProvider,t,i,!1,n),k.NC("ref.title","References"))}))}});class le extends te{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:k.NC("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:x.Ao.and(q.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new C.oQ(this._references,k.NC("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&k.NC("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(55).multipleReferences}_getAlternativeCommand(){return""}}G.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:c.o},{name:"position",description:"The position at which to start",constraint:m.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,o,s,r)=>J(void 0,void 0,void 0,(function*(){(0,l.p_)(c.o.isUri(t)),(0,l.p_)(m.L.isIPosition(i)),(0,l.p_)(Array.isArray(n)),(0,l.p_)(void 0===o||"string"==typeof o),(0,l.p_)(void 0===r||"boolean"==typeof r);const a=e.get(g.$),h=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if((0,d.CL)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends le{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(E.TG).invokeFunction(t.run.bind(t),h)}))}))}),G.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:c.o},{name:"position",description:"The position at which to start",constraint:m.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,o)=>J(void 0,void 0,void 0,(function*(){e.get(G.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),G.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,l.p_)(c.o.isUri(t)),(0,l.p_)(m.L.isIPosition(i));const n=e.get(Z.p),o=e.get(g.$);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!(0,d.CL)(e)||!e.hasModel())return;const t=b.J.get(e);if(!t)return;const o=(0,s.PG)((t=>(0,Y.aA)(n.referenceProvider,e.getModel(),m.L.lift(i),!1,t).then((e=>new C.oQ(e,k.NC("ref.title","References")))))),r=new f.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,o,!1))}))}}),G.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},40184:(e,t,i)=>{"use strict";i.d(t,{L3:()=>p,aA:()=>m,f4:()=>g,nD:()=>d,zq:()=>u});var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(71922),l=i(1293),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function h(e,t,i,o){return c(this,void 0,void 0,(function*(){const r=i.ordered(e).map((i=>Promise.resolve(o(i,e,t)).then(void 0,(e=>{(0,s.Cp)(e)})))),a=yield Promise.all(r);return(0,n.kX)(a.flat())}))}function d(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function u(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function g(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function p(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function m(e,t,i,n,o){return h(t,i,e,((e,t,i)=>c(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,i,{includeDeclaration:!0},o);if(!n||!s||2!==s.length)return s;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},o);return r&&1===r.length?r:s}))))}function f(e){return c(this,void 0,void 0,(function*(){const t=yield e(),i=new l.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,r.sb)("_executeDefinitionProvider",((e,t,i)=>{const n=d(e.get(a.p).definitionProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=p(e.get(a.p).typeDefinitionProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeDeclarationProvider",((e,t,i)=>{const n=u(e.get(a.p).declarationProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeReferenceProvider",((e,t,i)=>{const n=m(e.get(a.p).referenceProvider,t,i,!1,o.T.None);return f((()=>n))})),(0,r.sb)("_executeImplementationProvider",((e,t,i)=>{const n=g(e.get(a.p).implementationProvider,t,i,o.T.None);return f((()=>n))}))},82005:(e,t,i)=>{"use strict";i.d(t,{yN:()=>d});var n=i(4669),o=i(5976),s=i(1432);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function h(e){return"altKey"===e?s.dz?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):s.dz?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class d extends o.JT{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=h(this._editor.getOption(74)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(74)){const e=h(this._editor.getOption(74));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},22470:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoDefinitionAtPositionEditorContribution:()=>S});var n=i(15393),o=i(17301),s=i(59365),r=i(5976),a=i(98401),l=i(16467),c=i(16830),h=i(24314),d=i(72042),u=i(88216),g=i(82005),p=i(52049),m=i(63580),f=i(38819),_=i(60628),v=i(40184),b=i(71922),C=i(82948),y=function(e,t){return function(i,n){t(i,n,e)}},w=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let S=class e{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new r.SL,this.toUnhookForKeyboard=new r.SL,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new g.yN(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,a.f6)(t))}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,o.dL)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return w(this,void 0,void 0,(function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return w(this,void 0,void 0,(function*(){this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const r=new l.yy(this.editor,15);let a;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,n.PG)((t=>this.findDefinition(e,t)));try{a=yield this.previousPromise}catch(e){return void(0,o.dL)(e)}if(!a||!a.length||!r.validate(this.editor))return void this.removeLinkDecorations();const c=a[0].originSelectionRange?h.e.lift(a[0].originSelectionRange):new h.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(a.length>1){let e=c;for(const{originSelectionRange:t}of a)t&&(e=h.e.plusRange(e,t));this.addDecoration(e,(new s.W5).appendText(m.NC("multipleResults","Click to show {0} definitions.",a.length)))}else{const e=a[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(c,o?(new s.W5).appendCodeblock(r||"",o):void 0),t.dispose()}))}}))}getPreviewValue(t,i,n){let o=n.range;return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o<i.endLineNumber;o++){const t=e.getLineFirstNonWhitespaceColumn(o);n=Math.min(n,t)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(t,i){const n=t.getLineFirstNonWhitespaceColumn(i),o=Math.min(t.getLineCount(),i+e.MAX_SOURCE_PREVIEW_LINES);let s=i+1;for(;s<o&&n!==t.getLineFirstNonWhitespaceColumn(s);s++);return new h.e(i,1,s+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([i])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var i;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&6===e.target.type&&!((null===(i=e.target.detail.injectedText)||void 0===i?void 0:i.options)instanceof C.HS)&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?(0,v.nD)(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(83)&&!this.isInPeekEditor(e);return new _.DefinitionAction({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(f.i6);return p.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};S.ID="editor.contrib.gotodefinitionatposition",S.MAX_SOURCE_PREVIEW_LINES=8,S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([y(1,u.S),y(2,d.O),y(3,b.p)],S),(0,c._K)(S.ID,S,2)},27376:(e,t,i)=>{"use strict";i.d(t,{J:()=>ae});var n=i(15393),o=i(17301),s=i(22258),r=i(5976),a=i(11640),l=i(50187),c=i(24314),h=i(52049),d=i(63580),u=i(94565),g=i(33108),p=i(38819),m=i(72065),f=i(49989),_=i(46763),v=i(59422),b=i(26904),C=i(1293),y=i(65321),w=i(23937),S=i(41264),k=i(4669),x=i(66663),L=i(95935),E=i(84527),N=i(82948),D=i(51381),T=i(68801),I=i(72042),A=i(88216),M=i(67488),R=i(34650),O=i(59834),P=i(75392),F=i(91847),B=i(44349),H=i(86253),W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},V=function(e,t){return function(i,n){t(i,n,e)}};let z=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof C.oQ||e instanceof C.F2}getChildren(e){if(e instanceof C.oQ)return e.groups;if(e instanceof C.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};z=W([V(0,A.S)],z);class U{getHeight(){return 23}getTemplateId(e){return e instanceof C.F2?$.id:Q.id}}let j=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof C.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,L.EZ)(e.uri)}};j=W([V(0,F.d)],j);class K{getId(e){return e instanceof C.WX?e.id:e.uri}}let q=class extends r.JT{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new O.g(i,{supportHighlights:!0})),this.badge=new M.Z(y.R3(i,y.$(".count")),{},H.ku),e.appendChild(i)}set(e,t){const i=(0,L.XX)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,d.NC)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,d.NC)("referenceCount","{0} reference",n))}};q=W([V(1,B.e)],q);let $=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(q,e)}renderElement(e,t,i){i.set(e.element,(0,P.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};$.id="FileReferencesRenderer",$=W([V(0,m.TG)],$);class G{constructor(e){this.label=new R.q(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!P.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,P.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,L.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class Q{constructor(){this.templateId=Q.id}renderTemplate(e){return new G(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}Q.id="OneReferenceRenderer";class Y{getWidgetAriaLabel(){return(0,d.NC)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Z=i(97781),X=i(64862),J=function(e,t){return function(i,n){t(i,n,e)}},ee=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class te{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n<o;n++){const o=e.children[n];this._decorationIgnoreSet.has(o.id)||o.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:o.range,options:te.DecorationOptions}),i.push(n))}this._editor.changeDecorations((n=>{const o=n.deltaDecorations([],t);for(let t=0;t<o.length;t++)this._decorations.set(o[t],e.children[i[t]])}))}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,n]of this._decorations){const o=t.getDecorationRange(i);if(!o)continue;let s=!1;c.e.equalsRange(o,n.range)||((c.e.spansMultipleLines(o)||n.range.endColumn-n.range.startColumn!=o.endColumn-o.startColumn)&&(s=!0),s?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=o)}for(let t=0,i=e.length;t<i;t++)this._decorations.delete(e[t]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}te.DecorationOptions=N.qx.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class ie extends _.ls{}let ne=class extends h.vk{constructor(e,t,i,n,o,s,a,l,c,h,d,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=h,this._languageService=d,this._languageConfigurationService=u,this._disposeOnNewModel=new r.SL,this._callOnDispose=new r.SL,this._onDidSelectReference=new k.Q5,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new y.Ro(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,r.B9)(this._preview),(0,r.B9)(this._previewNotAvailableMessage),(0,r.B9)(this._tree),(0,r.B9)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(h.SC)||S.Il.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(h.KY)||S.Il.transparent,primaryHeadingColor:e.getColor(h.IH),secondaryHeadingColor:e.getColor(h.R7)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=y.R3(e,y.$("div.messages")),y.Cp(this._messageContainer),this._splitView=new w.z(e,{orientation:1}),this._previewContainer=y.R3(e,y.$("div.preview.inline")),this._preview=this._instantiationService.createInstance(E.H,this._previewContainer,{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}},this.editor),y.Cp(this._previewContainer),this._previewNotAvailableMessage=new N.yO(d.NC("missingPreviewMessage","no preview available"),T.bd,N.yO.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=y.R3(e,y.$("div.ref-tree.inline"));const t={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Y,keyboardNavigationLabelProvider:this._instantiationService.createInstance(j),identityProvider:new K,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:h.M8}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(y.mu(this._treeContainer,"keydown",(e=>{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(ie,"ReferencesWidget",this._treeContainer,new U,[this._instantiationService.createInstance($),this._instantiationService.createInstance(Q)],this._instantiationService.createInstance(z),t),this._splitView.addView({onDidChange:k.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},w.M.Distribute),this._splitView.addView({onDidChange:k.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},w.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof C.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),y.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new y.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=d.NC("noResults","No results"),y.$Z(this._messageContainer),Promise.resolve(void 0)):(y.Cp(this._messageContainer),this._decorationsManager=new te(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),y.$Z(this._treeContainer),y.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof C.WX?e:e instanceof C.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return ee(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return ee(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==x.lg.inMemory?this.setTitle((0,L.Hx)(e.uri),this._uriLabel.getUriLabel((0,L.XX)(e.uri))):this.setTitle(d.NC("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();(0,r.B9)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=c.e.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([J(3,Z.XE),J(4,A.S),J(5,m.TG),J(6,h.Fw),J(7,B.e),J(8,X.tJ),J(9,F.d),J(10,I.O),J(11,D.c_)],ne);var oe=function(e,t){return function(i,n){t(i,n,e)}},se=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const re=new p.uy("referenceSearchVisible",!1,d.NC("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ae=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=re.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const o="peekViewLayout",s=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(ne,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(d.NC("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(d.NC("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new l.L(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(82)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return se(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return se(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t,i){var s;null===(s=this._widget)||void 0===s||s.hide(),this._ignoreModelChangeEvent=!0;const r=c.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:r,selectionSource:"code.jump",pinned:i}},this._editor).then((t=>{var i;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(r),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),null==o||o.toggleWidget(r,(0,n.PG)((e=>Promise.resolve(s))),null!==(i=this._peekMode)&&void 0!==i&&i)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function le(e,t){const i=(0,h.rc)(e);if(!i)return;const n=ae.get(i);n&&t(n)}ae.ID="editor.contrib.referencesController",ae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([oe(2,p.i6),oe(3,a.$),oe(4,v.lT),oe(5,m.TG),oe(6,b.Uy),oe(7,g.Ui)],ae),f.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,s.gx)(2089,60),when:p.Ao.or(re,h.Jy.inPeekEditor),handler(e){le(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),f.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:p.Ao.or(re,h.Jy.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),f.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:p.Ao.or(re,h.Jy.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),u.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),u.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),u.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),u.P.registerCommand("closeReferenceSearch",(e=>le(e,(e=>e.closeWidget())))),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:p.Ao.and(h.Jy.inPeekEditor,p.Ao.not("config.editor.stablePeek"))}),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:p.Ao.and(re,p.Ao.not("config.editor.stablePeek"))}),f.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:p.Ao.and(re,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&le(e,(e=>e.revealReference(i[0])))}}),f.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:p.Ao.and(re,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&le(e,(e=>e.openReference(i[0],!0,!0)))}}),u.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&le(e,(e=>e.openReference(i[0],!1,!0)))}))},1293:(e,t,i)=>{"use strict";i.d(t,{F2:()=>p,WX:()=>u,oQ:()=>m});var n=i(17301),o=i(4669),s=i(44742),r=i(5976),a=i(43702),l=i(95935),c=i(97295),h=i(24314),d=i(63580);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=s.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,d.NC)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,d.NC)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new h.e(n,a.startColumn,n,o),c=new h.e(s,r,s,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:d+u+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.Y9}dispose(){(0,r.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,d.NC)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.EZ)(this.uri),this.uri.fsPath):(0,d.NC)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,s=function*(){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dL)(e)}return this},new((o=void 0)||(o=Promise))((function(e,n){function r(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s.throw(e))}catch(e){n(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(t,i||[])).next())}));var t,i,o,s}}class m{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(m._compareReferences);for(const t of e)if(n&&l.SF.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==m._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new m(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,d.NC)("aria.result.0","No results found"):1===this.references.length?(0,d.NC)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,d.NC)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,d.NC)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+1<o||!t&&n>0?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLen<t.prefixLen?1:e.offsetDist<t.offsetDist?-1:e.offsetDist>t.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&h.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.SF.compare(e.uri,t.uri)||h.e.compareRangesUsingStarts(e.range,t.range)}}},41095:(e,t,i)=>{"use strict";i.d(t,{R8:()=>c});var n=i(15393),o=i(71050),s=i(17301),r=i(16830),a=i(71922);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function c(e,t,i,o){const r=e.ordered(t).map(((e,n)=>function(e,t,i,n,o){return r=this,a=void 0,h=function*(){try{const s=yield Promise.resolve(e.provideHover(i,n,o));if(s&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(s))return new l(e,s,t)}catch(e){(0,s.Cp)(e)}},new((c=void 0)||(c=Promise))((function(e,t){function i(e){try{o(h.next(e))}catch(e){t(e)}}function n(e){try{o(h.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof c?o:new c((function(e){e(o)}))).then(i,n)}o((h=h.apply(r,a||[])).next())}));var r,a,c,h}(e,n,t,i,o)));return n.Aq.fromPromises(r).coalesce()}(0,r.sb)("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return c(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(a.p).hoverProvider,t,i,o.T.None)))},9427:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ModesHoverController:()=>ge});var n=i(22258),o=i(5976),s=i(16830),r=i(24314),a=i(29102),l=i(72042),c=i(22470),h=i(65321),d=i(59069),u=i(9802);const g=h.$;class p extends o.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new u.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class m extends o.JT{static render(e,t,i){return new m(e,t,i)}constructor(e,t,i){super(),this.actionContainer=h.R3(e,g("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=h.R3(this.actionContainer,g("a.action")),this.action.setAttribute("role","button"),t.iconClass&&h.R3(this.action,g(`span.icon.${t.iconClass}`)),h.R3(this.action,g("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(h.nm(this.actionContainer,h.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(h.nm(this.actionContainer,h.tw.KEY_DOWN,(e=>{const i=new d.y(e);(i.equals(3)||i.equals(10))&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var f=i(9488),_=i(50187),v=i(82948),b=i(96887),C=i(15393),y=i(17301),w=i(4669);class S{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class k extends o.JT{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new w.Q5),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new C.pY((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new C.pY((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new C.pY((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(57).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,C.zS)((e=>this._computer.computeAsync(e))),(()=>{var e,t,i,n;e=this,t=void 0,n=function*(){var e,t,i,n;try{try{for(var o,s=!0,r=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}(this._asyncIterable);!(e=(o=yield r.next()).done);){n=o.value,s=!1;try{const e=n;e&&(this._result.push(e),this._fireResult())}finally{s=!0}}}catch(e){t={error:e}}finally{try{s||e||!(i=r.return)||(yield i.call(r))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,y.dL)(e)}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new S(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}var x=i(66520),L=i(38819),E=i(72065),N=i(91847),D=i(55621),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const A=h.$;let M=class e extends o.JT{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(F,this._editor)),this._currentResult=null,this._participants=[];for(const e of x.Ae.getAll())this._participants.push(this._instantiationService.createInstance(e,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new H(this._editor,this._participants),this._hoverOperation=this._register(new k(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new R(this._computer.anchor,t,e.isComplete))}))),this._register(h.mu(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(b.RW.onDidChange((()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))})))}maybeShowAt(e){const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;if(6===i.type&&t.push(new x.Qj(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(47).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToText<n&&t.push(new x.Qj(0,i.range,e.event.posx,e.event.posy))}return 0===t.length?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort(((e,t)=>t.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new x.Qj(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,o){return this._widget.position&&this._currentResult?this._editor.getOption(57).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1):!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(t,i){const{showAtPosition:n,showAtSecondaryPosition:s,highlightRange:r}=e.computeHoverRanges(this._editor,t.range,i),a=new o.SL,l=a.add(new B(this._keybindingService)),c=document.createDocumentFragment();let h=null;const d={fragment:c,statusBar:l,setColorPicker:e=>h=e,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const e of this._participants){const t=i.filter((t=>t.owner===e));t.length>0&&a.add(e.renderHoverParts(d,t))}const u=i.some((e=>e.isBeforeContent));if(l.hasContent&&c.appendChild(l.hoverElement),c.hasChildNodes()){if(r){const t=this._editor.createDecorationsCollection();t.set([{range:r,options:e._DECORATION_OPTIONS}]),a.add((0,o.OF)((()=>{t.clear()})))}this._widget.showAt(c,new P(h,n,s,this._editor.getOption(57).above,this._computer.shouldFocus,this._computer.source,u,t.initialMousePosX,t.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=new _.L(s.startLineNumber,i.getLineMinColumn(s.startLineNumber));n=o.convertViewPositionToModelPosition(r).column}const o=t.startLineNumber;let s=t.startColumn,a=i[0].range,l=null;for(const e of i)a=r.e.plusRange(a,e.range),e.range.startLineNumber===o&&e.range.endLineNumber===o&&(s=Math.max(Math.min(s,e.range.startColumn),n)),e.forceShowAtRange&&(l=e.range);return{showAtPosition:l?l.getStartPosition():new _.L(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new _.L(o,s),highlightRange:a}}};M._DECORATION_OPTIONS=v.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),M=T([I(1,E.TG),I(2,N.d)],M);class R{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new O(this,this.anchor,t,this.isComplete)}}class O extends R{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class P{constructor(e,t,i,n,o,s,r,a,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=o,this.source=s,this.isBeforeContent=r,this.initialMousePosX=a,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}let F=class e extends o.JT{get position(){var e,t;return null!==(t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition)&&void 0!==t?t:null}get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=a.u.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new p),this._visibleData=null,this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(47)&&this._updateFont()}))),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(D._y.Visible.key)&&(e=!0);const t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(void 0===this._visibleData.initialMousePosX||void 0===this._visibleData.initialMousePosY)return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=h.i(this.getDomNode());void 0===this._visibleData.closestMouseDistance&&(this._visibleData.closestMouseDistance=W(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=W(e,t,i.left,i.top,i.width,i.height);return!(n>this._visibleData.closestMouseDistance+4||(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),0))}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(47);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}showAt(e,t){var i;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(i=t.colorPicker)||void 0===i||i.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const e=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==e&&(this._hover.contentsDomNode.style.paddingBottom=e,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};F.ID="editor.contrib.contentHoverWidget",F=T([I(1,L.i6)],F);let B=class extends o.JT{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=A("div.hover-row.status-bar"),this.actionsElement=h.R3(this.hoverElement,A("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(m.render(this.actionsElement,e,i))}append(e){const t=h.R3(this.actionsElement,e);return this._hasContent=!0,t}};B=T([I(0,N.d)],B);class H{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return C.Aq.EMPTY;const i=H._getLineDecorations(this._editor,t);return C.Aq.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):C.Aq.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=H._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,f.kX)(t)}}function W(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),c=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+c*c)}var V=i(59365),z=i(45241);const U=h.$;class j extends o.JT{constructor(e,t,i){super(),this._renderDisposeables=this._register(new o.SL),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new p),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new z.$({editor:this._editor},t,i)),this._computer=new K(this._editor),this._hoverOperation=this._register(new k(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(47)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return j.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=U("div.hover-row.markdown-hover"),n=h.R3(t,U("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(63),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}j.ID="editor.contrib.modesGlyphHoverWidget";class K{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,V.CP)(t)&&i.push(...(0,f._2)(t).map(e))}return i}}var q=i(63580),$=i(50988),G=i(73910),Q=i(97781),Y=i(22374),Z=i(95935),X=i(36357),J=i(75396),ee=i(79527),te=i(87997),ie=i(64970),ne=i(98674),oe=i(90535),se=i(71922),re=function(e,t){return function(i,n){t(i,n,e)}};const ae=h.$;class le{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const ce={type:1,filter:{include:te.yN.QuickFix},triggerAction:te.aQ.QuickFixHover};let he=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const a of t){const t=a.range.startLineNumber===n?a.range.startColumn:1,l=a.range.endLineNumber===n?a.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const h=new r.e(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new le(this,h,c))}return s}renderHoverParts(e,t){if(!t.length)return o.JT.None;const i=new o.SL;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>ne.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=ae("div.hover-row"),n=h.R3(i,ae("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=h.R3(n,ae("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=ae("span");o&&(h.R3(e,ae("span")).innerText=o);const i=h.R3(e,ae("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(h.nm(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),h.R3(i,ae("span")).innerText=r.value;const s=h.R3(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=h.R3(n,ae("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,f.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=h.R3(n,ae("div"));r.style.marginTop="8px";const a=h.R3(r,ae("a"));a.innerText=`${(0,Z.EZ)(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(h.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(y.dL)})));const l=h.R3(r,ae("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==ne.ZL.Error&&t.marker.severity!==ne.ZL.Warning&&t.marker.severity!==ne.ZL.Info||e.statusBar.addAction({label:q.NC("view problem","View Problem"),commandId:ie.NextMarkerAction.ID,run:()=>{var i;e.hide(),null===(i=ie.MarkerController.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(86)){const n=e.statusBar.append(ae("div"));this.recentMarkerCodeActionsInfo&&(ne.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===ne.H0.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=q.NC("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?o.JT.None:i.add((0,C.Vg)((()=>n.textContent=q.NC("checkingForQuickFixes","Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add((0,o.OF)((()=>r.cancel()))),r.then((r=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:r.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return r.dispose(),void(n.textContent=q.NC("noQuickFixes","No quick fixes available"));n.style.display="none";let a=!1;i.add((0,o.OF)((()=>{a||r.dispose()}))),e.statusBar.addAction({label:q.NC("quick fixes","Quick Fix..."),commandId:ee.E7.Id,run:t=>{a=!0;const i=ee.G6.get(this._editor),n=h.i(t);e.hide(),null==i||i.showCodeActions(ce,r,{x:n.left+6,y:n.top+n.height+6,width:n.width,height:n.height})}})}),y.dL)}}getCodeActions(e){return(0,C.PG)((t=>(0,J.aI)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new r.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),ce,oe.Ex.None,t)))}};he=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(1,X.i),re(2,$.v4),re(3,se.p)],he);var de=i(89849),ue=function(e,t){return function(i,n){t(i,n,e)}};let ge=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._toUnhook=new o.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(57)&&(this._unhookEvents(),this._hookEvents())}))}_hookEvents(){const e=this._editor.getOption(57);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._toUnhook.add(this._editor.onDidChangeModel((()=>this._hideWidgets()))),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;9!==t.type||t.detail!==F.ID?12===t.type&&t.detail===j.ID||(12!==t.type&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.containsNode(i))||this._hideWidgets()}_onEditorMouseMove(e){var t,i,n,o,s,r;const a=e.target;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==a.type||a.detail!==F.ID)&&(!this._isHoverSticky||(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))&&(this._isHoverSticky||9!==a.type||a.detail!==F.ID||!(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))&&!(this._isHoverSticky&&12===a.type&&a.detail===j.ID||this._isHoverSticky&&(null===(o=this._contentWidget)||void 0===o?void 0:o.isVisibleFromKeyboard()))){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(s=this._glyphWidget)||void 0===s||s.hide()):2===a.type&&a.position?(null===(r=this._contentWidget)||void 0===r||r.hide(),this._glyphWidget||(this._glyphWidget=new j(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(a.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||de.Q.dropDownVisible||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(M,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i,n){this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};ge.ID="editor.contrib.hover",ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ue(1,E.TG),ue(2,$.v4),ue(3,l.O),ue(4,L.i6)],ge);class pe extends s.R6{constructor(){super({id:"editor.action.showHover",label:q.NC({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:a.u.editorTextFocus,primary:(0,n.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;const i=ge.get(t);if(!i)return;const n=t.getPosition(),o=new r.e(n.lineNumber,n.column,n.lineNumber,n.column),s=2===t.getOption(2);i.showContentHover(o,1,1,s)}}class me extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:q.NC({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=ge.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new r.e(n.lineNumber,n.column,n.lineNumber,n.column),s=c.GotoDefinitionAtPositionEditorContribution.get(t);s&&s.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,1,!0)}))}}(0,s._K)(ge.ID,ge,2),(0,s.Qr)(pe),(0,s.Qr)(me),x.Ae.register(Y.D5),x.Ae.register(he),(0,Q.Ic)(((e,t)=>{const i=e.getColor(G.CNo);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}))},66520:(e,t,i)=>{"use strict";i.d(t,{Ae:()=>s,Qj:()=>n,YM:()=>o});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const s=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},22374:(e,t,i)=>{"use strict";i.d(t,{D5:()=>C,c:()=>y,hU:()=>b});var n=i(65321),o=i(9488),s=i(15393),r=i(59365),a=i(5976),l=i(45241),c=i(50187),h=i(24314),d=i(72042),u=i(41095),g=i(63580),p=i(33108),m=i(50988),f=i(71922),_=function(e,t){return function(i,n){t(i,n,e)}};const v=n.$;class b{constructor(e,t,i,n,o){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let C=class{constructor(e,t,i,n,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=2}createLoadingMessage(e){return new b(this,e.range,[(new r.W5).appendText(g.NC("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(111),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let m=!1;u>=0&&c>u&&e.range.startColumn>=u&&(m=!0,a.push(new b(this,e.range,[{value:g.NC("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!m&&"number"==typeof p&&c>=p&&a.push(new b(this,e.range,[{value:g.NC("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let f=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,c=i.range.endLineNumber===n?i.range.endColumn:s,d=i.options.hoverMessage;if(!d||(0,r.CP)(d))continue;i.options.beforeContentClassName&&(f=!0);const u=new h.e(e.range.startLineNumber,t,e.range.startLineNumber,c);a.push(new b(this,u,(0,o._2)(d),f,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return s.Aq.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return s.Aq.EMPTY;const o=new c.L(e.range.startLineNumber,e.range.startColumn);return(0,u.R8)(this._languageFeaturesService.hoverProvider,n,o,i).filter((e=>!(0,r.CP)(e.hover.contents))).map((t=>{const i=t.hover.range?h.e.lift(t.hover.range):e.range;return new b(this,i,t.hover.contents,!1,t.ordinal)}))}renderHoverParts(e,t){return y(e,t,this._editor,this._languageService,this._openerService)}};function y(e,t,i,o,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const c=new a.SL;for(const a of t)for(const t of a.contents){if((0,r.CP)(t))continue;const a=v("div.hover-row.markdown-hover"),h=n.R3(a,v("div.hover-contents")),d=c.add(new l.$({editor:i},o,s));c.add(d.onDidRenderAsync((()=>{h.className="hover-contents code-hover-contents",e.onContentsChanged()})));const u=c.add(d.render(t));h.appendChild(u.element),e.fragment.appendChild(a)}return c}C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_(1,d.O),_(2,m.v4),_(3,p.Ui),_(4,f.p)],C)},56353:(e,t,i)=>{"use strict";i.r(t);var n=i(15393),o=i(17301),s=i(16467),r=i(16830),a=i(24314),l=i(3860),c=i(29102),h=i(82948),d=i(85215),u=i(63580);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}let p=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(t,i){var r;null===(r=this.currentRequest)||void 0===r||r.cancel();const c=this.editor.getSelection(),h=this.editor.getModel();if(!h||!c)return;let d=c;if(d.startLineNumber!==d.endLineNumber)return;const u=new s.yy(this.editor,5),p=h.uri;return this.editorWorkerService.canNavigateValueSet(p)?(this.currentRequest=(0,n.PG)((e=>this.editorWorkerService.navigateValueSet(p,d,i))),this.currentRequest.then((i=>{var s;if(!i||!i.range||!i.value)return;if(!u.validate(this.editor))return;const r=a.e.lift(i.range);let c=i.range;const h=i.value.length-(d.endColumn-d.startColumn);c={startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.startColumn+i.value.length},h>1&&(d=new l.Y(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn+h-1));const p=new g(r,d,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,p),this.editor.pushUndoStop(),this.decorations.set([{range:c,options:e.DECORATION}]),null===(s=this.decorationRemover)||void 0===s||s.cancel(),this.decorationRemover=(0,n.Vs)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dL)})).catch(o.dL)):Promise.resolve(void 0)}};var m,f;p.ID="editor.contrib.inPlaceReplaceController",p.DECORATION=h.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(m=1,f=d.p,function(e,t){f(e,t,m)})],p);class _ extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:u.NC("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.u.writable,kbOpts:{kbExpr:c.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=p.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class v extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:u.NC("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.u.writable,kbOpts:{kbExpr:c.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=p.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,r._K)(p.ID,p,4),(0,r.Qr)(_),(0,r.Qr)(v)},18279:(e,t,i)=>{"use strict";function n(e,t){let i=0;for(let n=0;n<e.length;n++)"\t"===e.charAt(n)?i+=t:i++;return i}function o(e,t,i){e=e<0?0:e;let n="";if(!i){const i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+="\t"}for(let t=0;t<e;t++)n+=" ";return n}i.d(t,{J:()=>o,Y:()=>n})},84602:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoIndentOnPaste:()=>D,AutoIndentOnPasteCommand:()=>N,ChangeIndentationSizeAction:()=>y,ChangeTabDisplaySize:()=>k,DetectIndentation:()=>x,IndentUsingSpaces:()=>S,IndentUsingTabs:()=>w,IndentationToSpacesAction:()=>b,IndentationToSpacesCommand:()=>M,IndentationToTabsAction:()=>C,IndentationToTabsCommand:()=>R,ReindentLinesAction:()=>L,ReindentSelectedLinesAction:()=>E,getReindentEditOperations:()=>v});var n=i(5976),o=i(97295),s=i(16830),r=i(10291),a=i(69386),l=i(24314),c=i(3860),h=i(29102),d=i(51381),u=i(73733),g=i(18279),p=i(63580),m=i(41157),f=i(83158),_=i(75383);function v(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const l=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!l)return[];for(n=Math.min(n,e.getLineCount());i<=n&&l.unIndentedLinePattern;){const t=e.getLineContent(i);if(!l.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:h,indentSize:d,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,r.U.shiftIndent(e,e.length+t,h,d,u)),p=(e,t)=>(t=t||1,r.U.unshiftIndent(e,e.length+t,h,d,u)),m=[];let _;const v=e.getLineContent(i);let b=v;if(null!=s){_=s;const e=o.V8(v);b=_+v.substring(e.length),l.decreaseIndentPattern&&l.decreaseIndentPattern.test(b)&&(_=p(_),b=_+v.substring(e.length)),v!==b&&m.push(a.h.replaceMove(new c.Y(i,1,i,e.length+1),(0,f.x)(_,d,u)))}else _=o.V8(v);let C=_;l.increaseIndentPattern&&l.increaseIndentPattern.test(b)?(C=g(C),_=g(_)):l.indentNextLinePattern&&l.indentNextLinePattern.test(b)&&(C=g(C));for(let t=++i;t<=n;t++){const i=e.getLineContent(t),n=o.V8(i),s=C+i.substring(n.length);l.decreaseIndentPattern&&l.decreaseIndentPattern.test(s)&&(C=p(C),_=p(_)),n!==C&&m.push(a.h.replaceMove(new c.Y(t,1,t,n.length+1),(0,f.x)(C,d,u))),l.unIndentedLinePattern&&l.unIndentedLinePattern.test(i)||(l.increaseIndentPattern&&l.increaseIndentPattern.test(s)?(_=g(_),C=_):C=l.indentNextLinePattern&&l.indentNextLinePattern.test(s)?g(C):_)}return m}class b extends s.R6{constructor(){super({id:b.ID,label:p.NC("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new M(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}b.ID="editor.action.indentationToSpaces";class C extends s.R6{constructor(){super({id:C.ID,label:p.NC("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new R(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}C.ID="editor.action.indentationToTabs";class y extends s.R6{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(m.eJ),n=e.get(u.q),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?p.NC("configuredTabSize","Configured Tab Size"):e===s.tabSize?p.NC("defaultTabSize","Default Tab Size"):e===r.tabSize?p.NC("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:p.NC({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class w extends y{constructor(){super(!1,!1,{id:w.ID,label:p.NC("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class S extends y{constructor(){super(!0,!1,{id:S.ID,label:p.NC("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}S.ID="editor.action.indentUsingSpaces";class k extends y{constructor(){super(!0,!0,{id:k.ID,label:p.NC("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}k.ID="editor.action.changeTabDisplaySize";class x extends s.R6{constructor(){super({id:x.ID,label:p.NC("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(u.q),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}x.ID="editor.action.detectIndentation";class L extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:p.NC("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){const i=e.get(d.c_),n=t.getModel();if(!n)return;const o=v(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class E extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:p.NC("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){const i=e.get(d.c_),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const e of o){let t=e.startLineNumber,o=e.endLineNumber;if(t!==o&&1===e.endColumn&&o--,1===t){if(t===o)continue}else t--;const r=v(n,i,t,o);s.push(...r)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class N{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(l.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let D=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.SL,this.callOnModel=new n.SL,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(52)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:a,insertSpaces:c}=i.getOptions(),h=[],d={shiftIndent:e=>r.U.shiftIndent(e,e.length+1,s,a,c),unshiftIndent:e=>r.U.unshiftIndent(e,e.length+1,s,a,c)};let u=e.startLineNumber;for(;u<=e.endLineNumber&&this.shouldIgnoreLine(i,u);)u++;if(u>e.endLineNumber)return;let p=i.getLineContent(u);if(!/\S/.test(p.substring(0,e.startColumn-1))){const e=(0,_.n8)(n,i,i.getLanguageId(),u,d,this._languageConfigurationService);if(null!==e){const t=o.V8(p),n=g.Y(e,s);if(n!==g.Y(t,s)){const e=g.J(n,s,c);h.push({range:new l.e(u,1,u,t.length+1),text:e}),p=e+p.substr(t.length)}else{const e=(0,_.tI)(i,u,this._languageConfigurationService);if(0===e||8===e)return}}}const m=u;for(;u<e.endLineNumber&&!/\S/.test(i.getLineContent(u+1));)u++;if(u!==e.endLineNumber){const t={tokenization:{getLineTokens:e=>i.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?p:i.getLineContent(e)},r=(0,_.n8)(n,t,i.getLanguageId(),u+1,d,this._languageConfigurationService);if(null!==r){const t=g.Y(r,s),n=g.Y(o.V8(i.getLineContent(u+1)),s);if(t!==n){const r=t-n;for(let t=u+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=o.V8(e),a=g.Y(n,s)+r,d=g.J(a,s,c);d!==n&&h.push({range:new l.e(t,1,t,n.length+1),text:d})}}}}if(h.length>0){this.editor.pushUndoStop();const e=new N(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function T(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e<i;e++)o+=" ";const s=new RegExp(o,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;const a=new l.e(i,1,i,r),c=e.getValueInRange(a),h=n?c.replace(/\t/gi,o):c.replace(s,"\t");t.addEditOperation(a,h)}}var I,A;D.ID="editor.contrib.autoIndentOnPaste",D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(I=1,A=d.c_,function(e,t){A(e,t,I)})],D);class M{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),T(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class R{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),T(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,s._K)(D.ID,D,2),(0,s.Qr)(b),(0,s.Qr)(C),(0,s.Qr)(w),(0,s.Qr)(S),(0,s.Qr)(k),(0,s.Qr)(x),(0,s.Qr)(L),(0,s.Qr)(E)},66348:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(66520),s=i(65321),r=i(9488),a=i(15393),l=i(71050),c=i(17301),h=i(5976),d=i(43702),u=i(98401),g=i(70666),p=i(29994),m=i(43407),f=i(64141),_=i(69386),v=i(24314),b=i(96887),C=i(84973),y=i(82948),w=i(88191),S=i(71922),k=i(88216),x=i(82005),L=i(50187),E=i(66663),N=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class D{constructor(e,t){this.range=e,this.direction=t}}class T{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new T(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return N(this,void 0,void 0,(function*(){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return N(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(e){(0,c.Cp)(e),this._isResolved=!1}}))}}class I{static create(e,t,i,n){return N(this,void 0,void 0,(function*(){const o=[],s=e.ordered(t).reverse().map((e=>i.map((i=>N(this,void 0,void 0,(function*(){try{const s=yield e.provideInlayHints(t,i,n);(null==s?void 0:s.hints.length)&&o.push([s,e])}catch(e){(0,c.Cp)(e)}}))))));if(yield Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new c.FU;return new I(i,o,t)}))}constructor(e,t,i){this._disposables=new h.SL,this.ranges=e,this.provider=new Set;const n=[];for(const[e,o]of t){this._disposables.add(e),this.provider.add(o);for(const t of e.hints){const e=i.validatePosition(t.position);let s="before";const r=I._getRangeAtPosition(i,e);let a;r.getStartPosition().isBefore(e)?(a=v.e.fromPositions(r.getStartPosition(),e),s="after"):(a=v.e.fromPositions(e,r.getEndPosition()),s="before"),n.push(new T(t,new D(a,s),o))}}this.items=n.sort(((e,t)=>L.L.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new v.e(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,r=o.findTokenIndexAtOffset(s);let a=o.getStartOffset(r),l=o.getEndOffset(r);return l-a==1&&(a===s&&r>1?(a=o.getStartOffset(r-1),l=o.getEndOffset(r-1)):l===s&&r<o.getCount()-1&&(a=o.getStartOffset(r+1),l=o.getEndOffset(r+1))),new v.e(i,a+1,i,l+1)}}var A=i(58722),M=i(94565),R=i(65026),O=i(72065),P=i(59422),F=i(73910),B=i(97781),H=function(e,t){return function(i,n){t(i,n,e)}},W=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class V{constructor(){this._entries=new d.z6(50)}get(e){const t=V._key(e);return this._entries.get(t)}set(e,t){const i=V._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const z=(0,O.yh)("IInlayHintsCache");(0,R.z)(z,V,1);class U{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class j{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let K=class e{static get(t){var i;return null!==(i=t.getContribution(e.ID))&&void 0!==i?i:void 0}constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new h.SL,this._sessionDisposables=new h.SL,this._decorationsMetadata=new Map,this._ruleFactory=new p.t7(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(134)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(134);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,h.OF)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,r=new a.pY((()=>W(this,void 0,void 0,(function*(){const e=Date.now();null==n||n.dispose(!0),n=new l.A;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const s=n.token,a=yield I.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),s);if(r.delay=this._debounceInfo.update(t,Date.now()-e),s.isCancellationRequested)return void a.dispose();for(const e of a.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{r.isScheduled()||r.schedule()}))));this._sessionDisposables.add(a),this._updateHintsDecorators(a.ranges,a.items),this._cacheHintsForFastRestore(t)}catch(e){(0,c.dL)(e)}finally{n.dispose(),i.dispose()}}))),this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add((0,h.OF)((()=>null==n?void 0:n.dispose(!0)))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&r.isScheduled()||r.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(r.delay,1250);r.schedule(t)}))),"on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s._q.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),r.schedule(0)}})))}this._sessionDisposables.add(this._installDblClickGesture((()=>r.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new h.SL,t=e.add(new x.yN(this._editor)),i=new h.SL;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new l.A;i.add((0,h.OF)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new j(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,a=new v.e(r,1,r,o.getLineMaxColumn(r)),c=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],c),i.add((0,h.OF)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],c)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>W(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(A.K,e,this._editor,i.location):b.mY.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((t=>W(this,void 0,void 0,(function*(){if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(l.T.None),(0,r.Of)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>_.h.replace(v.e.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))))}_installContextMenu(){return this._editor.onContextMenu((e=>W(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(A.u,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof y.HS&&(null==i?void 0:i.attachedData)instanceof U?i.attachedData:void 0}_invokeCommand(e,t){var i;return W(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(e){this._notificationService.notify({severity:P.zb.Error,source:t.provider.displayName,message:e})}}))}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new D(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(v.e.compareRangesUsingStarts)){const t=e.validateRange(new v.e(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&v.e.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=v.e.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(t,i){var n,o;const s=[],a=(e,t,i,n,o)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:o};s.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},l=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(c/3|0)+"px",display:"inline-block"});a(e,i,"",t?C.RM.Right:C.RM.None)},{fontSize:c,fontFamily:h,padding:d,isUniform:u}=this._getLayoutInfo(),g="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(g,h);for(const t of i){t.hint.paddingLeft&&l(t,!1);const i="string"==typeof t.hint.label?[{label:t.hint.label}]:t.hint.label;for(let e=0;e<i.length;e++){const o=i[e],s=0===e,l=e===i.length-1,h={fontSize:`${c}px`,fontFamily:`var(${g}), ${f.hL.fontFamily}`,verticalAlign:u?"baseline":"middle"};(0,r.Of)(t.hint.textEdits)&&(h.cursor="default"),this._fillInColors(h,t.hint),(o.command||o.location)&&(null===(n=this._activeInlayHintPart)||void 0===n?void 0:n.part.item)===t&&this._activeInlayHintPart.part.index===e&&(h.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(h.color=(0,B.EN)(F._Yy),h.cursor="pointer")),d&&(s&&l?(h.padding=`1px ${0|Math.max(1,c/4)}px`,h.borderRadius=(c/4|0)+"px"):s?(h.padding=`1px 0 1px ${0|Math.max(1,c/4)}px`,h.borderRadius=`${c/4|0}px 0 0 ${c/4|0}px`):l?(h.padding=`1px ${0|Math.max(1,c/4)}px 1px 0`,h.borderRadius=`0 ${c/4|0}px ${c/4|0}px 0`):h.padding="1px 0 1px 0"),a(t,this._ruleFactory.createClassNameRef(h),o.label.replace(/[ \t]/g," "),l&&!t.hint.paddingRight?C.RM.Right:C.RM.None,new U(t,e))}if(t.hint.paddingRight&&l(t,!0),s.length>e._MAX_DECORATORS)break}const p=[];for(const e of t)for(const{id:t}of null!==(o=this._editor.getDecorationsInRange(e))&&void 0!==o?o:[]){const e=this._decorationsMetadata.get(t);e&&(p.push(t),e.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const _=m.Z.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(p,s.map((e=>e.decoration)));for(let e=0;e<t.length;e++){const i=s[e];this._decorationsMetadata.set(t[e],i)}})),_.restore(this._editor)}_fillInColors(e,t){t.kind===b.gl.Parameter?(e.backgroundColor=(0,B.EN)(F.phM),e.color=(0,B.EN)(F.HCL)):t.kind===b.gl.Type?(e.backgroundColor=(0,B.EN)(F.bKB),e.color=(0,B.EN)(F.hX8)):(e.backgroundColor=(0,B.EN)(F.PpC),e.color=(0,B.EN)(F.VVv))}_getLayoutInfo(){const e=this._editor.getOption(134),t=e.padding,i=this._editor.getOption(49),n=this._editor.getOption(46);let o=e.fontSize;(!o||o<5||o>i)&&(o=i);const s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};K.ID="editor.contrib.InlayHints",K._MAX_DECORATORS=1500,K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([H(1,S.p),H(2,w.A),H(3,z),H(4,M.H),H(5,P.lT),H(6,O.TG)],K),M.P.registerCommand("_executeInlayHintProvider",((e,...t)=>W(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,u.p_)(g.o.isUri(i)),(0,u.p_)(v.e.isIRange(n));const{inlayHintsProvider:o}=e.get(S.p),s=yield e.get(k.S).createModelReference(i);try{const e=yield I.create(o,s.object.textEditorModel,[v.e.lift(n)],l.T.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}))));var q=i(59365),$=i(72042),G=i(41095),Q=i(22374),Y=i(33108),Z=i(50988),X=i(63580),J=i(1432),ee=function(e,t){return function(i,n){t(i,n,e)}},te=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ie extends o.YM{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let ne=class extends Q.D5{constructor(e,t,i,n,o,s){super(e,t,i,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!K.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof y.HS&&i.attachedData instanceof U?new ie(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof ie?new a.Aq((t=>te(this,void 0,void 0,(function*(){var n,o,s,a;const{part:l}=e;if(yield l.item.resolve(i),i.isCancellationRequested)return;let c,h;if("string"==typeof l.item.hint.tooltip?c=(new q.W5).appendText(l.item.hint.tooltip):l.item.hint.tooltip&&(c=l.item.hint.tooltip),c&&t.emitOne(new Q.hU(this,e.range,[c],!1,0)),(0,r.Of)(l.item.hint.textEdits)&&t.emitOne(new Q.hU(this,e.range,[(new q.W5).appendText((0,X.NC)("hint.dbl","Double-click to insert"))],!1,10001)),"string"==typeof l.part.tooltip?h=(new q.W5).appendText(l.part.tooltip):l.part.tooltip&&(h=l.part.tooltip),h&&t.emitOne(new Q.hU(this,e.range,[h],!1,1)),l.part.location||l.part.command){let i;const n="altKey"===this._editor.getOption(74)?J.dz?(0,X.NC)("links.navigate.kb.meta.mac","cmd + click"):(0,X.NC)("links.navigate.kb.meta","ctrl + click"):J.dz?(0,X.NC)("links.navigate.kb.alt.mac","option + click"):(0,X.NC)("links.navigate.kb.alt","alt + click");l.part.location&&l.part.command?i=(new q.W5).appendText((0,X.NC)("hint.defAndCommand","Go to Definition ({0}), right click for more",n)):l.part.location?i=(new q.W5).appendText((0,X.NC)("hint.def","Go to Definition ({0})",n)):l.part.command&&(i=new q.W5(`[${(0,X.NC)("hint.cmd","Execute Command")}](${d=l.part.command,g.o.from({scheme:E.lg.command,path:d.id,query:d.arguments&&encodeURIComponent(JSON.stringify(d.arguments))}).toString()} "${l.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new Q.hU(this,e.range,[i],!1,1e4))}var d;const u=yield this._resolveInlayHintLabelPartHover(l,i);try{for(var p,m=!0,f=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}(u);!(n=(p=yield f.next()).done);){a=p.value,m=!1;try{const e=a;t.emitOne(e)}finally{m=!0}}}catch(e){o={error:e}}finally{try{m||n||!(s=f.return)||(yield s.call(f))}finally{if(o)throw o.error}}})))):a.Aq.EMPTY}_resolveInlayHintLabelPartHover(e,t){return te(this,void 0,void 0,(function*(){if(!e.part.location)return a.Aq.EMPTY;const{uri:i,range:n}=e.part.location,o=yield this._resolverService.createModelReference(i);try{const i=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,G.R8)(this._languageFeaturesService.hoverProvider,i,new L.L(n.startLineNumber,n.startColumn),t).filter((e=>!(0,q.CP)(e.hover.contents))).map((t=>new Q.hU(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):a.Aq.EMPTY}finally{o.dispose()}}))}};ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ee(1,$.O),ee(2,Z.v4),ee(3,Y.Ui),ee(4,k.S),ee(5,S.p)],ne),(0,n._K)(K.ID,K,1),o.Ae.register(ne)},58722:(e,t,i)=>{"use strict";i.d(t,{K:()=>v,u:()=>_});var n=i(65321),o=i(74741),s=i(71050),r=i(24314),a=i(88216),l=i(60628),c=i(52049),h=i(84144),d=i(94565),u=i(38819),g=i(5606),p=i(72065),m=i(59422),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function _(e,t,i,c){var u;return f(this,void 0,void 0,(function*(){const _=e.get(a.S),v=e.get(g.i),b=e.get(d.H),C=e.get(p.TG),y=e.get(m.lT);if(yield c.item.resolve(s.T.None),!c.part.location)return;const w=c.part.location,S=[],k=new Set(h.BH.getMenuItems(h.eH.EditorContext).map((e=>(0,h.vr)(e)?e.command.id:"")));for(const e of l.SymbolNavigationAction.all())k.has(e.desc.id)&&S.push(new o.aU(e.desc.id,h.U8.label(e.desc,{renderShortTitle:!0}),void 0,!0,(()=>f(this,void 0,void 0,(function*(){const i=yield _.createModelReference(w.uri);try{yield C.invokeFunction(e.run.bind(e),t,new l.SymbolNavigationAnchor(i.object.textEditorModel,r.e.getStartPosition(w.range)))}finally{i.dispose()}})))));if(c.part.command){const{command:e}=c.part;S.push(new o.Z0),S.push(new o.aU(e.id,e.title,void 0,!0,(()=>f(this,void 0,void 0,(function*(){var t;try{yield b.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(e){y.notify({severity:m.zb.Error,source:c.item.provider.displayName,message:e})}})))))}const x=t.getOption(121);v.showContextMenu({domForShadowRoot:x&&null!==(u=t.getDomNode())&&void 0!==u?u:void 0,getAnchor:()=>{const e=n.i(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>S,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function v(e,t,i,n){return f(this,void 0,void 0,(function*(){const o=e.get(a.S),s=yield o.createModelReference(n.uri);yield i.invokeWithinContext((e=>f(this,void 0,void 0,(function*(){const o=t.hasSideBySideModifier,a=e.get(u.i6),h=c.Jy.inPeekEditor.getValue(a),d=!o&&i.getOption(83)&&!h;return new l.DefinitionAction({openToSide:o,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new l.SymbolNavigationAnchor(s.object.textEditorModel,r.e.getStartPosition(n.range)),r.e.lift(n.range))})))),s.dispose()}))}},14865:(e,t,i)=>{"use strict";i.d(t,{Np:()=>o,OW:()=>s,Ou:()=>n});const n="editor.action.inlineSuggest.commit",o="editor.action.inlineSuggest.showPrevious",s="editor.action.inlineSuggest.showNext"},63288:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(66520),s=i(4669),r=i(5976),a=i(97295),l=i(7988),c=i(29102),h=i(14865),d=i(50187),u=i(96887),g=i(35146),p=i(15393),m=i(71050),f=i(17301),_=i(75392),v=i(69317),b=i(69386),C=i(24314),y=i(51381),w=i(35382),S=i(45035),k=i(13883),x=i(61761),L=i(6735);class E{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var N=i(88191),D=i(71922);class T{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const I=[];class A{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1];return function(e,t){const i=new T(e),n=t.map((e=>{const t=C.e.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const t of n)e=e.substring(0,t.startOffset)+t.text+e.substring(t.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}}class M{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class R{constructor(e,t,i,n,o=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=o,this.parts=[new M(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join("\n")}}class O extends r.JT{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(112)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var P=i(2484);function F(e,t){if(!t)return t;const i=e.getValueInRange(t.range),n=a.Mh(i,t.insertText),o=e.getOffsetAt(t.range.getStartPosition())+n,s=e.getPositionAt(o),r=i.substr(n),l=a.P1(r,t.insertText),c=e.getPositionAt(Math.max(o,e.getOffsetAt(t.range.getEndPosition())-l));return{range:C.e.fromPositions(s,c),insertText:t.insertText.substr(n,t.insertText.length-n-l),snippetInfo:t.snippetInfo,filterText:t.filterText,additionalTextEdits:t.additionalTextEdits}}function B(e,t,i,n,o=0){if(e.range.startLineNumber!==e.range.endLineNumber)return;const s=t.getLineContent(e.range.startLineNumber),r=a.V8(s).length;if(e.range.startColumn-1<=r){const t=a.V8(e.insertText).length,i=s.substring(e.range.startColumn-1,r),n=C.e.fromPositions(e.range.getStartPosition().delta(0,i.length),e.range.getEndPosition()),o=e.insertText.startsWith(i)?e.insertText.substring(i.length):e.insertText.substring(t);e={range:n,insertText:o,command:e.command,snippetInfo:void 0,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}const l=t.getValueInRange(e.range),c=function(e,t){if((null==H?void 0:H.originalValue)===e&&(null==H?void 0:H.newValue)===t)return null==H?void 0:H.changes;{let i=V(e,t,!0);if(i){const n=W(i);if(n>0){const o=V(e,t,!1);o&&W(o)<n&&(i=o)}}return H={originalValue:e,newValue:t,changes:i},i}}(l,e.insertText);if(!c)return;const h=e.range.startLineNumber,d=new Array;if("prefix"===i){const e=c.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==l.length)return}const u=e.insertText.length-o;for(const t of c){const o=e.range.startColumn+t.originalStart+t.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===e.range.startLineNumber&&o<n.column)return;if(t.originalLength>0)return;if(0===t.modifiedLength)continue;const s=t.modifiedStart+t.modifiedLength,r=Math.max(t.modifiedStart,Math.min(s,u)),l=e.insertText.substring(t.modifiedStart,r),c=e.insertText.substring(r,Math.max(t.modifiedStart,s));if(l.length>0){const e=a.uq(l);d.push(new M(o,e,!1))}if(c.length>0){const e=a.uq(c);d.push(new M(o,e,!0))}}return new A(h,d,0)}let H;function W(e){let t=0;for(const i of e)t+=i.originalLength;return t}function V(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);n>t&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;r<a;r++)if(i&&"("===e[r]){const e=100*n+t;o[r]=s(2*e),t++}else if(i&&")"===e[r]){t=Math.max(t-1,0);const e=100*n+t;o[r]=s(2*e+1),0===t&&n++}else o[r]=e.charCodeAt(r);return o}const a=r(e),l=r(t);return new P.Hs({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var z=i(89849),U=i(98762),j=i(35084),K=i(94565),q=i(33108),$=function(e,t){return function(i,n){t(i,n,e)}},G=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Q=class extends r.JT{constructor(e,t,i,n,o,a,l){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=o,this.debounceService=a,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new r.XK),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(i.onDidExecuteCommand((t=>{new Set([v.CoreEditingCommands.Tab.id,v.CoreEditingCommands.DeleteLeft.id,v.CoreEditingCommands.DeleteRight.id,h.Ou,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{(3===e.reason||this.session&&!this.session.isValid)&&this.hide()}))),this._register((0,r.OF)((()=>{this.disposed=!0}))),this._register(this.editor.onDidBlurEditorWidget((()=>{l.getValue("editor.inlineSuggest.hideOnBlur")||z.Q.dropDownVisible||this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.disposed||this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(59).enabled&&(this.session&&this.session.isValid||this.trigger(u.bw.Automatic))}trigger(e){this.completionSession.value?e===u.bw.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext():(this.completionSession.value=new Y(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}commitCurrentSuggestionPartially(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletionNextWord()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}};Q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$(2,K.H),$(3,y.c_),$(4,D.p),$(5,N.A),$(6,q.Ui)],Q);class Y extends O{constructor(e,t,i,n,o,s,a,l,c){let h;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=o,this.initialTriggerKind=s,this.languageConfigurationService=a,this.registry=l,this.debounce=c,this.minReservedLineCount=0,this.updateOperation=this._register(new r.XK),this.updateSoon=this._register(new p.pY((()=>{const e=this.initialTriggerKind;return this.initialTriggerKind=u.bw.Automatic,this.update(e)}),50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{var e;const t=this.currentCompletion;if(t&&t.sourceInlineCompletion!==h){h=t.sourceInlineCompletion;const i=t.sourceProvider;null===(e=i.handleItemDidShow)||void 0===e||e.call(i,t.sourceInlineCompletions,h)}}))),this._register((0,r.OF)((()=>{this.cache.clear()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{var t;3!==e.reason&&(null===(t=this.cache.value)||void 0===t||t.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))}))),this._register(this.editor.onDidChangeModelContent((e=>{var t;null===(t=this.cache.value)||void 0===t||t.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()}))),this._register(this.registry.onDidChange((()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}))),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value)return void(this.filteredCompletions=[]);const e=this.editor.getModel(),t=e.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter((i=>{const n=e.getValueInRange(i.synchronizedRange).toLowerCase(),o=i.inlineCompletion.filterText.toLowerCase(),s=e.getLineIndentColumn(i.synchronizedRange.startLineNumber),r=Math.max(0,t.column-i.synchronizedRange.startColumn);let a=o.substring(0,r),l=o.substring(r),c=n.substring(0,r),h=n.substring(r);return i.synchronizedRange.startColumn<=s&&(c=c.trimStart(),0===c.length&&(h=h.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(c)&&(0,_.Sy)(h,l)}))}get currentlySelectedIndex(){return this.fixAndGetIndexOfCurrentSelection()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.filteredCompletions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return G(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){return G(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+e.length-1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}get hasBeenTriggeredExplicitly(){var e;return(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)===u.bw.Explicit}ensureUpdateWithExplicitContext(){var e;return G(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===u.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(u.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==u.bw.Explicit&&(yield this.update(u.bw.Explicit))}))}getInlineCompletionsCountSync(){return this.filteredCompletions.length||0}get ghostText(){const e=this.currentCompletion;if(!e)return;const t=this.editor.getPosition();if(e.range.getEndPosition().isBefore(t))return;const i=this.editor.getOptions().get(59).mode,n=B(e,this.editor.getModel(),i,t);if(n){if(n.isEmpty())return;return n}return new R(e.range.startLineNumber,e.range.startColumn,e.range.endColumn-e.range.startColumn,e.insertText.split("\n"),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return G(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=(0,p.PG)((n=>G(this,void 0,void 0,(function*(){let o;try{o=yield ee(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},n,this.languageConfigurationService);const s=new Date;this.debounce.update(this.editor.getModel(),s.getTime()-i.getTime())}catch(e){return void(0,f.dL)(e)}n.isCancellationRequested||(this.cache.setValue(this.editor,o,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})))),o=new Z(n,e);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletionNextWord(){const e=this.ghostText;if(!e)return;const t=this.currentCompletion;if(!t)return;if(t.snippetInfo||t.filterText!==t.insertText)return void this.commit(t);if(0===e.parts.length)return;const i=e.parts[0],n=new d.L(e.lineNumber,i.column),o=i.lines[0],s=this.editor.getModel().getLanguageIdAtPosition(e.lineNumber,1),r=this.languageConfigurationService.getLanguageConfiguration(s),a=new RegExp(r.wordDefinition,r.wordDefinition.flags.replace("g","")),l=o.match(a);let c=0;c=l&&void 0!==l.index?0===l.index?l[0].length:l.index:o.length;const h=o.substring(0,c);if(this.editor.pushUndoStop(),this.editor.executeEdits("inlineSuggestion.accept",[b.h.replace(C.e.fromPositions(n),h)]),this.editor.setPosition(n.delta(0,h.length)),t.sourceProvider.handlePartialAccept){const e=C.e.fromPositions(t.range.getStartPosition(),n.delta(0,c)),i=this.editor.getModel().getValueInRange(e);t.sourceProvider.handlePartialAccept(t.sourceInlineCompletions,t.sourceInlineCompletion,i.length)}}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){var t;const i=this.cache.clearAndLeak();this.editor.pushUndoStop(),e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[b.h.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),null===(t=U.SnippetController2.get(this.editor))||void 0===t||t.insert(e.snippetInfo.snippet,{undoStopBefore:!1})):this.editor.executeEdits("inlineSuggestion.accept",[b.h.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==i||i.dispose()})).then(void 0,f.Cp):null==i||i.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set((null===(e=this.cache.value)||void 0===e?void 0:e.completions.map((e=>e.inlineCompletion.sourceInlineCompletions)))||[])].flatMap((e=>e.commands||[]))}}class Z{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class X extends r.JT{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const o=t.changeDecorations((t=>t.deltaDecorations([],e.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))))));this._register((0,r.OF)((()=>{this.isDisposing=!0,t.removeDecorations(o)}))),this.completions=e.items.map(((e,t)=>new J(e,o[t]))),this._register(t.onDidChangeModelContent((()=>{this.updateRanges()}))),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const n=t.getDecorationRange(i.decorationId);n?i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n):(0,f.dL)(new Error("Decoration has no range"))}e&&this.onChange()}}class J{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function ee(e,t,i,n,o=m.T.None,s){return G(this,void 0,void 0,(function*(){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new C.e(e.lineNumber,i.startColumn,e.lineNumber,n):C.e.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=yield Promise.all(a.map((e=>G(this,void 0,void 0,(function*(){const s=yield Promise.resolve(e.provideInlineCompletions(i,t,n,o)).catch(f.Cp);return{completions:s,provider:e,dispose:()=>{s&&e.freeInlineCompletions(s)}}}))))),c=new Map;for(const e of l){const t=e.completions;if(t)for(const n of t.items){let o,a,l=n.range?C.e.lift(n.range):r;if(l.startLineNumber!==l.endLineNumber)continue;if("string"==typeof n.insertText){if(o=n.insertText,s&&n.completeBracketPairs){o=te(o,l.getStartPosition(),i,s);const e=o.length-n.insertText.length;0!==e&&(l=new C.e(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+e))}a=void 0}else if("snippet"in n.insertText){const e=n.insertText.snippet.length;if(s&&n.completeBracketPairs){n.insertText.snippet=te(n.insertText.snippet,l.getStartPosition(),i,s);const t=n.insertText.snippet.length-e;0!==t&&(l=new C.e(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+t))}const t=(new j.Yj).parse(n.insertText.snippet);1===t.children.length&&t.children[0]instanceof j.xv?(o=t.children[0].value,a=void 0):(o=t.toString(),a={snippet:n.insertText.snippet,range:l})}else(0,g.vE)(n.insertText);const h={insertText:o,snippetInfo:a,range:l,command:n.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:n,filterText:n.filterText||o,additionalTextEdits:n.additionalTextEdits||I};c.set(JSON.stringify({insertText:o,range:n.range}),h)}}return{items:[...c.values()],dispose:()=>{for(const e of l)e.dispose()}}}))}function te(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,s=i.tokenization.tokenizeLineWithEdit(t,o.length-(t.column-1),e),r=null==s?void 0:s.sliceAndInflate(t.column-1,o.length,0);if(!r)return e;const a=function(e,t){const i=new x.FE,n=new w.Z(i,(e=>t.getLanguageConfiguration(e))),o=new L.xH(new E([e]),n),s=(0,k.w)(o,[],void 0,!0);let r="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,S.Ii)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,S.Ii)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,S.Ii)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);r+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)r+=a.substring((0,S.F_)(i),(0,S.F_)((0,S.Ii)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,S.Ii)(i,n.length)}(s,S.xl),r}(r,n);return a}var ie=i(9488),ne=i(29561),oe=i(24804);class se extends r.JT{get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const i=oe.SuggestController.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(e,t,n)=>{const o=this.editor.getModel(),s=F(o,this.suggestControllerPreselector());if(!s)return-1;const r=d.L.lift(t),a=n.map(((e,t)=>{const n=re(i,r,e,this.isShiftKeyPressed),a=F(o,null==n?void 0:n.normalizedInlineCompletion);var l,c;if(a)return{index:t,valid:(l=s.range,(c=a.range).startLineNumber===l.startLineNumber&&c.startColumn===l.startColumn&&(c.endLineNumber<l.endLineNumber||c.endLineNumber===l.endLineNumber&&c.endColumn<=l.endColumn)&&s.insertText.startsWith(a.insertText)),prefixLength:a.insertText.length,suggestItem:e}})).filter((e=>e&&e.valid)),l=(0,ie.Dc)(a,(0,ie.tT)((e=>e.prefixLength),ie.fv));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(i.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(i.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(i.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(s.ju.once(i.model.onDidTrigger)((e=>{t()})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();let i=!1;var n,o;(n=this._currentSuggestItemInfo)===(o=t)||!(!n||!o)&&n.completionItemKind===o.completionItemKind&&n.isSnippetText===o.isSnippetText&&function(e,t){return e===t||!(!e||!t)&&e.range.equalsRange(t.range)&&e.insertText===t.insertText&&e.command===t.command}(n.normalizedInlineCompletion,o.normalizedInlineCompletion)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=oe.SuggestController.get(this.editor);if(!e)return;if(!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();return t?re(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=oe.SuggestController.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=oe.SuggestController.get(this.editor);null==e||e.forceRenderingAbove()}}function re(e,t,i,n){if(Array.isArray(i.completion.additionalTextEdits)&&i.completion.additionalTextEdits.length>0)return{completionItemKind:i.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:C.e.fromPositions(t,t),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:o}=i.completion,s=!1;if(4&i.completion.insertTextRules){const i=(new j.Yj).parse(o),n=e.editor.getModel();if(i.children.length>100)return;ne.l.adjustWhitespace(n,t,!0,i),o=i.toString(),s=!0}const r=e.getOverwriteInfo(i,n);return{isSnippetText:s,completionItemKind:i.completion.kind,normalizedInlineCompletion:{insertText:o,filterText:o,range:C.e.fromPositions(t.delta(0,-r.overwriteBefore),t.delta(0,Math.max(r.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}var ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let le=class extends O{get isActive(){return void 0!==this.suggestionInlineCompletionSource.state}constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new se(this.editor,(()=>{var e,t,i;return null===(e=this.cache.value)||void 0===e||e.updateRanges(),null===(i=null===(t=this.cache.value)||void 0===t?void 0:t.completions[0])||void 0===i?void 0:i.toLiveInlineCompletion()}))),this.updateOperation=this._register(new r.XK),this.updateCacheSoon=this._register(new p.pY((()=>this.updateCache()),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange((()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const e=this.ghostText;e&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,e.parts.map((e=>e.lines.length-1)).reduce(((e,t)=>e+t),0))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()}))),this._register(this.cache.onDidChange((()=>{this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()}))),this._register((0,r.OF)((()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove())))}isSuggestionPreviewEnabled(){return this.editor.getOption(112).preview}updateCache(){return ae(this,void 0,void 0,(function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.insertText,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition();if(e.selectedItem.isSnippetText||27===e.selectedItem.completionItemKind||20===e.selectedItem.completionItemKind||23===e.selectedItem.completionItemKind)return void this.cache.clear();const n=(0,p.PG)((e=>ae(this,void 0,void 0,(function*(){let n;try{n=yield ee(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:u.bw.Automatic,selectedSuggestionInfo:t},e)}catch(e){return void(0,f.dL)(e)}e.isCancellationRequested?n.dispose():(this.cache.setValue(this.editor,n,u.bw.Automatic),this.onDidChangeEmitter.fire())})))),o=new Z(n,u.bw.Automatic);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),o=this.editor.getModel(),s=F(o,null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()),r=this.suggestionInlineCompletionSource.state,a=F(o,null===(i=null==r?void 0:r.selectedItem)||void 0===i?void 0:i.normalizedInlineCompletion),l=s&&a&&s.insertText.startsWith(a.insertText)&&(c=s.range,h=a.range,c.startLineNumber===h.startLineNumber&&c.startColumn===h.startColumn&&(c.endLineNumber===h.endLineNumber&&c.endColumn>=h.endColumn||c.endLineNumber>h.endLineNumber));var c,h;if(!n&&!l)return;const d=l?s:a||s,u=l?d.insertText.length-a.insertText.length:0;return this.toGhostText(d,u)}toGhostText(e,t){const i=this.editor.getOptions().get(112).previewMode;return e?B(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new A(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};var ce,he;le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(ce=2,he=D.p,function(e,t){he(e,t,ce)})],le);var de=i(72065);class ue extends r.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new r.XK)}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t,i,n;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?(i=e,n=e.onDidChange((()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})),{object:i,dispose:()=>null==n?void 0:n.dispose()}):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let ge=class extends ue{get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new pe),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(le,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(Q,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel()}))),this.updateModel()}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&i.parts.some((t=>e.containsPosition(new d.L(i.lineNumber,t.column))))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger(u.bw.Explicit)}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}commitInlineCompletionPartially(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestionPartially()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}};ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,de.TG)],ge);class pe extends r.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new r.XK)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new X(t,e,(()=>this.onDidChangeEmitter.fire()),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var me,fe=i(65321),_e=i(52136),ve=i(64141),be=i(77378),Ce=i(50072),ye=i(84973),we=i(72042),Se=i(92550),ke=i(91557),xe=function(e,t){return function(i,n){t(i,n,e)}};const Le=null===(me=window.trustedTypes)||void 0===me?void 0:me.createPolicy("editorGhostText",{createHTML:e=>e});let Ee=class extends r.JT{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(De,this.editor)),this.additionalLinesWidget=this._register(new Te(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new Ne(this.editor)),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(30)||e.hasChanged(111)||e.hasChanged(93)||e.hasChanged(88)||e.hasChanged(48)||e.hasChanged(47)||e.hasChanged(63))&&this.update()}))),this._register((0,r.OF)((()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}))),this._register(t.onDidChange((()=>{this.update()}))),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),this.additionalLinesWidget.clear(),void this.replacementDecoration.clear();const i=new Array,n=new Array;function o(e,t){if(n.length>0){const i=n[n.length-1];t&&i.decorations.push(new Se.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)n.push({content:i,decorations:t?[new Se.Kp(1,i.length+1,t,0)]:[]})}t instanceof R?this.replacementDecoration.setDecorations([{range:new C.e(t.lineNumber,t.columnStart,t.lineNumber,t.columnStart+t.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const s=this.editor.getModel().getLineContent(t.lineNumber);let r,a=0;for(const e of t.parts){let t=e.lines;void 0===r?(i.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):o([s.substring(a,e.column-1)],void 0),t.length>0&&(o(t,"ghost-text"),void 0===r&&e.column<=s.length&&(r=e.column)),a=e.column-1}void 0!==r&&o([s.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,i,void 0!==r?{column:r,length:s.length+1-r}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}renderViewMoreLines(e,t,i){const n=this.editor.getOption(47),o=document.createElement("div");o.className="suggest-preview-additional-widget",(0,_e.N)(o,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),o.append(s);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("⏎ "),o.append(a);const l=new r.SL,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines…`),l.add(fe.mu(c,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),o.append(c),new Ie(this.editor,e,o,l)}};Ee=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([xe(2,de.TG),xe(3,we.O)],Ee);class Ne{constructor(e){this.editor=e,this.decorationIds=[]}setDecorations(e){this.editor.changeDecorations((t=>{this.decorationIds=t.deltaDecorations(this.decorationIds,e)}))}clear(){this.setDecorations([])}dispose(){this.clear()}}class De{constructor(e){this.editor=e,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations((e=>{this.decorationIds=e.deltaDecorations(this.decorationIds,[])}))}setParts(e,t,i){if(!this.editor.getModel())return;const n=new Array;i&&n.push({range:C.e.fromPositions(new d.L(e,i.column),new d.L(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations((i=>{this.decorationIds=i.deltaDecorations(this.decorationIds,t.map((t=>({range:C.e.fromPositions(new d.L(e,t.column)),options:{description:"ghost-text",after:{content:t.text,inlineClassName:t.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:ye.RM.Left},showIfCollapsed:!0}}))).concat(n))}))}}class Te{get viewZoneId(){return this._viewZoneId}constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}dispose(){this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(30),r=n.get(111),l=n.get(88),c=n.get(48),h=n.get(47),d=n.get(63),u=new Ce.HT(1e4);u.appendString('<div class="suggest-preview-text">');for(let e=0,n=i.length;e<n;e++){const n=i[e],g=n.content;u.appendString('<div class="view-line'),u.appendString('" style="top:'),u.appendString(String(e*d)),u.appendString('px;width:1000000px;">');const p=a.$i(g),m=a.Ut(g),f=be.A.createEmpty(g,o);(0,ke.d1)(new ke.IJ(h.isMonospace&&!s,h.canUseHalfwidthRightwardsArrow,g,!1,p,m,0,f,n.decorations,t,0,h.spaceWidth,h.middotWidth,h.wsmiddotWidth,r,"none",l,c!==ve.n0.OFF,null),u),u.appendString("</div>")}u.appendString("</div>"),(0,_e.N)(e,h);const g=u.build(),p=Le?Le.createHTML(g):g;e.innerHTML=p}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}class Ie extends r.JT{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,r.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}var Ae=i(63580),Me=i(84144),Re=i(38819),Oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Pe=function(e,t){return function(i,n){t(i,n,e)}},Fe=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Be=class e extends r.JT{static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}constructor(t,i,n){super(),this.editor=t,this.instantiationService=i,this.contextKeyService=n,this.triggeredExplicitly=!1,this.activeController=this._register(new r.XK),this.activeModelDidChangeEmitter=this._register(new s.Q5),this.firstUndoableVersionId=void 0,this.alwaysShowInlineSuggestionToolbar=e.alwaysShowInlineSuggestionToolbar.bindTo(this.contextKeyService),this._register(this.editor.onDidChangeModelContent((e=>{var t;(!e.isUndoing||this.firstUndoableVersionId&&this.editor.getModel().getAlternativeVersionId()<this.firstUndoableVersionId)&&(null===(t=this.activeController.value)||void 0===t||t.contextKeys.canUndoInlineSuggestion.reset(),this.firstUndoableVersionId=void 0)}))),this._register(this.editor.onDidChangeCursorPosition((e=>{var t;3===e.reason&&(null===(t=this.activeController.value)||void 0===t||t.contextKeys.canUndoInlineSuggestion.reset(),this.firstUndoableVersionId=void 0)}))),this._register(this.editor.onDidChangeModel((()=>{this.update()}))),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(112)||e.hasChanged(59))&&this.update()}))),this.update()}update(){const e=this.editor.getOption(112),t=this.editor.getOption(59);this.alwaysShowInlineSuggestionToolbar.set("always"===t.showToolbar);const i=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly);i!==!!this.activeController.value&&(this.activeController.value=void 0,this.activeController.value=i?this.instantiationService.createInstance(We,this.editor):void 0,this.activeModelDidChangeEmitter.fire())}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return(null===(i=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===i?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.update(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commitPartially(){var e,t,i;const n=this.firstUndoableVersionId;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletionPartially(),null===(i=null===(t=this.activeController)||void 0===t?void 0:t.value)||void 0===i||i.contextKeys.canUndoInlineSuggestion.set(!0),this.firstUndoableVersionId=null!=n?n:this.editor.getModel().getAlternativeVersionId()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}};Be.inlineSuggestionVisible=new Re.uy("inlineSuggestionVisible",!1,Ae.NC("inlineSuggestionVisible","Whether an inline suggestion is visible")),Be.inlineSuggestionHasIndentation=new Re.uy("inlineSuggestionHasIndentation",!1,Ae.NC("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),Be.inlineSuggestionHasIndentationLessThanTabSize=new Re.uy("inlineSuggestionHasIndentationLessThanTabSize",!0,Ae.NC("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),Be.canUndoInlineSuggestion=new Re.uy("canUndoInlineSuggestion",!1,Ae.NC("canUndoInlineSuggestion","Whether undo would undo an inline suggestion")),Be.alwaysShowInlineSuggestionToolbar=new Re.uy("alwaysShowInlineSuggestionToolbar",!1,Ae.NC("alwaysShowInlineSuggestionToolbar","Whether the inline suggestion toolbar should always be visible")),Be.ID="editor.contrib.ghostTextController",Be=Oe([Pe(1,de.TG),Pe(2,Re.i6)],Be);class He{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=Be.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Be.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Be.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.canUndoInlineSuggestion=Be.canUndoInlineSuggestion.bindTo(this.contextKeyService)}}let We=class extends r.JT{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new He(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(ge,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Ee,this.editor,this.model)),this._register((0,r.OF)((()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)}))),this._register(this.model.onDidChange((()=>{this.updateContextKeys()}))),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:e,lines:o}=n.parts[0],s=o[0];if(e<=this.editor.getModel().getLineIndentColumn(n.lineNumber)){let e=(0,a.LC)(s);-1===e&&(e=s.length-1),t=e>0;const n=this.editor.getModel().getOptions().tabSize;i=l.i.visibleColumnFromColumn(s,e+1,n)<n}}this.contextKeys.inlineCompletionSuggestsIndentation.set(t),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(i)}};We=Oe([Pe(1,de.TG),Pe(2,Re.i6)],We);class Ve extends n.R6{constructor(){super({id:Ve.ID,label:Ae.NC("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Re.Ao.and(c.u.writable,Be.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}Ve.ID=h.OW;class ze extends n.R6{constructor(){super({id:ze.ID,label:Ae.NC("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Re.Ao.and(c.u.writable,Be.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}ze.ID=h.Np;class Ue extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Ae.NC("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:c.u.writable})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);null==e||e.trigger()}))}}class je extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:Ae.NC("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Re.Ao.and(c.u.writable,Be.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065},menuOpts:[{menuId:Me.eH.InlineSuggestionToolbar,title:Ae.NC("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);e&&e.commitPartially()}))}}class Ke extends n.R6{constructor(){super({id:h.Ou,label:Ae.NC("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Be.inlineSuggestionVisible,menuOpts:[{menuId:Me.eH.InlineSuggestionToolbar,title:Ae.NC("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Re.Ao.and(Be.inlineSuggestionVisible,c.u.tabMovesFocus.toNegated(),Be.inlineSuggestionHasIndentationLessThanTabSize)}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);e&&(e.commit(),e.editor.focus())}))}}class qe extends n.R6{constructor(){super({id:qe.ID,label:Ae.NC("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Be.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=Be.get(t);e&&e.hide()}))}}qe.ID="editor.action.inlineSuggest.hide";class $e extends Me.Ke{constructor(){super({id:$e.ID,title:Ae.NC("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Me.eH.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Be.alwaysShowInlineSuggestionToolbar})}run(e,t){return Fe(this,void 0,void 0,(function*(){const t=e.get(q.Ui),i="always"===t.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",i)}))}}$e.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";class Ge extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.undo",label:Ae.NC("action.inlineSuggest.undo","Undo Accept Word"),alias:"Undo Accept Word",precondition:Re.Ao.and(c.u.writable,Be.canUndoInlineSuggestion),kbOpts:{weight:101,primary:2063,kbExpr:Re.Ao.and(c.u.writable,Be.canUndoInlineSuggestion)},menuOpts:[{menuId:Me.eH.InlineSuggestionToolbar,title:Ae.NC("undoAcceptWord","Undo Accept Word"),group:"secondary",order:3}]})}run(e,t){var i;return Fe(this,void 0,void 0,(function*(){null===(i=t.getModel())||void 0===i||i.undo()}))}}var Qe=i(59365),Ye=i(45241),Ze=i(31106),Xe=i(50988),Je=i(10829),et=function(e,t){return function(i,n){t(i,n,e)}};class tt{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}requestExplicitContext(){var e,t,i;null===(i=null===(t=null===(e=this.controller.activeModel)||void 0===e?void 0:e.activeInlineCompletionsModel)||void 0===t?void 0:t.completionSession.value)||void 0===i||i.ensureUpdateWithExplicitContext()}getInlineCompletionsCount(){var e,t;const i=null===(t=null===(e=this.controller.activeModel)||void 0===e?void 0:e.activeInlineCompletionsModel)||void 0===t?void 0:t.completionSession.value;if(null==i?void 0:i.hasBeenTriggeredExplicitly)return null==i?void 0:i.getInlineCompletionsCountSync()}getInlineCompletionIndex(){var e,t,i;return null===(i=null===(t=null===(e=this.controller.activeModel)||void 0===e?void 0:e.activeInlineCompletionsModel)||void 0===t?void 0:t.completionSession.value)||void 0===i?void 0:i.currentlySelectedIndex}onDidChange(e){var t,i;return(null===(i=null===(t=this.controller.activeModel)||void 0===t?void 0:t.activeInlineCompletionsModel)||void 0===i?void 0:i.onDidChange(e))||r.JT.None}get commands(){var e,t,i;return(null===(i=null===(t=null===(e=this.controller.activeModel)||void 0===e?void 0:e.activeInlineCompletionsModel)||void 0===t?void 0:t.completionSession.value)||void 0===i?void 0:i.commands)||[]}}let it=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=Be.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new o.YM(1e3,this,C.e.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new o.YM(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("always"===this._editor.getOption(59).showToolbar)return[];const i=Be.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new tt(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new r.SL,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const o=this._instantiationService.createInstance(z.Q,this._editor,!1);return e.fragment.appendChild(o.getDomNode()),o.update(null,n.getInlineCompletionIndex()||0,n.getInlineCompletionsCount(),n.commands),n.requestExplicitContext(),i.add(n.onDidChange((()=>{o.update(null,n.getInlineCompletionIndex()||0,n.getInlineCompletionsCount(),n.commands)}))),i}renderScreenReaderText(e,t,i){var n,o;const s=fe.$,r=s("div.hover-row.markdown-hover"),a=fe.R3(r,s("div.hover-contents")),l=i.add(new Ye.$({editor:this._editor},this._languageService,this._openerService)),c=null===(o=null===(n=t.controller.activeModel)||void 0===n?void 0:n.inlineCompletionsModel)||void 0===o?void 0:o.ghostText;if(c){const t=this._editor.getModel().getLineContent(c.lineNumber);(t=>{i.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Ae.NC("inlineSuggestionFollows","Suggestion:"),o=i.add(l.render((new Qe.W5).appendText(n).appendCodeblock("text",t)));a.replaceChildren(o.element)})(c.renderForScreenReader(t))}e.fragment.appendChild(r)}};it=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([et(1,we.O),et(2,Xe.v4),et(3,Ze.F),et(4,de.TG),et(5,Je.b)],it),(0,n._K)(Be.ID,Be,3),(0,n.Qr)(Ue),(0,n.Qr)(Ve),(0,n.Qr)(ze),(0,n.Qr)(je),(0,n.Qr)(Ke),(0,n.Qr)(qe),(0,n.Qr)(Ge),(0,Me.r1)($e),o.Ae.register(it)},89849:(e,t,i)=>{"use strict";i.d(t,{Q:()=>O});var n=i(65321),o=i(90317),s=i(55496),r=i(74741),a=i(15393),l=i(73046),c=i(5976),h=i(1432),d=i(25670),u=i(14865),g=i(63580),p=i(22444),m=i(61364),f=i(4669),_=i(98401);class v extends c.JT{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new f.z5),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new c.SL,this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new b((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new o.o(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,actionViewItemProvider:(e,n)=>{var o;if(e.id===b.ID)return this.toggleMenuActionViewItem=new m.C(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:d.k.asClassNameArray(null!==(o=i.moreIcon)&&void 0!==o?o:l.l.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof r.wY){const i=new m.C(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i;const n=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return(0,_.f6)(null==n?void 0:n.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class b extends r.aU{constructor(e,t){t=t||g.NC("moreActions","More Actions..."),super(b.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return e=this,t=void 0,n=function*(){this.toggleDropdownMenu()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}b.ID="toolbar.toggle.more";var C=i(9488),y=i(84144),w=i(38819),S=i(5606),k=i(91847),x=i(10829),L=function(e,t){return function(i,n){t(i,n,e)}};let E=class extends v{constructor(e,t,i,n,o,s,r){super(e,o,Object.assign(Object.assign({getKeyBinding:e=>{var t;return null!==(t=s.lookupKeybinding(e.id))&&void 0!==t?t:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._sessionDisposables=this._store.add(new c.SL),(null==t?void 0:t.telemetrySource)&&this._store.add(this.actionBar.onDidRun((e=>r.publicLog2("workbenchActionExecuted",{id:e.action.id,from:t.telemetrySource}))))}setActions(e,t=[],i){var o,s,a;this._sessionDisposables.clear();const l=e.slice(),c=t.slice(),h=[];let d=0;const u=[];let p=!1;if(-1!==(null===(o=this._options)||void 0===o?void 0:o.hiddenItemStrategy))for(let e=0;e<l.length;e++){const t=l[e];(t instanceof y.U8||t instanceof y.NZ)&&t.hideActions&&(h.push(t.hideActions.toggle),t.hideActions.toggle.checked&&d++,t.hideActions.isHidden&&(p=!0,l[e]=void 0,0!==(null===(s=this._options)||void 0===s?void 0:s.hiddenItemStrategy)&&(u[e]=t)))}if(void 0!==(null===(a=this._options)||void 0===a?void 0:a.maxNumberOfItems)){let e=0;for(let t=0;t<l.length;t++){const i=l[t];i&&++e>=this._options.maxNumberOfItems&&(l[t]=void 0,u[t]=i)}}(0,C.Rs)(l),(0,C.Rs)(u),super.setActions(l,r.Z0.join(u,c)),h.length>0&&this._sessionDisposables.add((0,n.nm)(this.getElement(),"contextmenu",(e=>{var t,n,o,s;const a=this.getItemAction(e.target);if(!a)return;e.preventDefault(),e.stopPropagation();let l,c=!1;if(1===d&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){c=!0;for(let e=0;e<h.length;e++)if(h[e].checked){h[e]=(0,r.xw)({id:a.id,label:a.label,checked:!0,enabled:!1,run(){}});break}}if(!c&&(a instanceof y.U8||a instanceof y.NZ)){if(!a.hideActions)return;l=a.hideActions.hide}else l=(0,r.xw)({id:"label",label:(0,g.NC)("hide","Hide"),enabled:!1,run(){}});const u=r.Z0.join([l],h);(null===(n=this._options)||void 0===n?void 0:n.resetMenu)&&!i&&(i=[this._options.resetMenu]),p&&i&&(u.push(new r.Z0),u.push((0,r.xw)({id:"resetThisMenu",label:(0,g.NC)("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>e,getActions:()=>u,menuId:null===(o=this._options)||void 0===o?void 0:o.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},null===(s=this._options)||void 0===s?void 0:s.menuOptions),contextKeyService:this._contextKeyService})})))}};E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([L(2,y.co),L(3,w.i6),L(4,S.i),L(5,k.d),L(6,x.b)],E);var N=i(94565),D=i(72065),T=i(59554),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const M=(0,T.q5)("inline-suggestion-hints-next",l.l.chevronRight,(0,g.NC)("parameterHintsNextIcon","Icon for show next parameter hint.")),R=(0,T.q5)("inline-suggestion-hints-previous",l.l.chevronLeft,(0,g.NC)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let O=class e extends c.JT{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new r.aU(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=(0,g.NC)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(t,i,s,l,c,h,p){super(),this.editor=t,this.withBorder=i,this._commandService=s,this.keybindingService=c,this._contextKeyService=h,this._menuService=p,this.id="InlineSuggestionHintsContentWidget"+e.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,n.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,n.h)("div",{style:{display:"flex"}},[(0,n.h)("div@actionBar",{className:"custom-actions"}),(0,n.h)("div@toolBar")])]),this.position=null,this.previousAction=this.createCommandAction(u.Np,(0,g.NC)("previous","Previous"),d.k.asClassName(R)),this.availableSuggestionCountAction=new r.aU("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(u.OW,(0,g.NC)("next","Next"),d.k.asClassName(M)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(y.eH.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new a.pY((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new a.pY((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100));const m=this._register(new o.o(this.nodes.actionBar));m.push(this.previousAction,{icon:!0,label:!1}),m.push(this.availableSuggestionCountAction),m.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(F,this.nodes.toolBar,y.eH.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>e instanceof y.U8?l.createInstance(P,e,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((t=>{e._dropDownVisible=t})))}update(e,t,i,n){this.position=e,void 0!==i&&i>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule(),void 0!==i?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${t+1}/${i}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),this.editor.layoutContentWidget(this);const o=n.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,t]of this.inlineCompletionsActionsMenus.getActions())for(const e of t)e instanceof y.U8&&o.push(e);o.length>0&&o.unshift(new r.Z0),this.toolBar.setAdditionalSecondaryActions(o)}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this.position,preference:[1,2],positionAffinity:3}}};O._dropDownVisible=!1,O.id=0,O=I([A(2,N.H),A(3,D.TG),A(4,k.d),A(5,w.i6),A(6,y.co)],O);class P extends p.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,n.h)("div.keybinding").root;new s.e(t,h.OS,{disableTitle:!0}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let F=class extends E{constructor(e,t,i,n,o,s,r,a){super(e,Object.assign({resetMenu:t},i),n,o,s,r,a),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];(0,p.vr)(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),this.setActions(a,l)}setAdditionalSecondaryActions(e){this.additionalActions=e,this.updateToolbar()}};F=I([A(3,y.co),A(4,w.i6),A(5,S.i),A(6,k.d),A(7,x.b)],F)},97615:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ExpandLineSelectionAction:()=>a});var n=i(16830),o=i(28108),s=i(29102),r=i(63580);class a extends n.R6{constructor(){super({id:"expandLineSelection",label:r.NC("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.u.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.P.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}(0,n.Qr)(a)},65766:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AbstractCaseAction:()=>$,AbstractDeleteAllToBoundaryAction:()=>z,AbstractSortLinesAction:()=>A,CamelCaseAction:()=>J,DeleteAllLeftAction:()=>U,DeleteAllRightAction:()=>j,DeleteDuplicateLinesAction:()=>O,DeleteLinesAction:()=>F,DuplicateSelectionAction:()=>T,IndentLinesAction:()=>B,InsertLineAfterAction:()=>V,InsertLineBeforeAction:()=>W,JoinLinesAction:()=>K,KebabCaseAction:()=>ee,LowerCaseAction:()=>Q,SnakeCaseAction:()=>X,SortLinesAscendingAction:()=>M,SortLinesDescendingAction:()=>R,TitleCaseAction:()=>Z,TransposeAction:()=>q,TrimTrailingWhitespaceAction:()=>P,UpperCaseAction:()=>G});var n=i(22258),o=i(69317),s=i(16830),r=i(61329),a=i(97295),l=i(69386),c=i(24314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const i=[];let n=0,o=0;const s=t.length;for(let r=1,h=e.getLineCount();r<=h;r++){const h=e.getLineContent(r),d=h.length+1;let u=0;if(o<s&&t[o].lineNumber===r&&(u=t[o].column,o++,u===d))continue;if(0===h.length)continue;const g=a.ow(h);let p=0;if(-1===g)p=1;else{if(g===h.length-1)continue;p=g+2}p=Math.max(u,p),i[n++]=l.h.delete(new c.e(r,p,r,d))}return i}(e,this._cursors);for(let e=0,n=i.length;e<n;e++){const n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var d=i(51336),u=i(50187),g=i(3860),p=i(29102);class m{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));const o=n.join("\n");""===o&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new c.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new c.e(i.startLineNumber,1,i.startLineNumber,1),o+"\n"):t.addEditOperation(new c.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,o=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,o=1),i=g.Y.createWithDirection(e,t,n,o,this._selectionDirection)}return i}}var f=i(10291),_=i(49119),v=i(51381),b=i(18279),C=i(75383),y=i(1615);let w=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&1===n.endColumn&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:s,insertSpaces:r}=e.getOptions(),l=this.buildIndentConverter(o,s,r),h={tokenization:{getLineTokens:t=>e.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new c.e(1,1,1,1),null):(t.addEditOperation(new c.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new c.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new g.Y(o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new c.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let d=s;if(this.shouldAutoIndent(e,n)){const u=this.matchEnterRule(e,l,o,i,n.startLineNumber-1);if(null!==u){const t=a.V8(e.getLineContent(i)),n=u+b.Y(t,o),l=b.J(n,o,r);d=l+this.trimLeft(s)}else{h.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber,l,this._languageConfigurationService);if(null!==t){const n=a.V8(e.getLineContent(i)),l=b.Y(t,o);if(l!==b.Y(n,o)){const e=b.J(l,o,r);d=e+this.trimLeft(s)}}}t.addEditOperation(new c.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n");const g=this.matchEnterRuleMovingDown(e,l,o,n.startLineNumber,i,d);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,g);else{h.getLineContent=t=>t===n.startLineNumber?d:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const s=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),c=b.Y(i,o);if(l!==c){const i=l-c;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new c.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new c.e(i,1,i+1,1),null),t.addEditOperation(new c.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){h.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const s=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{const s=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(n.startLineNumber,1),i,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),c=b.Y(i,o);if(l!==c){const i=l-c;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>f.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>f.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===_.wU.None||o.indentAction===_.wU.Indent?s=o.indentation+o.appendText:o.indentAction===_.wU.IndentOutdent?s=o.indentation:o.indentAction===_.wU.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimLeft(r).indexOf(this.trimLeft(s))>=0){const o=a.V8(e.getLineContent(n));let r=a.V8(s);const l=(0,C.tI)(e,n,this._languageConfigurationService);return null!==l&&2&l&&(r=t.unshiftIndent(r)),b.Y(r,i)-b.Y(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(a.ow(s)>=0){const s=e.getLineMaxColumn(o),r=(0,y.A)(this._autoIndent,e,new c.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1;){const t=e.getLineContent(o);if(a.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,y.A)(this._autoIndent,e,new c.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;if(t=r===o&&void 0!==s?s:e.getLineContent(r),a.ow(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),h=(0,y.A)(this._autoIndent,e,new c.e(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,h)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),h=a.V8(l),d=b.Y(h,n)+s,u=b.J(d,n,o);u!==h&&(t.addEditOperation(new c.e(r,1,r,h.length+1),u),r===i.endLineNumber&&i.endColumn<=h.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};var S,k;w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(S=3,k=v.c_,function(e,t){k(e,t,S)})],w);class x{static getCollator(){return x._COLLATOR||(x._COLLATOR=new Intl.Collator),x._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=L(e,t,i);return n?l.h.replace(new c.e(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=L(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function L(e,t,i){const n=t.startLineNumber;let o=t.endLineNumber;if(1===t.endColumn&&o--,n>=o)return null;const s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(x.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}x._COLLATOR=null;var E=i(63580),N=i(84144);class D extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;e<i.length;e++){const t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}const o=[];for(const e of i)o.push(new m(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class T extends s.R6{constructor(){super({id:"editor.action.duplicateSelection",label:E.NC("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:p.u.writable,menuOpts:{menuId:N.eH.MenubarSelectionMenu,group:"2_line",title:E.NC({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const e of o)if(e.isEmpty())n.push(new m(e,!0));else{const t=new g.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new r.OY(t,s.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class I extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(v.c_),n=[],o=t.getSelections()||[],s=t.getOption(9);for(const e of o)n.push(new w(e,this.down,s,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class A extends s.R6{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const e of i)if(!x.canRun(t.getModel(),e,this.descending))return;const n=[];for(let e=0,t=i.length;e<t;e++)n[e]=new x(i[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class M extends A{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:E.NC("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:p.u.writable})}}class R extends A{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:E.NC("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:p.u.writable})}}class O extends s.R6{constructor(){super({id:"editor.action.removeDuplicateLines",label:E.NC("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:p.u.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],o=[];let s=0;for(const e of t.getSelections()){const t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}const a=new g.Y(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),c=e.startLineNumber-s,h=new g.Y(c,1,c+r.length-1,r[r.length-1].length);n.push(l.h.replace(a,r.join("\n"))),o.push(h),s+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class P extends s.R6{constructor(){super({id:P.ID,label:E.NC("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:(0,n.gx)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map((e=>new u.L(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=new h(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}P.ID="editor.action.trimTrailingWhitespace";class F extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:E.NC("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];let a=t.startLineNumber,c=t.endLineNumber,h=1,d=n.getLineMaxColumn(c);c<n.getLineCount()?(c+=1,d=1):a>1&&(a-=1,h=n.getLineMaxColumn(a)),s.push(l.h.replace(new g.Y(a,h,c,d),"")),r.push(new g.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}}));t.sort(((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class B extends s.R6{constructor(){super({id:"editor.action.indentLines",label:E.NC("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u6.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class H extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:E.NC("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){o.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class W extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:E.NC("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u6.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class V extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:E.NC("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u6.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class z extends s.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;e<t;e++){const t=n[e],i=n[e+1];null===c.e.intersectRanges(t,i)?o.push(t):n[e+1]=c.e.plusRange(t,i)}o.push(n[n.length-1]);const s=this._getEndCursorState(i,o),r=o.map((e=>l.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class U extends z{constructor(){super({id:"deleteAllLeft",label:E.NC("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new g.Y(e,t.startColumn,e,t.startColumn)}else s=new g.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(c.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new c.e(t,i,e.startLineNumber,1)}return new c.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class j extends z{constructor(){super({id:"deleteAllRight",label:E.NC("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o<s;o++){const s=t[o],a=new g.Y(s.startLineNumber-r,s.startColumn,s.startLineNumber-r,s.startColumn);s.intersectRanges(e)?i=a:n.push(a)}return i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getModel();if(null===t)return[];const i=e.getSelections();if(null===i)return[];const n=i.map((e=>{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.e.compareRangesUsingStarts),n}}class K extends s.R6{constructor(){super({id:"editor.action.joinLines",label:E.NC("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.e.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],h=[];let d=n,u=0;for(let e=0,t=o.length;e<t;e++){const t=o[e],i=t.startLineNumber,s=1;let p,m,f=0;const _=r.getLineContent(t.endLineNumber).length-t.endColumn;if(t.isEmpty()||t.startLineNumber===t.endLineNumber){const e=t.getStartPosition();e.lineNumber<r.getLineCount()?(p=i+1,m=r.getLineMaxColumn(p)):(p=e.lineNumber,m=r.getLineMaxColumn(e.lineNumber))}else p=t.endLineNumber,m=r.getLineMaxColumn(p);let v=r.getLineContent(i);for(let e=i+1;e<=p;e++){const t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);v+=(e?" ":"")+n,f=e?n.length+1:n.length}else f=0}const b=new c.e(i,s,p,m);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.h.replace(b,v)),e=new g.Y(b.startLineNumber-u,v.length-f+1,i-u,v.length-f+1)):t.startLineNumber===t.endLineNumber?(a.push(l.h.replace(b,v)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.endLineNumber-u,t.endColumn)):(a.push(l.h.replace(b,v)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.startLineNumber-u,v.length-_)),null!==c.e.intersectRanges(b,n)?d=e:h.push(e)}u+=b.endLineNumber-b.startLineNumber}h.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,h),t.pushUndoStop()}}class q extends s.R6{constructor(){super({id:"editor.action.transpose",label:E.NC("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:p.u.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];if(!t.isEmpty())continue;const s=t.getStartPosition(),a=n.getLineMaxColumn(s.lineNumber);if(s.column>=a){if(s.lineNumber===n.getLineCount())continue;const e=new c.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.T4(new g.Y(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{const e=new c.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.hP(e,t,new g.Y(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class $ extends s.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(124),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new c.e(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),h=n.getValueInRange(a);s.push(l.h.replace(a,this._modifyText(h,o)))}else{const t=n.getValueInRange(e);s.push(l.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class G extends ${constructor(){super({id:"editor.action.transformToUppercase",label:E.NC("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class Q extends ${constructor(){super({id:"editor.action.transformToLowercase",label:E.NC("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Y{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class Z extends ${constructor(){super({id:"editor.action.transformToTitlecase",label:E.NC("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:p.u.writable})}_modifyText(e,t){const i=Z.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}Z.titleBoundary=new Y("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class X extends ${constructor(){super({id:"editor.action.transformToSnakecase",label:E.NC("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:p.u.writable})}_modifyText(e,t){const i=X.caseBoundary.get(),n=X.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}X.caseBoundary=new Y("(\\p{Ll})(\\p{Lu})","gmu"),X.singleLetters=new Y("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class J extends ${constructor(){super({id:"editor.action.transformToCamelcase",label:E.NC("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:p.u.writable})}_modifyText(e,t){const i=J.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}J.wordBoundary=new Y("[_\\s-]","gm");class ee extends ${static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:E.NC("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:p.u.writable})}_modifyText(e,t){const i=ee.caseBoundary.get(),n=ee.singleLetters.get(),o=ee.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}ee.caseBoundary=new Y("(\\p{Ll})(\\p{Lu})","gmu"),ee.singleLetters=new Y("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),ee.underscoreBoundary=new Y("(\\S)(_)(\\S)","gm"),(0,s.Qr)(class extends D{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:E.NC("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:N.eH.MenubarSelectionMenu,group:"2_line",title:E.NC({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends D{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:E.NC("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:N.eH.MenubarSelectionMenu,group:"2_line",title:E.NC({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(T),(0,s.Qr)(class extends I{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:E.NC("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:N.eH.MenubarSelectionMenu,group:"2_line",title:E.NC({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends I{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:E.NC("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:N.eH.MenubarSelectionMenu,group:"2_line",title:E.NC({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(M),(0,s.Qr)(R),(0,s.Qr)(O),(0,s.Qr)(P),(0,s.Qr)(F),(0,s.Qr)(B),(0,s.Qr)(H),(0,s.Qr)(W),(0,s.Qr)(V),(0,s.Qr)(U),(0,s.Qr)(j),(0,s.Qr)(K),(0,s.Qr)(q),(0,s.Qr)(G),(0,s.Qr)(Q),X.caseBoundary.isSupported()&&X.singleLetters.isSupported()&&(0,s.Qr)(X),J.wordBoundary.isSupported()&&(0,s.Qr)(J),Z.titleBoundary.isSupported()&&(0,s.Qr)(Z),ee.isSupported()&&(0,s.Qr)(ee)},76:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>E,LinkedEditingAction:()=>D,LinkedEditingContribution:()=>N,editorLinkedEditingBackground:()=>A});var n=i(9488),o=i(15393),s=i(71050),r=i(41264),a=i(17301),l=i(4669),c=i(5976),h=i(97295),d=i(70666),u=i(16830),g=i(11640),p=i(50187),m=i(24314),f=i(29102),_=i(82948),v=i(51381),b=i(63580),C=i(38819),y=i(71922),w=i(73910),S=i(88191),k=i(84013),x=function(e,t){return function(i,n){t(i,n,e)}},L=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const E=new C.uy("LinkedEditingInputVisible",!1);let N=class e extends c.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new c.SL),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=E.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new c.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(66)||e.hasChanged(87))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(66)||this._editor.getOption(87))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l.ju.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.vp(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},r=new o.vp(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const o=[];for(let e=1,i=this._currentDecorations.length;e<i;e++){const i=this._currentDecorations.getRange(e);if(i)if(i.startLineNumber!==i.endLineNumber)o.push({range:i,text:n});else{let e=t.getValueInRange(i),s=n,r=i.startColumn,a=i.endColumn;const l=h.Mh(e,s);r+=l,e=e.substr(l),s=s.substr(l);const c=h.P1(e,s);a-=c,e=e.substr(0,e.length-c),s=s.substr(0,s.length-c),r===a&&0===s.length||o.push({range:new m.e(i.startLineNumber,r,i.endLineNumber,a),text:s})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(t=!1){return L(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const i=this._editor.getPosition();if(!this._enabled&&!t||this._editor.getSelections().length>1)return void this.clearRanges();const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=s;const r=(0,o.PG)((t=>L(this,void 0,void 0,(function*(){try{const o=new k.G(!1),a=yield I(this._providers,n,i,t);if(this._debounceInformation.update(n,o.elapsed()),r!==this._currentRequest)return;if(this._currentRequest=null,s!==n.getVersionId())return;let l=[];(null==a?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(null==a?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let e=0,t=l.length;e<t;e++)if(m.e.containsPosition(l[e],i)){if(c=!0,0!==e){const t=l[e];l.splice(e,1),l.unshift(t)}break}if(!c)return void this.clearRanges();const h=l.map((t=>({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(h),this._syncRangesToken++}catch(e){(0,a.n2)(e)||(0,a.dL)(e),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};N.ID="editor.contrib.linkedEditing",N.DECORATION=_.qx.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([x(1,C.i6),x(2,y.p),x(3,v.c_),x(4,S.A)],N);class D extends u.R6{constructor(){super({id:"editor.action.linkedEditing",label:b.NC("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:C.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return d.o.isUri(n)&&p.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),a.dL):super.runCommand(e,t)}run(e,t){const i=N.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const T=u._l.bindToContribution(N.get);function I(e,t,i,s){const r=e.ordered(t);return(0,o.Ps)(r.map((e=>()=>L(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,s)}catch(e){return void(0,a.Cp)(e)}})))),(e=>!!e&&n.Of(null==e?void 0:e.ranges)))}(0,u.fK)(new T({id:"cancelLinkedEditingInput",precondition:E,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const A=(0,w.P6G)("editor.linkedEditingBackground",{dark:r.Il.fromHex("#f00").transparent(.3),light:r.Il.fromHex("#f00").transparent(.3),hcDark:r.Il.fromHex("#f00").transparent(.3),hcLight:r.Il.white},b.NC("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,u.sb)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(y.p);return I(n,t,i,s.T.None)})),(0,u._K)(N.ID,N,1),(0,u.Qr)(D)},57253:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LinkDetector:()=>I});var n=i(15393),o=i(71050),s=i(17301),r=i(59365),a=i(5976),l=i(66663),c=i(1432),h=i(95935),d=i(84013),u=i(70666),g=i(16830),p=i(82948),m=i(88191),f=i(71922),_=i(82005),v=i(9488),b=i(98401),C=i(24314),y=i(73733),w=i(94565),S=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return S(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class x{constructor(e){this._disposables=new a.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new k(e,n)));t=x._union(t,e),(0,a.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;n<o&&s<r;){const o=e[n],r=t[s];C.e.areIntersectingOrTouching(o.range,r.range)?n++:C.e.compareRangesUsingStarts(o.range,r.range)<0?(i.push(o),n++):(i.push(r),s++)}for(;n<o;n++)i.push(e[n]);for(;s<r;s++)i.push(t[s]);return i}}function L(e,t,i){const n=[],o=e.ordered(t).reverse().map(((e,o)=>Promise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),s.Cp)));return Promise.all(o).then((()=>{const e=new x((0,v.kX)(n));return i.isCancellationRequested?(e.dispose(),new x([])):e}))}w.P.registerCommand("_executeLinkProvider",((e,...t)=>S(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,b.p_)(i instanceof u.o),"number"!=typeof n&&(n=0);const{linkProvider:s}=e.get(f.p),r=e.get(y.q).getModel(i);if(!r)return[];const a=yield L(s,r,o.T.None);if(!a)return[];for(let e=0;e<Math.min(n,a.links.length);e++)yield a.links[e].resolve(o.T.None);const l=a.links.slice(0);return a.dispose(),l}))));var E=i(63580),N=i(59422),D=i(50988),T=function(e,t){return function(i,n){t(i,n,e)}};let I=class e extends a.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,o,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new n.pY((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new _.yN(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(67)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}computeLinksNow(){return e=this,t=void 0,o=function*(){if(!this.editor.hasModel()||!this.editor.getOption(67))return;const e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.PG)((t=>L(this.providers,e,t)));try{const t=new d.G(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(n,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((o=o.apply(e,t||[])).next())}));var e,t,i,o}updateDecorations(e){const t="altKey"===this.editor.getOption(74),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const o=[];if(e)for(const i of e)o.push(M.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t<i;t++){const i=new M(e[t],n[t]);this.currentOccurrences[i.decorationId]=i}}))}_onEditorMouseMove(e,t){const i="altKey"===this.editor.getOption(74);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations((e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(74);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(o.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.lg.file&&e.startsWith(`${l.lg.file}:`)){const i=u.o.parse(e);if(i.scheme===l.lg.file){const n=h.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=h.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(E.NC("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(E.NC("missing.url","Failed to open this link because its target is missing.")):(0,s.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};I.ID="editor.linkDetector",I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([T(1,D.v4),T(2,N.lT),T(3,f.p),T(4,m.A)],I);const A={general:p.qx.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:p.qx.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class M{static decoration(e,t){return{range:e.range,options:M._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?A.active:A.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?E.NC("links.navigate.executeCmd","Execute command"):E.NC("links.navigate.follow","Follow link"),o=t?c.dz?E.NC("links.navigate.kb.meta.mac","cmd + click"):E.NC("links.navigate.kb.meta","ctrl + click"):c.dz?E.NC("links.navigate.kb.alt.mac","option + click"):E.NC("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=E.NC("tooltip.explanation","Execute command {0}",e)}}return new r.W5("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`)}return(new r.W5).appendText(`${n} (${o})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,M._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,M._getOptions(this.link,t,!1))}}class R extends g.R6{constructor(){super({id:"editor.action.openLink",label:E.NC("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=I.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,g._K)(I.ID,I,1),(0,g.Qr)(R)},93519:(e,t,i)=>{"use strict";i.r(t);var n=i(5976),o=i(16830);class s extends n.JT{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(111);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}s.ID="editor.contrib.longLinesHelper",(0,o._K)(s.ID,s,2)},45241:(e,t,i)=>{"use strict";i.d(t,{$:()=>m});var n,o=i(77352),s=i(17301),r=i(4669),a=i(5976),l=i(52136),c=i(72042),h=i(68801),d=i(82963),u=i(50988),g=function(e,t){return function(i,n){t(i,n,e)}},p=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let m=class e{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new r.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new a.SL;return{element:n.add((0,o.a)(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(t,i){return{codeBlockRenderer:(t,i)=>p(this,void 0,void 0,(function*(){var n,o,s;let r;t?r=this._languageService.getLanguageIdByLanguageName(t):this._options.editor&&(r=null===(n=this._options.editor.getModel())||void 0===n?void 0:n.getLanguageId()),r||(r=h.bd);const a=yield(0,d.C2)(this._languageService,i,r),c=document.createElement("span");if(c.innerHTML=null!==(s=null===(o=e._ttpTokenizer)||void 0===o?void 0:o.createHTML(a))&&void 0!==s?s:a,this._options.editor){const e=this._options.editor.getOption(47);(0,l.N)(c,e)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(c.style.fontSize=this._options.codeBlockFontSize),c})),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>function(e,t,i){return p(this,void 0,void 0,(function*(){try{return yield e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:f(i)})}catch(e){return(0,s.dL)(e),!1}}))}(this._openerService,e,t.isTrusted),disposables:i}}}};function f(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}m._ttpTokenizer=null===(n=window.trustedTypes)||void 0===n?void 0:n.createPolicy("tokenizeToString",{createHTML:e=>e}),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(1,c.O),g(2,u.v4)],m)},27753:(e,t,i)=>{"use strict";i.d(t,{O:()=>h});var n=i(85152),o=i(15393),s=i(5976),r=i(16830),a=i(24314),l=i(63580),c=i(38819);let h=class e{static get(t){return t.getContribution(e.ID)}constructor(t,i){this._messageWidget=new s.XK,this._messageListeners=new s.SL,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,n.Z9)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new p(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(new o._F((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new a.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(p.fadeOut(this._messageWidget.value))}};var d,u;h.ID="editor.contrib.messageController",h.MESSAGE_VISIBLE=new c.uy("messageVisible",!1,l.NC("messageVisible","Whether the editor is currently showing an inline message")),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(d=1,u=c.i6,function(e,t){u(e,t,d)})],h);const g=r._l.bindToContribution(h.get);(0,r.fK)(new g({id:"leaveEditorMessage",precondition:h.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class p{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("message"),s.textContent=n,this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,r._K)(h.ID,h,4)},77061:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AddSelectionToNextFindMatchAction:()=>D,AddSelectionToPreviousFindMatchAction:()=>T,CompatChangeAll:()=>R,FocusNextCursor:()=>V,FocusPreviousCursor:()=>z,InsertCursorAbove:()=>C,InsertCursorBelow:()=>y,MoveSelectionToNextFindMatchAction:()=>I,MoveSelectionToPreviousFindMatchAction:()=>A,MultiCursorSelectionController:()=>E,MultiCursorSelectionControllerAction:()=>N,MultiCursorSession:()=>L,MultiCursorSessionResult:()=>x,SelectHighlightsAction:()=>M,SelectionHighlighter:()=>P});var n=i(85152),o=i(15393),s=i(22258),r=i(5976),a=i(16830),l=i(28108),c=i(24314),h=i(3860),d=i(29102),u=i(31633),g=i(63580),p=i(84144),m=i(38819),f=i(71922),_=i(14495),v=i(72065);function b(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?g.NC("cursorAdded","Cursor added: {0}",e):g.NC("cursorsAdded","Cursors added: {0}",e);(0,n.i7)(t)}}class C extends a.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:g.NC("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,l.P.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),b(s,o.getCursorStates())}}class y extends a.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:g.NC("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,l.P.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),b(s,o.getCursorStates())}}class w extends a.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:g.NC("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){const e=t.getLineMaxColumn(n);i.push(new h.Y(n,e,n,e))}e.endColumn>1&&i.push(new h.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),b(s,o.getCursorStates())}}class S extends a.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:g.NC("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),b(r,s.getCursorStates())}}class k extends a.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:g.NC("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),b(s,o.getCursorStates())}}class x{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class L{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new L(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new h.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new L(e,t,s,l,n,o,c)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(124):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(124):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(124):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(124):null,!1,1073741824)}}class E extends r.JT{static get(e){return e.getContribution(E.ID)}constructor(e){super(),this._sessionDispose=this._register(new r.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=L.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new h.Y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!F(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n<o;n++)i[n]=this._expandEmptyToWord(e,t[n]);return void this._editor.setSelections(i)}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(124):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(124):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){const n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map((e=>new h.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}E.ID="editor.contrib.multiCursorController";class N extends a.R6{run(e,t){const i=E.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=u.CommonFindController.get(t);if(s)this._run(i,s);else{const n=e.get(v.TG).createInstance(u.CommonFindController,t);this._run(i,n),n.dispose()}b(o,n.getCursorStates())}}}class D extends N{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:g.NC("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:2082,weight:100},menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class T extends N{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:g.NC("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class I extends N{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:g.NC("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:(0,s.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class A extends N{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:g.NC("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class M extends N{constructor(){super({id:"editor.action.selectHighlights",label:g.NC("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:3114,weight:100},menuOpts:{menuId:p.eH.MenubarSelectionMenu,group:"3_multi",title:g.NC({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class R extends N{constructor(){super({id:"editor.action.changeAll",label:g.NC("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:m.Ao.and(d.u.writable,d.u.editorTextFocus),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class O{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(c.e.compareRangesUsingStarts)),this._cachedFindMatches}}let P=class e extends r.JT{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(102),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new o.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(102)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=u.CommonFindController.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(e._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=E.get(i);if(!o)return null;const s=u.CommonFindController.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState().matchCase;if(!F(i.getModel(),e,t))return null}r=L.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new O(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(124):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(c.e.compareRangesUsingStarts);const o=[];for(let e=0,t=0,s=i.length,r=n.length;e<s;){const s=i[e];if(t>=r)o.push(s),e++;else{const i=c.e.compareRangesUsingStarts(s,n[t]);i<0?(!n[t].isEmpty()&&c.e.areIntersecting(s,n[t])||o.push(s),e++):(i>0||e++,t++)}}const s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(77),r=o.map((e=>({range:e,options:(0,_.w)(s)})));this._decorations.set(r)}dispose(){this._setState(null),super.dispose()}};function F(e,t,i){const n=B(e,t[0],!i);for(let o=1,s=t.length;o<s;o++){const s=t[o];if(s.isEmpty())return!1;if(n!==B(e,s,!i))return!1}return!0}function B(e,t,i){const n=e.getValueInRange(t);return i?n.toLowerCase():n}var H,W;P.ID="editor.contrib.selectionHighlighter",P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(H=1,W=f.p,function(e,t){W(e,t,H)})],P);class V extends a.R6{constructor(){super({id:"editor.action.focusNextCursor",label:g.NC("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:g.NC("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),b(o,n.getCursorStates()))}}class z extends a.R6{constructor(){super({id:"editor.action.focusPreviousCursor",label:g.NC("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:g.NC("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),b(o,n.getCursorStates()))}}(0,a._K)(E.ID,E,4),(0,a._K)(P.ID,P,1),(0,a.Qr)(C),(0,a.Qr)(y),(0,a.Qr)(w),(0,a.Qr)(D),(0,a.Qr)(T),(0,a.Qr)(I),(0,a.Qr)(A),(0,a.Qr)(M),(0,a.Qr)(R),(0,a.Qr)(S),(0,a.Qr)(k),(0,a.Qr)(V),(0,a.Qr)(z)},95313:(e,t,i)=>{"use strict";i.r(t),i.d(t,{TriggerParameterHintsAction:()=>q});var n=i(79579),o=i(5976),s=i(16830),r=i(29102),a=i(96887),l=i(71922),c=i(15393),h=i(17301),d=i(4669),u=i(44906),g=i(71050),p=i(98401),m=i(70666),f=i(50187),_=i(88216),v=i(94565),b=i(38819),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const y={Visible:new b.uy("parameterHintsVisible",!1),MultipleSignatures:new b.uy("parameterHintsMultipleSignatures",!1)};function w(e,t,i,n,o){return C(this,void 0,void 0,(function*(){const s=e.ordered(t);for(const e of s)try{const s=yield e.provideSignatureHelp(t,i,o,n);if(s)return s}catch(e){(0,h.Cp)(e)}}))}v.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,n,o]=t;(0,p.p_)(m.o.isUri(i)),(0,p.p_)(f.L.isIPosition(n)),(0,p.p_)("string"==typeof o||!o);const s=e.get(l.p),r=yield e.get(_.S).createModelReference(i);try{const e=yield w(s.signatureHelpProvider,r.object.textEditorModel,f.L.lift(n),{triggerKind:a.WW.Invoke,isRetrigger:!1,triggerCharacter:o},g.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var S;!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(S||(S={}));class k extends o.JT{constructor(e,t,i=k.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new d.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=S.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new u.q,this.retriggerChars=new u.q,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new c.vp(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=S.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(h.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(81).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(81).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new S.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,i=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(x);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new S.Pending((0,c.PG)((e=>w(this.providers,s,r,o,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new S.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=S.Default),(0,h.dL)(t),!1}},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(81).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function x(e,t){switch(t.triggerKind){case a.WW.Invoke:return t;case a.WW.ContentChange:return e;case a.WW.TriggerCharacter:default:return t}}k.DEFAULT_DELAY=120;var L=i(63580),E=i(72065),N=i(65321),D=i(85152),T=i(9802),I=i(73046),A=i(97295),M=i(72042),R=i(45241),O=i(50988),P=i(73910),F=i(59554),B=i(25670),H=function(e,t){return function(i,n){t(i,n,e)}};const W=N.$,V=(0,F.q5)("parameter-hints-next",I.l.chevronDown,L.NC("parameterHintsNextIcon","Icon for show next parameter hint.")),z=(0,F.q5)("parameter-hints-previous",I.l.chevronUp,L.NC("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let U=class e extends o.JT{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new R.$({editor:e},s,n)),this.keyVisible=y.Visible.bindTo(i),this.keyMultipleSignatures=y.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=W(".editor-widget.parameter-hints-widget"),t=N.R3(e,W(".phwrapper"));t.tabIndex=-1;const i=N.R3(t,W(".controls")),n=N.R3(i,W(".button"+B.k.asCSSSelector(z))),o=N.R3(i,W(".overloads")),s=N.R3(i,W(".button"+B.k.asCSSSelector(V)));this._register(N.nm(n,"click",(e=>{N.zB.stop(e),this.previous()}))),this._register(N.nm(s,"click",(e=>{N.zB.stop(e),this.next()})));const r=W(".body"),a=new T.s$(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=N.R3(r,W(".signature")),c=N.R3(r,W(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const h=()=>{if(!this.domNodes)return;const e=this.editor.getOption(47);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};h(),this._register(d.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(47))).on(h,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const o=N.R3(this.domNodes.signature,W(".code")),s=this.editor.getOption(47);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;r?this.renderParameters(o,n,a):N.R3(o,W("span")).textContent=n.label;const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=W("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}N.R3(this.domNodes.docs,W("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)N.R3(this.domNodes.docs,W("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);N.R3(this.domNodes.docs,e.element)}const c=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",c),this.domNodes.docs.classList.toggle("empty",!c),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(D.Z9(L.NC("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,p.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,p.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,p.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,p.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),N.R3(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,A.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};U.ID="editor.widget.parameterHintsWidget",U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([H(2,b.i6),H(3,O.v4),H(4,M.O)],U),(0,P.P6G)("editorHoverWidget.highlightForeground",{dark:P.Gwp,light:P.Gwp,hcDark:P.Gwp,hcLight:P.Gwp},L.NC("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var j=function(e,t){return function(i,n){t(i,n,e)}};let K=class e extends o.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new k(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new n.o((()=>this._register(t.createInstance(U,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};K.ID="editor.controller.parameterHints",K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([j(1,E.TG),j(2,l.p)],K);class q extends s.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:L.NC("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.u.hasSignatureHelpProvider,kbOpts:{kbExpr:r.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=K.get(t);null==i||i.trigger({triggerKind:a.WW.Invoke})}}(0,s._K)(K.ID,K,2),(0,s.Qr)(q);const $=s._l.bindToContribution(K.get);(0,s.fK)(new $({id:"closeParameterHints",precondition:y.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:9,secondary:[1033]}})),(0,s.fK)(new $({id:"showPrevParameterHint",precondition:b.Ao.and(y.Visible,y.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,s.fK)(new $({id:"showNextParameterHint",precondition:b.Ao.and(y.Visible,y.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},52049:(e,t,i)=>{"use strict";i.d(t,{Fw:()=>A,Jy:()=>M,vk:()=>F,rc:()=>O,SC:()=>V,M8:()=>z,KY:()=>B,IH:()=>H,R7:()=>W});var n=i(65321),o=i(90317),s=i(74741),r=i(73046),a=i(25670),l=i(41264),c=i(4669),h=i(36248),d=i(16830),u=i(11640),g=i(84527),p=i(73098),m=i(44742),f=i(5976),_=i(24314),v=i(82948);const b=new l.Il(new l.VS(0,122,204)),C={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1};class y{constructor(e,t,i,n,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class w{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class S{constructor(e){this._editor=e,this._ruleName=S._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.uN(this._ruleName),n.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:_.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}S._IdGenerator=new m.R(".arrow-decoration-");var k=i(63580),x=i(22444),L=i(38819),E=i(65026),N=i(72065),D=i(73910),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const A=(0,N.yh)("IPeekViewService");var M;(0,E.z)(A,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new L.uy("inReferenceSearchEditor",!0,k.NC("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(M||(M={}));let R=class{constructor(e,t){e instanceof g.H&&M.inPeekEditor.bindTo(t)}dispose(){}};function O(e){const t=e.get(u.$).getFocusedCodeEditor();return t instanceof g.H?t.getParentEditor():t}R.ID="editor.contrib.referenceController",R=T([I(1,L.i6)],R),(0,d._K)(R.ID,R,0);const P={headerBackgroundColor:l.Il.white,primaryHeadingColor:l.Il.fromHex("#333333"),secondaryHeadingColor:l.Il.fromHex("#6c6c6cb3")};let F=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new f.SL,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=h.I8(t),h.jB(this.options,C,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new S(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=_.e.isIRange(e)?_.e.lift(e):_.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:v.qx.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),null===(e=this._arrow)||void 0===e||e.hide()}_decoratingElementsHeight(){const e=this.editor.getOption(63);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(63),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new y(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new w("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const h=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new _.e(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.endLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new p.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(63),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new c.Q5,this.onDidClose=this._onDidClose.event,h.jB(this.options,P,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=n.$(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),n.mu(i,"click",(e=>this._onTitleClick(e)))),n.R3(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.R3(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const l=n.$(".peekview-actions");n.R3(this._headElement,l);const c=this._getActionBarOptions();this._actionbarWidget=new o.o(l,c),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.aU("peekview.close",k.NC("label.close","Close"),a.k.asClassName(r.l.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:x.Id.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.$Z(this._metaHeading)):n.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(63)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};F=T([I(2,N.TG)],F);const B=(0,D.P6G)("peekViewTitle.background",{dark:(0,D.ZnX)(D.c63,.1),light:(0,D.ZnX)(D.c63,.1),hcDark:null,hcLight:null},k.NC("peekViewTitleBackground","Background color of the peek view title area.")),H=(0,D.P6G)("peekViewTitleLabel.foreground",{dark:l.Il.white,light:l.Il.black,hcDark:l.Il.white,hcLight:D.NOs},k.NC("peekViewTitleForeground","Color of the peek view title.")),W=(0,D.P6G)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},k.NC("peekViewTitleInfoForeground","Color of the peek view title info.")),V=(0,D.P6G)("peekView.border",{dark:D.c63,light:D.c63,hcDark:D.lRK,hcLight:D.lRK},k.NC("peekViewBorder","Color of the peek view borders and arrow.")),z=(0,D.P6G)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Il.black,hcLight:l.Il.white},k.NC("peekViewResultsBackground","Background color of the peek view result list.")),U=((0,D.P6G)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Il.white,hcLight:D.NOs},k.NC("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,D.P6G)("peekViewResult.fileForeground",{dark:l.Il.white,light:"#1E1E1E",hcDark:l.Il.white,hcLight:D.NOs},k.NC("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,D.P6G)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},k.NC("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,D.P6G)("peekViewResult.selectionForeground",{dark:l.Il.white,light:"#6C6C6C",hcDark:l.Il.white,hcLight:D.NOs},k.NC("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,D.P6G)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Il.black,hcLight:l.Il.white},k.NC("peekViewEditorBackground","Background color of the peek view editor.")));(0,D.P6G)("peekViewEditorGutter.background",{dark:U,light:U,hcDark:U,hcLight:U},k.NC("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,D.P6G)("peekViewEditorStickScroll.background",{dark:U,light:U,hcDark:U,hcLight:U},k.NC("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,D.P6G)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},k.NC("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,D.P6G)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},k.NC("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,D.P6G)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:D.xL1,hcLight:D.xL1},k.NC("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},83943:(e,t,i)=>{"use strict";i.d(t,{X:()=>h});var n=i(88289),o=i(5976),s=i(98401),r=i(65520),a=i(84973),l=i(8625),c=i(97781);class h{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new o.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new o.XK);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t){const i=new o.SL,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},c=(0,r.Pi)(a);if(c){let e=(0,s.f6)(a.saveViewState());i.add(c.onDidChangeCursorPosition((()=>{e=(0,s.f6)(a.saveViewState())}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},i.add((0,n.I)(t.onCancellationRequested)((()=>{var e;return null===(e=l.restoreViewState)||void 0===e?void 0:e.call(l)})))}i.add((0,o.OF)((()=>this.clearDecorations(a)))),i.add(this.provideWithTextEditor(l,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,r.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,c.EN)(l.m9),position:a.sh.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},73945:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ReadOnlyMessageController:()=>a});var n=i(5976),o=i(16830),s=i(27753),r=i(63580);class a extends n.JT{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=s.O.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(r.NC("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(r.NC("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}}a.ID="editor.contrib.readOnlyMessageController",(0,o._K)(a.ID,a,2)},32894:(e,t,i)=>{"use strict";i.r(t),i.d(t,{RenameAction:()=>H,rename:()=>F});var n=i(85152),o=i(15393),s=i(71050),r=i(17301),a=i(5976),l=i(98401),c=i(70666),h=i(16467),d=i(16830),u=i(66007),g=i(11640),p=i(50187),m=i(24314),f=i(29102),_=i(71765),v=i(27753),b=i(63580),C=i(23193),y=i(38819),w=i(72065),S=i(43557),k=i(59422),x=i(90535),L=i(89872),E=i(91847),N=i(73910),D=i(97781),T=function(e,t){return function(i,n){t(i,n,e)}};const I=new y.uy("renameInputVisible",!1,(0,b.NC)("renameInputVisible","Whether the rename input widget is visible"));let A=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new a.SL,this.allowEditorOverflow=!0,this._visibleContextKey=I.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(47)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,b.NC)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[i,n]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(i),this._label.innerText=(0,b.NC)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const s=e.getColor(N.rh),r=e.getColor(N.A42);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(N.D0T))&&void 0!==t?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(N.zJb))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(N.sEe))&&void 0!==n?n:"");const a=e.getColor(N.dt_);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(o=null==a?void 0:a.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(47);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e){var t;null===(t=this._currentCancelInput)||void 0===t||t.call(this,e)}getInput(e,t,i,n,o,s){this._domNode.classList.toggle("preview",o),this._position=new p.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const r=new a.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&i})):this.cancelInput(!0)},r.add(s.onCancellationRequested((()=>this.cancelInput(!0)))),r.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!document.hasFocus())))),this._show()})).finally((()=>{r.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([T(2,D.XE),T(3,E.d),T(4,y.i6)],A);var M=i(71922),R=function(e,t){return function(i,n){t(i,n,e)}},O=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class P{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return O(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;const n=yield i.resolveRenameLocation(this.model,this.position,e);if(n){if(!n.rejectReason)return n;t.push(n.rejectReason)}}const i=this.model.getWordAtPosition(this.position);return i?{range:new m.e(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:m.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return O(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,n){return O(this,void 0,void 0,(function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=yield o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(b.NC("no result","No result.")),n)}))}}function F(e,t,i,n){return O(this,void 0,void 0,(function*(){const o=new P(t,i,e),r=yield o.resolveRenameLocation(s.T.None);return(null==r?void 0:r.rejectReason)?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,s.T.None)}))}let B=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,o,r,l,c){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=l,this._languageFeaturesService=c,this._disposableStore=new a.SL,this._cts=new s.A,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(A,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return O(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),s=new P(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!s.hasProvider())return;let r;this._cts=new h.Dl(this.editor,5);try{const e=s.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),r=yield e}catch(t){return void(null===(e=v.O.get(this.editor))||void 0===e||e.showMessage(t||b.NC("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i))}if(!r)return;if(r.rejectReason)return void(null===(t=v.O.get(this.editor))||void 0===t||t.showMessage(r.rejectReason,i));if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new h.Dl(this.editor,5,r.range);const a=this.editor.getSelection();let l=0,c=r.text.length;m.e.isEmpty(a)||m.e.spansMultipleLines(a)||!m.e.containsRange(r.range,a)||(l=Math.max(0,a.startColumn-r.range.startColumn),c=Math.min(r.range.endColumn,a.endColumn)-r.range.startColumn);const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),u=yield this._renameInputField.getInput(r.range,r.text,l,c,d,this._cts.token);if("boolean"==typeof u)return void(u&&this.editor.focus());this.editor.focus();const g=(0,o.eP)(s.provideRenameEdits(u.newName,this._cts.token),this._cts.token).then((e=>O(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):(this.editor.setSelection(m.e.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(e,{editor:this.editor,showPreview:u.wantsPreview,label:b.NC("label","Renaming '{0}' to '{1}'",null==r?void 0:r.text,u.newName),code:"undoredo.rename",quotableLabel:b.NC("quotableLabel","Renaming {0} to {1}",null==r?void 0:r.text,u.newName),respectAutoSaveConfig:!0}).then((e=>{e.ariaSummary&&(0,n.Z9)(b.NC("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,u.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(b.NC("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)}))))}))),(e=>{this._notificationService.error(b.NC("rename.failed","Rename failed to compute edits")),this._logService.error(e)}));return this._progressService.showWhile(g,250),g}))}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};B.ID="editor.contrib.renameController",B=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([R(1,w.TG),R(2,k.lT),R(3,u.vu),R(4,x.ek),R(5,S.VZ),R(6,_.V),R(7,M.p)],B);class H extends d.R6{constructor(){super({id:"editor.action.rename",label:b.NC("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:y.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return c.o.isUri(n)&&p.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dL):super.runCommand(e,t)}run(e,t){const i=B.get(t);return i?i.run():Promise.resolve()}}(0,d._K)(B.ID,B,4),(0,d.Qr)(H);const W=d._l.bindToContribution(B.get);(0,d.fK)(new W({id:"acceptRenameInput",precondition:I,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:f.u.focus,primary:3}})),(0,d.fK)(new W({id:"acceptRenameInputWithPreview",precondition:y.Ao.and(I,y.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:f.u.focus,primary:1027}})),(0,d.fK)(new W({id:"cancelRenameInput",precondition:I,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:f.u.focus,primary:9,secondary:[1033]}})),(0,d.sb)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;(0,l.p_)("string"==typeof o);const{renameProvider:s}=e.get(M.p);return F(s,t,i,o)})),(0,d.sb)("_executePrepareRename",(function(e,t,i){return O(this,void 0,void 0,(function*(){const{renameProvider:n}=e.get(M.p),o=new P(t,i,n),r=yield o.resolveRenameLocation(s.T.None);if(null==r?void 0:r.rejectReason)throw new Error(r.rejectReason);return r}))})),L.B.as(C.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b.NC("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},79694:(e,t,i)=>{"use strict";i.d(t,{x:()=>r});var n=i(91741),o=i(50187),s=i(24314);class r{provideSelectionRanges(e,t){return i=this,n=void 0,s=function*(){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;yield new Promise((t=>r._bracketsRightYield(t,0,e,n,o))),yield new Promise((i=>r._bracketsLeftYield(i,0,e,n,o,t)))}return i},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}static _bracketsRightYield(e,t,i,o,s){const a=new Map,l=Date.now();for(;;){if(t>=r._maxRounds){e();break}if(!o){e();break}const c=i.bracketPairs.findNextBracket(o);if(!c){e();break}if(Date.now()-l>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,o,s)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=c.bracketInfo.getClosedBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new n.S,s.set(e,t)),t.push(c.range)}}o=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,a){const l=new Map,c=Date.now();for(;;){if(t>=r._maxRounds&&0===o.size){e();break}if(!n){e();break}const h=i.bracketPairs.findPrevBracket(n);if(!h){e();break}if(Date.now()-c>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,o,a)));break}if(h.bracketInfo.isOpeningBracket){const e=h.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const l=s.e.fromPositions(h.range.getEndPosition(),n.getStartPosition()),c=s.e.fromPositions(h.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:c}),r._addBracketLeading(i,c,a)}}}else{const e=h.bracketInfo.getClosedBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=h.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:s.e.fromPositions(new o.L(n,r),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:s.e.fromPositions(new o.L(a,n),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(a,1),t.getEndPosition())}))}}}r._maxDuration=30,r._maxRounds=2},102:(e,t,i)=>{"use strict";i.r(t),i.d(t,{provideSelectionRanges:()=>E});var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(50187),l=i(24314),c=i(3860),h=i(29102),d=i(79694),u=i(97295);class g{provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,c=r,h=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,u.mK)(e)&&(0,u.df)(h))break;h=e}for(a+=1;c<o.length;c++){const e=o.charCodeAt(c);if((0,u.df)(e)&&(0,u.mK)(h))break;if(95===e||45===e)break;h=e}a<c&&e.push({range:new l.e(i.lineNumber,s+a,i.lineNumber,s+c)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new l.e(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p=i(63580),m=i(84144),f=i(94565),_=i(71922),v=i(88216),b=i(98401),C=i(70666),y=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class w{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 w(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let S=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return y(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield E(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(107),o.T.None).then((e=>{var i;if(n.Of(e)&&e.length===t.length&&this._editor.hasModel()&&n.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;i<e.length;i++)e[i]=e[i].filter((e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new w(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const s=this._state.map((e=>c.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}))}};var k,x;S.ID="editor.contrib.smartSelectController",S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(k=1,x=_.p,function(e,t){x(e,t,k)})],S);class L extends r.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return y(this,void 0,void 0,(function*(){const e=S.get(t);e&&(yield e.run(this._forward))}))}}function E(e,t,i,o,r){return y(this,void 0,void 0,(function*(){const c=e.all(t).concat(new g);1===c.length&&c.unshift(new d.x);const h=[],u=[];for(const e of c)h.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.Of(e)&&e.length===i.length)for(let t=0;t<i.length;t++){u[t]||(u[t]=[]);for(const n of e[t])l.e.isIRange(n.range)&&l.e.containsPosition(n.range,i[t])&&u[t].push(l.e.lift(n.range))}}),s.Cp));return yield Promise.all(h),u.map((e=>{if(0===e.length)return[];e.sort(((e,t)=>a.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.L.isBefore(t.getStartPosition(),e.getStartPosition())||a.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.e.containsRange(t,n)&&!l.e.equalsRange(t,n))&&(i.push(t),n=t);if(!o.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let e=1;e<i.length;e++){const n=i[e-1],o=i[e];if(o.startLineNumber!==n.startLineNumber||o.endLineNumber!==n.endLineNumber){const e=new l.e(n.startLineNumber,t.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,t.getLineLastNonWhitespaceColumn(n.endLineNumber));e.containsRange(n)&&!e.equalsRange(n)&&o.containsRange(e)&&!o.equalsRange(e)&&s.push(e);const i=new l.e(n.startLineNumber,1,n.endLineNumber,t.getLineMaxColumn(n.endLineNumber));i.containsRange(n)&&!i.equalsRange(e)&&o.containsRange(i)&&!o.equalsRange(i)&&s.push(i)}s.push(o)}return s}))}))}f.P.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand"),(0,r._K)(S.ID,S,4),(0,r.Qr)(class extends L{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p.NC("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"1_basic",title:p.NC({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}),(0,r.Qr)(class extends L{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p.NC("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"1_basic",title:p.NC({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}),f.P.registerCommand("_executeSelectionRangeProvider",(function(e,...t){return y(this,void 0,void 0,(function*(){const[i,n]=t;(0,b.p_)(C.o.isUri(i));const s=e.get(_.p).selectionRangeProvider,r=yield e.get(v.S).createModelReference(i);try{return E(s,r.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0},o.T.None)}finally{r.dispose()}}))}))},98762:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SnippetController2:()=>_});var n=i(5976),o=i(98401),s=i(16830),r=i(50187),a=i(29102),l=i(51381),c=i(71922),h=i(55621),d=i(63580),u=i(38819),g=i(43557),p=i(29561),m=function(e,t){return function(i,n){t(i,n,e)}};const f={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let _=class e{static get(t){return t.getContribution(e.ID)}constructor(t,i,o,s,r){this._editor=t,this._logService=i,this._languageFeaturesService=o,this._languageConfigurationService=r,this._snippetListener=new n.SL,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(s),this._hasNextTabstop=e.HasNextTabstop.bindTo(s),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?f:Object.assign(Object.assign({},f),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?((0,o.p_)("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new p.l(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!r.L.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let e=0;e<i.choice.options.length;e++){const t=i.choice.options[e];s.push({kind:13,label:t.value,insertText:t.value,sortText:"a".repeat(e+1),range:i.range,filterText:o?`${n}_${t.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,d.NC)("next","Go to next placeholder...")}})}return{suggestions:s}}};const e=this._languageFeaturesService.completionProvider.register({language:this._editor.getModel().getLanguageId(),pattern:this._editor.getModel().uri.fsPath,scheme:this._editor.getModel().uri.scheme,exclusive:!0},this._choiceCompletionItemProvider);this._snippetListener.add(e)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:e}=this._session;e&&this._choiceCompletionItemProvider?this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask((()=>{(0,h.i5)(this._editor,this._choiceCompletionItemProvider)}))):this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};_.ID="snippetController2",_.InSnippetMode=new u.uy("inSnippetMode",!1,(0,d.NC)("inSnippetMode","Whether the editor in current in snippet mode")),_.HasNextTabstop=new u.uy("hasNextTabstop",!1,(0,d.NC)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),_.HasPrevTabstop=new u.uy("hasPrevTabstop",!1,(0,d.NC)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([m(1,g.VZ),m(2,c.p),m(3,u.i6),m(4,l.c_)],_),(0,s._K)(_.ID,_,4);const v=s._l.bindToContribution(_.get);(0,s.fK)(new v({id:"jumpToNextSnippetPlaceholder",precondition:u.Ao.and(_.InSnippetMode,_.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:2}})),(0,s.fK)(new v({id:"jumpToPrevSnippetPlaceholder",precondition:u.Ao.and(_.InSnippetMode,_.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:1026}})),(0,s.fK)(new v({id:"leaveSnippet",precondition:_.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,s.fK)(new v({id:"acceptSnippet",precondition:_.InSnippetMode,handler:e=>e.finish()}))},35084:(e,t,i)=>{"use strict";i.d(t,{Lv:()=>l,Vm:()=>a,Yj:()=>p,xv:()=>s,y1:()=>g});class n{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,o=this.value.charCodeAt(e);if(t=n._table[o],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(e+i)}while(!isNaN(o)&&void 0===n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}}n._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class s extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}}class r extends o{}class a extends r{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof h&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof h){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class h extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new h(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class d extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new s(t)],!0)}clone(){const e=new d(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.index<i.index?i:t),!0})),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk((n=>n===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof d&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,o=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new a(e.index);r.transform=e.transform;for(const e of o){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),s(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of o)s(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new a(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new s(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new d(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new s(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new d(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new c;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new s(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new h(Number(n))),!0;if(this._accept(4))return e.appendChild(new h(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new h(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new h(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},29561:(e,t,i)=>{"use strict";i.d(t,{l:()=>M});var n=i(9488),o=i(5976),s=i(97295),r=i(69386),a=i(24314),l=i(3860),c=i(51381),h=i(82948),d=i(44349),u=i(40382),g=i(35084),p=i(15527),m=i(1432);function f(e,t=m.ED){return(0,p.oP)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var _=i(88721),v=i(95935),b=i(98e3),C=i(63580);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class y{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class w{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,s.V8)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof g.xv&&(o=(0,s.V8)((0,s.uq)(t.value).pop())),!0)));const r=(0,s.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class S{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return _.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=_.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===_.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,v.XX)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class k{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,s.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let x=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};var L,E;x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(L=2,E=c.c_,function(e,t){E(e,t,L)})],x);class N{constructor(){this._date=new Date}resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String(this._date.getFullYear()):"CURRENT_YEAR_SHORT"===t?String(this._date.getFullYear()).slice(-2):"CURRENT_MONTH"===t?String(this._date.getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String(this._date.getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String(this._date.getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String(this._date.getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String(this._date.getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?N.dayNames[this._date.getDay()]:"CURRENT_DAY_NAME_SHORT"===t?N.dayNamesShort[this._date.getDay()]:"CURRENT_MONTH_NAME"===t?N.monthNames[this._date.getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?N.monthNamesShort[this._date.getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(this._date.getTime()/1e3)):void 0}}N.dayNames=[C.NC("Sunday","Sunday"),C.NC("Monday","Monday"),C.NC("Tuesday","Tuesday"),C.NC("Wednesday","Wednesday"),C.NC("Thursday","Thursday"),C.NC("Friday","Friday"),C.NC("Saturday","Saturday")],N.dayNamesShort=[C.NC("SundayShort","Sun"),C.NC("MondayShort","Mon"),C.NC("TuesdayShort","Tue"),C.NC("WednesdayShort","Wed"),C.NC("ThursdayShort","Thu"),C.NC("FridayShort","Fri"),C.NC("SaturdayShort","Sat")],N.monthNames=[C.NC("January","January"),C.NC("February","February"),C.NC("March","March"),C.NC("April","April"),C.NC("May","May"),C.NC("June","June"),C.NC("July","July"),C.NC("August","August"),C.NC("September","September"),C.NC("October","October"),C.NC("November","November"),C.NC("December","December")],N.monthNamesShort=[C.NC("JanuaryShort","Jan"),C.NC("FebruaryShort","Feb"),C.NC("MarchShort","Mar"),C.NC("AprilShort","Apr"),C.NC("MayShort","May"),C.NC("JuneShort","Jun"),C.NC("JulyShort","Jul"),C.NC("AugustShort","Aug"),C.NC("SeptemberShort","Sep"),C.NC("OctoberShort","Oct"),C.NC("NovemberShort","Nov"),C.NC("DecemberShort","Dec")];class D{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,u.uT)(this._workspaceService.getWorkspace());return(0,u.c$)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,u.eb)(e))return _.EZ(e.uri.path);let t=_.EZ(e.configPath.path);return t.endsWith(u.A6)&&(t=t.substr(0,t.length-u.A6.length-1)),t}_resoveWorkspacePath(e){if((0,u.eb)(e))return f(e.uri.fsPath);const t=_.EZ(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?f(i):"/"}}class T{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,b.R)():void 0}}class I{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.vM)(t.placeholders,g.Vm.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=a.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?I._decor.inactiveFinal:I._decor.inactive,l=t.addDecoration(s,r);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e<s.length;e++)s[e]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+s[e]);e.push(r.h.replace(n,s.join(this._editor.getModel().getEOL())))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):!1===e&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new l.Y(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?I._decor.activeFinal:I._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?I._decor.activeFinal:I._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?I._decor.inactiveFinal:I._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof g.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof g.Lv,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=a.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),l=i.addDecoration(r,I._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.vM)(this._snippet.placeholders,g.Vm.compareByIndex)}))}}I._decor={active:h.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:h.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:h.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:h.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const A={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let M=class e{static adjustWhitespace(e,t,i,n,o){const r=e.getLineContent(t.lineNumber),a=(0,s.V8)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof g.xv)||t.parent instanceof g.Lv)return!0;if(o&&!o.has(t))return!0;const s=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)s[0]=e.normalizeIndentation(s[0]);else{l=null!=l?l:n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(a+s[0]))}for(let t=1;t<s.length;t++)s[t]=e.normalizeIndentation(a+s[t])}const r=s.join(e.getEOL());return r!==t.value&&(t.parent.replace(t,[new g.xv(r)]),l=void 0),!0})),a}static adjustSelection(e,t,i,n){if(0!==i||0!==n){const{positionLineNumber:o,positionColumn:s}=t,r=s-i,a=s+n,c=e.validateRange({startLineNumber:o,startColumn:r,endLineNumber:o,endColumn:a});t=l.Y.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(t,i,n,o,s,l,c,h,p){const m=[],f=[];if(!t.hasModel())return{edits:m,snippets:f};const _=t.getModel(),v=t.invokeWithinContext((e=>e.get(u.ec))),b=t.invokeWithinContext((e=>new S(e.get(d.e),_))),C=()=>c,L=_.getValueInRange(e.adjustSelection(_,t.getSelection(),n,0)),E=_.getValueInRange(e.adjustSelection(_,t.getSelection(),0,o)),A=_.getLineFirstNonWhitespaceColumn(t.getSelection().positionLineNumber),M=t.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:c}of M){let d=e.adjustSelection(_,a,n,0),u=e.adjustSelection(_,a,0,o);L!==_.getValueInRange(d)&&(d=a),E!==_.getValueInRange(u)&&(u=a);const S=a.setStartPosition(d.startLineNumber,d.startColumn).setEndPosition(u.endLineNumber,u.endColumn),R=(new g.Yj).parse(i,!0,s),O=S.getStartPosition(),P=e.adjustWhitespace(_,O,l||c>0&&A!==_.getLineFirstNonWhitespaceColumn(a.positionLineNumber),R);R.resolveVariables(new y([b,new k(C,c,M.length,"spread"===t.getOption(75)),new w(_,a,c,h),new x(_,a,p),new N,new D(v),new T])),m[c]=r.h.replace(S,R.toString()),m[c].identifier={major:c,minor:0},m[c]._isTracked=!0,f[c]=new I(t,R,P)}return{edits:m,snippets:f}}static createEditsAndSnippetsFromEdits(t,i,n,o,s,l,c){if(!t.hasModel()||0===i.length)return{edits:[],snippets:[]};const h=[],p=t.getModel(),m=new g.Yj,f=new g.y1,_=new y([t.invokeWithinContext((e=>new S(e.get(d.e),p))),new k((()=>s),0,t.getSelections().length,"spread"===t.getOption(75)),new w(p,t.getSelection(),0,l),new x(p,t.getSelection(),c),new N,new D(t.invokeWithinContext((e=>e.get(u.ec)))),new T]);i=i.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)));let v=0;for(let t=0;t<i.length;t++){const{range:n,template:o}=i[t];if(t>0){const e=i[t-1].range,o=a.e.fromPositions(e.getEndPosition(),n.getStartPosition()),s=new g.xv(p.getValueInRange(o));f.appendChild(s),v+=s.value.length}const s=m.parseFragment(o,f);e.adjustWhitespace(p,n.getStartPosition(),!0,f,new Set(s)),f.resolveVariables(_);const l=f.toString(),c=l.slice(v);v=l.length;const d=r.h.replace(n,c);d.identifier={major:t,minor:0},d._isTracked=!0,h.push(d)}return m.ensureFinalTabstop(f,n,!0),{edits:h,snippets:[new I(t,f,"")]}}constructor(e,t,i=A,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:t,snippets:i}="string"==typeof this._template?e.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):e.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=i,this._editor.executeEdits("snippet",t,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;e<i.length;e++)i[e].initialize(t[e].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):t.map((e=>l.Y.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(t,i=A){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);const{edits:n,snippets:o}=e.createEditsAndSnippetsFromSelections(this._editor,t,i.overwriteBefore,i.overwriteAfter,!0,i.adjustWhitespace,i.clipboardText,i.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;e<o.length;e++)o[e].initialize(t[e].textChange);const i=o[0].isTrivialSnippet;if(!i){for(const e of this._snippets)e.merge(o);console.assert(0===o.length)}return this._snippets[0].hasPlaceholder&&!i?this._move(void 0):t.map((e=>l.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;const t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(0===t.size)for(const[i,o]of n){o.sort(a.e.compareRangesUsingStarts);for(const n of e)if(o[0].containsRange(n)){t.set(i,[]);break}}if(0===t.size)return!1;t.forEach(((e,t)=>{e.push(...n.get(t))}))}e.sort(a.e.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(a.e.compareRangesUsingStarts);for(let o=0;o<n.length;o++)n[o].containsRange(e[o])||t.delete(i)}else t.delete(i);return t.size>0}};M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,c.c_)],M)},66677:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(63580);const s=Object.freeze({View:{value:(0,o.NC)("view","View"),original:"View"},Help:{value:(0,o.NC)("help","Help"),original:"Help"},Test:{value:(0,o.NC)("test","Test"),original:"Test"},Preferences:{value:(0,o.NC)("preferences","Preferences"),original:"Preferences"},Developer:{value:(0,o.NC)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}});var r=i(84144),a=i(33108),l=i(38819);class c extends r.Ke{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,o.NC)("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:s.View,toggled:{condition:l.Ao.equals("config.editor.stickyScroll.enabled",!0),title:(0,o.NC)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.eH.CommandPalette},{id:r.eH.MenubarViewMenu,group:"5_editor",order:2},{id:r.eH.StickyScrollContext}]})}run(e){return t=this,i=void 0,o=function*(){const t=e.get(a.Ui),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}}var h,d=i(5976),u=i(71922),g=i(65321),p=i(50072),m=i(91557),f=i(92550),_=i(50187),v=i(82005),b=i(40184),C=i(58722),y=i(72065),w=i(71050),S=i(24314),k=i(7448),x=i(84527),L=function(e,t){return function(i,n){t(i,n,e)}};class E{constructor(e,t){this.lineNumbers=e,this.lastLineRelativePosition=t}}const N=null===(h=window.trustedTypes)||void 0===h?void 0:h.createPolicy("stickyScrollViewLayer",{createHTML:e=>e});let D=class extends d.JT{constructor(e,t,i){super(),this._editor=e,this._languageFeatureService=t,this._instaService=i,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new d.SL),this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._candidateDefinitionsLength=-1,this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof x.H),this._rootDomNode.style.width=this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth+"px",this._register(this._updateLinkGesture())}_updateLinkGesture(){const e=new d.SL,t=new d.SL;e.add(t);const i=new v.yN(this._editor,!0);return e.add(i),e.add(i.onMouseMoveOrRelevantKeyDown((([e,i])=>{if(!this._editor.hasModel()||!e.hasTriggerModifier)return void t.clear();const n=e.target;if(n.detail===this.getId()&&n.element.innerText===n.element.innerHTML){const e=n.element.innerText;if(-1===this._hoverOnColumn)return;const i=this._hoverOnLine,o=this._hoverOnColumn,s=new S.e(i,o,i,o+e.length);if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===n.element.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,t.clear();const r=new w.A;let a;t.add((0,d.OF)((()=>r.dispose(!0)))),(0,b.nD)(this._languageFeatureService.definitionProvider,this._editor.getModel(),new _.L(i,o+1),r.token).then((e=>{if(!r.token.isCancellationRequested)if(0!==e.length){this._candidateDefinitionsLength=e.length;const i=n.element;a!==i?(t.clear(),a=i,a.style.textDecoration="underline",t.add((0,d.OF)((()=>{a.style.textDecoration="none"})))):a||(a=i,a.style.textDecoration="underline",t.add((0,d.OF)((()=>{a.style.textDecoration="none"}))))}else t.clear()}))}else t.clear()}))),e.add(i.onCancel((()=>{t.clear()}))),e.add(i.onExecute((e=>{return t=this,i=void 0,o=function*(){if(e.target.detail===this.getId())if(e.hasTriggerModifier)this._candidateDefinitionsLength>1&&this._editor.revealPosition({lineNumber:this._hoverOnLine,column:1}),this._instaService.invokeFunction(C.K,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor});else if(!e.isRightClick){const e={lineNumber:this._hoverOnLine,column:this._hoverOnColumn};this._editor.revealPosition(e),this._editor.setSelection(S.e.fromPositions(e)),this._editor.focus()}},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}))),e}getCurrentLines(){return this._lineNumbers}setState(e){this._disposableStore.clear(),this._lineNumbers.length=0,g.PO(this._rootDomNode),this._lastLineRelativePosition=e.lastLineRelativePosition,this._lineNumbers=e.lineNumbers,this._renderRootNode()}_renderChildNode(e,t){const i=document.createElement("div"),n=this._editor._getViewModel(),o=n.coordinatesConverter.convertModelPositionToViewPosition(new _.L(t,1)).lineNumber,s=n.getViewLineRenderingData(o),r=this._editor.getLayoutInfo(),a=r.width-r.minimap.minimapCanvasOuterWidth-r.verticalScrollbarWidth,l=this._editor.getOption(69).side,c=this._editor.getOption(63),h=this._editor.getOption(64);let d;try{d=f.Kp.filter(s.inlineDecorations,o,s.minColumn,s.maxColumn)}catch(e){d=[]}const u=new m.IJ(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,d,s.tabSize,s.startVisibleColumn,1,1,1,500,"none",!0,!0,null),v=new p.HT(2e3);let b;(0,m.d1)(u,v),b=N?N.createHTML(v.build()):v.build();const C=document.createElement("span");C.className="sticky-line",C.classList.add(`stickyLine${t}`),C.style.lineHeight=`${c}px`,C.innerHTML=b;const y=document.createElement("span");y.className="sticky-line",y.style.lineHeight=`${c}px`,"left"===l?y.style.width=r.contentLeft-r.minimap.minimapCanvasOuterWidth+"px":"right"===l&&(y.style.width=`${r.contentLeft}px`);const w=document.createElement("span");return 1===h.renderType||3===h.renderType&&t%10==0?w.innerText=t.toString():2===h.renderType&&(w.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),w.className="sticky-line-number",w.style.lineHeight=`${c}px`,w.style.width=`${r.lineNumbersWidth}px`,"left"===l?w.style.paddingLeft=r.lineNumbersLeft-r.minimap.minimapCanvasOuterWidth+"px":"right"===l&&(w.style.paddingLeft=`${r.lineNumbersLeft}px`),y.appendChild(w),this._editor.applyFontInfo(C),this._editor.applyFontInfo(w),i.appendChild(y),i.appendChild(C),i.className="sticky-line-root",i.style.lineHeight=`${c}px`,i.style.width=`${a}px`,i.style.height=`${c}px`,i.style.zIndex="0",e===this._lineNumbers.length-1&&(i.style.position="relative",i.style.zIndex="-1",i.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(g.nm(i,"mouseover",(e=>{if(this._editor.hasModel()){const i=new k.n(e).target.innerText;this._hoverOnLine=t,this._hoverOnColumn=this._editor.getModel().getLineContent(t).indexOf(i)+1||-1}}))),i}_renderRootNode(){if(!this._editor._getViewModel())return;for(const[e,t]of this._lineNumbers.entries())this._rootDomNode.appendChild(this._renderChildNode(e,t));const e=this._editor.getOption(63),t=this._lineNumbers.length*e+this._lastLineRelativePosition;this._rootDomNode.style.height=t.toString()+"px","left"===this._editor.getOption(69).side&&(this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px")}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}};D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([L(1,u.p),L(2,y.TG)],D);var T=i(30335),I=i(15393),A=i(4669),M=i(9488),R=i(53725),O=i(78370),P=i(95935),F=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class B{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class H{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let W=class extends d.JT{constructor(e,t){super(),this._onDidChangeStickyScroll=this._store.add(new A.Q5),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._sessionStore=new d.SL,this._editor=e,this._languageFeaturesService=t,this._updateSoon=this._register(new I.pY((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(109)&&this.readConfiguration()}))),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){!1!==this._editor.getOption(109).enabled?(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this.update()}))),this.update()):this._sessionStore.clear()}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}update(){var e;return F(this,void 0,void 0,(function*(){null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new w.A,yield this.updateOutlineModel(this._cts.token),this._onDidChangeStickyScroll.fire()}))}updateOutlineModel(e){var t;return F(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=i.getVersionId(),o=this._model&&!(0,P.Xy)(this._model.uri,i.uri)?setTimeout((()=>{e.isCancellationRequested||(this._model=new j(i.uri,i.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())}),75):void 0,s=yield T.C3.create(this._languageFeaturesService.documentSymbolProvider,i,e);if(!e.isCancellationRequested){if(0!==s.children.size){const{stickyOutlineElement:e,providerID:o}=U.fromOutlineModel(s,null===(t=this._model)||void 0===t?void 0:t.outlineProviderId);this._model=new j(i.uri,n,e,o)}else{const t=O.FoldingController.get(this._editor),o=yield null==t?void 0:t.getFoldingModel();if(e.isCancellationRequested)return;if(o&&0!==o.regions.length){const e=U.fromFoldingModel(o);this._model=new j(i.uri,n,e,void 0)}else this._model=void 0}clearTimeout(o)}}))}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromOutline(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let e=0;e<t.children.length;e++){const i=t.children[e];i.range&&r.push(i.range.startLineNumber)}const a=this.updateIndex((0,M.ry)(r,e.startLineNumber,((e,t)=>e-t))),l=this.updateIndex((0,M.ry)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,o=a.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new H(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromOutline(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromOutline(e,a,i,n,o)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromOutline(e,this._model.element,n,0,-1);const o=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(o)for(const e of o)n=n.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return n}};var V,z;W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(V=1,z=u.p,function(e,t){z(e,t,V)})],W);class U{static comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}static fromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(U.fromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(U.fromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this.comparator(e.range,t.range)));const n=new B(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new U(n,i,void 0)}static fromOutlineModel(e,t){let i;if(R.$.first(e.children.values())instanceof T.H3){const n=R.$.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=U.findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new B(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new B(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this.comparator(i,n)}));for(const e of o)n.push(U.fromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new U(void 0,n,void 0),providerID:t}}static findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this.findSumOfRangesOfGroup(i);return e instanceof T.sT?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}static fromFoldingModel(e){const t=e.regions,i=t.length;let n;const o=[],s=new U(void 0,[],void 0);let r=s;for(let e=0;e<i;e++){for(n=new B(t.getStartLineNumber(e),t.getEndLineNumber(e)+1);0!==o.length&&(n.startLineNumber<o[o.length-1].startLineNumber||n.endLineNumber>o[o.length-1].endLineNumber);)o.pop(),void 0!==r.parent&&(r=r.parent);const i=new U(n,[],r);r.children.push(i),r=i,o.push(n)}return s}constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class j{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var K=i(5606),q=function(e,t){return function(i,n){t(i,n,e)}};let $=class extends d.JT{constructor(e,t,i,n){super(),this._editor=e,this._contextMenuService=t,this._sessionStore=new d.SL,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._stickyScrollWidget=new D(this._editor,i,n),this._stickyLineCandidateProvider=new W(this._editor,i),this._widgetState=new E([],0),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(109)&&this._readConfiguration()}))),this._readConfiguration(),this._register(g.nm(this._stickyScrollWidget.getDomNode(),g.tw.CONTEXT_MENU,(e=>{return t=this,i=void 0,o=function*(){this._onContextMenu(e)},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o})))}_onContextMenu(e){this._contextMenuService.showContextMenu({menuId:r.eH.StickyScrollContext,getAnchor:()=>e})}_readConfiguration(){if(!1===this._editor.getOption(109).enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),void this._sessionStore.clear();this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((()=>this._renderStickyScroll()))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>this._renderStickyScroll()))),2===this._editor.getOption(64).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>this._renderStickyScroll())))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){const e=this._editor.getLayoutInfo(),t=e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${t}px`;const i=e.height/this._editor.getOption(63);this._maxStickyLines=Math.round(.25*i)}_renderStickyScroll(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._stickyLineCandidateProvider.getVersionId();void 0!==t&&t!==e.getVersionId()||(this._widgetState=this.getScrollWidgetState(),this._stickyScrollWidget.setState(this._widgetState))}getScrollWidgetState(){const e=this._editor.getOption(63),t=Math.min(this._maxStickyLines,this._editor.getOption(109).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=this._editor.getVisibleRanges();if(0!==s.length){const r=new B(s[0].startLineNumber,s[s.length-1].endLineNumber),a=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(r);for(const s of a){const r=s.startLineNumber,a=s.endLineNumber,l=s.nestingDepth;if(a-r>0){const s=(l-1)*e,c=l*e,h=this._editor.getBottomForLineNumber(r)-i,d=this._editor.getTopForLineNumber(a)-i,u=this._editor.getBottomForLineNumber(a)-i;if(s>d&&s<=u){o.push(r),n=u-c;break}if(c>h&&c<=u&&o.push(r),o.length===t)break}}}return new E(o,n)}dispose(){super.dispose(),this._sessionStore.dispose()}};$.ID="store.contrib.stickyScrollController",$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([q(1,K.i),q(2,u.p),q(3,y.TG)],$),(0,n._K)($.ID,$,1),(0,r.r1)(c)},74961:(e,t,i)=>{"use strict";i.d(t,{_:()=>a,t:()=>r});var n=i(9488),o=i(75392),s=i(97295);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,s,r,l=o.mX.default,c){this.clipboardText=c,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const e=new Set;for(const[t,i]of this.getItemsByProvider())i.length>0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,c=[],h=!this._options.filterGraceful||l.length>2e3?o.EW:o.l7;for(let n=0;n<l.length;n++){const d=l[n];if(d.isInvalid)continue;const u=this._itemsByProvider.get(d.provider);u?u.push(d):this._itemsByProvider.set(d.provider,[d]);const g=d.position.column-d.editStart.column,p=g+i-(d.position.column-this._column);if(r.length!==p&&(r=0===p?"":t.slice(-p),a=r.toLowerCase()),d.word=r,0===p)d.score=o.CL.Default;else{let e=0;for(;e<g;){const t=r.charCodeAt(e);if(32!==t&&9!==t)break;e+=1}if(e>=p)d.score=o.CL.Default;else if("string"==typeof d.completion.filterText){const t=h(r,a,e,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,s.zY)(d.completion.filterText,d.textLabel)?d.score=t:(d.score=(0,o.jB)(r,a,e,d.textLabel,d.labelLow,0),d.score[0]=t[0])}else{const t=h(r,a,e,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;d.score=t}}d.idx=n,d.distance=this._wordDistance.distance(d.position,d.completion),c.push(d),e.push(d.textLabel.length)}this._filteredItems=c.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},55621:(e,t,i)=>{"use strict";i.d(t,{A9:()=>k,GI:()=>w,ZJ:()=>x,_y:()=>y,i5:()=>T,kL:()=>E,tG:()=>I});var n=i(71050),o=i(17301),s=i(75392),r=i(5976),a=i(84013),l=i(98401),c=i(70666),h=i(50187),d=i(24314),u=i(88216),g=i(35084),p=i(63580),m=i(84144),f=i(94565),_=i(38819),v=i(71922),b=i(22980),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const y={Visible:b.iX,HasFocusedSuggestion:new _.uy("suggestWidgetHasFocusedSuggestion",!1,(0,p.NC)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.uy("suggestWidgetDetailsVisible",!1,(0,p.NC)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.uy("suggestWidgetMultipleSuggestions",!1,(0,p.NC)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.uy("suggestionMakesTextEdit",!0,(0,p.NC)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.uy("acceptSuggestionOnEnter",!0,(0,p.NC)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.uy("suggestionHasInsertAndReplaceRange",!1,(0,p.NC)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.uy("suggestionInsertMode",void 0,{type:"string",description:(0,p.NC)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.uy("suggestionCanResolve",!1,(0,p.NC)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new m.eH("suggestWidgetStatusBar");class S{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=s.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,d.e.isIRange(t.range)?(this.editStart=new h.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new h.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new h.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||d.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new h.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new h.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new h.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||d.e.spansMultipleLines(t.range.insert)||d.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return C(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{(0,o.n2)(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class k{constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}function x(){}k.default=new k;class L{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function E(e,t,i,s=k.default,l={triggerKind:0},c=n.T.None){return C(this,void 0,void 0,(function*(){const n=new a.G(!0);i=i.clone();const h=t.getWordAtPosition(i),u=h?new d.e(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):d.e.fromPositions(i),p={replace:u,insert:u.setEndPosition(i.lineNumber,i.column)},m=[],f=new r.SL,_=[];let v=!1;const b=(e,t,n)=>{var o,a,l;let c=!1;if(!t)return c;for(const n of t.suggestions)if(!s.kindFilter.has(n.kind)){if(!s.showDeprecated&&(null===(o=null==n?void 0:n.tags)||void 0===o?void 0:o.includes(1)))continue;n.range||(n.range=p),n.sortText||(n.sortText="string"==typeof n.label?n.label:n.label.label),!v&&n.insertTextRules&&4&n.insertTextRules&&(v=g.Yj.guessNeedsClipboard(n.insertText)),m.push(new S(i,n,t,e)),c=!0}return(0,r.Wf)(t)&&f.add(t),_.push({providerName:null!==(a=e._debugDisplayName)&&void 0!==a?a:"unknown_provider",elapsedProvider:null!==(l=t.duration)&&void 0!==l?l:-1,elapsedOverall:n.elapsed()}),c},y=(()=>C(this,void 0,void 0,(function*(){})))();for(const n of e.orderedGroups(t)){let e=!1;if(yield Promise.all(n.map((n=>C(this,void 0,void 0,(function*(){if(s.providerItemsToReuse.has(n)){const t=s.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(s.providerFilter.size>0)||s.providerFilter.has(n))try{const o=new a.G(!0),s=yield n.provideCompletionItems(t,i,l,c);e=b(n,s,o)||e}catch(e){(0,o.Cp)(e)}}))))),e||c.isCancellationRequested)break}return yield y,c.isCancellationRequested?(f.dispose(),Promise.reject(new o.FU)):new L(m.sort((w=s.snippetSortOrder,D.get(w))),v,{entries:_,elapsed:n.elapsed()},f);var w}))}function N(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLow<t.sortTextLow)return-1;if(e.sortTextLow>t.sortTextLow)return 1}return e.textLabel<t.textLabel?-1:e.textLabel>t.textLabel?1:e.completion.kind-t.completion.kind}const D=new Map;function T(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}D.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return N(e,t)})),D.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return N(e,t)})),D.set(1,N),f.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,o,s,r]=t;(0,l.p_)(c.o.isUri(i)),(0,l.p_)(h.L.isIPosition(o)),(0,l.p_)("string"==typeof s||!s),(0,l.p_)("number"==typeof r||!r);const{completionProvider:a}=e.get(v.p),d=yield e.get(u.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield E(a,d.object.textEditorModel,h.L.lift(o),void 0,{triggerCharacter:null!=s?s:void 0,triggerKind:s?1:0});for(const o of i.items)t.length<(null!=r?r:0)&&t.push(o.resolve(n.T.None)),e.incomplete=e.incomplete||o.container.incomplete,e.suggestions.push(o.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{d.dispose()}}))));class I{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},24804:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SuggestController:()=>Ge,TriggerSuggestAction:()=>Ye});var n=i(85152),o=i(9488),s=i(15393),r=i(71050),a=i(17301),l=i(4669),c=i(8313),h=i(5976),d=i(1432),u=i(84013),g=i(98401),p=i(43407),m=i(16830),f=i(69386),_=i(50187),v=i(24314),b=i(29102),C=i(98762),y=i(35084),w=i(80378),S=i(38819);let k=class e{constructor(t,i){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(117)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(117);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};var x,L;k.AtEnd=new S.uy("atEndOfWord",!1),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,L=S.i6,function(e,t){L(e,t,x)})],k);var E=i(63580),N=i(94565),D=i(72065),T=i(43557),I=i(55621);let A=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){0!==t.items.length&&e._moveIndex(!0,t,i)!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i&&t.items[n].completion.additionalTextEdits;);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};A.OtherSuggestions=new S.uy("hasOtherSuggestions",!1),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,S.i6)],A);var M=i(44906);class R{constructor(e,t,i,n){this._disposables=new h.SL,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,o.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new M.q;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var O=i(97295),P=i(3860),F=i(85215),B=i(24477),H=i(84972),W=i(33108),V=i(10829),z=i(74961),U=i(71922),j=i(75392),K=function(e,t){return function(i,n){t(i,n,e)}};class q{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&n.endColumn===i.column&&!!isNaN(Number(n.word))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let $=class e{constructor(e,t,i,n,o,r,a,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=r,this._configurationService=a,this._languageFeaturesService=c,this._toDispose=new h.SL,this._triggerCharacterListener=new h.SL,this._triggerQuickSuggest=new s._F,this._triggerState=void 0,this._completionDisposables=new h.SL,this._onDidCancel=new l.Q5,this._onDidTrigger=new l.Q5,this._onDidSuggest=new l.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new P.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let d=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{d=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{d=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{d||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{d||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,h.B9)(this._triggerCharacterListener),(0,h.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(86)||!this._editor.hasModel()||!this._editor.getOption(115))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add((0,I.ZJ)()),e.set(i,n)),n.add(t)}const t=t=>{var i;if(!function(e,t,i){var n,o;if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const s=i.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters",{overrideIdentifier:null===(n=e.getModel())||void 0===n?void 0:n.getLanguageId(),resource:null===(o=e.getModel())||void 0===o?void 0:o.uri});return void 0!==s&&Boolean(s)}(this._editor,this._contextKeyService,this._configurationService))return;if(q.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";(0,O.YK)(t.charCodeAt(t.length-1))?(0,O.ZG)(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const o=e.get(n);if(o){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())o.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){I.tG.isAllOff(this._editor.getOption(84))||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!q.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(84);if(!I.tG.isAllOff(i)){if(!I.tG.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==I.tG.valueFor(i,o))return}(function(e,t,i){var n,o;if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const s=i.getValue("editor.inlineSuggest.allowQuickSuggestions",{overrideIdentifier:null===(n=e.getModel())||void 0===n?void 0:n.getLanguageId(),resource:null===(o=e.getModel())||void 0===o?void 0:o.uri});return void 0!==s&&Boolean(s)})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(85)))}_refilterCompletionItems(){(0,g.p_)(this._editor.hasModel()),(0,g.p_)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new q(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(i)}trigger(t){var i,n,o,s,l,c;if(!this._editor.hasModel())return;const h=this._editor.getModel(),d=new q(h,this._editor.getPosition(),t);this.cancel(t.retrigger),this._triggerState=t,this._onDidTrigger.fire({auto:t.auto,shy:null!==(i=t.shy)&&void 0!==i&&i,position:this._editor.getPosition()}),this._context=d;let u={triggerKind:null!==(n=t.triggerKind)&&void 0!==n?n:0};t.triggerCharacter&&(u={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new r.A;let g=1;switch(this._editor.getOption(106)){case"top":g=0;break;case"bottom":g=2}const{itemKind:p,showDeprecated:m}=e._createSuggestFilter(this._editor),f=new I.A9(g,null!==(s=null===(o=t.completionOptions)||void 0===o?void 0:o.kindFilter)&&void 0!==s?s:p,null===(l=t.completionOptions)||void 0===l?void 0:l.providerFilter,null===(c=t.completionOptions)||void 0===c?void 0:c.providerItemsToReuse,m),_=B.K.create(this._editorWorkerService,this._editor),v=(0,I.kL)(this._languageFeaturesService.completionProvider,h,this._editor.getPosition(),f,u,this._requestToken.token);Promise.all([v,_]).then((([e,i])=>{return n=this,o=void 0,r=function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let o=null==t?void 0:t.clipboardText;if(!o&&e.needsClipboard&&(o=yield this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),r=new q(s,this._editor.getPosition(),t),a=Object.assign(Object.assign({},j.mX.default),{firstMatchCanBeWeak:!this._editor.getOption(112).matchOnWordStartOnly});this._completionModel=new z._(e.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(112),this._editor.getOption(106),a,o),this._completionDisposables.add(e.disposable),this._onNewContext(r),this._reportDurationsTelemetry(e.durations)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r})).catch(a.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(106)&&t.add(27);const i=e.getOption(112);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,O.V8)(e.leadingLineContent)===(0,O.V8)(this._context.leadingLineContent)){if(e.column<this._context.column)e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();else if(this._completionModel)if(0!==e.leadingWord.word.length&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(q.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=q.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});if(this._context.triggerOptions.auto)return void this.cancel();if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([K(1,F.p),K(2,H.p),K(3,V.b),K(4,T.VZ),K(5,S.i6),K(6,W.Ui),K(7,U.p)],$);class G{constructor(e,t){this._disposables=new h.SL,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;e<i;e++)if(!t[e].isEmpty()){n=!0;break}if(!n)return void(0!==this._lastOvertyped.length&&(this._lastOvertyped.length=0));this._lastOvertyped=[];const o=e.getModel();for(let e=0;e<i;e++){const i=t[e];if(o.getValueLengthInRange(i)>G._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}G._maxSelectionLength=51200;var Q=i(65321),Y=i(43799),Z=i(59870),X=i(84527),J=i(90317),ee=i(22444),te=i(84144),ie=function(e,t){return function(i,n){t(i,n,e)}};class ne extends ee.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,E.NC)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,ne.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let oe=class{constructor(e,t,i,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new h.SL,this.element=Q.R3(e,Q.$(".suggest-status-bar"));const s=e=>e instanceof te.U8?i.createInstance(ne,e,void 0):void 0;this._leftActions=new J.o(this.element,{actionViewItemProvider:s}),this._rightActions=new J.o(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ie(2,D.TG),ie(3,te.co),ie(4,S.i6)],oe),i(71713);var se=i(26904),re=i(73910),ae=i(92321),le=i(97781),ce=i(73098);class he{constructor(){let e;this._onDidWillResize=new l.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new l.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new h.SL,this._size=new Q.Ro(0,0),this._minSize=new Q.Ro(0,0),this._maxSize=new Q.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new ce.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new ce.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new ce.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:ce.l.North}),this._southSash=new ce.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:ce.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(l.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(l.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(l.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(l.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(n,Math.min(s,t));const r=new Q.Ro(t,e);Q.Ro.equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}var de=i(9802),ue=i(73046),ge=i(25670),pe=i(59365),me=i(45241);function fe(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let _e=class{constructor(e,t){this._editor=e,this._onDidClose=new l.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new h.SL,this._renderDisposeable=new h.SL,this._borderWidth=1,this._size=new Q.Ro(330,0),this.domNode=Q.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(me.$,{editor:e}),this._body=Q.$(".body"),this._scrollbar=new de.s$(this._body,{alwaysConsumeMouseWheel:!0}),Q.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Q.R3(this._body,Q.$(".header")),this._close=Q.R3(this._header,Q.$("span"+ge.k.asCSSSelector(ue.l.close))),this._close.title=E.NC("details.close","Close"),this._type=Q.R3(this._header,Q.$("p.type")),this._docs=Q.R3(this._body,Q.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(47)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(47),i=t.getMassagedFontFamily(),n=e.get(113)||t.fontSize,o=e.get(114)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(114)||this._editor.getOption(47).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=E.NC("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,s=(new pe.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||fe(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,Q.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else Q.PO(this._type),this._type.title="",Q.Cp(this._type),this.domNode.classList.add("no-type");if(Q.PO(this._docs),"string"==typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Q.PO(this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Q.Ro(e,t);Q.Ro.equals(i,this._size)||(this._size=i,Q.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};_e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,D.TG)],_e);class ve{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new h.SL,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new he,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const o=Q.D6(document.body),s=this.widget.getLayoutInfo(),r=new Q.Ro(220,2*s.lineHeight),a=e.top,l=function(){const i=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),n=-s.borderWidth+e.left+e.width,l=new Q.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:r.with(Math.min(i,r.width))}}(),c=[l,function(){const i=e.left-s.borderWidth-s.horizontalPadding,n=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new Q.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:r.with(Math.min(i,r.width))}}(),function(){const i=e.left,n=-s.borderWidth+e.top+e.height,a=new Q.Ro(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}()],h=null!==(n=c.find((e=>e.fit>=0)))&&void 0!==n?n:c.sort(((e,t)=>t.fit-e.fit))[0],d=e.top+e.height-s.borderHeight;let u,g=t.height;const p=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);let m;g>p&&(g=p),i?g<=h.maxSizeTop.height?(u=!0,m=h.maxSizeTop):(u=!1,m=h.maxSizeBottom):g<=h.maxSizeBottom.height?(u=!1,m=h.maxSizeBottom):(u=!0,m=h.maxSizeTop),this._applyTopLeft({left:h.left,top:u?h.top:d-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,h===l,u,h!==l),this._resizable.minSize=h.minSize,this._resizable.maxSize=m,this._resizable.layout(g,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var be,Ce=i(59834),ye=i(70666),we=i(96887),Se=i(66663),ke=i(95935),xe=i(68801);!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(be||(be={}));const Le=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function Ee(e,t,i,n){const o=n===be.ROOT_FOLDER?["rootfolder-icon"]:n===be.FOLDER?["folder-icon"]:["file-icon"];if(i){let s;if(i.scheme===Se.lg.data)s=ke.Vb.parseMetaData(i).get(ke.Vb.META_DATA_LABEL);else{const e=i.path.match(Le);e?(s=Ne(e[2].toLowerCase()),e[1]&&o.push(`${Ne(e[1].toLowerCase())}-name-dir-icon`)):s=Ne(i.authority.toLowerCase())}if(n===be.FOLDER)o.push(`${s}-name-folder-icon`);else{if(s){if(o.push(`${s}-name-file-icon`),o.push("name-file-icon"),s.length<=255){const e=s.split(".");for(let t=1;t<e.length;t++)o.push(`${e.slice(t).join(".")}-ext-file-icon`)}o.push("ext-file-icon")}const n=function(e,t,i){if(!i)return null;let n=null;if(i.scheme===Se.lg.data){const e=ke.Vb.parseMetaData(i).get(ke.Vb.META_DATA_MIME);e&&(n=t.getLanguageIdByMimeType(e))}else{const t=e.getModel(i);t&&(n=t.getLanguageId())}return n&&n!==xe.bd?n:t.guessLanguageIdByFilepathOrFirstLine(i)}(e,t,i);n&&o.push(`${Ne(n)}-lang-file-icon`)}}return o}function Ne(e){return e.replace(/[\11\12\14\15\40]/g,"/")}var De,Te=i(73733),Ie=i(72042),Ae=function(e,t){return function(i,n){t(i,n,e)}};function Me(e){return`suggest-aria-id:${e}`}const Re=(0,i(59554).q5)("suggest-more-info",ue.l.chevronRight,E.NC("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Oe=new((De=class e{extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if("string"==typeof t.completion.documentation){const n=e._regexRelaxed.exec(t.completion.documentation);if(n&&(0===n.index||n.index+n[0].length===t.completion.documentation.length))return i[0]=n[0],!0}return!1}})._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,De._regexStrict=new RegExp(`^${De._regexRelaxed.source}$`,"i"),De);let Pe=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new l.Q5,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new h.SL,t.root=e,t.root.classList.add("show-file-icons"),t.icon=(0,Q.R3)(e,(0,Q.$)(".icon")),t.colorspan=(0,Q.R3)(t.icon,(0,Q.$)("span.colorspan"));const i=(0,Q.R3)(e,(0,Q.$)(".contents")),n=(0,Q.R3)(i,(0,Q.$)(".main"));t.iconContainer=(0,Q.R3)(n,(0,Q.$)(".icon-label.codicon")),t.left=(0,Q.R3)(n,(0,Q.$)("span.left")),t.right=(0,Q.R3)(n,(0,Q.$)("span.right")),t.iconLabel=new Ce.g(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=(0,Q.R3)(t.left,(0,Q.$)("span.signature-label")),t.qualifierLabel=(0,Q.R3)(t.left,(0,Q.$)("span.qualifier-label")),t.detailsLabel=(0,Q.R3)(t.right,(0,Q.$)("span.details-label")),t.readMore=(0,Q.R3)(t.right,(0,Q.$)("span.readMore"+ge.k.asCSSSelector(Re))),t.readMore.title=E.NC("readMore","Read More");const o=()=>{const e=this._editor.getOptions(),i=e.get(47),o=i.getMassagedFontFamily(),s=i.fontFeatureSettings,r=e.get(113)||i.fontSize,a=e.get(114)||i.lineHeight,l=i.fontWeight,c=`${r}px`,h=`${a}px`,d=`${i.letterSpacing}px`;t.root.style.fontSize=c,t.root.style.fontWeight=l,t.root.style.letterSpacing=d,n.style.fontFamily=o,n.style.fontFeatureSettings=s,n.style.lineHeight=h,t.icon.style.height=h,t.icon.style.width=h,t.readMore.style.height=h,t.readMore.style.width=h};return o(),t.disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(47)||e.hasChanged(113)||e.hasChanged(114))&&o()}))),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=Me(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,j.mB)(e.score)},s=[];if(19===n.kind&&Oe.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=Ee(this._modelService,this._languageService,ye.o.from({scheme:"fake",path:e.textLabel}),be.FILE),s=Ee(this._modelService,this._languageService,ye.o.from({scheme:"fake",path:n.detail}),be.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[Ee(this._modelService,this._languageService,ye.o.from({scheme:"fake",path:e.textLabel}),be.FOLDER),Ee(this._modelService,this._languageService,ye.o.from({scheme:"fake",path:n.detail}),be.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ge.k.asClassNameArray(we.gX.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Fe(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Fe(n.label.detail||""),i.detailsLabel.textContent=Fe(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(112).showInlineDetails?(0,Q.$Z)(i.detailsLabel):(0,Q.Cp)(i.detailsLabel),fe(e)?(i.right.classList.add("can-expand-details"),(0,Q.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,Q.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Fe(e){return e.replace(/\r\n|\r|\n/g,"")}Pe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ae(1,Te.q),Ae(2,Ie.O),Ae(3,le.XE)],Pe);var Be=i(86253),He=function(e,t){return function(i,n){t(i,n,e)}};(0,re.P6G)("editorSuggestWidget.background",{dark:re.D0T,light:re.D0T,hcDark:re.D0T,hcLight:re.D0T},E.NC("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,re.P6G)("editorSuggestWidget.border",{dark:re.D1_,light:re.D1_,hcDark:re.D1_,hcLight:re.D1_},E.NC("editorSuggestWidgetBorder","Border color of the suggest widget."));const We=(0,re.P6G)("editorSuggestWidget.foreground",{dark:re.NOs,light:re.NOs,hcDark:re.NOs,hcLight:re.NOs},E.NC("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,re.P6G)("editorSuggestWidget.selectedForeground",{dark:re.NPS,light:re.NPS,hcDark:re.NPS,hcLight:re.NPS},E.NC("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,re.P6G)("editorSuggestWidget.selectedIconForeground",{dark:re.cbQ,light:re.cbQ,hcDark:re.cbQ,hcLight:re.cbQ},E.NC("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Ve=(0,re.P6G)("editorSuggestWidget.selectedBackground",{dark:re.Vqd,light:re.Vqd,hcDark:re.Vqd,hcLight:re.Vqd},E.NC("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,re.P6G)("editorSuggestWidget.highlightForeground",{dark:re.Gwp,light:re.Gwp,hcDark:re.Gwp,hcLight:re.Gwp},E.NC("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,re.P6G)("editorSuggestWidget.focusHighlightForeground",{dark:re.PX0,light:re.PX0,hcDark:re.PX0,hcLight:re.PX0},E.NC("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,re.P6G)("editorSuggestWidgetStatus.foreground",{dark:(0,re.ZnX)(We,.5),light:(0,re.ZnX)(We,.5),hcDark:(0,re.ZnX)(We,.5),hcLight:(0,re.ZnX)(We,.5)},E.NC("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class ze{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof X.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Q.Ro.is(e))return Q.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ue=class e{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new h.XK,this._pendingShowDetails=new h.XK,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new s._F,this._disposables=new h.SL,this._onDidSelect=new l.K3,this._onDidFocus=new l.K3,this._onDidHide=new l.Q5,this._onDidShow=new l.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new he,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new je(this,e),this._persistedSize=new ze(t,e);class r{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let a;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),a=new r(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),a&&(a.persistHeight=a.persistHeight||!!e.north||!!e.south,a.persistWidth=a.persistWidth||!!e.east||!!e.west),e.done){if(a){const{itemHeight:e,defaultSize:s}=this.getLayoutInfo(),r=Math.round(e/2);let{width:l,height:c}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-c)<=r)&&(c=null!==(i=null===(t=a.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:s.height),(!a.persistWidth||Math.abs(a.currentSize.width-l)<=r)&&(l=null!==(o=null===(n=a.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:s.width),this._persistedSize.store(new Q.Ro(l,c))}this._contentWidget.unlockPreference(),a=void 0}}))),this._messageElement=Q.R3(this.element.domNode,Q.$(".message")),this._listElement=Q.R3(this.element.domNode,Q.$(".tree"));const c=o.createInstance(_e,this.editor);c.onDidClose(this.toggleDetails,this,this._disposables),this._details=new ve(c,this.editor);const d=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(112).showIcons);d();const u=o.createInstance(Pe,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new Y.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>E.NC("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=E.NC("label.full","{0}{1}, {2}",t,i,n):i?t=E.NC("label.detail","{0}{1}",t,i):n&&(t=E.NC("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,o=O.WU("{0}{1}",n||"",i?"string"==typeof i?i:i.value:"");return E.NC("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}}}),this._list.style((0,Be.TU)({listInactiveFocusBackground:Ve,listInactiveFocusOutline:re.xL1})),this._status=o.createInstance(oe,this.element.domNode,I.GI);const g=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(112).showStatusBar);g(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(112)&&(g(),d())}))),this._ctxSuggestWidgetVisible=I._y.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=I._y.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=I._y.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=I._y.HasFocusedSuggestion.bindTo(i),this._disposables.add(Q.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,ae.c3)(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,s.PG)((e=>{return t=this,n=void 0,r=function*(){const t=(0,s.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose())),o=yield i.resolve(e);return t.dispose(),n.dispose(),o},new((o=void 0)||(o=Promise))((function(e,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(t,n||[])).next())}));var t,n,o,r})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Me(n)}))})).catch(a.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:Q.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,Q.Cp(this._listElement,this._status.element),Q.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Q.Cp(this._listElement,this._status.element),Q.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:Q.Cp(this._messageElement),Q.$Z(this._listElement,this._status.element),this._show();break;case 5:Q.Cp(this._messageElement),Q.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,s.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(s=this._loadingTimeout)||void 0===s||s.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=Q.lI((()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!fe(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=Q.lI((()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return 4===this._state}_afterRender(e){null!==e?2!==this._state&&1!==this._state&&(this._isDetailsVisible()&&this._details.show(),this._positionDetails()):this._isDetailsVisible()&&this._details.hide()}_layout(e){var t,i,n;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const o=Q.D6(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let r=e.height,a=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,2===this._state||1===this._state)r=s.itemHeight+s.borderHeight,a=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Q.Ro(a,r),this._contentWidget.setPreference(2);else{const l=o.width-s.borderHeight-2*s.horizontalPadding;a>l&&(a=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:a,h=s.statusBarHeight+this._list.contentHeight+s.borderHeight,d=s.itemHeight+s.statusBarHeight,u=Q.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-s.verticalPadding,h),f=u.top+g.top-s.verticalPadding,_=Math.min(f,h);let v=Math.min(Math.max(_,m)+s.borderHeight,h);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),r<d&&(r=d),r>v&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new Q.Ro(c,s.defaultSize.height),this.element.maxSize=new Q.Ro(l,v),this.element.minSize=new Q.Ro(220,d),this._cappedHeight=r===h?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(47),t=(0,Z.uZ)(this.editor.getOption(114)||e.lineHeight,8,1e3),i=this.editor.getOption(112).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Q.Ro(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ue.LOADING_MESSAGE=E.NC("suggestWidget.loading","Loading..."),Ue.NO_SUGGESTIONS_MESSAGE=E.NC("suggestWidget.noSuggestions","No suggestions."),Ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([He(1,se.Uy),He(2,S.i6),He(3,le.XE),He(4,D.TG)],Ue);class je{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Q.Ro(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Ke=i(89954),qe=function(e,t){return function(i,n){t(i,n,e)}};class $e{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:v.e.fromPositions(t,n),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Ge=class e{static get(t){return t.getContribution(e.ID)}constructor(e,t,i,n,o,r,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=r,this._telemetryService=a,this._lineSuffix=new h.XK,this._toDispose=new h.SL,this._selectors=new Qe((e=>e.priority)),this._telemetryGate=0,this.editor=e,this.model=o.createInstance($,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const l=I._y.InsertMode.bindTo(n);l.set(e.getOption(112).insertMode),this.model.onDidTrigger((()=>l.set(e.getOption(112).insertMode))),this.widget=this._toDispose.add(new s.Ue((()=>{const e=this._instantiationService.createInstance(Ue,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new R(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=I._y.MakesTextEdit.bindTo(this._contextKeyService),n=I._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=I._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,h.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!_.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new c.$M(!0,!1,!1,!1,33))||d.dz&&e.toKeyCodeChord().equals(new c.$M(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new s.Ue((()=>this._toDispose.add(new G(this.editor,this.model))))),this._alternatives=this._toDispose.add(new s.Ue((()=>this._toDispose.add(new A(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(k,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new $e(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{var t;if(e.triggerOptions.shy)return;let i=-1;for(const t of this._selectors.itemsOrderedByPriorityDesc)if(i=t.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==i)break;-1===i&&(i=0);let n=!1;if(e.triggerOptions.auto){const i=this.editor.getOption(112);i.snippetsPreventQuickSuggestions&&(null===(t=C.SnippetController2.get(this.editor))||void 0===t?void 0:t.isInSnippet())?n=!0:"never"===i.selectionMode||"always"===i.selectionMode?n="never"===i.selectionMode:"whenTriggerCharacter"===i.selectionMode?n=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===i.selectionMode&&(n=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,i,e.isFrozen,e.triggerOptions.auto,n)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const u=I._y.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);u.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=C.SnippetController2.get(this.editor);if(!i)return;const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,l=[],c=new r.A;1&t||this.editor.pushUndoStop();const h=this.getOverwriteInfo(s,Boolean(8&t));if(this._memoryService.memorize(n,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){const e=p.Z.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>f.h.replaceMove(v.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){const e=new u.G(!0);let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return c.cancel(),void o.dispose();for(const t of e.changes){const e=v.e.getEndPosition(t.range);i&&!_.L.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const h=this.editor.onWillType((()=>{h.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(s.resolve(c.token).then((()=>{if(!s.completion.additionalTextEdits||c.token.isCancellationRequested)return!1;if(i&&s.completion.additionalTextEdits.some((e=>_.L.isBefore(i,v.e.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.Z.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>f.h.replaceMove(v.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),o.dispose(),h.dispose()})))}let{insertText:d}=s.completion;4&s.completion.insertTextRules||(d=y.Yj.escape(d)),this.model.cancel(),i.insert(d,{overwriteBefore:h.overwriteBefore,overwriteAfter:h.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command&&(s.completion.command.id===Ye.id?this.model.trigger({auto:!0,retrigger:!0}):l.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(a.dL))),4&t&&this._alternatives.value.set(e,(e=>{for(c.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,e),this.model.clear(),c.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i){var n;if(this._telemetryGate++%100!=0)return;const o=e.extensionId?e.extensionId.value:(null!==(n=i.item.provider._debugDisplayName)&&void 0!==n?n:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:o,kind:e.completion.kind,basenameHash:(0,Ke.vp)((0,ke.EZ)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,ke.DZ)(t.uri)})}getOverwriteInfo(e,t){(0,g.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(112).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.Of)(e.completion.additionalTextEdits)){const t=E.NC("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,n.Z9)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};l.ju.once(this.model.onDidTrigger)((e=>{const t=[];l.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,h.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,h.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Ge.ID="editor.contrib.suggestController",Ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([qe(1,w.Fh),qe(2,N.H),qe(3,S.i6),qe(4,D.TG),qe(5,T.VZ),qe(6,V.b)],Ge);class Qe{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class Ye extends m.R6{constructor(){super({id:Ye.id,label:E.NC("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.Ao.and(b.u.writable,b.u.hasCompletionItemProvider,I._y.Visible.toNegated()),kbOpts:{kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Ge.get(t);if(!n)return;let o;i&&"object"==typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}Ye.id="editor.action.triggerSuggest",(0,m._K)(Ge.ID,Ge,2),(0,m.Qr)(Ye);const Ze=190,Xe=m._l.bindToContribution(Ge.get);(0,m.fK)(new Xe({id:"acceptSelectedSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.Ao.and(I._y.Visible,b.u.textInputFocus),weight:Ze},{primary:3,kbExpr:S.Ao.and(I._y.Visible,b.u.textInputFocus,I._y.AcceptSuggestionsOnEnter,I._y.MakesTextEdit),weight:Ze}],menuOpts:[{menuId:I.GI,title:E.NC("accept.insert","Insert"),group:"left",order:1,when:I._y.HasInsertAndReplaceRange.toNegated()},{menuId:I.GI,title:E.NC("accept.insert","Insert"),group:"left",order:1,when:S.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert"))},{menuId:I.GI,title:E.NC("accept.replace","Replace"),group:"left",order:1,when:S.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace"))}]})),(0,m.fK)(new Xe({id:"acceptAlternativeSelectedSuggestion",precondition:S.Ao.and(I._y.Visible,b.u.textInputFocus,I._y.HasFocusedSuggestion),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I.GI,group:"left",order:2,when:S.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert")),title:E.NC("accept.replace","Replace")},{menuId:I.GI,group:"left",order:2,when:S.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace")),title:E.NC("accept.insert","Insert")}]})),N.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,m.fK)(new Xe({id:"hideSuggestWidget",precondition:I._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})),(0,m.fK)(new Xe({id:"selectNextSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,m.fK)(new Xe({id:"selectNextPageSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:12,secondary:[2060]}})),(0,m.fK)(new Xe({id:"selectLastSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),(0,m.fK)(new Xe({id:"selectPrevSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,m.fK)(new Xe({id:"selectPrevPageSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:11,secondary:[2059]}})),(0,m.fK)(new Xe({id:"selectFirstSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),(0,m.fK)(new Xe({id:"focusSuggestion",precondition:S.Ao.and(I._y.Visible,I._y.HasFocusedSuggestion.negate(),S.Ao.equals("config.editor.suggest.selectQuickSuggestions",!1)),handler:e=>e.focusSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,m.fK)(new Xe({id:"toggleSuggestionDetails",precondition:S.Ao.and(I._y.Visible,I._y.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:I.GI,group:"right",order:1,when:S.Ao.and(I._y.DetailsVisible,I._y.CanResolve),title:E.NC("detail.more","show less")},{menuId:I.GI,group:"right",order:1,when:S.Ao.and(I._y.DetailsVisible.toNegated(),I._y.CanResolve),title:E.NC("detail.less","show more")}]})),(0,m.fK)(new Xe({id:"toggleExplainMode",precondition:I._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,m.fK)(new Xe({id:"toggleSuggestionFocus",precondition:I._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,m.fK)(new Xe({id:"insertBestCompletion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),k.AtEnd,I._y.Visible.toNegated(),A.OtherSuggestions.toNegated(),C.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:Ze,primary:2}})),(0,m.fK)(new Xe({id:"insertNextSuggestion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),A.OtherSuggestions,I._y.Visible.toNegated(),C.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:2}})),(0,m.fK)(new Xe({id:"insertPrevSuggestion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),A.OtherSuggestions,I._y.Visible.toNegated(),C.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:Ze,kbExpr:b.u.textInputFocus,primary:1026}})),(0,m.Qr)(class extends m.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:E.NC("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=Ge.get(t))||void 0===i||i.resetWidgetSize()}})},88088:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SuggestInlineCompletions:()=>w});var n=i(71050),o=i(75392),s=i(53725),r=i(5976),a=i(16830),l=i(11640),c=i(24314),h=i(71922),d=i(70902),u=i(74961),g=i(55621),p=i(80378),m=i(24477),f=i(84972),_=i(72065),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};class C{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let y=class extends r.L6{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}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&&0===this.completionModel.getIncompleteProvider().size}get items(){var e;const t=[],{items:i}=this.completionModel,r=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},i),a=s.$.slice(i,r),l=s.$.slice(i,0,r);let h=5;for(const i of s.$.concat(a,l)){if(i.score===o.CL.Default)continue;const s=new c.e(i.editStart.lineNumber,i.editStart.column,i.editInsertEnd.lineNumber,i.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),r=i.completion.insertTextRules&&i.completion.insertTextRules&d.a7.InsertAsSnippet?{snippet:i.completion.insertText}:i.completion.insertText;t.push(new C(s,r,null!==(e=i.filterTextLow)&&void 0!==e?e:i.labelLow,i.completion.additionalTextEdits,i.completion.command,i)),h-- >=0&&i.resolve(n.T.None)}return t}};y=v([b(5,p.Fh)],y);let w=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var o,s,r,a,l;return s=this,r=void 0,l=function*(){if(i.selectedSuggestionInfo)return;const s=this._getEditorOption(84,e);if(g.tG.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==g.tG.valueFor(s,a))return;let l,h,d=e.getWordAtPosition(t);if((null==d?void 0:d.word)||(l=this._getTriggerCharacterInfo(e,t)),!(null==d?void 0:d.word)&&!l)return;if(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column)return;const p=e.getValueInRange(new c.e(t.lineNumber,1,t.lineNumber,t.column));if(!l&&(null===(o=this._lastResult)||void 0===o?void 0:o.canBeReused(e,t.lineNumber,d))){const e=new u.t(p,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),h=this._lastResult}else{const i=yield(0,g.kL)(this._languageFeatureService.completionProvider,e,t,new g.A9(void 0,void 0,null==l?void 0:l.providers),l&&{triggerKind:1,triggerCharacter:l.ch},n);let o;i.needsClipboard&&(o=yield this._clipboardService.readText());const s=new u._(i.items,t.column,new u.t(p,0),m.K.None,this._getEditorOption(112,e),this._getEditorOption(106,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);h=new y(e,t.lineNumber,d,s,i,this._suggestMemoryService)}return this._lastResult=h,h},new((a=void 0)||(a=Promise))((function(e,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function n(e){try{o(l.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a((function(e){e(o)}))).then(i,n)}o((l=l.apply(s,r||[])).next())}))}handleItemDidShow(e,t){t.completion.resolve(n.T.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(c.e.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))(null===(i=t.triggerCharacters)||void 0===i?void 0:i.includes(n))&&o.add(t);if(0!==o.size)return{providers:o,ch:n}}};w=v([b(1,h.p),b(2,f.p),b(3,p.Fh)],w);let S=class e{constructor(t,i,n,o){if(1==++e._counter){const s=o.createInstance(w,((e,i)=>{var o;return(null!==(o=n.listCodeEditors().find((e=>e.getModel()===i)))&&void 0!==o?o:t).getOption(e)}));e._disposable=i.inlineCompletionsProvider.register("*",s)}}dispose(){var t;0==--e._counter&&(null===(t=e._disposable)||void 0===t||t.dispose(),e._disposable=void 0)}};S._counter=0,S=v([b(1,h.p),b(2,l.$),b(3,_.TG)],S),(0,a._K)("suggest.inlineCompletionsProvider",S,0)},80378:(e,t,i)=>{"use strict";i.d(t,{Fh:()=>f});var n=i(15393),o=i(5976),s=i(43702),r=i(4767),a=i(96887),l=i(33108),c=i(65026),h=i(72065),d=i(26904),u=function(e,t){return function(i,n){t(i,n,e)}};class g{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;e<i.length;e++){const{score:t,completion:o}=i[e];if(t[0]!==n)break;if(o.preselect)return e}return 0}}class p extends g{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}let m=class e{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new o.SL,this._persistSoon=new n.pY((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===d.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:t.getLanguageIdAtPosition(i.lineNumber,i.column),resource:t.uri});if((null===(n=this._strategy)||void 0===n?void 0:n.name)!==o){this._saveState();const t=e._strategyCtors.get(o)||p;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=this._storageService.get(`${e._storagePrefix}/${o}`,t);i&&this._strategy.fromJSON(JSON.parse(i))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,i,t,1)}}};m._strategyCtors=new Map([["recentlyUsedByPrefix",class extends g{constructor(){super("recentlyUsedByPrefix"),this._trie=r.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;e<i.length;e++){const{kind:t,insertText:n}=i[e].completion;if(t===s.type&&n===s.insertText)return e}return super.select(e,t,i)}toJSON(){const e=[];return this._trie.forEach(((t,i)=>e.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:a.gX.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends g{constructor(){super("recentlyUsed"),this._cache=new s.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const o=i[0].score[0];let s=-1,r=-1;for(let t=0;t<i.length&&i[t].score[0]===o;t++){const n=`${e.getLanguageId()}/${i[t].textLabel}`,o=this._cache.peek(n);if(o&&o.touch>r&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(r=o.touch,s=t),i[t].completion.preselect)return t}return-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:a.gX.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",p]]),m._storagePrefix="suggest/memories",m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([u(0,d.Uy),u(1,l.Ui)],m);const f=(0,h.yh)("ISuggestMemories");(0,c.z)(f,m,1)},24477:(e,t,i)=>{"use strict";i.d(t,{K:()=>r});var n=i(9488),o=i(24314),s=i(79694);class r{static create(e,t){return i=this,a=void 0,c=function*(){if(!t.getOption(112).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=yield(new s.x).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const c=yield e.computeWordRanges(i.uri,l[0].range);if(!c)return r.None;const h=i.getWordUntilPosition(a);return delete c[h.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const s="string"==typeof i.label?i.label:i.label.label,r=c[s];if((0,n.XY)(r))return 2<<20;const h=(0,n.ry)(r,o.e.fromPositions(e),o.e.compareRangesUsingStarts),d=h>=0?r[h]:r[Math.max(0,~h-1)];let u=l.length;for(const e of l){if(!o.e.containsRange(e.range,d))break;u-=1}return u}}},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{s(c.next(e))}catch(e){t(e)}}function o(e){try{s(c.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,o)}s((c=c.apply(i,a||[])).next())}));var i,a,l,c}}r.None=new class extends r{distance(){return 0}}},71713:(e,t,i)=>{"use strict";var n=i(63580),o=i(73910);(0,o.P6G)("symbolIcon.arrayForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.booleanForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.NC)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.colorForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.constantForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.NC)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.NC)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.NC)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.NC)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.NC)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.fileForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.folderForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.NC)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.NC)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.keyForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.keywordForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.NC)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.moduleForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.namespaceForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.nullForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.numberForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.objectForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.operatorForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.packageForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.propertyForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.referenceForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.snippetForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.stringForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.structForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.textForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.typeParameterForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.unitForeground",{dark:o.dRz,light:o.dRz,hcDark:o.dRz,hcLight:o.dRz},(0,n.NC)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.P6G)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.NC)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},64662:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ToggleTabFocusModeAction:()=>a});var n=i(85152),o=i(37940),s=i(16830),r=i(63580);class a extends s.R6{constructor(){super({id:a.ID,label:r.NC({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const i=!o.n.getTabFocusMode();o.n.setTabFocusMode(i),i?(0,n.Z9)(r.NC("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.Z9)(r.NC("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",(0,s.Qr)(a)},52614:(e,t,i)=>{"use strict";i.r(t);var n=i(84013),o=i(16830),s=i(63580);class r extends o.R6{constructor(){super({id:"editor.action.forceRetokenize",label:s.NC("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const o=new n.G(!0);i.tokenization.forceTokenization(i.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}}(0,o.Qr)(r)},52954:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DisableHighlightingInCommentsAction:()=>J,DisableHighlightingInStringsAction:()=>ee,DisableHighlightingOfAmbiguousCharactersAction:()=>te,DisableHighlightingOfInvisibleCharactersAction:()=>ie,DisableHighlightingOfNonBasicAsciiCharactersAction:()=>ne,ShowExcludeOptions:()=>oe,UnicodeHighlighter:()=>K,UnicodeHighlighterHoverParticipant:()=>G,warningIcon:()=>j});var n=i(15393),o=i(73046),s=i(59365),r=i(5976),a=i(1432),l=i(97295),c=i(16830),h=i(64141),d=i(82948),u=i(31446),g=i(85215),p=i(72042),m=i(30168),f=i(66520),_=i(22374),v=i(65321),b=i(90317),C=i(74741),y=i(45241),w=i(72065),S=i(4850),k=i(59069),x=i(10553),L=i(4669),E=i(50988);let N=class extends r.JT{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){var o;super(),this._link=t,this._enabled=!0,this.el=(0,v.R3)(e,(0,v.$)("a.monaco-link",{tabIndex:null!==(o=t.tabIndex)&&void 0!==o?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const s=this._register(new S.Y(this.el,"click")),r=this._register(new S.Y(this.el,"keypress")),a=L.ju.chain(r.event).map((e=>new k.y(e))).filter((e=>3===e.keyCode)).event,l=this._register(new S.Y(this.el,x.t.Tap)).event;this._register(x.o.addTarget(this.el));const c=L.ju.any(s.event,a,l);this._register(c((e=>{this.enabled&&(v.zB.stop(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}};var D,T;N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(D=3,T=E.v4,function(e,t){T(e,t,D)})],N);var I=i(59554),A=i(25670),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends r.JT{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(P))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}})),this._editor.setBanner(this.banner.element,26)}};O=M([R(1,w.TG)],O);let P=class extends r.JT{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(y.$,{}),this.element=(0,v.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=(0,v.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,v.PO)(this.element)}show(e){(0,v.PO)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,v.R3)(this.element,(0,v.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,v.$)(`div${A.k.asCSSSelector(e.icon)}`));const n=(0,v.R3)(this.element,(0,v.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,v.R3)(this.element,(0,v.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(N,this.messageActionsContainer,Object.assign(Object.assign({},t),{tabIndex:-1}),{}));const o=(0,v.R3)(this.element,(0,v.$)("div.action-container"));this.actionBar=this._register(new b.o(o)),this.actionBar.push(this._register(new C.aU("banner.close","Close Banner",A.k.asClassName(I.s_),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};P=M([R(0,w.TG)],P);var F=i(63580),B=i(33108),H=i(41157),W=i(33425),V=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}},U=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const j=(0,I.q5)("extensions-warning-message",o.l.warning,F.NC("warningIcon","Icon shown with a warning message in the extensions editor."));let K=class extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:F.NC("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new ne};else if(e.ambiguousCharacterCount>=t)i={message:F.NC("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new te};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:F.NC("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ie}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:j,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(O,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(119),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(119)&&(this._options=e.getOption(119),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=function(e,t){return{nonBasicASCII:t.nonBasicASCII===h.Av?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===h.Av?!e:t.includeComments,includeStrings:t.includeStrings===h.Av?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?a.dK:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new q(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new $(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};K.ID="editor.contrib.unicodeHighlighter",K=V([z(1,g.p),z(2,W.Y),z(3,w.TG)],K);let q=class extends r.JT{constructor(e,t,i,o){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.pY((()=>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())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:X.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return(0,m.Fd)(t,e)?{reason:Z(t.getValueInRange(e.range),this._options),inComment:(0,m.$t)(t,e),inString:(0,m.zg)(t,e)}:null}};q=V([z(3,g.p)],q);class $ extends r.JT{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 n.pY((()=>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())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=u.a.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:X.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,m.Fd)(t,e)?{reason:Z(i,this._options),inComment:(0,m.$t)(t,e),inString:(0,m.zg)(t,e)}:null}}let G=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=4}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(K.ID);if(!n)return[];const o=[];let r=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const a=i.getValueInRange(e.range).codePointAt(0),l=Y(a);let c;switch(t.reason.kind){case 0:c=F.NC("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",l,Y(t.reason.confusableWith.codePointAt(0)));break;case 1:c=F.NC("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",l);break;case 2:c=F.NC("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",l)}const h={codePoint:a,reason:t.reason,inComment:t.inComment,inString:t.inString},d=F.NC("unicodeHighlight.adjustSettings","Adjust settings"),u=`command:${oe.ID}?${encodeURIComponent(JSON.stringify(h))}`,g=new s.W5("",!0).appendMarkdown(c).appendText(" ").appendLink(u,d);o.push(new _.hU(this,e.range,[g],!1,r++))}return o}renderHoverParts(e,t){return(0,_.c)(e,t,this._editor,this._languageService,this._openerService)}};function Q(e){return`U+${e.toString(16).padStart(4,"0")}`}function Y(e){let t=`\`${Q(e)}\``;return l.vU.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function Z(e,t){return u.a.computeUnicodeHighlightReason(e,t)}G=V([z(1,p.O),z(2,E.v4)],G);class X{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=d.qx.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}}X.instance=new X;class J extends c.R6{constructor(){super({id:te.ID,label:F.NC("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=F.NC("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return U(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(B.Ui);t&&this.runAction(t)}))}runAction(e){return U(this,void 0,void 0,(function*(){yield e.updateValue(h.qt.includeComments,!1,2)}))}}class ee extends c.R6{constructor(){super({id:te.ID,label:F.NC("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=F.NC("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return U(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(B.Ui);t&&this.runAction(t)}))}runAction(e){return U(this,void 0,void 0,(function*(){yield e.updateValue(h.qt.includeStrings,!1,2)}))}}class te extends c.R6{constructor(){super({id:te.ID,label:F.NC("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=F.NC("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return U(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(B.Ui);t&&this.runAction(t)}))}runAction(e){return U(this,void 0,void 0,(function*(){yield e.updateValue(h.qt.ambiguousCharacters,!1,2)}))}}te.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class ie extends c.R6{constructor(){super({id:ie.ID,label:F.NC("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=F.NC("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return U(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(B.Ui);t&&this.runAction(t)}))}runAction(e){return U(this,void 0,void 0,(function*(){yield e.updateValue(h.qt.invisibleCharacters,!1,2)}))}}ie.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class ne extends c.R6{constructor(){super({id:ne.ID,label:F.NC("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=F.NC("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return U(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(B.Ui);t&&this.runAction(t)}))}runAction(e){return U(this,void 0,void 0,(function*(){yield e.updateValue(h.qt.nonBasicASCII,!1,2)}))}}ne.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class oe extends c.R6{constructor(){super({id:oe.ID,label:F.NC("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return U(this,void 0,void 0,(function*(){const{codePoint:t,reason:n,inString:o,inComment:s}=i,r=String.fromCodePoint(t),a=e.get(H.eJ),c=e.get(B.Ui),d=[];if(0===n.kind)for(const e of n.notAmbiguousInLocales)d.push({label:F.NC("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:()=>U(this,void 0,void 0,(function*(){se(c,[e])}))});if(d.push({label:function(e){return l.vU.isInvisibleCharacter(e)?F.NC("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Q(e)):F.NC("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Q(e)} "${r}"`)}(t),run:()=>function(e,t){return U(this,void 0,void 0,(function*(){const i=e.getValue(h.qt.allowedCharacters);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;yield e.updateValue(h.qt.allowedCharacters,n,2)}))}(c,[t])}),s){const e=new J;d.push({label:e.label,run:()=>U(this,void 0,void 0,(function*(){return e.runAction(c)}))})}else if(o){const e=new ee;d.push({label:e.label,run:()=>U(this,void 0,void 0,(function*(){return e.runAction(c)}))})}if(0===n.kind){const e=new te;d.push({label:e.label,run:()=>U(this,void 0,void 0,(function*(){return e.runAction(c)}))})}else if(1===n.kind){const e=new ie;d.push({label:e.label,run:()=>U(this,void 0,void 0,(function*(){return e.runAction(c)}))})}else if(2===n.kind){const e=new ne;d.push({label:e.label,run:()=>U(this,void 0,void 0,(function*(){return e.runAction(c)}))})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(n);const u=yield a.pick(d,{title:F.NC("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});u&&(yield u.run())}))}}function se(e,t){var i;return U(this,void 0,void 0,(function*(){const n=null===(i=e.inspect(h.qt.allowedLocales).user)||void 0===i?void 0:i.value;let o;o="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)o[e]=!0;yield e.updateValue(h.qt.allowedLocales,o,2)}))}oe.ID="editor.action.unicodeHighlight.showExcludeOptions",(0,c.Qr)(te),(0,c.Qr)(ie),(0,c.Qr)(ne),(0,c.Qr)(oe),(0,c._K)(K.ID,K,1),f.Ae.register(G)},79607:(e,t,i)=>{"use strict";i.r(t),i.d(t,{UnusualLineTerminatorsDetector:()=>d});var n=i(5976),o=i(95935),s=i(16830),r=i(11640),a=i(63580),l=i(28820),c=function(e,t){return function(i,n){t(i,n,e)}};const h="ignoreUnusualLineTerminators";let d=class extends n.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(120),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(120)&&(this._config=this._editor.getOption(120),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return e=this,t=void 0,n=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,h)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(86))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=yield this._dialogService.confirm({title:a.NC("unusualLineTerminators.title","Unusual Line Terminators"),message:a.NC("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.NC("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,o.EZ)(e.uri)),primaryButton:a.NC("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:a.NC("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,h,!0)}(this._codeEditorService,e)},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};d.ID="editor.contrib.unusualLineTerminatorsDetector",d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c(1,l.S),c(2,r.$)],d),(0,s._K)(d.ID,d,1)},61271:(e,t,i)=>{"use strict";i.r(t);var n=i(15393),o=i(5976),s=i(16830),r=i(89510),a=i(73733),l=i(51200),c=i(88802),h=i(33108),d=i(97781),u=i(88191),g=i(84013),p=i(71922),m=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.JT{constructor(e,t,i,o,s,r){super(),this._modelService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.pY((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{a()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),a()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),a()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),a()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(l.e3)&&(this._cancelAll(),a())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),a()}))),a()}_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)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!(0,l.tw)(e,this._themeService,this._configurationService))return void(e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1));if(!(0,r.KO)(this._provider,e))return void(e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1));const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map((t=>this._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),o=(0,n.PG)((i=>Promise.resolve((0,r.OG)(this._provider,e,t,i)))),s=new g.G(!1);return o.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._modelService.getSemanticTokensProviderStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,c.h)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(o)),(()=>this._removeOutstandingRequest(o))),o}};f.ID="editor.contrib.viewportSemanticTokens",f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([m(1,a.q),m(2,d.XE),m(3,h.Ui),m(4,u.A),m(5,p.p)],f),(0,s._K)(f.ID,f,1)},14495:(e,t,i)=>{"use strict";i.d(t,{G:()=>b,w:()=>C});var n=i(84973),o=i(82948),s=i(96887),r=i(63580),a=i(73910),l=i(97781);const c=(0,a.P6G)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},r.NC("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.P6G)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},r.NC("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,a.P6G)("editor.wordHighlightTextBackground",{light:c,dark:c,hcDark:c,hcLight:c},r.NC("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const h=(0,a.P6G)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:a.xL1,hcLight:a.xL1},r.NC("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,a.P6G)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:a.xL1,hcLight:a.xL1},r.NC("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,a.P6G)("editor.wordHighlightTextBorder",{light:h,dark:h,hcDark:h,hcLight:h},r.NC("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const d=(0,a.P6G)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},r.NC("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,a.P6G)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},r.NC("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),g=(0,a.P6G)("editorOverviewRuler.wordHighlightTextForeground",{dark:a.SPM,light:a.SPM,hcDark:a.SPM,hcLight:a.SPM},r.NC("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),p=o.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.EN)(u),position:n.sh.Center},minimap:{color:(0,l.EN)(a.IYc),position:n.F5.Inline}}),m=o.qx.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,l.EN)(g),position:n.sh.Center},minimap:{color:(0,l.EN)(a.IYc),position:n.F5.Inline}}),f=o.qx.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.EN)(a.SPM),position:n.sh.Center},minimap:{color:(0,l.EN)(a.IYc),position:n.F5.Inline}}),_=o.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v=o.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.EN)(d),position:n.sh.Center},minimap:{color:(0,l.EN)(a.IYc),position:n.F5.Inline}});function b(e){return e===s.MY.Write?p:e===s.MY.Text?m:v}function C(e){return e?_:f}(0,l.Ic)(((e,t)=>{const i=e.getColor(a.Rzx);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},70943:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getOccurrencesAtPosition:()=>b});var n=i(85152),o=i(9488),s=i(15393),r=i(71050),a=i(17301),l=i(5976),c=i(16830),h=i(24314),d=i(29102),u=i(96887),g=i(63580),p=i(38819),m=i(71922),f=i(14495),_=function(e,t){return function(i,n){t(i,n,e)}};const v=new p.uy("hasWordHighlights",!1);function b(e,t,i,n){const r=e.ordered(t);return(0,s.Ps)(r.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a.Cp))),o.Of)}class C{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,s.PG)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new h.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e<t;e++){const t=i.getRange(e);t&&t.startLineNumber===n&&t.startColumn<=o&&t.endColumn>=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class y extends C{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return b(this._providers,e,t.getPosition(),n).then((e=>e||[]))}}class w extends C{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return(0,s.Vs)(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:u.MY.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,c.sb)("_executeDocumentHighlights",((e,t,i)=>b(e.get(m.p).documentHighlightProvider,t,i,r.T.None)));class S{constructor(e,t,i){this.toUnhook=new l.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=v.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(77),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(77);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(h.e.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const o=this._getWord();if(o){const s=this.editor.getModel().getLineContent(i.startLineNumber);(0,n.Z9)(`${s}, ${t+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const o=this._getWord();if(o){const s=this.editor.getModel().getLineContent(i.startLineNumber);(0,n.Z9)(`${s}, ${t+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i)return void this._stopAll();const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=(new Date).getTime(),o)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const e=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=(s=this.providers,r=this.model,l=this.editor.getSelection(),c=this.editor.getOption(124),s.has(r)?new y(r,l,c,s):new w(r,l,c)),this.workerRequest.result.then((t=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),a.dL)}var s,r,l,c}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:(0,f.G)(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}}let k=class e extends l.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i){super(),this.wordHighlighter=null;const n=()=>{e.hasModel()&&(this.wordHighlighter=new S(e,i.documentHighlightProvider,t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()}))),n()}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};k.ID="editor.contrib.wordHighlighter",k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_(1,p.i6),_(2,m.p)],k);class x extends c.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=k.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class L extends c.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:g.NC("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:v.toNegated(),kbOpts:{kbExpr:d.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=k.get(t);n&&n.restoreViewState(!0)}}(0,c._K)(k.ID,k,0),(0,c.Qr)(class extends x{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:g.NC("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:v,kbOpts:{kbExpr:d.u.editorTextFocus,primary:65,weight:100}})}}),(0,c.Qr)(class extends x{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:g.NC("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:v,kbOpts:{kbExpr:d.u.editorTextFocus,primary:1089,weight:100}})}}),(0,c.Qr)(L)},37181:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorWordAccessibilityLeft:()=>E,CursorWordAccessibilityLeftSelect:()=>N,CursorWordAccessibilityRight:()=>O,CursorWordAccessibilityRightSelect:()=>P,CursorWordEndLeft:()=>w,CursorWordEndLeftSelect:()=>x,CursorWordEndRight:()=>T,CursorWordEndRightSelect:()=>M,CursorWordLeft:()=>S,CursorWordLeftSelect:()=>L,CursorWordRight:()=>I,CursorWordRightSelect:()=>R,CursorWordStartLeft:()=>y,CursorWordStartLeftSelect:()=>k,CursorWordStartRight:()=>D,CursorWordStartRightSelect:()=>A,DeleteInsideWord:()=>q,DeleteWordCommand:()=>F,DeleteWordEndLeft:()=>V,DeleteWordEndRight:()=>j,DeleteWordLeft:()=>z,DeleteWordLeftCommand:()=>B,DeleteWordRight:()=>K,DeleteWordRightCommand:()=>H,DeleteWordStartLeft:()=>W,DeleteWordStartRight:()=>U,MoveWordCommand:()=>v,WordLeftCommand:()=>b,WordRightCommand:()=>C});var n=i(16830),o=i(61329),s=i(64141),r=i(55343),a=i(92896),l=i(24929),c=i(50187),h=i(24314),d=i(3860),u=i(29102),g=i(51381),p=i(63580),m=i(31106),f=i(38819),_=i(39282);class v extends n._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(124)),o=t.getModel(),s=t.getSelections().map((e=>{const t=new c.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,s.map((e=>r.Vi.fromModelSelection(e)))),1===s.length){const e=new c.L(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new d.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new d.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n){return a.w.moveWordLeft(e,t,i,n)}}class C extends v{_move(e,t,i,n){return a.w.moveWordRight(e,t,i,n)}}class y extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class w extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class S extends b{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class k extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class x extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class L extends b{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class E extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}class N extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}class D extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class T extends C{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class I extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class A extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class M extends C{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class R extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class O extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}class P extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}class F extends n._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.c_);if(!t.hasModel())return;const s=(0,l.u)(t.getOption(124)),r=t.getModel(),a=t.getSelections(),c=t.getOption(5),h=t.getOption(8),d=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:s,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:c,autoClosingQuotes:h,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class B extends F{_delete(e,t){return a.w.deleteWordLeft(e,t)||new h.e(1,1,1,1)}}class H extends F{_delete(e,t){const i=a.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new h.e(n,o,n,o)}}class W extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.u.writable})}}class V extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.u.writable})}}class z extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class U extends H{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.u.writable})}}class j extends H{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.u.writable})}}class K extends H{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q extends n.R6{constructor(){super({id:"deleteInsideWord",precondition:u.u.writable,label:p.NC("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(124)),s=t.getModel(),r=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(n,s,e);return new o.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}(0,n.fK)(new y),(0,n.fK)(new w),(0,n.fK)(new S),(0,n.fK)(new k),(0,n.fK)(new x),(0,n.fK)(new L),(0,n.fK)(new D),(0,n.fK)(new T),(0,n.fK)(new I),(0,n.fK)(new A),(0,n.fK)(new M),(0,n.fK)(new R),(0,n.fK)(new E),(0,n.fK)(new N),(0,n.fK)(new O),(0,n.fK)(new P),(0,n.fK)(new W),(0,n.fK)(new V),(0,n.fK)(new z),(0,n.fK)(new U),(0,n.fK)(new j),(0,n.fK)(new K),(0,n.Qr)(q)},86709:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorWordPartLeft:()=>u,CursorWordPartLeftSelect:()=>g,CursorWordPartRight:()=>m,CursorWordPartRightSelect:()=>f,DeleteWordPartLeft:()=>c,DeleteWordPartRight:()=>h,WordPartLeftCommand:()=>d,WordPartRightCommand:()=>p});var n=i(16830),o=i(92896),s=i(24314),r=i(29102),a=i(37181),l=i(94565);class c extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new s.e(1,1,1,1)}}class h extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new s.e(n,r,n,r)}}class d extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartLeft(e,t,i)}}class u extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class p extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartRight(e,t,i)}}class m extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class f extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,n.fK)(new c),(0,n.fK)(new h),(0,n.fK)(new u),(0,n.fK)(new g),(0,n.fK)(new m),(0,n.fK)(new f)},7917:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>gl,Emitter:()=>pl,KeyCode:()=>ml,KeyMod:()=>fl,MarkerSeverity:()=>yl,MarkerTag:()=>wl,Position:()=>_l,Range:()=>vl,Selection:()=>bl,SelectionDirection:()=>Cl,Token:()=>kl,Uri:()=>Sl,editor:()=>xl,languages:()=>Ll});var n=i(64141),o=i(71050),s=i(4669),r=i(22258),a=i(70666),l=i(50187),c=i(24314),h=i(3860),d=i(96887),u=i(70902);class g{static chord(e,t){return(0,r.gx)(e,t)}}function p(){return{editor:void 0,languages:void 0,CancellationTokenSource:o.A,Emitter:s.Q5,KeyCode:u.VD,KeyMod:g,Position:l.L,Range:c.e,Selection:h.Y,SelectionDirection:u.a$,MarkerSeverity:u.ZL,MarkerTag:u.eB,Uri:a.o,Token:d.WU}}g.CtrlCmd=2048,g.Shift=1024,g.Alt=512,g.WinCtrl=256;var m=i(5976),f=i(97295),_=i(27231),v=i(11640),b=i(35146),C=i(36248),y=i(72065),w=i(63580);const S=(0,y.yh)("audioCue");class k{static register(e){return new k(e.fileName)}constructor(e){this.fileName=e}}k.error=k.register({fileName:"error.mp3"}),k.warning=k.register({fileName:"warning.mp3"}),k.foldedArea=k.register({fileName:"foldedAreas.mp3"}),k.break=k.register({fileName:"break.mp3"}),k.quickFixes=k.register({fileName:"quickFixes.mp3"}),k.taskCompleted=k.register({fileName:"taskCompleted.mp3"}),k.taskFailed=k.register({fileName:"taskFailed.mp3"}),k.terminalBell=k.register({fileName:"terminalBell.mp3"}),k.diffLineInserted=k.register({fileName:"diffLineInserted.mp3"}),k.diffLineDeleted=k.register({fileName:"diffLineDeleted.mp3"}),k.diffLineModified=k.register({fileName:"diffLineModified.mp3"});class x{static register(e){const t=new x(e.sound,e.name,e.settingsKey);return x._audioCues.add(t),t}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}x._audioCues=new Set,x.error=x.register({name:(0,w.NC)("audioCues.lineHasError.name","Error on Line"),sound:k.error,settingsKey:"audioCues.lineHasError"}),x.warning=x.register({name:(0,w.NC)("audioCues.lineHasWarning.name","Warning on Line"),sound:k.warning,settingsKey:"audioCues.lineHasWarning"}),x.foldedArea=x.register({name:(0,w.NC)("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:k.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),x.break=x.register({name:(0,w.NC)("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:k.break,settingsKey:"audioCues.lineHasBreakpoint"}),x.inlineSuggestion=x.register({name:(0,w.NC)("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:k.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),x.terminalQuickFix=x.register({name:(0,w.NC)("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:k.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),x.onDebugBreak=x.register({name:(0,w.NC)("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:k.break,settingsKey:"audioCues.onDebugBreak"}),x.noInlayHints=x.register({name:(0,w.NC)("audioCues.noInlayHints","No Inlay Hints on Line"),sound:k.error,settingsKey:"audioCues.noInlayHints"}),x.taskCompleted=x.register({name:(0,w.NC)("audioCues.taskCompleted","Task Completed"),sound:k.taskCompleted,settingsKey:"audioCues.taskCompleted"}),x.taskFailed=x.register({name:(0,w.NC)("audioCues.taskFailed","Task Failed"),sound:k.taskFailed,settingsKey:"audioCues.taskFailed"}),x.terminalBell=x.register({name:(0,w.NC)("audioCues.terminalBell","Terminal Bell"),sound:k.terminalBell,settingsKey:"audioCues.terminalBell"}),x.notebookCellCompleted=x.register({name:(0,w.NC)("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:k.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),x.notebookCellFailed=x.register({name:(0,w.NC)("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:k.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),x.diffLineInserted=x.register({name:(0,w.NC)("audioCues.diffLineInserted","Diff Line Inserted"),sound:k.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),x.diffLineDeleted=x.register({name:(0,w.NC)("audioCues.diffLineDeleted","Diff Line Deleted"),sound:k.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),x.diffLineModified=x.register({name:(0,w.NC)("audioCues.diffLineModified","Diff Line Modified"),sound:k.diffLineModified,settingsKey:"audioCues.diffLineModified"});var L=i(31106),E=function(e,t){return function(i,n){t(i,n,e)}};const N={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let D=class extends m.JT{constructor(e,t={},i,n,o){super(),this._audioCueService=i,this._codeEditorService=n,this._accessibilityService=o,this._onDidUpdate=this._register(new s.Q5),this._editor=e,this._options=C.jB(t,N,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this._updateAccessibilityState(e.position.lineNumber),this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new c.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new c.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new c.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>c.e.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n<o&&!t;n++){const o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(b.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t),this._updateAccessibilityState(e.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(e,t){var i;const n=null===(i=this._editor.getModel())||void 0===i?void 0:i.modified;if(!n)return;const o=n.getLineDecorations(e).find((e=>"line-insert"===e.options.className));if(o)this._audioCueService.playAudioCue(x.diffLineModified,!0);else{if(!t)return;this._audioCueService.playAudioCue(x.diffLineDeleted,!0)}const s=this._codeEditorService.getActiveCodeEditor();t&&s&&o&&this._accessibilityService.isScreenReaderOptimized()&&(s.setSelection({startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:Number.MAX_VALUE}),s.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this.canNavigateNext()&&this._move(!0,e)}previous(e=0){this.canNavigatePrevious()&&this._move(!1,e)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx<this.ranges.length-1}canNavigatePrevious(){return this.canNavigateLoop()||0!==this.nextIdx}canNavigateLoop(){return Boolean(this._options.findResultLoop)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}};D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(2,S),E(3,v.$),E(4,L.F)],D);var T=i(27374),I=i(96518),A=i(84973),M=i(51381),R=i(276),O=i(72042),P=i(73733),F=i(15393),B=i(17301),H=i(1432);let W=!1;function V(e){H.$L&&(W||(W=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class z{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class U{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class j{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class K{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class q{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class ${constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new z(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new s.Q5({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new j(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new q(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new U(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,B.ri)(e.detail)),this._send(new U(this._workerId,t,void 0,(0,B.ri)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new K(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i<e.args.length;i++)e.args[i]instanceof ArrayBuffer&&t.push(e.args[i]);else 1===e.type&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}}class G extends m.JT{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",(e=>{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new $({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(Y(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(Q(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==H.li.require&&"function"==typeof H.li.require.getConfig?o=H.li.require.getConfig():void 0!==H.li.requirejs&&(o=H.li.requirejs.s.contexts._.config);const s=(0,C.$E)(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,s]);const r=(e,t)=>this._request(e,t),a=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)},s={};for(const t of e)Y(t)?s[t]=o(t):Q(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,r,a))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function Q(e){return"o"===e[0]&&"n"===e[1]&&f.df(e.charCodeAt(2))}function Y(e){return/^onDynamic/.test(e)&&f.df(e.charCodeAt(9))}var Z;const X=null===(Z=window.trustedTypes)||void 0===Z?void 0:Z.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class J{constructor(e,t,i,n,o){this.id=t;const s=function(e){if(H.li.MonacoEnvironment){if("function"==typeof H.li.MonacoEnvironment.getWorker)return H.li.MonacoEnvironment.getWorker("workerMain.js",e);if("function"==typeof H.li.MonacoEnvironment.getWorkerUrl){const t=H.li.MonacoEnvironment.getWorkerUrl("workerMain.js",e);return new Worker(X?X.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>i.postMessage(e,t)))}dispose(){var e;null===(e=this.worker)||void 0===e||e.then((e=>e.terminate())),this.worker=null}}class ee{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++ee.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new J(e,n,this._label||"anonymous"+n,t,(e=>{V(e),this._webWorkerFailedBeforeError=e,i(e)}))}}ee.LAST_WORKER_ID=0;var te=i(2484),ie=i(90310),ne=i(270),oe=i(44906);class se{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;o<s;o++)n[o]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class re{constructor(e){let t=0,i=0;for(let n=0,o=e.length;n<o;n++){const[o,s,r]=e[n];s>t&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new se(i,t,0);for(let t=0,i=e.length;t<i;t++){const[i,o,s]=e[t];n.set(i,o,s)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let ae=null,le=null;class ce{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===ae&&(ae=new re([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ae}()){const i=function(){if(null===le){le=new oe.N(0);const e=", \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t<e.length;t++)le.set(e.charCodeAt(t),1);const t=".;:";for(let e=0;e<t.length;e++)le.set(t.charCodeAt(e),2)}return le}(),n=[];for(let o=1,s=e.getLineCount();o<=s;o++){const s=e.getLineContent(o),r=s.length;let a=0,l=0,c=0,h=1,d=!1,u=!1,g=!1,p=!1;for(;a<r;){let e=!1;const r=s.charCodeAt(a);if(13===h){let t;switch(r){case 40:d=!0,t=0;break;case 41:t=d?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:p=!0,t=0;break;case 125:t=p?0:1;break;case 39:case 34:case 96:t=c===r?1:39===c||34===c||96===c?0:1;break;case 42:t=42===c?1:0;break;case 124:t=124===c?1:0;break;case 32:t=g?0:1;break;default:t=i.get(r)}1===t&&(n.push(ce._createLink(i,s,o,l,a)),e=!0)}else if(12===h){let t;91===r?(u=!0,t=0):t=i.get(r),1===t?e=!0:h=13}else h=t.nextState(h,r),0===h&&(e=!0);e&&(h=1,d=!1,u=!1,p=!1,l=a+1,c=r),a++}13===h&&n.push(ce._createLink(i,s,o,l,r))}return n}}class he{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){const i=this.doNavigateValueSet(t,o);if(i)return{range:e,value:i}}if(i&&n){const e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){const i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){const i=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let n=Number(e);const o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,s=e.length;null===n&&o<s;o++)n=this.valueSetReplace(e[o],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}he.INSTANCE=new he;var de=i(84013),ue=i(31446);class ge{constructor(e,t,i){this.originalRange=e,this.modifiedRange=t,this.innerChanges=i}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}class pe{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}class me{constructor(e,t){this.startLineNumber=e,this.endLineNumberExclusive=t}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(e){return new me(this.startLineNumber+e,this.endLineNumberExclusive+e)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(e){return new me(Math.min(this.startLineNumber,e.startLineNumber),Math.max(this.endLineNumberExclusive,e.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}}function fe(e,t,i,n){return new te.Hs(e,t,i).ComputeDiff(n)}class _e{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n<o;n++)t[n]=we(e[n],1),i[n]=Se(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],o=[],s=[];let r=0;for(let a=t;a<=i;a++){const t=this.lines[a],l=e?this._startColumns[a]:1,c=e?this._endColumns[a]:t.length+1;for(let e=l;e<c;e++)n[r]=t.charCodeAt(e-1),o[r]=a+1,s[r]=e,r++;!e&&a<i&&(n[r]=10,o[r]=a+1,s[r]=t.length+1,r++)}return new ve(n,o,s)}}class ve{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}toString(){return"["+this._charCodes.map(((e,t)=>(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class be{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new be(n,o,s,r,a,l,c,h)}}class Ce{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,s,r){let a,l,c,h,d;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=n.getStartLineNumber(t.modifiedStart)-1,h=0):(c=n.getStartLineNumber(t.modifiedStart),h=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=fe(s,a,o,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n<o;n++){const o=e[n],s=o.originalStart-(i.originalStart+i.originalLength),r=o.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(s,r)<3?(i.originalLength=o.originalStart+o.originalLength-i.originalStart,i.modifiedLength=o.modifiedStart+o.modifiedLength-i.modifiedStart):(t.push(o),i=o)}return t}(e)),d=[];for(let t=0,i=e.length;t<i;t++)d.push(be.createFromDiffChange(e[t],s,a))}}return new Ce(a,l,c,h,d)}}class ye{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new _e(e),this.modified=new _e(t),this.continueLineDiff=ke(i.maxComputationTime),this.continueCharDiff=ke(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=fe(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(Ce.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let o=0,s=0;for(let e=-1,i=t.length;e<i;e++){const r=e+1<i?t[e+1]:null,a=r?r.originalStart:this.originalLines.length,l=r?r.modifiedStart:this.modifiedLines.length;for(;o<a&&s<l;){const e=this.originalLines[o],t=this.modifiedLines[s];if(e!==t){{let i=we(e,1),r=we(t,1);for(;i>1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=Se(e,1),r=Se(t,1);const a=e.length+1,l=t.length+1;for(;i<a&&r<l&&e.charCodeAt(i-1)===e.charCodeAt(r-1);)i++,r++;(i<a||r<l)&&this._pushTrimWhitespaceCharChange(n,o+1,i,a,s+1,r,l)}}o++,s++}r&&(n.push(Ce.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=r.originalLength,s+=r.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,o,s,r){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r))return;let a;this.shouldComputeCharChanges&&(a=[new be(t,i,t,n,o,s,o,r)]),e.push(new Ce(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber===t&&l.modifiedEndLineNumber===o?(this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new be(t,i,t,n,o,s,o,r)),!0):l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new be(t,i,t,n,o,s,o,r)),!0))}}function we(e,t){const i=f.LC(e);return-1===i?t:i+1}function Se(e,t){const i=f.ow(e);return-1===i?t:i+2}function ke(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}class xe{constructor(e,t){this.seq1Range=e,this.seq2Range=t}reverse(){return new xe(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}}class Le{constructor(e,t){this.start=e,this.endExclusive=t}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Le(this.start+e,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}join(e){return new Le(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}}class Ee{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,i){this.array[e+t*this.width]=i}}class Ne{compute(e,t,i){const n=new Ee(e.length,t.length),o=new Ee(e.length,t.length),s=new Ee(e.length,t.length);for(let r=0;r<e.length;r++)for(let a=0;a<t.length;a++){const l=0===r?0:n.get(r-1,a),c=0===a?0:n.get(r,a-1);let h;e.getElement(r)===t.getElement(a)?(h=0===r||0===a?0:n.get(r-1,a-1),r>0&&a>0&&3===o.get(r-1,a-1)&&(h+=s.get(r-1,a-1)),h+=i?i(r,a):1):h=-1;const d=Math.max(l,c,h);if(d===h){const e=r>0&&a>0?s.get(r-1,a-1):0;s.set(r,a,e+1),o.set(r,a,3)}else d===l?(s.set(r,a,0),o.set(r,a,1)):d===c&&(s.set(r,a,0),o.set(r,a,2));n.set(r,a,d)}const r=[];let a=e.length,l=t.length;function c(e,t){e+1===a&&t+1===l||r.push(new xe(new Le(e+1,a),new Le(t+1,l))),a=e,l=t}let h=e.length-1,d=t.length-1;for(;h>=0&&d>=0;)3===o.get(h,d)?(c(h,d),h--,d--):1===o.get(h,d)?h--:d--;return c(-1,-1),r.reverse(),r}}function De(e,t,i){let n=i;return n=function(e,t,i){const n=[];i.length>0&&n.push(i[0]);for(let e=1;e<i.length;e++){const o=n[n.length-1],s=i[e];if(s.seq1Range.isEmpty){let e=!0;const i=s.seq1Range.start-o.seq1Range.endExclusive;for(let n=1;n<=i;n++)if(t.getElement(s.seq2Range.start-n)!==t.getElement(s.seq2Range.endExclusive-n)){e=!1;break}if(e){n[n.length-1]=new xe(o.seq1Range,new Le(o.seq2Range.start,s.seq2Range.endExclusive-i));continue}}n.push(s)}return n}(0,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n<i.length;n++){const o=i[n];if(o.seq1Range.isEmpty){const s=n>0?i[n-1].seq2Range.endExclusive:-1,r=n+1<i.length?i[n+1].seq2Range.start:t.length;i[n]=Te(o,e,t,r,s)}else if(o.seq2Range.isEmpty){const s=n>0?i[n-1].seq1Range.endExclusive:-1,r=n+1<i.length?i[n+1].seq1Range.start:e.length;i[n]=Te(o.reverse(),t,e,r,s).reverse()}}return i}(e,t,n),n}function Te(e,t,i,n,o){let s=1;for(;e.seq2Range.start-s>o&&i.getElement(e.seq2Range.start-s)===i.getElement(e.seq2Range.endExclusive-s)&&s<20;)s++;s--;let r=0;for(;e.seq2Range.start+r<n&&i.getElement(e.seq2Range.start+r)===i.getElement(e.seq2Range.endExclusive+r)&&r<20;)r++;if(0===s&&0===r)return e;let a=0,l=-1;for(let n=-s;n<=r;n++){const o=e.seq2Range.start+n,s=e.seq2Range.endExclusive+n,r=e.seq1Range.start+n,c=t.getBoundaryScore(r)+i.getBoundaryScore(o)+i.getBoundaryScore(s);c>l&&(l=c,a=n)}return 0!==a?new xe(e.seq1Range.delta(a),e.seq2Range.delta(a)):e}class Ie{compute(e,t){if(0===e.length)return[new xe(new Le(0,0),new Le(0,t.length))];if(0===t.length)return[new xe(new Le(0,e.length),new Le(0,0))];function i(i,n){for(;i<e.length&&n<t.length&&e.getElement(i)===t.getElement(n);)i++,n++;return i}let n=0;const o=new Me;o.set(0,i(0,0));const s=new Re;s.set(0,0===o.get(0)?null:new Ae(null,0,0,o.get(0)));let r=0;e:for(;;)for(n++,r=-n;r<=n;r+=2){const a=r===n?-1:o.get(r+1),l=r===-n?-1:o.get(r-1)+1,c=Math.min(Math.max(a,l),e.length),h=c-r,d=i(c,h);o.set(r,d);const u=c===a?s.get(r+1):s.get(r-1);if(s.set(r,d!==c?new Ae(u,c,h,d-c):u),o.get(r)===e.length&&o.get(r)-r===t.length)break e}let a=s.get(r);const l=[];let c=e.length,h=t.length;for(;;){const e=a?a.x+a.length:0,t=a?a.y+a.length:0;if(e===c&&t===h||l.push(new xe(new Le(e,c),new Le(t,h))),!a)break;c=a.x,h=a.y,a=a.prev}return l.reverse(),l}}class Ae{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class Me{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class Re{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class Oe{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:Pe(this.lines[e-1]))+(e===this.lines.length?0:Pe(this.lines[e])))}}function Pe(e){let t=0;for(;t<e.length&&(32===e.charCodeAt(t)||9===e.charCodeAt(t));)t++;return t}class Fe{constructor(e,t){this.lines=e,this.lineRange=t;let i=0;this.firstCharOnLineOffsets=new Int32Array(t.length);for(let n=t.start;n<t.endExclusive;n++)i+=e[n].length,this.firstCharOnLineOffsets[n-t.start]=i+1,i++;this.elements=new Int32Array(i);let n=0;for(let i=t.start;i<t.endExclusive;i++){const t=e[i];for(let e=0;e<t.length;e++)this.elements[n+e]=t.charCodeAt(e);n+=t.length,i<e.length-1&&(this.elements[n]="\n".charCodeAt(0),n+=1)}}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=We(e>0?this.elements[e-1]:-1),i=We(e<this.elements.length?this.elements[e]:-1);if(6===t&&7===i)return 0;let n=0;return t!==i&&(n+=10,1===i&&(n+=1)),n+=He(t),n+=He(i),n}translateOffset(e){let t=0,i=this.firstCharOnLineOffsets.length;for(;t<i;){const n=Math.floor((t+i)/2);this.firstCharOnLineOffsets[n]>e?i=n:t=n+1}const n=0===t?0:this.firstCharOnLineOffsets[t-1];return new l.L(t+1,e-n+1)}translateRange(e){return c.e.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}}const Be={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function He(e){return Be[e]}function We(e){return 10===e?7:13===e?6:function(e){return 32===e||9===e}(e)?5:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:4}const Ve={smart:new class{computeDiff(e,t,i){var n;const o=new ye(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let r=null;for(const e of o.changes){let t,i;t=0===e.originalEndLineNumber?new me(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new me(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new me(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new me(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let o=new ge(t,i,null===(n=e.charChanges)||void 0===n?void 0:n.map((e=>new pe(new c.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new c.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modifiedRange.endLineNumberExclusive!==o.modifiedRange.startLineNumber&&r.originalRange.endLineNumberExclusive!==o.originalRange.startLineNumber||(o=new ge(r.originalRange.join(o.originalRange),r.modifiedRange.join(o.modifiedRange),r.innerChanges&&o.innerChanges?r.innerChanges.concat(o.innerChanges):void 0),s.pop())),s.push(o),r=o}return(0,b.eZ)((()=>(0,b.DM)(s,((e,t)=>t.originalRange.startLineNumber-e.originalRange.endLineNumberExclusive==t.modifiedRange.startLineNumber-e.modifiedRange.endLineNumberExclusive&&e.originalRange.endLineNumberExclusive<t.originalRange.startLineNumber&&e.modifiedRange.endLineNumberExclusive<t.modifiedRange.startLineNumber)))),{quitEarly:o.quitEarly,changes:s}}},experimental:new class{constructor(){this.dynamicProgrammingDiffing=new Ne,this.myersDiffingAlgorithm=new Ie}computeDiff(e,t,i){const n=new Map;function o(e){let t=n.get(e);return void 0===t&&(t=n.size,n.set(e,t)),t}const s=e.map((e=>o(e.trim()))),r=t.map((e=>o(e.trim()))),a=new Oe(s,e),l=new Oe(r,t);let c=(()=>a.length+l.length<1500?this.dynamicProgrammingDiffing.compute(a,l,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(a,l))();c=De(a,l,c);const h=[],d=i=>{for(let n=0;n<i;n++){const i=u+n,o=g+n;if(e[i]!==t[o]){const n=this.refineDiff(e,t,new xe(new Le(i,i+1),new Le(o,o+1)));for(const e of n)h.push(e)}}};let u=0,g=0;for(const i of c){(0,b.eZ)((()=>i.seq1Range.start-u==i.seq2Range.start-g)),d(i.seq1Range.start-u),u=i.seq1Range.endExclusive,g=i.seq2Range.endExclusive;const n=this.refineDiff(e,t,i);for(const e of n)h.push(e)}d(e.length-u);const p=function(e){const t=[];for(const i of function*(e,t){let i,n;for(const t of e)void 0!==n&&(o=n,(s=t).originalRange.startLineNumber-(o.originalRange.endLineNumber-(o.originalRange.endColumn>1?0:1))<=1||s.modifiedRange.startLineNumber-(o.modifiedRange.endLineNumber-(o.modifiedRange.endColumn>1?0:1))<=1)?i.push(t):(i&&(yield i),i=[t]),n=t;var o,s;i&&(yield i)}(e)){const e=i[0],n=i[i.length-1];t.push(new ge(new me(e.originalRange.startLineNumber,n.originalRange.endLineNumber+(n.originalRange.endColumn>1||n.modifiedRange.endColumn>1?1:0)),new me(e.modifiedRange.startLineNumber,n.modifiedRange.endLineNumber+(n.originalRange.endColumn>1||n.modifiedRange.endColumn>1?1:0)),i))}return(0,b.eZ)((()=>(0,b.DM)(t,((e,t)=>t.originalRange.startLineNumber-e.originalRange.endLineNumberExclusive==t.modifiedRange.startLineNumber-e.modifiedRange.endLineNumberExclusive&&e.originalRange.endLineNumberExclusive<t.originalRange.startLineNumber&&e.modifiedRange.endLineNumberExclusive<t.modifiedRange.startLineNumber)))),t}(h);return{quitEarly:!1,changes:p}}refineDiff(e,t,i){const n=new Fe(e,i.seq1Range),o=new Fe(t,i.seq2Range),s=n.length+o.length<500?this.dynamicProgrammingDiffing.compute(n,o):this.myersDiffingAlgorithm.compute(n,o);let r=De(n,o,s);return r=function(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new xe(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}(0,0,r),r.map((e=>new pe(n.translateRange(e.seq1Range).delta(i.seq1Range.start),o.translateRange(e.seq2Range).delta(i.seq2Range.start))))}}};var ze=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Ue extends class{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new l.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new ie.oQ(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;const i=(0,f.uq)(t);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);const n=new Uint32Array(i.length-1);for(let t=1;t<i.length;t++)this._lines.splice(e.lineNumber+t-1,0,i[t]),n[t-1]=i[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const i=(0,ne.t2)(e.column,(0,ne.eq)(t),this._lines[e.lineNumber-1],0);return i?new c.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",s=0,r=[];return{*[Symbol.iterator](){for(;;)if(s<r.length){const e=o.substring(r[s].start,r[s].end);s+=1,yield e}else{if(!(n<t.length))break;o=t[n],r=i(o,e),s=0,n+=1}}}}getLineWords(e,t){const i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const e of n)o.push({word:i.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return o}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let e=i+1;e<n;e++)o.push(this._lines[e]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!l.L.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class je{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new Ue(a.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return ze(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?ue.a.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return ze(this,void 0,void 0,(function*(){const o=this._getModel(e),s=this._getModel(t);return o&&s?je.computeDiff(o,s,i,n):null}))}static computeDiff(e,t,i,n){const o="experimental"===n?Ve.experimental:Ve.smart,s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i);return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.quitEarly,changes:a.changes.map((e=>{var t;return[e.originalRange.startLineNumber,e.originalRange.endLineNumberExclusive,e.modifiedRange.startLineNumber,e.modifiedRange.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t){return ze(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?c.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:s,eol:r}of t){if("number"==typeof r&&(o=r),c.e.isEmpty(e)&&!s)continue;const t=i.getValueInRange(e);if(s=s.replace(/\r\n|\n|\r/g,i.eol),t===s)continue;if(Math.max(s.length,t.length)>je._diffLimit){n.push({range:e,text:s});continue}const a=(0,te.a$)(t,s,!1),l=i.offsetAt(c.e.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(r.range)!==r.text&&n.push(r)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return ze(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?ce.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return ze(this,void 0,void 0,(function*(){const o=new de.G(!0),s=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>je._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return ze(this,void 0,void 0,(function*(){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){const t=o.getLineWords(e,s);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=r[i.word];t||(t=[],r[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return r}))}navigateValueSet(e,t,i,n,o){return ze(this,void 0,void 0,(function*(){const s=this._getModel(e);if(!s)return null;const r=new RegExp(n,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});const a=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},r);if(!l)return null;const c=s.getValueInRange(l);return he.INSTANCE.navigateValueSet(t,a,l,c,i)}))}loadForeignModule(e,t,i){const n={host:(0,C.IU)(i,((e,t)=>this._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve((0,C.$E)(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}je._diffLimit=1e5,je._suggestionsLimit=1e4,"function"==typeof importScripts&&(H.li.monaco=p());var Ke=i(71765),qe=i(9488),$e=i(43557),Ge=i(71922),Qe=function(e,t){return function(i,n){t(i,n,e)}},Ye=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Ze(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Xe=class extends m.JT{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new et(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>Ze(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new Je(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Ze(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return Ye(this,void 0,void 0,(function*(){const o=yield this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)));if(!o)return null;const s={identical:o.identical,quitEarly:o.quitEarly,changes:o.changes.map((e=>{var t;return new ge(new me(e[0],e[1]),new me(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new pe(new c.e(e[0],e[1],e[2],e[3]),new c.e(e[4],e[5],e[6],e[7])))))}))};return s}))}computeMoreMinimalEdits(e,t){if((0,qe.Of)(t)){if(!Ze(this._modelService,e))return Promise.resolve(t);const i=de.G.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,(0,F.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Ze(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return Ze(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};Xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Qe(0,P.q),Qe(1,Ke.V),Qe(2,$e.VZ),Qe(3,M.c_),Qe(4,Ge.p)],Xe);class Je{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Ye(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)Ze(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Ze(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new c.e(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):c.e.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),h=yield l.textualSuggest(n,null==s?void 0:s.word,o);return h?{duration:h.duration,suggestions:h.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class et extends m.JT{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new F.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ot(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class tt extends m.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new F.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,m.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new m.SL;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add((0,m.OF)((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,m.B9)(t)}}class it{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class nt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class ot extends m.JT{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new ee(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new G(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new nt(this)))}catch(e){V(e),this._worker=new it(new je(new nt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(V(e),this._worker=new it(new je(new nt(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new tt(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return Ye(this,void 0,void 0,(function*(){return this._disposed?Promise.reject((0,B.F0)()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return Ye(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,s=(0,f.mr)(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=(0,f.mr)(o);return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=(0,f.mr)(s);return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}class st extends ot{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,C.$E)(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var rt=i(77378),at=i(91557),lt=i(1118);function ct(e){return"string"==typeof e}function ht(e){return!ct(e)}function dt(e){return!e}function ut(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function gt(e){return e.replace(/[&<>'"_]/g,"-")}function pt(e,t){return new Error(`${e.languageId}: ${t}`)}function mt(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,c,h,d,u,g){return dt(a)?dt(l)?!dt(c)&&c<n.length?ut(e,n[c]):!dt(d)&&e&&"string"==typeof e[d]?e[d]:(null===s&&(s=o.split("."),s.unshift(o)),!dt(h)&&h<s.length?ut(e,s[h]):""):ut(e,i):"$"}))}function ft(e,t){let i=t;for(;i&&i.length>0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var _t=i(33108);class vt{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new bt(e,t);let i=bt.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new bt(e,t),this._entries[i]=n,n)}}vt._INSTANCE=new vt(5);class bt{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return bt._equals(this,e)}push(e){return vt.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return vt.create(this.parent,e)}}class Ct{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Ct(this.languageId,this.state)}}class yt{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new wt(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new wt(e,t);const i=bt.getStackElementId(e);let n=this._entries[i];return n||(n=new wt(e,null),this._entries[i]=n,n)}}yt._INSTANCE=new yt(5);class wt{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:yt.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof wt&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class St{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new d.WU(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=d.RW.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new d.WU(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new d.hG(this._tokens,e)}}class kt{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e<o;e++)r[n+e]=t[e];return null!==i&&r.set(i,n+o),r}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=d.RW.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenizeEncoded(e,t,s);if(0!==n)for(let e=0,t=a.tokens.length;e<t;e+=2)a.tokens[e]+=n;return this._prependTokens=kt._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new d.DI(kt._merge(this._prependTokens,this._tokens,null),e)}}let xt=class e{constructor(e,t,i,n,o){this._configurationService=o,this._languageService=e,this._standaloneThemeService=t,this._languageId=i,this._lexer=n,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._tokenizationRegistryListener=d.RW.onDidChange((e=>{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){const n=e.changedLanguages[i];if(this._embeddedLanguages[n]){t=!0;break}}t&&(s=!0,d.RW.fire([this._languageId]),s=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const t=[];for(const i in this._embeddedLanguages){const n=d.RW.get(i);if(n){if(n instanceof e){const e=n.getLoadStatus();!1===e.loaded&&t.push(e.promise)}}else d.RW.isResolved(i)||t.push(d.RW.getOrCreate(i))}return 0===t.length?{loaded:!0}:{loaded:!1,promise:Promise.all(t).then((e=>{}))}}getInitialState(){const e=vt.create(null,this._lexer.start);return yt.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,R.Ri)(this._languageId,i);const n=new St,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,R.Dy)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new kt(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=ft(this._lexer,t.stack.state),!i))throw pt(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!ht(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex;const s=t.regex.source;if("^(?:"===s.substr(0,4)&&")"===s.substr(s.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(s.substr(4,s.length-5),e)}const r=e.search(i);-1===r||0!==r&&t.matchOnlyAtLineStart||(-1===n||r<n)&&(n=r)}if(!o)throw pt(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,o){const s=this._findLeavingNestedLanguageOffset(e,i);if(-1===s){const s=o.nestedLanguageTokenize(e,t,i.embeddedLanguageData,n);return yt.create(i.stack,new Ct(i.embeddedLanguageData.languageId,s))}const r=e.substring(0,s);r.length>0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,h=0,d=null,u=!0;for(;u||h<a;){const i=h,m=c.depth,f=d?d.groups.length:0,_=c.state;let v=null,b=null,C=null,y=null,w=null;if(d){v=d.matches;const e=d.groups.shift();b=e.matched,C=e.action,y=d.rule,0===d.groups.length&&(d=null)}else{if(!u&&h>=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=ft(this._lexer,_),!e))throw pt(this._lexer,"tokenizer state is not defined: "+_);const t=r.substr(h);for(const i of e)if((0===h||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],C=i.action;break}}if(v||(v=[""],b=""),C||(h<a&&(v=[r.charAt(h)],b=v[0]),C=this._lexer.defaultToken),null===b)break;for(h+=b.length;!function(e){return Array.isArray(e)}(C)&&ht(C)&&C.test;)C=C.test(b,v,_,h===a);let S=null;if("string"==typeof C||Array.isArray(C))S=C;else if(C.group)S=C.group;else if(null!==C.token&&void 0!==C.token){if(S=C.tokenSubst?mt(this._lexer,C.token,b,v,_):C.token,C.nextEmbedded)if("@pop"===C.nextEmbedded){if(!l)throw pt(this._lexer,"cannot pop embedded language if not inside one");l=null}else{if(l)throw pt(this._lexer,"cannot enter embedded language from within an embedded language");w=mt(this._lexer,C.nextEmbedded,b,v,_)}if(C.goBack&&(h=Math.max(0,h-C.goBack)),C.switchTo&&"string"==typeof C.switchTo){let e=mt(this._lexer,C.switchTo,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!ft(this._lexer,e))throw pt(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.switchTo(e)}else{if(C.transform&&"function"==typeof C.transform)throw pt(this._lexer,"action.transform not supported");if(C.next)if("@push"===C.next){if(c.depth>=this._lexer.maxStack)throw pt(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===C.next){if(c.depth<=1)throw pt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(y));c=c.pop()}else if("@popall"===C.next)c=c.popall();else{let e=mt(this._lexer,C.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!ft(this._lexer,e))throw pt(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.push(e)}}C.log&&"string"==typeof C.log&&(g=this._lexer,p=this._lexer.languageId+": "+mt(this._lexer,C.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw pt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(y));const k=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(h<a){const i=e.substr(h);return this._nestedTokenize(i,t,yt.create(c,r),n+h,o)}return yt.create(c,r)};if(Array.isArray(S)){if(d&&d.groups.length>0)throw pt(this._lexer,"groups cannot be nested: "+this._safeRuleName(y));if(v.length!==S.length+1)throw pt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(y));let e=0;for(let t=1;t<v.length;t++)e+=v[t].length;if(e!==b.length)throw pt(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(y));d={rule:y,matches:v,groups:[]};for(let e=0;e<S.length;e++)d.groups[e]={action:S[e],matched:v[e+1]};h-=b.length}else{{if("@rematch"===S&&(h-=b.length,b="",v=null,S="",null!==w))return k(w);if(0===b.length){if(0===a||m!==c.depth||_!==c.state||(d?d.groups.length:0)!==f)continue;throw pt(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(y))}let e=null;if(ct(S)&&0===S.indexOf("@brackets")){const t=S.substr("@brackets".length),i=Lt(this._lexer,b);if(!i)throw pt(this._lexer,"@brackets token returned but no bracket defined as: "+b);e=gt(i.token+t)}else e=gt(""===S?"":S+this._lexer.tokenPostfix);i<s&&o.emit(i+n,e)}if(null!==w)return k(w)}}var g,p;return yt.create(c,l)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new Ct(e,R.TJ);e!==this._languageId&&(d.RW.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=d.RW.get(e);return new Ct(e,t?t.getInitialState():R.TJ)}};function Lt(e,t){if(!t)return null;t=ut(e,t);const i=e.brackets;for(const e of i){if(e.open===t)return{token:e.token,bracketType:1};if(e.close===t)return{token:e.token,bracketType:-1}}return null}var Et,Nt;xt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(Et=4,Nt=_t.Ui,function(e,t){Nt(e,t,Et)})],xt);var Dt;const Tt=null===(Dt=window.trustedTypes)||void 0===Dt?void 0:Dt.createPolicy("standaloneColorizer",{createHTML:e=>e});class It{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==Tt?void 0:Tt.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return o=this,s=void 0,a=function*(){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),f.uS(t)&&(t=t.substr(1));const r=f.uq(t);if(!e.isRegisteredLanguageId(i))return At(r,s,o);const a=yield d.RW.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r<a;r++){const a=e[r],l=i.tokenizeEncoded(a,!0,s);rt.A.convertToEndOffset(l.tokens,a.length);const c=new rt.A(l.tokens,a,n),h=lt.wA.isBasicASCII(a,!0),d=lt.wA.containsRTL(a,h,!0),u=(0,at.tF)(new at.IJ(!1,!0,a,!1,h,d,0,c.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(u.html),o.push("<br/>"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof xt){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):At(r,s,o)},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,s||[])).next())}));var o,s,r,a}static colorizeLine(e,t,i,n,o=4){const s=lt.wA.isBasicASCII(e,t),r=lt.wA.containsRTL(e,s,i);return(0,at.tF)(new at.IJ(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function At(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,r=e.length;s<r;s++){const r=e[s];o[0]=r.length;const a=new rt.A(o,r,i),l=lt.wA.isBasicASCII(r,!0),c=lt.wA.containsRTL(r,l,!0),h=(0,at.tF)(new at.IJ(!1,!0,r,!1,l,c,0,a,[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(h.html),n.push("<br/>")}return n.join("")}var Mt,Rt=i(85152),Ot=i(56325),Pt=i(65321),Ft=i(38626),Bt=i(96542),Ht=i(73098),Wt=i(73046),Vt=i(52136),zt=i(54534),Ut=i(16830),jt=i(43407),Kt=i(90317),qt=i(9802),$t=i(74741),Gt=i(38819),Qt=i(25670),Yt=i(59554),Zt=function(e,t){return function(i,n){t(i,n,e)}};class Xt{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class Jt{constructor(e){this.entries=e}}const ei=(0,Yt.q5)("diff-review-insert",Wt.l.add,w.NC("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),ti=(0,Yt.q5)("diff-review-remove",Wt.l.remove,w.NC("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),ii=(0,Yt.q5)("diff-review-close",Wt.l.close,w.NC("diffReviewCloseIcon","Icon for 'Close' in diff review."));let ni=class e extends m.JT{constructor(e,t,i){super(),this._languageService=t,this._audioCueService=i,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,Ft.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,Ft.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Kt.o(this.actionBarContainer.domNode)),this._actionBar.push(new $t.aU("diffreview.close",w.NC("label.close","Close"),"close-diff-review "+Qt.k.asClassName(ii),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,Ft.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,Ft.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new qt.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(Pt.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=Pt.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(Pt.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow(),"next")),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033)||e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new l.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getPrevRow(),"previous")}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new l.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow(),"next")}accept(){let e=-1;const t=this._getCurrentFocusedRow();if(t){const i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new l.L(e,1)),this._diffEditor.revealPosition(new l.L(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){const e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e,t){const i=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),i&&i!==e&&(i.tabIndex=-1);const n=t?"next"===t?null==i?void 0:i.nextElementSibling:null==i?void 0:i.previousElementSibling:i;(null==n?void 0:n.classList.contains("line-insert"))?this._audioCueService.playAudioCue(x.diffLineInserted,!0):(null==n?void 0:n.classList.contains("line-delete"))&&this._audioCueService.playAudioCue(x.diffLineDeleted,!0),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const t=this._diffEditor.getLineChanges();if(!t||0===t.length)return[];const i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel();return i&&n?e._mergeAdjacent(t,i.getLineCount(),n.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];const n=[];let o=0;for(let s=0,r=e.length;s<r;s++){const a=e[s],l=a.originalStartLineNumber,c=a.originalEndLineNumber,h=a.modifiedStartLineNumber,d=a.modifiedEndLineNumber,u=[];let g=0;{const t=0===c?l:l-1,i=0===d?h:h-1;let n=1,o=1;if(s>0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-3+1,a=i-3+1;if(r<n){const e=n-r;r+=e,a+=e}if(a<o){const e=o-a;r+=e,a+=e}u[g++]=new Xt(r,t,a,i)}0!==c&&(u[g++]=new Xt(l,c,0,0)),0!==d&&(u[g++]=new Xt(0,0,h,d));{const n=0===c?l+1:c+1,o=0===d?h+1:d+1;let a=t,p=i;if(s+1<r){const t=e[s+1];a=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,p=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+3-1,f=o+3-1;if(m>a){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new Xt(n,m,o,f)}n[o++]=new Jt(u)}let s=n[0].entries;const r=[];let a=0;for(let e=1,t=n.length;e<t;e++){const t=n[e].entries,i=s[s.length-1],o=t[0];0===i.getType()&&0===o.getType()&&o.originalLineStart<=i.originalLineEnd?(s[s.length-1]=new Xt(i.originalLineStart,o.originalLineEnd,i.modifiedLineStart,o.modifiedLineEnd),s=s.concat(t.slice(1))):(r[a++]=new Jt(s),s=t)}return r[a++]=new Jt(s),r}_findDiffIndex(e){const t=e.lineNumber;for(let e=0,i=this._diffs.length;e<i;e++){const i=this._diffs[e].entries;if(t<=i[i.length-1].modifiedLineEnd)return e}return 0}_render(){const t=this._diffEditor.getOriginalEditor().getOptions(),i=this._diffEditor.getModifiedEditor().getOptions(),n=this._diffEditor.getOriginalEditor().getModel(),o=this._diffEditor.getModifiedEditor().getModel(),s=n.getOptions(),r=o.getOptions();if(!this._isVisible||!n||!o)return Pt.PO(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries,c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),c.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,Vt.N)(c,i.get(47));let h=0,d=0,u=0,g=0;for(let e=0,t=l.length;e<t;e++){const t=l[e],i=t.originalLineStart,n=t.originalLineEnd,o=t.modifiedLineStart,s=t.modifiedLineEnd;0!==i&&(0===h||i<h)&&(h=i),0!==n&&(0===d||n>d)&&(d=n),0!==o&&(0===u||o<u)&&(u=o),0!==s&&(0===g||s>g)&&(g=s)}const p=document.createElement("div");p.className="diff-review-row";const m=document.createElement("div");m.className="diff-review-cell diff-review-summary";const f=d-h+1,_=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${h},${f} +${u},${_} @@`)),p.setAttribute("data-line",String(u));const v=e=>0===e?w.NC("no_lines_changed","no lines changed"):1===e?w.NC("one_line_changed","1 line changed"):w.NC("more_lines_changed","{0} lines changed",e),b=v(f),C=v(_);p.setAttribute("aria-label",w.NC({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,h,b,u,C)),p.appendChild(m),p.setAttribute("role","listitem"),c.appendChild(p);const y=i.get(63);let S=u;for(let a=0,h=l.length;a<h;a++){const h=l[a];e._renderSection(c,h,S,y,this._width,t,n,s,i,o,r,this._languageService.languageIdCodec),0!==h.modifiedLineStart&&(S=h.modifiedLineEnd)}Pt.PO(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}static _renderSection(t,i,n,o,s,r,a,l,c,h,d,u){const g=i.getType();let p="diff-review-row",m="",f=null;switch(g){case 1:p="diff-review-row line-insert",m=" char-insert",f=ei;break;case 2:p="diff-review-row line-delete",m=" char-delete",f=ti}const _=i.originalLineStart,v=i.originalLineEnd,b=i.modifiedLineStart,C=i.modifiedLineEnd,y=Math.max(C-b,v-_),S=r.get(138),k=S.glyphMarginWidth+S.lineNumbersWidth,x=c.get(138),L=10+x.glyphMarginWidth+x.lineNumbersWidth;for(let i=0;i<=y;i++){const v=0===_?0:_+i,C=0===b?0:b+i,y=document.createElement("div");y.style.minWidth=s+"px",y.className=p,y.setAttribute("role","listitem"),0!==C&&(n=C),y.setAttribute("data-line",String(n));const S=document.createElement("div");S.className="diff-review-cell",S.style.height=`${o}px`,y.appendChild(S);const x=document.createElement("span");x.style.width=k+"px",x.style.minWidth=k+"px",x.className="diff-review-line-number"+m,0!==v?x.appendChild(document.createTextNode(String(v))):x.innerText=" ",S.appendChild(x);const E=document.createElement("span");E.style.width=L+"px",E.style.minWidth=L+"px",E.style.paddingRight="10px",E.className="diff-review-line-number"+m,0!==C?E.appendChild(document.createTextNode(String(C))):E.innerText=" ",S.appendChild(E);const N=document.createElement("span");if(N.className="diff-review-spacer",f){const e=document.createElement("span");e.className=Qt.k.asClassName(f),e.innerText="  ",N.appendChild(e)}else N.innerText="  ";let D;if(S.appendChild(N),0!==C){let t=this._renderLine(h,c,d.tabSize,C,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),S.insertAdjacentHTML("beforeend",t),D=h.getLineContent(C)}else{let t=this._renderLine(a,r,l.tabSize,v,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),S.insertAdjacentHTML("beforeend",t),D=a.getLineContent(v)}0===D.length&&(D=w.NC("blankLine","blank"));let T="";switch(g){case 0:T=v===C?w.NC({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",D,v):w.NC("equalLine","{0} original line {1} modified line {2}",D,v,C);break;case 1:T=w.NC("insertLine","+ {0} modified line {1}",D,C);break;case 2:T=w.NC("deleteLine","- {0} original line {1}",D,v)}y.setAttribute("aria-label",T),t.appendChild(y)}}static _renderLine(e,t,i,o,s){const r=e.getLineContent(o),a=t.get(47),l=rt.A.createEmpty(r,s),c=lt.wA.isBasicASCII(r,e.mightContainNonBasicASCII()),h=lt.wA.containsRTL(r,c,e.mightContainRTL());return(0,at.tF)(new at.IJ(a.isMonospace&&!t.get(30),a.canUseHalfwidthRightwardsArrow,r,!1,c,h,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(111),t.get(93),t.get(88),t.get(48)!==n.n0.OFF,null)).html}};ni._ttPolicy=null===(Mt=window.trustedTypes)||void 0===Mt?void 0:Mt.createPolicy("diffReview",{createHTML:e=>e}),ni=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Zt(1,O.O),Zt(2,S)],ni);class oi extends Ut.R6{constructor(){super({id:"editor.action.diffReview.next",label:w.NC("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Gt.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=ri(e);null==i||i.diffReviewNext()}}class si extends Ut.R6{constructor(){super({id:"editor.action.diffReview.prev",label:w.NC("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Gt.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=ri(e);null==i||i.diffReviewPrev()}}function ri(e){const t=e.get(v.$),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;e<t;e++){const t=i[e];if(t.getModifiedEditor().getId()===n.getId()||t.getOriginalEditor().getId()===n.getId())return t}return null}(0,Ut.Qr)(oi),(0,Ut.Qr)(si);var ai=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class li extends m.JT{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,i,n,o,s){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=o,this._clipboardService=s,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Qt.k.asClassName(Wt.l.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(63),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],h=0===n.modifiedEndLineNumber;l.push(new $t.aU("diff.clipboard.copyDeletedContent",h?n.originalEndLineNumber>n.modifiedStartLineNumber?w.NC("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):w.NC("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?w.NC("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):w.NC("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(()=>ai(this,void 0,void 0,(function*(){const e=new c.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let d,u=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(d=new $t.aU("diff.clipboard.copyDeletedLineContent",h?w.NC("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):w.NC("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>ai(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+u);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(d)),i.getOption(86)||l.push(new $t.aU("diff.inline.revertChange",w.NC("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>ai(this,void 0,void 0,(function*(){const e=new c.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new c.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new c.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const g=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(d&&(d.label=h?w.NC("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+u):w.NC("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+u)),l),autoSelectFirstItem:!0})};this._register(Pt.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=Pt.i(this._diffActions),n=Math.floor(r/3);e.preventDefault(),g(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),g(e.event.posx,e.event.posy+r))})))}_updateLightBulbPosition(e,t,i){const{top:n}=Pt.i(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],s<e)return t}return s}}var ci=i(85215);let hi=class{constructor(e,t){this.editorWorkerService=t,this.onDidChangeEventEmitter=new s.Q5,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="smart",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}computeDiff(e,t,i){return n=this,o=void 0,r=function*(){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i);const n=yield this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm);if(!n)throw new Error("no diff result available");return n},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};hi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,ci.p)],hi);var di,ui=i(50072),gi=i(82948),pi=i(92550),mi=i(30665),fi=i(84972),_i=i(5606),vi=i(60972),bi=i(59422),Ci=i(90535),yi=i(73910),wi=i(97781),Si=function(e,t){return function(i,n){t(i,n,e)}};class ki{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter((e=>!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},e.changeDecorations((e=>{this._decorations=e.deltaDecorations(this._decorations,[])}))}apply(e,t,i,n){const o=n?jt.Z.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;o<s;o++){const s=i.zones[o];s.suppressMouseDown=!0;const r=t.addZone(s);this._zones.push(r),this._zonesMap[String(r)]=!0,i.zones[o].diff&&s.marginDomNode&&(s.suppressMouseDown=!1,0!==(null===(n=i.zones[o].diff)||void 0===n?void 0:n.originalModel.getValueLength())&&this._inlineDiffMargins.push(new li(r,s.marginDomNode,e,i.zones[o].diff,this._contextMenuService,this._clipboardService)))}})),null==o||o.restore(e),e.changeDecorations((e=>{this._decorations=e.deltaDecorations(this._decorations,i.decorations)})),null==t||t.setZones(i.overviewZones)}}let xi=0;const Li=(0,Yt.q5)("diff-insert",Wt.l.add,w.NC("diffInsertIcon","Line decoration for inserts in the diff editor.")),Ei=(0,Yt.q5)("diff-remove",Wt.l.remove,w.NC("diffRemoveIcon","Line decoration for removals in the diff editor.")),Ni=null===(di=window.trustedTypes)||void 0===di?void 0:di.createPolicy("diffEditorWidget",{createHTML:e=>e}),Di=w.NC("diff-aria-navigation-tip"," use Shift + F7 to navigate changes");let Ti=class e extends m.JT{constructor(t,i,n,o,r,a,l,c,h,d,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new s.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new s.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new s.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new s.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._documentDiffProvider=this._register(a.createInstance(hi,i)),this._register(this._documentDiffProvider.onDidChange((e=>this._beginUpdateDecorationsSoon()))),this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(t)),this._instantiationService=a.createChild(new vi.y([Gt.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=h,this._id=++xi,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=$i(i,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"smart"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new F.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,Ft.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Pt.mu(this._overviewDomElement,Pt.tw.POINTER_DOWN,(e=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(e)}))),this._register(Pt.nm(this._overviewDomElement,Pt.tw.MOUSE_WHEEL,(e=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new ki(d,o),this._modifiedEditorState=new ki(d,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new zt.I(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(ni,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Pi(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Bi(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=Ut.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,B.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,wi.m6)(e.type),i}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&(b.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(47)&&this._updateDecorationsRunner.schedule(),e.hasChanged(139)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(47)&&this._updateDecorationsRunner.schedule(),e.hasChanged(139)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),this._register(n.onMouseDown((e=>{var t,i;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("arrow-revert-change"))){const t=e.target.position.lineNumber,n=e.target,o=null===(i=this._diffComputationResult)||void 0===i?void 0:i.changes.find((e=>(null==n?void 0:n.detail.afterLineNumber)===e.modifiedStartLineNumber||e.modifiedEndLineNumber>0&&e.modifiedStartLineNumber===t));return o&&this.revertChange(o),e.event.stopPropagation(),void this._updateDecorations()}}))),n}revertChange(e){const t=this._modifiedEditor,i=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!i||!n||!t)return;const o=e.originalEndLineNumber>0?new c.e(e.originalStartLineNumber,1,e.originalEndLineNumber,i.getLineMaxColumn(e.originalEndLineNumber)):null,s=o?i.getValueInRange(o):null,r=e.modifiedEndLineNumber>0?new c.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,n.getLineMaxColumn(e.modifiedEndLineNumber)):null,a=n.getEOL();if(0===e.originalEndLineNumber&&r){let i=r;e.modifiedStartLineNumber>1?i=r.setStartPosition(e.modifiedStartLineNumber-1,n.getLineMaxColumn(e.modifiedStartLineNumber-1)):e.modifiedEndLineNumber<n.getLineCount()&&(i=r.setEndPosition(e.modifiedEndLineNumber+1,1)),t.executeEdits("diffEditor",[{range:i,text:""}])}else if(0===e.modifiedEndLineNumber&&null!==s){const i=e.modifiedStartLineNumber<n.getLineCount()?new l.L(e.modifiedStartLineNumber+1,1):new l.L(e.modifiedStartLineNumber,n.getLineMaxColumn(e.modifiedStartLineNumber));t.executeEdits("diffEditor",[{range:c.e.fromPositions(i,i),text:e.modifiedStartLineNumber<n.getLineCount()?s+a:a+s}])}else r&&null!==s&&t.executeEdits("diffEditor",[{range:r,text:s}])}_createInnerEditor(e,t,i,n){return e.createInstance(Ot.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return I.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=$i(t,this._options),n=(s=i,{enableSplitViewResizing:(o=this._options).enableSplitViewResizing!==s.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==s.renderSideBySide,renderMarginRevertIcon:o.renderMarginRevertIcon!==s.renderMarginRevertIcon,maxComputationTime:o.maxComputationTime!==s.maxComputationTime,maxFileSize:o.maxFileSize!==s.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==s.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==s.renderIndicators,originalEditable:o.originalEditable!==s.originalEditable,diffCodeLens:o.diffCodeLens!==s.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==s.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==s.diffWordWrap,diffAlgorithm:o.diffAlgorithm!==s.diffAlgorithm});var o,s;this._options=i;const r=n.ignoreTrimWhitespace||n.renderIndicators||n.renderMarginRevertIcon,a=this._isVisible&&(n.maxComputationTime||n.maxFileSize);this._documentDiffProvider.setOptions(i),r?this._beginUpdateDecorations():a&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Pi(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Bi(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._modifiedEditor.createDecorationsCollection(e)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,o=1024*this._options.maxFileSize*1024,s=e=>{const t=e.getValueLength();return 0===o||t<=o};s(t)&&s(i)?(this._setState(1),this._documentDiffProvider.computeDiff(t,i,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime}).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:e.identical,quitEarly:e.quitEarly,changes:e.changes.map((e=>{let t,i,n,o,s=e.innerChanges;return e.originalRange.isEmpty?(t=e.originalRange.startLineNumber-1,i=0,s=void 0):(t=e.originalRange.startLineNumber,i=e.originalRange.endLineNumberExclusive-1),e.modifiedRange.isEmpty?(n=e.modifiedRange.startLineNumber-1,o=0,s=void 0):(n=e.modifiedRange.startLineNumber,o=e.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:t,originalEndLineNumber:i,modifiedStartLineNumber:n,modifiedEndLineNumber:o,charChanges:null==s?void 0:s.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}}))},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(w.NC("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(86),o=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,n,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,o.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,o.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.ariaLabel+=Di,t.readOnly=!this._options.originalEditable,t.dropIntoEditor={enabled:!t.readOnly},t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel+=Di,i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=n.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){var t;null===(t=this._strategy)||void 0===t||t.dispose(),this._strategy=e,this._boundarySashes&&e.setBoundarySashes(this._boundarySashes),e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e<t(i[0]))return null;let n=0,o=i.length-1;for(;n<o;){const s=Math.floor((n+o)/2),r=t(i[s]),a=s+1<=o?t(i[s+1]):1073741824;e<r?o=s-1:e>=a?n=s+1:(n=s,o=s)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};Ti.ONE_OVERVIEW_WIDTH=15,Ti.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Ti.UPDATE_DIFF_DECORATIONS_DELAY=200,Ti=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Si(3,fi.p),Si(4,Gt.i6),Si(5,y.TG),Si(6,v.$),Si(7,wi.XE),Si(8,bi.lT),Si(9,_i.i),Si(10,Ci.ek)],Ti);class Ii extends m.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(yi.P6Y)||(e.getColor(yi.ypS)||yi.CzK).transparent(2),i=e.getColor(yi.F9q)||(e.getColor(yi.P4M)||yi.keg).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o,s){s=s.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const r=this._getViewZones(e,o,s,i),a=this._getOriginalEditorDecorations(r,e,t,i),l=this._getModifiedEditorDecorations(r,e,t,i,n);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:r.modified}}}setBoundarySashes(e){}}class Ai{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Mi{constructor(e,t,i,n,o){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=o}static _getViewLineCount(e,t,i){const n=e.getModel(),o=e._getViewModel();if(n&&o){const e=qi(n,o,t,i);return e.endLineNumber-e.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(63),t=this._modifiedEditor.getOption(63),i=-1!==this._originalEditor.getOption(139).wrappingColumn,n=-1!==this._modifiedEditor.getOption(139).wrappingColumn,o=i||n,s=this._originalEditor.getModel(),r=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l=[],c=[];let h=0,d=0,u=0,g=0,p=0,m=0;const f=(e,t)=>e.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new Ai(this._modifiedForeignVZ),b=new Ai(this._originalForeignVZ);let C=1,y=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const w=i<n?this._lineChanges[i]:null;null!==w?(u=w.originalStartLineNumber+(w.originalEndLineNumber>0?-1:0),g=w.modifiedStartLineNumber+(w.modifiedEndLineNumber>0?-1:0),d=w.originalEndLineNumber>0?Mi._getViewLineCount(this._originalEditor,w.originalStartLineNumber,w.originalEndLineNumber):0,h=w.modifiedEndLineNumber>0?Mi._getViewLineCount(this._modifiedEditor,w.modifiedStartLineNumber,w.modifiedEndLineNumber):0,p=Math.max(w.originalStartLineNumber,w.originalEndLineNumber),m=Math.max(w.modifiedStartLineNumber,w.modifiedEndLineNumber)):(u+=1e7+d,g+=1e7+h,p=u,m=g);let S=[],k=[];if(o){let e;e=w?w.originalEndLineNumber>0?w.originalStartLineNumber-C:w.modifiedStartLineNumber-y:s.getLineCount()-C+1;for(let t=0;t<e;t++){const e=C+t,i=y+t,n=r.getModelLineViewLineCount(e),o=a.getModelLineViewLineCount(i);n<o?S.push({afterLineNumber:e,heightInLines:o-n,domNode:null,marginDomNode:null}):n>o&&k.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}w&&(C=(w.originalEndLineNumber>0?w.originalEndLineNumber:w.originalStartLineNumber)+1,y=(w.modifiedEndLineNumber>0?w.modifiedEndLineNumber:w.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let i=null;w&&w.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=w.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,k.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==w&&Wi(w)){const e=this._produceOriginalFromDiff(w,d,h);e&&S.push(e)}if(null!==w&&Vi(w)){const e=this._produceModifiedFromDiff(w,d,h);e&&k.push(e)}let x=0,L=0;for(S=S.sort(f),k=k.sort(f);x<S.length&&L<k.length;){const e=S[x],t=k[L],i=e.afterLineNumber-u,n=t.afterLineNumber-g;i<n?(_(l,e),x++):n<i?(_(c,t),L++):e.shouldNotShrink?(_(l,e),x++):t.shouldNotShrink?(_(c,t),L++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,L++):(t.heightInLines-=e.heightInLines,x++)}for(;x<S.length;)_(l,S[x]),x++;for(;L<k.length;)_(c,k[L]),L++}return{original:Mi._ensureDomNodes(l),modified:Mi._ensureDomNodes(c)}}static _ensureDomNodes(e){return e.map((e=>(e.domNode||(e.domNode=ji()),e)))}}function Ri(e,t,i,n,o){return{range:new c.e(e,t,i,n),options:o}}const Oi={arrowRevertChange:gi.qx.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+Qt.k.asClassName(Wt.l.arrowRight)}),charDelete:gi.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:gi.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:gi.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:gi.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:gi.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:gi.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Qt.k.asClassName(Li),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:gi.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:gi.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Qt.k.asClassName(Ei),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:gi.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Pi extends Ii{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Ht.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ti.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Pi.MINIMUM_EDITOR_WIDTH?(i<Pi.MINIMUM_EDITOR_WIDTH&&(i=Pi.MINIMUM_EDITOR_WIDTH),i>t-Pi.MINIMUM_EDITOR_WIDTH&&(i=t-Pi.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ti.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new Fi(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(Vi(e)){r.decorations.push({range:new c.e(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824),options:n?Oi.lineDeleteWithSign:Oi.lineDelete}),Wi(e)&&e.charChanges||r.decorations.push(Ri(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824,Oi.charDeleteWholeLine));const t=qi(a,l,e.originalStartLineNumber,e.originalEndLineNumber);if(r.overviewZones.push(new mi.EY(t.startLineNumber,t.endLineNumber,0,s)),e.charChanges)for(const t of e.charChanges)if(Ui(t))if(i)for(let e=t.originalStartLineNumber;e<=t.originalEndLineNumber;e++){let i,n;i=e===t.originalStartLineNumber?t.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.originalEndLineNumber?t.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(Ri(e,i,e,n,Oi.charDelete))}else r.decorations.push(Ri(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,Oi.charDelete))}return r}_getModifiedEditorDecorations(e,t,i,n,o){const s=this._dataSource.getModifiedEditor(),r=String(this._insertColor),a={decorations:[],overviewZones:[]},l=s.getModel(),h=s._getViewModel();for(const s of t){if(o)if(s.modifiedEndLineNumber>0)a.decorations.push({range:new c.e(s.modifiedStartLineNumber,1,s.modifiedStartLineNumber,1),options:Oi.arrowRevertChange});else{const t=e.modified.find((e=>e.afterLineNumber===s.modifiedStartLineNumber));t&&(t.marginDomNode=Ki())}if(Wi(s)){a.decorations.push({range:new c.e(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,1073741824),options:n?Oi.lineInsertWithSign:Oi.lineInsert}),Vi(s)&&s.charChanges||a.decorations.push(Ri(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,1073741824,Oi.charInsertWholeLine));const e=qi(l,h,s.modifiedStartLineNumber,s.modifiedEndLineNumber);if(a.overviewZones.push(new mi.EY(e.startLineNumber,e.endLineNumber,0,r)),s.charChanges)for(const e of s.charChanges)if(zi(e))if(i)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:l.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:l.getLineLastNonWhitespaceColumn(t),a.decorations.push(Ri(t,i,t,n,Oi.charInsert))}else a.decorations.push(Ri(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Oi.charInsert))}}return a}}Pi.MINIMUM_EDITOR_WIDTH=100;class Fi extends Mi{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Bi extends Ii{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new Hi(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),a=r.getModel(),l=r._getViewModel();let h=0;for(const i of t)if(Vi(i)){for(s.decorations.push({range:new c.e(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:Oi.lineDeleteMargin});h<e.modified.length;){const t=e.modified[h];if(t.diff&&t.diff.originalStartLineNumber>=i.originalStartLineNumber)break;h++}let t=0;if(h<e.modified.length){const n=e.modified[h];n.diff&&n.diff.originalStartLineNumber===i.originalStartLineNumber&&n.diff.originalEndLineNumber===i.originalEndLineNumber&&n.diff.modifiedStartLineNumber===i.modifiedStartLineNumber&&n.diff.modifiedEndLineNumber===i.modifiedEndLineNumber&&(t=n.heightInLines)}const n=qi(a,l,i.originalStartLineNumber,i.originalEndLineNumber);s.overviewZones.push(new mi.EY(n.startLineNumber,n.endLineNumber,t,o))}return s}_getModifiedEditorDecorations(e,t,i,n,o){const s=this._dataSource.getModifiedEditor(),r=String(this._insertColor),a={decorations:[],overviewZones:[]},l=s.getModel(),h=s._getViewModel();for(const e of t)if(Wi(e)){a.decorations.push({range:new c.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?Oi.lineInsertWithSign:Oi.lineInsert});const t=qi(l,h,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(a.overviewZones.push(new mi.EY(t.startLineNumber,t.endLineNumber,0,r)),e.charChanges){for(const t of e.charChanges)if(zi(t))if(i)for(let e=t.modifiedStartLineNumber;e<=t.modifiedEndLineNumber;e++){let i,n;i=e===t.modifiedStartLineNumber?t.modifiedStartColumn:l.getLineFirstNonWhitespaceColumn(e),n=e===t.modifiedEndLineNumber?t.modifiedEndColumn:l.getLineLastNonWhitespaceColumn(e),a.decorations.push(Ri(e,i,e,n,Oi.charInsert))}else a.decorations.push(Ri(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,Oi.charInsert))}else a.decorations.push(Ri(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,Oi.charInsertWholeLine))}return a}layout(){return Math.max(5,this._decorationsLeft)}}class Hi extends Mi{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=s,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${Bt.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const s={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(s),s}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(47),o=t.get(30),s=n.typicalHalfwidthCharacterWidth,r=t.get(98),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),h=t.get(63),d=t.get(138).decorationsWidth,u=t.get(111),g=t.get(93),p=t.get(88),m=t.get(48),f=this._lineBreaksComputer.finalize();let _=0;for(let t=0;t<this._pendingLineChange.length;t++){const v=this._pendingLineChange[t],b=this._pendingViewZones[t],C=b.domNode;(0,Vt.N)(C,n);const y=b.marginDomNode;(0,Vt.N)(y,n);const w=[];if(v.charChanges)for(const e of v.charChanges)Ui(e)&&w.push(new lt.$t(new c.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const S=w.length>0,k=new ui.HT(1e4);let x=0,L=0,E=null;for(let t=v.originalStartLineNumber;t<=v.originalEndLineNumber;t++){const s=t-v.originalStartLineNumber,r=this._originalModel.tokenization.getLineTokens(t),c=r.getLineContent(),C=f[_++],N=pi.Kp.filter(w,t,1,c.length+1);if(C){let f=0;for(const e of C.breakOffsets){const t=r.sliceAndInflate(f,e,0),s=c.substring(f,e);x=Math.max(x,this._renderOriginalLine(L++,s,t,pi.Kp.extractWrapped(N,f,e),S,a,l,n,o,h,d,u,g,p,m,i,k,y)),f=e}for(E||(E=[]);E.length<s;)E[E.length]=1;E[s]=C.breakOffsets.length,b.heightInLines+=C.breakOffsets.length-1;const _=document.createElement("div");_.className="gutter-delete",e.original.push({afterLineNumber:t,afterColumn:0,heightInLines:C.breakOffsets.length-1,domNode:ji(),marginDomNode:_})}else x=Math.max(x,this._renderOriginalLine(L++,c,r,N,S,a,l,n,o,h,d,u,g,p,m,i,k,y))}x+=r;const N=k.build(),D=Ni?Ni.createHTML(N):N;if(C.innerHTML=D,b.minWidthInPx=x*s,E){const e=v.originalEndLineNumber-v.originalStartLineNumber;for(;E.length<=e;)E[E.length]=1}b.diff.viewLineCounts=E}e.original.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,o,s,r,a,l,c,h,d,u,g,p,m,f,_,v){_.appendString('<div class="view-line'),s||_.appendString(" char-delete"),_.appendString('" style="top:'),_.appendString(String(e*h)),_.appendString('px;width:1000000px;">');const b=lt.wA.isBasicASCII(t,r),C=lt.wA.containsRTL(t,b,a),y=(0,at.d1)(new at.IJ(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,b,C,0,i,o,f,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,u,g,p,m!==n.n0.OFF,null),_);if(_.appendString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${Qt.k.asClassName(Ei)}`,t.setAttribute("style",`position:absolute;top:${e*h}px;width:${d}px;height:${h}px;right:0;`),v.appendChild(t)}return y.characterMapping.getHorizontalOffset(y.characterMapping.length)}}function Wi(e){return e.modifiedEndLineNumber>0}function Vi(e){return e.originalEndLineNumber>0}function zi(e){return e.modifiedStartLineNumber===e.modifiedEndLineNumber?e.modifiedEndColumn-e.modifiedStartColumn>0:e.modifiedEndLineNumber-e.modifiedStartLineNumber>0}function Ui(e){return e.originalStartLineNumber===e.originalEndLineNumber?e.originalEndColumn-e.originalStartColumn>0:e.originalEndLineNumber-e.originalStartLineNumber>0}function ji(){const e=document.createElement("div");return e.className="diagonal-fill",e}function Ki(){const e=document.createElement("div");return e.className="arrow-revert-change "+Qt.k.asClassName(Wt.l.arrowRight),Pt.$("div",{},e)}function qi(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new c.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function $i(e,t){return{enableSplitViewResizing:(0,n.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:(0,n.O7)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,n.O7)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,n.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,n.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,n.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,n.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,n.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,n.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,n.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,o=t.diffWordWrap,(0,n.NY)(i,o,["off","on","inherit"])),diffAlgorithm:(0,n.NY)(e.diffAlgorithm,t.diffAlgorithm,["smart","experimental"])};var i,o}(0,wi.Ic)(((e,t)=>{const i=e.getColor(yi.L_t);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${i} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${i} 50%, ${i} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var Gi=i(30653),Qi=i(66663),Yi=i(91741);let Zi=class extends m.JT{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new s.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new s.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new s.Q5),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new s.Q5),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Yi.S,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}openCodeEditor(e,t,i){return n=this,o=void 0,r=function*(){for(const n of this._codeEditorOpenHandlers){const o=yield n(e,t,i);if(null!==o)return o}return null},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,m.OF)(t)}};Zi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,wi.XE)],Zi);var Xi=i(65026),Ji=function(e,t){return function(i,n){t(i,n,e)}};let en=class extends Zi{constructor(e,t){super(t),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler(((e,t,i)=>{return n=this,o=void 0,r=function*(){return t?this.doOpenEditor(t,e):null},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===Qi.lg.http||i===Qi.lg.https)return(0,Pt.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};en=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ji(0,Gt.i6),Ji(1,wi.XE)],en),(0,Xi.z)(v.$,en,0);const tn=(0,y.yh)("layoutService");var nn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},on=function(e,t){return function(i,n){t(i,n,e)}};let sn=class{get dimension(){return this._dimension||(this._dimension=Pt.D6(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=s.ju.None,this.offset={top:0,quickPickTop:0}}};sn=nn([on(0,v.$)],sn);let rn=class extends sn{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};rn=nn([on(1,v.$)],rn),(0,Xi.z)(tn,sn,1);var an=i(14603),ln=i(28820),cn=i(64862),hn=function(e,t){return function(i,n){t(i,n,e)}},dn=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function un(e){return e.scheme===Qi.lg.file?e.fsPath:e.path}let gn=0;class pn{constructor(e,t,i,n,o,s,r){this.id=++gn,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class mn{constructor(e,t){this.resourceLabel=e,this.reason=t}}class fn{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(w.NC({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(w.NC({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class _n{constructor(e,t,i,n,o,s,r){this.id=++gn,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new fn),this.removedResources.has(t)||this.removedResources.set(t,new mn(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new fn),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new mn(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class vn{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e<i;e++)t.push(this._past[e].id);for(let e=this._future.length-1;e>=0;e--)t.push(this._future[e].id);return new cn.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s<r;s++,n++){const r=this._past[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class bn{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e<t;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const Cn=new vn("","");Cn.locked=!0;let yn=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const e of this._editStacks)t.push(e[1].toString());console.log(t.join("\n"))}pushElement(e,t=cn.Xt.None,i=cn.gJ.None){if(0===e.type){const n=un(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new pn(e,n,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,o=[],s=[];for(const t of e.resources){const e=un(t),i=this.getUriComparisonKey(t);n.has(i)||(n.add(i),o.push(e),s.push(i))}1===o.length?this._pushElement(new pn(e,o[0],s[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new _n(e,o,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let o;this._editStacks.has(n)?o=this._editStacks.get(n):(o=new vn(i,n),this._editStacks.set(n,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=un(e.resource),i=this.getUriComparisonKey(e.resource),o=new pn(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitPastWorkspaceElement(e,n)}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=un(e.resource),i=this.getUriComparisonKey(e.resource),o=new pn(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitFutureWorkspaceElement(e,n)}removeElements(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new cn.YO(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.sourceId===e&&(!t||s.sourceOrder>t.sourceOrder)&&(t=s,i=n)}return[t,i]}canUndo(e){if(e instanceof cn.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,B.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}_invokeWorkspacePrepare(e){return dn(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return m.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?m.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(m.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,m.Wf)(i)?t(i):i.then((e=>t(e))):t(m.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Cn);return new bn(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new wn(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new wn}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,w.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,w.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,w.NC({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,w.NC({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,w.NC({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return dn(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(an.Z.Info,w.NC("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[w.NC({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),w.NC("nok","Undo this File"),w.NC("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const s=this._checkWorkspaceUndo(e,t,i,!1);if(s)return s.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new bn([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=w.NC({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof cn.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}_confirmAndContinueUndo(e,t,i){return dn(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(an.Z.Info,w.NC("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[w.NC("confirmDifferentSource.yes","Yes"),w.NC("confirmDifferentSource.no","No")],{cancelId:1})).choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder<t.sourceOrder)&&(t=s,i=n)}return[t,i]}canRedo(e){if(e instanceof cn.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasFutureElements()}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new wn(this._redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new wn}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,w.NC({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,w.NC({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestFutureElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,t,null,w.NC({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,w.NC({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,w.NC({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return dn(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new bn([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=w.NC({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder<t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof cn.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"==typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(i){if(i.groupId){const[e,t]=this._findClosestRedoElementInGroup(i.groupId);if(i!==e&&t)return this._redo(t)}try{return 1===i.type?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};yn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([hn(0,ln.S),hn(1,bi.lT)],yn);class wn{constructor(e){this.returnValue=e}}(0,Xi.z)(cn.tJ,yn,1),i(88191);var Sn=i(59069),kn=i(8313),xn=i(66007),Ln=i(800),En=i(69386),Nn=i(88216),Dn=i(94565),Tn=i(43702),In=i(98401),An=i(23193),Mn=i(89872);function Rn(e){return Object.isFrozen(e)?e:C._A(e)}class On{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof On)return e;const t=new Pn("");return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,_t.Mt)(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e);return{value:i,override:t?this.rawConfiguration.getOverrideValue(e,t):void 0,merged:t?this.rawConfiguration.override(t).getValue(e):i}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,_t.Mt)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=C.I8(this.contents),o=C.I8(this.overrides),s=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const t of e)if(r.push(...(null===(i=t.raw)||void 0===i?void 0:i.length)?t.raw:[t]),!t.isEmpty()){this.mergeContents(n,t.contents);for(const e of t.overrides){const[t]=o.filter((t=>qe.fS(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=qe.EB(t.keys)):o.push(C.I8(e))}for(const e of t.keys)-1===s.indexOf(e)&&s.push(e)}return new On(n,s,o,r.every((e=>e instanceof On))?void 0:r)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of qe.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=C.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new On(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&In.Kn(e[i])&&In.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=C.I8(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=C.I8(e))};for(const i of this.overrides)qe.fS(i.identifiers,[e])?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,_t.xL)(this.contents,e),An.eU.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>qe.fS(t.identifiers,(0,An.ny)(e)))),1))}updateValue(e,t,i){(0,_t.KV)(this.contents,e,t,(e=>console.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),An.eU.test(e)&&this.overrides.push({identifiers:(0,An.ny)(e),keys:Object.keys(this.contents[e]),contents:(0,_t.Od)(this.contents[e],(e=>console.error(e)))})}}class Pn{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new On}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new On(i,n,o,r?[e]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=Mn.B.as(An.IP.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);return e=n.raw,{contents:(0,_t.Od)(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){let o=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted))return{raw:e,restricted:[],hasExcludedProperties:o};const s={},r=[];for(const a in e)if(An.eU.test(a)&&i){const i=this.filter(e[a],t,!1,n);s[a]=i.raw,o=o||i.hasExcludedProperties,r.push(...i.restricted)}else{const i=t[a],l=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&r.push(a),void 0!==l&&void 0!==n.scopes&&!n.scopes.includes(l)||n.skipRestricted&&(null==i?void 0:i.restricted)?o=!0:s[a]=e[a]}return{raw:s,restricted:r,hasExcludedProperties:o}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(An.eU.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:(0,An.ny)(n),keys:Object.keys(o),contents:(0,_t.Od)(o,t)})}return i}}class Fn{constructor(e,t,i,n,o,s,r,a,l,c,h,d,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=h,this.folderConfigurationModel=d,this.memoryConfigurationModel=u}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return Rn(n.value)},get override(){return Rn(n.override)},get merged(){return Rn(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return void 0!==this.userInspectValue.value||void 0!==this.userInspectValue.override?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class Bn{constructor(e,t,i,n,o=new On,s=new On,r=new Tn.Y9,a=new On,l=new Tn.Y9){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Tn.Y9,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new On,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new Fn(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),o=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),r=e.folders.reduce(((e,t)=>(e.set(a.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new Tn.Y9);return new Bn(t,i,n,o,new On,s,r,new On,new Tn.Y9)}static parseConfigurationModel(e){return new On(e.contents,e.keys,e.overrides)}}class Hn{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Bn.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;const s=o+n.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!C.fS(n,o)}return!0}}var Wn=i(77173);const Vn=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class zn extends m.JT{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:s.ju.None}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new s.Q5),this._currentChord=null,this._currentChordChecker=new F.zh,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Un.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new F._F,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),null;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),null;const o=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,n)}_enterMultiChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(w.NC("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()}),500),Wn.F.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null,Wn.F.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Un.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Un.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new Un(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,s=null;if(i){const[t]=e.getSingleModifierDispatchChords();o=t,s=t}else[o]=e.getDispatchChords(),s=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,s,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterMultiChord?(n=!0,this._enterMultiChordMode(o,a),this._log("+ Entering chord mode..."),n):(this._currentChord&&(l&&l.commandId||(this._log(`+ Leaving chord mode: Nothing bound to "${this._currentChord.label} ${a}".`),this._notificationService.status(w.NC("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),this._log(`+ Invoking command ${l.commandId}.`),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),Vn.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Un{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Un.EMPTY=new Un(null);var jn=i(91847);class Kn{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Kn.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e<t;e++){const t=this._keybindings[e];0!==t.chords.length&&(t.when&&0===t.when.type||this._addKeyPress(t.chords[0],t))}}static _isTargetedForRemoval(e,t,i,n){if(t&&e.chords[0]!==t)return!1;if(i&&e.chords[1]!==i)return!1;if(n&&1!==n.type){if(!e.when)return!1;if(!(0,Gt.Fb)(n,e.when))return!1}return!0}static handleRemovals(e){const t=new Map;for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.command&&"-"===n.command.charAt(0)){const e=n.command.substring(1);t.has(e)?t.get(e).push(n):t.set(e,[n])}}if(0===t.size)return e;const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];if(!o.command||0===o.command.length){i.push(o);continue}if("-"===o.command.charAt(0))continue;const s=t.get(o.command);if(!s||!o.isDefault){i.push(o);continue}let r=!1;for(const e of s){const t=e.chords[0],i=e.chords[1],n=e.when;if(this._isTargetedForRemoval(o,t,i,n)){r=!0;break}}r||i.push(o)}return i}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){const n=i[e];if(n.command===t.command)continue;const o=n.chords.length>1,s=t.chords.length>1;o&&s&&n.chords[1]!==t.chords[1]||Kn.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||1===t.type||!(!e||1===e.type)&&(0,Gt.K8)(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(void 0===i||0===i.length)return null;if(1===i.length)return i[0];for(let e=i.length-1;e>=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t<o;t++){const o=e[t];o.chords[1]===i&&n.push(o)}}else{const e=this._map.get(i);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=e}const o=this._findCommand(e,n);return o?null===t&&o.chords.length>1&&null!==o.chords[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${qn(o.when)}, source: ${$n(o)}.`),{enterMultiChord:!0,leaveMultiChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${qn(o.when)}, source: ${$n(o)}.`),{enterMultiChord:!1,leaveMultiChord:o.chords.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(Kn._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function qn(e){return e?`${e.serialize()}`:"no when condition"}function $n(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var Gn=i(49989);class Qn{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Yn(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Yn(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function Yn(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return[];t.push(n)}return t}var Zn=i(8030);class Xn extends kn.f1{constructor(e,t){if(super(),0===t.length)throw(0,B.b1)("chords");this._os=e,this._chords=t}getLabel(){return Zn.xo.toLabel(this._os,this._chords,(e=>this._getLabel(e)))}getAriaLabel(){return Zn.X4.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Zn.jC.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new kn.aZ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class Jn extends Xn{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return r.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":r.kL.toString(e.keyCode)}_getElectronAccelerator(e){return r.kL.toElectronAccelerator(e.keyCode)}_getChordDispatch(e){return Jn.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=r.kL.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=r.Vd[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof kn.$M)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new kn.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Yn(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new Jn(i,t)]:[]}}var eo,to=i(44349),io=i(10829),no=i(40382),oo=i(20913),so=i(95935),ro=i(33425),ao=i(10161),lo=i(61134);function co(e,t,i){const n=i.mode===eo.ALIGN?i.offset:i.offset+i.size,o=i.mode===eo.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(eo||(eo={}));class ho extends m.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=m.JT.None,this.toDisposeOnSetContainer=m.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Pt.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Pt.Cp(this.view),this.setContainer(e,t),this._register((0,m.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=Pt.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=uo,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Pt.$("slot"))}else this.container.appendChild(this.view);const i=new m.SL;ho.BUBBLE_UP_EVENTS.forEach((e=>{i.add(Pt.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),ho.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(Pt.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){var t,i;this.isVisible()&&this.hide(),Pt.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Pt.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||m.JT.None,this.delegate=e,this.doLayout(),null===(i=(t=this.delegate).focus)||void 0===i||i.call(t)}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||H.gn&&ao.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(Pt.Re(e)){const i=Pt.i(e),n=Pt.I8(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const i=Pt.w(this.view),n=Pt.wn(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const e={offset:t.top-window.pageYOffset,size:t.height,position:0===o?0:1},l={offset:t.left,size:t.width,position:0===s?0:1,mode:eo.ALIGN};r=co(window.innerHeight,n,e)+window.pageYOffset,lo.e.intersects({start:r,end:r+n},{start:e.offset,end:e.offset+e.size})&&(l.mode=eo.AVOID),a=co(window.innerWidth,i,l)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},l={offset:t.top,size:t.height,position:0===o?0:1,mode:eo.ALIGN};a=co(window.innerWidth,i,e),lo.e.intersects({start:a,end:a+i},{start:e.offset,end:e.offset+e.size})&&(l.mode=eo.AVOID),r=co(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=Pt.i(this.container);this.view.style.top=r-(this.useFixedPosition?Pt.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?Pt.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Pt.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Pt.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}ho.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],ho.BUBBLE_DOWN_EVENTS=["click"];const uo='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';let go=class extends m.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=m.JT.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new ho(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t===this.container&&this.shadowRoot===i||(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=(0,m.OF)((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};go=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,tn)],go);var po=i(15527),mo=i(88721),fo=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const _o="**",vo=/\//g;function bo(e,t){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return`(?:[/\\\\]|[^/\\\\]+[/\\\\]${t?"|[/\\\\][^/\\\\]+":""})*?`}}function Co(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function yo(e){if(!e)return"";let t="";const i=Co(e,"/");if(i.every((e=>e===_o)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===_o){if(e)return;t+=bo(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${Co(s,",").map((e=>yo(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+="[^/\\\\]";continue;case"*":t+=bo(1);continue;default:t+=(0,f.ec)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?"/"===i?"":(0,f.ec)(i):"^",a+=e}o<i.length-1&&(i[o+1]!==_o||o+2<i.length)&&(t+="[/\\\\]")}e=n===_o}))}return t}const wo=/^\*\*\/\*\.[\w\.-]+$/,So=/^\*\*\/([\w\.-]+)\/?$/,ko=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,xo=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,Lo=/^\*\*((\/[\w\.-]+)+)\/?$/,Eo=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,No=new Tn.z6(1e4),Do=function(){return!1},To=function(){return null};function Io(e,t){if(!e)return To;let i;i="string"!=typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let o,s=No.get(n);return s||(s=wo.test(i)?function(e,t){return function(i,n){return"string"==typeof i&&i.endsWith(e)?t:null}}(i.substr(4),i):(o=So.exec(Ao(i,t)))?function(e,t){const i=`/${e}`,n=`\\${e}`,o=function(o,s){return"string"!=typeof o?null:s?s===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(o[1],i):(t.trimForExclusions?xo:ko).test(i)?function(e,t){const i=Oo(e.slice(1,-1).split(",").map((e=>Io(e,t))).filter((e=>e!==To)),e),n=i.length;if(!n)return To;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o<s;o++)if(i[o](t,n))return e;return null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(i,t):(o=Lo.exec(Ao(i,t)))?Mo(o[1].substr(1),i,!0):(o=Eo.exec(Ao(i,t)))?Mo(o[1],i,!1):function(e){try{const t=new RegExp(`^${yo(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return To}}(i),No.set(n,s)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return(0,po.KM)(i,t.base,!H.IJ)?e((0,f.j3)(i.substr(t.base.length),mo.ir),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(s,e)}function Ao(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Mo(e,t,i){const n=mo.ir===mo.KR.sep,o=n?e:e.replace(vo,mo.ir),s=mo.ir+o,r=mo.KR.sep+e;let a;return a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t},a.allPaths=[(i?"*/":"./")+e],a}function Ro(e,t={}){if(!e)return Do;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=Io(e,t);if(i===To)return Do;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=Oo(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return To;const n=Io(e,i);if(n===To)return To;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,r)=>{if(!r||!n(t,o))return null;const a=r(i.replace("$(basename)",(()=>s)));return(0,F.J8)(a)?a.then((t=>t?e:null)):a?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==To))),n=i.length;if(!n)return To;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){let n;for(let o=0,s=i.length;o<s;o++){const s=i[o](e,t);if("string"==typeof s)return s;(0,F.J8)(s)&&(n||(n=[]),n.push(s))}return n?(()=>fo(this,void 0,void 0,(function*(){for(const e of n){const t=yield e;if("string"==typeof t)return t}return null})))():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o,s;for(let r=0,a=i.length;r<a;r++){const a=i[r];a.requiresSiblings&&n&&(t||(t=(0,mo.EZ)(e)),o||(o=t.substr(0,t.length-(0,mo.DZ)(e).length)));const l=a(e,t,o,n);if("string"==typeof l)return l;(0,F.J8)(l)&&(s||(s=[]),s.push(l))}return s?(()=>fo(this,void 0,void 0,(function*(){for(const e of s){const t=yield e;if("string"==typeof t)return t}return null})))():null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(e,t)}function Oo(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e<i;e++)o.push(t)}else o=i.reduce(((e,t)=>{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}var Po=i(81170),Fo=i(68801);let Bo=[],Ho=[],Wo=[];function Vo(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?Ro(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(mo.KR.sep)>=0}}(e);Bo.push(n),n.userConfigured?Wo.push(n):Ho.push(n),i&&!n.userConfigured&&Bo.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,0,t)}function zo(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o||s||r||void 0}const Uo=Object.prototype.hasOwnProperty,jo="vs.editor.nullLanguage";class Ko{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(jo,0),this._register(Fo.bd,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||jo}}class qo extends m.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new s.Q5),this.onDidChange=this._onDidChange.event,qo.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Ko,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Fo.dQ.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){qo.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Bo=Bo.filter((e=>e.userConfigured)),Ho=[];const e=[].concat(Fo.dQ.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Mn.B.as(An.IP.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Uo.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)Vo({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)Vo({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)Vo({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,f.IO)(t)||Vo({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);const s=null!==o&&o.length>0;if(s&&null===o[0]);else{const t=(s?o[0]:null)||i;!s&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&Uo.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Uo.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Uo.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?function(e,t){return function(e,t){let i;if(e)switch(e.scheme){case Qi.lg.file:i=e.fsPath;break;case Qi.lg.data:i=so.Vb.parseMetaData(e).get(so.Vb.META_DATA_LABEL);break;case Qi.lg.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:Po.v.unknown}];i=i.toLowerCase();const n=(0,mo.EZ)(i),o=zo(i,n,Wo);if(o)return[o,{id:Fo.bd,mime:Po.v.text}];const s=zo(i,n,Ho);if(s)return[s,{id:Fo.bd,mime:Po.v.text}];if(t){const e=function(e){if((0,f.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=Bo.length-1;t>=0;t--){const i=Bo[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:Fo.bd,mime:Po.v.text}]}return[{id:"unknown",mime:Po.v.unknown}]}(e,t).map((e=>e.id))}(e,t):[]}}qo.instanceCount=0;class $o extends m.JT{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new s.Q5),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new s.Q5({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,$o.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new qo(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){$o.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,qe.Xh)(i,null)}createById(e){return new Go(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new Go(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=Fo.bd),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),d.RW.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}$o.instanceCount=0;class Go{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new s.Q5({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}var Qo=i(22444),Yo=i(84144),Zo=i(7448),Xo=i(16268),Jo=i(10553),es=i(88609),ts=i(21212);const is=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,ns=/(&amp;)?(&amp;)([^\s&])/g;var os;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(os||(os={}));class ss extends Kt.o{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...H.dz||H.IJ?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new m.SL),this.initializeOrUpdateStyleSheet(e,n),this._register(Jo.o.addTarget(o)),(0,Pt.nm)(o,Pt.tw.KEY_DOWN,(e=>{new Sn.y(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add((0,Pt.nm)(o,Pt.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){Pt.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof as&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),H.IJ&&this._register((0,Pt.nm)(o,Pt.tw.KEY_DOWN,(e=>{const t=new Sn.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Pt.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Pt.zB.stop(e,!0))}))),this._register((0,Pt.nm)(this.domNode,Pt.tw.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,Pt.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,Pt.nm)(this.actionsList,Pt.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,Pt.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(Jo.o.addTarget(this.actionsList)),this._register((0,Pt.nm)(this.actionsList,Jo.t.Tap,(e=>{let t=e.initialTarget;if(t&&(0,Pt.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new qt.s$(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,Pt.nm)(o,Jo.t.Change,(e=>{Pt.zB.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,Pt.nm)(r,Pt.tw.MOUSE_UP,(e=>{e.preventDefault()}))),o.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof ls))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,Pt.OO)(e)?this.styleSheet=(0,Pt.dS)(e):(ss.globalStyleSheet||(ss.globalStyleSheet=(0,Pt.dS)()),this.styleSheet=ss.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${cs(Wt.l.menuSelection)}\n${cs(Wt.l.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}(t,(0,Pt.OO)(e))}styleScrollElement(e,t){var i,n;const o=null!==(i=t.foregroundColor)&&void 0!==i?i:"",s=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=o,e.style.backgroundColor=s,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++)if(e===this.actionsList.children[t]){this.focusedItem=t;break}}updateFocus(e){super.updateFocus(e,!0,!0),void 0!==this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof $t.Z0)return new ls(t.context,e,{icon:!0},this.menuStyles);if(e instanceof $t.wY){const n=new as(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}),this.menuStyles);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new rs(t.context,e,i,this.menuStyles);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class rs extends es.YH{constructor(e,t,i,n){if(i.isMenu=!0,super(t,t,i),this.menuStyle=n,this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass="",this.options.label&&i.enableMnemonics){const e=this.action.label;if(e){const t=is.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new F.pY((()=>{this.element&&(this._register((0,Pt.nm)(this.element,Pt.tw.MOUSE_UP,(e=>{if(Pt.zB.stop(e,!0),Xo.isFirefox){if(new Zo.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,Pt.nm)(this.element,Pt.tw.CONTEXT_MENU,(e=>{Pt.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,Pt.R3)(this.element,(0,Pt.$)("a.action-menu-item")),this._action.id===$t.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,Pt.R3)(this.item,(0,Pt.$)("span.menu-item-check"+Qt.k.asCSSSelector(Wt.l.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,Pt.R3)(this.item,(0,Pt.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,Pt.R3)(this.item,(0,Pt.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){(0,Pt.PO)(this.label);let t=(0,ts.x$)(this.action.label);if(t){const i=function(e){const t=is,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=is.exec(t);if(n){t=f.YU(t),ns.lastIndex=0;let i=ns.exec(t);for(;i&&i[1];)i=ns.exec(t);const o=e=>e.replace(/&amp;&amp;/g,"&amp;");i?this.label.append(f.j3(o(t.substr(0,i.index))," "),(0,Pt.$)("u",{"aria-hidden":"true"},i[3]),f.oL(o(t.substr(i.index+i[0].length))," ")):this.label.innerText=o(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=null!=t?t:"")}}class as extends rs{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new m.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:os.Right,this.showScheduler=new F.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new F.pY((()=>{this.element&&!(0,Pt.jg)((0,Pt.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,Pt.R3)(this.item,(0,Pt.$)("span.submenu-indicator"+Qt.k.asCSSSelector(Wt.l.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,Pt.nm)(this.element,Pt.tw.KEY_UP,(e=>{const t=new Sn.y(e);(t.equals(17)||t.equals(3))&&(Pt.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,Pt.nm)(this.element,Pt.tw.KEY_DOWN,(e=>{const t=new Sn.y(e);(0,Pt.vY)()===this.item&&(t.equals(17)||t.equals(3))&&Pt.zB.stop(e,!0)}))),this._register((0,Pt.nm)(this.element,Pt.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,Pt.nm)(this.element,Pt.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,Pt.nm)(this.element,Pt.tw.FOCUS_OUT,(e=>{this.element&&!(0,Pt.jg)((0,Pt.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){Pt.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=co(e.width,t.width,{position:n===os.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=co(e.height,t.height,{position:0,offset:i.top,size:0}),o.top+t.height===i.top&&o.top+i.height+t.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,Pt.R3)(this.element,(0,Pt.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new ss(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new $t.eZ],this.submenuOptions,this.menuStyle);const n=this.element.getBoundingClientRect(),o={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},s=this.submenuContainer.getBoundingClientRect(),{top:r,left:a}=this.calculateSubmenuMenuLayout(new Pt.Ro(window.innerWidth,window.innerHeight),Pt.Ro.lift(s),o,this.expandDirection);this.submenuContainer.style.left=a-s.left+"px",this.submenuContainer.style.top=r-s.top+"px",this.submenuDisposables.add((0,Pt.nm)(this.submenuContainer,Pt.tw.KEY_UP,(e=>{new Sn.y(e).equals(15)&&(Pt.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,Pt.nm)(this.submenuContainer,Pt.tw.KEY_DOWN,(e=>{new Sn.y(e).equals(15)&&Pt.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class ls extends es.gU{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function cs(e){const t=(0,Wt.u)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}var hs=i(86253);class ds{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;const n=(0,Pt.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var o;this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild((0,Pt.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",null===(o=this.blockDisposable)||void 0===o||o.dispose(),this.blockDisposable=(0,Pt.nm)(this.block,Pt.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new m.SL,a=e.actionRunner||new $t.Wi;return a.onWillRun(this.onActionRun,this,r),a.onDidRun(this.onDidActionRun,this,r),i=new ss(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},hs.ZR),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add((0,Pt.nm)(window,Pt.tw.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add((0,Pt.nm)(window,Pt.tw.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Zo.n(e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,m.F8)(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,o;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&((0,Pt.vY)()===this.lastContainer||(0,Pt.jg)((0,Pt.vY)(),this.lastContainer))&&(null===(o=this.focusToReturn)||void 0===o||o.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,B.n2)(e.error)&&this.notificationService.error(e.error)}}var us=function(e,t){return function(i,n){t(i,n,e)}};let gs=class extends m.JT{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new ds(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new s.Q5),this._onDidHideContextMenu=this._store.add(new s.Q5)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=ps.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}})),Pt._q.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var ps;gs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([us(0,io.b),us(1,bi.lT),us(2,_i.u),us(3,jn.d),us(4,Yo.co),us(5,Gt.i6)],gs),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Yo.eH))return e;var n;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return Object.assign(Object.assign({},e),{getActions:()=>{const n=[];if(o){const e=t.createMenu(o,null!=r?r:i);(0,Qo.LJ)(e,s,n),e.dispose()}return e.getActions?$t.Z0.join(e.getActions(),n):n}})}}(ps||(ps={}));var ms,fs=i(23897);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(ms||(ms={}));var _s=i(50988),vs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},bs=function(e,t){return function(i,n){t(i,n,e)}},Cs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ys=class{constructor(e){this._commandService=e}open(e,t){return Cs(this,void 0,void 0,(function*(){if(!(0,_s.xn)(e,Qi.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=a.o.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,fs.Q)(decodeURIComponent(e.query))}catch(t){try{i=(0,fs.Q)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};ys=vs([bs(0,Dn.H)],ys);let ws=class{constructor(e){this._editorService=e}open(e,t){return Cs(this,void 0,void 0,(function*(){"string"==typeof e&&(e=a.o.parse(e));const{selection:i,uri:n}=(0,_s.xI)(e);return(e=n).scheme===Qi.lg.file&&(e=(0,so.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?ms.USER:ms.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};ws=vs([bs(0,v.$)],ws);let Ss=class{constructor(e,t){this._openers=new Yi.S,this._validators=new Yi.S,this._resolvers=new Yi.S,this._resolvedUriTargets=new Tn.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Yi.S,this._defaultExternalOpener={openExternal:e=>Cs(this,void 0,void 0,(function*(){return(0,_s.Gs)(e,Qi.lg.http,Qi.lg.https)?Pt.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>Cs(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!(0,_s.Gs)(e,Qi.lg.mailto,Qi.lg.http,Qi.lg.https,Qi.lg.vsls)||(yield this._doOpenExternal(e,t),0))}))}),this._openers.push(new ys(t)),this._openers.push(new ws(e))}open(e,t){var i;return Cs(this,void 0,void 0,(function*(){const n="string"==typeof e?a.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o,t)))return!1;for(const i of this._openers)if(yield i.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return Cs(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return Cs(this,void 0,void 0,(function*(){const i="string"==typeof e?a.o.parse(e):e;let n,s;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(s="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(s,{sourceUri:i,preferredOpenerId:e},o.T.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},o.T.None)}))}dispose(){this._validators.clear()}};Ss=vs([bs(0,v.$),bs(1,Dn.H)],Ss);var ks=i(98674),xs=i(8625),Ls=function(e,t){return function(i,n){t(i,n,e)}};class Es extends m.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,m.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;t<n.length;t++)this._markersData.set(n[t],e[t]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let Ns=class extends m.JT{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new s.Q5),this._markerDecorations=new Tn.Y9,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new Es(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==Qi.lg.inMemory&&e.uri.scheme!==Qi.lg.internal&&e.uri.scheme!==Qi.lg.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=c.e.lift(t);if(t.severity!==ks.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(1===t||i.endColumn>=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new c.e(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new c.e(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,o,s;switch(e.severity){case ks.ZL.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case ks.ZL.Warning:t="squiggly-warning",i=(0,wi.EN)(xs.Re),n=20,s={color:(0,wi.EN)(yi.Ivo),position:A.F5.Inline};break;case ks.ZL.Info:t="squiggly-info",i=(0,wi.EN)(xs.eS),n=10;break;case ks.ZL.Error:default:t="squiggly-error",i=(0,wi.EN)(xs.lK),n=30,s={color:(0,wi.EN)(yi.Gj_),position:A.F5.Inline}}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:A.sh.Right},minimap:s,zIndex:n,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};Ns=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ls(0,P.q),Ls(1,ks.lT)],Ns);var Ds=i(36357),Ts=i(51200),Is=i(56811),As=i(41264);As.Il.white.toString(),As.Il.white.toString();class Ms extends m.JT{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._onDidClick=this._register(new s.Q5),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button");const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(Jo.o.addTarget(this._element)),[Pt.tw.CLICK,Jo.t.Tap].forEach((e=>{this._register((0,Pt.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):Pt.zB.stop(e)})))})),this._register((0,Pt.nm)(this._element,Pt.tw.KEY_DOWN,(e=>{const t=new Sn.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&Pt.zB.stop(t,!0)}))),this._register((0,Pt.nm)(this._element,Pt.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,Pt.nm)(this._element,Pt.tw.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,Pt.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}getContentElements(e){const t=[];for(let i of(0,Is.T)(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;this.options.supportIcons?(0,Pt.mc)(t,...this.getContentElements(e)):t.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var Rs=i(67488);const Os="done",Ps="active",Fs="infinite",Bs="infinite-long-running",Hs="discrete";class Ws extends m.JT{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new F.pY((()=>(0,Pt.$Z)(this.element)),0)),this.longRunningScheduler=this._register(new F.pY((()=>this.infiniteLongRunning()),Ws.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Ps,Fs,Bs,Hs),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Os),this.element.classList.contains(Fs)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Hs,Os,Bs),this.element.classList.add(Ps,Fs),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Bs)}getContainer(){return this.element}}Ws.LONG_RUNNING_INFINITE_THRESHOLD=1e4;var Vs=i(82900),zs=i(44742);const Us={},js=new zs.R("quick-input-button-icon-");function Ks(e){if(!e)return;let t;const i=e.dark.toString();return Us[i]?t=Us[i]:(t=js.nextId(),Pt.fk(`.${t}, .hc-light .${t}`,`background-image: ${Pt.wY(e.light||e.dark)}`),Pt.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${Pt.wY(e.dark)}`),Us[i]=t),t}var qs=i(67746),$s=i(3070);const Gs=Pt.$;class Qs extends m.JT{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>Pt.nm(this.findInput.inputBox.inputElement,Pt.tw.KEY_DOWN,(t=>{e(new Sn.y(t))})),this.onMouseDown=e=>Pt.nm(this.findInput.inputBox.inputElement,Pt.tw.MOUSE_DOWN,(t=>{e(new Zo.n(t))})),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=Pt.R3(this.parent,Gs(".quick-input-box")),this.findInput=this._register(new $s.V(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}))}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.findInput.inputBox.getAriaLabel()}set ariaLabel(e){this.findInput.inputBox.setAriaLabel(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.findInput.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===an.Z.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===an.Z.Info?1:e===an.Z.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===an.Z.Info?1:e===an.Z.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var Ys=i(59834),Zs=i(55496),Xs=i(79579);const Js=new Xs.o((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new Xs.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new Xs.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var er=i(49898),tr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const ir=Pt.$;class nr{get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}constructor(e){this.hidden=!1,this._onChecked=new s.Q5,this.onChecked=this._onChecked.event,Object.assign(this,e)}dispose(){this._onChecked.dispose()}}class or{get templateId(){return or.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=Pt.R3(e,ir(".quick-input-list-entry"));const i=Pt.R3(t.entry,ir("label.quick-input-list-label"));t.toDisposeTemplate.push(Pt.mu(i,Pt.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=Pt.R3(i,ir("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Pt.mu(t.checkbox,Pt.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=Pt.R3(i,ir(".quick-input-list-rows")),o=Pt.R3(n,ir(".quick-input-list-row")),s=Pt.R3(n,ir(".quick-input-list-row"));t.label=new Ys.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const r=Pt.R3(o,ir(".quick-input-list-entry-keybinding"));t.keybinding=new Zs.e(r,H.OS);const a=Pt.R3(s,ir(".quick-input-list-label-meta"));return t.detail=new Ys.g(a,{supportHighlights:!0,supportIcons:!0}),t.separator=Pt.R3(t.entry,ir(".quick-input-list-separator")),t.actionBar=new Kt.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.element=e;const n=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:o,descriptionHighlights:s,detailHighlights:r}=e,a=Object.create(null);a.matches=o||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],"separator"!==n.type?(a.extraClasses=n.iconClasses,a.italic=n.italic,a.strikethrough=n.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set("separator"===n.type?void 0:n.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:r,title:e.saneDetail}),e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const l=n.buttons;l&&l.length?(i.actionBar.push(l.map(((t,i)=>{let o=t.iconClass||(t.iconPath?Ks(t.iconPath):void 0);return t.alwaysVisible&&(o=o?`${o} always-visible`:"always-visible"),{id:`id-${i}`,class:o,enabled:!0,label:"",tooltip:t.tooltip||"",run:()=>{"separator"!==n.type?e.fireButtonTriggered({button:t,item:n}):e.fireSeparatorButtonTriggered({button:t,separator:n})}}})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,m.B9)(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=(0,m.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,m.B9)(e.toDisposeTemplate)}}or.ID="listelement";class sr{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return or.ID}}var rr;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(rr||(rr={}));class ar{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new s.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new s.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new s.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new s.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new s.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new s.Q5,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new s.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new s.Q5,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=Pt.R3(this.parent,ir(".quick-input-list"));const n=new sr,o=new cr;this.list=i.createList("QuickInput",this.container,n,[new or],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new Sn.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(H.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,qe.w6)(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(Pt.nm(this.container,Pt.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return s.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return s.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach((t=>{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,m.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e),i=e=>this.fireSeparatorButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((n,o,s)=>{var r,a,l;const c=s&&e[s-1],h=o.label?o.label.replace(/\r?\n/g," "):"",d=(0,ts.Ho)(h).text.trim();let u,g,p,m,f,_;"separator"!==o.type&&(u=o.meta&&o.meta.replace(/\r?\n/g," "),g=o.description&&o.description.replace(/\r?\n/g," "),p=o.detail&&o.detail.replace(/\r?\n/g," "),m=null===(r=o.highlights)||void 0===r?void 0:r.label,f=null===(a=o.highlights)||void 0===a?void 0:a.description,_=null===(l=o.highlights)||void 0===l?void 0:l.detail);const v=o.ariaLabel||[h,g,p].map((e=>(0,ts.JL)(e))).filter((e=>!!e)).join(", "),b=this.parent.classList.contains("show-checkboxes");let C;if("separator"===o.type){if(!o.buttons)return n;C=o}else c&&"separator"===c.type&&!c.buttons&&(C=c);const y=new nr({hasCheckbox:b,index:s,item:"separator"!==o.type?o:void 0,saneLabel:h,saneSortLabel:d,saneMeta:u,saneAriaLabel:v,saneDescription:g,saneDetail:p,labelHighlights:m,descriptionHighlights:f,detailHighlights:_,checked:!1,separator:C,fireButtonTriggered:t,fireSeparatorButtonTriggered:i});return this.elementDisposables.push(y),this.elementDisposables.push(y.onChecked((()=>this.fireCheckedEvents()))),n.push(y),n}),[]),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===rr.Second&&this.list.length<2&&(e=rr.First),e){case rr.First:this.list.scrollTop=0,this.list.focusFirst(void 0,(e=>!!e.item));break;case rr.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,(e=>!!e.item));break;case rr.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,(e=>!!e.item));break;case rr.Next:{this.list.focusNext(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case rr.Previous:{this.list.focusPrevious(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case rr.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case rr.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item))}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this.elements.forEach((n=>{let o;o="fuzzy"===this.matchOnLabelMode?this.matchOnLabel?(0,In.f6)((0,ts.Gt)(e,(0,ts.Ho)(n.saneLabel))):void 0:this.matchOnLabel?(0,In.f6)(function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return lr(e,i);const o=(0,f.j3)(i," "),s=i.length-o.length,r=lr(e,o);if(r)for(const e of r){const t=n[e.start+s]+s;e.start+=t,e.end+=t}return r}(t,(0,ts.Ho)(n.saneLabel))):void 0;const s=this.matchOnDescription?(0,In.f6)((0,ts.Gt)(e,(0,ts.Ho)(n.saneDescription||""))):void 0,r=this.matchOnDetail?(0,In.f6)((0,ts.Gt)(e,(0,ts.Ho)(n.saneDetail||""))):void 0,a=this.matchOnMeta?(0,In.f6)((0,ts.Gt)(e,(0,ts.Ho)(n.saneMeta||""))):void 0;if(o||s||r||a?(n.labelHighlights=o,n.descriptionHighlights=s,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.length<o.length)return-1;if(n.length>o.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=Js.value.collator.compare(n,o);return Js.value.collatorIsNumeric&&0===s&&n!==o?n<o?-1:1:s}(n,o);return 0!==a?a:n.localeCompare(o)}(e.saneSortLabel,t.saneSortLabel,i)}(e,i,t)))}return this.elementsToIndexes=i.reduce(((e,t,i)=>{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,m.B9)(this.elementDisposables),this.disposables=(0,m.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}}function lr(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}tr([er.H],ar.prototype,"onDidChangeFocus",null),tr([er.H],ar.prototype,"onDidChangeSelection",null);class cr{getWidgetAriaLabel(){return(0,w.NC)("quickInput","Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var hr=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const dr=Pt.$,ur={iconClass:Qt.k.asClassName(Wt.l.quickInputBack),tooltip:(0,w.NC)("quickInput.back","Back"),handle:-1};class gr extends m.JT{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=gr.noPromptMessage,this._severity=an.Z.Ignore,this.onDidTriggerButtonEmitter=this._register(new s.Q5),this.onDidHideEmitter=this._register(new s.Q5),this.onDisposeEmitter=this._register(new s.Q5),this.visibleDisposables=this._register(new m.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!H.gn;this._ignoreFocusOut=e&&!H.gn,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=qs.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this.busy&&!this.busyDelay&&(this.busyDelay=new F._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===ur));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new $t.aU(`id-${t}`,"",e.iconClass||Ks(e.iconPath),!0,(()=>hr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==ur));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new $t.aU(`id-${t}`,"",e.iconClass||Ks(e.iconPath),!0,(()=>hr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof Vs.Z)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const o=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==o&&(this._lastValidationMessage=o,Pt.mc(this.ui.message,...(0,Is.T)(o))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,w.NC)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==an.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}gr.noPromptMessage=(0,w.NC)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class pr extends gr{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new s.Q5),this.onWillAcceptEmitter=this._register(new s.Q5),this.onDidAcceptEmitter=this._register(new s.Q5),this.onDidCustomEmitter=this._register(new s.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?qs.jG.NONE:qs.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new s.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new s.Q5),this.onDidTriggerItemButtonEmitter=this._register(new s.Q5),this.onDidTriggerSeparatorButtonEmitter=this._register(new s.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?qs.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(rr.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(rr.Next),this.canSelectMany&&this.ui.list.domFocus(),Pt.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(rr.Previous):this.ui.list.focus(rr.Last),this.canSelectMany&&this.ui.list.domFocus(),Pt.zB.stop(e,!0);break;case 12:this.ui.list.focus(rr.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Pt.zB.stop(e,!0);break;case 11:this.ui.list.focus(rr.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Pt.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(rr.First),Pt.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(rr.Last),Pt.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,qe.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,qe.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,qe.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Pt.nm(this.ui.container,Pt.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Sn.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getChords();return!(o||(n.shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n.altKey&&6===i||n.ctrlKey&&5===i||n.metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(n||(n=this.placeholder||pr.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case qs.jG.NONE:this._itemActivation=qs.jG.FIRST;break;case qs.jG.SECOND:this.ui.list.focus(rr.Second),this._itemActivation=qs.jG.FIRST;break;case qs.jG.LAST:this.ui.list.focus(rr.Last),this._itemActivation=qs.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(rr.First)),this.keepScrollPosition&&(this.scrollTop=e)}}pr.DEFAULT_ARIA_LABEL=(0,w.NC)("quickInputBox.ariaLabel","Type to narrow down results.");class mr extends gr{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new s.Q5),this.onDidAcceptEmitter=this._register(new s.Q5),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}class fr extends m.JT{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new s.Q5),this.onDidCustomEmitter=this._register(new s.Q5),this.onDidTriggerButtonEmitter=this._register(new s.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new s.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new s.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(Pt.nm(window,Pt.tw.KEY_DOWN,e,!0)),this._register(Pt.nm(window,Pt.tw.KEY_UP,e,!0)),this._register(Pt.nm(window,Pt.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=Pt.R3(this.parentElement,dr(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Pt.dS(e),i=Pt.R3(e,dr(".quick-input-titlebar")),n=this._register(new Kt.o(i));n.domNode.classList.add("quick-input-left-action-bar");const o=Pt.R3(i,dr(".quick-input-title")),s=this._register(new Kt.o(i));s.domNode.classList.add("quick-input-right-action-bar");const r=Pt.R3(e,dr(".quick-input-description")),a=Pt.R3(e,dr(".quick-input-header")),l=Pt.R3(a,dr("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,w.NC)("quickInput.checkAll","Toggle all checkboxes")),this._register(Pt.mu(l,Pt.tw.CHANGE,(e=>{const t=l.checked;k.setAllVisibleChecked(t)}))),this._register(Pt.nm(l,Pt.tw.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const c=Pt.R3(a,dr(".quick-input-description")),h=Pt.R3(a,dr(".quick-input-and-message")),d=Pt.R3(h,dr(".quick-input-filter")),u=this._register(new Qs(d,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=Pt.R3(d,dr(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new Rs.Z(g,{countFormat:(0,w.NC)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),m=Pt.R3(d,dr(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new Rs.Z(m,{countFormat:(0,w.NC)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=Pt.R3(a,dr(".quick-input-action")),v=new Ms(_,this.styles.button);v.label=(0,w.NC)("ok","OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=Pt.R3(a,dr(".quick-input-action")),C=new Ms(b,this.styles.button);C.label=(0,w.NC)("custom","Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const y=Pt.R3(h,dr(`#${this.idPrefix}message.quick-input-message`)),S=new Ws(e,this.styles.progressBar);S.getContainer().classList.add("quick-input-progress");const k=this._register(new ar(e,this.idPrefix+"list",this.options));this._register(k.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(k.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(k.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(k.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof pr&&this.controller.canSelectMany&&k.clearFocus()}),0)}))),this._register(k.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const x=Pt.go(e);return this._register(x),this._register(Pt.nm(e,Pt.tw.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(x.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(qs.Jq.Blur),this.previousFocusElement=void 0}))),this._register(Pt.nm(e,Pt.tw.FOCUS,(e=>{u.setFocus()}))),this._register(Pt.nm(e,Pt.tw.KEY_DOWN,(t=>{const i=new Sn.y(t);switch(i.keyCode){case 3:Pt.zB.stop(t,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:Pt.zB.stop(t,!0),this.hide(qs.Jq.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(Pt.zB.stop(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(Pt.zB.stop(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:r,description2:c,rightActionBar:s,checkAll:l,filterContainer:d,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:y,customButtonContainer:b,customButton:C,list:k,progressBar:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=o.T.None){return new Promise(((n,o)=>{let s=e=>{var i;s=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}})))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,m.B9)(l),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new pr(e)}createInputBox(){const e=this.getUI();return new mr(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(an.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Pt.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="",t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();ur.tooltip=n?(0,w.NC)("quickInput.backWithKeybinding","Back ({0})",n):(0,w.NC)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=(0,In.f6)(e.parentElement);(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,fr.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator-as-item { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}isDisplayed(){return this.ui&&"none"!==this.ui.container.style.display}}fr.MAX_WIDTH=600;var _r=i(46763),vr=i(88289),br=i(90725),Cr=i(41157),yr=function(e,t){return function(i,n){t(i,n,e)}};let wr=class extends m.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Mn.B.as(br.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=null==a?void 0:a.descriptor;if(a&&r&&l===r)return e===r.prefix||(null==i?void 0:i.preserveValue)||(a.picker.value=e),void this.adjustValueSelection(a.picker,r,i);if(r&&!(null==i?void 0:i.preserveValue)){let t;if(a&&l&&l!==r){const e=a.value.substr(l.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==s?void 0:s.defaultFilterValue;e===br.Ry.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const c=new m.SL,h=c.add(this.quickInputService.createQuickPick());let d;h.value=e,this.adjustValueSelection(h,r,i),h.placeholder=null==r?void 0:r.placeholder,h.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!a,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(h.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:Cr.jG.SECOND),h.contextKey=null==r?void 0:r.contextKey,h.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(h.ariaLabel=null==r?void 0:r.placeholder),t&&(d=new F.CR,c.add((0,vr.I)(h.onWillAccept)((e=>{e.veto(),h.hide()})))),c.add(this.registerPickerListeners(h,s,r,e,null==i?void 0:i.providerOptions));const u=c.add(new o.A);return s&&c.add(s.provide(h,u.token,null==i?void 0:i.providerOptions)),(0,vr.I)(h.onDidHide)((()=>{0===h.selectedItems.length&&u.cancel(),c.dispose(),null==d||d.complete(h.selectedItems.slice(0))})),h.show(),t?null==d?void 0:d.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n,o){const s=new m.SL,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add((0,m.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0,providerOptions:o}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};wr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([yr(0,Cr.eJ),yr(1,y.TG)],wr);var Sr=function(e,t){return function(i,n){t(i,n,e)}};let kr=class extends wi.bB{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(wr))),this._quickAccess}constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this._onShow=this._register(new s.Q5),this._onHide=this._register(new s.Q5),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(_r.ev,e,t,i,n,o),styles:this.computeStyles()},n=this._register(new fr(Object.assign(Object.assign({},i),t)));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout((t=>n.layout(t,e.offset.quickPickTop)))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Gt.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=o.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,yi.n_1)(yi.zKr),quickInputForeground:(0,yi.n_1)(yi.tZ6),quickInputTitleBackground:(0,yi.n_1)(yi.loF),widgetBorder:(0,yi.n_1)(yi.A42),widgetShadow:(0,yi.n_1)(yi.rh)},inputBox:hs.Hc,toggle:hs.pl,countBadge:hs.ku,button:hs.wG,progressBar:hs.b5,keybindingLabel:hs.eO,list:(0,hs.TU)({listBackground:yi.zKr,listFocusBackground:yi.Vqd,listFocusForeground:yi.NPS,listInactiveFocusForeground:yi.NPS,listInactiveSelectionIconForeground:yi.cbQ,listInactiveFocusBackground:yi.Vqd,listFocusOutline:yi.xL1,listInactiveFocusOutline:yi.xL1}),pickerGroup:{pickerGroupBorder:(0,yi.n_1)(yi.opG),pickerGroupForeground:(0,yi.n_1)(yi.kJk)}}}};kr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Sr(0,y.TG),Sr(1,Gt.i6),Sr(2,wi.XE),Sr(3,L.F),Sr(4,tn)],kr);var xr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Lr=function(e,t){return function(i,n){t(i,n,e)}};let Er=class extends kr{constructor(e,t,i,n,o,s){super(t,i,n,o,new rn(e.getContainerDomNode(),s)),this.host=void 0;const r=Dr.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};Er=xr([Lr(1,y.TG),Lr(2,Gt.i6),Lr(3,wi.XE),Lr(4,L.F),Lr(5,v.$)],Er);let Nr=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Er,e);this.mapEditorToService.set(e,t),(0,vr.I)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=o.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};Nr=xr([Lr(0,y.TG),Lr(1,v.$)],Nr);class Dr{static get(e){return e.getContribution(Dr.ID)}constructor(e){this.editor=e,this.widget=new Tr(this.editor)}dispose(){this.widget.dispose()}}Dr.ID="editor.controller.quickInput";class Tr{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Tr.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}Tr.ID="editor.contrib.quickInputWidget",(0,Ut._K)(Dr.ID,Dr,4);var Ir=i(58763),Ar=i(44156),Mr=function(e,t){return function(i,n){t(i,n,e)}};let Rr=class extends m.JT{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new s.Q5,this._onDidChangeReducedMotion=new s.Q5,this._accessibilityModeEnabledContext=L.U.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register((0,Pt.nm)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",e),this._layoutService.container.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};Rr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Mr(0,Gt.i6),Mr(1,tn),Mr(2,_t.Ui)],Rr);var Or=i(26904),Pr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Fr=function(e,t){return function(i,n){t(i,n,e)}};let Br=class{constructor(e,t){this._commandService=e,this._hiddenStates=new Hr(t)}createMenu(e,t,i){return new Vr(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};Br=Pr([Fr(0,Dn.H),Fr(1,Or.Uy)],Br);let Hr=class e{constructor(t){this._storageService=t,this._disposables=new m.SL,this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const i=t.get(e._key,0,"{}");this._data=JSON.parse(i)}catch(e){this._data=Object.create(null)}this._disposables.add(t.onDidChangeValue((i=>{if(i.key===e._key){if(!this._ignoreChangeEvent)try{const i=t.get(e._key,0,"{}");this._data=JSON.parse(i)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()}})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const o=this._isHiddenByDefault(e,t),s=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return o?!s:s}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&(0,qe.LS)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const t=JSON.stringify(this._data);this._storageService.store(e._key,t,0,0)}finally{this._ignoreChangeEvent=!1}}};Hr._key="menu.hiddenCommands",Hr=Pr([Fr(0,Or.Uy)],Hr);let Wr=class e{constructor(e,t,i,n,o){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=i,this._commandService=n,this._contextKeyService=o,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const t=Yo.BH.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._structureContextKeys),(0,Yo.vr)(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._preconditionContextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&Yo.BH.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}createActionGroups(t){const i=[];for(const n of this._menuGroups){const[o,s]=n,r=[];for(const i of s)if(this._contextKeyService.contextMatchesRules(i.when)){const n=(0,Yo.vr)(i);n&&this._hiddenStates.setDefaultState(this._id,i.command.id,!!i.isHiddenByDefault);const o=zr(this._id,n?i.command:i,this._hiddenStates);if(n)r.push(new Yo.U8(i.command,i.alt,t,o,this._contextKeyService,this._commandService));else{const n=new e(i.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(t),s=$t.Z0.join(...n.map((e=>e[1])));s.length>0&&r.push(new Yo.NZ(i,o,s))}}r.length>0&&i.push([o,r])}return i}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(t,i){const n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;const e=n.localeCompare(o);if(0!==e)return e}const s=t.order||0,r=i.order||0;return s<r?-1:s>r?1:e._compareTitles((0,Yo.vr)(t)?t.command.title:t.title,(0,Yo.vr)(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};Wr=Pr([Fr(3,Dn.H),Fr(4,Gt.i6)],Wr);let Vr=class{constructor(e,t,i,n,o){this._disposables=new m.SL,this._menuInfo=new Wr(e,t,i.emitEventsForSubmenuChanges,n,o);const r=new F.pY((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(r),this._disposables.add(Yo.BH.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const a=this._disposables.add(new m.SL);this._onDidChange=new s.D0({onWillAddFirstListener:()=>{a.add(o.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),a.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:a.clear.bind(a),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function zr(e,t,i){const n=(0,Yo.f6)(t)?t.submenu.id:t.id,o="string"==typeof t.title?t.title:t.title.value,s=(0,$t.xw)({id:`hide/${e.id}/${n}`,label:(0,w.NC)("hide.label","Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=(0,$t.xw)({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}Vr=Pr([Fr(3,Dn.H),Fr(4,Gt.i6)],Vr);var Ur=function(e,t){return function(i,n){t(i,n,e)}},jr=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Kr=class extends m.JT{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(Xo.isSafari||Xo.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new F.CR;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>jr(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register((0,Pt.nm)(this.layoutService.container,"click",e)),this._register((0,Pt.nm)(this.layoutService.container,"keydown",e)))}writeText(e,t){return jr(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild((0,Pt.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return jr(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return jr(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return jr(this,void 0,void 0,(function*(){this.findText=e}))}readResources(){return jr(this,void 0,void 0,(function*(){return this.resources}))}};Kr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ur(0,tn),Ur(1,$e.VZ)],Kr);var qr=i(53725),$r=i(4767);const Gr="data-keybinding-context";class Qr{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Yr extends Qr{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Yr.INSTANCE=new Yr;class Zr extends Qr{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=$r.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new ea(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...qr.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new ea(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Zr._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Zr._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Zr._keyPrefix="config.";class Xr{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Jr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class ea{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class ta{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class ia{constructor(e){this._onDidChangeContext=new s.K3({merge:e=>new ta(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Xr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new oa(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Jr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Jr(e))}getContext(e){return this._isDisposed?Yr.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Gr)){const t=e.getAttribute(Gr);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let na=class extends ia{constructor(e){super(0),this._contexts=new Map,this._toDispose=new m.SL,this._lastContextId=0;const t=new Zr(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Yr.INSTANCE:this._contexts.get(e)||Yr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Qr(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};na=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,_t.Ui)],na);class oa extends ia{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new m.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Gr)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Gr,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(Gr),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Yr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}Dn.P.registerCommand("_setContext",(function(e,t,i){e.get(Gt.i6).createKey(String(t),function(e){return(0,C.rs)(e,(e=>"object"==typeof e&&1===e.$mid?a.o.revive(e).toString():e instanceof a.o?e.toString():void 0))}(i))})),Dn.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...Gt.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,w.NC)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),Dn.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of Gt.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var sa=i(97108);class ra{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class aa{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new ra(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class la extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class ca{constructor(e=new vi.y,t=!1,i,n=!1){var o;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(y.TG,this),this._globalGraph=n?null!==(o=null==i?void 0:i._globalGraph)&&void 0!==o?o:new aa((e=>e)):void 0}createChild(e){return new ca(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=ha.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw(0,B.L6)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof sa.M?(i=ha.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=ha.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=y.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setServiceInstance(e,t){if(this._services.get(e)instanceof sa.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof sa.M?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const o=new aa((e=>e.id.toString()));let s=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(o.lookupOrInsertNode(t),s++>1e3)throw new la(o);for(const i of y.I8.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),s instanceof sa.M){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};o.insertEdge(t,e),r.push(e)}}}for(;;){const e=o.roots();if(0===e.length){if(!o.isEmpty())throw new la(o);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof sa.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}o.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof sa.M)return this._createServiceInstance(e,t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o){if(n){const n=new ca(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const s=new Map,r=new F.Ue((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of s){const n=e[t];if("function"==typeof n)for(const t of i)n.apply(e,t)}return s.clear(),e}));return new Proxy(Object.create(null),{get(e,t){if(!r.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=s.get(t);return e||(e=new Yi.S,s.set(t,e)),(t,i,n)=>{const o=e.push([t,i,n]);return(0,m.OF)(o)}}if(t in e)return e[t];const i=r.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set:(e,t,i)=>(r.value[t]=i,!0),getPrototypeOf:e=>t.prototype})}return this._createInstance(t,i,o)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class ha{static traceInvocation(e,t){return e?new ha(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):ha._None}static traceCreation(e,t){return e?new ha(1,t.name):ha._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new ha(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;ha._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${ha._totals.toFixed(2)}ms)`];(e>2||t)&&ha.all.add(i.join("\n"))}}ha.all=new Set,ha._None=new class extends ha{constructor(){super(0,null)}stop(){}branch(){return this}},ha._totals=0;const da=new Set([Qi.lg.inMemory,Qi.lg.vscodeSourceControl,Qi.lg.walkThrough,Qi.lg.walkThroughSnippet]);class ua{constructor(){this._byResource=new Tn.Y9,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new Tn.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:qr.$.empty():a.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:qr.$.empty():qr.$.map(qr.$.concat(...this._byOwner.values()),(e=>e[1]))}}class ga{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Tn.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(da.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===ks.ZL.Error?t.errors+=1:i===ks.ZL.Warning?t.warnings+=1:i===ks.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class pa{constructor(){this._onMarkerChanged=new s.D0({delay:0,merge:pa._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new ua,this._stats=new ga(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,qe.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=pa._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:d,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,h=h>0?h:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:d,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=qr.$.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,qe.Of)(t)){const n=new Tn.Y9;for(const{resource:o,marker:s}of t){const t=pa._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(pa._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(pa._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(pa._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new Tn.Y9;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}function ma(e,t,i,n,o,s){if(Array.isArray(e)){let r=0;for(const a of e){const e=ma(a,t,i,n,o,s);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:l,pattern:c,scheme:h,hasAccessToAllModels:d,notebookType:u}=e;if(!n&&!d)return 0;u&&o&&(t=o);let g=0;if(h)if(h===t.scheme)g=10;else{if("*"!==h)return 0;g=5}if(l)if(l===i)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(u)if(u===s)g=10;else{if("*"!==u||void 0===s)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"==typeof c?c:Object.assign(Object.assign({},c),{base:(0,mo.Fv)(c.base)}),e!==t.fsPath&&(r=e,a=t.fsPath,!r||"string"!=typeof a||!Ro(r)(a,void 0,undefined)))return 0;g=10}return g}return 0;var r,a}function fa(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(fa):!!e.exclusive)}class _a{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class va{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,m.OF)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),o=n?new _a(e.uri,e.getLanguageId(),n.uri,n.type):new _a(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(o))){this._lastCandidate=o;for(const t of this._entries)if(t._score=ma(t.selector,o.uri,o.languageId,(0,A.pt)(e),o.notebookUri,o.notebookType),fa(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(va._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}(0,Xi.z)(Ge.p,class{constructor(){this.referenceProvider=new va(this._score.bind(this)),this.renameProvider=new va(this._score.bind(this)),this.codeActionProvider=new va(this._score.bind(this)),this.definitionProvider=new va(this._score.bind(this)),this.typeDefinitionProvider=new va(this._score.bind(this)),this.declarationProvider=new va(this._score.bind(this)),this.implementationProvider=new va(this._score.bind(this)),this.documentSymbolProvider=new va(this._score.bind(this)),this.inlayHintsProvider=new va(this._score.bind(this)),this.colorProvider=new va(this._score.bind(this)),this.codeLensProvider=new va(this._score.bind(this)),this.documentFormattingEditProvider=new va(this._score.bind(this)),this.documentRangeFormattingEditProvider=new va(this._score.bind(this)),this.onTypeFormattingEditProvider=new va(this._score.bind(this)),this.signatureHelpProvider=new va(this._score.bind(this)),this.hoverProvider=new va(this._score.bind(this)),this.documentHighlightProvider=new va(this._score.bind(this)),this.selectionRangeProvider=new va(this._score.bind(this)),this.foldingRangeProvider=new va(this._score.bind(this)),this.linkProvider=new va(this._score.bind(this)),this.inlineCompletionsProvider=new va(this._score.bind(this)),this.completionProvider=new va(this._score.bind(this)),this.linkedEditingRangeProvider=new va(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new va(this._score.bind(this)),this.documentSemanticTokensProvider=new va(this._score.bind(this)),this.documentOnDropEditProvider=new va(this._score.bind(this)),this.documentPasteEditProvider=new va(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);class ba extends m.JT{constructor(){super(...arguments),this._configurationModel=new On}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new On;const e=Mn.B.as(An.IP.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.addValue(n,e):o?this._configurationModel.addValue(n,o.default):this._configurationModel.removeValue(n)}}}class Ca extends m.JT{constructor(e,t=[]){super(),this.logger=new $e.qA([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}var ya=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},wa=function(e,t){return function(i,n){t(i,n,e)}},Sa=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ka{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new s.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let xa=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new m.Jz(new ka(t))):Promise.reject(new Error("Model not found"))}};xa=ya([wa(0,P.q)],xa);class La{show(){return La.NULL_PROGRESS_RUNNER}showWhile(e,t){return Sa(this,void 0,void 0,(function*(){yield e}))}}La.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Ea{info(e){return this.notify({severity:an.Z.Info,message:e})}warn(e){return this.notify({severity:an.Z.Warning,message:e})}error(e){return this.notify({severity:an.Z.Error,message:e})}notify(e){switch(e.severity){case an.Z.Error:console.error(e.message);break;case an.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return Ea.NO_OP}prompt(e,t,i,n){return Ea.NO_OP}status(e,t){return m.JT.None}}Ea.NO_OP=new bi.EO;let Na=class{constructor(e){this._onWillExecuteCommand=new s.Q5,this._onDidExecuteCommand=new s.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Dn.P.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};Na=ya([wa(0,y.TG)],Na);let Da=class extends zn{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new m.SL;t.add(Pt.nm(e,Pt.tw.KEY_DOWN,(e=>{const t=new Sn.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(Pt.nm(e,Pt.tw.KEY_UP,(e=>{const t=new Sn.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new Ta(e,t))},a=e=>{for(let t=0;t<this._domNodeListeners.length;t++){const i=this._domNodeListeners[t];i.domNode===e&&(this._domNodeListeners.splice(t,1),i.dispose())}},l=e=>{e.getOption(58)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(l)),this._register(s.onCodeEditorRemove((e=>{e.getOption(58)||a(e.getContainerDomNode())}))),s.listCodeEditors().forEach(l);const c=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(c)),this._register(s.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),s.listDiffEditors().forEach(c)}addDynamicKeybinding(e,t,i,n){return(0,m.F8)(Dn.P.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:(0,kn.Z9)(e.keybinding,H.OS),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,m.OF)((()=>{for(let e=0;e<this._dynamicKeybindings.length;e++)if(this._dynamicKeybindings[e]===t[0])return this._dynamicKeybindings.splice(e,t.length),void this.updateResolver()}))}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Gn.W.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Kn(e,t,(e=>this._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=Jn.resolveKeybinding(s,H.OS);for(const s of r)i[n++]=new Qn(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new Qn(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new kn.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Jn([t],H.OS)}};Da=ya([wa(0,Gt.i6),wa(1,Dn.H),wa(2,io.b),wa(3,bi.lT),wa(4,$e.VZ),wa(5,v.$)],Da);class Ta extends m.JT{constructor(e,t){super(),this.domNode=e,this._register(t)}}function Ia(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof a.o)}class Aa{constructor(){this._onDidChangeConfiguration=new s.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new ba;this._configuration=new Bn(e.reload(),new On,new On,new On),e.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=Ia(e)?e:Ia(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new Hn({keys:i,overrides:[]},t,this._configuration);e.source=8,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let Ma=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new s.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=l.L.isIPosition(t)?t:null,o=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return void 0===o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};Ma=ya([wa(0,_t.Ui),wa(1,P.q),wa(2,O.O)],Ma);let Ra=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:H.IJ||H.dz?"\n":"\r\n"}};Ra=ya([wa(0,_t.Ui)],Ra);class Oa{constructor(){const e=a.o.from({scheme:Oa.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new no.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===Oa.SCHEME?this.workspace.folders[0]:null}}function Pa(e,t,i){if(!t)return;if(!(e instanceof Aa))return;const n=[];Object.keys(t).forEach((e=>{(0,Ln.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,Ln.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}Oa.SCHEME="inmemory";let Fa=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Sa(this,void 0,void 0,(function*(){const t=Array.isArray(e)?e:xn.fo.convert(e),i=new Map;for(const e of t){if(!(e instanceof xn.Gl))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let n=i.get(t);n||(n=[],i.set(t,n)),n.push(En.h.replaceMove(c.e.lift(e.textEdit.range),e.textEdit.text))}let n=0,o=0;for(const[e,t]of i)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),o+=1,n+=t.length;return{ariaSummary:f.WU(oo.iN.bulkEditServiceSummary,n,o),isApplied:n>0}}))}};Fa=ya([wa(0,P.q)],Fa);let Ba=class extends go{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};Ba=ya([wa(0,tn),wa(1,v.$)],Ba);let Ha=class extends gs{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};var Wa;Ha=ya([wa(0,io.b),wa(1,bi.lT),wa(2,_i.u),wa(3,jn.d),wa(4,Yo.co),wa(5,Gt.i6)],Ha),(0,Xi.z)(_t.Ui,Aa,0),(0,Xi.z)(Ke.V,Ma,0),(0,Xi.z)(Ke.y,Ra,0),(0,Xi.z)(no.ec,Oa,0),(0,Xi.z)(to.e,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,so.EZ)(e)}},0),(0,Xi.z)(io.b,class{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}},0),(0,Xi.z)(ln.S,class{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}},0),(0,Xi.z)(bi.lT,Ea,0),(0,Xi.z)(ks.lT,pa,0),(0,Xi.z)(O.O,class extends $o{constructor(){super()}},0),(0,Xi.z)(Ar.Z,Ir.nI,0),(0,Xi.z)($e.VZ,class extends Ca{constructor(){super(new $e.kw)}},0),(0,Xi.z)(P.q,Ts.b$,0),(0,Xi.z)(Ds.i,Ns,0),(0,Xi.z)(Gt.i6,na,0),(0,Xi.z)(Ci.R9,class{withProgress(e,t,i){return t({report:()=>{}})}},0),(0,Xi.z)(Ci.ek,La,0),(0,Xi.z)(Or.Uy,Or.vm,0),(0,Xi.z)(ci.p,Xe,0),(0,Xi.z)(xn.vu,Fa,0),(0,Xi.z)(ro.Y,class{constructor(){this._neverEmitter=new s.Q5,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),(0,Xi.z)(Nn.S,xa,0),(0,Xi.z)(L.F,Rr,0),(0,Xi.z)(_r.Lw,_r.XN,0),(0,Xi.z)(Dn.H,Na,0),(0,Xi.z)(jn.d,Da,0),(0,Xi.z)(Cr.eJ,Nr,0),(0,Xi.z)(_i.u,Ba,0),(0,Xi.z)(_s.v4,Ss,0),(0,Xi.z)(fi.p,Kr,0),(0,Xi.z)(_i.i,Ha,0),(0,Xi.z)(Yo.co,Br,0),(0,Xi.z)(S,class{playAudioCue(e,t){return Sa(this,void 0,void 0,(function*(){}))}},0),function(e){const t=new vi.y;for(const[e,i]of(0,Xi.d)())t.set(e,i);const i=new ca(t,!0);t.set(y.TG,i),e.get=function(e){const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof sa.M?i.invokeFunction((t=>t.get(e))):n};let n=!1;e.initialize=function(e){if(n)return i;n=!0;for(const[e,i]of(0,Xi.d)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,y.yh)(i);t.get(n)instanceof sa.M&&t.set(n,e[i])}return i}}(Wa||(Wa={}));var Va=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},za=function(e,t){return function(i,n){t(i,n,e)}};let Ua=0,ja=!1,Ka=class extends Ot.Gm{constructor(e,t,i,n,o,s,r,a,l,c,h,d){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||oo.B8.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+oo.B8.accessibilityHelpMessage,super(e,u,{},i,n,o,s,a,l,c,h,d),this._standaloneKeybindingService=r instanceof Da?r:null,function(e){if(!e){if(ja)return;ja=!0}Rt.wW(e||document.body)}(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Ua,o=Gt.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),m.JT.None;const t=e.id,i=e.label,n=Gt.Ao.and(Gt.Ao.equals("editorId",this.getId()),Gt.Ao.deserialize(e.precondition)),o=e.keybindings,s=Gt.Ao.and(n,Gt.Ao.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new m.SL,h=this.getId()+":"+t;if(c.add(Dn.P.registerCommand(h,l)),r){const e={command:{id:h,title:i},when:n,group:r,order:a};c.add(Yo.BH.appendMenuItem(Yo.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,l,s));const d=new Gi.p(h,i,i,n,l,this._contextKeyService);return this._actions.set(t,d),c.add((0,m.OF)((()=>{this._actions.delete(t)}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof en)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Ka=Va([za(2,y.TG),za(3,v.$),za(4,Dn.H),za(5,Gt.i6),za(6,jn.d),za(7,wi.XE),za(8,bi.lT),za(9,L.F),za(10,M.c_),za(11,Ge.p)],Ka);let qa=class extends Ka{constructor(e,t,i,n,o,s,r,a,l,c,h,d,u,g,p){const m=Object.assign({},t);Pa(c,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const _=m.model;let v;if(delete m.model,super(e,m,i,n,o,s,r,a,l,h,g,p),this._configurationService=c,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||Fo.bd;v=Ga(d,u,m.value||"",e,void 0),this._ownsModel=!0}else v=_,this._ownsModel=!1;if(this._attachModel(v),v){const e={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Pa(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};qa=Va([za(2,y.TG),za(3,v.$),za(4,Dn.H),za(5,Gt.i6),za(6,jn.d),za(7,Ar.Z),za(8,bi.lT),za(9,_t.Ui),za(10,L.F),za(11,P.q),za(12,O.O),za(13,M.c_),za(14,Ge.p)],qa);let $a=class extends Ti{constructor(e,t,i,n,o,s,r,a,l,c,h){const d=Object.assign({},t);Pa(a,d,!0);const u=s.registerEditorContainer(e);"string"==typeof d.theme&&s.setTheme(d.theme),void 0!==d.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(d.autoDetectHighContrast)),super(e,d,{},h,n,i,o,s,r,l,c),this._configurationService=a,this._standaloneThemeService=s,this._register(u)}dispose(){super.dispose()}updateOptions(e){Pa(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Ka,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Ga(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),Qa(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return Qa(e,i,t.createById(n),o)}function Qa(e,t,i,n){return e.createModel(t,i,n)}function Ya(e){const t=Wa.get(jn.d);return t instanceof Da?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:Gt.Ao.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),m.JT.None)}function Za(e,t){return"boolean"==typeof e?e:t}function Xa(e,t){return"string"==typeof e?e:t}function Ja(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function el(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let s="";if("string"==typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?pt(e,"language definition does not contain attribute '"+o+"', used at: "+t):pt(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return dt(s)?"":"(?:"+s+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function tl(e,t,i,n){let o=-1,s=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(o=parseInt(r[3]),r[2]&&(o+=100)),s=r[4]);let a,l="~",c=s;if(s&&0!==s.length?/^\w*$/.test(c)?l="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],c=r[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){const i=e[c];if(!i)throw pt(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw pt(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);const n=Ja(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){const t=el(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return el(e,"^"+mt(e,c,i,n,o)+"$").test(t)};else if(c.indexOf("$")<0){const t=ut(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{const t=ut(e,c);a=function(i,n,o,s,r){const a=mt(e,t,n,o,s);return"=="===l?i===a:i!==a}}else{const t=Ja(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const s=function(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;const e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}(e,t,i,o);return a(s||"",e,t,i,n)}}}function il(e,t,i){if(i){if("string"==typeof i)return i;if(i.token||""===i.token){if("string"!=typeof i.token)throw pt(e,"a 'token' attribute must be of type string, in rule: "+t);{const n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw pt(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw pt(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,mt(e,o,"",[],""))))throw pt(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o<s;o++)n[o]=il(e,t,i[o]);return{group:n}}if(i.cases){const n=[];for(const o in i.cases)if(i.cases.hasOwnProperty(o)){const s=il(e,t,i.cases[o]);"@default"===o||"@"===o||""===o?n.push({test:void 0,value:s,name:o}):"@eos"===o?n.push({test:function(e,t,i,n){return n},value:s,name:o}):n.push(tl(e,t,o,s))}const o=e.defaultToken;return{test:function(e,t,i,s){for(const o of n)if(!o.test||o.test(e,t,i,s))return o.value;return o}}}throw pt(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}$a=Va([za(2,y.TG),za(3,Gt.i6),za(4,v.$),za(5,Ar.Z),za(6,bi.lT),za(7,_t.Ui),za(8,_i.i),za(9,Ci.ek),za(10,fi.p)],$a);class nl{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"==typeof t)i=t;else{if(!(t instanceof RegExp))throw pt(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=el(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=il(e,this.name,t)}}function ol(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=Za(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=Za(t.ignoreCase,!1),i.unicode=Za(t.unicode,!1),i.tokenPostfix=Xa(t.tokenPostfix,"."+i.languageId),i.defaultToken=Xa(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw pt(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw pt(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new nl(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw pt(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw pt(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Za(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw pt(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw pt(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw pt(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw pt(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:ut(i,t.open),close:ut(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}class sl{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return rl.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new d.DI(n.tokens,n.endState)}}class rl{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o<s;o++){const s=e[o];let r=s.startIndex;0===o?r=0:r<n&&(r=n),i[o]=new d.WU(r,s.scopes,t),n=r}return i}static adaptTokenize(e,t,i,n){const o=t.tokenize(i,n),s=rl._toClassicTokens(o.tokens,e);let r;return r=o.endState.equals(n)?n:o.endState,new d.hG(s,r)}tokenize(e,t,i){return rl.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,o=[];let s=0,r=0;for(let e=0,a=t.length;e<a;e++){const a=t[e],l=n.match(i,a.scopes);if(s>0&&o[s-1]===l)continue;let c=a.startIndex;0===e?c=0:c<r&&(c=r),o[s++]=c,o[s++]=l,r=c}const a=new Uint32Array(s);for(let e=0;e<s;e++)a[e]=o[e];return a}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),o=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let s;return s=n.endState.equals(i)?i:n.endState,new d.DI(o,s)}}function al(e){return e&&"function"==typeof e.then}function ll(e,t){return function(e){return"tokenizeEncoded"in e}(t)?new sl(e,t):new rl(e,t,Wa.get(O.O),Wa.get(Ar.Z))}function cl(e,t){const i={createTokenizationSupport:()=>{return i=this,n=void 0,s=function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?ll(e,i):new xt(Wa.get(O.O),Wa.get(Ar.Z),e,ol(e,i),Wa.get(_t.Ui)):null},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}};return d.RW.registerFactory(e,i)}var hl,dl=i(58823);n.BH.wrappingIndent.defaultValue=0,n.BH.glyphMargin.defaultValue=!1,n.BH.autoIndent.defaultValue=3,n.BH.overviewRulerLanes.defaultValue=2,dl.xC.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const ul=p();ul.editor={create:function(e,t,i){return Wa.initialize(i||{}).createInstance(qa,e,t)},getEditors:function(){return Wa.get(v.$).listCodeEditors()},getDiffEditors:function(){return Wa.get(v.$).listDiffEditors()},onDidCreateEditor:function(e){return Wa.get(v.$).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return Wa.get(v.$).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return Wa.initialize(i||{}).createInstance($a,e,t)},createDiffNavigator:function(e,t){return Wa.initialize({}).createInstance(D,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Dn.P.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=Gt.Ao.deserialize(e.precondition),i=new m.SL;if(i.add(Dn.P.registerCommand(e.id,((i,...n)=>Ut._l.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(Yo.BH.appendMenuItem(Yo.eH.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=Wa.get(jn.d);if(n instanceof Da){const o=Gt.Ao.and(t,Gt.Ao.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Ya([e])},addKeybindingRules:Ya,createModel:function(e,t,i){const n=Wa.get(O.O),o=n.getLanguageIdByMimeType(t)||t;return Ga(Wa.get(P.q),n,e,o,i)},setModelLanguage:function(e,t){const i=Wa.get(O.O),n=Wa.get(P.q),o=i.getLanguageIdByMimeType(t)||t||Fo.bd;n.setMode(e,i.createById(o))},setModelMarkers:function(e,t,i){e&&Wa.get(ks.lT).changeOne(t,e.uri,i)},getModelMarkers:function(e){return Wa.get(ks.lT).read(e)},removeAllMarkers:function(e){Wa.get(ks.lT).changeAll(e,[])},onDidChangeMarkers:function(e){return Wa.get(ks.lT).onMarkerChanged(e)},getModels:function(){return Wa.get(P.q).getModels()},getModel:function(e){return Wa.get(P.q).getModel(e)},onDidCreateModel:function(e){return Wa.get(P.q).onModelAdded(e)},onWillDisposeModel:function(e){return Wa.get(P.q).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return Wa.get(P.q).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t,i){return new st(e,t,i)}(Wa.get(P.q),Wa.get(M.c_),e)},colorizeElement:function(e,t){const i=Wa.get(O.O),n=Wa.get(Ar.Z);return n.registerEditorContainer(e),It.colorizeElement(n,i,e,t)},colorize:function(e,t,i){const n=Wa.get(O.O);return Wa.get(Ar.Z).registerEditorContainer(document.body),It.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return Wa.get(Ar.Z).registerEditorContainer(document.body),It.colorizeModelLine(e,t,i)},tokenize:function(e,t){d.RW.getOrCreate(t);const i=(n=t,d.RW.get(n)||{getInitialState:()=>R.TJ,tokenize:(e,t,i)=>(0,R.Ri)(n,i)});var n;const o=(0,f.uq)(e),s=[];let r=i.getInitialState();for(let e=0,t=o.length;e<t;e++){const t=o[e],n=i.tokenize(t,!0,r);s[e]=n.tokens,r=n.endState}return s},defineTheme:function(e,t){Wa.get(Ar.Z).defineTheme(e,t)},setTheme:function(e){Wa.get(Ar.Z).setTheme(e)},remeasureFonts:function(){_.g.clearAllFontInfos()},registerCommand:function(e,t){return Dn.P.registerCommand({id:e,handler:t})},AccessibilitySupport:u.ao,ContentWidgetPositionPreference:u.r3,CursorChangeReason:u.Vi,DefaultEndOfLine:u._x,EditorAutoIndentStrategy:u.rf,EditorOption:u.wT,EndOfLinePreference:u.gm,EndOfLineSequence:u.jl,MinimapPosition:u.F5,MouseTargetType:u.MG,OverlayWidgetPositionPreference:u.E$,OverviewRulerLane:u.sh,RenderLineNumbersType:u.Lu,RenderMinimap:u.vQ,ScrollbarVisibility:u.g_,ScrollType:u.g4,TextEditorCursorBlinkingStyle:u.In,TextEditorCursorStyle:u.d2,TrackedRangeStickiness:u.OI,WrappingIndent:u.up,InjectedTextCursorStops:u.RM,PositionAffinity:u.py,ConfigurationChangedEvent:n.Bb,BareFontInfo:T.E4,FontInfo:T.pR,TextModelResolvedOptions:A.dJ,FindMatch:A.tk,ApplyUpdateResult:n.rk,LineRange:me,LineRangeMapping:ge,RangeMapping:pe,EditorType:I.g,EditorOptions:n.BH},ul.languages={register:function(e){Fo.dQ.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(Fo.dQ.getLanguages()),e},onLanguage:function(e,t){const i=Wa.get(O.O).onDidEncounterLanguage((n=>{n===e&&(i.dispose(),t())}));return i},getEncodedLanguageId:function(e){return Wa.get(O.O).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!Wa.get(O.O).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return Wa.get(M.c_).register(e,t,100)},setColorMap:function(e){const t=Wa.get(Ar.Z);if(e){const i=[null];for(let t=1,n=e.length;t<n;t++)i[t]=As.Il.fromHex(e[t]);t.setColorMapOverride(i)}else t.setColorMapOverride(null)},registerTokensProviderFactory:cl,setTokensProvider:function(e,t){if(!Wa.get(O.O).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return al(t)?cl(e,{create:()=>t}):d.RW.register(e,ll(e,t))},setMonarchTokensProvider:function(e,t){return al(t)?cl(e,{create:()=>t}):d.RW.register(e,(t=>new xt(Wa.get(O.O),Wa.get(Ar.Z),e,ol(e,t),Wa.get(_t.Ui)))(t))},registerReferenceProvider:function(e,t){return Wa.get(Ge.p).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return Wa.get(Ge.p).renameProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return Wa.get(Ge.p).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return Wa.get(Ge.p).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return Wa.get(Ge.p).hoverProvider.register(e,{provideHover:(e,i,n)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new c.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new c.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return Wa.get(Ge.p).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return Wa.get(Ge.p).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return Wa.get(Ge.p).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return Wa.get(Ge.p).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return Wa.get(Ge.p).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return Wa.get(Ge.p).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return Wa.get(Ge.p).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return Wa.get(Ge.p).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,o)=>{const s=Wa.get(ks.lT).read({resource:e.uri}).filter((e=>c.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return Wa.get(Ge.p).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return Wa.get(Ge.p).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return Wa.get(Ge.p).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return Wa.get(Ge.p).linkProvider.register(e,t)},registerColorProvider:function(e,t){return Wa.get(Ge.p).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return Wa.get(Ge.p).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return Wa.get(Ge.p).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return Wa.get(Ge.p).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return Wa.get(Ge.p).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return Wa.get(Ge.p).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return Wa.get(Ge.p).inlineCompletionsProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return Wa.get(Ge.p).inlayHintsProvider.register(e,t)},DocumentHighlightKind:u.MY,CompletionItemKind:u.cm,CompletionItemTag:u.we,CompletionItemInsertTextRule:u.a7,SymbolKind:u.cR,SymbolTag:u.r4,IndentAction:u.wU,CompletionTriggerKind:u.Ij,SignatureHelpTriggerKind:u.WW,InlayHintKind:u.gl,InlineCompletionTriggerKind:u.bw,CodeActionTriggerType:u.np,FoldingRangeKind:d.AD};const gl=ul.CancellationTokenSource,pl=ul.Emitter,ml=ul.KeyCode,fl=ul.KeyMod,_l=ul.Position,vl=ul.Range,bl=ul.Selection,Cl=ul.SelectionDirection,yl=ul.MarkerSeverity,wl=ul.MarkerTag,Sl=ul.Uri,kl=ul.Token,xl=ul.editor,Ll=ul.languages;((null===(hl=H.li.MonacoEnvironment)||void 0===hl?void 0:hl.globalAPI)||"function"==typeof define&&i.amdO)&&(self.monaco=ul),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},29477:(e,t,i)=>{"use strict";i.r(t);var n=i(65321),o=i(38626),s=i(48764),r=i(85152),a=i(93794),l=i(5976),c=i(1432),h=i(97295),d=i(70666),u=i(16830),g=i(29102),p=i(64662),m=i(38819),f=i(72065),_=i(91847),v=i(50988),b=i(20913),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w=new m.uy("accessibilityHelpWidgetVisible",!1);let S=class e extends l.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(k,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};S.ID="editor.contrib.accessibilityHelpController",S=C([y(1,f.TG)],S);let k=class e extends a.${constructor(e,t,i,s){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=s,this._editor=e,this._isVisibleKey=w.bindTo(this._contextKeyService),this._domNode=(0,o.X)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,o.X)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange((()=>{this._isVisible&&this._layout()}))),this._register(n.mu(this._contentDomNode.domNode,"keydown",(e=>{if(this._isVisible&&(e.equals(2083)&&((0,r.Z9)(b.Oe.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),n.PO(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){(0,r.Z9)(b.Oe.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(d.o.parse(t)),e.preventDefault(),e.stopPropagation()}}))),this.onblur(this._contentDomNode.domNode,(()=>{this.hide()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){const n=this._keybindingService.lookupKeybinding(e);return n?h.WU(t,n.getAriaLabel()):h.WU(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const e=this._editor.getModel();e&&t.forEach((t=>{i+=e.getValueLengthInRange(t)}))}let n=function(e,t){return e&&0!==e.length?1===e.length?t?h.WU(b.Oe.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):h.WU(b.Oe.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?h.WU(b.Oe.multiSelectionRange,e.length,t):e.length>0?h.WU(b.Oe.multiSelection,e.length):"":b.Oe.noSelection}(t,i);e.get(58)?e.get(86)?n+=b.Oe.readonlyDiffEditor:n+=b.Oe.editableDiffEditor:e.get(86)?n+=b.Oe.readonlyEditor:n+=b.Oe.editableEditor;const o=c.dz?b.Oe.changeConfigToOnMac:b.Oe.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+="\n\n - "+o;break;case 2:n+="\n\n - "+b.Oe.auto_on;break;case 1:n+="\n\n - "+b.Oe.auto_off,n+=" "+o}e.get(137)?n+="\n\n - "+this._descriptionForCommand(p.ToggleTabFocusModeAction.ID,b.Oe.tabFocusModeOnMsg,b.Oe.tabFocusModeOnMsgNoKb):n+="\n\n - "+this._descriptionForCommand(p.ToggleTabFocusModeAction.ID,b.Oe.tabFocusModeOffMsg,b.Oe.tabFocusModeOffMsgNoKb),n+="\n\n - "+(c.dz?b.Oe.openDocMac:b.Oe.openDocWinLinux),n+="\n\n"+b.Oe.outroMsg,this._contentDomNode.domNode.appendChild((0,s.BO)(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,n.PO(this._contentDomNode.domNode),this._editor.focus())}_layout(){const t=this._editor.getLayoutInfo(),i=Math.max(5,Math.min(e.WIDTH,t.width-40)),n=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(i),this._domNode.setHeight(n);const o=Math.round((t.height-n)/2);this._domNode.setTop(o);const s=Math.round((t.width-i)/2);this._domNode.setLeft(s)}};k.ID="editor.contrib.accessibilityHelpWidget",k.WIDTH=500,k.HEIGHT=300,k=C([y(1,m.i6),y(2,_.d),y(3,v.v4)],k);class x extends u.R6{constructor(){super({id:"editor.action.showAccessibilityHelp",label:b.Oe.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=S.get(t);null==i||i.show()}}(0,u._K)(S.ID,S,4),(0,u.Qr)(x);const L=u._l.bindToContribution(S.get);(0,u.fK)(new L({id:"closeAccessibilityHelp",precondition:w,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:g.u.focus,primary:9,secondary:[1033]}}))},19646:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IPadShowKeyboard:()=>a});var n=i(65321),o=i(5976),s=i(16830),r=i(1432);class a extends o.JT{constructor(e){super(),this.editor=e,this.widget=null,r.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(86);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}a.ID="editor.contrib.iPadShowKeyboard";class l extends o.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}l.ID="editor.contrib.ShowKeyboardWidget",(0,s._K)(a.ID,a,3)},97830:(e,t,i)=>{"use strict";i.r(t);var n=i(65321),o=i(41264),s=i(5976),r=i(16830),a=i(96887),l=i(45797),c=i(276),h=i(72042),d=i(44156),u=i(20913),g=function(e,t){return function(i,n){t(i,n,e)}};let p=class e extends s.JT{static get(t){return t.getContribution(e.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(a.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new f(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};p.ID="editor.contrib.inspectTokens",p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(1,d.Z),g(2,h.O)],p);class m extends r.R6{constructor(){super({id:"editor.action.inspectTokens",label:u.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=p.get(t);null==i||i.launch()}}class f extends s.JT{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=function(e,t){const i=a.RW.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>c.TJ,tokenize:(e,i,n)=>(0,c.Ri)(t,n),tokenizeEncoded:(e,t,i)=>(0,c.Dy)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return f._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let s=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){s=i;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(i<t.tokens1.length){const e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:r.length;a=r.substring(e,n)}(0,n.mc)(this._domNode,(0,n.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="·";break;default:t+=String.fromCharCode(n)}}return t}(a),(0,n.$)("span.tm-token-length",void 0,`${a.length} ${1===a.length?"char":"chars"}`))),(0,n.R3)(this._domNode,(0,n.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const l=1+(s<<1)<t.tokens2.length?this._decodeMetadata(t.tokens2[1+(s<<1)]):null;(0,n.R3)(this._domNode,(0,n.$)("table.tm-metadata-table",void 0,(0,n.$)("tbody",void 0,(0,n.$)("tr",void 0,(0,n.$)("td.tm-metadata-key",void 0,"language"),(0,n.$)("td.tm-metadata-value",void 0,`${l?l.languageId:"-?-"}`)),(0,n.$)("tr",void 0,(0,n.$)("td.tm-metadata-key",void 0,"token type"),(0,n.$)("td.tm-metadata-value",void 0,`${l?this._tokenTypeToString(l.tokenType):"-?-"}`)),(0,n.$)("tr",void 0,(0,n.$)("td.tm-metadata-key",void 0,"font style"),(0,n.$)("td.tm-metadata-value",void 0,`${l?this._fontStyleToString(l.fontStyle):"-?-"}`)),(0,n.$)("tr",void 0,(0,n.$)("td.tm-metadata-key",void 0,"foreground"),(0,n.$)("td.tm-metadata-value",void 0,`${l?o.Il.Format.CSS.formatHex(l.foreground):"-?-"}`)),(0,n.$)("tr",void 0,(0,n.$)("td.tm-metadata-key",void 0,"background"),(0,n.$)("td.tm-metadata-value",void 0,`${l?o.Il.Format.CSS.formatHex(l.background):"-?-"}`))))),(0,n.R3)(this._domNode,(0,n.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,n.R3)(this._domNode,(0,n.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=a.RW.getColorMap(),i=l.N.getLanguageId(e),n=l.N.getTokenType(e),o=l.N.getFontStyle(e),s=l.N.getForeground(e),r=l.N.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:o,foreground:t[s],background:t[r]}}_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 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),0===t.length&&(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]}}}f._ID="editor.contrib.inspectTokensWidget",(0,r._K)(p.ID,p,4),(0,r.Qr)(m)},38956:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>j,StandaloneCommandsQuickAccessProvider:()=>U});var n=i(89872),o=i(90725),s=i(20913),r=i(11640),a=i(21212),l=i(9488),c=i(98401),h=i(63580);function d(e,t){return t&&(e.stack||e.stacktrace)?h.NC("stackTrace.format","{0}: {1}",g(e),u(e.stack)||u(e.stacktrace)):g(e)}function u(e){return Array.isArray(e)?e.join("\n"):e}function g(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?h.NC("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function p(e=null,t=!1){if(!e)return h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=l.kX(e),n=p(i[0],t);return i.length>1?h.NC("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(c.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return d(i.error,t);if(i.exception)return d(i.exception,t)}return e.stack?d(e,t):e.message?e.message:h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var m,f=i(17301),_=i(75392),v=i(5976),b=i(43702),C=i(14603),y=i(94565),w=i(33108),S=i(28820),k=i(72065),x=i(91847),L=i(15393),E=i(71050),N=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function D(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(m||(m={}));class T extends v.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new v.SL;let s;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=o.add(new v.XK),a=()=>N(this,void 0,void 0,(function*(){const n=r.value=new v.SL;null==s||s.dispose(!0),e.busy=!1,s=new E.A(t);const o=s.token,a=e.value.substr(this.prefix.length).trim(),l=this._getPicks(a,n,o,i),c=(t,i)=>{var n;let o,s;if(D(t)?(o=t.items,s=t.active):o=t,0===o.length){if(i)return!1;a.length>0&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0};if(null===l);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(l)){let t=!1,i=!1;yield Promise.all([(()=>N(this,void 0,void 0,(function*(){yield(0,L.Vs)(T.FAST_PICKS_RACE_DELAY),o.isCancellationRequested||i||(t=c(l.picks,!0))})))(),(()=>N(this,void 0,void 0,(function*(){e.busy=!0;try{const n=yield l.additionalPicks;if(o.isCancellationRequested)return;let s,r,a,h;if(D(l.picks)?(s=l.picks.items,r=l.picks.active):s=l.picks,D(n)?(a=n.items,h=n.active):a=n,a.length>0||!t){let t;if(!r&&!h){const i=e.activeItems[0];i&&-1!==s.indexOf(i)&&(t=i)}c({items:[...s,...a],active:r||h||t})}}finally{o.isCancellationRequested||(e.busy=!1),i=!0}})))()])}else if(l instanceof Promise){e.busy=!0;try{const t=yield l;if(o.isCancellationRequested)return;c(t)}finally{o.isCancellationRequested||(e.busy=!1)}}else c(l)}));return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((({button:i,item:n})=>N(this,void 0,void 0,(function*(){var o,s;if("function"==typeof n.trigger){const r=null!==(s=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==s?s:-1;if(r>=0){const i=n.trigger(r,e.keyMods),o="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(o){case m.NO_ACTION:break;case m.CLOSE_PICKER:e.hide();break;case m.REFRESH_PICKER:a();break;case m.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}}}))))),o}}T.FAST_PICKS_RACE_DELAY=200;var I=i(26904),A=i(10829),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}},O=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let P=class e extends T{constructor(t,i,n,o,s,r){super(e.PREFIX,t),this.instantiationService=i,this.keybindingService=n,this.commandService=o,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(F)),this.options=t}_getPicks(t,i,n,o){var s,r;return O(this,void 0,void 0,(function*(){const i=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];const a=[];for(const n of i){const i=(0,c.f6)(e.WORD_FILTER(t,n.label)),o=n.commandAlias?(0,c.f6)(e.WORD_FILTER(t,n.commandAlias)):void 0;i||o?(n.highlights={label:i,detail:this.options.showAlias?o:void 0},a.push(n)):t===n.commandId&&a.push(n)}const l=new Map;for(const e of a){const t=l.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):l.set(e.label,e)}a.sort(((e,t)=>{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const d=[];let u=!1,g=!!this.options.suggestedCommandIds;for(let e=0;e<a.length;e++){const t=a[e],i=this.keybindingService.lookupKeybinding(t.commandId),n=i?(0,h.NC)("commandPickAriaLabelWithKeybinding","{0}, {1}",t.label,i.getAriaLabel()):t.label;0===e&&this.commandsHistory.peek(t.commandId)&&(d.push({type:"separator",label:(0,h.NC)("recentlyUsed","recently used")}),u=!0),g&&!this.commandsHistory.peek(t.commandId)&&(null===(s=this.options.suggestedCommandIds)||void 0===s?void 0:s.has(t.commandId))&&(d.push({type:"separator",label:(0,h.NC)("commonlyUsed","commonly used")}),u=!0,g=!1),!u||this.commandsHistory.peek(t.commandId)||(null===(r=this.options.suggestedCommandIds)||void 0===r?void 0:r.has(t.commandId))||(d.push({type:"separator",label:(0,h.NC)("morecCommands","other commands")}),u=!1),d.push(Object.assign(Object.assign({},t),{ariaLabel:n,detail:this.options.showAlias&&t.commandAlias!==t.label?t.commandAlias:void 0,keybinding:i,accept:()=>O(this,void 0,void 0,(function*(){var e;this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:null!==(e=null==o?void 0:o.from)&&void 0!==e?e:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){(0,f.n2)(e)||this.dialogService.show(C.Z.Error,(0,h.NC)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,p(e)))}}))}))}return d}))}};P.PREFIX=">",P.WORD_FILTER=(0,_.or)(_.Ji,_.KZ,_.ir),P=M([R(1,k.TG),R(2,x.d),R(3,y.H),R(4,A.b),R(5,S.S)],P);let F=class e extends v.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e))))}updateConfiguration(t){t&&!t.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService)))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let i;if(t)try{i=JSON.parse(t)}catch(e){}const n=e.cache=new b.z6(this.configuredCommandsHistoryLength,1);if(i){let e;e=i.usesLRU?i.entries:i.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>n.set(e.key,e.value)))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var i;return null===(i=e.cache)||void 0===i?void 0:i.peek(t)}static saveState(t){if(!e.cache)return;const i={usesLRU:!0,entries:[]};e.cache.forEach(((e,t)=>i.entries.push({key:t,value:e}))),t.store(e.PREF_KEY_CACHE,JSON.stringify(i),0,0),t.store(e.PREF_KEY_COUNTER,e.counter,0,0)}static getConfiguredCommandHistoryLength(t){var i,n;const o=null===(n=null===(i=t.getValue().workbench)||void 0===i?void 0:i.commandPalette)||void 0===n?void 0:n.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};F.DEFAULT_COMMANDS_HISTORY_LENGTH=50,F.PREF_KEY_CACHE="commandPalette.mru.cache",F.PREF_KEY_COUNTER="commandPalette.mru.counter",F.counter=1,F=M([R(0,I.Uy),R(1,w.Ui)],F);class B extends P{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,a.x$)(i.label)||i.id});return t}}var H=i(16830),W=i(29102),V=i(41157),z=function(e,t){return function(i,n){t(i,n,e)}};let U=class extends B{get activeTextEditorControl(){return(0,c.f6)(this.codeEditorService.getFocusedCodeEditor())}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}getCommandPicks(){return e=this,t=void 0,n=function*(){return this.getCodeEditorCommandPicks()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([z(0,k.TG),z(1,r.$),z(2,x.d),z(3,y.H),z(4,A.b),z(5,S.S)],U);class j extends H.R6{constructor(){super({id:j.ID,label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.eJ).quickAccess.show(U.PREFIX)}}j.ID="editor.action.quickCommand",(0,H.Qr)(j),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:U,prefix:U.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,commandId:j.ID}]})},43588:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>C,StandaloneGotoLineQuickAccessProvider:()=>_});var n=i(5976),o=i(65520),s=i(83943),r=i(63580);class a extends s.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.NC)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.JT.None}provideWithTextEditor(e,t,i){const s=e.editor,r=new n.SL;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(s,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(s,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(s,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(s,e.lineNumber))return void this.clearDecorations(s);const n=this.toRange(e.lineNumber,e.column);s.revealRangeInCenter(n,0),this.addDecorations(s,n)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,o.Pi)(s);return c&&2===c.getOptions().get(64).renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,n.OF)((()=>c.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.NC)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.NC)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,r.NC)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,r.NC)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}a.PREFIX=":";var l=i(89872),c=i(90725),h=i(11640),d=i(98401),u=i(20913),g=i(4669),p=i(16830),m=i(29102),f=i(41157);let _=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=g.ju.None}get activeTextEditorControl(){return(0,d.f6)(this.editorService.getFocusedCodeEditor())}};var v,b;_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(v=0,b=h.$,function(e,t){b(e,t,v)})],_);class C extends p.R6{constructor(){super({id:C.ID,label:u.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:m.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.eJ).quickAccess.show(_.PREFIX)}}C.ID="editor.action.gotoLine",(0,p.Qr)(C),l.B.as(c.IP.Quickaccess).registerQuickAccessProvider({ctor:_,prefix:_.PREFIX,helpEntries:[{description:u.qq.gotoLineActionLabel,commandId:C.ID}]})},48766:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoSymbolAction:()=>U,StandaloneGotoSymbolQuickAccessProvider:()=>z}),i(71713);var n=i(15393),o=i(71050),s=i(73046),r=i(25670),a=i(75392),l=i(88721),c=i(1432),h=i(97295);const d=[void 0,[]];function u(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=g(e,r,i,n);if("number"!=typeof t)return d;o+=t,s.push(...a)}return[o,p(s)]}(e,o.values,i,n):g(e,t,i,n)}function g(e,t,i,n){const o=(0,a.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,a.mB)(o)]:d}function p(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(s=e,(o=n).end<s.start||s.end<o.start)?(n=e,i.push(e)):(n.start=Math.min(n.start,e.start),n.end=Math.max(n.end,e.end));var o,s;return i}function m(e){return e.startsWith('"')&&e.endsWith('"')}function f(e){"string"!=typeof e&&(e="");const t=e.toLowerCase(),{pathNormalized:i,normalized:n,normalizedLowercase:o}=_(e),s=i.indexOf(l.ir)>=0,r=m(e);let a;const c=e.split(" ");if(c.length>1)for(const e of c){const t=m(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=_(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function _(e){let t;t=c.ED?e.replace(/\//g,l.ir):e.replace(/\\/g,l.ir);const i=(0,h.R1)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function v(e){return Array.isArray(e)?f(e.map((e=>e.original)).join(" ")):f(e.original)}Object.freeze({score:0});var b=i(5976),C=i(24314),y=i(96887),w=i(30335),S=i(83943),k=i(63580),x=i(71922),L=i(9488),E=function(e,t){return function(i,n){t(i,n,e)}},N=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let D=class e extends S.X{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,k.NC)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),b.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):b.JT.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new b.SL;return this.provideLabelPick(i,(0,k.NC)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{N(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,o))&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))}))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return N(this,void 0,void 0,(function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.CR,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),i.complete(!0))})));return t.add((0,b.OF)((()=>i.complete(!1)))),i.p}))}doProvideWithEditorSymbols(t,i,n,s){var r;const a=t.editor,l=new b.SL;l.add(n.onDidAccept((e=>{const[i]=n.selectedItems;i&&i.range&&(this.gotoLocation(t,{range:i.range.selection,keyMods:n.keyMods,preserveFocus:e.inBackground}),e.inBackground||n.hide())}))),l.add(n.onDidTriggerItemButton((({item:e})=>{e&&e.range&&(this.gotoLocation(t,{range:e.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())})));const c=this.getDocumentSymbols(i,s);let h;const d=t=>N(this,void 0,void 0,(function*(){null==h||h.dispose(!0),n.busy=!1,h=new o.A(s),n.busy=!0;try{const i=f(n.value.substr(e.PREFIX.length).trim()),o=yield this.doGetSymbolPicks(c,i,void 0,h.token);if(s.isCancellationRequested)return;if(o.length>0){if(n.items=o,t&&0===i.original.length){const e=(0,L.dF)(o,(e=>Boolean("separator"!==e.type&&e.range&&C.e.containsPosition(e.range.decoration,t))));e&&(n.activeItems=[e])}}else i.original.length>0?this.provideLabelPick(n,(0,k.NC)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,(0,k.NC)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}}));return l.add(n.onDidChangeValue((()=>d(void 0)))),d(null===(r=a.getSelection())||void 0===r?void 0:r.getPosition()),l.add(n.onDidChangeActive((()=>{const[e]=n.activeItems;e&&e.range&&(a.revealRangeInCenter(e.range.selection,0),this.addDecorations(a,e.range.decoration))}))),l}doGetSymbolPicks(t,i,n,o){var a,l;return N(this,void 0,void 0,(function*(){const c=yield t;if(o.isCancellationRequested)return[];const d=0===i.original.indexOf(e.SCOPE_PREFIX),g=d?1:0;let p,m,f;i.values&&i.values.length>1?(p=v(i.values[0]),m=v(i.values.slice(1))):p=i;const _=null===(l=null===(a=this.options)||void 0===a?void 0:a.openSideBySideDirection)||void 0===l?void 0:l.call(a);_&&(f=[{iconClass:"right"===_?r.k.asClassName(s.l.splitHorizontal):r.k.asClassName(s.l.splitVertical),tooltip:"right"===_?(0,k.NC)("openToSide","Open to the Side"):(0,k.NC)("openToBottom","Open to the Bottom")}]);const b=[];for(let x=0;x<c.length;x++){const L=c[x],E=(0,h.fy)(L.name),N=`$(${y.uZ.toIcon(L.kind).id}) ${E}`,D=N.length-E.length;let A,M,R,O,P=L.containerName;if((null==n?void 0:n.extraContainerLabel)&&(P=P?`${n.extraContainerLabel} • ${P}`:n.extraContainerLabel),i.original.length>g){let B=!1;if(p!==i&&([A,M]=u(N,Object.assign(Object.assign({},i),{values:void 0}),g,D),"number"==typeof A&&(B=!0)),"number"!=typeof A&&([A,M]=u(N,p,g,D),"number"!=typeof A))continue;if(!B&&m){if(P&&m.original.length>0&&([R,O]=u(P,m)),"number"!=typeof R)continue;"number"==typeof A&&(A+=R)}}const F=L.tags&&L.tags.indexOf(1)>=0;b.push({index:x,kind:L.kind,score:A,label:N,ariaLabel:E,description:P,highlights:F?void 0:{label:M,description:O},range:{selection:C.e.collapseToStart(L.selectionRange),decoration:L.range},strikethrough:F,buttons:f})}const w=b.sort(((e,t)=>d?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let S=[];if(d){let H,W,V=0;function z(){W&&"number"==typeof H&&V>0&&(W.label=(0,h.WU)(I[H]||T,V))}for(const U of w)H!==U.kind?(z(),H=U.kind,V=1,W={type:"separator"},S.push(W)):V++,S.push(U);z()}else w.length>0&&(S=[{label:(0,k.NC)("symbols","symbols ({0})",b.length),type:"separator"},...w]);return S}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){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=I[e.kind]||T,n=I[t.kind]||T,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return N(this,void 0,void 0,(function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}};D.PREFIX="@",D.SCOPE_PREFIX=":",D.PREFIX_BY_CATEGORY=`${D.PREFIX}${D.SCOPE_PREFIX}`,D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(0,x.p),E(1,w.Je)],D);const T=(0,k.NC)("property","properties ({0})"),I={5:(0,k.NC)("method","methods ({0})"),11:(0,k.NC)("function","functions ({0})"),8:(0,k.NC)("_constructor","constructors ({0})"),12:(0,k.NC)("variable","variables ({0})"),4:(0,k.NC)("class","classes ({0})"),22:(0,k.NC)("struct","structs ({0})"),23:(0,k.NC)("event","events ({0})"),24:(0,k.NC)("operator","operators ({0})"),10:(0,k.NC)("interface","interfaces ({0})"),2:(0,k.NC)("namespace","namespaces ({0})"),3:(0,k.NC)("package","packages ({0})"),25:(0,k.NC)("typeParameter","type parameters ({0})"),1:(0,k.NC)("modules","modules ({0})"),6:(0,k.NC)("property","properties ({0})"),9:(0,k.NC)("enum","enumerations ({0})"),21:(0,k.NC)("enumMember","enumeration members ({0})"),14:(0,k.NC)("string","strings ({0})"),0:(0,k.NC)("file","files ({0})"),17:(0,k.NC)("array","arrays ({0})"),15:(0,k.NC)("number","numbers ({0})"),16:(0,k.NC)("boolean","booleans ({0})"),18:(0,k.NC)("object","objects ({0})"),19:(0,k.NC)("key","keys ({0})"),7:(0,k.NC)("field","fields ({0})"),13:(0,k.NC)("constant","constants ({0})")};var A=i(89872),M=i(90725),R=i(11640),O=i(98401),P=i(20913),F=i(4669),B=i(16830),H=i(29102),W=i(41157),V=function(e,t){return function(i,n){t(i,n,e)}};let z=class extends D{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=F.ju.None}get activeTextEditorControl(){return(0,O.f6)(this.editorService.getFocusedCodeEditor())}};z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([V(0,R.$),V(1,x.p),V(2,w.Je)],z);class U extends B.R6{constructor(){super({id:U.ID,label:P.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:H.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:H.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(W.eJ).quickAccess.show(D.PREFIX,{itemActivation:W.jG.NONE})}}U.ID="editor.action.quickOutline",(0,B.Qr)(U),A.B.as(M.IP.Quickaccess).registerQuickAccessProvider({ctor:z,prefix:D.PREFIX,helpEntries:[{description:P.aq.quickOutlineActionLabel,prefix:D.PREFIX,commandId:U.ID},{description:P.aq.quickOutlineByCategoryActionLabel,prefix:D.PREFIX_BY_CATEGORY}]})},78944:(e,t,i)=>{"use strict";i.r(t);var n=i(89872),o=i(90725),s=i(20913),r=i(63580),a=i(5976),l=i(91847),c=i(41157),h=function(e,t){return function(i,n){t(i,n,e)}};let d=class e{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=n.B.as(o.IP.Quickaccess)}provide(t){const i=new a.SL;return i.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),i.add(t.onDidChangeValue((t=>{const i=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));i&&i.prefix&&i.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})}))),t.items=this.getQuickAccessProviders().filter((t=>t.prefix!==e.PREFIX)),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}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:(0,r.NC)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};d.PREFIX="?",d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(0,c.eJ),h(1,l.d)],d),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:d,prefix:"",helpEntries:[{description:s.ld.helpQuickAccessActionLabel}]})},45048:(e,t,i)=>{"use strict";i.r(t),i.d(t,{StandaloneReferencesController:()=>u});var n=i(16830),o=i(11640),s=i(27376),r=i(33108),a=i(38819),l=i(72065),c=i(59422),h=i(26904),d=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends s.J{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([d(1,a.i6),d(2,o.$),d(3,c.lT),d(4,l.TG),d(5,h.Uy),d(6,r.Ui)],u),(0,n._K)(s.J.ID,u,4)},58763:(e,t,i)=>{"use strict";i.d(t,{kR:()=>I,MU:()=>A,nI:()=>H,rW:()=>T,TG:()=>D});var n=i(65321),o=i(16268),s=i(41264),r=i(4669),a=i(96887),l=i(45797);class c{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const h=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class d{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(h);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=s.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class u{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n<o;n++){const o=e[n];let s=-1;if("string"==typeof o.fontStyle){s=0;const e=o.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let r=null;"string"==typeof o.foreground&&(r=o.foreground);let a=null;"string"==typeof o.background&&(a=o.background),t[i++]=new c(o.token||"",n,s,r,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort(((e,t)=>{const i=function(e,t){return e<t?-1:e>t?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new d;for(const e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new p(i,r,a),c=new m(l);for(let t=0,i=e.length;t<i;t++){const i=e[t];c.insert(i.token,i.fontStyle,s.getId(i.foreground),s.getId(i.background))}return new u(s,c)}(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){const e=this._match(t),n=function(e){const t=e.match(g);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const g=/\b(comment|string|regex|regexp)\b/;class p{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new p(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class m{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return void 0!==o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);void 0===a&&(a=new m(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}var f=i(8625),_=i(73910);const v={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.cvW]:"#FFFFFE",[_.NOs]:"#000000",[_.ES4]:"#E5EBF1",[f.tR]:"#D3D3D3",[f.Ym]:"#939393",[_.Rzx]:"#ADD6FF4D"}},b={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.cvW]:"#1E1E1E",[_.NOs]:"#D4D4D4",[_.ES4]:"#3A3D41",[f.tR]:"#404040",[f.Ym]:"#707070",[_.Rzx]:"#ADD6FF26"}},C={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.cvW]:"#000000",[_.NOs]:"#FFFFFF",[f.tR]:"#FFFFFF",[f.Ym]:"#FFFFFF"}},y={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.cvW]:"#FFFFFF",[_.NOs]:"#292929",[f.tR]:"#292929",[f.Ym]:"#292929"}};var w=i(89872),S=i(97781),k=i(5976),x=i(92321),L=i(25670),E=i(59554);class N{getIcon(e){const t=(0,E.Ks)();let i=e.defaults;for(;L.k.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const D="vs",T="vs-dark",I="hc-black",A="hc-light",M=w.B.as(_.IPX.ColorContribution),R=w.B.as(S.IP.ThemingContribution);class O{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(P(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,s.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=F(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,s.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=M.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case D:return x.eL.LIGHT;case I:return x.eL.HIGH_CONTRAST_DARK;case A:return x.eL.HIGH_CONTRAST_LIGHT;default:return x.eL.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=F(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=u.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=l.N.getForeground(n),s=l.N.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function P(e){return e===D||e===T||e===I||e===A}function F(e){switch(e){case D:return v;case T:return b;case I:return C;case A:return y}}function B(e){const t=F(e);return new O(e,t)}class H extends k.JT{constructor(){super(),this._onColorThemeChange=this._register(new r.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.Q5),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new N,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(D,B(D)),this._knownThemes.set(T,B(T)),this._knownThemes.set(I,B(I)),this._knownThemes.set(A,B(A));const e=function(e){const t=new r.Q5,i=(0,E.Ks)();return i.onDidChange((()=>t.fire())),null==e||e.onDidProductIconThemeChange((()=>t.fire())),{onDidChange:t.event,getCSS(){const t=e?e.getProductIconTheme():new N,o={},s=e=>{const i=t.getIcon(e);if(!i)return;const s=i.font;return s?(o[s.id]=s.definition,`.codicon-${e.id}:before { content: '${i.fontCharacter}'; font-family: ${(0,n._h)(s.id)}; }`):`.codicon-${e.id}:before { content: '${i.fontCharacter}'; }`},r=[];for(const e of i.getIcons()){const t=s(e);t&&r.push(t)}for(const e in o){const t=o[e],i=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.wY)(e.location)} format('${e.format}')`)).join(", ");r.push(`@font-face { src: ${a}; font-family: ${(0,n._h)(e)};${i}${s} font-display: block; }`)}return r.join("\n")}}}(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(D),this._onOSSchemeChanged(),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),(0,o.addMatchMediaChangeListener)("(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.dS(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),k.JT.None}_registerShadowDomContainer(e){const t=n.dS(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!P(t.base)&&!P(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new O(e,t)),P(e)&&this._knownThemes.forEach((t=>{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(D),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==(0,x.c3)(this._theme.type)){let t;t=(0,x._T)(this._theme.type)?e?I:T:e?A:D,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};R.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of M.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,_.QO2)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;i<n;i++){const n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.push(".mtks { text-decoration: line-through; }"),t.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),t.join("\n")}(o)),this._themeCSS=e.join("\n"),this._updateCSS(),a.RW.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},15662:(e,t,i)=>{"use strict";i.r(t);var n=i(16830),o=i(44156),s=i(20913),r=i(92321),a=i(58763);class l extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:s.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.Z),n=i.getColorTheme();(0,r.c3)(n.type)?(i.setTheme(this._originalThemeName||((0,r._T)(n.type)?a.rW:a.TG)),this._originalThemeName=null):(i.setTheme((0,r._T)(n.type)?a.kR:a.MU),this._originalThemeName=n.themeName)}}(0,n.Qr)(l)},44156:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=(0,i(72065).yh)("themeService")},40605:(e,t,i)=>{"use strict";i.r(t),i.d(t,{cssDefaults:()=>g,lessDefaults:()=>m,scssDefaults:()=>p});var n=i(1593),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c={};l(c,n,"default");var h=class{_onDidChange=new c.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){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)}},d={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}},u={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},g=new h("css",d,u),p=new h("scss",d,u),m=new h("less",d,u);function f(){return i.e(288).then(i.bind(i,45288))}c.languages.css={cssDefaults:g,lessDefaults:m,scssDefaults:p},c.languages.onLanguage("less",(()=>{f().then((e=>e.setupMode(m)))})),c.languages.onLanguage("scss",(()=>{f().then((e=>e.setupMode(p)))})),c.languages.onLanguage("css",(()=>{f().then((e=>e.setupMode(g)))}))},68423:(e,t,i)=>{"use strict";i.r(t),i.d(t,{handlebarDefaults:()=>v,handlebarLanguageService:()=>_,htmlDefaults:()=>f,htmlLanguageService:()=>m,razorDefaults:()=>C,razorLanguageService:()=>b,registerHTMLLanguageService:()=>y});var n=i(1593),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c={};l(c,n,"default");var h={format:{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"},suggest:{},data:{useDefaultDataProvider:!0}};function d(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===u,documentFormattingEdits:e===u,documentRangeFormattingEdits:e===u}}var u="html",g="handlebars",p="razor",m=y(u,h,d(u)),f=m.defaults,_=y(g,h,d(g)),v=_.defaults,b=y(p,h,d(p)),C=b.defaults;function y(e,t=h,n=d(e)){const o=new class{_onDidChange=new c.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){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)}}(e,t,n);let s;const r=c.languages.onLanguage(e,(async()=>{s=(await i.e(377).then(i.bind(i,15377))).setupMode(o)}));return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}c.languages.html={htmlDefaults:f,razorDefaults:C,handlebarDefaults:v,htmlLanguageService:m,handlebarLanguageService:_,razorLanguageService:b,registerHTMLLanguageService:y}},72323:(e,t,i)=>{"use strict";i.r(t),i.d(t,{jsonDefaults:()=>h});var n=i(1593),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c={};l(c,n,"default");var h=new class{_onDidChange=new c.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,t,i){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)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});c.languages.json={jsonDefaults:h},c.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),c.languages.onLanguage("json",(()=>{i.e(665).then(i.bind(i,90665)).then((e=>e.setupMode(h)))}))},63580:(e,t,i)=>{"use strict";i.d(t,{NC:()=>o,aj:()=>s});let n="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"==typeof o?s=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(s=String(o)),s})),n&&(i=""+i.replace(/[aouei]/g,"$&$&")+""),i}(t,i)}function s(e){}},31106:(e,t,i)=>{"use strict";i.d(t,{F:()=>o,U:()=>s});var n=i(38819);const o=(0,i(72065).yh)("accessibilityService"),s=new n.uy("accessibilityModeEnabled",!1)},22444:(e,t,i)=>{"use strict";i.d(t,{Mm:()=>I,Id:()=>O,vr:()=>D,LJ:()=>N});var n=i(65321),o=i(59069),s=i(88609),r=i(61364),a=i(74741),l=i(8030),c=i(5976),h=i(1432),d=i(63580),u=i(84144),g=i(38819),p=i(5606),m=i(72065),f=i(91847),_=i(59422),v=i(26904),b=i(97781),C=i(25670),y=i(92321),w=i(98401),S=i(73910),k=i(86253),x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}},E=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function N(e,t,i,o){const s=e.getActions(t),r=n._q.getInstance();T(s,i,r.keyStatus.altKey||(h.ED||h.IJ)&&r.keyStatus.shiftKey,o?e=>e===o:e=>"navigation"===e)}function D(e,t,i,n,o,s){T(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,o,s)}function T(e,t,i,n=(e=>"navigation"===e),o=(()=>!1),s=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const c=new Set;for(const[t,o]of e){let e;n(t)?(e=r,e.length>0&&s&&e.push(new a.Z0)):(e=l,e.length>0&&e.push(new a.Z0));for(let n of o){i&&(n=n instanceof u.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof a.wY&&c.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of c){const s=n(e)?r:l,a=t.actions;a.length<=1&&o(t,e,s.length)&&s.splice(i,1,...a)}}let I=class extends s.gU{constructor(e,t,i,o,s,r,a){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=o,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return E(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(h.ED||h.IJ)&&this._altKey.keyStatus.shiftKey;const o=()=>{var e;const n=t&&i&&!!(null===(e=this._commandAction.alt)||void 0===e?void 0:e.enabled);n!==this._wantsAltCommand&&(this._wantsAltCommand=n,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(h.ED||h.IJ)&&e.shiftKey,o()}))),this._register((0,n.nm)(e,"mouseleave",(e=>{t=!1,o()}))),this._register((0,n.nm)(e,"mouseenter",(e=>{t=!0,o()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let o=i?(0,d.NC)("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?(0,d.NC)("titleAndKb","{0} ({1})",e,i):e;o=(0,d.NC)("titleAndKbAndAlt","{0}\n[{1}] {2}",o,l.xo.modifierLabels[h.OS].altKey,n)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const o=this._commandAction.checked&&(s=e.toggled)&&void 0!==s.condition&&e.toggled.icon?e.toggled.icon:e.icon;var s;if(o)if(C.k.isThemeIcon(o)){const e=C.k.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,c.OF)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,y._T)(this._themeService.getColorTheme().type)?(0,n.wY)(o.dark):(0,n.wY)(o.light),i.classList.add("icon"),this._itemClassDispose.value=(0,c.F8)((0,c.OF)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};I=x([L(2,f.d),L(3,_.lT),L(4,g.i6),L(5,b.XE),L(6,p.i)],I);let A=class extends r.C{constructor(e,t,i,n){var o,s;const r=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(o=null==t?void 0:t.menuAsChild)&&void 0!==o&&o,classNames:null!==(s=null==t?void 0:t.classNames)&&void 0!==s?s:C.k.isThemeIcon(e.item.icon)?C.k.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,r),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),(0,w.p_)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!C.k.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,y._T)(this._themeService.getColorTheme().type)?(0,n.wY)(i.dark):(0,n.wY)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};A=x([L(2,p.i),L(3,b.XE)],A);let M=class extends s.YH{constructor(e,t,i,n,o,s,l,c){var h,d,g;let p;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=l,this._storageService=c,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const m=c.get(this._storageKey,1);m&&(p=e.actions.find((e=>m===e.id))),p||(p=e.actions[0]),this._defaultAction=this._instaService.createInstance(I,p,{keybinding:this._getDefaultActionKeybindingLabel(p)});const f=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(h=null==t?void 0:t.menuAsChild)||void 0===h||h,classNames:null!==(d=null==t?void 0:t.classNames)&&void 0!==d?d:["codicon","codicon-chevron-down"],actionRunner:null!==(g=null==t?void 0:t.actionRunner)&&void 0!==g?g:new a.Wi});this._dropdown=new r.C(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof u.U8&&this.update(e.action)}))}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(I,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.Wi{runAction(e,t){return E(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((0,n.Ce)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.R3)(this._container,t)),this._register((0,n.nm)(t,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.R3)(this._container,i)),this._register((0,n.nm)(i,n.tw.KEY_DOWN,(e=>{var t;const i=new o.y(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};M=x([L(2,f.d),L(3,_.lT),L(4,p.i),L(5,u.co),L(6,m.TG),L(7,v.Uy)],M);let R=class extends s.Lc{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.Z0.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,k.BM,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,S.n_1)(S.a9O)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function O(e,t,i){return t instanceof u.U8?e.createInstance(I,t,i):t instanceof u.NZ?t.item.isSelection?e.createInstance(R,t):t.item.rememberDefaultAction?e.createInstance(M,t,i):e.createInstance(A,t,i):void 0}R=x([L(1,p.u)],R)},84144:(e,t,i)=>{"use strict";i.d(t,{BH:()=>v,Ke:()=>y,NZ:()=>b,U8:()=>C,co:()=>f,eH:()=>m,f6:()=>p,r1:()=>w,vr:()=>g});var n=i(74741),o=i(25670),s=i(4669),r=i(5976),a=i(91741),l=i(94565),c=i(38819),h=i(72065),d=i(49989),u=function(e,t){return function(i,n){t(i,n,e)}};function g(e){return void 0!==e.command}function p(e){return void 0!==e.submenu}class m{constructor(e){if(m._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);m._instances.set(e,this),this.id=e}}m._instances=new Map,m.CommandPalette=new m("CommandPalette"),m.DebugBreakpointsContext=new m("DebugBreakpointsContext"),m.DebugCallStackContext=new m("DebugCallStackContext"),m.DebugConsoleContext=new m("DebugConsoleContext"),m.DebugVariablesContext=new m("DebugVariablesContext"),m.DebugWatchContext=new m("DebugWatchContext"),m.DebugToolBar=new m("DebugToolBar"),m.DebugToolBarStop=new m("DebugToolBarStop"),m.EditorContext=new m("EditorContext"),m.SimpleEditorContext=new m("SimpleEditorContext"),m.EditorContent=new m("EditorContent"),m.EditorContextCopy=new m("EditorContextCopy"),m.EditorContextPeek=new m("EditorContextPeek"),m.EditorContextShare=new m("EditorContextShare"),m.EditorTitle=new m("EditorTitle"),m.EditorTitleRun=new m("EditorTitleRun"),m.EditorTitleContext=new m("EditorTitleContext"),m.EmptyEditorGroup=new m("EmptyEditorGroup"),m.EmptyEditorGroupContext=new m("EmptyEditorGroupContext"),m.ExplorerContext=new m("ExplorerContext"),m.ExtensionContext=new m("ExtensionContext"),m.GlobalActivity=new m("GlobalActivity"),m.CommandCenter=new m("CommandCenter"),m.LayoutControlMenuSubmenu=new m("LayoutControlMenuSubmenu"),m.LayoutControlMenu=new m("LayoutControlMenu"),m.MenubarMainMenu=new m("MenubarMainMenu"),m.MenubarAppearanceMenu=new m("MenubarAppearanceMenu"),m.MenubarDebugMenu=new m("MenubarDebugMenu"),m.MenubarEditMenu=new m("MenubarEditMenu"),m.MenubarCopy=new m("MenubarCopy"),m.MenubarFileMenu=new m("MenubarFileMenu"),m.MenubarGoMenu=new m("MenubarGoMenu"),m.MenubarHelpMenu=new m("MenubarHelpMenu"),m.MenubarLayoutMenu=new m("MenubarLayoutMenu"),m.MenubarNewBreakpointMenu=new m("MenubarNewBreakpointMenu"),m.PanelAlignmentMenu=new m("PanelAlignmentMenu"),m.PanelPositionMenu=new m("PanelPositionMenu"),m.MenubarPreferencesMenu=new m("MenubarPreferencesMenu"),m.MenubarRecentMenu=new m("MenubarRecentMenu"),m.MenubarSelectionMenu=new m("MenubarSelectionMenu"),m.MenubarShare=new m("MenubarShare"),m.MenubarSwitchEditorMenu=new m("MenubarSwitchEditorMenu"),m.MenubarSwitchGroupMenu=new m("MenubarSwitchGroupMenu"),m.MenubarTerminalMenu=new m("MenubarTerminalMenu"),m.MenubarViewMenu=new m("MenubarViewMenu"),m.MenubarHomeMenu=new m("MenubarHomeMenu"),m.OpenEditorsContext=new m("OpenEditorsContext"),m.ProblemsPanelContext=new m("ProblemsPanelContext"),m.SCMChangeContext=new m("SCMChangeContext"),m.SCMResourceContext=new m("SCMResourceContext"),m.SCMResourceFolderContext=new m("SCMResourceFolderContext"),m.SCMResourceGroupContext=new m("SCMResourceGroupContext"),m.SCMSourceControl=new m("SCMSourceControl"),m.SCMTitle=new m("SCMTitle"),m.SearchContext=new m("SearchContext"),m.SearchActionMenu=new m("SearchActionContext"),m.StatusBarWindowIndicatorMenu=new m("StatusBarWindowIndicatorMenu"),m.StatusBarRemoteIndicatorMenu=new m("StatusBarRemoteIndicatorMenu"),m.StickyScrollContext=new m("StickyScrollContext"),m.TestItem=new m("TestItem"),m.TestItemGutter=new m("TestItemGutter"),m.TestPeekElement=new m("TestPeekElement"),m.TestPeekTitle=new m("TestPeekTitle"),m.TouchBarContext=new m("TouchBarContext"),m.TitleBarContext=new m("TitleBarContext"),m.TitleBarTitleContext=new m("TitleBarTitleContext"),m.TunnelContext=new m("TunnelContext"),m.TunnelPrivacy=new m("TunnelPrivacy"),m.TunnelProtocol=new m("TunnelProtocol"),m.TunnelPortInline=new m("TunnelInline"),m.TunnelTitle=new m("TunnelTitle"),m.TunnelLocalAddressInline=new m("TunnelLocalAddressInline"),m.TunnelOriginInline=new m("TunnelOriginInline"),m.ViewItemContext=new m("ViewItemContext"),m.ViewContainerTitle=new m("ViewContainerTitle"),m.ViewContainerTitleContext=new m("ViewContainerTitleContext"),m.ViewTitle=new m("ViewTitle"),m.ViewTitleContext=new m("ViewTitleContext"),m.CommentEditorActions=new m("CommentEditorActions"),m.CommentThreadTitle=new m("CommentThreadTitle"),m.CommentThreadActions=new m("CommentThreadActions"),m.CommentThreadAdditionalActions=new m("CommentThreadAdditionalActions"),m.CommentThreadTitleContext=new m("CommentThreadTitleContext"),m.CommentThreadCommentContext=new m("CommentThreadCommentContext"),m.CommentTitle=new m("CommentTitle"),m.CommentActions=new m("CommentActions"),m.InteractiveToolbar=new m("InteractiveToolbar"),m.InteractiveCellTitle=new m("InteractiveCellTitle"),m.InteractiveCellDelete=new m("InteractiveCellDelete"),m.InteractiveCellExecute=new m("InteractiveCellExecute"),m.InteractiveInputExecute=new m("InteractiveInputExecute"),m.NotebookToolbar=new m("NotebookToolbar"),m.NotebookCellTitle=new m("NotebookCellTitle"),m.NotebookCellDelete=new m("NotebookCellDelete"),m.NotebookCellInsert=new m("NotebookCellInsert"),m.NotebookCellBetween=new m("NotebookCellBetween"),m.NotebookCellListTop=new m("NotebookCellTop"),m.NotebookCellExecute=new m("NotebookCellExecute"),m.NotebookCellExecutePrimary=new m("NotebookCellExecutePrimary"),m.NotebookDiffCellInputTitle=new m("NotebookDiffCellInputTitle"),m.NotebookDiffCellMetadataTitle=new m("NotebookDiffCellMetadataTitle"),m.NotebookDiffCellOutputsTitle=new m("NotebookDiffCellOutputsTitle"),m.NotebookOutputToolbar=new m("NotebookOutputToolbar"),m.NotebookEditorLayoutConfigure=new m("NotebookEditorLayoutConfigure"),m.NotebookKernelSource=new m("NotebookKernelSource"),m.BulkEditTitle=new m("BulkEditTitle"),m.BulkEditContext=new m("BulkEditContext"),m.TimelineItemContext=new m("TimelineItemContext"),m.TimelineTitle=new m("TimelineTitle"),m.TimelineTitleContext=new m("TimelineTitleContext"),m.TimelineFilterSubMenu=new m("TimelineFilterSubMenu"),m.AccountsContext=new m("AccountsContext"),m.PanelTitle=new m("PanelTitle"),m.AuxiliaryBarTitle=new m("AuxiliaryBarTitle"),m.TerminalInstanceContext=new m("TerminalInstanceContext"),m.TerminalEditorInstanceContext=new m("TerminalEditorInstanceContext"),m.TerminalNewDropdownContext=new m("TerminalNewDropdownContext"),m.TerminalTabContext=new m("TerminalTabContext"),m.TerminalTabEmptyAreaContext=new m("TerminalTabEmptyAreaContext"),m.TerminalInlineTabContext=new m("TerminalInlineTabContext"),m.WebviewContext=new m("WebviewContext"),m.InlineCompletionsActions=new m("InlineCompletionsActions"),m.NewFile=new m("NewFile"),m.MergeInput1Toolbar=new m("MergeToolbar1Toolbar"),m.MergeInput2Toolbar=new m("MergeToolbar2Toolbar"),m.MergeBaseToolbar=new m("MergeBaseToolbar"),m.MergeInputResultToolbar=new m("MergeToolbarResultToolbar"),m.InlineSuggestionToolbar=new m("InlineSuggestionToolbar");const f=(0,h.yh)("menuService");class _{static for(e){let t=this._all.get(e);return t||(t=new _(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof _&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}_._all=new Map;const v=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new s.SZ({merge:_.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(_.for(m.CommandPalette)),(0,r.OF)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(_.for(m.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new a.S,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(_.for(e)),(0,r.OF)(n)}appendMenuItems(e){const t=new r.SL;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)g(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class b extends n.wY{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let C=class e{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(t,i,n,s,r,a){var l,c;if(this.hideActions=s,this._commandService=a,this.id=t.id,this.label=e.label(t,n),this.tooltip=null!==(c="string"==typeof t.tooltip?t.tooltip:null===(l=t.tooltip)||void 0===l?void 0:l.value)&&void 0!==c?c:"",this.enabled=!t.precondition||r.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=r.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,s,r,a):void 0,this._options=n,o.k.isThemeIcon(t.icon)&&(this.class=o.k.asClassName(t.icon))}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([u(4,c.i6),u(5,l.H)],C);class y{constructor(e){this.desc=e}}function w(e){const t=new r.SL,i=new e,n=i.desc,{f1:o,menu:s,keybinding:a,description:h}=n,u=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}(n,["f1","menu","keybinding","description"]);if(t.add(l.P.registerCommand({id:u.id,handler:(e,...t)=>i.run(e,...t),description:h})),Array.isArray(s))for(const e of s)t.add(v.appendMenuItem(e.id,Object.assign({command:Object.assign(Object.assign({},u),{precondition:null===e.precondition?void 0:u.precondition})},e)));else s&&t.add(v.appendMenuItem(s.id,Object.assign({command:Object.assign(Object.assign({},u),{precondition:null===s.precondition?void 0:u.precondition})},s)));if(o&&(t.add(v.appendMenuItem(m.CommandPalette,{command:u,when:u.precondition})),t.add(v.addCommand(u))),Array.isArray(a))for(const e of a)t.add(d.W.registerKeybindingRule(Object.assign(Object.assign({},e),{id:u.id,when:u.precondition?c.Ao.and(u.precondition,e.when):e.when})));else a&&t.add(d.W.registerKeybindingRule(Object.assign(Object.assign({},a),{id:u.id,when:u.precondition?c.Ao.and(u.precondition,a.when):a.when})));return t}},84972:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("clipboardService")},94565:(e,t,i)=>{"use strict";i.d(t,{H:()=>l,P:()=>c});var n=i(4669),o=i(53725),s=i(5976),r=i(91741),a=i(98401);const l=(0,i(72065).yh)("commandService"),c=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(const i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.D8)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.S,this._commands.set(i,n));const o=n.unshift(e),l=(0,s.OF)((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return c.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};c.registerCommand("noop",(()=>{}))},33108:(e,t,i)=>{"use strict";i.d(t,{KV:()=>s,Mt:()=>l,Od:()=>o,UI:()=>c,Ui:()=>n,xL:()=>r});const n=(0,i(72065).yh)("configurationService");function o(e,t){const i=Object.create(null);for(const n in e)s(i,n,e[n],t);return i}function s(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e<o.length;e++){const i=o[e];let s=r[i];switch(typeof s){case"undefined":s=r[i]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${o.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}r=s}if("object"==typeof r&&null!==r)try{r[s]=i}catch(e){n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}function r(e,t){a(e,t.split("."))}function a(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!=typeof n||Array.isArray(n)||(a(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function l(e,t,i){const n=function(e,t){let i=e;for(const e of t){if("object"!=typeof i||null===i)return;i=i[e]}return i}(e,t.split("."));return void 0===n?i:n}function c(e){return e.replace(/[\[\]]/g,"")}},23193:(e,t,i)=>{"use strict";i.d(t,{IP:()=>h,eU:()=>y,ny:()=>w});var n=i(9488),o=i(4669),s=i(98401),r=i(63580),a=i(33108),l=i(81294),c=i(89872);const h={Configuration:"base.contributions.configuration"},d={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",v=c.B.as(l.I.JSONContribution),b=new RegExp("\\[([^\\]]+)\\]","g"),C="^(\\[([^\\]]+)\\])+$",y=new RegExp(C);function w(e){const t=[];if(y.test(e)){let i=b.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=b.exec(e)}}return(0,n.EB)(t)}const S=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.NC("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),v.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:o,source:l}of e)for(const e in o)if(t.add(e),y.test(e)){const t=this.configurationDefaultsOverrides.get(e),c=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(l)for(const t of Object.keys(o[e]))c.set(t,l);const h=Object.assign(Object.assign({},(null==t?void 0:t.value)||{}),o[e]);this.configurationDefaultsOverrides.set(e,{source:l,value:h,valuesSources:c});const d=(0,a.UI)(e),u={type:"object",default:h,description:r.NC("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",d),$ref:_,defaultDefaultValue:h,source:s.HD(l)?void 0:l,defaultValueSource:l};n.push(...w(e)),this.configurationProperties[e]=u,this.defaultLanguageConfigurationOverridesNode.properties[e]=u}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:l});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,r){var a;o=s.Jp(e.scope)?o:e.scope;const l=e.properties;if(l)for(const e in l){const c=l[e];t&&k(e,c)?delete l[e]:(c.source=i,c.defaultDefaultValue=l[e].default,this.updatePropertyDefaultValue(e,c),y.test(e)?c.scope=void 0:(c.scope=s.Jp(c.scope)?o:c.scope,c.restricted=s.Jp(c.restricted)?!!(null==n?void 0:n.includes(e)):c.restricted),!l[e].hasOwnProperty("included")||l[e].included?(this.configurationProperties[e]=l[e],(null===(a=l[e].policy)||void 0===a?void 0:a.name)&&this.policyConfigurations.set(l[e].policy.name,e),!l[e].deprecationMessage&&l[e].markdownDeprecationMessage&&(l[e].deprecationMessage=l[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=l[e],delete l[e]))}const c=e.allOf;if(c)for(const e of c)this.validateAndRegisterProperties(e,t,i,n,o,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(d.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),d.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,m.properties[t]=i,f.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};d.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,u.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,g.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,p.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,m.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,f.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;s.o8(n)&&(n=t.defaultDefaultValue,o=void 0),s.o8(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function k(e,t){var i,n,o,s;return e.trim()?y.test(e)?r.NC("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==S.getConfigurationProperties()[e]?r.NC("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==S.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?r.NC("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(o=t.policy)||void 0===o?void 0:o.name,S.getPolicyConfigurations().get(null===(s=t.policy)||void 0===s?void 0:s.name)):null:r.NC("config.property.empty","Cannot register an empty property")}c.B.add(h.Configuration,S)},38819:(e,t,i)=>{"use strict";i.d(t,{Ao:()=>l,Fb:()=>c,K8:()=>M,i6:()=>T,uy:()=>D});var n=i(1432),o=i(97295),s=i(72065);const r=new Map;r.set("false",!1),r.set("true",!0),r.set("isMac",n.dz),r.set("isLinux",n.IJ),r.set("isWindows",n.ED),r.set("isWeb",n.$L),r.set("isMacNative",n.dz&&!n.$L),r.set("isEdge",n.un),r.set("isFirefox",n.vU),r.set("isChrome",n.i7),r.set("isSafari",n.G6);const a=Object.prototype.hasOwnProperty;class l{static has(e){return g.create(e)}static equals(e,t){return p.create(e,t)}static regex(e,t){return k.create(e,t)}static not(e){return v.create(e)}static and(...e){return E.create(e,null,!0)}static or(...e){return N.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){const i=e.split("||");return N.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){const i=e.split("&&");return E.create(i.map((e=>this._deserializeOne(e,t))),null,!0)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){const i=e.split("!=");return _.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){const i=e.split("==");return p.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){const i=e.split("=~");return k.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" not in ")>=0){const i=e.split(" not in ");return f.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf(" in ")>=0){const i=e.split(" in ");return m.create(i[0].trim(),this._deserializeValue(i[1],t))}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return y.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return C.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return S.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return w.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?v.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;const i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if((0,o.m5)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}const i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}const s=e.slice(i+1,n),r="i"===e[n+1]?"i":"";try{return new RegExp(s,r)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function c(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function h(e,t){return e.cmp(t)}class d{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return u.INSTANCE}}d.INSTANCE=new d;class u{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return d.INSTANCE}}u.INSTANCE=new u;class g{static create(e,t=null){const i=r.get(e);return"boolean"==typeof i?i?u.INSTANCE:d.INSTANCE:new g(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=r.get(this.key);return"boolean"==typeof e?e?u.INSTANCE:d.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}class p{static create(e,t,i=null){if("boolean"==typeof t)return t?g.create(e,i):v.create(e,i);const n=r.get(e);return"boolean"==typeof n?t===(n?"true":"false")?u.INSTANCE:d.INSTANCE:new p(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=r.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?u.INSTANCE:d.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class m{static create(e,t){return new m(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&a.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=f.create(this.key,this.valueKey)),this.negated}}class f{static create(e,t){return new f(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=m.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class _{static create(e,t,i=null){if("boolean"==typeof t)return t?v.create(e,i):g.create(e,i);const n=r.get(e);return"boolean"==typeof n?t===(n?"true":"false")?d.INSTANCE:u.INSTANCE:new _(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=r.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?d.INSTANCE:u.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class v{static create(e,t=null){const i=r.get(e);return"boolean"==typeof i?i?d.INSTANCE:u.INSTANCE:new v(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=r.get(this.key);return"boolean"==typeof e?e?d.INSTANCE:u.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this)),this.negated}}function b(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):d.INSTANCE}class C{static create(e,t,i=null){return b(t,(t=>new C(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class y{static create(e,t,i=null){return b(t,(t=>new y(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class w{static create(e,t,i=null){return b(t,(t=>new w(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class S{static create(e,t,i=null){return b(t,(t=>new S(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=C.create(this.key,this.value,this)),this.negated}}class k{static create(e,t){return new k(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{static create(e){return new x(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function L(e){let t=null;for(let i=0,n=e.length;i<n;i++){const n=e[i].substituteConstants();if(e[i]!==n&&null===t){t=[];for(let n=0;n<i;n++)t[n]=e[n]}null!==t&&(t[i]=n)}return null===t?e:t}class E{static create(e,t,i){return E._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=h(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=L(this.expr);return e===this.expr?this:E.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t,i){const n=[];let o=!1;for(const t of e)if(t)if(1!==t.type){if(0===t.type)return d.INSTANCE;6!==t.type?n.push(t):n.push(...t.expr)}else o=!0;if(0===n.length&&o)return u.INSTANCE;if(0!==n.length){if(1===n.length)return n[0];n.sort(h);for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];for(;n.length>1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=N.create(e.expr.map((e=>E.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(h))}if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if(n[e].negate().equals(n[t]))return d.INSTANCE;if(1===n.length)return n[0]}return new E(n,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=N.create(e,this,!0)}return this.negated}}class N{static create(e,t,i){return N._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=h(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=L(this.expr);return e===this.expr?this:N.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],o=!1;if(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i)if(0!==i.type){if(1===i.type)return u.INSTANCE;9!==i.type?n.push(i):n=n.concat(i.expr)}else o=!0}if(0===n.length&&o)return d.INSTANCE;n.sort(h)}if(0!==n.length){if(1===n.length)return n[0];for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if(n[e].negate().equals(n[t]))return u.INSTANCE;if(1===n.length)return n[0]}return new N(n,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of O(t))for(const t of O(i))n.push(E.create([e,t],null,!1));e.unshift(N.create(n,null,!1))}this.negated=N.create(e,this,!0)}return this.negated}}class D extends g{static all(){return D._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?D._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&D._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return p.create(this.key,e)}}D._info=[];const T=(0,s.yh)("contextKeyService");function I(e,t){return e<t?-1:e>t?1:0}function A(e,t,i,n){return e<i?-1:e>i?1:t<n?-1:t>n?1:0}function M(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&R(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(M(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return R(t.expr,e.expr);for(const i of e.expr)if(M(i,t))return!0;return!1}return e.equals(t)}function R(e,t){let i=0,n=0;for(;i<e.length&&n<t.length;){const o=e[i].cmp(t[n]);if(o<0)return!1;0===o?(i++,n++):n++}return i===e.length}function O(e){return 9===e.type?e.expr:[e]}},39282:(e,t,i)=>{"use strict";i.d(t,{cv:()=>r,d0:()=>a});var n=i(1432),o=i(63580),s=i(38819);new s.uy("isMac",n.dz,(0,o.NC)("isMac","Whether the operating system is macOS")),new s.uy("isLinux",n.IJ,(0,o.NC)("isLinux","Whether the operating system is Linux"));const r=new s.uy("isWindows",n.ED,(0,o.NC)("isWindows","Whether the operating system is Windows")),a=(new s.uy("isWeb",n.$L,(0,o.NC)("isWeb","Whether the platform is a web browser")),new s.uy("isMacNative",n.dz&&!n.$L,(0,o.NC)("isMacNative","Whether the operating system is macOS on a non-browser platform")),new s.uy("isIOS",n.gn,(0,o.NC)("isIOS","Whether the operating system is iOS")),new s.uy("isMobile",n.tq,(0,o.NC)("isMobile","Whether the platform is a mobile web browser")),new s.uy("isDevelopment",!1,!0),new s.uy("productQualityType","",(0,o.NC)("productQualityType","Quality type of VS Code")),"inputFocus");new s.uy(a,!1,(0,o.NC)("inputFocus","Whether keyboard focus is inside an input box"))},5606:(e,t,i)=>{"use strict";i.d(t,{i:()=>s,u:()=>o});var n=i(72065);const o=(0,n.yh)("contextViewService"),s=(0,n.yh)("contextMenuService")},28820:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(72065).yh)("dialogService")},22980:(e,t,i)=>{"use strict";i.d(t,{Yb:()=>E,Nq:()=>N,iX:()=>C});var n=i(3070),o=i(65321),s=i(82900),r=i(77927),a=i(93794),l=i(73046),c=i(4669),h=i(63580);const d=h.NC("defaultLabel","input"),u=h.NC("label.preserveCaseToggle","Preserve Case");class g extends s.Z{constructor(e){super({icon:l.l.preserveCase,title:u+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class p extends a.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new c.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new c.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new c.Q5),this._onInput=this._register(new c.Q5),this._onKeyUp=this._register(new c.Q5),this._onPreserveCaseKeyDown=this._register(new c.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||d;const s=n.appendPreserveCaseLabel||"",a=n.history||[],l=!!n.flexibleHeight,h=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new r.pG(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new g(Object.assign({appendTitle:s,isChecked:!1},n.toggleStyles))),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const p=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=p.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%p.length:e.equals(15)&&(i=0===t?p.length-1:t-1),e.equals(9)?(p[t].blur(),this.inputBox.focus()):i>=0&&p[i].focus(),o.zB.stop(e,!0)}}}));const m=document.createElement("div");m.className="controls",m.style.display=this._showOptionButtons?"block":"none",m.appendChild(this.preserveCase.domNode),this.domNode.appendChild(m),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(38819),f=i(49989),_=i(5976),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};const C=new m.uy("suggestWidgetVisible",!1,(0,h.NC)("suggestWidgetVisible","Whether suggestion are visible")),y="historyNavigationWidgetFocus",w="historyNavigationForwardsEnabled",S="historyNavigationBackwardsEnabled";let k;const x=[];function L(e,t){if(x.includes(t))throw new Error("Cannot register the same widget multiple times");x.push(t);const i=new _.SL,n=new m.uy(y,!1).bindTo(e),o=new m.uy(w,!0).bindTo(e),s=new m.uy(S,!0).bindTo(e),r=()=>{n.set(!0),k=t},a=()=>{n.set(!1),k===t&&(k=void 0)};return t.element===document.activeElement&&r(),i.add(t.onDidFocus((()=>r()))),i.add(t.onDidBlur((()=>a()))),i.add((0,_.OF)((()=>{x.splice(x.indexOf(t),1),a()}))),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:s,dispose(){i.dispose()}}}let E=class extends n.V{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(L(o,this.inputBox))}};E=v([b(3,m.i6)],E);let N=class extends p{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(L(s,this.inputBox))}};N=v([b(3,m.i6)],N),f.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.Ao.and(m.Ao.has(y),m.Ao.equals(S,!0),C.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==k||k.showPreviousValue()}}),f.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.Ao.and(m.Ao.has(y),m.Ao.equals(w,!0),C.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==k||k.showNextValue()}})},97108:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},65026:(e,t,i)=>{"use strict";i.d(t,{d:()=>r,z:()=>s});var n=i(97108);const o=[];function s(e,t,i){t instanceof n.M||(t=new n.M(t,[],Boolean(i))),o.push([e,t])}function r(){return o}},72065:(e,t,i)=>{"use strict";var n;i.d(t,{I8:()=>n,TG:()=>o,yh:()=>r}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=r("instantiationService");function s(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}function r(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,n)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},60972:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},81294:(e,t,i)=>{"use strict";i.d(t,{I:()=>s});var n=i(4669),o=i(89872);const s={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};o.B.add(s.JSONContribution,r)},91847:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=(0,i(72065).yh)("keybindingService")},49989:(e,t,i)=>{"use strict";i.d(t,{W:()=>h});var n=i(8313),o=i(1432),s=i(94565),r=i(89872),a=i(5976),l=i(91741);class c{constructor(){this._coreKeybindings=new l.S,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=c.bindToCurrentPlatform(e),i=new a.SL;if(t&&t.primary){const s=(0,n.Z9)(t.primary,o.OS);s&&i.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s<r;s++){const r=t.secondary[s],a=(0,n.Z9)(r,o.OS);a&&i.add(this._registerDefaultKeybinding(a,e.id,e.args,e.weight,-s-1,e.when))}return i}registerCommandAndKeybindingRule(e){return(0,a.F8)(this.registerKeybindingRule(e),s.P.registerCommand(e))}_registerDefaultKeybinding(e,t,i,n,o,s){const r=this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,a.OF)((()=>{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(d)),this._cachedMergedKeybindings.slice(0)}}const h=new c;function d(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.command<t.command)return-1;if(e.command>t.command)return 1}return e.weight2-t.weight2}r.B.add("platform.keybindingsRegistry",h)},44349:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});const n=(0,i(72065).yh)("labelService")},46763:(e,t,i)=>{"use strict";i.d(t,{Lw:()=>Ue,XN:()=>je,ls:()=>Ot,ev:()=>kt,CQ:()=>$e,PS:()=>Je,uJ:()=>tt});var n=i(65321),o=i(9488),s=i(71050),r=i(4669),a=i(5976),l=i(43799);class c{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.JT.None}}renderElement(e,t,i,n){var o;if(null===(o=i.disposable)||void 0===o||o.dispose(),!i.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,i.data,n);const a=new s.A,l=r.resolve(e,a.token);i.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,i.data),l.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class h{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}var d=i(23937);class u{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=u.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;e<this.columns.length;e++){const s=this.renderers[e],r=(0,n.R3)(t,(0,n.$)(".monaco-table-td",{"data-col-index":e}));r.style.width=`${this.getColumnSize(e)}px`,i.push(r),o.push(s.renderTemplate(r))}const s={container:e,cellContainers:i,cellTemplateData:o};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.columns[o].project(e);this.renderers[o].renderElement(s,t,i.cellTemplateData[o],n)}}disposeElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.renderers[o];if(s.disposeElement){const r=this.columns[o].project(e);s.disposeElement(r,t,i.cellTemplateData[o],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);(0,n.PO)(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}u.TemplateId="row";class g{get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:r.ju.None}constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new r.Q5,this.onDidLayout=this._onDidLayout.event,this.element=(0,n.$)(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}layout(e){this._onDidLayout.fire([this.index,e])}}class p{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}constructor(e,t,i,o,s,c){this.virtualDelegate=i,this.domId="table_id_"+ ++p.InstanceCount,this.disposables=new a.SL,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,n.R3)(t,(0,n.$)(`.monaco-table.${this.domId}`));const h=o.map(((e,t)=>new g(e,t))),m={size:h.reduce(((e,t)=>e+t.column.weight),0),views:h.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new d.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:m})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const f=new u(o,s,(e=>this.splitview.getViewSize(e)));var _;this.list=this.disposables.add(new l.aV(e,this.domNode,(_=i,{getHeight:e=>_.getHeight(e),getTemplateId:()=>u.TemplateId}),[f],c)),r.ju.any(...h.map((e=>e.onDidLayout)))((([e,t])=>f.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=o.reduce(((e,t)=>e+t.weight),0),i=o[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.dS)(this.domNode),this.style(l.uZ)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}p.InstanceCount=0,i(4850);var m,f=i(59069),_=(i(90317),i(3070),i(77927)),v=i(25707),b=i(82900);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(m||(m={}));class C extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class y{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var w=i(15393),S=i(5635),k=i(2484),x=i(53725);function L(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function E(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function N(e){return"boolean"==typeof e.collapsible}class D{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new r.E7,this._onDidChangeCollapseState=new r.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new r.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new r.Q5,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new w.vp(S.n),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=x.$.empty(),n={}){if(0===e.length)throw new C(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=x.$.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],c=t[t.length-1],h=new k.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(h.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const d=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;r<n;r++)t--,i--,this.spliceSmart(e,[...d,t,0],Number.MAX_SAFE_INTEGER,l[i].children,o,s-1)};let g=Math.min(a.children.length,c+i),p=l.length;for(const e of h.changes.sort(((e,t)=>t.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-c,this.spliceSimple([...d,g],e.originalLength,x.$.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=x.$.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:c,visible:h}=this.getParentNodeWithListIndex(e),d=[],u=x.$.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,c,d,n))),g=e[e.length-1],p=a.children.length>0;let m=0;for(let e=g;e>=0&&e<a.children.length;e--){const t=a.children[e];if(t.visible){m=t.visibleChildIndex;break}}const f=[];let _=0,v=0;for(const e of u)f.push(e),v+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=m+_++);const b=(0,o.db)(a.children,g,t,f);r?a.lastDiffIds?(0,o.db)(a.lastDiffIds,g,t,f.map((e=>r.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let C=0;for(const e of b)e.visible&&C++;if(0!==C)for(let e=g+f.length;e<a.children.length;e++){const t=a.children[e];t.visible&&(t.visibleChildIndex-=C)}if(a.visibleChildrenCount+=_-C,c&&h){const e=b.reduce(((e,t)=>e+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,d)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:b});const y=a.children.length>0;p!==y&&this.setCollapsible(e.slice(0,-1),y);let w=a;for(;w;){if(2===w.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}w=w.parent}}rerender(e){if(0===e.length)throw new C(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!N(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++)if(i.children[e].visible){if(n>-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(N(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!N(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||x.$.empty(),c=n&&0!==a&&!r.collapsed;let h=0,d=1;for(const e of l){const t=this.createTreeNode(e,r,a,c,o,s);r.children.push(t),d+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=h++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=d):(r.renderNodeCount=0,n&&o.pop()),null==s||s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):L(i)?(e.filterData=i.data,E(i.visibility)):(e.filterData=void 0,E(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new C(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new C(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new C(this.user,"Invalid tree location");for(let e=0;e<s;e++)i+=t.children[e].renderNodeCount;return n=n&&!t.collapsed,o=o&&t.visible,0===r.length?{parentNode:t,listIndex:i,revealed:n,visible:o}:this.getParentNodeWithListIndex(r,t.children[s],i+1,n,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:(0,o.JH)(e)[0]}getFirstElementChild(e){const t=this.getTreeNode(e);if(0!==t.children.length)return t.children[0].element}}i(74741);var T=i(73046),I=i(25670);class A{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}var M,R,O,P=i(75392),F=i(59870),B=i(98401),H=i(63580);class W extends v.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function V(e){return e instanceof v.kX?new W(e):e}class z{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=a.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,V(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(V(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,w.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return s?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),h=l.getListIndex(c),d=l.getListRenderCount(c);return Object.assign(Object.assign({},r),{feedback:(0,o.w6)(h,h+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(V(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}class U{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(M||(M={}));class j{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new a.SL,this.onDidChange=r.ju.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class K{constructor(e,t,i,n,o,s={}){var l;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=K.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.JT.None,this.disposables=new a.SL,this.templateId=e.templateId,this.updateOptions(s),r.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(l=e.onDidChangeTwistieState)||void 0===l||l.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=(0,F.uZ)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==M.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new a.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),o=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:o,indentGuidesDisposable:a.JT.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,s;i.indentGuidesDisposable.dispose(),null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=K.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...I.k.asClassNameArray(T.l.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...I.k.asClassNameArray(T.l.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new a.SL,o=this.modelProvider();for(;;){const s=o.getNodeLocation(e),r=o.getParentNodeLocation(s);if(!r)break;const l=o.getNode(r),c=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add((0,a.OF)((()=>this.renderedIndentGuides.delete(l,c)))),e=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.B9)(this.disposables)}}K.DefaultIndent=8;class q{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.SL,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:L(n)?E(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:P.CL.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const e of o){const t=e&&e.toString();if(void 0===t)return{data:P.CL.Default,visibility:i};let n;if(this.tree.findMatchType===O.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,P.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===R.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:P.CL.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.B9)(this.disposables)}}_.g4,b.D,function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(R||(R={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(O||(O={}));class ${get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){var l,c;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new r.Q5,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new r.Q5,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new r.Q5,this._onDidChangeOpenState=new r.Q5,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new a.SL,this.disposables=new a.SL,this._mode=null!==(l=e.options.defaultFindMode)&&void 0!==l?l:R.Highlight,this._matchType=null!==(c=e.options.defaultFindMatchType)&&void 0!==c?c:O.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const o=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&o?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:(0,H.NC)("not found","No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===R.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1||!P.CL.isDefault(e.filterData)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function G(e){let t=m.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=m.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=m.Element:(0,n.uU)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=m.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function Q(e,t){t(e),e.children.forEach((e=>Q(e,t)))}class Y{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&(0,o.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>Q(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>Q(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>Q(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Z extends l.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,l.iK)(e.browserEvent.target)||(0,l.cK)(e.browserEvent.target)||(0,l.hD)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class X extends l.aV{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new Z(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let r;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(r=e+i)})),n.length>0&&super.setFocus((0,o.EB)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,o.EB)([...super.getSelection(),...s])),"number"==typeof r&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class J{get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return r.ju.filter(r.ju.map(this.view.onMouseDblClick,G),(e=>e.target!==m.Filter))}get onPointer(){return r.ju.map(this.view.onPointer,G)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return r.ju.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:R.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:O.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,o,s={}){var c;this._user=e,this._options=s,this.eventBufferer=new r.E7,this.onDidChangeFindOpenState=r.ju.None,this.disposables=new a.SL,this._onWillRefilter=new r.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new r.Q5;const h=new U(i),d=new r.ZD,u=new r.ZD,g=this.disposables.add(new j(u.event)),p=new A;this.renderers=o.map((e=>new K(e,(()=>this.model),d.event,g,p,s)));for(const e of this.renderers)this.disposables.add(e);let m;var _,v;s.keyboardNavigationLabelProvider&&(m=new q(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:m}),this.disposables.add(m)),this.focus=new Y((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new Y((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new Y((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new X(e,t,h,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(_=()=>this.model,(v=s)&&Object.assign(Object.assign({},v),{identityProvider:v.identityProvider&&{getId:e=>v.identityProvider.getId(e.element)},dnd:v.dnd&&new z(_,v.dnd),multipleSelectionController:v.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>v.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>v.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:v.accessibilityProvider&&Object.assign(Object.assign({},v.accessibilityProvider),{getSetSize(e){const t=_(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:v.accessibilityProvider&&v.accessibilityProvider.isChecked?e=>v.accessibilityProvider.isChecked(e.element):void 0,getRole:v.accessibilityProvider&&v.accessibilityProvider.getRole?e=>v.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>v.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>v.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:v.accessibilityProvider&&v.accessibilityProvider.getWidgetRole?()=>v.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:v.accessibilityProvider&&v.accessibilityProvider.getAriaLevel?e=>v.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:v.accessibilityProvider.getActiveDescendantId&&(e=>v.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:v.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},v.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>v.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})}))),{tree:this})),this.model=this.createModel(e,this.view,s),d.input=this.model.onDidChangeCollapseState;const b=r.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);if(b((()=>null),null,this.disposables),u.input=r.ju.chain(r.ju.any(b,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==s.keyboardSupport){const e=r.ju.chain(this.view.onKeyDown).filter((e=>!(0,l.cK)(e.target))).map((e=>new f.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if((null===(c=s.findWidgetEnabled)||void 0===c||c)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new $(this,this.model,this.view,m,s.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=r.ju.None,this.onDidChangeFindMatchType=r.ju.None;this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),(0,B.hj)(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,a.B9)(this.disposables),this.view.dispose()}}class ee{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new D(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=x.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=x.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}}))}preserveCollapseState(e=x.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),x.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new C(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new C(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new C(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new C(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function te(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:x.$.map(x.$.from(e.children),te),collapsible:e.collapsible,collapsed:e.collapsed}}function ie(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=x.$.consume(x.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:x.$.map(x.$.concat(o,n),ie),collapsible:e.collapsible,collapsed:e.collapsed}}function ne(e,t=0){let i;return i=t<e.element.elements.length-1?[ne(e,t+1)]:x.$.map(x.$.from(e.children),(e=>ne(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function oe(e){return ne(e,0)}function se(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:x.$.map(x.$.from(e.children),(e=>se(e,t,i)))})}class re{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new ee(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=x.$.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=x.$.map(t,this.enabled?ie:te);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new C(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=se(oe(r),e,t),h=(this.enabled?ie:te)(c),d=l.children.map((e=>e===r?h:e));this._setChildren(l.element,d,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=x.$.map(t,oe),n=x.$.map(i,e?ie:te);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new C(this.user,`Tree element not found: ${e}`);return t}}const ae=e=>e[e.length-1];class le{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new le(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class ce{get onDidSplice(){return r.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||ae;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new y((e=>new le(n,e))),this.model=new re(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}setChildren(e,t=x.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var he=i(49898);class de extends J{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new ee(e,t,i)}}class ue{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,s,r,a;i.compressedTreeNode?null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([he.H],ue.prototype,"compressedTreeNodeProvider",null);class ge extends de{constructor(e,t,i,n,o={}){const s=()=>this;super(e,t,i,n.map((e=>new ue(s,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new ce(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var pe=i(17301),me=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function fe(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function _e(e,t){return!!t.parent&&(t.parent===e||_e(e,t.parent))}class ve{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new ve(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class be{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...I.k.asClassNameArray(T.l.treeItemLoading)),!0):(t.classList.remove(...I.k.asClassNameArray(T.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function Ce(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function ye(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class we extends v.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Se(e){return e instanceof v.kX?new we(e):e}class ke{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,Se(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(Se(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(Se(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}function xe(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new ke(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)})}function Le(e,t){t(e),e.children.forEach((e=>Le(e,t)))}class Ee{get onDidChangeFocus(){return r.ju.map(this.tree.onDidChangeFocus,Ce)}get onDidChangeSelection(){return r.ju.map(this.tree.onDidChangeSelection,Ce)}get onMouseDblClick(){return r.ju.map(this.tree.onMouseDblClick,ye)}get onPointer(){return r.ju.map(this.tree.onPointer,ye)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.Q5,this._onDidChangeNodeSlowState=new r.Q5,this.nodeMapper=new y((e=>new ve(e))),this.disposables=new a.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=fe({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,o){const s=new U(i),r=n.map((e=>new be(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=xe(o)||{};return new de(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return me(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return me(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new C(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return me(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new C(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new C(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return me(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return me(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||_e(e,t)||_e(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),void(e.stale=!0)):this.doRefreshSubTree(e,t,i))}))}doRefreshSubTree(e,t,i){return me(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield w.jT.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return me(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,B.TW)(t))n=Promise.resolve(t);else{const i=(0,w.Vs)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(x.$.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,pe.n2)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,B.TW)(i)?this.processChildren(i):(t=(0,w.PG)((()=>me(this,void 0,void 0,(function*(){return this.processChildren(yield i)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(pe.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=fe({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>Le(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const h=fe({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(h),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(h),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(h):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(h.collapsedByDefault=!1,a.push(h)),h}));for(const e of s.values())Le(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?x.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class Ne{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new Ne(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class De{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...I.k.asClassNameArray(T.l.treeItemLoading)),!0):(t.classList.remove(...I.k.asClassNameArray(T.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.B9)(this.disposables)}}class Te extends Ee{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new y((e=>new Ne(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new U(i),r=n.map((e=>new De(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&xe(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new ge(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e<t.elements.length;e++){const n=i(t.elements[e].element),h=t.elements[t.elements.length-1].element;o.has(n)&&-1===r.indexOf(h)&&(r.push(h),a=!0),s.has(n)&&-1===l.indexOf(h)&&(l.push(h),c=!0)}e.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(r),c&&this.setFocus(l)}processChildren(e){return this.filter&&(e=x.$.filter(e,(e=>{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:L(i)?E(i.visibility):E(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Ie extends J{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new ee(e,t,i)}}var Ae=i(33108),Me=i(23193),Re=i(38819),Oe=i(39282),Pe=i(5606),Fe=i(72065),Be=i(91847),He=i(89872),We=i(86253),Ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ze=function(e,t){return function(i,n){t(i,n,e)}};const Ue=(0,Fe.yh)("listService");class je{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new l.wD((0,n.dS)(),"").style(We.O2)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),(0,a.F8)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const Ke=new Re.uy("listFocus",!0),qe=new Re.uy("listSupportsMultiselect",!0),$e=Re.Ao.and(Ke,Re.Ao.not(Oe.d0)),Ge=new Re.uy("listHasSelectionOrFocus",!1),Qe=new Re.uy("listDoubleSelection",!1),Ye=new Re.uy("listMultiSelection",!1),Ze=new Re.uy("listSelectionNavigation",!1),Xe=new Re.uy("listSupportsFind",!0),Je=new Re.uy("treeElementCanCollapse",!1),et=new Re.uy("treeElementHasParent",!1),tt=new Re.uy("treeElementCanExpand",!1),it=new Re.uy("treeElementHasChild",!1),nt=new Re.uy("treeFindOpen",!1),ot="listTypeNavigationMode",st="listAutomaticKeyboardNavigation";function rt(e,t){const i=e.createScoped(t.getHTMLElement());return Ke.bindTo(i),i}const at="workbench.list.multiSelectModifier",lt="workbench.list.openMode",ct="workbench.list.horizontalScrolling",ht="workbench.list.defaultFindMode",dt="workbench.list.typeNavigationMode",ut="workbench.list.keyboardNavigation",gt="workbench.list.scrollByPage",pt="workbench.list.defaultFindMatchType",mt="workbench.tree.indent",ft="workbench.tree.renderIndentGuides",_t="workbench.list.smoothScrolling",vt="workbench.list.mouseWheelScrollSensitivity",bt="workbench.list.fastScrollSensitivity",Ct="workbench.tree.expandMode";function yt(e){return"alt"===e.getValue(at)}class wt extends a.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=yt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(at)&&(this.useAltAsMultipleSelectionModifier=yt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,l.wn)(e)}}function St(e,t){var i;const n=e.get(Ae.Ui),o=e.get(Be.d),s=new a.SL;return[Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>o.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(n.getValue(_t)),mouseWheelScrollSensitivity:n.getValue(vt),fastScrollSensitivity:n.getValue(bt),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new wt(n)),keyboardNavigationEventFilter:It(o),scrollByPage:Boolean(n.getValue(gt))}),s]}let kt=class extends l.aV{constructor(e,t,i,n,o,s,r,a,l){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(ct)),[h,d]=l.invokeFunction(St,o);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},h),{horizontalScrolling:c})),this.disposables.add(d),this.contextKeyService=rt(s,this),this.listSupportsMultiSelect=qe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Ze.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=Ge.bindTo(this.contextKeyService),this.listDoubleSelection=Qe.bindTo(this.contextKeyService),this.listMultiSelection=Ye.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=yt(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(at)&&(this._useAltAsMultipleSelectionModifier=yt(a));let t={};if(e.affectsConfiguration(ct)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(ct));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(gt)){const e=Boolean(a.getValue(gt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(_t)){const e=Boolean(a.getValue(_t));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(vt)){const e=a.getValue(vt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(bt)){const e=a.getValue(bt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Nt(this,Object.assign({configurationService:a},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,We.TU)(e):We.O2)}};kt=Ve([ze(5,Re.i6),ze(6,Ue),ze(7,Ae.Ui),ze(8,Fe.TG)],kt);let xt=class extends class{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new c(e,s)));this.list=new l.aV(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new h(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}{constructor(e,t,i,n,o,s,r,l,c){const h=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(ct)),[d,u]=c.invokeFunction(St,o);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables=new a.SL,this.disposables.add(u),this.contextKeyService=rt(s,this),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=qe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Ze.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=yt(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(at)&&(this._useAltAsMultipleSelectionModifier=yt(l));let t={};if(e.affectsConfiguration(ct)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(ct));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(gt)){const e=Boolean(l.getValue(gt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(_t)){const e=Boolean(l.getValue(_t));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(vt)){const e=l.getValue(vt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(bt)){const e=l.getValue(bt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Nt(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,We.TU)(e):We.O2)}dispose(){this.disposables.dispose(),super.dispose()}};xt=Ve([ze(5,Re.i6),ze(6,Ue),ze(7,Ae.Ui),ze(8,Fe.TG)],xt);let Lt=class extends p{constructor(e,t,i,n,o,s,r,a,l,c){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(ct)),[d,u]=c.invokeFunction(St,s);super(e,t,i,n,o,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:h})),this.disposables.add(u),this.contextKeyService=rt(r,this),this.listSupportsMultiSelect=qe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Ze.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=Ge.bindTo(this.contextKeyService),this.listDoubleSelection=Qe.bindTo(this.contextKeyService),this.listMultiSelection=Ye.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=yt(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(at)&&(this._useAltAsMultipleSelectionModifier=yt(l));let t={};if(e.affectsConfiguration(ct)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(ct));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(gt)){const e=Boolean(l.getValue(gt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(_t)){const e=Boolean(l.getValue(_t));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(vt)){const e=l.getValue(vt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(bt)){const e=l.getValue(bt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Dt(this,Object.assign({configurationService:l},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,We.TU)(e):We.O2)}dispose(){this.disposables.dispose(),super.dispose()}};Lt=Ve([ze(6,Re.i6),ze(7,Ue),ze(8,Ae.Ui),ze(9,Fe.TG)],Lt);class Et extends a.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new r.Q5),this.onDidOpen=this._onDidOpen.event,this._register(r.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(lt)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(lt)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(lt)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class Nt extends Et{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Dt extends Et{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Tt extends Et{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function It(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return(null==n?void 0:n.enterMultiChord)?(t=!0,!1):(t=!1,!n)}}let At=class extends de{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:h,disposable:d}=s.invokeFunction(Ht,o);super(e,t,i,n,c),this.disposables.add(d),this.internals=new Wt(this,o,h,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};At=Ve([ze(5,Fe.TG),ze(6,Re.i6),ze(7,Ue),ze(8,Ae.Ui)],At);let Mt=class extends ge{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:h,disposable:d}=s.invokeFunction(Ht,o);super(e,t,i,n,c),this.disposables.add(d),this.internals=new Wt(this,o,h,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Mt=Ve([ze(5,Fe.TG),ze(6,Re.i6),ze(7,Ue),ze(8,Ae.Ui)],Mt);let Rt=class extends Ie{constructor(e,t,i,n,o,s,r,a,l,c){const{options:h,getTypeNavigationMode:d,disposable:u}=r.invokeFunction(Ht,s);super(e,t,i,n,o,h),this.disposables.add(u),this.internals=new Wt(this,s,d,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Rt=Ve([ze(6,Fe.TG),ze(7,Re.i6),ze(8,Ue),ze(9,Ae.Ui)],Rt);let Ot=class extends Ee{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,c){const{options:h,getTypeNavigationMode:d,disposable:u}=r.invokeFunction(Ht,s);super(e,t,i,n,o,h),this.disposables.add(u),this.internals=new Wt(this,s,d,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ot=Ve([ze(6,Fe.TG),ze(7,Re.i6),ze(8,Ue),ze(9,Ae.Ui)],Ot);let Pt=class extends Te{constructor(e,t,i,n,o,s,r,a,l,c,h){const{options:d,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(Ht,r);super(e,t,i,n,o,s,d),this.disposables.add(g),this.internals=new Wt(this,r,u,r.overrideStyles,l,c,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Ft(e){const t=e.getValue(ht);if("highlight"===t)return R.Highlight;if("filter"===t)return R.Filter;const i=e.getValue(ut);return"simple"===i||"highlight"===i?R.Highlight:"filter"===i?R.Filter:void 0}function Bt(e){const t=e.getValue(pt);return"fuzzy"===t?O.Fuzzy:"contiguous"===t?O.Contiguous:void 0}function Ht(e,t){var i;const n=e.get(Ae.Ui),o=e.get(Pe.u),s=e.get(Re.i6),r=e.get(Fe.TG),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(ct)),[c,h]=r.invokeFunction(St,t),d=t.additionalScrollHeight;return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(ot);if("automatic"===e)return l.AA.Automatic;if("trigger"===e)return l.AA.Trigger;if(!1===s.getContextKeyValue(st))return l.AA.Trigger;const t=n.getValue(dt);return"automatic"===t?l.AA.Automatic:"trigger"===t?l.AA.Trigger:void 0},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},c),{indent:"number"==typeof n.getValue(mt)?n.getValue(mt):void 0,renderIndentGuides:n.getValue(ft),smoothScrolling:Boolean(n.getValue(_t)),defaultFindMode:Ft(n),defaultFindMatchType:Bt(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(gt)),additionalScrollHeight:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(Ct),contextViewProvider:o,findWidgetStyles:We.uX})}}Pt=Ve([ze(7,Fe.TG),ze(8,Re.i6),ze(9,Ue),ze(10,Ae.Ui)],Pt);let Wt=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=rt(o,e),this.listSupportsMultiSelect=qe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),Ze.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Xe.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=Ge.bindTo(this.contextKeyService),this.hasDoubleSelection=Qe.bindTo(this.contextKeyService),this.hasMultiSelection=Ye.bindTo(this.contextKeyService),this.treeElementCanCollapse=Je.bindTo(this.contextKeyService),this.treeElementHasParent=et.bindTo(this.contextKeyService),this.treeElementCanExpand=tt.bindTo(this.contextKeyService),this.treeElementHasChild=it.bindTo(this.contextKeyService),this.treeFindOpen=nt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=yt(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},c=new Set;c.add(ot),c.add(st),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(at)&&(this._useAltAsMultipleSelectionModifier=yt(r)),n.affectsConfiguration(mt)){const e=r.getValue(mt);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(ft)){const e=r.getValue(ft);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(_t)){const e=Boolean(r.getValue(_t));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(ht)||n.affectsConfiguration(ut)){const e=Ft(r);o=Object.assign(Object.assign({},o),{defaultFindMode:e})}if(n.affectsConfiguration(dt)||n.affectsConfiguration(ut)){const e=i();o=Object.assign(Object.assign({},o),{typeNavigationMode:e})}if(n.affectsConfiguration(pt)){const e=Bt(r);o=Object.assign(Object.assign({},o),{defaultFindMatchType:e})}if(n.affectsConfiguration(ct)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(ct));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(gt)){const e=Boolean(r.getValue(gt));o=Object.assign(Object.assign({},o),{scrollByPage:e})}if(n.affectsConfiguration(Ct)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===r.getValue(Ct)})),n.affectsConfiguration(vt)){const e=r.getValue(vt);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(bt)){const e=r.getValue(bt);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new Tt(e,Object.assign({configurationService:r},t)),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,We.TU)(e):We.O2)}dispose(){this.disposables=(0,a.B9)(this.disposables)}};Wt=Ve([ze(4,Re.i6),ze(5,Ue),ze(6,Ae.Ui)],Wt),He.B.as(Me.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,H.NC)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[at]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,H.NC)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,H.NC)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,H.NC)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[lt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,H.NC)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[ct]:{type:"boolean",default:!1,description:(0,H.NC)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[gt]:{type:"boolean",default:!1,description:(0,H.NC)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[mt]:{type:"number",default:8,minimum:4,maximum:40,description:(0,H.NC)("tree indent setting","Controls tree indentation in pixels.")},[ft]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,H.NC)("render tree indent guides","Controls whether the tree should render indent guides.")},[_t]:{type:"boolean",default:!1,description:(0,H.NC)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[vt]:{type:"number",default:1,markdownDescription:(0,H.NC)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[bt]:{type:"number",default:5,description:(0,H.NC)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[ht]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,H.NC)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,H.NC)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,H.NC)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[ut]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,H.NC)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,H.NC)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,H.NC)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,H.NC)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,H.NC)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[pt]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,H.NC)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,H.NC)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,H.NC)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Ct]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,H.NC)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[dt]:{type:"string",enum:["automatic","trigger"],default:"automatic",description:(0,H.NC)("typeNavigationMode","Controls the how type navigation works in lists and trees in the workbench. When set to 'trigger', type navigation begins once the 'list.triggerTypeNavigation' command is run.")}}})},43557:(e,t,i)=>{"use strict";i.d(t,{VZ:()=>s,in:()=>r,kw:()=>c,qA:()=>h});var n=i(4669),o=i(5976);const s=(0,i(72065).yh)("logService");var r;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(r||(r={}));const a=r.Info;class l extends o.JT{constructor(){super(...arguments),this.level=a,this._onDidChangeLogLevel=this._register(new n.Q5),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==r.Off&&this.level<=e}}class c extends l{constructor(e=a){super(),this.setLevel(e)}trace(e,...t){this.checkLogLevel(r.Trace)&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.checkLogLevel(r.Debug)&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.checkLogLevel(r.Info)&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.checkLogLevel(r.Error)&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class h extends l{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}},98674:(e,t,i)=>{"use strict";i.d(t,{H0:()=>o,ZL:()=>n,lT:()=>l});var n,o,s=i(14603),r=i(63580),a=i(72065);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.NC)("sev.error","Error"),t[e.Warning]=(0,r.NC)("sev.warning","Warning"),t[e.Info]=(0,r.NC)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){const o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,a.yh)("markerService")},59422:(e,t,i)=>{"use strict";i.d(t,{EO:()=>a,lT:()=>r,zb:()=>s});var n=i(14603),o=i(72065),s=n.Z;const r=(0,o.yh)("notificationService");class a{}},50988:(e,t,i)=>{"use strict";i.d(t,{Gs:()=>a,v4:()=>s,xI:()=>l,xn:()=>r});var n=i(97295),o=i(70666);const s=(0,i(72065).yh)("openerService");function r(e,t){return o.o.isUri(e)?(0,n.qq)(e.scheme,t):(0,n.ok)(e,t+":")}function a(e,...t){return t.some((t=>r(e,t)))}function l(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},90535:(e,t,i)=>{"use strict";i.d(t,{Ex:()=>s,R9:()=>o,ek:()=>r});var n=i(72065);const o=(0,n.yh)("progressService");Object.freeze({total(){},worked(){},done(){}});class s{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}s.None=Object.freeze({report(){}});const r=(0,n.yh)("editorProgressService")},90725:(e,t,i)=>{"use strict";i.d(t,{IP:()=>a,Ry:()=>n});var n,o=i(9488),s=i(5976),r=i(89872);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},41157:(e,t,i)=>{"use strict";i.d(t,{eJ:()=>s,jG:()=>o.jG});var n=i(72065),o=i(67746);const s=(0,n.yh)("quickInputService")},89872:(e,t,i)=>{"use strict";i.d(t,{B:()=>s});var n=i(35146),o=i(98401);const s=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},26904:(e,t,i)=>{"use strict";i.d(t,{Uy:()=>p,vm:()=>_,fk:()=>m});var n,o,s=i(4669),r=i(5976),a=i(98401),l=i(15393),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(o||(o={}));class h extends r.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new s.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=o.None,this.cache=new Map,this.flushDelayer=new l.rH(h.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===o.Closed)return;let i=!1;(0,a.Jp)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return(0,a.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:parseInt(i,10)}set(e,t){return c(this,void 0,void 0,(function*(){if(this.state===o.Closed)return;if((0,a.Jp)(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}delete(e){return c(this,void 0,void 0,(function*(){if(this.state!==o.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return c(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return c(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}h.DEFAULT_FLUSH_DELAY=100;class d{constructor(){this.onDidChangeItemsExternal=s.ju.None,this.items=new Map}updateItems(e){var t,i;return c(this,void 0,void 0,(function*(){null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}))}}var u=i(72065);const g="__$__targetStorageMarker",p=(0,u.yh)("storageService");var m;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(m||(m={}));class f extends r.JT{constructor(e={flushInterval:f.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new s.K3),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new s.K3),this._onWillSaveState=this._register(new s.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(e,t){if(t===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){(0,a.Jp)(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(g,JSON.stringify(s))):"number"==typeof s[e]&&(delete s[e],null===(o=this.getStorage(t))||void 0===o||o.set(g,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}f.DEFAULT_FLUSH_INTERVAL=6e4;class _ extends f{constructor(){super(),this.applicationStorage=this._register(new h(new d,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new h(new d,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new h(new d,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},10829:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=(0,i(72065).yh)("telemetryService")},86253:(e,t,i)=>{"use strict";i.d(t,{BM:()=>C,Hc:()=>m,O2:()=>v,TU:()=>b,ZR:()=>y,b5:()=>g,eO:()=>s,ku:()=>_,pl:()=>p,uX:()=>f,wG:()=>u});var n=i(73910),o=i(41264);const s=(r={},{keybindingLabelBackground:(0,n.n_1)(null!==(a=r.keybindingLabelBackground)&&void 0!==a?a:n.oQ$),keybindingLabelForeground:(0,n.n_1)(null!==(l=r.keybindingLabelForeground)&&void 0!==l?l:n.lWp),keybindingLabelBorder:(0,n.n_1)(null!==(c=r.keybindingLabelBorder)&&void 0!==c?c:n.AWI),keybindingLabelBottomBorder:(0,n.n_1)(null!==(h=r.keybindingLabelBottomBorder)&&void 0!==h?h:n.K19),keybindingLabelShadow:(0,n.n_1)(null!==(d=r.keybindingLabelShadow)&&void 0!==d?d:n.rh)});var r,a,l,c,h,d;const u=function(e){var t,i,o,s,r,a,l,c;return{buttonForeground:(0,n.n_1)(null!==(t=e.buttonForeground)&&void 0!==t?t:n.j5u),buttonSeparator:(0,n.n_1)(null!==(i=e.buttonSeparator)&&void 0!==i?i:n.iFQ),buttonBackground:(0,n.n_1)(null!==(o=e.buttonBackground)&&void 0!==o?o:n.b7$),buttonHoverBackground:(0,n.n_1)(null!==(s=e.buttonHoverBackground)&&void 0!==s?s:n.GO4),buttonSecondaryForeground:(0,n.n_1)(null!==(r=e.buttonSecondaryForeground)&&void 0!==r?r:n.qBU),buttonSecondaryBackground:(0,n.n_1)(null!==(a=e.buttonSecondaryBackground)&&void 0!==a?a:n.ESD),buttonSecondaryHoverBackground:(0,n.n_1)(null!==(l=e.buttonSecondaryHoverBackground)&&void 0!==l?l:n.xEn),buttonBorder:(0,n.n_1)(null!==(c=e.buttonBorder)&&void 0!==c?c:n.GYc)}}({}),g=function(e){var t;return{progressBarBackground:(0,n.n_1)(null!==(t={}.progressBarBackground)&&void 0!==t?t:n.zRJ)}}(),p=function(e){var t,i,o;return{inputActiveOptionBorder:(0,n.n_1)(null!==(t=e.inputActiveOptionBorder)&&void 0!==t?t:n.PRb),inputActiveOptionForeground:(0,n.n_1)(null!==(i=e.inputActiveOptionForeground)&&void 0!==i?i:n.Pvw),inputActiveOptionBackground:(0,n.n_1)(null!==(o=e.inputActiveOptionBackground)&&void 0!==o?o:n.XEs)}}({});!function(e){var t,i,o;(0,n.n_1)(null!==(t=e.checkboxBackground)&&void 0!==t?t:n.SUp),(0,n.n_1)(null!==(i=e.checkboxBorder)&&void 0!==i?i:n.nd),(0,n.n_1)(null!==(o=e.checkboxForeground)&&void 0!==o?o:n.BQ0)}({}),function(e){var t,i,o,s,r,a,l,c;(0,n.n_1)(null!==(t=e.dialogBackground)&&void 0!==t?t:n.D0T),(0,n.n_1)(null!==(i=e.dialogForeground)&&void 0!==i?i:n.Hfx),(0,n.n_1)(null!==(o=e.dialogShadow)&&void 0!==o?o:n.rh),(0,n.n_1)(null!==(s=e.dialogBorder)&&void 0!==s?s:n.lRK),(0,n.n_1)(null!==(r=e.errorIconForeground)&&void 0!==r?r:n.JpG),(0,n.n_1)(null!==(a=e.warningIconForeground)&&void 0!==a?a:n.BOY),(0,n.n_1)(null!==(l=e.infoIconForeground)&&void 0!==l?l:n.OLZ),(0,n.n_1)(null!==(c=e.textLinkForeground)&&void 0!==c?c:n.url)}({});const m=function(e){var t,i,o,s,r,a,l,c,h,d,u,g;return{inputBackground:(0,n.n_1)(null!==(t=e.inputBackground)&&void 0!==t?t:n.sEe),inputForeground:(0,n.n_1)(null!==(i=e.inputForeground)&&void 0!==i?i:n.zJb),inputBorder:(0,n.n_1)(null!==(o=e.inputBorder)&&void 0!==o?o:n.dt_),inputValidationInfoBorder:(0,n.n_1)(null!==(s=e.inputValidationInfoBorder)&&void 0!==s?s:n.EPQ),inputValidationInfoBackground:(0,n.n_1)(null!==(r=e.inputValidationInfoBackground)&&void 0!==r?r:n._lC),inputValidationInfoForeground:(0,n.n_1)(null!==(a=e.inputValidationInfoForeground)&&void 0!==a?a:n.YI3),inputValidationWarningBorder:(0,n.n_1)(null!==(l=e.inputValidationWarningBorder)&&void 0!==l?l:n.C3g),inputValidationWarningBackground:(0,n.n_1)(null!==(c=e.inputValidationWarningBackground)&&void 0!==c?c:n.RV_),inputValidationWarningForeground:(0,n.n_1)(null!==(h=e.inputValidationWarningForeground)&&void 0!==h?h:n.SUG),inputValidationErrorBorder:(0,n.n_1)(null!==(d=e.inputValidationErrorBorder)&&void 0!==d?d:n.OZR),inputValidationErrorBackground:(0,n.n_1)(null!==(u=e.inputValidationErrorBackground)&&void 0!==u?u:n.paE),inputValidationErrorForeground:(0,n.n_1)(null!==(g=e.inputValidationErrorForeground)&&void 0!==g?g:n._t9)}}({}),f={listFilterWidgetBackground:(0,n.n_1)(n.vGG),listFilterWidgetOutline:(0,n.n_1)(n.oSI),listFilterWidgetNoMatchesOutline:(0,n.n_1)(n.Saq),listFilterWidgetShadow:(0,n.n_1)(n.y65),inputBoxStyles:m,toggleStyles:p},_=function(e){var t,i;return{badgeBackground:(0,n.n_1)(null!==(t=e.badgeBackground)&&void 0!==t?t:n.g8u),badgeForeground:(0,n.n_1)(null!==(i=e.badgeForeground)&&void 0!==i?i:n.qeD),badgeBorder:(0,n.n_1)(n.lRK)}}({});!function(e){var t,i,o,s,r;(0,n.n_1)(null!==(t=e.breadcrumbsBackground)&&void 0!==t?t:n.ixd),(0,n.n_1)(null!==(i=e.breadcrumbsForeground)&&void 0!==i?i:n.l80),(0,n.n_1)(null!==(o=e.breadcrumbsFocusForeground)&&void 0!==o?o:n.H6q),(0,n.n_1)(null!==(s=e.breadcrumbsFocusForeground)&&void 0!==s?s:n.H6q),(0,n.n_1)(null!==(r=e.breadcrumbsFocusAndSelectionForeground)&&void 0!==r?r:n.fSI)}({});const v=b({});function b(e){var t,i,o,s,r,a,l,c,h,d,u,g,p,m,f,_,v,b,C,y,w,S,k;return{listBackground:e.listBackground?(0,n.n_1)(e.listBackground):void 0,listInactiveFocusForeground:e.listInactiveFocusForeground?(0,n.n_1)(e.listInactiveFocusForeground):void 0,listFocusBackground:(0,n.n_1)(null!==(t=e.listFocusBackground)&&void 0!==t?t:n._bK),listFocusForeground:(0,n.n_1)(null!==(i=e.listFocusForeground)&&void 0!==i?i:n._2n),listFocusOutline:(0,n.n_1)(null!==(o=e.listFocusOutline)&&void 0!==o?o:n.Oop),listActiveSelectionBackground:(0,n.n_1)(null!==(s=e.listActiveSelectionBackground)&&void 0!==s?s:n.dCr),listActiveSelectionForeground:(0,n.n_1)(null!==(r=e.listActiveSelectionForeground)&&void 0!==r?r:n.M6C),listActiveSelectionIconForeground:(0,n.n_1)(null!==(a=e.listActiveSelectionIconForeground)&&void 0!==a?a:n.Tnx),listFocusAndSelectionOutline:(0,n.n_1)(null!==(l=e.listFocusAndSelectionOutline)&&void 0!==l?l:n.Bqu),listFocusAndSelectionBackground:(0,n.n_1)(null!==(c=e.listFocusAndSelectionBackground)&&void 0!==c?c:n.dCr),listFocusAndSelectionForeground:(0,n.n_1)(null!==(h=e.listFocusAndSelectionForeground)&&void 0!==h?h:n.M6C),listInactiveSelectionBackground:(0,n.n_1)(null!==(d=e.listInactiveSelectionBackground)&&void 0!==d?d:n.rg2),listInactiveSelectionIconForeground:(0,n.n_1)(null!==(u=e.listInactiveSelectionIconForeground)&&void 0!==u?u:n.kvU),listInactiveSelectionForeground:(0,n.n_1)(null!==(g=e.listInactiveSelectionForeground)&&void 0!==g?g:n.ytC),listInactiveFocusBackground:(0,n.n_1)(null!==(p=e.listInactiveFocusBackground)&&void 0!==p?p:n.s$),listInactiveFocusOutline:(0,n.n_1)(null!==(m=e.listInactiveFocusOutline)&&void 0!==m?m:n.F3d),listHoverBackground:(0,n.n_1)(null!==(f=e.listHoverBackground)&&void 0!==f?f:n.mV1),listHoverForeground:(0,n.n_1)(null!==(_=e.listHoverForeground)&&void 0!==_?_:n.$d5),listDropBackground:(0,n.n_1)(null!==(v=e.listDropBackground)&&void 0!==v?v:n.AS1),listSelectionOutline:(0,n.n_1)(null!==(b=e.listSelectionOutline)&&void 0!==b?b:n.xL1),listHoverOutline:(0,n.n_1)(null!==(C=e.listHoverOutline)&&void 0!==C?C:n.xL1),treeIndentGuidesStroke:(0,n.n_1)(null!==(y=e.treeIndentGuidesStroke)&&void 0!==y?y:n.UnT),treeInactiveIndentGuidesStroke:(0,n.n_1)(null!==(w=e.treeInactiveIndentGuidesStroke)&&void 0!==w?w:n.KjV),tableColumnsBorder:(0,n.n_1)(null!==(S=e.tableColumnsBorder)&&void 0!==S?S:n.uxu),tableOddRowsBackgroundColor:(0,n.n_1)(null!==(k=e.tableOddRowsBackgroundColor)&&void 0!==k?k:n.EQn)}}const C=function(e){var t;return{selectBackground:(0,n.n_1)(e.selectBackground||n.XV0),selectListBackground:(0,n.n_1)(e.selectListBackground||n.Fgs),selectForeground:(0,n.n_1)(e.selectForeground||n._g0),decoratorRightForeground:(0,n.n_1)(e.decoratorRightForeground||n.kJk),selectBorder:(0,n.n_1)(e.selectBorder||n.a9O),focusBorder:(0,n.n_1)(e.focusBorder||n.R80),listFocusBackground:(0,n.n_1)(e.listFocusBackground||n.Vqd),listInactiveSelectionIconForeground:(0,n.n_1)(e.listInactiveSelectionIconForeground||n.cbQ),listFocusForeground:(0,n.n_1)(e.listFocusForeground||n.NPS),listFocusOutline:(0,n.BtC)(null!==(t=e.listFocusOutline)&&void 0!==t?t:n.xL1,o.Il.transparent.toString()),listHoverBackground:(0,n.n_1)(e.listHoverBackground||n.mV1),listHoverForeground:(0,n.n_1)(e.listHoverForeground||n.$d5),listHoverOutline:(0,n.n_1)(e.listFocusOutline||n.xL1),selectListBorder:(0,n.n_1)(e.selectListBorder||n.D1_),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0}}({}),y=function(e){var t,i,o,s,r,a,l,c,h,d,u,g;return{shadowColor:(0,n.n_1)(null!==(t=e.shadowColor)&&void 0!==t?t:n.rh),borderColor:(0,n.n_1)(null!==(i=e.borderColor)&&void 0!==i?i:n.Cdg),foregroundColor:(0,n.n_1)(null!==(o=e.foregroundColor)&&void 0!==o?o:n.DEr),backgroundColor:(0,n.n_1)(null!==(s=e.backgroundColor)&&void 0!==s?s:n.Hz8),selectionForegroundColor:(0,n.n_1)(null!==(r=e.selectionForegroundColor)&&void 0!==r?r:n.jbW),selectionBackgroundColor:(0,n.n_1)(null!==(a=e.selectionBackgroundColor)&&void 0!==a?a:n.$DX),selectionBorderColor:(0,n.n_1)(null!==(l=e.selectionBorderColor)&&void 0!==l?l:n.E3h),separatorColor:(0,n.n_1)(null!==(c=e.separatorColor)&&void 0!==c?c:n.ZGJ),scrollbarShadow:(0,n.n_1)(null!==(h=e.scrollbarShadow)&&void 0!==h?h:n._wn),scrollbarSliderBackground:(0,n.n_1)(null!==(d=e.scrollbarSliderBackground)&&void 0!==d?d:n.etL),scrollbarSliderHoverBackground:(0,n.n_1)(null!==(u=e.scrollbarSliderHoverBackground)&&void 0!==u?u:n.ABB),scrollbarSliderActiveBackground:(0,n.n_1)(null!==(g=e.scrollbarSliderActiveBackground)&&void 0!==g?g:n.ynu)}}({})},73910:(e,t,i)=>{"use strict";i.d(t,{$DX:()=>Ft,$d5:()=>ut,A42:()=>k,ABB:()=>ie,AS1:()=>gt,AWI:()=>xe,BOY:()=>ci,BQ0:()=>Et,Bqu:()=>it,BtC:()=>u,C3g:()=>P,CNo:()=>Be,Cdg:()=>Mt,CzK:()=>qe,D0T:()=>pe,D1_:()=>fe,DEr:()=>Rt,Dut:()=>de,E3h:()=>Bt,EPQ:()=>M,EQn:()=>xt,ES4:()=>De,ESD:()=>Y,EiJ:()=>Oe,F3d:()=>ht,F9q:()=>Ze,Fgs:()=>V,Fm_:()=>Jt,GO4:()=>$,GYc:()=>G,Gj_:()=>oi,Gwp:()=>pt,H6q:()=>Ut,HCL:()=>je,Hfx:()=>me,Hz8:()=>Ot,IPX:()=>g,IYc:()=>ii,Ido:()=>_,Itd:()=>ai,Ivo:()=>si,JpG:()=>li,K19:()=>Le,KjV:()=>St,L_t:()=>Xe,M6C:()=>ot,MUv:()=>Ae,NOs:()=>ge,NPS:()=>Tt,Ng6:()=>_e,OLZ:()=>hi,OZR:()=>H,Oop:()=>tt,P4M:()=>Qe,P6G:()=>m,P6Y:()=>Ye,PRb:()=>N,PX0:()=>mt,PpC:()=>Ve,Pvw:()=>T,QO2:()=>h,R80:()=>b,RV_:()=>R,Rzx:()=>Te,SPM:()=>ei,SUG:()=>O,SUY:()=>ti,SUp:()=>Lt,Saq:()=>Ct,T83:()=>he,Tnx:()=>st,UnT:()=>wt,VVv:()=>We,Vqd:()=>At,XEs:()=>D,XV0:()=>W,XZx:()=>v,YI3:()=>A,ZGJ:()=>Ht,ZnX:()=>gi,_2n:()=>et,_Yy:()=>He,_bK:()=>Je,_g0:()=>z,_lC:()=>I,_t9:()=>B,_wn:()=>ee,a9O:()=>U,b6y:()=>re,b7$:()=>q,bKB:()=>Ue,c63:()=>ce,cbQ:()=>It,cvW:()=>ue,dCr:()=>nt,dRz:()=>f,dt_:()=>E,etL:()=>te,fSI:()=>jt,g8u:()=>X,gkn:()=>Pe,hEj:()=>Ee,hX8:()=>ze,iFQ:()=>K,ixd:()=>zt,j5u:()=>j,jUe:()=>Me,jbW:()=>Pt,kJk:()=>ye,kVY:()=>ri,keg:()=>$e,kvU:()=>lt,kwl:()=>pi,l80:()=>Vt,lRK:()=>C,lUq:()=>Wt,lWp:()=>ke,lXJ:()=>se,loF:()=>Ce,mV1:()=>dt,n_1:()=>d,nd:()=>Nt,nyM:()=>Ie,oQ$:()=>Se,oSI:()=>bt,opG:()=>we,ov3:()=>ni,pW3:()=>le,paE:()=>F,phM:()=>Ke,pnM:()=>Re,qBU:()=>Q,qeD:()=>J,rg2:()=>rt,rh:()=>S,s$:()=>ct,sEe:()=>x,tZ6:()=>be,uoC:()=>ae,url:()=>w,uxu:()=>kt,vGG:()=>vt,xEn:()=>Z,xL1:()=>y,y65:()=>yt,yJx:()=>Fe,yb5:()=>Ne,ynu:()=>ne,ypS:()=>Ge,ytC:()=>at,zJb:()=>L,zKr:()=>ve,zRJ:()=>oe});var n=i(15393),o=i(41264),s=i(4669),r=i(35146),a=i(63580),l=i(81294),c=i(89872);function h(e){return`--vscode-${e.replace(/\./g,"-")}`}function d(e){return`var(${h(e)})`}function u(e,t){return`var(${h(e)}, ${t})`}const g={ColorContribution:"base.contributions.colors"},p=new class{constructor(){this._onDidChangeSchema=new s.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return fi(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function m(e,t,i,n,o){return p.registerColor(e,(null===(s=t)||void 0===s.hcLight&&(null===s.hcDark||"string"==typeof s.hcDark?s.hcLight=s.hcDark:s.hcLight=s.light),s),i,n,o);var s}c.B.add(g.ColorContribution,p);const f=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("foreground","Overall foreground color. This color is only used if not overridden by a component.")),_=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},a.NC("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."))),v=(m("descriptionForeground",{light:"#717171",dark:gi(f,.7),hcDark:gi(f,.7),hcLight:gi(f,.7)},a.NC("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("iconForeground","The default color for icons in the workbench."))),b=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},a.NC("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),C=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},a.NC("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),y=m("contrastActiveBorder",{light:null,dark:null,hcDark:b,hcLight:b},a.NC("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),w=(m("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Il.black,hcLight:"#292929"},a.NC("textSeparatorForeground","Color for text separators.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkForeground","Foreground color for links in text."))),S=(m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},a.NC("textPreformatForeground","Foreground color for preformatted text segments.")),m("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},a.NC("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Il.white,hcLight:"#292929"},a.NC("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Il.black,hcLight:"#F2F2F2"},a.NC("textCodeBlockBackground","Background color for code blocks in text.")),m("widget.shadow",{dark:gi(o.Il.black,.36),light:gi(o.Il.black,.16),hcDark:null,hcLight:null},a.NC("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),k=m("widget.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("widgetBorder","Border color of widgets such as find/replace inside the editor.")),x=m("input.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputBoxBackground","Input box background.")),L=m("input.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("inputBoxForeground","Input box foreground.")),E=m("input.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("inputBoxBorder","Input box border.")),N=m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:C,hcLight:C},a.NC("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),D=(m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("inputOption.hoverBackground","Background color of activated options in input fields.")),m("inputOption.activeBackground",{dark:gi(b,.4),light:gi(b,.2),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("inputOption.activeBackground","Background hover color of options in input fields."))),T=m("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hcDark:f,hcLight:f},a.NC("inputOption.activeForeground","Foreground color of activated options in input fields.")),I=(m("input.placeholderForeground",{light:gi(f,.5),dark:gi(f,.5),hcDark:gi(f,.7),hcLight:gi(f,.7)},a.NC("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationInfoBackground","Input validation background color for information severity."))),A=m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationInfoForeground","Input validation foreground color for information severity.")),M=m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:C,hcLight:C},a.NC("inputValidationInfoBorder","Input validation border color for information severity.")),R=m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationWarningBackground","Input validation background color for warning severity.")),O=m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationWarningForeground","Input validation foreground color for warning severity.")),P=m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:C,hcLight:C},a.NC("inputValidationWarningBorder","Input validation border color for warning severity.")),F=m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationErrorBackground","Input validation background color for error severity.")),B=m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationErrorForeground","Input validation foreground color for error severity.")),H=m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:C,hcLight:C},a.NC("inputValidationErrorBorder","Input validation border color for error severity.")),W=m("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownBackground","Dropdown background.")),V=m("dropdown.listBackground",{dark:null,light:null,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownListBackground","Dropdown list background.")),z=m("dropdown.foreground",{dark:"#F0F0F0",light:f,hcDark:o.Il.white,hcLight:f},a.NC("dropdownForeground","Dropdown foreground.")),U=m("dropdown.border",{dark:W,light:"#CECECE",hcDark:C,hcLight:C},a.NC("dropdownBorder","Dropdown border.")),j=m("button.foreground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:o.Il.white},a.NC("buttonForeground","Button foreground color.")),K=m("button.separator",{dark:gi(j,.4),light:gi(j,.4),hcDark:gi(j,.4),hcLight:gi(j,.4)},a.NC("buttonSeparator","Button separator color.")),q=m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},a.NC("buttonBackground","Button background color.")),$=m("button.hoverBackground",{dark:ui(q,.2),light:di(q,.2),hcDark:q,hcLight:q},a.NC("buttonHoverBackground","Button background color when hovering.")),G=m("button.border",{dark:C,light:C,hcDark:C,hcLight:C},a.NC("buttonBorder","Button border color.")),Q=m("button.secondaryForeground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:f},a.NC("buttonSecondaryForeground","Secondary button foreground color.")),Y=m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Il.white},a.NC("buttonSecondaryBackground","Secondary button background color.")),Z=m("button.secondaryHoverBackground",{dark:ui(Y,.2),light:di(Y,.2),hcDark:null,hcLight:null},a.NC("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),X=m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Il.black,hcLight:"#0F4A85"},a.NC("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),J=m("badge.foreground",{dark:o.Il.white,light:"#333",hcDark:o.Il.white,hcLight:o.Il.white},a.NC("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),ee=m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},a.NC("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),te=m("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hcDark:gi(C,.6),hcLight:gi(C,.4)},a.NC("scrollbarSliderBackground","Scrollbar slider background color.")),ie=m("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hcDark:gi(C,.8),hcLight:gi(C,.8)},a.NC("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),ne=m("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hcDark:C,hcLight:C},a.NC("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),oe=m("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hcDark:C,hcLight:C},a.NC("progressBarBackground","Background color of the progress bar that can show for long running operations.")),se=(m("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("editorError.foreground","Foreground color of error squigglies in the editor."))),re=m("editorError.border",{dark:null,light:null,hcDark:o.Il.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},a.NC("errorBorder","Border color of error boxes in the editor.")),ae=(m("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD37",hcLight:"#895503"},a.NC("editorWarning.foreground","Foreground color of warning squigglies in the editor."))),le=m("editorWarning.border",{dark:null,light:null,hcDark:o.Il.fromHex("#FFCC00").transparent(.8),hcLight:"#"},a.NC("warningBorder","Border color of warning boxes in the editor.")),ce=(m("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},a.NC("editorInfo.foreground","Foreground color of info squigglies in the editor."))),he=m("editorInfo.border",{dark:null,light:null,hcDark:o.Il.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},a.NC("infoBorder","Border color of info boxes in the editor.")),de=m("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},a.NC("editorHint.foreground","Foreground color of hint squigglies in the editor.")),ue=(m("editorHint.border",{dark:null,light:null,hcDark:o.Il.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},a.NC("hintBorder","Border color of hint boxes in the editor.")),m("sash.hoverBorder",{dark:b,light:b,hcDark:b,hcLight:b},a.NC("sashActiveBorder","Border color of active sashes.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("editorBackground","Editor background color."))),ge=m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Il.white,hcLight:f},a.NC("editorForeground","Editor default foreground color.")),pe=(m("editorStickyScroll.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("editorStickyScrollBackground","Sticky scroll background color for the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Il.white},a.NC("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),me=m("editorWidget.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),fe=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:C,hcLight:C},a.NC("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),_e=m("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ve=m("quickInput.background",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),be=m("quickInput.foreground",{dark:me,light:me,hcDark:me,hcLight:me},a.NC("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Ce=m("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hcDark:"#000000",hcLight:o.Il.white},a.NC("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ye=m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupForeground","Quick picker color for grouping labels.")),we=m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupBorder","Quick picker color for grouping borders.")),Se=m("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ke=m("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hcDark:o.Il.white,hcLight:f},a.NC("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),xe=m("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:C},a.NC("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Le=m("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:f},a.NC("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Ee=m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},a.NC("editorSelectionBackground","Color of the editor selection.")),Ne=m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Il.white},a.NC("editorSelectionForeground","Color of the selected text for high contrast.")),De=m("editor.inactiveSelectionBackground",{light:gi(Ee,.5),dark:gi(Ee,.5),hcDark:gi(Ee,.7),hcLight:gi(Ee,.5)},a.NC("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Te=m("editor.selectionHighlightBackground",{light:mi(Ee,ue,.3,.6),dark:mi(Ee,ue,.3,.6),hcDark:null,hcLight:null},a.NC("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=(m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:y,hcLight:y},a.NC("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},a.NC("editorFindMatch","Color of the current search match."))),Ae=m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},a.NC("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Me=m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},a.NC("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Re=m("editor.findMatchBorder",{light:null,dark:null,hcDark:y,hcLight:y},a.NC("editorFindMatchBorder","Border color of the current search match.")),Oe=m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:y,hcLight:y},a.NC("findMatchHighlightBorder","Border color of the other search matches.")),Pe=m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:gi(y,.4),hcLight:gi(y,.4)},a.NC("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Fe=(m("searchEditor.findMatchBackground",{light:gi(Ae,.66),dark:gi(Ae,.66),hcDark:Ae,hcLight:Ae},a.NC("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:gi(Oe,.66),dark:gi(Oe,.66),hcDark:Oe,hcLight:Oe},a.NC("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},a.NC("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("hoverBackground","Background color of the editor hover."))),Be=(m("editorHoverWidget.foreground",{light:me,dark:me,hcDark:me,hcLight:me},a.NC("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",{light:fe,dark:fe,hcDark:fe,hcLight:fe},a.NC("hoverBorder","Border color of the editor hover."))),He=(m("editorHoverWidget.statusBarBackground",{dark:ui(Fe,.2),light:di(Fe,.05),hcDark:pe,hcLight:pe},a.NC("statusBarBackground","Background color of the editor hover status bar.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hcDark:o.Il.cyan,hcLight:"#292929"},a.NC("activeLinkForeground","Color of active links."))),We=m("editorInlayHint.foreground",{dark:J,light:J,hcDark:o.Il.black,hcLight:J},a.NC("editorInlayHintForeground","Foreground color of inline hints")),Ve=m("editorInlayHint.background",{dark:gi(X,.8),light:gi(X,.6),hcDark:"#f38518",hcLight:X},a.NC("editorInlayHintBackground","Background color of inline hints")),ze=m("editorInlayHint.typeForeground",{dark:We,light:We,hcDark:We,hcLight:We},a.NC("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Ue=m("editorInlayHint.typeBackground",{dark:Ve,light:Ve,hcDark:Ve,hcLight:Ve},a.NC("editorInlayHintBackgroundTypes","Background color of inline hints for types")),je=m("editorInlayHint.parameterForeground",{dark:We,light:We,hcDark:We,hcLight:We},a.NC("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Ke=m("editorInlayHint.parameterBackground",{dark:Ve,light:Ve,hcDark:Ve,hcLight:Ve},a.NC("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),qe=(m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},a.NC("editorLightBulbForeground","The color used for the lightbulb actions icon.")),m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.NC("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new o.Il(new o.VS(155,185,85,.2))),$e=new o.Il(new o.VS(255,0,0,.2)),Ge=m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},a.NC("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Qe=m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},a.NC("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Ye=(m("diffEditor.insertedLineBackground",{dark:qe,light:qe,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:$e,light:$e,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),Ze=m("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),Xe=(m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},a.NC("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},a.NC("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},a.NC("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."))),Je=m("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),et=m("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=m("list.focusOutline",{dark:b,light:b,hcDark:y,hcLight:y},a.NC("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),it=m("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),nt=m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ot=m("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hcDark:null,hcLight:null},a.NC("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),st=m("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),rt=m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),at=m("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),lt=m("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ct=m("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ht=m("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),dt=m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listHoverBackground","List/Tree background when hovering over items using the mouse.")),ut=m("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),gt=m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},a.NC("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),pt=m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:b,hcLight:b},a.NC("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),mt=m("list.focusHighlightForeground",{dark:pt,light:(ft=nt,_t=pt,"#BBE7FF",{op:5,if:ft,then:_t,else:"#BBE7FF"}),hcDark:pt,hcLight:pt},a.NC("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var ft,_t;m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},a.NC("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},a.NC("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},a.NC("listWarningForeground","Foreground color of list items containing warnings."));const vt=m("listFilterWidget.background",{light:di(pe,0),dark:ui(pe,0),hcDark:pe,hcLight:pe},a.NC("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),bt=m("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hcDark:"#f38518",hcLight:"#007ACC"},a.NC("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Ct=m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:C,hcLight:C},a.NC("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),yt=m("listFilterWidget.shadow",{dark:S,light:S,hcDark:S,hcLight:S},a.NC("listFilterWidgetShadow","Shadown color of the type filter widget in lists and trees.")),wt=(m("list.filterMatchBackground",{dark:Ae,light:Ae,hcDark:null,hcLight:null},a.NC("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Oe,light:Oe,hcDark:C,hcLight:y},a.NC("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},a.NC("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),St=m("tree.inactiveIndentGuidesStroke",{dark:gi(wt,.4),light:gi(wt,.4),hcDark:gi(wt,.4),hcLight:gi(wt,.4)},a.NC("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),kt=m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},a.NC("tableColumnsBorder","Table border color between columns.")),xt=m("tree.tableOddRowsBackground",{dark:gi(f,.04),light:gi(f,.04),hcDark:null,hcLight:null},a.NC("tableOddRowsBackgroundColor","Background color for odd table rows.")),Lt=(m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},a.NC("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),m("checkbox.background",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("checkbox.background","Background color of checkbox widget."))),Et=(m("checkbox.selectBackground",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",{dark:z,light:z,hcDark:z,hcLight:z},a.NC("checkbox.foreground","Foreground color of checkbox widget."))),Nt=m("checkbox.border",{dark:U,light:U,hcDark:U,hcLight:U},a.NC("checkbox.border","Border color of checkbox widget.")),Dt=(m("checkbox.selectBorder",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,a.NC("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead"))),Tt=m("quickInputList.focusForeground",{dark:ot,light:ot,hcDark:ot,hcLight:ot},a.NC("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),It=m("quickInputList.focusIconForeground",{dark:st,light:st,hcDark:st,hcLight:st},a.NC("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),At=m("quickInputList.focusBackground",{dark:pi(Dt,nt),light:pi(Dt,nt),hcDark:null,hcLight:null},a.NC("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Mt=m("menu.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("menuBorder","Border color of menus.")),Rt=m("menu.foreground",{dark:z,light:z,hcDark:z,hcLight:z},a.NC("menuForeground","Foreground color of menu items.")),Ot=m("menu.background",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("menuBackground","Background color of menu items.")),Pt=m("menu.selectionForeground",{dark:ot,light:ot,hcDark:ot,hcLight:ot},a.NC("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Ft=m("menu.selectionBackground",{dark:nt,light:nt,hcDark:nt,hcLight:nt},a.NC("menuSelectionBackground","Background color of the selected menu item in menus.")),Bt=m("menu.selectionBorder",{dark:null,light:null,hcDark:y,hcLight:y},a.NC("menuSelectionBorder","Border color of the selected menu item in menus.")),Ht=m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:C,hcLight:C},a.NC("menuSeparatorBackground","Color of a separator menu item in menus.")),Wt=m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),Vt=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:y,hcLight:y},a.NC("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:ui(Wt,.1),light:di(Wt,.1),hcDark:null,hcLight:null},a.NC("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hcDark:new o.Il(new o.VS(124,124,124,.3)),hcLight:new o.Il(new o.VS(10,50,100,.2))},a.NC("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},a.NC("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),m("breadcrumb.foreground",{light:gi(f,.8),dark:gi(f,.8),hcDark:gi(f,.8),hcLight:gi(f,.8)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),zt=m("breadcrumb.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("breadcrumbsBackground","Background color of breadcrumb items.")),Ut=m("breadcrumb.focusForeground",{light:di(f,.2),dark:ui(f,.1),hcDark:ui(f,.1),hcLight:ui(f,.1)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),jt=m("breadcrumb.activeSelectionForeground",{light:di(f,.2),dark:ui(f,.1),hcDark:ui(f,.1),hcLight:ui(f,.1)},a.NC("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),Kt=(m("breadcrumbPicker.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),o.Il.fromHex("#40C8AE").transparent(.5)),qt=o.Il.fromHex("#40A6FF").transparent(.5),$t=o.Il.fromHex("#606060").transparent(.4),Gt=.4,Qt=m("merge.currentHeaderBackground",{dark:Kt,light:Kt,hcDark:null,hcLight:null},a.NC("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Yt=(m("merge.currentContentBackground",{dark:gi(Qt,Gt),light:gi(Qt,Gt),hcDark:gi(Qt,Gt),hcLight:gi(Qt,Gt)},a.NC("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:qt,light:qt,hcDark:null,hcLight:null},a.NC("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Zt=(m("merge.incomingContentBackground",{dark:gi(Yt,Gt),light:gi(Yt,Gt),hcDark:gi(Yt,Gt),hcLight:gi(Yt,Gt)},a.NC("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:$t,light:$t,hcDark:null,hcLight:null},a.NC("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Xt=(m("merge.commonContentBackground",{dark:gi(Zt,Gt),light:gi(Zt,Gt),hcDark:gi(Zt,Gt),hcLight:gi(Zt,Gt)},a.NC("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},a.NC("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),Jt=(m("editorOverviewRuler.currentContentForeground",{dark:gi(Qt,1),light:gi(Qt,1),hcDark:Xt,hcLight:Xt},a.NC("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:gi(Yt,1),light:gi(Yt,1),hcDark:Xt,hcLight:Xt},a.NC("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:gi(Zt,1),light:gi(Zt,1),hcDark:Xt,hcLight:Xt},a.NC("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},a.NC("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),ei=m("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},a.NC("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ti=m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},a.NC("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),ii=m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),ni=m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),oi=m("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},a.NC("minimapError","Minimap marker color for errors.")),si=m("minimap.warningHighlight",{dark:ae,light:ae,hcDark:le,hcLight:le},a.NC("overviewRuleWarning","Minimap marker color for warnings.")),ri=m("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("minimapBackground","Minimap background color.")),ai=m("minimap.foregroundOpacity",{dark:o.Il.fromHex("#000f"),light:o.Il.fromHex("#000f"),hcDark:o.Il.fromHex("#000f"),hcLight:o.Il.fromHex("#000f")},a.NC("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),li=(m("minimapSlider.background",{light:gi(te,.5),dark:gi(te,.5),hcDark:gi(te,.5),hcLight:gi(te,.5)},a.NC("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",{light:gi(ie,.5),dark:gi(ie,.5),hcDark:gi(ie,.5),hcLight:gi(ie,.5)},a.NC("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",{light:gi(ne,.5),dark:gi(ne,.5),hcDark:gi(ne,.5),hcLight:gi(ne,.5)},a.NC("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("problemsErrorIcon.foreground",{dark:se,light:se,hcDark:se,hcLight:se},a.NC("problemsErrorIconForeground","The color used for the problems error icon."))),ci=m("problemsWarningIcon.foreground",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("problemsWarningIconForeground","The color used for the problems warning icon.")),hi=m("problemsInfoIcon.foreground",{dark:ce,light:ce,hcDark:ce,hcLight:ce},a.NC("problemsInfoIconForeground","The color used for the problems info icon."));function di(e,t){return{op:0,value:e,factor:t}}function ui(e,t){return{op:1,value:e,factor:t}}function gi(e,t){return{op:2,value:e,factor:t}}function pi(...e){return{op:3,values:e}}function mi(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function fi(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var i,n,s;switch(e.op){case 0:return null===(i=fi(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=fi(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(s=fi(e.value,t))||void 0===s?void 0:s.transparent(e.factor);case 3:for(const i of e.values){const e=fi(i,t);if(e)return e}return;case 5:return fi(t.defines(e.if)?e.then:e.else,t);case 4:{const i=fi(e.value,t);if(!i)return;const n=fi(e.background,t);return n?i.isDarkerThan(n)?o.Il.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Il.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,r.vE)(e)}}(e,t):void 0}m("charts.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("chartsForeground","The foreground color used in charts.")),m("charts.lines",{dark:gi(f,.5),light:gi(f,.5),hcDark:gi(f,.5),hcLight:gi(f,.5)},a.NC("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",{dark:se,light:se,hcDark:se,hcLight:se},a.NC("chartsRed","The red color used in chart visualizations.")),m("charts.blue",{dark:ce,light:ce,hcDark:ce,hcLight:ce},a.NC("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",{dark:ti,light:ti,hcDark:ti,hcLight:ti},a.NC("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},a.NC("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.NC("chartsPurple","The purple color used in chart visualizations."));const _i="vscode://schemas/workbench-colors",vi=c.B.as(l.I.JSONContribution);vi.registerSchema(_i,p.getColorSchema());const bi=new n.pY((()=>vi.notifySchemaChanged(_i)),200);p.onDidChangeSchema((()=>{bi.isScheduled()||bi.schedule()}))},59554:(e,t,i)=>{"use strict";i.d(t,{Ks:()=>f,q5:()=>m,s_:()=>C});var n,o,s=i(15393),r=i(73046),a=i(25670),l=i(4669),c=i(98401),h=i(70666),d=i(63580),u=i(81294),g=i(89872);!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;a.k.isThemeIcon(i);){const e=p.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(n||(n={})),function(e){e.toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>(0,c.HD)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,c.HD)(e.format)&&(0,c.HD)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:h.o.parse(e.location)})))}}}(o||(o={}));const p=new class{constructor(){this._onDidChange=new l.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,d.NC)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,d.NC)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${a.k.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;a.k.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|${a.k.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!a.k.isThemeIcon(e.defaults))).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|`);return i.join("\n")}};function m(e,t,i,n){return p.registerIcon(e,t,i,n)}function f(){return p}g.B.add("base.contributions.icons",p),function(){const e=(0,r.u)();for(const t in e){const i="\\"+e[t].toString(16);p.registerIcon(t,{fontCharacter:i})}}();const _="vscode://schemas/icons",v=g.B.as(u.I.JSONContribution);v.registerSchema(_,p.getIconSchema());const b=new s.pY((()=>v.notifySchemaChanged(_)),200);p.onDidChange((()=>{b.isScheduled()||b.schedule()}));const C=m("widget-close",r.l.close,(0,d.NC)("widgetClose","Icon for the close action in widgets."));m("goto-previous-location",r.l.arrowUp,(0,d.NC)("previousChangeIcon","Icon for goto previous editor location.")),m("goto-next-location",r.l.arrowDown,(0,d.NC)("nextChangeIcon","Icon for goto next editor location.")),a.k.modify(r.l.sync,"spin"),a.k.modify(r.l.loading,"spin")},92321:(e,t,i)=>{"use strict";var n;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{_T:()=>s,c3:()=>o,eL:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={}))},97781:(e,t,i)=>{"use strict";i.d(t,{EN:()=>c,IP:()=>d,Ic:()=>g,XE:()=>l,bB:()=>p,m6:()=>h});var n=i(4669),o=i(5976),s=i(72065),r=i(89872),a=i(92321);const l=(0,s.yh)("themeService");function c(e){return{id:e}}function h(e){switch(e){case a.eL.DARK:return"vs-dark";case a.eL.HIGH_CONTRAST_DARK:return"hc-black";case a.eL.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const d={ThemingContribution:"base.contributions.theming"},u=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function g(e){return u.onColorThemeChange(e)}r.B.add(d.ThemingContribution,u);class p extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},64862:(e,t,i)=>{"use strict";i.d(t,{Xt:()=>s,YO:()=>o,gJ:()=>r,tJ:()=>n});const n=(0,i(72065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r},40382:(e,t,i)=>{"use strict";i.d(t,{A6:()=>g,c$:()=>l,eb:()=>a,ec:()=>r,md:()=>u,uT:()=>d});var n=i(63580),o=i(88721),s=(i(4767),i(70666));const r=(0,i(72065).yh)("contextService");function a(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.uri)}function l(e){return"string"==typeof(null==e?void 0:e.id)&&!a(e)&&!function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.configPath)}(e)}const c={id:"ext-dev"},h={id:"empty-window"};function d(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:(0,o.EZ)(e)}:t?c:h;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const g="code-workspace";(0,n.NC)("codeWorkspace","Code Workspace")},33425:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n});const n=(0,i(72065).yh)("workspaceTrustManagementService")},31515:(e,t,i)=>{"use strict";const{DOCUMENT_MODE:n}=i(16152),o="html",s=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],r=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),a=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],l=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=l.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function h(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function d(e,t){for(let i=0;i<t.length;i++)if(0===e.indexOf(t[i]))return!0;return!1}t.isConforming=function(e){return e.name===o&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if(e.name!==o)return n.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return n.QUIRKS;let i=e.publicId;if(null!==i){if(i=i.toLowerCase(),a.indexOf(i)>-1)return n.QUIRKS;let e=null===t?r:s;if(d(i,e))return n.QUIRKS;if(e=null===t?l:c,d(i,e))return n.LIMITED_QUIRKS}return n.NO_QUIRKS},t.serializeContent=function(e,t,i){let n="!DOCTYPE ";return e&&(n+=e),t?n+=" PUBLIC "+h(t):i&&(n+=" SYSTEM"),null!==i&&(n+=" "+h(i)),n}},41734:e=>{"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},88779:(e,t,i)=>{"use strict";const n=i(55763),o=i(16152),s=o.TAG_NAMES,r=o.NAMESPACES,a=o.ATTRS,l={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},c={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:r.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:r.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:r.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:r.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:r.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:r.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:r.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:r.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:r.XML},"xml:space":{prefix:"xml",name:"space",namespace:r.XML},xmlns:{prefix:"",name:"xmlns",namespace:r.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:r.XMLNS}},h=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},d={[s.B]:!0,[s.BIG]:!0,[s.BLOCKQUOTE]:!0,[s.BODY]:!0,[s.BR]:!0,[s.CENTER]:!0,[s.CODE]:!0,[s.DD]:!0,[s.DIV]:!0,[s.DL]:!0,[s.DT]:!0,[s.EM]:!0,[s.EMBED]:!0,[s.H1]:!0,[s.H2]:!0,[s.H3]:!0,[s.H4]:!0,[s.H5]:!0,[s.H6]:!0,[s.HEAD]:!0,[s.HR]:!0,[s.I]:!0,[s.IMG]:!0,[s.LI]:!0,[s.LISTING]:!0,[s.MENU]:!0,[s.META]:!0,[s.NOBR]:!0,[s.OL]:!0,[s.P]:!0,[s.PRE]:!0,[s.RUBY]:!0,[s.S]:!0,[s.SMALL]:!0,[s.SPAN]:!0,[s.STRONG]:!0,[s.STRIKE]:!0,[s.SUB]:!0,[s.SUP]:!0,[s.TABLE]:!0,[s.TT]:!0,[s.U]:!0,[s.UL]:!0,[s.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!(t!==s.FONT||null===n.getTokenAttr(e,a.COLOR)&&null===n.getTokenAttr(e,a.SIZE)&&null===n.getTokenAttr(e,a.FACE))||d[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const i=l[e.attrs[t].name];i&&(e.attrs[t].name=i)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const i=c[e.attrs[t].name];i&&(e.attrs[t].prefix=i.prefix,e.attrs[t].name=i.name,e.attrs[t].namespace=i.namespace)}},t.adjustTokenSVGTagName=function(e){const t=h[e.tagName];t&&(e.tagName=t)},t.isIntegrationPoint=function(e,t,i,n){return!(n&&n!==r.HTML||!function(e,t,i){if(t===r.MATHML&&e===s.ANNOTATION_XML)for(let e=0;e<i.length;e++)if(i[e].name===a.ENCODING){const t=i[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}return t===r.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}(e,t,i))||!(n&&n!==r.MATHML||!function(e,t){return t===r.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}(e,t))}},16152:(e,t)=>{"use strict";const i=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const n=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[i.HTML]:{[n.ADDRESS]:!0,[n.APPLET]:!0,[n.AREA]:!0,[n.ARTICLE]:!0,[n.ASIDE]:!0,[n.BASE]:!0,[n.BASEFONT]:!0,[n.BGSOUND]:!0,[n.BLOCKQUOTE]:!0,[n.BODY]:!0,[n.BR]:!0,[n.BUTTON]:!0,[n.CAPTION]:!0,[n.CENTER]:!0,[n.COL]:!0,[n.COLGROUP]:!0,[n.DD]:!0,[n.DETAILS]:!0,[n.DIR]:!0,[n.DIV]:!0,[n.DL]:!0,[n.DT]:!0,[n.EMBED]:!0,[n.FIELDSET]:!0,[n.FIGCAPTION]:!0,[n.FIGURE]:!0,[n.FOOTER]:!0,[n.FORM]:!0,[n.FRAME]:!0,[n.FRAMESET]:!0,[n.H1]:!0,[n.H2]:!0,[n.H3]:!0,[n.H4]:!0,[n.H5]:!0,[n.H6]:!0,[n.HEAD]:!0,[n.HEADER]:!0,[n.HGROUP]:!0,[n.HR]:!0,[n.HTML]:!0,[n.IFRAME]:!0,[n.IMG]:!0,[n.INPUT]:!0,[n.LI]:!0,[n.LINK]:!0,[n.LISTING]:!0,[n.MAIN]:!0,[n.MARQUEE]:!0,[n.MENU]:!0,[n.META]:!0,[n.NAV]:!0,[n.NOEMBED]:!0,[n.NOFRAMES]:!0,[n.NOSCRIPT]:!0,[n.OBJECT]:!0,[n.OL]:!0,[n.P]:!0,[n.PARAM]:!0,[n.PLAINTEXT]:!0,[n.PRE]:!0,[n.SCRIPT]:!0,[n.SECTION]:!0,[n.SELECT]:!0,[n.SOURCE]:!0,[n.STYLE]:!0,[n.SUMMARY]:!0,[n.TABLE]:!0,[n.TBODY]:!0,[n.TD]:!0,[n.TEMPLATE]:!0,[n.TEXTAREA]:!0,[n.TFOOT]:!0,[n.TH]:!0,[n.THEAD]:!0,[n.TITLE]:!0,[n.TR]:!0,[n.TRACK]:!0,[n.UL]:!0,[n.WBR]:!0,[n.XMP]:!0},[i.MATHML]:{[n.MI]:!0,[n.MO]:!0,[n.MN]:!0,[n.MS]:!0,[n.MTEXT]:!0,[n.ANNOTATION_XML]:!0},[i.SVG]:{[n.TITLE]:!0,[n.FOREIGN_OBJECT]:!0,[n.DESC]:!0}}},54284:(e,t)=>{"use strict";const i=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="<22>",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||i.indexOf(e)>-1}},23843:(e,t,i)=>{"use strict";const n=i(81704);e.exports=class extends n{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},22232:(e,t,i)=>{"use strict";const n=i(23843),o=i(70050),s=i(46110),r=i(81704);e.exports=class extends n{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(i,n){t._bootstrap.call(this,i,n),r.install(this.tokenizer,o,e.opts),r.install(this.tokenizer,s)},_processInputToken(i){e.ctLoc=i.location,t._processInputToken.call(this,i)},_err(t,i){e.locBeforeToken=i&&i.beforeToken,e._reportError(t)}}}}},23288:(e,t,i)=>{"use strict";const n=i(23843),o=i(57930),s=i(81704);e.exports=class extends n{constructor(e,t){super(e,t),this.posTracker=s.install(e,o),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},70050:(e,t,i)=>{"use strict";const n=i(23843),o=i(23288),s=i(81704);e.exports=class extends n{constructor(e,t){super(e,t);const i=s.install(e.preprocessor,o,t);this.posTracker=i.posTracker}}},11077:(e,t,i)=>{"use strict";const n=i(81704);e.exports=class extends n{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(i){e.onItemPop(this.current),t.remove.call(this,i)}}}}},452:(e,t,i)=>{"use strict";const n=i(81704),o=i(55763),s=i(46110),r=i(11077),a=i(16152).TAG_NAMES;e.exports=class extends n{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const i=t.location,n=this.treeAdapter.getTagName(e),s={};t.type===o.END_TAG_TOKEN&&n===t.tagName?(s.endTag=Object.assign({},i),s.endLine=i.endLine,s.endCol=i.endCol,s.endOffset=i.endOffset):(s.endLine=i.startLine,s.endCol=i.startCol,s.endOffset=i.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}_getOverriddenMethods(e,t){return{_bootstrap(i,o){t._bootstrap.call(this,i,o),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const a=n.install(this.tokenizer,s);e.posTracker=a.posTracker,n.install(this.openElements,r,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(i){t._runParsingLoop.call(this,i);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(i){e.currentToken=i,t._processTokenInForeignContent.call(this,i)},_processToken(i){if(e.currentToken=i,t._processToken.call(this,i),i.type===o.END_TAG_TOKEN&&(i.tagName===a.HTML||i.tagName===a.BODY&&this.openElements.hasInScope(a.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];if(this.treeAdapter.getTagName(n)===i.tagName){e._setEndLocation(n,i);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const i=this.treeAdapter.getChildNodes(this.document),n=i.length;for(let t=0;t<n;t++){const n=i[t];if(this.treeAdapter.isDocumentTypeNode(n)){this.treeAdapter.setNodeSourceCodeLocation(n,e.location);break}}},_attachElementToTree(i){e._setStartLocation(i),e.lastStartTagToken=null,t._attachElementToTree.call(this,i)},_appendElement(i,n){e.lastStartTagToken=i,t._appendElement.call(this,i,n)},_insertElement(i,n){e.lastStartTagToken=i,t._insertElement.call(this,i,n)},_insertTemplate(i){e.lastStartTagToken=i,t._insertTemplate.call(this,i);const n=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(n,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(e,i){t._appendCommentNode.call(this,e,i);const n=this.treeAdapter.getChildNodes(i),o=n[n.length-1];this.treeAdapter.setNodeSourceCodeLocation(o,e.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(i){t._insertCharacters.call(this,i);const n=this._shouldFosterParentOnInsertion(),o=n&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,s=this.treeAdapter.getChildNodes(o),r=n&&e.lastFosterParentingLocation.beforeElement?s.indexOf(e.lastFosterParentingLocation.beforeElement)-1:s.length-1,a=s[r];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:e,endCol:t,endOffset:n}=i.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:e,endCol:t,endOffset:n})}else this.treeAdapter.setNodeSourceCodeLocation(a,i.location)}}}}},46110:(e,t,i)=>{"use strict";const n=i(81704),o=i(55763),s=i(57930);e.exports=class extends n{constructor(e){super(e),this.tokenizer=e,this.posTracker=n.install(e.preprocessor,s),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const i={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(i){t._createDoctypeToken.call(this,i),this.currentToken.location=e.ctLoc},_createCharacterToken(i,n){t._createCharacterToken.call(this,i,n),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(i){t._createAttr.call(this,i),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(i){t._leaveAttrName.call(this,i),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(i){t._leaveAttrValue.call(this,i),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const i=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=i.startLine,this.currentCharacterToken.location.endCol=i.startCol,this.currentCharacterToken.location.endOffset=i.startOffset),this.currentToken.type===o.EOF_TOKEN?(i.endLine=i.startLine,i.endCol=i.startCol,i.endOffset=i.startOffset):(i.endLine=e.posTracker.line,i.endCol=e.posTracker.col+1,i.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const i=this.currentCharacterToken&&this.currentCharacterToken.location;i&&-1===i.endOffset&&(i.endLine=e.posTracker.line,i.endCol=e.posTracker.col,i.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(o.MODE).forEach((n=>{const s=o.MODE[n];i[s]=function(i){e.ctLoc=e._getCurrentLocation(),t[s].call(this,i)}})),i}}},57930:(e,t,i)=>{"use strict";const n=i(81704);e.exports=class extends n{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const i=this.pos+1,n=this.html[i];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=i),("\n"===n||"\r"===n&&"\n"!==this.html[i+1])&&(e.isEol=!0),e.col=i-e.lineStartPos+1,e.offset=e.droppedBufferSize+i,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const i=this.pos;t.dropParsedChunk.call(this);const n=i-this.pos;e.lineStartPos-=n,e.droppedBufferSize+=n,e.offset=e.droppedBufferSize+this.pos}}}}},12484:e=>{"use strict";class t{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const i=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const r=this.entries[e];if(r.type===t.MARKER_ENTRY)break;const a=r.element,l=this.treeAdapter.getAttrList(a);this.treeAdapter.getTagName(a)===o&&this.treeAdapter.getNamespaceURI(a)===s&&l.length===n&&i.push({idx:e,attrs:l})}}return i.length<3?[]:i}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let i=t.length;if(i){const n=this.treeAdapter.getAttrList(e),o=n.length,s=Object.create(null);for(let e=0;e<o;e++){const t=n[e];s[t.name]=t.value}for(let e=0;e<o;e++)for(let n=0;n<i;n++){const o=t[n].attrs[e];if(s[o.name]!==o.value&&(t.splice(n,1),i--),t.length<3)return}for(let e=i-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:t.MARKER_ENTRY}),this.length++}pushElement(e,i){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:i}),this.length++}insertElementAfterBookmark(e,i){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:t.ELEMENT_ENTRY,element:e,token:i}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let i=this.length-1;i>=0;i--){const n=this.entries[i];if(n.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let i=this.length-1;i>=0;i--){const n=this.entries[i];if(n.type===t.ELEMENT_ENTRY&&n.element===e)return n}return null}}t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=t},7045:(e,t,i)=>{"use strict";const n=i(55763),o=i(46519),s=i(12484),r=i(452),a=i(22232),l=i(81704),c=i(17296),h=i(8904),d=i(31515),u=i(88779),g=i(41734),p=i(54284),m=i(16152),f=m.TAG_NAMES,_=m.NAMESPACES,v=m.ATTRS,b={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},C="hidden",y="INITIAL_MODE",w="BEFORE_HTML_MODE",S="BEFORE_HEAD_MODE",k="IN_HEAD_MODE",x="IN_HEAD_NO_SCRIPT_MODE",L="AFTER_HEAD_MODE",E="IN_BODY_MODE",N="TEXT_MODE",D="IN_TABLE_MODE",T="IN_TABLE_TEXT_MODE",I="IN_CAPTION_MODE",A="IN_COLUMN_GROUP_MODE",M="IN_TABLE_BODY_MODE",R="IN_ROW_MODE",O="IN_CELL_MODE",P="IN_SELECT_MODE",F="IN_SELECT_IN_TABLE_MODE",B="IN_TEMPLATE_MODE",H="AFTER_BODY_MODE",W="IN_FRAMESET_MODE",V="AFTER_FRAMESET_MODE",z="AFTER_AFTER_BODY_MODE",U="AFTER_AFTER_FRAMESET_MODE",j={[f.TR]:R,[f.TBODY]:M,[f.THEAD]:M,[f.TFOOT]:M,[f.CAPTION]:I,[f.COLGROUP]:A,[f.TABLE]:D,[f.BODY]:E,[f.FRAMESET]:W},K={[f.CAPTION]:D,[f.COLGROUP]:D,[f.TBODY]:D,[f.TFOOT]:D,[f.THEAD]:D,[f.COL]:A,[f.TR]:M,[f.TD]:R,[f.TH]:R},q={[y]:{[n.CHARACTER_TOKEN]:re,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:ee,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const i=t.forceQuirks?m.DOCUMENT_MODE.QUIRKS:d.getDocumentMode(t);d.isConforming(t)||e._err(g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,i),e.insertionMode=w},[n.START_TAG_TOKEN]:re,[n.END_TAG_TOKEN]:re,[n.EOF_TOKEN]:re},[w]:{[n.CHARACTER_TOKEN]:ae,[n.NULL_CHARACTER_TOKEN]:ae,[n.WHITESPACE_CHARACTER_TOKEN]:ee,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?(e._insertElement(t,_.HTML),e.insertionMode=S):ae(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i!==f.HTML&&i!==f.HEAD&&i!==f.BODY&&i!==f.BR||ae(e,t)},[n.EOF_TOKEN]:ae},[S]:{[n.CHARACTER_TOKEN]:le,[n.NULL_CHARACTER_TOKEN]:le,[n.WHITESPACE_CHARACTER_TOKEN]:ee,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:te,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.HEAD?(e._insertElement(t,_.HTML),e.headElement=e.openElements.current,e.insertionMode=k):le(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HEAD||i===f.BODY||i===f.HTML||i===f.BR?le(e,t):e._err(g.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:le},[k]:{[n.CHARACTER_TOKEN]:de,[n.NULL_CHARACTER_TOKEN]:de,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:te,[n.START_TAG_TOKEN]:ce,[n.END_TAG_TOKEN]:he,[n.EOF_TOKEN]:de},[x]:{[n.CHARACTER_TOKEN]:ue,[n.NULL_CHARACTER_TOKEN]:ue,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:te,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.BASEFONT||i===f.BGSOUND||i===f.HEAD||i===f.LINK||i===f.META||i===f.NOFRAMES||i===f.STYLE?ce(e,t):i===f.NOSCRIPT?e._err(g.nestedNoscriptInHead):ue(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.NOSCRIPT?(e.openElements.pop(),e.insertionMode=k):i===f.BR?ue(e,t):e._err(g.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:ue},[L]:{[n.CHARACTER_TOKEN]:ge,[n.NULL_CHARACTER_TOKEN]:ge,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:te,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.BODY?(e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode=E):i===f.FRAMESET?(e._insertElement(t,_.HTML),e.insertionMode=W):i===f.BASE||i===f.BASEFONT||i===f.BGSOUND||i===f.LINK||i===f.META||i===f.NOFRAMES||i===f.SCRIPT||i===f.STYLE||i===f.TEMPLATE||i===f.TITLE?(e._err(g.abandonedHeadElementChild),e.openElements.push(e.headElement),ce(e,t),e.openElements.remove(e.headElement)):i===f.HEAD?e._err(g.misplacedStartTagForHeadElement):ge(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.BODY||i===f.HTML||i===f.BR?ge(e,t):i===f.TEMPLATE?he(e,t):e._err(g.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:ge},[E]:{[n.CHARACTER_TOKEN]:me,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:Le,[n.END_TAG_TOKEN]:Te,[n.EOF_TOKEN]:Ie},[N]:{[n.CHARACTER_TOKEN]:oe,[n.NULL_CHARACTER_TOKEN]:oe,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ee,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:ee,[n.END_TAG_TOKEN]:function(e,t){t.tagName===f.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[n.EOF_TOKEN]:function(e,t){e._err(g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[D]:{[n.CHARACTER_TOKEN]:Ae,[n.NULL_CHARACTER_TOKEN]:Ae,[n.WHITESPACE_CHARACTER_TOKEN]:Ae,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:Me,[n.END_TAG_TOKEN]:Re,[n.EOF_TOKEN]:Ie},[T]:{[n.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[n.COMMENT_TOKEN]:Pe,[n.DOCTYPE_TOKEN]:Pe,[n.START_TAG_TOKEN]:Pe,[n.END_TAG_TOKEN]:Pe,[n.EOF_TOKEN]:Pe},[I]:{[n.CHARACTER_TOKEN]:me,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.CAPTION||i===f.COL||i===f.COLGROUP||i===f.TBODY||i===f.TD||i===f.TFOOT||i===f.TH||i===f.THEAD||i===f.TR?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D,e._processToken(t)):Le(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.CAPTION||i===f.TABLE?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D,i===f.TABLE&&e._processToken(t)):i!==f.BODY&&i!==f.COL&&i!==f.COLGROUP&&i!==f.HTML&&i!==f.TBODY&&i!==f.TD&&i!==f.TFOOT&&i!==f.TH&&i!==f.THEAD&&i!==f.TR&&Te(e,t)},[n.EOF_TOKEN]:Ie},[A]:{[n.CHARACTER_TOKEN]:Fe,[n.NULL_CHARACTER_TOKEN]:Fe,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.COL?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):i===f.TEMPLATE?ce(e,t):Fe(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.COLGROUP?e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=D):i===f.TEMPLATE?he(e,t):i!==f.COL&&Fe(e,t)},[n.EOF_TOKEN]:Ie},[M]:{[n.CHARACTER_TOKEN]:Ae,[n.NULL_CHARACTER_TOKEN]:Ae,[n.WHITESPACE_CHARACTER_TOKEN]:Ae,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,_.HTML),e.insertionMode=R):i===f.TH||i===f.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(f.TR),e.insertionMode=R,e._processToken(t)):i===f.CAPTION||i===f.COL||i===f.COLGROUP||i===f.TBODY||i===f.TFOOT||i===f.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D,e._processToken(t)):Me(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.TBODY||i===f.TFOOT||i===f.THEAD?e.openElements.hasInTableScope(i)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D):i===f.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D,e._processToken(t)):(i!==f.BODY&&i!==f.CAPTION&&i!==f.COL&&i!==f.COLGROUP||i!==f.HTML&&i!==f.TD&&i!==f.TH&&i!==f.TR)&&Re(e,t)},[n.EOF_TOKEN]:Ie},[R]:{[n.CHARACTER_TOKEN]:Ae,[n.NULL_CHARACTER_TOKEN]:Ae,[n.WHITESPACE_CHARACTER_TOKEN]:Ae,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.TH||i===f.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,_.HTML),e.insertionMode=O,e.activeFormattingElements.insertMarker()):i===f.CAPTION||i===f.COL||i===f.COLGROUP||i===f.TBODY||i===f.TFOOT||i===f.THEAD||i===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):Me(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M):i===f.TABLE?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):i===f.TBODY||i===f.TFOOT||i===f.THEAD?(e.openElements.hasInTableScope(i)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):(i!==f.BODY&&i!==f.CAPTION&&i!==f.COL&&i!==f.COLGROUP||i!==f.HTML&&i!==f.TD&&i!==f.TH)&&Re(e,t)},[n.EOF_TOKEN]:Ie},[O]:{[n.CHARACTER_TOKEN]:me,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.CAPTION||i===f.COL||i===f.COLGROUP||i===f.TBODY||i===f.TD||i===f.TFOOT||i===f.TH||i===f.THEAD||i===f.TR?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),e._processToken(t)):Le(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.TD||i===f.TH?e.openElements.hasInTableScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R):i===f.TABLE||i===f.TBODY||i===f.TFOOT||i===f.THEAD||i===f.TR?e.openElements.hasInTableScope(i)&&(e._closeTableCell(),e._processToken(t)):i!==f.BODY&&i!==f.CAPTION&&i!==f.COL&&i!==f.COLGROUP&&i!==f.HTML&&Te(e,t)},[n.EOF_TOKEN]:Ie},[P]:{[n.CHARACTER_TOKEN]:oe,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:Be,[n.END_TAG_TOKEN]:He,[n.EOF_TOKEN]:Ie},[F]:{[n.CHARACTER_TOKEN]:oe,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.CAPTION||i===f.TABLE||i===f.TBODY||i===f.TFOOT||i===f.THEAD||i===f.TR||i===f.TD||i===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):Be(e,t)},[n.END_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.CAPTION||i===f.TABLE||i===f.TBODY||i===f.TFOOT||i===f.THEAD||i===f.TR||i===f.TD||i===f.TH?e.openElements.hasInTableScope(i)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):He(e,t)},[n.EOF_TOKEN]:Ie},[B]:{[n.CHARACTER_TOKEN]:me,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;if(i===f.BASE||i===f.BASEFONT||i===f.BGSOUND||i===f.LINK||i===f.META||i===f.NOFRAMES||i===f.SCRIPT||i===f.STYLE||i===f.TEMPLATE||i===f.TITLE)ce(e,t);else{const n=K[i]||E;e._popTmplInsertionMode(),e._pushTmplInsertionMode(n),e.insertionMode=n,e._processToken(t)}},[n.END_TAG_TOKEN]:function(e,t){t.tagName===f.TEMPLATE&&he(e,t)},[n.EOF_TOKEN]:We},[H]:{[n.CHARACTER_TOKEN]:Ve,[n.NULL_CHARACTER_TOKEN]:Ve,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?Le(e,t):Ve(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?e.fragmentContext||(e.insertionMode=z):Ve(e,t)},[n.EOF_TOKEN]:se},[W]:{[n.CHARACTER_TOKEN]:ee,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.FRAMESET?e._insertElement(t,_.HTML):i===f.FRAME?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):i===f.NOFRAMES&&ce(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName!==f.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===f.FRAMESET||(e.insertionMode=V))},[n.EOF_TOKEN]:se},[V]:{[n.CHARACTER_TOKEN]:ee,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:oe,[n.COMMENT_TOKEN]:ie,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.NOFRAMES&&ce(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML&&(e.insertionMode=U)},[n.EOF_TOKEN]:se},[z]:{[n.CHARACTER_TOKEN]:ze,[n.NULL_CHARACTER_TOKEN]:ze,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ne,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?Le(e,t):ze(e,t)},[n.END_TAG_TOKEN]:ze,[n.EOF_TOKEN]:se},[U]:{[n.CHARACTER_TOKEN]:ee,[n.NULL_CHARACTER_TOKEN]:ee,[n.WHITESPACE_CHARACTER_TOKEN]:pe,[n.COMMENT_TOKEN]:ne,[n.DOCTYPE_TOKEN]:ee,[n.START_TAG_TOKEN]:function(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.NOFRAMES&&ce(e,t)},[n.END_TAG_TOKEN]:ee,[n.EOF_TOKEN]:se}};function $(e,t){let i=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return i?e.openElements.contains(i.element)?e.openElements.hasInScope(t.tagName)||(i=null):(e.activeFormattingElements.removeEntry(i),i=null):De(e,t),i}function G(e,t){let i=null;for(let n=e.openElements.stackTop;n>=0;n--){const o=e.openElements.items[n];if(o===t.element)break;e._isSpecialElement(o)&&(i=o)}return i||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),i}function Q(e,t,i){let n=t,o=e.openElements.getCommonAncestor(t);for(let s=0,r=o;r!==i;s++,r=o){o=e.openElements.getCommonAncestor(r);const i=e.activeFormattingElements.getElementEntry(r),a=i&&s>=3;!i||a?(a&&e.activeFormattingElements.removeEntry(i),e.openElements.remove(r)):(r=Y(e,i),n===t&&(e.activeFormattingElements.bookmark=i),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(r,n),n=r)}return n}function Y(e,t){const i=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,i,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Z(e,t,i){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(i);else{const n=e.treeAdapter.getTagName(t),o=e.treeAdapter.getNamespaceURI(t);n===f.TEMPLATE&&o===_.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,i)}}function X(e,t,i){const n=e.treeAdapter.getNamespaceURI(i.element),o=i.token,s=e.treeAdapter.createElement(o.tagName,n,o.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i.token),e.activeFormattingElements.removeEntry(i),e.openElements.remove(i.element),e.openElements.insertAfter(t,s)}function J(e,t){let i;for(let n=0;n<8&&(i=$(e,t),i);n++){const t=G(e,i);if(!t)break;e.activeFormattingElements.bookmark=i;const n=Q(e,t,i.element),o=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(n),Z(e,o,n),X(e,t,i)}}function ee(){}function te(e){e._err(g.misplacedDoctype)}function ie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function ne(e,t){e._appendCommentNode(t,e.document)}function oe(e,t){e._insertCharacters(t)}function se(e){e.stopped=!0}function re(e,t){e._err(g.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,m.DOCUMENT_MODE.QUIRKS),e.insertionMode=w,e._processToken(t)}function ae(e,t){e._insertFakeRootElement(),e.insertionMode=S,e._processToken(t)}function le(e,t){e._insertFakeElement(f.HEAD),e.headElement=e.openElements.current,e.insertionMode=k,e._processToken(t)}function ce(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.BASE||i===f.BASEFONT||i===f.BGSOUND||i===f.LINK||i===f.META?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):i===f.TITLE?e._switchToTextParsing(t,n.MODE.RCDATA):i===f.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,n.MODE.RAWTEXT):(e._insertElement(t,_.HTML),e.insertionMode=x):i===f.NOFRAMES||i===f.STYLE?e._switchToTextParsing(t,n.MODE.RAWTEXT):i===f.SCRIPT?e._switchToTextParsing(t,n.MODE.SCRIPT_DATA):i===f.TEMPLATE?(e._insertTemplate(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B,e._pushTmplInsertionMode(B)):i===f.HEAD?e._err(g.misplacedStartTagForHeadElement):de(e,t)}function he(e,t){const i=t.tagName;i===f.HEAD?(e.openElements.pop(),e.insertionMode=L):i===f.BODY||i===f.BR||i===f.HTML?de(e,t):i===f.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==f.TEMPLATE&&e._err(g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(g.endTagWithoutMatchingOpenElement)}function de(e,t){e.openElements.pop(),e.insertionMode=L,e._processToken(t)}function ue(e,t){const i=t.type===n.EOF_TOKEN?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(i),e.openElements.pop(),e.insertionMode=k,e._processToken(t)}function ge(e,t){e._insertFakeElement(f.BODY),e.insertionMode=E,e._processToken(t)}function pe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function me(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fe(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}function _e(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ve(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function be(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ce(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ye(e,t){e._appendElement(t,_.HTML),t.ackSelfClosing=!0}function we(e,t){e._switchToTextParsing(t,n.MODE.RAWTEXT)}function Se(e,t){e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function ke(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,_.HTML)}function xe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function Le(e,t){const i=t.tagName;switch(i.length){case 1:i===f.I||i===f.S||i===f.B||i===f.U?ve(e,t):i===f.P?fe(e,t):i===f.A?function(e,t){const i=e.activeFormattingElements.getElementEntryInScopeWithTagName(f.A);i&&(J(e,t),e.openElements.remove(i.element),e.activeFormattingElements.removeEntry(i)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):xe(e,t);break;case 2:i===f.DL||i===f.OL||i===f.UL?fe(e,t):i===f.H1||i===f.H2||i===f.H3||i===f.H4||i===f.H5||i===f.H6?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement();const i=e.openElements.currentTagName;i!==f.H1&&i!==f.H2&&i!==f.H3&&i!==f.H4&&i!==f.H5&&i!==f.H6||e.openElements.pop(),e._insertElement(t,_.HTML)}(e,t):i===f.LI||i===f.DD||i===f.DT?function(e,t){e.framesetOk=!1;const i=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const n=e.openElements.items[t],o=e.treeAdapter.getTagName(n);let s=null;if(i===f.LI&&o===f.LI?s=f.LI:i!==f.DD&&i!==f.DT||o!==f.DD&&o!==f.DT||(s=o),s){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(o!==f.ADDRESS&&o!==f.DIV&&o!==f.P&&e._isSpecialElement(n))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):i===f.EM||i===f.TT?ve(e,t):i===f.BR?Ce(e,t):i===f.HR?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):i===f.RB?ke(e,t):i===f.RT||i===f.RP?function(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,_.HTML)}(e,t):i!==f.TH&&i!==f.TD&&i!==f.TR&&xe(e,t);break;case 3:i===f.DIV||i===f.DIR||i===f.NAV?fe(e,t):i===f.PRE?_e(e,t):i===f.BIG?ve(e,t):i===f.IMG||i===f.WBR?Ce(e,t):i===f.XMP?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,n.MODE.RAWTEXT)}(e,t):i===f.SVG?function(e,t){e._reconstructActiveFormattingElements(),u.adjustTokenSVGAttrs(t),u.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.SVG):e._insertElement(t,_.SVG),t.ackSelfClosing=!0}(e,t):i===f.RTC?ke(e,t):i!==f.COL&&xe(e,t);break;case 4:i===f.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):i===f.BASE||i===f.LINK||i===f.META?ce(e,t):i===f.BODY?function(e,t){const i=e.openElements.tryPeekProperlyNestedBodyElement();i&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(i,t.attrs))}(e,t):i===f.MAIN||i===f.MENU?fe(e,t):i===f.FORM?function(e,t){const i=e.openElements.tmplCount>0;e.formElement&&!i||(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),i||(e.formElement=e.openElements.current))}(e,t):i===f.CODE||i===f.FONT?ve(e,t):i===f.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(J(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):i===f.AREA?Ce(e,t):i===f.MATH?function(e,t){e._reconstructActiveFormattingElements(),u.adjustTokenMathMLAttrs(t),u.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.MATHML):e._insertElement(t,_.MATHML),t.ackSelfClosing=!0}(e,t):i===f.MENU?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):i!==f.HEAD&&xe(e,t);break;case 5:i===f.STYLE||i===f.TITLE?ce(e,t):i===f.ASIDE?fe(e,t):i===f.SMALL?ve(e,t):i===f.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==m.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode=D}(e,t):i===f.EMBED?Ce(e,t):i===f.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML);const i=n.getTokenAttr(t,v.TYPE);i&&i.toLowerCase()===C||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):i===f.PARAM||i===f.TRACK?ye(e,t):i===f.IMAGE?function(e,t){t.tagName=f.IMG,Ce(e,t)}(e,t):i!==f.FRAME&&i!==f.TBODY&&i!==f.TFOOT&&i!==f.THEAD&&xe(e,t);break;case 6:i===f.SCRIPT?ce(e,t):i===f.CENTER||i===f.FIGURE||i===f.FOOTER||i===f.HEADER||i===f.HGROUP||i===f.DIALOG?fe(e,t):i===f.BUTTON?function(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1}(e,t):i===f.STRIKE||i===f.STRONG?ve(e,t):i===f.APPLET||i===f.OBJECT?be(e,t):i===f.KEYGEN?Ce(e,t):i===f.SOURCE?ye(e,t):i===f.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,n.MODE.RAWTEXT)}(e,t):i===f.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode===D||e.insertionMode===I||e.insertionMode===M||e.insertionMode===R||e.insertionMode===O?e.insertionMode=F:e.insertionMode=P}(e,t):i===f.OPTION?Se(e,t):xe(e,t);break;case 7:i===f.BGSOUND?ce(e,t):i===f.DETAILS||i===f.ADDRESS||i===f.ARTICLE||i===f.SECTION||i===f.SUMMARY?fe(e,t):i===f.LISTING?_e(e,t):i===f.MARQUEE?be(e,t):i===f.NOEMBED?we(e,t):i!==f.CAPTION&&xe(e,t);break;case 8:i===f.BASEFONT?ce(e,t):i===f.FRAMESET?function(e,t){const i=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&i&&(e.treeAdapter.detachNode(i),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,_.HTML),e.insertionMode=W)}(e,t):i===f.FIELDSET?fe(e,t):i===f.TEXTAREA?function(e,t){e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.tokenizer.state=n.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=N}(e,t):i===f.TEMPLATE?ce(e,t):i===f.NOSCRIPT?e.options.scriptingEnabled?we(e,t):xe(e,t):i===f.OPTGROUP?Se(e,t):i!==f.COLGROUP&&xe(e,t);break;case 9:i===f.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.tokenizer.state=n.MODE.PLAINTEXT}(e,t):xe(e,t);break;case 10:i===f.BLOCKQUOTE||i===f.FIGCAPTION?fe(e,t):xe(e,t);break;default:xe(e,t)}}function Ee(e,t){const i=t.tagName;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i))}function Ne(e,t){const i=t.tagName;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker())}function De(e,t){const i=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const n=e.openElements.items[t];if(e.treeAdapter.getTagName(n)===i){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilElementPopped(n);break}if(e._isSpecialElement(n))break}}function Te(e,t){const i=t.tagName;switch(i.length){case 1:i===f.A||i===f.B||i===f.I||i===f.S||i===f.U?J(e,t):i===f.P?function(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(f.P),e._closePElement()}(e):De(e,t);break;case 2:i===f.DL||i===f.UL||i===f.OL?Ee(e,t):i===f.LI?function(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}(e):i===f.DD||i===f.DT?function(e,t){const i=t.tagName;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i))}(e,t):i===f.H1||i===f.H2||i===f.H3||i===f.H4||i===f.H5||i===f.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):i===f.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(f.BR),e.openElements.pop(),e.framesetOk=!1}(e):i===f.EM||i===f.TT?J(e,t):De(e,t);break;case 3:i===f.BIG?J(e,t):i===f.DIR||i===f.DIV||i===f.NAV||i===f.PRE?Ee(e,t):De(e,t);break;case 4:i===f.BODY?function(e){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=H)}(e):i===f.HTML?function(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=H,e._processToken(t))}(e,t):i===f.FORM?function(e){const t=e.openElements.tmplCount>0,i=e.formElement;t||(e.formElement=null),(i||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):e.openElements.remove(i))}(e):i===f.CODE||i===f.FONT||i===f.NOBR?J(e,t):i===f.MAIN||i===f.MENU?Ee(e,t):De(e,t);break;case 5:i===f.ASIDE?Ee(e,t):i===f.SMALL?J(e,t):De(e,t);break;case 6:i===f.CENTER||i===f.FIGURE||i===f.FOOTER||i===f.HEADER||i===f.HGROUP||i===f.DIALOG?Ee(e,t):i===f.APPLET||i===f.OBJECT?Ne(e,t):i===f.STRIKE||i===f.STRONG?J(e,t):De(e,t);break;case 7:i===f.ADDRESS||i===f.ARTICLE||i===f.DETAILS||i===f.SECTION||i===f.SUMMARY||i===f.LISTING?Ee(e,t):i===f.MARQUEE?Ne(e,t):De(e,t);break;case 8:i===f.FIELDSET?Ee(e,t):i===f.TEMPLATE?he(e,t):De(e,t);break;case 10:i===f.BLOCKQUOTE||i===f.FIGCAPTION?Ee(e,t):De(e,t);break;default:De(e,t)}}function Ie(e,t){e.tmplInsertionModeStackTop>-1?We(e,t):e.stopped=!0}function Ae(e,t){const i=e.openElements.currentTagName;i===f.TABLE||i===f.TBODY||i===f.TFOOT||i===f.THEAD||i===f.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T,e._processToken(t)):Oe(e,t)}function Me(e,t){const i=t.tagName;switch(i.length){case 2:i===f.TD||i===f.TH||i===f.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.TBODY),e.insertionMode=M,e._processToken(t)}(e,t):Oe(e,t);break;case 3:i===f.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.COLGROUP),e.insertionMode=A,e._processToken(t)}(e,t):Oe(e,t);break;case 4:i===f.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,_.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):Oe(e,t);break;case 5:i===f.TABLE?function(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):i===f.STYLE?ce(e,t):i===f.TBODY||i===f.TFOOT||i===f.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode=M}(e,t):i===f.INPUT?function(e,t){const i=n.getTokenAttr(t,v.TYPE);i&&i.toLowerCase()===C?e._appendElement(t,_.HTML):Oe(e,t),t.ackSelfClosing=!0}(e,t):Oe(e,t);break;case 6:i===f.SCRIPT?ce(e,t):Oe(e,t);break;case 7:i===f.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,_.HTML),e.insertionMode=I}(e,t):Oe(e,t);break;case 8:i===f.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode=A}(e,t):i===f.TEMPLATE?ce(e,t):Oe(e,t);break;default:Oe(e,t)}}function Re(e,t){const i=t.tagName;i===f.TABLE?e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode()):i===f.TEMPLATE?he(e,t):i!==f.BODY&&i!==f.CAPTION&&i!==f.COL&&i!==f.COLGROUP&&i!==f.HTML&&i!==f.TBODY&&i!==f.TD&&i!==f.TFOOT&&i!==f.TH&&i!==f.THEAD&&i!==f.TR&&Oe(e,t)}function Oe(e,t){const i=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=i}function Pe(e,t){let i=0;if(e.hasNonWhitespacePendingCharacterToken)for(;i<e.pendingCharacterTokens.length;i++)Oe(e,e.pendingCharacterTokens[i]);else for(;i<e.pendingCharacterTokens.length;i++)e._insertCharacters(e.pendingCharacterTokens[i]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function Fe(e,t){e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=D,e._processToken(t))}function Be(e,t){const i=t.tagName;i===f.HTML?Le(e,t):i===f.OPTION?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._insertElement(t,_.HTML)):i===f.OPTGROUP?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,_.HTML)):i===f.INPUT||i===f.KEYGEN||i===f.TEXTAREA||i===f.SELECT?e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),i!==f.SELECT&&e._processToken(t)):i!==f.SCRIPT&&i!==f.TEMPLATE||ce(e,t)}function He(e,t){const i=t.tagName;if(i===f.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],i=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===f.OPTION&&i===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop()}else i===f.OPTION?e.openElements.currentTagName===f.OPTION&&e.openElements.pop():i===f.SELECT&&e.openElements.hasInSelectScope(f.SELECT)?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode()):i===f.TEMPLATE&&he(e,t)}function We(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function Ve(e,t){e.insertionMode=E,e._processToken(t)}function ze(e,t){e.insertionMode=E,e._processToken(t)}e.exports=class{constructor(e){this.options=h(b,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&l.install(this,r),this.options.onParseError&&l.install(this,a,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(f.TEMPLATE,_.HTML,[]));const i=this.treeAdapter.createElement("documentmock",_.HTML,[]);this._bootstrap(i,t),this.treeAdapter.getTagName(t)===f.TEMPLATE&&this._pushTmplInsertionMode(B),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const n=this.treeAdapter.getFirstChild(i),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(n,o),o}_bootstrap(e,t){this.tokenizer=new n(this.options),this.stopped=!1,this.insertionMode=y,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new o(this.document,this.treeAdapter),this.activeFormattingElements=new s(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===n.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===n.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==_.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,_.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=N}switchToPlaintextParsing(){this.insertionMode=N,this.originalInsertionMode=E,this.tokenizer.state=n.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===f.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===_.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===f.TITLE||e===f.TEXTAREA?this.tokenizer.state=n.MODE.RCDATA:e===f.STYLE||e===f.XMP||e===f.IFRAME||e===f.NOEMBED||e===f.NOFRAMES||e===f.NOSCRIPT?this.tokenizer.state=n.MODE.RAWTEXT:e===f.SCRIPT?this.tokenizer.state=n.MODE.SCRIPT_DATA:e===f.PLAINTEXT&&(this.tokenizer.state=n.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",i=e.publicId||"",n=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,i,n)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const i=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(i)}_insertElement(e,t){const i=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(i),this.openElements.push(i)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,_.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,_.HTML,e.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,i),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(f.HTML,_.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const i=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,i)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let i=this.treeAdapter.getFirstChild(e);i;i=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(t,i)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const i=this.treeAdapter.getNamespaceURI(t);if(i===_.HTML)return!1;if(this.treeAdapter.getTagName(t)===f.ANNOTATION_XML&&i===_.MATHML&&e.type===n.START_TAG_TOKEN&&e.tagName===f.SVG)return!1;const o=e.type===n.CHARACTER_TOKEN||e.type===n.NULL_CHARACTER_TOKEN||e.type===n.WHITESPACE_CHARACTER_TOKEN;return!((e.type===n.START_TAG_TOKEN&&e.tagName!==f.MGLYPH&&e.tagName!==f.MALIGNMARK||o)&&this._isIntegrationPoint(t,_.MATHML)||(e.type===n.START_TAG_TOKEN||o)&&this._isIntegrationPoint(t,_.HTML)||e.type===n.EOF_TOKEN)}_processToken(e){q[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){q.IN_BODY_MODE[e.type](this,e)}_processTokenInForeignContent(e){e.type===n.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===n.NULL_CHARACTER_TOKEN?function(e,t){t.chars=p.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===n.WHITESPACE_CHARACTER_TOKEN?oe(this,e):e.type===n.COMMENT_TOKEN?ie(this,e):e.type===n.START_TAG_TOKEN?function(e,t){if(u.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==_.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const i=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(i);n===_.MATHML?u.adjustTokenMathMLAttrs(t):n===_.SVG&&(u.adjustTokenSVGTagName(t),u.adjustTokenSVGAttrs(t)),u.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}(this,e):e.type===n.END_TAG_TOKEN&&function(e,t){for(let i=e.openElements.stackTop;i>0;i--){const n=e.openElements.items[i];if(e.treeAdapter.getNamespaceURI(n)===_.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(n).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(n);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===n.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const i=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return u.isIntegrationPoint(i,n,o,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,i=null;do{if(t--,i=this.activeFormattingElements.entries[t],i.type===s.MARKER_ENTRY||this.openElements.contains(i.element)){t++;break}}while(t>0);for(let n=t;n<e;n++)i=this.activeFormattingElements.entries[n],this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let i=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(i=this.fragmentContext));const n=this.treeAdapter.getTagName(i),o=j[n];if(o){this.insertionMode=o;break}if(!(t||n!==f.TD&&n!==f.TH)){this.insertionMode=O;break}if(!t&&n===f.HEAD){this.insertionMode=k;break}if(n===f.SELECT){this._resetInsertionModeForSelect(e);break}if(n===f.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(n===f.HTML){this.insertionMode=this.headElement?L:S;break}if(t){this.insertionMode=E;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],i=this.treeAdapter.getTagName(e);if(i===f.TEMPLATE)break;if(i===f.TABLE)return void(this.insertionMode=F)}this.insertionMode=P}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===f.TABLE||t===f.TBODY||t===f.TFOOT||t===f.THEAD||t===f.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const i=this.openElements.items[t],n=this.treeAdapter.getTagName(i),o=this.treeAdapter.getNamespaceURI(i);if(n===f.TEMPLATE&&o===_.HTML){e.parent=this.treeAdapter.getTemplateContent(i);break}if(n===f.TABLE){e.parent=this.treeAdapter.getParentNode(i),e.parent?e.beforeElement=i:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);return m.SPECIAL_ELEMENTS[i][t]}}},46519:(e,t,i)=>{"use strict";const n=i(16152),o=n.TAG_NAMES,s=n.NAMESPACES;function r(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI;case 3:return e===o.RTC;case 6:return e===o.OPTION;case 8:return e===o.OPTGROUP}return!1}function a(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI||e===o.TD||e===o.TH||e===o.TR;case 3:return e===o.RTC;case 5:return e===o.TBODY||e===o.TFOOT||e===o.THEAD;case 6:return e===o.OPTION;case 7:return e===o.CAPTION;case 8:return e===o.OPTGROUP||e===o.COLGROUP}return!1}function l(e,t){switch(e.length){case 2:if(e===o.TD||e===o.TH)return t===s.HTML;if(e===o.MI||e===o.MO||e===o.MN||e===o.MS)return t===s.MATHML;break;case 4:if(e===o.HTML)return t===s.HTML;if(e===o.DESC)return t===s.SVG;break;case 5:if(e===o.TABLE)return t===s.HTML;if(e===o.MTEXT)return t===s.MATHML;if(e===o.TITLE)return t===s.SVG;break;case 6:return(e===o.APPLET||e===o.OBJECT)&&t===s.HTML;case 7:return(e===o.CAPTION||e===o.MARQUEE)&&t===s.HTML;case 8:return e===o.TEMPLATE&&t===s.HTML;case 13:return e===o.FOREIGN_OBJECT&&t===s.SVG;case 14:return e===o.ANNOTATION_XML&&t===s.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let i=this.stackTop;i>=0;i--)if(this.items[i]===e){t=i;break}return t}_isInTemplate(){return this.currentTagName===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===s.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const i=this._indexOf(e);this.items[i]=t,i===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const i=this._indexOf(e)+1;this.items.splice(i,0,t),i===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,i=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&i===s.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.H1||e===o.H2||e===o.H3||e===o.H4||e===o.H5||e===o.H6&&t===s.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.TD||e===o.TH&&t===s.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==o.TABLE&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==o.TBODY&&this.currentTagName!==o.TFOOT&&this.currentTagName!==o.THEAD&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==o.TR&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===o.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===o.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const i=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(i===e&&n===s.HTML)return!0;if(l(i,n))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),i=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===o.H1||t===o.H2||t===o.H3||t===o.H4||t===o.H5||t===o.H6)&&i===s.HTML)return!0;if(l(t,i))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const i=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(i===e&&n===s.HTML)return!0;if((i===o.UL||i===o.OL)&&n===s.HTML||l(i,n))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const i=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(i===e&&n===s.HTML)return!0;if(i===o.BUTTON&&n===s.HTML||l(i,n))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const i=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(i===e)return!0;if(i===o.TABLE||i===o.TEMPLATE||i===o.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===s.HTML){if(t===o.TBODY||t===o.THEAD||t===o.TFOOT)return!0;if(t===o.TABLE||t===o.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const i=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(i===e)return!0;if(i!==o.OPTION&&i!==o.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;r(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;r(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},55763:(e,t,i)=>{"use strict";const n=i(77118),o=i(54284),s=i(5482),r=i(41734),a=o.CODE_POINTS,l=o.CODE_POINT_SEQUENCES,c={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},h="DATA_STATE",d="RCDATA_STATE",u="RAWTEXT_STATE",g="SCRIPT_DATA_STATE",p="PLAINTEXT_STATE",m="TAG_OPEN_STATE",f="END_TAG_OPEN_STATE",_="TAG_NAME_STATE",v="RCDATA_LESS_THAN_SIGN_STATE",b="RCDATA_END_TAG_OPEN_STATE",C="RCDATA_END_TAG_NAME_STATE",y="RAWTEXT_LESS_THAN_SIGN_STATE",w="RAWTEXT_END_TAG_OPEN_STATE",S="RAWTEXT_END_TAG_NAME_STATE",k="SCRIPT_DATA_LESS_THAN_SIGN_STATE",x="SCRIPT_DATA_END_TAG_OPEN_STATE",L="SCRIPT_DATA_END_TAG_NAME_STATE",E="SCRIPT_DATA_ESCAPE_START_STATE",N="SCRIPT_DATA_ESCAPE_START_DASH_STATE",D="SCRIPT_DATA_ESCAPED_STATE",T="SCRIPT_DATA_ESCAPED_DASH_STATE",I="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",A="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",M="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",R="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",O="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",P="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",F="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",H="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",W="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",V="BEFORE_ATTRIBUTE_NAME_STATE",z="ATTRIBUTE_NAME_STATE",U="AFTER_ATTRIBUTE_NAME_STATE",j="BEFORE_ATTRIBUTE_VALUE_STATE",K="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",q="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",$="ATTRIBUTE_VALUE_UNQUOTED_STATE",G="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",Q="SELF_CLOSING_START_TAG_STATE",Y="BOGUS_COMMENT_STATE",Z="MARKUP_DECLARATION_OPEN_STATE",X="COMMENT_START_STATE",J="COMMENT_START_DASH_STATE",ee="COMMENT_STATE",te="COMMENT_LESS_THAN_SIGN_STATE",ie="COMMENT_LESS_THAN_SIGN_BANG_STATE",ne="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",oe="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",se="COMMENT_END_DASH_STATE",re="COMMENT_END_STATE",ae="COMMENT_END_BANG_STATE",le="DOCTYPE_STATE",ce="BEFORE_DOCTYPE_NAME_STATE",he="DOCTYPE_NAME_STATE",de="AFTER_DOCTYPE_NAME_STATE",ue="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",ge="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",pe="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",me="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",fe="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",_e="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",ve="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",be="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Ce="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",ye="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",we="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Se="BOGUS_DOCTYPE_STATE",ke="CDATA_SECTION_STATE",xe="CDATA_SECTION_BRACKET_STATE",Le="CDATA_SECTION_END_STATE",Ee="CHARACTER_REFERENCE_STATE",Ne="NAMED_CHARACTER_REFERENCE_STATE",De="AMBIGUOS_AMPERSAND_STATE",Te="NUMERIC_CHARACTER_REFERENCE_STATE",Ie="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Ae="DECIMAL_CHARACTER_REFERENCE_START_STATE",Me="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Re="DECIMAL_CHARACTER_REFERENCE_STATE",Oe="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Pe(e){return e===a.SPACE||e===a.LINE_FEED||e===a.TABULATION||e===a.FORM_FEED}function Fe(e){return e>=a.DIGIT_0&&e<=a.DIGIT_9}function Be(e){return e>=a.LATIN_CAPITAL_A&&e<=a.LATIN_CAPITAL_Z}function He(e){return e>=a.LATIN_SMALL_A&&e<=a.LATIN_SMALL_Z}function We(e){return He(e)||Be(e)}function Ve(e){return We(e)||Fe(e)}function ze(e){return e>=a.LATIN_CAPITAL_A&&e<=a.LATIN_CAPITAL_F}function Ue(e){return e>=a.LATIN_SMALL_A&&e<=a.LATIN_SMALL_F}function je(e){return e+32}function Ke(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function qe(e){return String.fromCharCode(je(e))}function $e(e,t){const i=s[++e];let n=++e,o=n+i-1;for(;n<=o;){const e=n+o>>>1,r=s[e];if(r<t)n=e+1;else{if(!(r>t))return s[e+i];o=e-1}}return-1}class Ge{constructor(){this.preprocessor=new n,this.tokenQueue=[],this.allowCDATA=!1,this.state=h,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Ge.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,i){let n=0,o=!0;const s=e.length;let r,l=0,c=t;for(;l<s;l++){if(l>0&&(c=this._consume(),n++),c===a.EOF){o=!1;break}if(r=e[l],c!==r&&(i||c!==je(r))){o=!1;break}}if(!o)for(;n--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==l.SCRIPT_STRING[e])return!1;return!0}_createStartTagToken(){this.currentToken={type:Ge.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Ge.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Ge.COMMENT_TOKEN,data:""}}_createDoctypeToken(e){this.currentToken={type:Ge.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t}}_createEOFToken(){this.currentToken={type:Ge.EOF_TOKEN}}_createAttr(e){this.currentAttr={name:e,value:""}}_leaveAttrName(e){null===Ge.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(r.duplicateAttribute),this.state=e}_leaveAttrValue(e){this.state=e}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===Ge.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===Ge.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(r.endTagWithAttributes),e.selfClosing&&this._err(r.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ge.CHARACTER_TOKEN;Pe(e)?t=Ge.WHITESPACE_CHARACTER_TOKEN:e===a.NULL&&(t=Ge.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,Ke(e))}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t])}_emitChars(e){this._appendCharToCurrentCharacterToken(Ge.CHARACTER_TOKEN,e)}_matchNamedCharacterReference(e){let t=null,i=1,n=$e(0,e);for(this.tempBuff.push(e);n>-1;){const e=s[n],o=e<7;o&&1&e&&(t=2&e?[s[++n],s[++n]]:[s[++n]],i=0);const r=this._consume();if(this.tempBuff.push(r),i++,r===a.EOF)break;n=o?4&e?$e(n,r):-1:r===e?++n:-1}for(;i--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===K||this.returnState===q||this.returnState===$}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===a.EQUALS_SIGN||Ve(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=Ke(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[h](e){this.preprocessor.dropParsedChunk(),e===a.LESS_THAN_SIGN?this.state=m:e===a.AMPERSAND?(this.returnState=h,this.state=Ee):e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitCodePoint(e)):e===a.EOF?this._emitEOFToken():this._emitCodePoint(e)}[d](e){this.preprocessor.dropParsedChunk(),e===a.AMPERSAND?(this.returnState=d,this.state=Ee):e===a.LESS_THAN_SIGN?this.state=v:e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?this._emitEOFToken():this._emitCodePoint(e)}[u](e){this.preprocessor.dropParsedChunk(),e===a.LESS_THAN_SIGN?this.state=y:e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?this._emitEOFToken():this._emitCodePoint(e)}[g](e){this.preprocessor.dropParsedChunk(),e===a.LESS_THAN_SIGN?this.state=k:e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?this._emitEOFToken():this._emitCodePoint(e)}[p](e){this.preprocessor.dropParsedChunk(),e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?this._emitEOFToken():this._emitCodePoint(e)}[m](e){e===a.EXCLAMATION_MARK?this.state=Z:e===a.SOLIDUS?this.state=f:We(e)?(this._createStartTagToken(),this._reconsumeInState(_)):e===a.QUESTION_MARK?(this._err(r.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(Y)):e===a.EOF?(this._err(r.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(r.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(h))}[f](e){We(e)?(this._createEndTagToken(),this._reconsumeInState(_)):e===a.GREATER_THAN_SIGN?(this._err(r.missingEndTagName),this.state=h):e===a.EOF?(this._err(r.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(r.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(Y))}[_](e){Pe(e)?this.state=V:e===a.SOLIDUS?this.state=Q:e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):Be(e)?this.currentToken.tagName+=qe(e):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.tagName+=o.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=Ke(e)}[v](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=b):(this._emitChars("<"),this._reconsumeInState(d))}[b](e){We(e)?(this._createEndTagToken(),this._reconsumeInState(C)):(this._emitChars("</"),this._reconsumeInState(d))}[C](e){if(Be(e))this.currentToken.tagName+=qe(e),this.tempBuff.push(e);else if(He(e))this.currentToken.tagName+=Ke(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=V);if(e===a.SOLIDUS)return void(this.state=Q);if(e===a.GREATER_THAN_SIGN)return this.state=h,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(d)}}[y](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=w):(this._emitChars("<"),this._reconsumeInState(u))}[w](e){We(e)?(this._createEndTagToken(),this._reconsumeInState(S)):(this._emitChars("</"),this._reconsumeInState(u))}[S](e){if(Be(e))this.currentToken.tagName+=qe(e),this.tempBuff.push(e);else if(He(e))this.currentToken.tagName+=Ke(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=V);if(e===a.SOLIDUS)return void(this.state=Q);if(e===a.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=h)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(u)}}[k](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=x):e===a.EXCLAMATION_MARK?(this.state=E,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(g))}[x](e){We(e)?(this._createEndTagToken(),this._reconsumeInState(L)):(this._emitChars("</"),this._reconsumeInState(g))}[L](e){if(Be(e))this.currentToken.tagName+=qe(e),this.tempBuff.push(e);else if(He(e))this.currentToken.tagName+=Ke(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=V);if(e===a.SOLIDUS)return void(this.state=Q);if(e===a.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=h)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(g)}}[E](e){e===a.HYPHEN_MINUS?(this.state=N,this._emitChars("-")):this._reconsumeInState(g)}[N](e){e===a.HYPHEN_MINUS?(this.state=I,this._emitChars("-")):this._reconsumeInState(g)}[D](e){e===a.HYPHEN_MINUS?(this.state=T,this._emitChars("-")):e===a.LESS_THAN_SIGN?this.state=A:e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[T](e){e===a.HYPHEN_MINUS?(this.state=I,this._emitChars("-")):e===a.LESS_THAN_SIGN?this.state=A:e===a.NULL?(this._err(r.unexpectedNullCharacter),this.state=D,this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=D,this._emitCodePoint(e))}[I](e){e===a.HYPHEN_MINUS?this._emitChars("-"):e===a.LESS_THAN_SIGN?this.state=A:e===a.GREATER_THAN_SIGN?(this.state=g,this._emitChars(">")):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.state=D,this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=D,this._emitCodePoint(e))}[A](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=M):We(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(O)):(this._emitChars("<"),this._reconsumeInState(D))}[M](e){We(e)?(this._createEndTagToken(),this._reconsumeInState(R)):(this._emitChars("</"),this._reconsumeInState(D))}[R](e){if(Be(e))this.currentToken.tagName+=qe(e),this.tempBuff.push(e);else if(He(e))this.currentToken.tagName+=Ke(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=V);if(e===a.SOLIDUS)return void(this.state=Q);if(e===a.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=h)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(D)}}[O](e){Pe(e)||e===a.SOLIDUS||e===a.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?P:D,this._emitCodePoint(e)):Be(e)?(this.tempBuff.push(je(e)),this._emitCodePoint(e)):He(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(D)}[P](e){e===a.HYPHEN_MINUS?(this.state=F,this._emitChars("-")):e===a.LESS_THAN_SIGN?(this.state=H,this._emitChars("<")):e===a.NULL?(this._err(r.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[F](e){e===a.HYPHEN_MINUS?(this.state=B,this._emitChars("-")):e===a.LESS_THAN_SIGN?(this.state=H,this._emitChars("<")):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.state=P,this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=P,this._emitCodePoint(e))}[B](e){e===a.HYPHEN_MINUS?this._emitChars("-"):e===a.LESS_THAN_SIGN?(this.state=H,this._emitChars("<")):e===a.GREATER_THAN_SIGN?(this.state=g,this._emitChars(">")):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.state=P,this._emitChars(o.REPLACEMENT_CHARACTER)):e===a.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=P,this._emitCodePoint(e))}[H](e){e===a.SOLIDUS?(this.tempBuff=[],this.state=W,this._emitChars("/")):this._reconsumeInState(P)}[W](e){Pe(e)||e===a.SOLIDUS||e===a.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?D:P,this._emitCodePoint(e)):Be(e)?(this.tempBuff.push(je(e)),this._emitCodePoint(e)):He(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(P)}[V](e){Pe(e)||(e===a.SOLIDUS||e===a.GREATER_THAN_SIGN||e===a.EOF?this._reconsumeInState(U):e===a.EQUALS_SIGN?(this._err(r.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z):(this._createAttr(""),this._reconsumeInState(z)))}[z](e){Pe(e)||e===a.SOLIDUS||e===a.GREATER_THAN_SIGN||e===a.EOF?(this._leaveAttrName(U),this._unconsume()):e===a.EQUALS_SIGN?this._leaveAttrName(j):Be(e)?this.currentAttr.name+=qe(e):e===a.QUOTATION_MARK||e===a.APOSTROPHE||e===a.LESS_THAN_SIGN?(this._err(r.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ke(e)):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.name+=o.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ke(e)}[U](e){Pe(e)||(e===a.SOLIDUS?this.state=Q:e===a.EQUALS_SIGN?this.state=j:e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(z)))}[j](e){Pe(e)||(e===a.QUOTATION_MARK?this.state=K:e===a.APOSTROPHE?this.state=q:e===a.GREATER_THAN_SIGN?(this._err(r.missingAttributeValue),this.state=h,this._emitCurrentToken()):this._reconsumeInState($))}[K](e){e===a.QUOTATION_MARK?this.state=G:e===a.AMPERSAND?(this.returnState=K,this.state=Ee):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}[q](e){e===a.APOSTROPHE?this.state=G:e===a.AMPERSAND?(this.returnState=q,this.state=Ee):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}[$](e){Pe(e)?this._leaveAttrValue(V):e===a.AMPERSAND?(this.returnState=$,this.state=Ee):e===a.GREATER_THAN_SIGN?(this._leaveAttrValue(h),this._emitCurrentToken()):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===a.QUOTATION_MARK||e===a.APOSTROPHE||e===a.LESS_THAN_SIGN||e===a.EQUALS_SIGN||e===a.GRAVE_ACCENT?(this._err(r.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ke(e)):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}[G](e){Pe(e)?this._leaveAttrValue(V):e===a.SOLIDUS?this._leaveAttrValue(Q):e===a.GREATER_THAN_SIGN?(this._leaveAttrValue(h),this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.missingWhitespaceBetweenAttributes),this._reconsumeInState(V))}[Q](e){e===a.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.unexpectedSolidusInTag),this._reconsumeInState(V))}[Y](e){e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===a.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):this.currentToken.data+=Ke(e)}[Z](e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=X):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state=le:this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=ke:(this._err(r.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=Y):this._ensureHibernation()||(this._err(r.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(Y))}[X](e){e===a.HYPHEN_MINUS?this.state=J:e===a.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=h,this._emitCurrentToken()):this._reconsumeInState(ee)}[J](e){e===a.HYPHEN_MINUS?this.state=re:e===a.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ee](e){e===a.HYPHEN_MINUS?this.state=se:e===a.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=te):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ke(e)}[te](e){e===a.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=ie):e===a.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ee)}[ie](e){e===a.HYPHEN_MINUS?this.state=ne:this._reconsumeInState(ee)}[ne](e){e===a.HYPHEN_MINUS?this.state=oe:this._reconsumeInState(se)}[oe](e){e!==a.GREATER_THAN_SIGN&&e!==a.EOF&&this._err(r.nestedComment),this._reconsumeInState(re)}[se](e){e===a.HYPHEN_MINUS?this.state=re:e===a.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[re](e){e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===a.EXCLAMATION_MARK?this.state=ae:e===a.HYPHEN_MINUS?this.currentToken.data+="-":e===a.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ee))}[ae](e){e===a.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=se):e===a.GREATER_THAN_SIGN?(this._err(r.incorrectlyClosedComment),this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ee))}[le](e){Pe(e)?this.state=ce:e===a.GREATER_THAN_SIGN?this._reconsumeInState(ce):e===a.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(ce))}[ce](e){Pe(e)||(Be(e)?(this._createDoctypeToken(qe(e)),this.state=he):e===a.NULL?(this._err(r.unexpectedNullCharacter),this._createDoctypeToken(o.REPLACEMENT_CHARACTER),this.state=he):e===a.GREATER_THAN_SIGN?(this._err(r.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ke(e)),this.state=he))}[he](e){Pe(e)?this.state=de:e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):Be(e)?this.currentToken.name+=qe(e):e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.name+=o.REPLACEMENT_CHARACTER):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ke(e)}[de](e){Pe(e)||(e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state=ue:this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state=ve:this._ensureHibernation()||(this._err(r.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se)))}[ue](e){Pe(e)?this.state=ge:e===a.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=pe):e===a.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=me):e===a.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se))}[ge](e){Pe(e)||(e===a.QUOTATION_MARK?(this.currentToken.publicId="",this.state=pe):e===a.APOSTROPHE?(this.currentToken.publicId="",this.state=me):e===a.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se)))}[pe](e){e===a.QUOTATION_MARK?this.state=fe:e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ke(e)}[me](e){e===a.APOSTROPHE?this.state=fe:e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ke(e)}[fe](e){Pe(e)?this.state=_e:e===a.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===a.QUOTATION_MARK?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ce):e===a.APOSTROPHE?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=ye):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se))}[_e](e){Pe(e)||(e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===a.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ce):e===a.APOSTROPHE?(this.currentToken.systemId="",this.state=ye):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se)))}[ve](e){Pe(e)?this.state=be:e===a.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ce):e===a.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=ye):e===a.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se))}[be](e){Pe(e)||(e===a.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ce):e===a.APOSTROPHE?(this.currentToken.systemId="",this.state=ye):e===a.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Se)))}[Ce](e){e===a.QUOTATION_MARK?this.state=we:e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ke(e)}[ye](e){e===a.APOSTROPHE?this.state=we:e===a.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===a.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ke(e)}[we](e){Pe(e)||(e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===a.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Se)))}[Se](e){e===a.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===a.NULL?this._err(r.unexpectedNullCharacter):e===a.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[ke](e){e===a.RIGHT_SQUARE_BRACKET?this.state=xe:e===a.EOF?(this._err(r.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[xe](e){e===a.RIGHT_SQUARE_BRACKET?this.state=Le:(this._emitChars("]"),this._reconsumeInState(ke))}[Le](e){e===a.GREATER_THAN_SIGN?this.state=h:e===a.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(ke))}[Ee](e){this.tempBuff=[a.AMPERSAND],e===a.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Te):Ve(e)?this._reconsumeInState(Ne):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ne](e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[a.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===a.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(r.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=De}[De](e){Ve(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ke(e):this._emitCodePoint(e):(e===a.SEMICOLON&&this._err(r.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Te](e){this.charRefCode=0,e===a.LATIN_SMALL_X||e===a.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Ie):this._reconsumeInState(Ae)}[Ie](e){!function(e){return Fe(e)||ze(e)||Ue(e)}(e)?(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(Me)}[Ae](e){Fe(e)?this._reconsumeInState(Re):(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Me](e){ze(e)?this.charRefCode=16*this.charRefCode+e-55:Ue(e)?this.charRefCode=16*this.charRefCode+e-87:Fe(e)?this.charRefCode=16*this.charRefCode+e-48:e===a.SEMICOLON?this.state=Oe:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(Oe))}[Re](e){Fe(e)?this.charRefCode=10*this.charRefCode+e-48:e===a.SEMICOLON?this.state=Oe:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(Oe))}[Oe](){if(this.charRefCode===a.NULL)this._err(r.nullCharacterReference),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(r.characterReferenceOutsideUnicodeRange),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(o.isSurrogate(this.charRefCode))this._err(r.surrogateCharacterReference),this.charRefCode=a.REPLACEMENT_CHARACTER;else if(o.isUndefinedCodePoint(this.charRefCode))this._err(r.noncharacterCharacterReference);else if(o.isControlCodePoint(this.charRefCode)||this.charRefCode===a.CARRIAGE_RETURN){this._err(r.controlCharacterReference);const e=c[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Ge.CHARACTER_TOKEN="CHARACTER_TOKEN",Ge.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Ge.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Ge.START_TAG_TOKEN="START_TAG_TOKEN",Ge.END_TAG_TOKEN="END_TAG_TOKEN",Ge.COMMENT_TOKEN="COMMENT_TOKEN",Ge.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Ge.EOF_TOKEN="EOF_TOKEN",Ge.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Ge.MODE={DATA:h,RCDATA:d,RAWTEXT:u,SCRIPT_DATA:g,PLAINTEXT:p},Ge.getTokenAttr=function(e,t){for(let i=e.attrs.length-1;i>=0;i--)if(e.attrs[i].name===t)return e.attrs[i].value;return null},e.exports=Ge},5482:e=>{"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},77118:(e,t,i)=>{"use strict";const n=i(54284),o=i(41734),s=n.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(n.isSurrogatePair(t))return this.pos++,this._addGap(),n.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,s.EOF;return this._err(o.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,s.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===s.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===s.CARRIAGE_RETURN?(this.skipNextNewLine=!0,s.LINE_FEED):(this.skipNextNewLine=!1,n.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===s.LINE_FEED||e===s.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){n.isControlCodePoint(e)?this._err(o.controlCharacterInInputStream):n.isUndefinedCodePoint(e)&&this._err(o.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},17296:(e,t,i)=>{"use strict";const{DOCUMENT_MODE:n}=i(16152);t.createDocument=function(){return{nodeName:"#document",mode:n.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,i){return{nodeName:e,tagName:e,attrs:i,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const o=function(e){return{nodeName:"#text",value:e,parentNode:null}},s=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},r=t.insertBefore=function(e,t,i){const n=e.childNodes.indexOf(i);e.childNodes.splice(n,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,i,n){let o=null;for(let t=0;t<e.childNodes.length;t++)if("#documentType"===e.childNodes[t].nodeName){o=e.childNodes[t];break}o?(o.name=t,o.publicId=i,o.systemId=n):s(e,{nodeName:"#documentType",name:t,publicId:i,systemId:n})},t.setDocumentMode=function(e,t){e.mode=t},t.getDocumentMode=function(e){return e.mode},t.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},t.insertText=function(e,t){if(e.childNodes.length){const i=e.childNodes[e.childNodes.length-1];if("#text"===i.nodeName)return void(i.value+=t)}s(e,o(t))},t.insertTextBefore=function(e,t,i){const n=e.childNodes[e.childNodes.indexOf(i)-1];n&&"#text"===n.nodeName?n.value+=t:r(e,o(t),i)},t.adoptAttributes=function(e,t){const i=[];for(let t=0;t<e.attrs.length;t++)i.push(e.attrs[t].name);for(let n=0;n<t.length;n++)-1===i.indexOf(t[n].name)&&e.attrs.push(t[n])},t.getFirstChild=function(e){return e.childNodes[0]},t.getChildNodes=function(e){return e.childNodes},t.getParentNode=function(e){return e.parentNode},t.getAttrList=function(e){return e.attrs},t.getTagName=function(e){return e.tagName},t.getNamespaceURI=function(e){return e.namespaceURI},t.getTextNodeContent=function(e){return e.value},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e.name},t.getDocumentTypeNodePublicId=function(e){return e.publicId},t.getDocumentTypeNodeSystemId=function(e){return e.systemId},t.isTextNode=function(e){return"#text"===e.nodeName},t.isCommentNode=function(e){return"#comment"===e.nodeName},t.isDocumentTypeNode=function(e){return"#documentType"===e.nodeName},t.isElementNode=function(e){return!!e.tagName},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},8904:e=>{"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce(((e,t)=>(Object.keys(t).forEach((i=>{e[i]=t[i]})),e)),Object.create(null))}},81704:e=>{"use strict";class t{constructor(e){const t={},i=this._getOverriddenMethods(this,t);for(const n of Object.keys(i))"function"==typeof i[n]&&(t[n]=e[n],e[n]=i[n])}_getOverriddenMethods(){throw new Error("Not implemented")}}t.install=function(e,t,i){e.__mixins||(e.__mixins=[]);for(let i=0;i<e.__mixins.length;i++)if(e.__mixins[i].constructor===t)return e.__mixins[i];const n=new t(e,i);return e.__mixins.push(n),n},e.exports=t},57848:(e,t,i)=>{var n=i(18139);e.exports=function(e,t){var i,o=null;if(!e||"string"!=typeof e)return o;for(var s,r,a=n(e),l="function"==typeof t,c=0,h=a.length;c<h;c++)s=(i=a[c]).property,r=i.value,l?t(s,r,i):r&&(o||(o={}),o[s]=r);return o}},24173:function(e,t,i){var n;(function(o,s){"use strict";function r(){a.width=o.innerWidth,a.height=5*u.barThickness;var e=a.getContext("2d");e.shadowBlur=u.shadowBlur,e.shadowColor=u.shadowColor;var t,i=e.createLinearGradient(0,0,a.width,0);for(t in u.barColors)i.addColorStop(t,u.barColors[t]);e.lineWidth=u.barThickness,e.beginPath(),e.moveTo(0,u.barThickness/2),e.lineTo(Math.ceil(h*a.width),u.barThickness/2),e.strokeStyle=i,e.stroke()}!function(){for(var e=0,t=["ms","moz","webkit","o"],i=0;i<t.length&&!o.requestAnimationFrame;++i)o.requestAnimationFrame=o[t[i]+"RequestAnimationFrame"],o.cancelAnimationFrame=o[t[i]+"CancelAnimationFrame"]||o[t[i]+"CancelRequestAnimationFrame"];o.requestAnimationFrame||(o.requestAnimationFrame=function(t,i){var n=(new Date).getTime(),s=Math.max(0,16-(n-e)),r=o.setTimeout((function(){t(n+s)}),s);return e=n+s,r}),o.cancelAnimationFrame||(o.cancelAnimationFrame=function(e){clearTimeout(e)})}();var a,l,c,h,d,u={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},g={config:function(e){for(var t in e)u.hasOwnProperty(t)&&(u[t]=e[t])},show:function(){var e,t,i;d||(d=!0,null!==c&&o.cancelAnimationFrame(c),a||((i=(a=s.createElement("canvas")).style).position="fixed",i.top=i.left=i.right=i.margin=i.padding=0,i.zIndex=100001,i.display="none",u.className&&a.classList.add(u.className),s.body.appendChild(a),e="resize",t=r,(i=o).addEventListener?i.addEventListener(e,t,!1):i.attachEvent?i.attachEvent("on"+e,t):i.onresize=t),a.style.opacity=1,a.style.display="block",g.progress(0),u.autoRun&&function e(){l=o.requestAnimationFrame(e),g.progress("+"+.05*Math.pow(1-Math.sqrt(h),2))}())},progress:function(e){return void 0===e||("string"==typeof e&&(e=(0<=e.indexOf("+")||0<=e.indexOf("-")?h:0)+parseFloat(e)),h=1<e?1:e,r()),h},hide:function(){d&&(d=!1,null!=l&&(o.cancelAnimationFrame(l),l=null),function e(){return 1<=g.progress("+.1")&&(a.style.opacity-=.05,a.style.opacity<=.05)?(a.style.display="none",void(c=null)):void(c=o.requestAnimationFrame(e))}())}};"object"==typeof e.exports?e.exports=g:void 0===(n=function(){return g}.call(t,i,t,e))||(e.exports=n)}).call(this,window,document)},42480:()=>{}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={id:e,loaded:!1,exports:{}};return i[e].call(s.exports,s,s.exports,o),s.loaded=!0,s.exports}o.m=i,o.amdO={},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,i)=>(o.f[i](e,t),t)),[])),o.u=e=>(552===e?"mermaid":e)+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},o.l=(e,i,n,s)=>{if(t[e])t[e].push(i);else{var r,a;if(void 0!==n)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var h=l[c];if(h.getAttribute("src")==e){r=h;break}}r||(a=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,o.nc&&r.setAttribute("nonce",o.nc),r.src=e),t[e]=[i];var d=(i,n)=>{r.onerror=r.onload=null,clearTimeout(u);var o=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach((e=>e(n))),i)return i(n)},u=setTimeout(d.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=d.bind(null,r.onerror),r.onload=d.bind(null,r.onload),a&&document.head.appendChild(r)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={143:0};o.f.j=(t,i)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise(((i,o)=>n=e[t]=[i,o]));i.push(n[2]=s);var r=o.p+o.u(t),a=new Error;o.l(r,(i=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,n[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var n,s,[r,a,l]=i,c=0;if(r.some((t=>0!==e[t]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);l&&l(o)}for(t&&t(i);c<r.length;c++)s=r[c],o.o(e,s)&&e[s]&&e[s][0](),e[s]=0},i=self.webpackChunk=self.webpackChunk||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),(()=>{"use strict";var t={};o.r(t),o.d(t,{attentionMarkers:()=>go,contentInitial:()=>ro,disable:()=>po,document:()=>so,flow:()=>lo,flowInitial:()=>ao,insideSpan:()=>uo,string:()=>co,text:()=>ho});var i={};o.r(i),o.d(i,{boolean:()=>Dr,booleanish:()=>Tr,commaOrSpaceSeparated:()=>Or,commaSeparated:()=>Rr,number:()=>Ar,overloadedBoolean:()=>Ir,spaceSeparated:()=>Mr}),o(96458);var n,s=e=>"function"==typeof e?e:function(){return e},r="undefined"!=typeof self?self:null,a="undefined"!=typeof window?window:null,l=r||a||l,c="closed",h="errored",d="joined",u="joining",g="leaving",p="phx_close",m="phx_error",f="phx_reply",_="phx_leave",v=class{constructor(e,t,i,n){this.channel=e,this.event=t,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:i}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},b=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}},C=class{static request(e,t,i,n,o,s,r){if(l.XDomainRequest){let i=new l.XDomainRequest;return this.xdomainRequest(i,e,t,n,o,s,r)}{let a=new l.XMLHttpRequest;return this.xhrRequest(a,e,t,i,n,o,s,r)}}static xdomainRequest(e,t,i,n,o,s,r){return e.timeout=o,e.open(t,i),e.onload=()=>{let t=this.parseJSON(e.responseText);r&&r(t)},s&&(e.ontimeout=s),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,i,n,o,s,r,a){return e.open(t,i,!0),e.timeout=s,e.setRequestHeader("Content-Type",n),e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(4===e.readyState&&a){let t=this.parseJSON(e.responseText);a(t)}},r&&(e.ontimeout=r),e.send(o),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let i=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=t?`${t}[${n}]`:n,s=e[n];"object"==typeof s?i.push(this.serialize(s,o)):i.push(encodeURIComponent(o)+"="+encodeURIComponent(s))}return i.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let i=e.match(/\?/)?"&":"?";return`${e}${i}${this.serialize(t)}`}},y=class{constructor(e){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=0,this.poll()}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/websocket"),"$1/longpoll")}endpointURL(){return C.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,i){this.close(e,t,i),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return 1===this.readyState||0===this.readyState}poll(){this.ajax("GET",null,(()=>this.ontimeout()),(e=>{if(e){var{status:t,token:i,messages:n}=e;this.token=i}else t=0;switch(t){case 200:n.forEach((e=>{setTimeout((()=>this.onmessage({data:e})),0)})),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}}))}send(e){this.ajax("POST",e,(()=>this.onerror("timeout")),(e=>{e&&200===e.status||(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))}))}close(e,t,i){for(let e of this.reqs)e.abort();this.readyState=3;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:i});"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,i,n){let o;o=C.request(e,this.endpointURL(),"application/json",t,this.timeout,(()=>{this.reqs.delete(o),i()}),(e=>{this.reqs.delete(o),this.isActive()&&n(e)})),this.reqs.add(o)}},w={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(i))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[i,n,o,s,r]=JSON.parse(e);return t({join_ref:i,ref:n,topic:o,event:s,payload:r})}},binaryEncode(e){let{join_ref:t,ref:i,event:n,topic:o,payload:s}=e,r=this.META_LENGTH+t.length+i.length+o.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+r),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,i.length),l.setUint8(c++,o.length),l.setUint8(c++,n.length),Array.from(t,(e=>l.setUint8(c++,e.charCodeAt(0)))),Array.from(i,(e=>l.setUint8(c++,e.charCodeAt(0)))),Array.from(o,(e=>l.setUint8(c++,e.charCodeAt(0)))),Array.from(n,(e=>l.setUint8(c++,e.charCodeAt(0))));var h=new Uint8Array(a.byteLength+s.byteLength);return h.set(new Uint8Array(a),0),h.set(new Uint8Array(s),a.byteLength),h.buffer},binaryDecode(e){let t=new DataView(e),i=t.getUint8(0),n=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,i){let n=t.getUint8(1),o=t.getUint8(2),s=t.getUint8(3),r=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(e.slice(r,r+n));r+=n;let l=i.decode(e.slice(r,r+o));r+=o;let c=i.decode(e.slice(r,r+s));return r+=s,{join_ref:a,ref:null,topic:l,event:c,payload:e.slice(r,e.byteLength)}},decodeReply(e,t,i){let n=t.getUint8(1),o=t.getUint8(2),s=t.getUint8(3),r=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(e.slice(a,a+n));a+=n;let c=i.decode(e.slice(a,a+o));a+=o;let h=i.decode(e.slice(a,a+s));a+=s;let d=i.decode(e.slice(a,a+r));a+=r;let u=e.slice(a,e.byteLength);return{join_ref:l,ref:c,topic:h,event:f,payload:{status:d,response:u}}},decodeBroadcast(e,t,i){let n=t.getUint8(1),o=t.getUint8(2),s=this.HEADER_LENGTH+2,r=i.decode(e.slice(s,s+n));s+=n;let a=i.decode(e.slice(s,s+o));return s+=o,{join_ref:null,ref:null,topic:r,event:a,payload:e.slice(s,e.byteLength)}}},S=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||1e4,this.transport=t.transport||l.WebSocket||y,this.establishedConnections=0,this.defaultEncoder=w.encode.bind(w),this.defaultDecoder=w.decode.bind(w),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==y?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;a&&a.addEventListener&&(a.addEventListener("pagehide",(e=>{this.conn&&(this.disconnect(),i=this.connectClock)})),a.addEventListener("pageshow",(e=>{i===this.connectClock&&(i=null,this.connect())}))),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=s(t.params||{}),this.endPoint=`${e}/websocket`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new b((()=>{this.teardown((()=>this.connect()))}),this.reconnectAfterMs)}getLongPollTransport(){return y}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=C.appendParams(C.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,i)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=s(e)),this.conn||(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(e,t,i){this.logger(e,t,i)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage((o=>{o.ref===t&&(this.off([n]),e(Date.now()-i))}));return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((([,e])=>e()))}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown((()=>this.reconnectTimer.scheduleTimeout()),1e3,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs))}teardown(e,t,i){if(!this.conn)return e&&e();this.waitForBufferDone((()=>{this.conn&&(t?this.conn.close(t,i||""):this.conn.close()),this.waitForSocketClosed((()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()}))}))}waitForBufferDone(e,t=1){5!==t&&this.conn&&this.conn.bufferedAmount?setTimeout((()=>{this.waitForBufferDone(e,t+1)}),150*t):e()}waitForSocketClosed(e,t=1){5!==t&&this.conn&&3!==this.conn.readyState?setTimeout((()=>{this.waitForSocketClosed(e,t+1)}),150*t):e()}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||1e3===t||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((([,t])=>t(e)))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach((([,n])=>{n(e,t,i)})),(t===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach((e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(m)}))}connectionState(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((t=>t.joinRef()!==e.joinRef()))}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((([t])=>-1===e.indexOf(t)))}channel(e,t={}){let i=new class{constructor(e,t,i){this.state=c,this.topic=e,this.params=s(t||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new v(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new b((()=>{this.socket.isConnected()&&this.rejoin()}),this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError((()=>this.rejoinTimer.reset()))),this.stateChangeRefs.push(this.socket.onOpen((()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()}))),this.joinPush.receive("ok",(()=>{this.state=d,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this.joinPush.receive("error",(()=>{this.state=h,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.onClose((()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=c,this.socket.remove(this)})),this.onError((e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=h,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.joinPush.receive("timeout",(()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new v(this,_,s({}),this.timeout).send(),this.state=h,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.on(f,((e,t)=>{this.trigger(this.replyEventName(t),e)}))}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(p,e)}onError(e){return this.on(m,(t=>e(t)))}on(e,t){let i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}off(e,t){this.bindings=this.bindings.filter((i=>!(i.event===e&&(void 0===t||t===i.ref))))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,i=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new v(this,e,(function(){return t}),i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=g;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(p,"leave")},i=new v(this,_,s({}),e);return i.receive("ok",(()=>t())).receive("timeout",(()=>t())),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(e,t,i){return t}isMember(e,t,i,n){return!(this.topic!==e||n&&n!==this.joinRef()&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:n}),1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=u,this.joinPush.resend(e))}trigger(e,t,i,n){let o=this.onMessage(e,t,i,n);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let s=this.bindings.filter((t=>t.event===e));for(let e=0;e<s.length;e++)s[e].callback(o,i,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===c}isErrored(){return this.state===h}isJoined(){return this.state===d}isJoining(){return this.state===u}isLeaving(){return this.state===g}}(e,t,this);return this.channels.push(i),i}push(e){if(this.hasLogger()){let{topic:t,event:i,payload:n,ref:o,join_ref:s}=e;this.log("push",`${t} ${i} (${s}, ${o})`,n)}this.isConnected()?this.encode(e,(e=>this.conn.send(e))):this.sendBuffer.push((()=>this.encode(e,(e=>this.conn.send(e)))))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout((()=>this.heartbeatTimeout()),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:i,payload:n,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${t} ${i} ${o&&"("+o+")"||""}`,n);for(let e=0;e<this.channels.length;e++){const r=this.channels[e];r.isMember(t,i,n,s)&&r.trigger(i,n,o,s)}for(let t=0;t<this.stateChangeCallbacks.message.length;t++){let[,i]=this.stateChangeCallbacks.message[t];i(e)}}))}leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t.isJoined()||t.isJoining())));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}},k="consecutive-reloads",x=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],L="data-phx-component",E="data-phx-link",N="data-phx-ref",D="data-phx-ref-src",T="track-uploads",I="data-phx-upload-ref",A="data-phx-preflighted-refs",M="drop-target",R="data-phx-active-refs",O="phx:live-file:updated",P="data-phx-skip",F="data-phx-prune",B="page-loading",H="phx-connected",W="phx-loading",V="phx-no-feedback",z="phx-error",U="data-phx-parent-id",j="data-phx-main",K="data-phx-root-id",q="feedback-for",$="phx-has-focused",G=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],Q=["checkbox","radio"],Y="phx-has-submitted",Z="data-phx-session",X=`[${Z}]`,J="data-phx-sticky",ee="data-phx-static",te="data-phx-readonly",ie="data-phx-disabled",ne="disable-with",oe="data-phx-disable-with-restore",se="hook",re="update",ae="stream",le="auto-recover",ce="phx:live-socket:debug",he="phx:live-socket:profiling",de="phx:live-socket:latency-sim",ue="mounted",ge="debounce-trigger",pe="throttled",me="debounce-prev-key",fe={debounce:300,throttle:300},_e="d",ve="s",be="e",Ce="r",ye="t",we="stream",Se=(e,t)=>console.error&&console.error(e,t),ke=e=>{let t=typeof e;return"number"===t||"string"===t&&/^(0|[1-9]\d*)$/.test(e)},xe=e=>"function"==typeof e?e:function(){return e},Le=e=>JSON.parse(JSON.stringify(e)),Ee=(e,t,i)=>{do{if(e.matches(`[${t}]`)&&!e.disabled)return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType&&!(i&&i.isSameNode(e)||e.matches(X)));return null},Ne=e=>null!==e&&"object"==typeof e&&!(e instanceof Array),De=e=>{for(let t in e)return!1;return!0},Te=(e,t)=>e&&t(e),Ie=function(e,t,i,n){e.forEach((e=>{let t=new class{constructor(e,t,i){this.liveSocket=i,this.entry=e,this.offset=0,this.chunkSize=t,this.chunkTimer=null,this.uploadChannel=i.channel(`lvu:${e.ref}`,{token:e.metadata()})}error(e){clearTimeout(this.chunkTimer),this.uploadChannel.leave(),this.entry.error(e)}upload(){this.uploadChannel.onError((e=>this.error(e))),this.uploadChannel.join().receive("ok",(e=>this.readNextChunk())).receive("error",(e=>this.error(e)))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let e=new window.FileReader,t=this.entry.file.slice(this.offset,this.chunkSize+this.offset);e.onload=e=>{if(null!==e.target.error)return Se("Read error: "+e.target.error);this.offset+=e.target.result.byteLength,this.pushChunk(e.target.result)},e.readAsArrayBuffer(t)}pushChunk(e){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",(()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout((()=>this.readNextChunk()),this.liveSocket.getLatencySim()||0))}))}}(e,i.config.chunk_size,n);t.upload()}))},Ae={canPushState:()=>void 0!==history.pushState,dropLocal(e,t,i){return e.removeItem(this.localKey(t,i))},updateLocal(e,t,i,n,o){let s=this.getLocal(e,t,i),r=this.localKey(t,i),a=null===s?n:o(s);return e.setItem(r,JSON.stringify(a)),a},getLocal(e,t,i){return JSON.parse(e.getItem(this.localKey(t,i)))},updateCurrentState(e){this.canPushState()&&history.replaceState(e(history.state||{}),"",window.location.href)},pushState(e,t,i){if(this.canPushState()){if(i!==window.location.href){if("redirect"==t.type&&t.scroll){let e=history.state||{};e.scroll=t.scroll,history.replaceState(e,"",window.location.href)}delete t.scroll,history[e+"State"](t,"",i||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():"redirect"===t.type&&window.scroll(0,0)}}else this.redirect(i)},setCookie(e,t){document.cookie=`${e}=${t}`},getCookie:e=>document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${e}s*=s*([^;]*).*$)|^.*$`),"$1"),redirect(e,t){t&&Ae.setCookie("__phoenix_flash__",t+"; max-age=60000; path=/"),window.location=e},localKey:(e,t)=>`${e}-${t}`,getHashTargetEl(e){let t=e.toString().substring(1);if(""!==t)return document.getElementById(t)||document.querySelector(`a[name="${t}"]`)}},Me=Ae,Re={byId:e=>document.getElementById(e)||Se(`no id found for ${e}`),removeClass(e,t){e.classList.remove(t),0===e.classList.length&&e.removeAttribute("class")},all(e,t,i){if(!e)return[];let n=Array.from(e.querySelectorAll(t));return i?n.forEach(i):n},childNodeLength(e){let t=document.createElement("template");return t.innerHTML=e,t.content.childElementCount},isUploadInput:e=>"file"===e.type&&null!==e.getAttribute(I),findUploadInputs(e){return this.all(e,`input[type="file"][${I}]`)},findComponentNodeList(e,t){return this.filterWithinSameLiveView(this.all(e,`[${L}="${t}"]`),e)},isPhxDestroyed:e=>!(!e.id||!Re.private(e,"destroyed")),wantsNewTab:e=>e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1===e.button||"_blank"===e.target.getAttribute("target"),isUnloadableFormSubmit(e){return!e.defaultPrevented&&!this.wantsNewTab(e)},isNewPageHref(e,t){let i;try{i=new URL(e)}catch(n){try{i=new URL(e,t)}catch(e){return!0}}return i.host!==t.host||i.protocol!==t.protocol||i.pathname!==t.pathname||i.search!==t.search||""===i.hash&&!i.href.endsWith("#")},markPhxChildDestroyed(e){this.isPhxChild(e)&&e.setAttribute(Z,""),this.putPrivate(e,"destroyed",!0)},findPhxChildrenInFragment(e,t){let i=document.createElement("template");return i.innerHTML=e,this.findPhxChildren(i.content,t)},isIgnored:(e,t)=>"ignore"===(e.getAttribute(t)||e.getAttribute("data-phx-update")),isPhxUpdate:(e,t,i)=>e.getAttribute&&i.indexOf(e.getAttribute(t))>=0,findPhxSticky(e){return this.all(e,`[${J}]`)},findPhxChildren(e,t){return this.all(e,`${X}[${U}="${t}"]`)},findParentCIDs(e,t){let i=new Set(t),n=t.reduce(((t,i)=>{let n=`[${L}="${i}"] [${L}]`;return this.filterWithinSameLiveView(this.all(e,n),e).map((e=>parseInt(e.getAttribute(L)))).forEach((e=>t.delete(e))),t}),i);return 0===n.size?new Set(t):n},filterWithinSameLiveView(e,t){return t.querySelector(X)?e.filter((e=>this.withinSameLiveView(e,t))):e},withinSameLiveView(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(null!==e.getAttribute(Z))return!1}},private:(e,t)=>e.phxPrivate&&e.phxPrivate[t],deletePrivate(e,t){e.phxPrivate&&delete e.phxPrivate[t]},putPrivate(e,t,i){e.phxPrivate||(e.phxPrivate={}),e.phxPrivate[t]=i},updatePrivate(e,t,i,n){let o=this.private(e,t);void 0===o?this.putPrivate(e,t,n(i)):this.putPrivate(e,t,n(o))},copyPrivates(e,t){t.phxPrivate&&(e.phxPrivate=t.phxPrivate)},putTitle(e){let t=document.querySelector("title");if(t){let{prefix:i,suffix:n}=t.dataset;document.title=`${i||""}${e}${n||""}`}else document.title=e},debounce(e,t,i,n,o,s,r,a){let l=e.getAttribute(i),c=e.getAttribute(o);""===l&&(l=n),""===c&&(c=s);let h=l||c;switch(h){case null:return a();case"blur":return void(this.once(e,"debounce-blur")&&e.addEventListener("blur",(()=>a())));default:let i=parseInt(h),n=()=>c?this.deletePrivate(e,pe):a(),o=this.incCycle(e,ge,n);if(isNaN(i))return Se(`invalid throttle/debounce value: ${h}`);if(c){let n=!1;if("keydown"===t.type){let i=this.private(e,me);this.putPrivate(e,me,t.key),n=i!==t.key}if(!n&&this.private(e,pe))return!1;a(),this.putPrivate(e,pe,!0),setTimeout((()=>{r()&&this.triggerCycle(e,ge)}),i)}else setTimeout((()=>{r()&&this.triggerCycle(e,ge,o)}),i);let s=e.form;s&&this.once(s,"bind-debounce")&&s.addEventListener("submit",(()=>{Array.from(new FormData(s).entries(),(([e])=>{let t=s.querySelector(`[name="${e}"]`);this.incCycle(t,ge),this.deletePrivate(t,pe)}))})),this.once(e,"bind-debounce")&&e.addEventListener("blur",(()=>this.triggerCycle(e,ge)))}},triggerCycle(e,t,i){let[n,o]=this.private(e,t);i||(i=n),i===n&&(this.incCycle(e,t),o())},once(e,t){return!0!==this.private(e,t)&&(this.putPrivate(e,t,!0),!0)},incCycle(e,t,i=function(){}){let[n]=this.private(e,t)||[0,i];return n++,this.putPrivate(e,t,[n,i]),n},discardError(e,t,i){let n=t.getAttribute&&t.getAttribute(i),o=n&&e.querySelector(`[id="${n}"], [name="${n}"], [name="${n}[]"]`);o&&(this.private(o,$)||this.private(o,Y)||t.classList.add(V))},resetForm(e,t){Array.from(e.elements).forEach((e=>{let i=`[${t}="${e.id}"],\n [${t}="${e.name}"],\n [${t}="${e.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(e,$),this.deletePrivate(e,Y),this.all(document,i,(e=>{e.classList.add(V)}))}))},showError(e,t){(e.id||e.name)&&this.all(e.form,`[${t}="${e.id}"], [${t}="${e.name}"]`,(e=>{this.removeClass(e,V)}))},isPhxChild:e=>e.getAttribute&&e.getAttribute(U),isPhxSticky:e=>e.getAttribute&&null!==e.getAttribute(J),firstPhxChild(e){return this.isPhxChild(e)?e:this.all(e,`[${U}]`)[0]},dispatchEvent(e,t,i={}){let n={bubbles:void 0===i.bubbles||!!i.bubbles,cancelable:!0,detail:i.detail||{}},o="click"===t?new MouseEvent("click",n):new CustomEvent(t,n);e.dispatchEvent(o)},cloneNode(e,t){if(void 0===t)return e.cloneNode(!0);{let i=e.cloneNode(!1);return i.innerHTML=t,i}},mergeAttrs(e,t,i={}){let n=i.exclude||[],o=i.isIgnored,s=t.attributes;for(let i=s.length-1;i>=0;i--){let o=s[i].name;n.indexOf(o)<0&&e.setAttribute(o,t.getAttribute(o))}let r=e.attributes;for(let i=r.length-1;i>=0;i--){let n=r[i].name;o?n.startsWith("data-")&&!t.hasAttribute(n)&&e.removeAttribute(n):t.hasAttribute(n)||e.removeAttribute(n)}},mergeFocusedInput(e,t){e instanceof HTMLSelectElement||Re.mergeAttrs(e,t,{exclude:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange:e=>e.setSelectionRange&&("text"===e.type||"textarea"===e.type),restoreFocus(e,t,i){if(!Re.isTextualInput(e))return;let n=e.matches(":focus");e.readOnly&&e.blur(),n||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,i)},isFormInput:e=>/^(?:input|select|textarea)$/i.test(e.tagName)&&"button"!==e.type,syncAttrsToProps(e){e instanceof HTMLInputElement&&Q.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=null!==e.getAttribute("checked"))},isTextualInput:e=>G.indexOf(e.type)>=0,isNowTriggerFormExternal:(e,t)=>e.getAttribute&&null!==e.getAttribute(t),syncPendingRef(e,t,i){let n=e.getAttribute(N);if(null===n)return!0;let o=e.getAttribute(D);return Re.isFormInput(e)||null!==e.getAttribute(i)?(Re.isUploadInput(e)&&Re.mergeAttrs(e,t,{isIgnored:!0}),Re.putPrivate(e,N,t),!1):(x.forEach((i=>{e.classList.contains(i)&&t.classList.add(i)})),t.setAttribute(N,n),t.setAttribute(D,o),!0)},cleanChildNodes(e,t){if(Re.isPhxUpdate(e,t,["append","prepend"])){let t=[];e.childNodes.forEach((e=>{e.id||(e.nodeType===Node.TEXT_NODE&&""===e.nodeValue.trim()||Se(`only HTML element tags with an id are allowed inside containers with phx-update.\n\nremoving illegal node: "${(e.outerHTML||e.nodeValue).trim()}"\n\n`),t.push(e))})),t.forEach((e=>e.remove()))}},replaceRootContainer(e,t,i){let n=new Set(["id",Z,ee,j,K]);if(e.tagName.toLowerCase()===t.toLowerCase())return Array.from(e.attributes).filter((e=>!n.has(e.name.toLowerCase()))).forEach((t=>e.removeAttribute(t.name))),Object.keys(i).filter((e=>!n.has(e.toLowerCase()))).forEach((t=>e.setAttribute(t,i[t]))),e;{let o=document.createElement(t);return Object.keys(i).forEach((e=>o.setAttribute(e,i[e]))),n.forEach((t=>o.setAttribute(t,e.getAttribute(t)))),o.innerHTML=e.innerHTML,e.replaceWith(o),o}},getSticky(e,t,i){let n=(Re.private(e,"sticky")||[]).find((([e])=>t===e));if(n){let[e,t,i]=n;return i}return"function"==typeof i?i():i},deleteSticky(e,t){this.updatePrivate(e,"sticky",[],(e=>e.filter((([e,i])=>e!==t))))},putSticky(e,t,i){let n=i(e);this.updatePrivate(e,"sticky",[],(e=>{let o=e.findIndex((([e])=>t===e));return o>=0?e[o]=[t,i,n]:e.push([t,i,n]),e}))},applyStickyOperations(e){let t=Re.private(e,"sticky");t&&t.forEach((([t,i,n])=>this.putSticky(e,t,i)))}},Oe=Re,Pe=class{static isActive(e,t){let i=void 0===t._phxRef,n=e.getAttribute(R).split(",").indexOf(Be.genFileRef(t))>=0;return t.size>0&&(i||n)}static isPreflighted(e,t){return e.getAttribute(A).split(",").indexOf(Be.genFileRef(t))>=0&&this.isActive(e,t)}constructor(e,t,i){this.ref=Be.genFileRef(t),this.fileEl=e,this.file=t,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(O,this._onElUpdated)}metadata(){return this.meta}progress(e){this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,(()=>{Be.untrackFile(this.fileEl,this.file),this._onDone()}))):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(e="failed"){this.fileEl.removeEventListener(O,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:e}),Be.clearFiles(this.fileEl)}onDone(e){this._onDone=()=>{this.fileEl.removeEventListener(O,this._onElUpdated),e()}}onElUpdated(){-1===this.fileEl.getAttribute(R).split(",").indexOf(this.ref)&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(e){if(this.meta.uploader){let t=e[this.meta.uploader]||Se(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:t}}return{name:"channel",callback:Ie}}zipPostFlight(e){this.meta=e.entries[this.ref],this.meta||Se(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:e})}},Fe=0,Be=class{static genFileRef(e){let t=e._phxRef;return void 0!==t?t:(e._phxRef=(Fe++).toString(),e._phxRef)}static getEntryDataURL(e,t,i){let n=this.activeFiles(e).find((e=>this.genFileRef(e)===t));i(URL.createObjectURL(n))}static hasUploadsInProgress(e){let t=0;return Oe.findUploadInputs(e).forEach((e=>{e.getAttribute(A)!==e.getAttribute("data-phx-done-refs")&&t++})),t>0}static serializeUploads(e){let t=this.activeFiles(e),i={};return t.forEach((t=>{let n={path:e.name},o=e.getAttribute(I);i[o]=i[o]||[],n.ref=this.genFileRef(t),n.last_modified=t.lastModified,n.name=t.name||n.ref,n.relative_path=t.webkitRelativePath,n.type=t.type,n.size=t.size,i[o].push(n)})),i}static clearFiles(e){e.value=null,e.removeAttribute(I),Oe.putPrivate(e,"files",[])}static untrackFile(e,t){Oe.putPrivate(e,"files",Oe.private(e,"files").filter((e=>!Object.is(e,t))))}static trackFiles(e,t,i){if(null!==e.getAttribute("multiple")){let i=t.filter((t=>!this.activeFiles(e).find((e=>Object.is(e,t)))));Oe.putPrivate(e,"files",this.activeFiles(e).concat(i)),e.value=null}else i&&i.files.length>0&&(e.files=i.files),Oe.putPrivate(e,"files",t)}static activeFileInputs(e){let t=Oe.findUploadInputs(e);return Array.from(t).filter((e=>e.files&&this.activeFiles(e).length>0))}static activeFiles(e){return(Oe.private(e,"files")||[]).filter((t=>Pe.isActive(e,t)))}static inputsAwaitingPreflight(e){let t=Oe.findUploadInputs(e);return Array.from(t).filter((e=>this.filesAwaitingPreflight(e).length>0))}static filesAwaitingPreflight(e){return this.activeFiles(e).filter((t=>!Pe.isPreflighted(e,t)))}constructor(e,t,i){this.view=t,this.onComplete=i,this._entries=Array.from(Be.filesAwaitingPreflight(e)||[]).map((i=>new Pe(e,i,t))),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(e,t,i){this._entries=this._entries.map((t=>(t.zipPostFlight(e),t.onDone((()=>{this.numEntriesInProgress--,0===this.numEntriesInProgress&&this.onComplete()})),t)));let n=this._entries.reduce(((e,t)=>{let{name:n,callback:o}=t.uploader(i.uploaders);return e[n]=e[n]||{callback:o,entries:[]},e[n].entries.push(t),e}),{});for(let o in n){let{callback:s,entries:r}=n[o];s(r,t,e,i)}}},He={focusMain(){let e=document.querySelector("main h1, main, h1");if(e){let t=e.tabIndex;e.tabIndex=-1,e.focus(),e.tabIndex=t}},anyOf:(e,t)=>t.find((t=>e instanceof t)),isFocusable(e,t){return e instanceof HTMLAnchorElement&&"ignore"!==e.rel||e instanceof HTMLAreaElement&&void 0!==e.href||!e.disabled&&this.anyOf(e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||e instanceof HTMLIFrameElement||e.tabIndex>0||!t&&0===e.tabIndex&&null!==e.getAttribute("tabindex")&&"true"!==e.getAttribute("aria-hidden")},attemptFocus(e,t){if(this.isFocusable(e,t))try{e.focus()}catch(e){}return!!document.activeElement&&document.activeElement.isSameNode(e)},focusFirstInteractive(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t,!0)||this.focusFirstInteractive(t,!0))return!0;t=t.nextElementSibling}},focusFirst(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t)||this.focusFirst(t))return!0;t=t.nextElementSibling}},focusLast(e){let t=e.lastElementChild;for(;t;){if(this.attemptFocus(t)||this.focusLast(t))return!0;t=t.previousElementSibling}}},We={LiveFileUpload:{activeRefs(){return this.el.getAttribute(R)},preflightedRefs(){return this.el.getAttribute(A)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,""===e&&this.__view.cancelSubmit(this.el.form)),""===this.activeRefs()&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(O))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(I)),Be.getEntryDataURL(this.inputEl,this.ref,(e=>{this.url=e,this.el.src=e}))},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",(()=>He.focusLast(this.el))),this.focusEnd.addEventListener("focus",(()=>He.focusFirst(this.el))),this.el.addEventListener("phx:show-end",(()=>this.el.focus())),"none"!==window.getComputedStyle(this.el).display&&He.focusFirst(this.el)}}},Ve="undefined"==typeof document?void 0:document,ze=!!Ve&&"content"in Ve.createElement("template"),Ue=!!Ve&&Ve.createRange&&"createContextualFragment"in Ve.createRange();function je(e,t){var i,n,o=e.nodeName,s=t.nodeName;return o===s||(i=o.charCodeAt(0),n=s.charCodeAt(0),i<=90&&n>=97?o===s.toUpperCase():n<=90&&i>=97&&s===o.toUpperCase())}function Ke(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var qe={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}Ke(e,t,"selected")},INPUT:function(e,t){Ke(e,t,"checked"),Ke(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,s=0,r=e.firstChild;r;)if("OPTGROUP"===(n=r.nodeName&&r.nodeName.toUpperCase()))r=(i=r).firstChild;else{if("OPTION"===n){if(r.hasAttribute("selected")){o=s;break}s++}!(r=r.nextSibling)&&i&&(r=i.nextSibling,i=null)}e.selectedIndex=o}}};function $e(){}function Ge(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var Qe,Ye=(Qe=function(e,t){var i,n,o,s,r=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var a=r.length-1;a>=0;a--)n=(i=r[a]).name,o=i.namespaceURI,s=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==s&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,s))):e.getAttribute(n)!==s&&e.setAttribute(n,s);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}},function(e,t,i){if(i||(i={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName||"BODY"===e.nodeName){var o=t;(t=Ve.createElement("html")).innerHTML=o}else s=(s=t).trim(),t=ze?function(e){var t=Ve.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(s):Ue?function(e){return n||(n=Ve.createRange()).selectNode(Ve.body),n.createContextualFragment(e).childNodes[0]}(s):function(e){var t=Ve.createElement("body");return t.innerHTML=e,t.childNodes[0]}(s);else 11===t.nodeType&&(t=t.firstElementChild);var s,r=i.getNodeKey||Ge,a=i.onBeforeNodeAdded||$e,l=i.onNodeAdded||$e,c=i.onBeforeElUpdated||$e,h=i.onElUpdated||$e,d=i.onBeforeNodeDiscarded||$e,u=i.onNodeDiscarded||$e,g=i.onBeforeElChildrenUpdated||$e,p=i.skipFromChildren||$e,m=i.addChild||function(e,t){return e.appendChild(t)},f=!0===i.childrenOnly,_=Object.create(null),v=[];function b(e){v.push(e)}function C(e,t){if(1===e.nodeType)for(var i=e.firstChild;i;){var n=void 0;t&&(n=r(i))?b(n):(u(i),i.firstChild&&C(i,t)),i=i.nextSibling}}function y(e,t,i){!1!==d(e)&&(t&&t.removeChild(e),u(e),C(e,i))}function w(e){l(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=r(t);if(n){var o=_[n];o&&je(t,o)?(t.parentNode.replaceChild(o,t),S(o,t)):w(t)}else w(t);t=i}}function S(e,t,i){var n=r(t);if(n&&delete _[n],!i){if(!1===c(e,t))return;if(Qe(e,t),h(e),!1===g(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var i,n,o,s,l,c=p(e),h=t.firstChild,d=e.firstChild;e:for(;h;){for(s=h.nextSibling,i=r(h);!c&&d;){if(o=d.nextSibling,h.isSameNode&&h.isSameNode(d)){h=s,d=o;continue e}n=r(d);var u=d.nodeType,g=void 0;if(u===h.nodeType&&(1===u?(i?i!==n&&((l=_[i])?o===l?g=!1:(e.insertBefore(l,d),n?b(n):y(d,e,!0),d=l):g=!1):n&&(g=!1),(g=!1!==g&&je(d,h))&&S(d,h)):3!==u&&8!=u||(g=!0,d.nodeValue!==h.nodeValue&&(d.nodeValue=h.nodeValue))),g){h=s,d=o;continue e}n?b(n):y(d,e,!0),d=o}if(i&&(l=_[i])&&je(l,h))c||m(e,l),S(l,h);else{var f=a(h);!1!==f&&(f&&(h=f),h.actualize&&(h=h.actualize(e.ownerDocument||Ve)),m(e,h),w(h))}h=s,d=o}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=r(t))?b(i):y(t,e,!0),t=n}}(e,d,n);var v=qe[e.nodeName];v&&v(e,t)}(e,t):qe.TEXTAREA(e,t)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=r(i);n&&(_[n]=i),e(i),i=i.nextSibling}}(e);var k,x,L=e,E=L.nodeType,N=t.nodeType;if(!f)if(1===E)1===N?je(e,t)||(u(e),L=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(e,(k=t.nodeName,(x=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==x?Ve.createElementNS(x,k):Ve.createElement(k)))):L=t;else if(3===E||8===E){if(N===E)return L.nodeValue!==t.nodeValue&&(L.nodeValue=t.nodeValue),L;L=t}if(L===t)u(e);else{if(t.isSameNode&&t.isSameNode(L))return;if(S(L,t,f),v)for(var D=0,T=v.length;D<T;D++){var I=_[v[D]];I&&y(I,I.parentNode,!1)}}return!f&&L!==e&&e.parentNode&&(L.actualize&&(L=L.actualize(e.ownerDocument||Ve)),e.parentNode.replaceChild(L,e)),L}),Ze=Ye,Xe=class{static patchEl(e,t,i){Ze(e,t,{childrenOnly:!1,onBeforeElUpdated:(e,t)=>{if(i&&i.isSameNode(e)&&Oe.isFormInput(e))return Oe.mergeFocusedInput(e,t),!1}})}constructor(e,t,i,n,o,s){this.view=e,this.liveSocket=e.liveSocket,this.container=t,this.id=i,this.rootID=e.root.id,this.html=n,this.streams=o,this.streamInserts={},this.targetCID=s,this.cidPatch=ke(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(e,t){this.callbacks[`before${e}`].push(t)}after(e,t){this.callbacks[`after${e}`].push(t)}trackBefore(e,...t){this.callbacks[`before${e}`].forEach((e=>e(...t)))}trackAfter(e,...t){this.callbacks[`after${e}`].forEach((e=>e(...t)))}markPrunableContentForRemoval(){let e=this.liveSocket.binding(re);Oe.all(this.container,`[${e}=stream]`,(e=>e.innerHTML="")),Oe.all(this.container,`[${e}=append] > *, [${e}=prepend] > *`,(e=>{e.setAttribute(F,"")}))}perform(){let{view:e,liveSocket:t,container:i,html:n}=this,o=this.isCIDPatch()?this.targetCIDContainer(n):i;if(this.isCIDPatch()&&!o)return;let s=t.getActiveElement(),{selectionStart:r,selectionEnd:a}=s&&Oe.hasSelectionRange(s)?s:{},l=t.binding(re),c=t.binding(q),h=t.binding(ne),d=t.binding("trigger-action"),u=[],g=[],p=[],m=null,f=t.time("premorph container prep",(()=>this.buildDiffHTML(i,n,l,o)));return this.trackBefore("added",i),this.trackBefore("updated",i,i),t.time("morphdom",(()=>{this.streams.forEach((([e,t])=>{this.streamInserts=Object.assign(this.streamInserts,e),t.forEach((e=>{let t=i.querySelector(`[id="${e}"]`);t&&(this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t)))}))})),Ze(o,f,{childrenOnly:null===o.getAttribute(L),getNodeKey:e=>Oe.isPhxDestroyed(e)?null:e.id,skipFromChildren:e=>e.getAttribute(l)===ae,addChild:(e,t)=>{let i=t.id?this.streamInserts[t.id]:void 0;if(void 0===i)return e.appendChild(t);if(Oe.putPrivate(t,ae,!0),0===i)e.insertAdjacentElement("afterbegin",t);else if(-1===i)e.appendChild(t);else if(i>0){let n=Array.from(e.children)[i];e.insertBefore(t,n)}},onBeforeNodeAdded:e=>(this.trackBefore("added",e),e),onNodeAdded:t=>{t instanceof HTMLImageElement&&t.srcset?t.srcset=t.srcset:t instanceof HTMLVideoElement&&t.autoplay&&t.play(),Oe.isNowTriggerFormExternal(t,d)&&(m=t),Oe.discardError(o,t,c),(Oe.isPhxChild(t)&&e.ownsElement(t)||Oe.isPhxSticky(t)&&e.ownsElement(t.parentNode))&&this.trackAfter("phxChildAdded",t),u.push(t)},onNodeDiscarded:e=>this.onNodeDiscarded(e),onBeforeNodeDiscarded:e=>!((!e.getAttribute||null===e.getAttribute(F))&&(Oe.private(e,ae)||null!==e.parentElement&&Oe.isPhxUpdate(e.parentElement,l,["append","prepend"])&&e.id||this.maybePendingRemove(e)||this.skipCIDSibling(e))),onElUpdated:e=>{Oe.isNowTriggerFormExternal(e,d)&&(m=e),g.push(e),this.maybeReOrderStream(e)},onBeforeElUpdated:(e,t)=>{if(Oe.cleanChildNodes(t,l),this.skipCIDSibling(t))return!1;if(Oe.isPhxSticky(e))return!1;if(Oe.isIgnored(e,l)||e.form&&e.form.isSameNode(m))return this.trackBefore("updated",e,t),Oe.mergeAttrs(e,t,{isIgnored:!0}),g.push(e),Oe.applyStickyOperations(e),!1;if("number"===e.type&&e.validity&&e.validity.badInput)return!1;if(!Oe.syncPendingRef(e,t,h))return Oe.isUploadInput(e)&&(this.trackBefore("updated",e,t),g.push(e)),Oe.applyStickyOperations(e),!1;if(Oe.isPhxChild(t)){let i=e.getAttribute(Z);return Oe.mergeAttrs(e,t,{exclude:[ee]}),""!==i&&e.setAttribute(Z,i),e.setAttribute(K,this.rootID),Oe.applyStickyOperations(e),!1}return Oe.copyPrivates(t,e),Oe.discardError(o,t,c),s&&e.isSameNode(s)&&Oe.isFormInput(e)&&"hidden"!==e.type?(this.trackBefore("updated",e,t),Oe.mergeFocusedInput(e,t),Oe.syncAttrsToProps(e),g.push(e),Oe.applyStickyOperations(e),!1):(Oe.isPhxUpdate(t,l,["append","prepend"])&&p.push(new class{constructor(e,t,i){let n=new Set,o=new Set([...t.children].map((e=>e.id))),s=[];Array.from(e.children).forEach((e=>{if(e.id&&(n.add(e.id),o.has(e.id))){let t=e.previousElementSibling&&e.previousElementSibling.id;s.push({elementId:e.id,previousElementId:t})}})),this.containerId=t.id,this.updateType=i,this.elementsToModify=s,this.elementIdsToAdd=[...o].filter((e=>!n.has(e)))}perform(){let e=Oe.byId(this.containerId);this.elementsToModify.forEach((t=>{t.previousElementId?Te(document.getElementById(t.previousElementId),(e=>{Te(document.getElementById(t.elementId),(t=>{t.previousElementSibling&&t.previousElementSibling.id==e.id||e.insertAdjacentElement("afterend",t)}))})):Te(document.getElementById(t.elementId),(t=>{null==t.previousElementSibling||e.insertAdjacentElement("afterbegin",t)}))})),"prepend"==this.updateType&&this.elementIdsToAdd.reverse().forEach((t=>{Te(document.getElementById(t),(t=>e.insertAdjacentElement("afterbegin",t)))}))}}(e,t,t.getAttribute(l))),Oe.syncAttrsToProps(t),Oe.applyStickyOperations(t),this.trackBefore("updated",e,t),!0)}})})),t.isDebugEnabled()&&function(){let e=new Set,t=document.querySelectorAll("*[id]");for(let i=0,n=t.length;i<n;i++)e.has(t[i].id)?console.error(`Multiple IDs detected: ${t[i].id}. Ensure unique element ids.`):e.add(t[i].id)}(),p.length>0&&t.time("post-morph append/prepend restoration",(()=>{p.forEach((e=>e.perform()))})),t.silenceEvents((()=>Oe.restoreFocus(s,r,a))),Oe.dispatchEvent(document,"phx:update"),u.forEach((e=>this.trackAfter("added",e))),g.forEach((e=>this.trackAfter("updated",e))),this.transitionPendingRemoves(),m&&(t.unload(),m.submit()),!0}onNodeDiscarded(e){(Oe.isPhxChild(e)||Oe.isPhxSticky(e))&&this.liveSocket.destroyViewByEl(e),this.trackAfter("discarded",e)}maybePendingRemove(e){return!(!e.getAttribute||null===e.getAttribute(this.phxRemove)||(this.pendingRemoves.push(e),0))}maybeReOrderStream(e){let t=e.id?this.streamInserts[e.id]:void 0;if(void 0!==t)if(Oe.putPrivate(e,ae,!0),0===t)e.parentElement.insertBefore(e,e.parentElement.firstElementChild);else if(t>0){let i=Array.from(e.parentElement.children),n=i.indexOf(e);if(t>=i.length-1)e.parentElement.appendChild(e);else{let o=i[t];n>t?e.parentElement.insertBefore(e,o):e.parentElement.insertBefore(e,o.nextElementSibling)}}}transitionPendingRemoves(){let{pendingRemoves:e,liveSocket:t}=this;e.length>0&&(t.transitionRemoves(e),t.requestDOMUpdate((()=>{e.forEach((e=>{let i=Oe.firstPhxChild(e);i&&t.destroyViewByEl(i),e.remove()})),this.trackAfter("transitionsDiscarded",e)})))}isCIDPatch(){return this.cidPatch}skipCIDSibling(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute(P)}targetCIDContainer(e){if(!this.isCIDPatch())return;let[t,...i]=Oe.findComponentNodeList(this.container,this.targetCID);return 0===i.length&&1===Oe.childNodeLength(e)?t:t&&t.parentNode}buildDiffHTML(e,t,i,n){let o=this.isCIDPatch(),s=o&&n.getAttribute(L)===this.targetCID.toString();if(!o||s)return t;{let e=null,i=document.createElement("template");e=Oe.cloneNode(n);let[o,...s]=Oe.findComponentNodeList(e,this.targetCID);return i.innerHTML=t,s.forEach((e=>e.remove())),Array.from(e.childNodes).forEach((e=>{e.id&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(L)!==this.targetCID.toString()&&(e.setAttribute(P,""),e.innerHTML="")})),Array.from(i.content.childNodes).forEach((t=>e.insertBefore(t,o))),o.remove(),e.outerHTML}}indexOf(e,t){return Array.from(e.children).indexOf(t)}},Je=class{static extract(e){let{[Ce]:t,[be]:i,[ye]:n}=e;return delete e[Ce],delete e[be],delete e[ye],{diff:e,title:n,reply:t||null,events:i||[]}}constructor(e,t){this.viewId=e,this.rendered={},this.mergeDiff(t)}parentViewId(){return this.viewId}toString(e){let[t,i]=this.recursiveToString(this.rendered,this.rendered.c,e);return[t,i]}recursiveToString(e,t=e.c,i){let n={buffer:"",components:t,onlyCids:i=i?new Set(i):null,streams:new Set};return this.toOutputBuffer(e,null,n),[n.buffer,n.streams]}componentCIDs(e){return Object.keys(e.c||{}).map((e=>parseInt(e)))}isComponentOnlyDiff(e){return!!e.c&&1===Object.keys(e).length}getComponent(e,t){return e.c[t]}mergeDiff(e){let t=e.c,i={};if(delete e.c,this.rendered=this.mutableMerge(this.rendered,e),this.rendered.c=this.rendered.c||{},t){let n=this.rendered.c;for(let e in t)t[e]=this.cachedFindComponent(e,t[e],n,t,i);for(let e in t)n[e]=t[e];e.c=t}}cachedFindComponent(e,t,i,n,o){if(o[e])return o[e];{let s,r,a=t[ve];if(ke(a)){let e;e=a>0?this.cachedFindComponent(a,n[a],i,n,o):i[-a],r=e[ve],s=this.cloneMerge(e,t),s[ve]=r}else s=void 0!==t[ve]?t:this.cloneMerge(i[e]||{},t);return o[e]=s,s}}mutableMerge(e,t){return void 0!==t[ve]?t:(this.doMutableMerge(e,t),e)}doMutableMerge(e,t){for(let i in t){let n=t[i],o=e[i];Ne(n)&&void 0===n[ve]&&Ne(o)?this.doMutableMerge(o,n):e[i]=n}}cloneMerge(e,t){let i={...e,...t};for(let n in i){let o=t[n],s=e[n];Ne(o)&&void 0===o[ve]&&Ne(s)&&(i[n]=this.cloneMerge(s,o))}return i}componentToString(e){let[t,i]=this.recursiveCIDToString(this.rendered.c,e);return[t,i]}pruneCIDs(e){e.forEach((e=>delete this.rendered.c[e]))}get(){return this.rendered}isNewFingerprint(e={}){return!!e[ve]}templateStatic(e,t){return"number"==typeof e?t[e]:e}toOutputBuffer(e,t,i){if(e[_e])return this.comprehensionToBuffer(e,t,i);let{[ve]:n}=e;n=this.templateStatic(n,t),i.buffer+=n[0];for(let o=1;o<n.length;o++)this.dynamicToBuffer(e[o-1],t,i),i.buffer+=n[o]}comprehensionToBuffer(e,t,i){let{[_e]:n,[ve]:o,[we]:s}=e,[r,a]=s||[{},[]];o=this.templateStatic(o,t);let l=t||e.p;for(let e=0;e<n.length;e++){let t=n[e];i.buffer+=o[0];for(let e=1;e<o.length;e++)this.dynamicToBuffer(t[e-1],l,i),i.buffer+=o[e]}void 0!==s&&(e[_e].length>0||a.length>0)&&(e[_e]=[],i.streams.add(s))}dynamicToBuffer(e,t,i){if("number"==typeof e){let[t,n]=this.recursiveCIDToString(i.components,e,i.onlyCids);i.buffer+=t,i.streams=new Set([...i.streams,...n])}else Ne(e)?this.toOutputBuffer(e,t,i):i.buffer+=e}recursiveCIDToString(e,t,i){let n=e[t]||Se(`no component for CID ${t}`,e),o=document.createElement("template"),[s,r]=this.recursiveToString(n,e,i);o.innerHTML=s;let a=o.content,l=i&&!i.has(t),[c,h]=Array.from(a.childNodes).reduce((([e,i],n,s)=>n.nodeType===Node.ELEMENT_NODE?n.getAttribute(L)?[e,!0]:(n.setAttribute(L,t),n.id||(n.id=`${this.parentViewId()}-${t}-${s}`),l&&(n.setAttribute(P,""),n.innerHTML=""),[!0,i]):""!==n.nodeValue.trim()?(Se(`only HTML element tags are allowed at the root of components.\n\ngot: "${n.nodeValue.trim()}"\n\nwithin:\n`,o.innerHTML.trim()),n.replaceWith(this.createSpan(n.nodeValue,t)),[!0,i]):(n.remove(),[e,i])),[!1,!1]);return c||h?!c&&h?(Se("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",o.innerHTML.trim()),[o.innerHTML,r]):[o.innerHTML,r]:(Se("expected at least one HTML element tag inside a component, but the component is empty:\n",o.innerHTML.trim()),[this.createSpan("",t).outerHTML,r])}createSpan(e,t){let i=document.createElement("span");return i.innerText=e,i.setAttribute(L,t),i}},et=1,tt=class{static makeID(){return et++}static elementID(e){return e.phxHookId}constructor(e,t,i){this.__view=e,this.liveSocket=e.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,this.el=t,this.el.phxHookId=this.constructor.makeID();for(let e in this.__callbacks)this[e]=this.__callbacks[e]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(e,t={},i=function(){}){return this.__view.pushHookEvent(null,e,t,i)}pushEventTo(e,t,i={},n=function(){}){return this.__view.withinTargets(e,((e,o)=>e.pushHookEvent(o,t,i,n)))}handleEvent(e,t){let i=(i,n)=>n?e:t(i.detail);return window.addEventListener(`phx:${e}`,i),this.__listeners.add(i),i}removeHandleEvent(e){let t=e(null,!0);window.removeEventListener(`phx:${t}`,e),this.__listeners.delete(e)}upload(e,t){return this.__view.dispatchUploads(e,t)}uploadTo(e,t,i){return this.__view.withinTargets(e,(e=>e.dispatchUploads(t,i)))}__cleanup__(){this.__listeners.forEach((e=>this.removeHandleEvent(e)))}},it=null,nt={exec(e,t,i,n,o){let[s,r]=o||[null,{}];("["===t.charAt(0)?JSON.parse(t):[[s,r]]).forEach((([o,a])=>{o===s&&r.data&&(a.data=Object.assign(a.data||{},r.data)),this.filterToEls(n,a).forEach((s=>{this[`exec_${o}`](e,t,i,n,s,a)}))}))},isVisible:e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length>0),exec_dispatch(e,t,i,n,o,{to:s,event:r,detail:a,bubbles:l}){(a=a||{}).dispatcher=n,Oe.dispatchEvent(o,r,{detail:a,bubbles:l})},exec_push(e,t,i,n,o,s){if(!i.isConnected())return;let{event:r,data:a,target:l,page_loading:c,loading:h,value:d,dispatcher:u}=s,g={loading:h,value:d,target:l,page_loading:!!c},p="change"===e&&u?u:n,m=l||p.getAttribute(i.binding("target"))||p;i.withinTargets(m,((i,o)=>{if("change"===e){let{newCid:e,_target:a,callback:l}=s;a=a||(Oe.isFormInput(n)?n.name:void 0),a&&(g._target=a),i.pushInput(n,o,e,r||t,g,l)}else"submit"===e?i.submitForm(n,o,r||t,g):i.pushEvent(e,n,o,r||t,a,g)}))},exec_navigate(e,t,i,n,o,{href:s,replace:r}){i.liveSocket.historyRedirect(s,r?"replace":"push")},exec_patch(e,t,i,n,o,{href:s,replace:r}){i.liveSocket.pushHistoryPatch(s,r?"replace":"push",n)},exec_focus(e,t,i,n,o){window.requestAnimationFrame((()=>He.attemptFocus(o)))},exec_focus_first(e,t,i,n,o){window.requestAnimationFrame((()=>He.focusFirstInteractive(o)||He.focusFirst(o)))},exec_push_focus(e,t,i,n,o){window.requestAnimationFrame((()=>it=o||n))},exec_pop_focus(e,t,i,n,o){window.requestAnimationFrame((()=>{it&&it.focus(),it=null}))},exec_add_class(e,t,i,n,o,{names:s,transition:r,time:a}){this.addOrRemoveClasses(o,s,[],r,a,i)},exec_remove_class(e,t,i,n,o,{names:s,transition:r,time:a}){this.addOrRemoveClasses(o,[],s,r,a,i)},exec_transition(e,t,i,n,o,{time:s,transition:r}){this.addOrRemoveClasses(o,[],[],r,s,i)},exec_toggle(e,t,i,n,o,{display:s,ins:r,outs:a,time:l}){this.toggle(e,i,o,s,r,a,l)},exec_show(e,t,i,n,o,{display:s,transition:r,time:a}){this.show(e,i,o,s,r,a)},exec_hide(e,t,i,n,o,{display:s,transition:r,time:a}){this.hide(e,i,o,s,r,a)},exec_set_attr(e,t,i,n,o,{attr:[s,r]}){this.setOrRemoveAttrs(o,[[s,r]],[])},exec_remove_attr(e,t,i,n,o,{attr:s}){this.setOrRemoveAttrs(o,[],[s])},show(e,t,i,n,o,s){this.isVisible(i)||this.toggle(e,t,i,n,o,null,s)},hide(e,t,i,n,o,s){this.isVisible(i)&&this.toggle(e,t,i,n,null,o,s)},toggle(e,t,i,n,o,s,r){let[a,l,c]=o||[[],[],[]],[h,d,u]=s||[[],[],[]];if(a.length>0||h.length>0)if(this.isVisible(i)){let e=()=>{this.addOrRemoveClasses(i,d,a.concat(l).concat(c)),window.requestAnimationFrame((()=>{this.addOrRemoveClasses(i,h,[]),window.requestAnimationFrame((()=>this.addOrRemoveClasses(i,u,d)))}))};i.dispatchEvent(new Event("phx:hide-start")),t.transition(r,e,(()=>{this.addOrRemoveClasses(i,[],h.concat(u)),Oe.putSticky(i,"toggle",(e=>e.style.display="none")),i.dispatchEvent(new Event("phx:hide-end"))}))}else{if("remove"===e)return;let o=()=>{this.addOrRemoveClasses(i,l,h.concat(d).concat(u));let e=n||this.defaultDisplay(i);Oe.putSticky(i,"toggle",(t=>t.style.display=e)),window.requestAnimationFrame((()=>{this.addOrRemoveClasses(i,a,[]),window.requestAnimationFrame((()=>this.addOrRemoveClasses(i,c,l)))}))};i.dispatchEvent(new Event("phx:show-start")),t.transition(r,o,(()=>{this.addOrRemoveClasses(i,[],a.concat(c)),i.dispatchEvent(new Event("phx:show-end"))}))}else this.isVisible(i)?window.requestAnimationFrame((()=>{i.dispatchEvent(new Event("phx:hide-start")),Oe.putSticky(i,"toggle",(e=>e.style.display="none")),i.dispatchEvent(new Event("phx:hide-end"))})):window.requestAnimationFrame((()=>{i.dispatchEvent(new Event("phx:show-start"));let e=n||this.defaultDisplay(i);Oe.putSticky(i,"toggle",(t=>t.style.display=e)),i.dispatchEvent(new Event("phx:show-end"))}))},addOrRemoveClasses(e,t,i,n,o,s){let[r,a,l]=n||[[],[],[]];if(r.length>0){let n=()=>this.addOrRemoveClasses(e,a.concat(r),[]),c=()=>this.addOrRemoveClasses(e,t.concat(l),i.concat(r).concat(a));return s.transition(o,n,c)}window.requestAnimationFrame((()=>{let[n,o]=Oe.getSticky(e,"classes",[[],[]]),s=t.filter((t=>n.indexOf(t)<0&&!e.classList.contains(t))),r=i.filter((t=>o.indexOf(t)<0&&e.classList.contains(t))),a=n.filter((e=>i.indexOf(e)<0)).concat(s),l=o.filter((e=>t.indexOf(e)<0)).concat(r);Oe.putSticky(e,"classes",(e=>(e.classList.remove(...l),e.classList.add(...a),[a,l])))}))},setOrRemoveAttrs(e,t,i){let[n,o]=Oe.getSticky(e,"attrs",[[],[]]),s=t.map((([e,t])=>e)).concat(i),r=n.filter((([e,t])=>!s.includes(e))).concat(t),a=o.filter((e=>!s.includes(e))).concat(i);Oe.putSticky(e,"attrs",(e=>(a.forEach((t=>e.removeAttribute(t))),r.forEach((([t,i])=>e.setAttribute(t,i))),[r,a])))},hasAllClasses:(e,t)=>t.every((t=>e.classList.contains(t))),isToggledOut(e,t){return!this.isVisible(e)||this.hasAllClasses(e,t)},filterToEls:(e,{to:t})=>t?Oe.all(document,t):[e],defaultDisplay:e=>({tr:"table-row",td:"table-cell"}[e.tagName.toLowerCase()]||"block")},ot=nt,st=(e,t,i=[])=>{let n=new FormData(e),o=[];n.forEach(((e,t,i)=>{e instanceof File&&o.push(t)})),o.forEach((e=>n.delete(e)));let s=new URLSearchParams;for(let[e,t]of n.entries())(0===i.length||i.indexOf(e)>=0)&&s.append(e,t);for(let e in t)s.append(e,t[e]);return s.toString()},rt=class{constructor(e,t,i,n,o){this.isDead=!1,this.liveSocket=t,this.flash=n,this.parent=i,this.root=i?i.root:this,this.el=e,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(e){e&&e()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,(()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(o),session:this.getSession(),static:this.getStatic(),flash:this.flash})))}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(j)}connectParams(e){let t=this.liveSocket.params(this.el),i=Oe.all(document,`[${this.binding("track-static")}]`).map((e=>e.src||e.href)).filter((e=>"string"==typeof e));return i.length>0&&(t._track_static=i),t._mounts=this.joinCount,t._live_referer=e,t}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Z)}getStatic(){let e=this.el.getAttribute(ee);return""===e?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let t=()=>{e();for(let e in this.viewHooks)this.destroyHook(this.viewHooks[e])};Oe.markPhxChildDestroyed(this.el),this.log("destroyed",(()=>["the child has been removed from the parent"])),this.channel.leave().receive("ok",t).receive("error",t).receive("timeout",t)}setContainerClasses(...e){this.el.classList.remove(H,W,z),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout((()=>this.showLoader()),e);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(W)}}execAll(e){Oe.all(this.el,`[${e}]`,(t=>this.liveSocket.execJS(t,t.getAttribute(e))))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(H),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,t){this.liveSocket.log(this,e,t)}transition(e,t,i=function(){}){this.liveSocket.transition(e,t,i)}withinTargets(e,t){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,(i=>t(i,e)));if(ke(e))0===Oe.findComponentNodeList(this.el,e).length?Se(`no component found matching phx-target of ${e}`):t(this,parseInt(e));else{let i=Array.from(document.querySelectorAll(e));0===i.length&&Se(`nothing found matching the phx-target selector "${e}"`),i.forEach((e=>this.liveSocket.owner(e,(i=>t(i,e)))))}}applyDiff(e,t,i){this.log(e,(()=>["",Le(t)]));let{diff:n,reply:o,events:s,title:r}=Je.extract(t);i({diff:n,reply:o,events:s}),r&&window.requestAnimationFrame((()=>Oe.putTitle(r)))}onJoin(e){let{rendered:t,container:i}=e;if(i){let[e,t]=i;this.el=Oe.replaceRootContainer(this.el,e,t)}this.childJoins=0,this.joinPending=!0,this.flash=null,Me.dropLocal(this.liveSocket.localStorage,window.location.pathname,k),this.applyDiff("mount",t,(({diff:t,events:i})=>{this.rendered=new Je(this.id,t);let[n,o]=this.renderContainer(null,"join");this.dropPendingRefs();let s=this.formsForRecovery(n);this.joinCount++,s.length>0?s.forEach((([e,t,r],a)=>{this.pushFormRecovery(e,r,(e=>{a===s.length-1&&this.onJoinComplete(e,n,o,i)}))})):this.onJoinComplete(e,n,o,i)}))}dropPendingRefs(){Oe.all(document,`[${D}="${this.id}"][${N}]`,(e=>{e.removeAttribute(N),e.removeAttribute(D)}))}onJoinComplete({live_patch:e},t,i,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,t,i,n);0===Oe.findPhxChildrenInFragment(t,this.id).filter((e=>{let t=e.id&&this.el.querySelector(`[id="${e.id}"]`),i=t&&t.getAttribute(ee);return i&&e.setAttribute(ee,i),this.joinChild(e)})).length?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,t,i,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i,n)])}attachTrueDocEl(){this.el=Oe.byId(this.id),this.el.setAttribute(K,this.root.id)}execNewMounted(){Oe.all(this.el,`[${this.binding(se)}], [data-phx-hook]`,(e=>{this.maybeAddNewHook(e)})),Oe.all(this.el,`[${this.binding(ue)}]`,(e=>this.maybeMounted(e)))}applyJoinPatch(e,t,i,n){this.attachTrueDocEl();let o=new Xe(this,this.el,this.id,t,i,null);if(o.markPrunableContentForRemoval(),this.performPatch(o,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),e){let{kind:t,to:i}=e;this.liveSocket.historyPatch(i,t)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);let i=this.getHook(e),n=i&&Oe.isIgnored(e,this.binding(re));if(i&&!e.isEqualNode(t)&&(!n||(o=e.dataset,s=t.dataset,JSON.stringify(o)!==JSON.stringify(s))))return i.__beforeUpdate(),i;var o,s}maybeMounted(e){let t=e.getAttribute(this.binding(ue)),i=t&&Oe.private(e,"mounted");t&&!i&&(this.liveSocket.execJS(e,t),Oe.putPrivate(e,"mounted",!0))}maybeAddNewHook(e,t){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,t){let i=[],n=!1,o=new Set;return e.after("added",(e=>{this.liveSocket.triggerDOM("onNodeAdded",[e]),this.maybeAddNewHook(e),e.getAttribute&&this.maybeMounted(e)})),e.after("phxChildAdded",(e=>{Oe.isPhxSticky(e)?this.liveSocket.joinRootViews():n=!0})),e.before("updated",((e,t)=>{this.triggerBeforeUpdateHook(e,t)&&o.add(e.id)})),e.after("updated",(e=>{o.has(e.id)&&this.getHook(e).__updated()})),e.after("discarded",(e=>{e.nodeType===Node.ELEMENT_NODE&&i.push(e)})),e.after("transitionsDiscarded",(e=>this.afterElementsRemoved(e,t))),e.perform(),this.afterElementsRemoved(i,t),n}afterElementsRemoved(e,t){let i=[];e.forEach((e=>{let t=Oe.all(e,`[${L}]`),n=Oe.all(e,`[${this.binding(se)}]`);t.concat(e).forEach((e=>{let t=this.componentID(e);ke(t)&&-1===i.indexOf(t)&&i.push(t)})),n.concat(e).forEach((e=>{let t=this.getHook(e);t&&this.destroyHook(t)}))})),t&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){Oe.findPhxChildren(this.el,this.id).forEach((e=>this.joinChild(e)))}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){return e.id===this.id?this:this.children[e.getAttribute(U)][e.id]}destroyDescendent(e){for(let t in this.root.children)for(let i in this.root.children[t])if(i===e)return this.root.children[t][i].destroy()}joinChild(e){if(!this.getChildById(e.id)){let t=new rt(e,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,0===this.childJoins&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback((()=>{this.pendingJoinOps.forEach((([e,t])=>{e.isDestroyed()||t()})),this.pendingJoinOps=[]}))}update(e,t){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);let i=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",(()=>{Oe.findParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach((t=>{this.componentPatch(this.rendered.getComponent(e,t),t)&&(i=!0)}))})):De(e)||this.liveSocket.time("full patch complete",(()=>{let[t,n]=this.renderContainer(e,"update"),o=new Xe(this,this.el,this.id,t,n,null);i=this.performPatch(o,!0)})),this.liveSocket.dispatchEvents(t),i&&this.joinNewChildren()}renderContainer(e,t){return this.liveSocket.time(`toString diff (${t})`,(()=>{let t=this.el.tagName,i=e?this.rendered.componentCIDs(e).concat(this.pruningCIDs):null,[n,o]=this.rendered.toString(i);return[`<${t}>${n}</${t}>`,o]}))}componentPatch(e,t){if(De(e))return!1;let[i,n]=this.rendered.componentToString(t),o=new Xe(this,this.el,this.id,i,n,t);return this.performPatch(o,!0)}getHook(e){return this.viewHooks[tt.elementID(e)]}addHook(e){if(tt.elementID(e)||!e.getAttribute)return;let t=e.getAttribute("data-phx-hook")||e.getAttribute(this.binding(se));if(t&&!this.ownsElement(e))return;let i=this.liveSocket.getHookCallbacks(t);if(i){e.id||Se(`no DOM ID for hook "${t}". Hooks require a unique ID on each element.`,e);let n=new tt(this,e,i);return this.viewHooks[tt.elementID(n.el)]=n,n}null!==t&&Se(`unknown hook found for "${t}"`,e)}destroyHook(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[tt.elementID(e.el)]}applyPendingUpdates(){this.pendingDiffs.forEach((({diff:e,events:t})=>this.update(e,t))),this.pendingDiffs=[],this.eachChild((e=>e.applyPendingUpdates()))}eachChild(e){let t=this.root.children[this.id]||{};for(let i in t)e(this.getChildById(i))}onChannel(e,t){this.liveSocket.onChannel(this.channel,e,(e=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>t(e)]):this.liveSocket.requestDOMUpdate((()=>t(e)))}))}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",(e=>{this.liveSocket.requestDOMUpdate((()=>{this.applyDiff("update",e,(({diff:e,events:t})=>this.update(e,t)))}))})),this.onChannel("redirect",(({to:e,flash:t})=>this.onRedirect({to:e,flash:t}))),this.onChannel("live_patch",(e=>this.onLivePatch(e))),this.onChannel("live_redirect",(e=>this.onLiveRedirect(e))),this.channel.onError((e=>this.onError(e))),this.channel.onClose((e=>this.onClose(e)))}destroyAllChildren(){this.eachChild((e=>e.destroy()))}onLiveRedirect(e){let{to:t,kind:i,flash:n}=e,o=this.expandURL(t);this.liveSocket.historyRedirect(o,i,n)}onLivePatch(e){let{to:t,kind:i}=e;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,i)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:t}){this.liveSocket.redirect(e,t)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=t=>{t=t||function(){},e?e(this.joinCount,t):t()},this.liveSocket.wrapPush(this,{timeout:!1},(()=>this.channel.join().receive("ok",(e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate((()=>this.onJoin(e)))})).receive("error",(e=>!this.isDestroyed()&&this.onJoinError(e))).receive("timeout",(()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))))}onJoinError(e){return"unauthorized"===e.reason||"stale"===e.reason?(this.log("error",(()=>["unauthorized live_redirect. Falling back to page request",e])),this.onRedirect({to:this.href})):((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect?this.onRedirect(e.redirect):e.live_redirect?this.onLiveRedirect(e.live_redirect):(this.log("error",(()=>["unable to join",e])),void(this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this))))}onClose(e){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&"leave"!==e)return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(200)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",(()=>["view crashed",e])),this.liveSocket.isUnloaded()||this.displayError()}displayError(){this.isMain()&&Oe.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(W,z),this.execAll(this.binding("disconnected"))}pushWithReply(e,t,i,n=function(){}){if(!this.isConnected())return;let[o,[s],r]=e?e():[null,[],{}],a=function(){};return(r.page_loading||s&&null!==s.getAttribute(this.binding(B)))&&(a=this.liveSocket.withPageLoading({kind:"element",target:s})),"number"!=typeof i.cid&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},(()=>this.channel.push(t,i,3e4).receive("ok",(e=>{let t=t=>{e.redirect&&this.onRedirect(e.redirect),e.live_patch&&this.onLivePatch(e.live_patch),e.live_redirect&&this.onLiveRedirect(e.live_redirect),null!==o&&this.undoRefs(o),a(),n(e,t)};e.diff?this.liveSocket.requestDOMUpdate((()=>{this.applyDiff("update",e.diff,(({diff:e,reply:i,events:n})=>{this.update(e,n),t(i)}))})):t(null)}))))}undoRefs(e){this.isConnected()&&Oe.all(document,`[${D}="${this.id}"][${N}="${e}"]`,(e=>{let t=e.getAttribute(ie);e.removeAttribute(N),e.removeAttribute(D),null!==e.getAttribute(te)&&(e.readOnly=!1,e.removeAttribute(te)),null!==t&&(e.disabled="true"===t,e.removeAttribute(ie)),x.forEach((t=>Oe.removeClass(e,t)));let i=e.getAttribute(oe);null!==i&&(e.innerText=i,e.removeAttribute(oe));let n=Oe.private(e,N);if(n){let t=this.triggerBeforeUpdateHook(e,n);Xe.patchEl(e,n,this.liveSocket.getActiveElement()),t&&t.__updated(),Oe.deletePrivate(e,N)}}))}putRef(e,t,i={}){let n=this.ref++,o=this.binding(ne);return i.loading&&(e=e.concat(Oe.all(document,i.loading))),e.forEach((e=>{e.classList.add(`phx-${t}-loading`),e.setAttribute(N,n),e.setAttribute(D,this.el.id);let i=e.getAttribute(o);null!==i&&(e.getAttribute(oe)||e.setAttribute(oe,e.innerText),""!==i&&(e.innerText=i),e.setAttribute("disabled",""))})),[n,e,i]}componentID(e){let t=e.getAttribute&&e.getAttribute(L);return t?parseInt(t):null}targetComponentID(e,t,i={}){if(ke(t))return t;let n=e.getAttribute(this.binding("target"));return ke(n)?parseInt(n):t&&(null!==n||i.target)?this.closestComponentID(t):null}closestComponentID(e){return ke(e)?e:e?Te(e.closest(`[${L}]`),(e=>this.ownsElement(e)&&this.componentID(e))):null}pushHookEvent(e,t,i,n){if(!this.isConnected())return this.log("hook",(()=>["unable to push hook event. LiveView not connected",t,i])),!1;let[o,s,r]=this.putRef([],"hook");return this.pushWithReply((()=>[o,s,r]),"event",{type:"hook",event:t,value:i,cid:this.closestComponentID(e)},((e,t)=>n(t,o))),o}extractMeta(e,t,i){let n=this.binding("value-");for(let i=0;i<e.attributes.length;i++){t||(t={});let o=e.attributes[i].name;o.startsWith(n)&&(t[o.replace(n,"")]=e.getAttribute(o))}if(void 0!==e.value&&(t||(t={}),t.value=e.value,"INPUT"===e.tagName&&Q.indexOf(e.type)>=0&&!e.checked&&delete t.value),i){t||(t={});for(let e in i)t[e]=i[e]}return t}pushEvent(e,t,i,n,o,s={}){this.pushWithReply((()=>this.putRef([t],e,s)),"event",{type:e,event:n,value:this.extractMeta(t,o,s.value),cid:this.targetComponentID(t,i,s)})}pushFileProgress(e,t,i,n=function(){}){this.liveSocket.withinOwners(e.form,((o,s)=>{o.pushWithReply(null,"progress",{event:e.getAttribute(o.binding("progress")),ref:e.getAttribute(I),entry_ref:t,progress:i,cid:o.targetComponentID(e.form,s)},n)}))}pushInput(e,t,i,n,o,s){let r,a,l=ke(i)?i:this.targetComponentID(e.form,t),c=()=>this.putRef([e,e.form],"change",o);a=e.getAttribute(this.binding("change"))?st(e.form,{_target:o._target},[e.name]):st(e.form,{_target:o._target}),Oe.isUploadInput(e)&&e.files&&e.files.length>0&&Be.trackFiles(e,Array.from(e.files)),r=Be.serializeUploads(e);let h={type:"form",event:n,value:a,uploads:r,cid:l};this.pushWithReply(c,"event",h,(i=>{if(Oe.showError(e,this.liveSocket.binding(q)),Oe.isUploadInput(e)&&null!==e.getAttribute("data-phx-auto-upload")){if(Be.filesAwaitingPreflight(e).length>0){let[n,o]=c();this.uploadFiles(e.form,t,n,l,(t=>{s&&s(i),this.triggerAwaitingSubmit(e.form)}))}}else s&&s(i)}))}triggerAwaitingSubmit(e){let t=this.getScheduledSubmit(e);if(t){let[i,n,o,s]=t;this.cancelSubmit(e),s()}}getScheduledSubmit(e){return this.formSubmits.find((([t,i,n,o])=>t.isSameNode(e)))}scheduleSubmit(e,t,i,n){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,i,n])}cancelSubmit(e){this.formSubmits=this.formSubmits.filter((([t,i,n])=>!t.isSameNode(e)||(this.undoRefs(i),!1)))}disableForm(e,t={}){let i=e=>!(Ee(e,`${this.binding(re)}=ignore`,e.form)||Ee(e,"data-phx-update=ignore",e.form)),n=Array.from(e.elements),o=n.filter((e=>e.hasAttribute(this.binding(ne)))),s=n.filter((e=>"BUTTON"==e.tagName)).filter(i),r=n.filter((e=>["INPUT","TEXTAREA","SELECT"].includes(e.tagName))).filter(i);return s.forEach((e=>{e.setAttribute(ie,e.disabled),e.disabled=!0})),r.forEach((e=>{e.setAttribute(te,e.readOnly),e.readOnly=!0,e.files&&(e.setAttribute(ie,e.disabled),e.disabled=!0)})),e.setAttribute(this.binding(B),""),this.putRef([e].concat(o).concat(s).concat(r),"submit",t)}pushFormSubmit(e,t,i,n,o){let s=()=>this.disableForm(e,n),r=this.targetComponentID(e,t);if(Be.hasUploadsInProgress(e)){let[r,a]=s(),l=()=>this.pushFormSubmit(e,t,i,n,o);return this.scheduleSubmit(e,r,n,l)}if(Be.inputsAwaitingPreflight(e).length>0){let[a,l]=s(),c=()=>[a,l,n];this.uploadFiles(e,t,a,r,(t=>{let n=st(e,{});this.pushWithReply(c,"event",{type:"form",event:i,value:n,cid:r},o)}))}else{let t=st(e,{});this.pushWithReply(s,"event",{type:"form",event:i,value:t,cid:r},o)}}uploadFiles(e,t,i,n,o){let s=this.joinCount,r=Be.activeFileInputs(e),a=r.length;r.forEach((e=>{let n=new Be(e,this,(()=>{a--,0===a&&o()}));this.uploaders[e]=n;let r=n.entries().map((e=>e.toPreflightPayload())),l={ref:e.getAttribute(I),entries:r,cid:this.targetComponentID(e.form,t)};this.log("upload",(()=>["sending preflight request",l])),this.pushWithReply(null,"allow_upload",l,(e=>{if(this.log("upload",(()=>["got preflight response",e])),e.error){this.undoRefs(i);let[t,n]=e.error;this.log("upload",(()=>[`error for entry ${t}`,n]))}else{let t=e=>{this.channel.onError((()=>{this.joinCount===s&&e()}))};n.initAdapterUpload(e,t,this.liveSocket)}}))}))}dispatchUploads(e,t){let i=Oe.findUploadInputs(this.el).filter((t=>t.name===e));0===i.length?Se(`no live file inputs found matching the name "${e}"`):i.length>1?Se(`duplicate live file inputs found matching the name "${e}"`):Oe.dispatchEvent(i[0],T,{detail:{files:t}})}pushFormRecovery(e,t,i){this.liveSocket.withinOwners(e,((n,o)=>{let s=Array.from(e.elements).find((e=>Oe.isFormInput(e)&&"hidden"!==e.type&&!e.hasAttribute(this.binding("change")))),r=e.getAttribute(this.binding(le))||e.getAttribute(this.binding("change"));ot.exec("change",r,n,s,["push",{_target:s.name,newCid:t,callback:i}])}))}pushLinkPatch(e,t,i){let n=this.liveSocket.setPendingLink(e),o=t?()=>this.putRef([t],"click"):null,s=()=>this.liveSocket.redirect(window.location.href),r=this.pushWithReply(o,"live_patch",{url:e},(t=>{this.liveSocket.requestDOMUpdate((()=>{t.link_redirect?this.liveSocket.replaceMain(e,null,i,n):(this.liveSocket.commitPendingLink(n)&&(this.href=e),this.applyPendingUpdates(),i&&i(n))}))}));r?r.receive("timeout",s):s()}formsForRecovery(e){if(0===this.joinCount)return[];let t=this.binding("change"),i=document.createElement("template");return i.innerHTML=e,Oe.all(this.el,`form[${t}]`).filter((e=>e.id&&this.ownsElement(e))).filter((e=>e.elements.length>0)).filter((e=>"ignore"!==e.getAttribute(this.binding(le)))).map((e=>{let n=i.content.querySelector(`form[id="${e.id}"][${t}="${e.getAttribute(t)}"]`);return n?[e,n,this.targetComponentID(n)]:[e,null,null]})).filter((([e,t,i])=>t))}maybePushComponentsDestroyed(e){let t=e.filter((e=>0===Oe.findComponentNodeList(this.el,e).length));t.length>0&&(this.pruningCIDs.push(...t),this.pushWithReply(null,"cids_will_destroy",{cids:t},(()=>{this.pruningCIDs=this.pruningCIDs.filter((e=>-1!==t.indexOf(e)));let e=t.filter((e=>0===Oe.findComponentNodeList(this.el,e).length));e.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:e},(e=>{this.rendered.pruneCIDs(e.cids)}))})))}ownsElement(e){let t=e.closest(X);return e.getAttribute(U)===this.id||t&&t.id===this.id||!t&&this.isDead}submitForm(e,t,i,n={}){Oe.putPrivate(e,Y,!0);let o=this.liveSocket.binding(q),s=Array.from(e.elements);s.forEach((e=>Oe.putPrivate(e,Y,!0))),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,i,n,(()=>{s.forEach((e=>Oe.showError(e,o))),this.liveSocket.restorePreviouslyActiveFocus()}))}binding(e){return this.liveSocket.binding(e)}},at="livebook:";function lt(e){try{var t=localStorage.getItem(at+e);if(t)return JSON.parse(t)}catch(e){console.error("Failed to load from local storage, reason: ".concat(e.message))}}function ct(e,t){try{var i=JSON.stringify(t);localStorage.setItem(at+e,i)}catch(e){console.error("Failed to write to local storage, reason: ".concat(e.message))}}var ht="app_auth_token:";function dt(){var e=window.location.pathname;if(e.startsWith("/apps/")){var t=e.split("/")[2],i=lt(ht+t);if(i)return i}return null}const ut={mounted:function(){var e=this;this.handleEvent("persist_app_auth",(function(t){var i,n;i=t.slug,n=t.token,ct(ht+i,n),e.pushEvent("app_auth_persisted")}))}};function gt(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.hasAttribute(t))throw new Error("Missing attribute '".concat(t,"' on element <").concat(e.tagName,":").concat(e.id,">"));var n=e.getAttribute(t);return i?i(n):n}function pt(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(e.hasAttribute(t)){var o=e.getAttribute(t);return n?n(o):o}return i}function mt(e){if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean attribute ".concat(e,', should be either "true" or "false"'))}function ft(e){var t=parseInt(e,10);if(Number.isNaN(t))throw new Error("Invalid integer value ".concat(e));return t}var _t=o(68214),vt=o.n(_t),bt=o(52153),Ct=o.n(bt),yt=o(98269),wt=o.n(yt);function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function kt(e){return e.matches&&e.matches("input, textarea, [contenteditable]")}function xt(e){var t=e.getBoundingClientRect();return t.bottom>=0&&t.top<=window.innerHeight}function Lt(e){return null===e.offsetParent}function Et(e){return!Lt(e)&&xt(e)}function Nt(e){e.getBoundingClientRect().height<window.innerHeight?e.scrollIntoView({behavior:"smooth",block:"center"}):e.scrollIntoView({behavior:"smooth",block:"start"})}function Dt(e){e.scrollTop=e.scrollHeight}function Tt(){return It(24)}function It(e){var t=new Uint8Array(e);crypto.getRandomValues(t);var i,n=String.fromCharCode.apply(String,function(e){if(Array.isArray(e))return St(e)}(i=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return St(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?St(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return btoa(n)}function At(e){return vt()(e).toString(wt())}function Mt(e){var t=document.querySelector('[rel="icon"]');t||((t=document.createElement("link")).rel="icon",document.head.appendChild(t)),t.href="/".concat(e,".svg")}function Rt(e,t){var i=e.querySelector(t);if(!i)throw new Error("expected a child matching ".concat(t,", but none was found"));return i}function Ot(e){e.preventDefault(),e.stopPropagation()}var Pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39"};function Ft(e){for(var t="",i=new Uint8Array(e),n=i.byteLength,o=0;o<n;o++)t+=String.fromCharCode(i[o]);return btoa(t)}function Bt(e){for(var t=atob(e),i=new Uint8Array(t.length),n=i.byteLength,o=0;o<n;o++)i[o]=t.charCodeAt(o);return i.buffer}function Ht(e){throw new TypeError('"'+e+'" is read-only')}function Wt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vt(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var zt=["bg-yellow-100","border-yellow-300"],Ut={mounted:function(){var e=this;this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.audioEl=this.el.querySelector("[data-preview]"),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.recordButton=this.el.querySelector("[data-btn-record]"),this.stopButton=this.el.querySelector("[data-btn-stop]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.mediaRecorder=null,this.handleEvent("audio_input_init:".concat(this.props.id),(function(t){e.updatePreview({data:e.decodeAudio(Bt(t.data)),numChannels:t.num_channels,samplingRate:t.sampling_rate})})),this.uploadButton.addEventListener("click",(function(t){e.inputEl.click()})),this.inputEl.addEventListener("change",(function(t){var i=Wt(t.target.files,1)[0];i&&e.loadFile(i)})),this.el.addEventListener("dragover",(function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"})),this.el.addEventListener("drop",(function(t){t.stopPropagation(),t.preventDefault();var i=Wt(t.dataTransfer.files,1)[0];i&&!e.isRecording()&&e.loadFile(i)})),this.el.addEventListener("dragenter",(function(t){var i;(i=e.el.classList).add.apply(i,zt)})),this.el.addEventListener("dragleave",(function(t){var i;e.el.contains(t.relatedTarget)||(i=e.el.classList).remove.apply(i,zt)})),this.el.addEventListener("drop",(function(t){var i;(i=e.el.classList).remove.apply(i,zt)})),this.recordButton.addEventListener("click",(function(t){e.startRecording()})),this.stopButton.addEventListener("click",(function(t){e.stopRecording()})),this.cancelButton.addEventListener("click",(function(t){e.stopRecording(!1)}))},updated:function(){this.props=this.getProps()},getProps:function(){return{id:gt(this.el,"data-id"),phxTarget:gt(this.el,"data-phx-target",ft),samplingRate:gt(this.el,"data-sampling-rate",ft),endianness:gt(this.el,"data-endianness"),format:gt(this.el,"data-format")}},startRecording:function(){var e=this;this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then((function(t){e.mediaRecorder=new MediaRecorder(t),e.mediaRecorder.addEventListener("dataavailable",(function(t){e.audioChunks.push(t.data)})),e.mediaRecorder.start()}))},stopRecording:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),t&&this.mediaRecorder.addEventListener("stop",(function(t){new Blob(e.audioChunks).arrayBuffer().then((function(t){e.loadEncodedAudio(t)}))})),this.mediaRecorder.stop()},isRecording:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state},loadFile:function(e){var t=this,i=new FileReader;i.onload=function(e){t.loadEncodedAudio(e.target.result)},i.readAsArrayBuffer(e)},loadEncodedAudio:function(e){var t=this;new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(e,(function(e){var i=function(e){for(var t=e.numberOfChannels,i=e.sampleRate,n=e.length,o=new ArrayBuffer(4*t*n),s=new Float32Array(o),r=0;r<t;r++)for(var a=e.getChannelData(r),l=0;l<a.length;l++)s[t*l+r]=a[l];return{data:s.buffer,numChannels:t,samplingRate:i}}(e);t.updatePreview(i),t.pushAudio(i)}))},updatePreview:function(e){var t,i,n=this.audioEl.src,o=(i=jt((t=e).data,t.numChannels,t.samplingRate),new Blob([i],{type:"audio/wav"}));this.audioEl.src=URL.createObjectURL(o),n&&URL.revokeObjectURL(n)},pushAudio:function(e){this.pushEventTo(this.props.phxTarget,"change",{data:Ft(this.encodeAudio(e)),num_channels:e.numChannels,sampling_rate:e.samplingRate})},encodeAudio:function(e){return"pcm_f32"===this.props.format?this.fixEndianness32(e.data):"wav"===this.props.format?jt(e.data,e.numChannels,e.samplingRate):void 0},decodeAudio:function(e){return"pcm_f32"===this.props.format?this.fixEndianness32(e):"wav"===this.props.format?function(e){for(var t=new ArrayBuffer(e.byteLength-44),i=new Float32Array(t),n=new DataView(e),o=0;o<i.length;o++){var s=44+4*o;i[o]=n.getFloat32(s,!0)}return t}(e):void 0},fixEndianness32:function(e){if(function(){var e=new ArrayBuffer(2),t=new Uint16Array(e),i=new Uint8Array(e);return t[0]=1,1===i[0]?"little":"big"}()===this.props.endianness)return e;for(;0<e.byteLength/4;Ht("i")){var t=e[0],i=e[1],n=e[2],o=e[3];e[0]=o,e[1]=n,e[2]=i,e[3]=t}return e}};function jt(e,t,i){var n=new ArrayBuffer(44+e.byteLength),o=new DataView(n),s=4*t,r=i*s,a=e.byteLength/4*s,l=0;function c(e){o.setUint32(l,e,!1),l+=4}function h(e){o.setUint32(l,e,!0),l+=4}function d(e){o.setUint16(l,e,!0),l+=2}c(1380533830),h(36+a),c(1463899717),c(1718449184),h(16),d(3),d(t),h(i),h(r),d(s),d(32),c(1684108385),h(a);for(var u,g=new Float32Array(e),p=0;p<g.length;p++)u=g[p],o.setFloat32(l,u,!0),l+=4;return n}const Kt=Ut;var qt,$t="undefined"==typeof document?void 0:document,Gt=!!$t&&"content"in $t.createElement("template"),Qt=!!$t&&$t.createRange&&"createContextualFragment"in $t.createRange();function Yt(e,t){var i,n,o=e.nodeName,s=t.nodeName;return o===s||(i=o.charCodeAt(0),n=s.charCodeAt(0),i<=90&&n>=97?o===s.toUpperCase():n<=90&&i>=97&&s===o.toUpperCase())}function Zt(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var Xt={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}Zt(e,t,"selected")},INPUT:function(e,t){Zt(e,t,"checked"),Zt(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,s=0,r=e.firstChild;r;)if("OPTGROUP"===(n=r.nodeName&&r.nodeName.toUpperCase()))r=(i=r).firstChild;else{if("OPTION"===n){if(r.hasAttribute("selected")){o=s;break}s++}!(r=r.nextSibling)&&i&&(r=i.nextSibling,i=null)}e.selectedIndex=o}}};function Jt(){}function ei(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var ti=function(e,t,i){if(i||(i={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName||"BODY"===e.nodeName){var n=t;(t=$t.createElement("html")).innerHTML=n}else o=(o=t).trim(),t=Gt?function(e){var t=$t.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(o):Qt?function(e){return qt||(qt=$t.createRange()).selectNode($t.body),qt.createContextualFragment(e).childNodes[0]}(o):function(e){var t=$t.createElement("body");return t.innerHTML=e,t.childNodes[0]}(o);var o,s=i.getNodeKey||ei,r=i.onBeforeNodeAdded||Jt,a=i.onNodeAdded||Jt,l=i.onBeforeElUpdated||Jt,c=i.onElUpdated||Jt,h=i.onBeforeNodeDiscarded||Jt,d=i.onNodeDiscarded||Jt,u=i.onBeforeElChildrenUpdated||Jt,g=!0===i.childrenOnly,p=Object.create(null),m=[];function f(e){m.push(e)}function _(e,t){if(1===e.nodeType)for(var i=e.firstChild;i;){var n=void 0;t&&(n=s(i))?f(n):(d(i),i.firstChild&&_(i,t)),i=i.nextSibling}}function v(e,t,i){!1!==h(e)&&(t&&t.removeChild(e),d(e),_(e,i))}function b(e){a(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=s(t);if(n){var o=p[n];o&&Yt(t,o)?(t.parentNode.replaceChild(o,t),C(o,t)):b(t)}else b(t);t=i}}function C(e,t,i){var n=s(t);if(n&&delete p[n],!i){if(!1===l(e,t))return;if(function(e,t){var i,n,o,s,r=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var a=r.length-1;a>=0;a--)n=(i=r[a]).name,o=i.namespaceURI,s=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==s&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,s))):e.getAttribute(n)!==s&&e.setAttribute(n,s);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}}(e,t),c(e),!1===u(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var i,n,o,a,l,c=t.firstChild,h=e.firstChild;e:for(;c;){for(a=c.nextSibling,i=s(c);h;){if(o=h.nextSibling,c.isSameNode&&c.isSameNode(h)){c=a,h=o;continue e}n=s(h);var d=h.nodeType,u=void 0;if(d===c.nodeType&&(1===d?(i?i!==n&&((l=p[i])?o===l?u=!1:(e.insertBefore(l,h),n?f(n):v(h,e,!0),h=l):u=!1):n&&(u=!1),(u=!1!==u&&Yt(h,c))&&C(h,c)):3!==d&&8!=d||(u=!0,h.nodeValue!==c.nodeValue&&(h.nodeValue=c.nodeValue))),u){c=a,h=o;continue e}n?f(n):v(h,e,!0),h=o}if(i&&(l=p[i])&&Yt(l,c))e.appendChild(l),C(l,c);else{var g=r(c);!1!==g&&(g&&(c=g),c.actualize&&(c=c.actualize(e.ownerDocument||$t)),e.appendChild(c),b(c))}c=a,h=o}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=s(t))?f(i):v(t,e,!0),t=n}}(e,h,n);var m=Xt[e.nodeName];m&&m(e,t)}(e,t):Xt.TEXTAREA(e,t)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=s(i);n&&(p[n]=i),e(i),i=i.nextSibling}}(e);var y,w,S=e,k=S.nodeType,x=t.nodeType;if(!g)if(1===k)1===x?Yt(e,t)||(d(e),S=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(e,(y=t.nodeName,(w=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==w?$t.createElementNS(w,y):$t.createElement(y)))):S=t;else if(3===k||8===k){if(x===k)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)d(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(C(S,t,g),m)for(var L=0,E=m.length;L<E;L++){var N=p[m[L]];N&&v(N,N.parentNode,!1)}}return!g&&S!==e&&e.parentNode&&(S.actualize&&(S=S.actualize(e.ownerDocument||$t)),e.parentNode.replaceChild(S,e)),S};const ii=ti;function ni(e){if(e)throw e}var oi=o(48738),si=o(94470);function ri(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function ai(e){return e&&"object"==typeof e?"position"in e||"type"in e?ci(e.position):"start"in e||"end"in e?ci(e):"line"in e||"column"in e?li(e):"":""}function li(e){return hi(e&&e.line)+":"+hi(e&&e.column)}function ci(e){return li(e&&e.start)+"-"+li(e&&e.end)}function hi(e){return e&&"number"==typeof e?e:1}class di extends Error{constructor(e,t,i){const n=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(i=t,t=void 0),"string"==typeof i){const e=i.indexOf(":");-1===e?n[1]=i:(n[0]=i.slice(0,e),n[1]=i.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=ai(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=n[0],this.ruleId=n[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}}di.prototype.file="",di.prototype.name="",di.prototype.reason="",di.prototype.message="",di.prototype.stack="",di.prototype.fatal=null,di.prototype.column=null,di.prototype.line=null,di.prototype.source=null,di.prototype.ruleId=null,di.prototype.position=null;const ui=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');_i(e);let i,n=0,o=-1,s=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;s--;)if(47===e.charCodeAt(s)){if(i){n=s+1;break}}else o<0&&(i=!0,o=s+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let r=-1,a=t.length-1;for(;s--;)if(47===e.charCodeAt(s)){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1),a>-1&&(e.charCodeAt(s)===t.charCodeAt(a--)?a<0&&(o=s):(a=-1,o=r));return n===o?o=r:o<0&&(o=e.length),e.slice(n,o)},gi=function(e){if(_i(e),0===e.length)return".";let t,i=-1,n=e.length;for(;--n;)if(47===e.charCodeAt(n)){if(t){i=n;break}}else t||(t=!0);return i<0?47===e.charCodeAt(0)?"/":".":1===i&&47===e.charCodeAt(0)?"//":e.slice(0,i)},pi=function(e){_i(e);let t,i=e.length,n=-1,o=0,s=-1,r=0;for(;i--;){const a=e.charCodeAt(i);if(47!==a)n<0&&(t=!0,n=i+1),46===a?s<0?s=i:1!==r&&(r=1):s>-1&&(r=-1);else if(t){o=i+1;break}}return s<0||n<0||0===r||1===r&&s===n-1&&s===o+1?"":e.slice(s,n)},mi=function(...e){let t,i=-1;for(;++i<e.length;)_i(e[i]),e[i]&&(t=void 0===t?e[i]:t+"/"+e[i]);return void 0===t?".":function(e){_i(e);const t=47===e.charCodeAt(0);let i=function(e,t){let i,n,o="",s=0,r=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)i=e.charCodeAt(l);else{if(47===i)break;i=47}if(47===i){if(r===l-1||1===a);else if(r!==l-1&&2===a){if(o.length<2||2!==s||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if(n=o.lastIndexOf("/"),n!==o.length-1){n<0?(o="",s=0):(o=o.slice(0,n),s=o.length-1-o.lastIndexOf("/")),r=l,a=0;continue}}else if(o.length>0){o="",s=0,r=l,a=0;continue}t&&(o=o.length>0?o+"/..":"..",s=2)}else o.length>0?o+="/"+e.slice(r+1,l):o=e.slice(r+1,l),s=l-r-1;r=l,a=0}else 46===i&&a>-1?a++:a=-1}return o}(e,!t);return 0!==i.length||t||(i="."),i.length>0&&47===e.charCodeAt(e.length-1)&&(i+="/"),t?"/"+i:i}(t)},fi="/";function _i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vi=function(){return"/"};function bi(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const Ci=["history","path","basename","stem","extname","dirname"];class yi{constructor(e){let t;t=e?"string"==typeof e||oi(e)?{value:e}:bi(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=vi(),this.value,this.stored,this.result,this.map;let i,n=-1;for(;++n<Ci.length;){const e=Ci[n];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(i in t)Ci.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(e){bi(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!bi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let i=-1;for(;++i<t.length;)if(37===t.charCodeAt(i)&&50===t.charCodeAt(i+1)){const e=t.charCodeAt(i+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Si(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?gi(this.path):void 0}set dirname(e){ki(this.basename,"dirname"),this.path=mi(e||"",this.basename)}get basename(){return"string"==typeof this.path?ui(this.path):void 0}set basename(e){Si(e,"basename"),wi(e,"basename"),this.path=mi(this.dirname||"",e)}get extname(){return"string"==typeof this.path?pi(this.path):void 0}set extname(e){if(wi(e,"extname"),ki(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mi(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?ui(this.path,this.extname):void 0}set stem(e){Si(e,"stem"),wi(e,"stem"),this.path=mi(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,i){const n=new di(e,t,i);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,i){const n=this.message(e,t,i);return n.fatal=null,n}fail(e,t,i){const n=this.message(e,t,i);throw n.fatal=!0,n}}function wi(e,t){if(e&&e.includes(fi))throw new Error("`"+t+"` cannot be a path: did not expect `"+fi+"`")}function Si(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ki(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const xi=function e(){const t=function(){const e=[],t={run:function(...t){let i=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function o(s,...r){const a=e[++i];let l=-1;if(s)n(s);else{for(;++l<t.length;)null!==r[l]&&void 0!==r[l]||(r[l]=t[l]);t=r,a?function(e,t){let i;return function(...t){const s=e.length>t.length;let r;s&&t.push(n);try{r=e.apply(this,t)}catch(e){const t=e;if(s&&i)throw t;return n(t)}s||(r instanceof Promise?r.then(o,n):r instanceof Error?n(r):o(r))};function n(e,...n){i||(i=!0,t(e,...n))}function o(e){n(null,e)}}(a,o)(...r):n(null,...r)}}(null,...t)},use:function(i){if("function"!=typeof i)throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}};return t}(),i=[];let n,o={},s=-1;return r.data=function(e,t){return"string"==typeof e?2===arguments.length?(Ti("data",n),o[e]=t,r):Li.call(o,e)&&o[e]||null:e?(Ti("data",n),o=e,r):o},r.Parser=void 0,r.Compiler=void 0,r.freeze=function(){if(n)return r;for(;++s<i.length;){const[e,...n]=i[s];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const o=e.call(r,...n);"function"==typeof o&&t.use(o)}return n=!0,s=Number.POSITIVE_INFINITY,r},r.attachers=i,r.use=function(e,...t){let s;if(Ti("use",n),null==e);else if("function"==typeof e)h(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?c(e):l(e)}return s&&(o.settings=Object.assign(o.settings||{},s)),r;function a(e){if("function"==typeof e)h(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...i]=e;h(t,...i)}else l(e)}}function l(e){c(e.plugins),e.settings&&(s=Object.assign(s||{},e.settings))}function c(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)a(e[t])}}function h(e,t){let n,o=-1;for(;++o<i.length;)if(i[o][0]===e){n=i[o];break}n?(ri(n[1])&&ri(t)&&(t=si(!0,n[1],t)),n[1]=t):i.push([...arguments])}},r.parse=function(e){r.freeze();const t=Mi(e),i=r.Parser;return Ni("parse",i),Ei(i,"parse")?new i(String(t),t).parse():i(String(t),t)},r.stringify=function(e,t){r.freeze();const i=Mi(t),n=r.Compiler;return Di("stringify",n),Ii(e),Ei(n,"compile")?new n(e,i).compile():n(e,i)},r.run=function(e,i,n){if(Ii(e),r.freeze(),n||"function"!=typeof i||(n=i,i=void 0),!n)return new Promise(o);function o(o,s){t.run(e,Mi(i),(function(t,i,r){i=i||e,t?s(t):o?o(i):n(null,i,r)}))}o(null,n)},r.runSync=function(e,t){let i,n;return r.run(e,t,(function(e,t){ni(e),i=t,n=!0})),Ai("runSync","run",n),i},r.process=function(e,t){if(r.freeze(),Ni("process",r.Parser),Di("process",r.Compiler),!t)return new Promise(i);function i(i,n){const o=Mi(e);function s(e,o){e||!o?n(e):i?i(o):t(null,o)}r.run(r.parse(o),o,((e,t,i)=>{if(!e&&t&&i){const o=r.stringify(t,i);null==o||("string"==typeof(n=o)||oi(n)?i.value=o:i.result=o),s(e,i)}else s(e);var n}))}i(null,t)},r.processSync=function(e){let t;r.freeze(),Ni("processSync",r.Parser),Di("processSync",r.Compiler);const i=Mi(e);return r.process(i,(function(e){t=!0,ni(e)})),Ai("processSync","process",t),i},r;function r(){const t=e();let n=-1;for(;++n<i.length;)t.use(...i[n]);return t.data(si(!0,{},o)),t}}().freeze(),Li={}.hasOwnProperty;function Ei(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(Li.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function Ni(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function Di(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Ti(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ii(e){if(!ri(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ai(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new yi(e)}function Ri(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&Oi(e.children,t)||Array.isArray(e)&&Oi(e,t))||""}function Oi(e,t){for(var i=[],n=-1;++n<e.length;)i[n]=Ri(e[n],t);return i.join("")}function Pi(e,t,i,n){const o=e.length;let s,r=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(t,i),[].splice.apply(e,s);else for(i&&[].splice.apply(e,[t,i]);r<n.length;)s=n.slice(r,r+1e4),s.unshift(t,0),[].splice.apply(e,s),r+=1e4,t+=1e4}function Fi(e,t){return e.length>0?(Pi(e,e.length,0,t),e):t}const Bi={}.hasOwnProperty;function Hi(e){const t={};let i=-1;for(;++i<e.length;)Wi(t,e[i]);return t}function Wi(e,t){let i;for(i in t){const n=(Bi.call(e,i)?e[i]:void 0)||(e[i]={}),o=t[i];let s;for(s in o){Bi.call(n,s)||(n[s]=[]);const e=o[s];Vi(n[s],Array.isArray(e)?e:e?[e]:[])}}}function Vi(e,t){let i=-1;const n=[];for(;++i<t.length;)("after"===t[i].add?e:n).push(t[i]);Pi(e,0,0,n)}const zi=en(/[A-Za-z]/),Ui=en(/\d/),ji=en(/[\dA-Fa-f]/),Ki=en(/[\dA-Za-z]/),qi=en(/[!-/:-@[-`{-~]/),$i=en(/[#-'*+\--9=?A-Z^-~]/);function Gi(e){return null!==e&&(e<32||127===e)}function Qi(e){return null!==e&&(e<0||32===e)}function Yi(e){return null!==e&&e<-2}function Zi(e){return-2===e||-1===e||32===e}const Xi=en(/\s/),Ji=en(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function en(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function tn(e,t,i,n){const o=n?n-1:Number.POSITIVE_INFINITY;let s=0;return function(n){return Zi(n)?(e.enter(i),r(n)):t(n)};function r(n){return Zi(n)&&s++<o?(e.consume(n),r):(e.exit(i),t(n))}}const nn={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(i){if(null!==i)return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),tn(e,t,"linePrefix");e.consume(i)}),(function(t){return e.enter("paragraph"),n(t)}));let i;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=n),i=n,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Yi(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),o)}}},on={tokenize:function(e){const t=this,i=[];let n,o,s,r=0;return a;function a(n){if(r<i.length){const o=i[r];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(n)}return c(n)}function l(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&v();const i=t.events.length;let o,s=i;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){o=t.events[s][1].end;break}_(r);let a=i;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},o),a++;return Pi(t.events,s+1,0,t.events.slice(i)),t.events.length=a,c(e)}return a(e)}function c(o){if(r===i.length){if(!n)return u(o);if(n.currentConstruct&&n.currentConstruct.concrete)return p(o);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sn,h,d)(o)}function h(e){return n&&v(),_(r),u(e)}function d(e){return t.parser.lazy[t.now().line]=r!==i.length,s=t.now().offset,p(e)}function u(i){return t.containerState={},e.attempt(sn,g,p)(i)}function g(e){return r++,i.push([t.currentConstruct,t.containerState]),u(e)}function p(i){return null===i?(n&&v(),_(0),void e.consume(i)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:n}),m(i))}function m(i){return null===i?(f(e.exit("chunkFlow"),!0),_(0),void e.consume(i)):Yi(i)?(e.consume(i),f(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(i),m)}function f(e,i){const a=t.sliceStream(e);if(i&&a.push(null),e.previous=o,o&&(o.next=e),o=e,n.defineSkip(e.start),n.write(a),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<s&&(!n.events[e][1].end||n.events[e][1].end.offset>s))return;const i=t.events.length;let o,a,l=i;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){a=t.events[l][1].end;break}o=!0}for(_(r),e=i;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;Pi(t.events,l+1,0,t.events.slice(i)),t.events.length=e}}function _(n){let o=i.length;for(;o-- >n;){const n=i[o];t.containerState=n[1],n[0].exit.call(t,e)}i.length=n}function v(){n.write([null]),o=void 0,n=void 0,t.containerState._closeFlow=void 0}}},sn={tokenize:function(e,t,i){return tn(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},rn={tokenize:function(e,t,i){return tn(e,(function(e){return null===e||Yi(e)?t(e):i(e)}),"linePrefix")},partial:!0};function an(e){const t={};let i,n,o,s,r,a,l,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(i=e[c],c&&"chunkFlow"===i[1].type&&"listItemPrefix"===e[c-1][1].type&&(a=i[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===i[0])i[1].contentType&&(Object.assign(t,ln(e,c)),c=t[c],l=!0);else if(i[1]._container){for(o=c,n=void 0;o--&&(s=e[o],"lineEnding"===s[1].type||"lineEndingBlank"===s[1].type);)"enter"===s[0]&&(n&&(e[n][1].type="lineEndingBlank"),s[1].type="lineEnding",n=o);n&&(i[1].end=Object.assign({},e[n][1].start),r=e.slice(n,c),r.unshift(i),Pi(e,n,c-n+1,r))}}return!l}function ln(e,t){const i=e[t][1],n=e[t][2];let o=t-1;const s=[],r=i._tokenizer||n.parser[i.contentType](i.start),a=r.events,l=[],c={};let h,d,u=-1,g=i,p=0,m=0;const f=[m];for(;g;){for(;e[++o][1]!==g;);s.push(o),g._tokenizer||(h=n.sliceStream(g),g.next||h.push(null),d&&r.defineSkip(g.start),g._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(h),g._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),d=g,g=g.next}for(g=i;++u<a.length;)"exit"===a[u][0]&&"enter"===a[u-1][0]&&a[u][1].type===a[u-1][1].type&&a[u][1].start.line!==a[u][1].end.line&&(m=u+1,f.push(m),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(r.events=[],g?(g._tokenizer=void 0,g.previous=void 0):f.pop(),u=f.length;u--;){const t=a.slice(f[u],f[u+1]),i=s.pop();l.unshift([i,i+t.length-1]),Pi(e,i,2,t)}for(u=-1;++u<l.length;)c[p+l[u][0]]=p+l[u][1],p+=l[u][1]-l[u][0]-1;return c}const cn={tokenize:function(e,t){let i;return function(t){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?o(t):Yi(t)?e.check(hn,s,o)(t):(e.consume(t),n)}function o(i){return e.exit("chunkContent"),e.exit("content"),t(i)}function s(t){return e.consume(t),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,n}},resolve:function(e){return an(e),e}},hn={tokenize:function(e,t,i){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tn(e,o,"linePrefix")};function o(o){if(null===o||Yi(o))return i(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,i,t)(o)}},partial:!0},dn={tokenize:function(e){const t=this,i=e.attempt(rn,(function(n){if(null!==n)return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i;e.consume(n)}),e.attempt(this.parser.constructs.flowInitial,n,tn(e,e.attempt(this.parser.constructs.flow,n,e.attempt(cn,n)),"linePrefix")));return i;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,i;e.consume(n)}}},un={resolveAll:fn()},gn=mn("string"),pn=mn("text");function mn(e){return{tokenize:function(t){const i=this,n=this.parser.constructs[e],o=t.attempt(n,s,r);return s;function s(e){return l(e)?o(e):r(e)}function r(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=n[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(i,i.previous))return!0}return!1}},resolveAll:fn("text"===e?_n:void 0)}}function fn(e){return function(t,i){let n,o=-1;for(;++o<=t.length;)void 0===n?t[o]&&"data"===t[o][1].type&&(n=o,o++):t[o]&&"data"===t[o][1].type||(o!==n+2&&(t[n][1].end=t[o-1][1].end,t.splice(n+2,o-n-2),o=n+2),n=void 0);return e?e(t,i):t}}function _n(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||"lineEnding"===e[i][1].type)&&"data"===e[i-1][1].type){const n=e[i-1][1],o=t.sliceStream(n);let s,r=o.length,a=-1,l=0;for(;r--;){const e=o[r];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)s=!0,l++;else if(-1!==e){r++;break}}if(l){const o={type:i===e.length||s||l<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-l,offset:n.end.offset-l,_index:n.start._index+r,_bufferIndex:r?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},o.start),n.start.offset===n.end.offset?Object.assign(n,o):(e.splice(i,0,["enter",o,t],["exit",o,t]),i+=2)}i++}return e}function vn(e,t,i){const n=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!n.includes(s)&&(t=s(t,i),n.push(s))}return t}function bn(e,t,i){let n=Object.assign(i?Object.assign({},i):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},s=[];let r=[],a=[],l=!0;const c={consume:function(e){Yi(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,b()):-1!==e&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===r[n._index].length&&(n._bufferIndex=-1,n._index++)),h.previous=e,l=!0},enter:function(e,t){const i=t||{};return i.type=e,i.start=p(),h.events.push(["enter",i,h]),a.push(i),i},exit:function(e){const t=a.pop();return t.end=p(),h.events.push(["exit",t,h]),t},attempt:_((function(e,t){v(e,t.from)})),check:_(f),interrupt:_(f,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:function(e,t){return function(e,t){let i=-1;const n=[];let o;for(;++i<e.length;){const s=e[i];let r;if("string"==typeof s)r=s;else switch(s){case-5:r="\r";break;case-4:r="\n";break;case-3:r="\r\n";break;case-2:r=t?" ":"\t";break;case-1:if(!t&&o)continue;r=" ";break;default:r=String.fromCharCode(s)}o=-2===s,n.push(r)}return n.join("")}(g(e),t)},now:p,defineSkip:function(e){o[e.line]=e.column,b()},write:function(e){return r=Fi(r,e),function(){let e;for(;n._index<r.length;){const t=r[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)m(t.charCodeAt(n._bufferIndex));else m(t)}}(),null!==r[r.length-1]?[]:(v(t,0),h.events=vn(s,h.events,h),h.events)}};let d,u=t.tokenize.call(h,c);return t.resolveAll&&s.push(t),h;function g(e){return function(e,t){const i=t.start._index,n=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let r;return i===o?r=[e[i].slice(n,s)]:(r=e.slice(i,o),n>-1&&(r[0]=r[0].slice(n)),s>0&&r.push(e[o].slice(0,s))),r}(r,e)}function p(){return Object.assign({},n)}function m(e){l=void 0,d=e,u=u(e)}function f(e,t){t.restore()}function _(e,t){return function(i,o,s){let r,d,u,g;return Array.isArray(i)?m(i):"tokenize"in i?m([i]):function(e){return function(t){const i=null!==t&&e[t],n=null!==t&&e.null;return m([...Array.isArray(i)?i:i?[i]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(i);function m(e){return r=e,d=0,0===e.length?s:f(e[d])}function f(e){return function(i){return g=function(){const e=p(),t=h.previous,i=h.currentConstruct,o=h.events.length,s=Array.from(a);return{restore:function(){n=e,h.previous=t,h.currentConstruct=i,h.events.length=o,a=s,b()},from:o}}(),u=e,e.partial||(h.currentConstruct=e),e.name&&h.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(h),t):h,c,_,v)(i)}}function _(t){return l=!0,e(u,g),o}function v(e){return l=!0,g.restore(),++d<r.length?f(r[d]):s}}}function v(e,t){e.resolveAll&&!s.includes(e)&&s.push(e),e.resolve&&Pi(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function b(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const Cn={name:"thematicBreak",tokenize:function(e,t,i){let n,o=0;return function(t){return e.enter("thematicBreak"),n=t,s(t)};function s(a){return a===n?(e.enter("thematicBreakSequence"),r(a)):Zi(a)?tn(e,s,"whitespace")(a):o<3||null!==a&&!Yi(a)?i(a):(e.exit("thematicBreak"),t(a))}function r(t){return t===n?(e.consume(t),o++,r):(e.exit("thematicBreakSequence"),s(t))}}},yn={name:"list",tokenize:function(e,t,i){const n=this,o=n.events[n.events.length-1];let s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,r=0;return function(t){const o=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!n.containerState.marker||t===n.containerState.marker:Ui(t)){if(n.containerState.type||(n.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Cn,i,l)(t):l(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return i(t)};function a(t){return Ui(t)&&++r<10?(e.consume(t),a):(!n.interrupt||r<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):i(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(rn,n.interrupt?i:c,e.attempt(wn,d,h))}function c(e){return n.containerState.initialBlankLine=!0,s++,d(e)}function h(t){return Zi(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):i(t)}function d(i){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(i)}},continuation:{tokenize:function(e,t,i){const n=this;return n.containerState._closeFlow=void 0,e.check(rn,(function(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,tn(e,t,"listItemIndent",n.containerState.size+1)(i)}),(function(i){return n.containerState.furtherBlankLines||!Zi(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Sn,t,o)(i))}));function o(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,tn(e,e.attempt(yn,t,i),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},wn={tokenize:function(e,t,i){const n=this;return tn(e,(function(e){const o=n.events[n.events.length-1];return!Zi(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):i(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Sn={tokenize:function(e,t,i){const n=this;return tn(e,(function(e){const o=n.events[n.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(e):i(e)}),"listItemIndent",n.containerState.size+1)},partial:!0},kn={name:"blockQuote",tokenize:function(e,t,i){const n=this;return function(t){if(62===t){const i=n.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return i(t)};function o(i){return Zi(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}},continuation:{tokenize:function(e,t,i){return tn(e,e.attempt(kn,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};function xn(e,t,i,n,o,s,r,a,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return function(t){return 60===t?(e.enter(n),e.enter(o),e.enter(s),e.consume(t),e.exit(s),d):null===t||41===t||Gi(t)?i(t):(e.enter(n),e.enter(r),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function d(i){return 62===i?(e.enter(s),e.consume(i),e.exit(s),e.exit(o),e.exit(n),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),u(i))}function u(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||Yi(t)?i(t):(e.consume(t),92===t?g:u)}function g(t){return 60===t||62===t||92===t?(e.consume(t),u):u(t)}function p(o){return 40===o?++h>c?i(o):(e.consume(o),p):41===o?h--?(e.consume(o),p):(e.exit("chunkString"),e.exit(a),e.exit(r),e.exit(n),t(o)):null===o||Qi(o)?h?i(o):(e.exit("chunkString"),e.exit(a),e.exit(r),e.exit(n),t(o)):Gi(o)?i(o):(e.consume(o),92===o?m:p)}function m(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Ln(e,t,i,n,o,s){const r=this;let a,l=0;return function(t){return e.enter(n),e.enter(o),e.consume(t),e.exit(o),e.enter(s),c};function c(d){return null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in r.parser.constructs||l>999?i(d):93===d?(e.exit(s),e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):Yi(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(t){return null===t||91===t||93===t||Yi(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a=a||!Zi(t),92===t?d:h)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,h):h(t)}}function En(e,t,i,n,o,s){let r;return function(t){return e.enter(n),e.enter(o),e.consume(t),e.exit(o),r=40===t?41:t,a};function a(i){return i===r?(e.enter(o),e.consume(i),e.exit(o),e.exit(n),t):(e.enter(s),l(i))}function l(t){return t===r?(e.exit(s),a(r)):null===t?i(t):Yi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tn(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===r||null===t||Yi(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?h:c)}function h(t){return t===r||92===t?(e.consume(t),c):c(t)}}function Nn(e,t){let i;return function n(o){return Yi(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,n):Zi(o)?tn(e,n,i?"linePrefix":"lineSuffix")(o):t(o)}}function Dn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn={name:"definition",tokenize:function(e,t,i){const n=this;let o;return function(t){return e.enter("definition"),Ln.call(n,e,s,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function s(t){return o=Dn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Nn(e,xn(e,e.attempt(In,tn(e,r,"whitespace"),tn(e,r,"whitespace")),i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):i(t)}function r(s){return null===s||Yi(s)?(e.exit("definition"),n.parser.defined.includes(o)||n.parser.defined.push(o),t(s)):i(s)}}},In={tokenize:function(e,t,i){return function(t){return Qi(t)?Nn(e,n)(t):i(t)};function n(t){return 34===t||39===t||40===t?En(e,tn(e,o,"whitespace"),i,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):i(t)}function o(e){return null===e||Yi(e)?t(e):i(e)}},partial:!0},An={name:"codeIndented",tokenize:function(e,t,i){const n=this;return function(t){return e.enter("codeIndented"),tn(e,o,"linePrefix",5)(t)};function o(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?s(e):i(e)}function s(t){return null===t?a(t):Yi(t)?e.attempt(Mn,s,a)(t):(e.enter("codeFlowValue"),r(t))}function r(t){return null===t||Yi(t)?(e.exit("codeFlowValue"),s(t)):(e.consume(t),r)}function a(i){return e.exit("codeIndented"),t(i)}}},Mn={tokenize:function(e,t,i){const n=this;return o;function o(t){return n.parser.lazy[n.now().line]?i(t):Yi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):tn(e,s,"linePrefix",5)(t)}function s(e){const s=n.events[n.events.length-1];return s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(e):Yi(e)?o(e):i(e)}},partial:!0},Rn={name:"headingAtx",tokenize:function(e,t,i){const n=this;let o=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(t)};function s(a){return 35===a&&o++<6?(e.consume(a),s):null===a||Qi(a)?(e.exit("atxHeadingSequence"),n.interrupt?t(a):r(a)):i(a)}function r(i){return 35===i?(e.enter("atxHeadingSequence"),a(i)):null===i||Yi(i)?(e.exit("atxHeading"),t(i)):Zi(i)?tn(e,r,"whitespace")(i):(e.enter("atxHeadingText"),l(i))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),r(t))}function l(t){return null===t||35===t||Qi(t)?(e.exit("atxHeadingText"),r(t)):(e.consume(t),l)}},resolve:function(e,t){let i,n,o=e.length-2,s=3;return"whitespace"===e[s][1].type&&(s+=2),o-2>s&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(s===o-1||o-4>s&&"whitespace"===e[o-2][1].type)&&(o-=s+1===o?2:4),o>s&&(i={type:"atxHeadingText",start:e[s][1].start,end:e[o][1].end},n={type:"chunkText",start:e[s][1].start,end:e[o][1].end,contentType:"text"},Pi(e,s,o-s+1,[["enter",i,t],["enter",n,t],["exit",n,t],["exit",i,t]])),e}},On={name:"setextUnderline",tokenize:function(e,t,i){const n=this;let o,s,r=n.events.length;for(;r--;)if("lineEnding"!==n.events[r][1].type&&"linePrefix"!==n.events[r][1].type&&"content"!==n.events[r][1].type){s="paragraph"===n.events[r][1].type;break}return function(t){return n.parser.lazy[n.now().line]||!n.interrupt&&!s?i(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),o=t,a(t))};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),tn(e,l,"lineSuffix")(t))}function l(n){return null===n||Yi(n)?(e.exit("setextHeadingLine"),t(n)):i(n)}},resolveTo:function(e,t){let i,n,o,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){i=s;break}"paragraph"===e[s][1].type&&(n=s)}else"content"===e[s][1].type&&e.splice(s,1),o||"definition"!==e[s][1].type||(o=s);const r={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",o?(e.splice(n,0,["enter",r,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end=Object.assign({},e[o][1].end)):e[i][1]=r,e.push(["exit",r,t]),e}},Pn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fn=["pre","script","style","textarea"],Bn={name:"htmlFlow",tokenize:function(e,t,i){const n=this;let o,s,r,a,l;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(a){return 33===a?(e.consume(a),h):47===a?(e.consume(a),g):63===a?(e.consume(a),o=3,n.interrupt?t:R):zi(a)?(e.consume(a),r=String.fromCharCode(a),s=!0,p):i(a)}function h(s){return 45===s?(e.consume(s),o=2,d):91===s?(e.consume(s),o=5,r="CDATA[",a=0,u):zi(s)?(e.consume(s),o=4,n.interrupt?t:R):i(s)}function d(o){return 45===o?(e.consume(o),n.interrupt?t:R):i(o)}function u(o){return o===r.charCodeAt(a++)?(e.consume(o),a===r.length?n.interrupt?t:L:u):i(o)}function g(t){return zi(t)?(e.consume(t),r=String.fromCharCode(t),p):i(t)}function p(a){return null===a||47===a||62===a||Qi(a)?47!==a&&s&&Fn.includes(r.toLowerCase())?(o=1,n.interrupt?t(a):L(a)):Pn.includes(r.toLowerCase())?(o=6,47===a?(e.consume(a),m):n.interrupt?t(a):L(a)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?i(a):s?_(a):f(a)):45===a||Ki(a)?(e.consume(a),r+=String.fromCharCode(a),p):i(a)}function m(o){return 62===o?(e.consume(o),n.interrupt?t:L):i(o)}function f(t){return Zi(t)?(e.consume(t),f):k(t)}function _(t){return 47===t?(e.consume(t),k):58===t||95===t||zi(t)?(e.consume(t),v):Zi(t)?(e.consume(t),_):k(t)}function v(t){return 45===t||46===t||58===t||95===t||Ki(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),C):Zi(t)?(e.consume(t),b):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),l=t,y):Zi(t)?(e.consume(t),C):(l=null,w(t))}function y(t){return null===t||Yi(t)?i(t):t===l?(e.consume(t),S):(e.consume(t),y)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Qi(t)?b(t):(e.consume(t),w)}function S(e){return 47===e||62===e||Zi(e)?_(e):i(e)}function k(t){return 62===t?(e.consume(t),x):i(t)}function x(t){return Zi(t)?(e.consume(t),x):null===t||Yi(t)?L(t):i(t)}function L(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),O):63===t&&3===o?(e.consume(t),R):93===t&&5===o?(e.consume(t),M):!Yi(t)||6!==o&&7!==o?null===t||Yi(t)?E(t):(e.consume(t),L):e.check(Hn,O,E)(t)}function E(t){return e.exit("htmlFlowData"),N(t)}function N(t){return null===t?P(t):Yi(t)?e.attempt({tokenize:D,partial:!0},N,P)(t):(e.enter("htmlFlowData"),L(t))}function D(e,t,i){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return n.parser.lazy[n.now().line]?i(e):t(e)}}function T(t){return 45===t?(e.consume(t),R):L(t)}function I(t){return 47===t?(e.consume(t),r="",A):L(t)}function A(t){return 62===t&&Fn.includes(r.toLowerCase())?(e.consume(t),O):zi(t)&&r.length<8?(e.consume(t),r+=String.fromCharCode(t),A):L(t)}function M(t){return 93===t?(e.consume(t),R):L(t)}function R(t){return 62===t?(e.consume(t),O):45===t&&2===o?(e.consume(t),R):L(t)}function O(t){return null===t||Yi(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),O)}function P(i){return e.exit("htmlFlow"),t(i)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},Hn={tokenize:function(e,t,i){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(rn,t,i)}},partial:!0},Wn={name:"codeFenced",tokenize:function(e,t,i){const n=this,o={tokenize:function(e,t,i){let n=0;return tn(e,(function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)}),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(t){return t===l?(e.consume(t),n++,o):n<c?i(t):(e.exit("codeFencedFenceSequence"),tn(e,s,"whitespace")(t))}function s(n){return null===n||Yi(n)?(e.exit("codeFencedFence"),t(n)):i(n)}},partial:!0},s={tokenize:function(e,t,i){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return n.parser.lazy[n.now().line]?i(e):t(e)}},partial:!0},r=this.events[this.events.length-1],a=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0;let l,c=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l=t,h(t)};function h(t){return t===l?(e.consume(t),c++,h):(e.exit("codeFencedFenceSequence"),c<3?i(t):tn(e,d,"whitespace")(t))}function d(t){return null===t||Yi(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return null===t||Qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tn(e,g,"whitespace")(t)):96===t&&t===l?i(t):(e.consume(t),u)}function g(t){return null===t||Yi(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Yi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===l?i(t):(e.consume(t),p)}function m(i){return e.exit("codeFencedFence"),n.interrupt?t(i):f(i)}function f(t){return null===t?v(t):Yi(t)?e.attempt(s,e.attempt(o,v,a?tn(e,f,"linePrefix",a+1):f),v)(t):(e.enter("codeFlowValue"),_(t))}function _(t){return null===t||Yi(t)?(e.exit("codeFlowValue"),f(t)):(e.consume(t),_)}function v(i){return e.exit("codeFenced"),t(i)}},concrete:!0},Vn=document.createElement("i");function zn(e){const t="&"+e+";";Vn.innerHTML=t;const i=Vn.textContent;return(59!==i.charCodeAt(i.length-1)||"semi"===e)&&i!==t&&i}const Un={name:"characterReference",tokenize:function(e,t,i){const n=this;let o,s,r=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,s=Ki,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=ji,c):(e.enter("characterReferenceValue"),o=7,s=Ui,c(t))}function c(a){let l;return 59===a&&r?(l=e.exit("characterReferenceValue"),s!==Ki||zn(n.sliceSerialize(l))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):i(a)):s(a)&&r++<o?(e.consume(a),c):i(a)}}},jn={name:"characterEscape",tokenize:function(e,t,i){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return qi(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(n)}}},Kn={name:"lineEnding",tokenize:function(e,t){return function(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),tn(e,t,"linePrefix")}}},qn={name:"labelEnd",tokenize:function(e,t,i){const n=this;let o,s,r=n.events.length;for(;r--;)if(("labelImage"===n.events[r][1].type||"labelLink"===n.events[r][1].type)&&!n.events[r][1]._balanced){o=n.events[r][1];break}return function(t){return o?o._inactive?l(t):(s=n.parser.defined.includes(Dn(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):i(t)};function a(i){return 40===i?e.attempt($n,t,s?t:l)(i):91===i?e.attempt(Gn,t,s?e.attempt(Qn,t,l):l)(i):s?t(i):l(i)}function l(e){return o._balanced=!0,i(e)}},resolveTo:function(e,t){let i,n,o,s,r=e.length,a=0;for(;r--;)if(i=e[r][1],n){if("link"===i.type||"labelLink"===i.type&&i._inactive)break;"enter"===e[r][0]&&"labelLink"===i.type&&(i._inactive=!0)}else if(o){if("enter"===e[r][0]&&("labelImage"===i.type||"labelLink"===i.type)&&!i._balanced&&(n=r,"labelLink"!==i.type)){a=2;break}}else"labelEnd"===i.type&&(o=r);const l={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[o][1].end)},h={type:"labelText",start:Object.assign({},e[n+a+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Fi(s,e.slice(n+1,n+a+3)),s=Fi(s,[["enter",h,t]]),s=Fi(s,vn(t.parser.constructs.insideSpan.null,e.slice(n+a+4,o-3),t)),s=Fi(s,[["exit",h,t],e[o-2],e[o-1],["exit",c,t]]),s=Fi(s,e.slice(o+1)),s=Fi(s,[["exit",l,t]]),Pi(e,n,e.length,s),e},resolveAll:function(e){let t,i=-1;for(;++i<e.length;)t=e[i][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(i+1,"labelImage"===t.type?4:2),t.type="data",i++);return e}},$n={tokenize:function(e,t,i){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),Nn(e,n)};function n(t){return 41===t?r(t):xn(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Qi(t)?Nn(e,s)(t):r(t)}function s(t){return 34===t||39===t||40===t?En(e,Nn(e,r),i,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):r(t)}function r(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):i(n)}}},Gn={tokenize:function(e,t,i){const n=this;return function(t){return Ln.call(n,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return n.parser.defined.includes(Dn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):i(e)}}},Qn={tokenize:function(e,t,i){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):i(n)}}},Yn={name:"labelStartImage",tokenize:function(e,t,i){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),s):i(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?i(e):t(e)}},resolveAll:qn.resolveAll};function Zn(e){return null===e||Qi(e)||Xi(e)?1:Ji(e)?2:void 0}const Xn={name:"attention",tokenize:function(e,t){const i=this.parser.constructs.attentionMarkers.null,n=this.previous,o=Zn(n);let s;return function(t){return e.enter("attentionSequence"),s=t,r(t)};function r(a){if(a===s)return e.consume(a),r;const l=e.exit("attentionSequence"),c=Zn(a),h=!c||2===c&&o||i.includes(a),d=!o||2===o&&c||i.includes(n);return l._open=Boolean(42===s?h:h&&(o||!d)),l._close=Boolean(42===s?d:d&&(c||!h)),t(a)}},resolveAll:function(e,t){let i,n,o,s,r,a,l,c,h=-1;for(;++h<e.length;)if("enter"===e[h][0]&&"attentionSequence"===e[h][1].type&&e[h][1]._close)for(i=h;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[h][1]).charCodeAt(0)){if((e[i][1]._close||e[h][1]._open)&&(e[h][1].end.offset-e[h][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[h][1].end.offset-e[h][1].start.offset)%3))continue;a=e[i][1].end.offset-e[i][1].start.offset>1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1;const d=Object.assign({},e[i][1].end),u=Object.assign({},e[h][1].start);Jn(d,-a),Jn(u,a),s={type:a>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[i][1].end)},r={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[h][1].start),end:u},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[h][1].start)},n={type:a>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},r.end)},e[i][1].end=Object.assign({},s.start),e[h][1].start=Object.assign({},r.end),l=[],e[i][1].end.offset-e[i][1].start.offset&&(l=Fi(l,[["enter",e[i][1],t],["exit",e[i][1],t]])),l=Fi(l,[["enter",n,t],["enter",s,t],["exit",s,t],["enter",o,t]]),l=Fi(l,vn(t.parser.constructs.insideSpan.null,e.slice(i+1,h),t)),l=Fi(l,[["exit",o,t],["enter",r,t],["exit",r,t],["exit",n,t]]),e[h][1].end.offset-e[h][1].start.offset?(c=2,l=Fi(l,[["enter",e[h][1],t],["exit",e[h][1],t]])):c=0,Pi(e,i-1,h-i+3,l),h=i+l.length-c-2;break}for(h=-1;++h<e.length;)"attentionSequence"===e[h][1].type&&(e[h][1].type="data");return e}};function Jn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const eo={name:"autolink",tokenize:function(e,t,i){let n=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return zi(t)?(e.consume(t),s):$i(t)?l(t):i(t)}function s(e){return 43===e||45===e||46===e||Ki(e)?r(e):l(e)}function r(t){return 58===t?(e.consume(t),a):(43===t||45===t||46===t||Ki(t))&&n++<32?(e.consume(t),r):l(t)}function a(t){return 62===t?(e.exit("autolinkProtocol"),u(t)):null===t||32===t||60===t||Gi(t)?i(t):(e.consume(t),a)}function l(t){return 64===t?(e.consume(t),n=0,c):$i(t)?(e.consume(t),l):i(t)}function c(e){return Ki(e)?h(e):i(e)}function h(t){return 46===t?(e.consume(t),n=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",u(t)):d(t)}function d(t){return(45===t||Ki(t))&&n++<63?(e.consume(t),45===t?d:h):i(t)}function u(i){return e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t}}},to={name:"htmlText",tokenize:function(e,t,i){const n=this;let o,s,r,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),w):63===t?(e.consume(t),C):zi(t)?(e.consume(t),x):i(t)}function c(t){return 45===t?(e.consume(t),h):91===t?(e.consume(t),s="CDATA[",r=0,m):zi(t)?(e.consume(t),b):i(t)}function h(t){return 45===t?(e.consume(t),d):i(t)}function d(t){return null===t||62===t?i(t):45===t?(e.consume(t),u):g(t)}function u(e){return null===e||62===e?i(e):g(e)}function g(t){return null===t?i(t):45===t?(e.consume(t),p):Yi(t)?(a=g,M(t)):(e.consume(t),g)}function p(t){return 45===t?(e.consume(t),O):g(t)}function m(t){return t===s.charCodeAt(r++)?(e.consume(t),r===s.length?f:m):i(t)}function f(t){return null===t?i(t):93===t?(e.consume(t),_):Yi(t)?(a=f,M(t)):(e.consume(t),f)}function _(t){return 93===t?(e.consume(t),v):f(t)}function v(t){return 62===t?O(t):93===t?(e.consume(t),v):f(t)}function b(t){return null===t||62===t?O(t):Yi(t)?(a=b,M(t)):(e.consume(t),b)}function C(t){return null===t?i(t):63===t?(e.consume(t),y):Yi(t)?(a=C,M(t)):(e.consume(t),C)}function y(e){return 62===e?O(e):C(e)}function w(t){return zi(t)?(e.consume(t),S):i(t)}function S(t){return 45===t||Ki(t)?(e.consume(t),S):k(t)}function k(t){return Yi(t)?(a=k,M(t)):Zi(t)?(e.consume(t),k):O(t)}function x(t){return 45===t||Ki(t)?(e.consume(t),x):47===t||62===t||Qi(t)?L(t):i(t)}function L(t){return 47===t?(e.consume(t),O):58===t||95===t||zi(t)?(e.consume(t),E):Yi(t)?(a=L,M(t)):Zi(t)?(e.consume(t),L):O(t)}function E(t){return 45===t||46===t||58===t||95===t||Ki(t)?(e.consume(t),E):N(t)}function N(t){return 61===t?(e.consume(t),D):Yi(t)?(a=N,M(t)):Zi(t)?(e.consume(t),N):L(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?i(t):34===t||39===t?(e.consume(t),o=t,T):Yi(t)?(a=D,M(t)):Zi(t)?(e.consume(t),D):(e.consume(t),o=void 0,A)}function T(t){return t===o?(e.consume(t),I):null===t?i(t):Yi(t)?(a=T,M(t)):(e.consume(t),T)}function I(e){return 62===e||47===e||Qi(e)?L(e):i(e)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?i(t):62===t||Qi(t)?L(t):(e.consume(t),A)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tn(e,R,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function R(t){return e.enter("htmlTextData"),a(t)}function O(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):i(n)}}},io={name:"labelStartLink",tokenize:function(e,t,i){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?i(e):t(e)}},resolveAll:qn.resolveAll},no={name:"hardBreakEscape",tokenize:function(e,t,i){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return Yi(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):i(n)}}},oo={name:"codeText",tokenize:function(e,t,i){let n,o,s=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),r(t)};function r(t){return 96===t?(e.consume(t),s++,r):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?i(t):96===t?(o=e.enter("codeTextSequence"),n=0,c(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):Yi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Yi(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(i){return 96===i?(e.consume(i),n++,c):n===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(i)):(o.type="codeTextData",l(i))}},resolve:function(e){let t,i,n=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=o;++t<n;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[n][1].type="codeTextPadding",o+=2,n-=2;break}for(t=o-1,n++;++t<=n;)void 0===i?t!==n&&"lineEnding"!==e[t][1].type&&(i=t):t!==n&&"lineEnding"!==e[t][1].type||(e[i][1].type="codeTextData",t!==i+2&&(e[i][1].end=e[t-1][1].end,e.splice(i+2,t-i-2),n-=t-i-2,t=i+2),i=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}},so={42:yn,43:yn,45:yn,48:yn,49:yn,50:yn,51:yn,52:yn,53:yn,54:yn,55:yn,56:yn,57:yn,62:kn},ro={91:Tn},ao={[-2]:An,[-1]:An,32:An},lo={35:Rn,42:Cn,45:[On,Cn],60:Bn,61:On,95:Cn,96:Wn,126:Wn},co={38:Un,92:jn},ho={[-5]:Kn,[-4]:Kn,[-3]:Kn,33:Yn,38:Un,42:Xn,60:[eo,to],91:io,92:[no,jn],93:qn,95:Xn,96:oo},uo={null:[Xn,un]},go={null:[42,95]},po={null:[]},mo=/[\0\t\n\r]/g;function fo(e,t){const i=Number.parseInt(e,t);return i<9||11===i||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||65535==(65535&i)||65534==(65535&i)||i>1114111?"<22>":String.fromCharCode(i)}const _o=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vo(e){return e.replace(_o,bo)}function bo(e,t,i){if(t)return t;if(35===i.charCodeAt(0)){const e=i.charCodeAt(1),t=120===e||88===e;return fo(i.slice(t?2:1),t?16:10)}return zn(i)||e}const Co={}.hasOwnProperty,yo=function(e,i,n){return"string"!=typeof i&&(n=i,i=void 0),function(e={}){const t=wo({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(y),autolinkProtocol:g,autolinkEmail:g,atxHeading:a(v),blockQuote:a((function(){return{type:"blockquote",children:[]}})),characterEscape:g,characterReference:g,codeFenced:a(_),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(_,l),codeText:a((function(){return{type:"inlineCode",value:""}}),l),codeTextData:g,data:g,codeFlowValue:g,definition:a((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:a(b),hardBreakTrailing:a(b),htmlFlow:a(C,l),htmlFlowData:g,htmlText:a(C,l),htmlTextData:g,image:a((function(){return{type:"image",title:null,url:"",alt:null}})),label:l,link:a(y),listItem:a((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){s("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue"))},listOrdered:a(w,(function(){o("expectingFirstListItemValue",!0)})),listUnordered:a(w),paragraph:a((function(){return{type:"paragraph",children:[]}})),reference:function(){o("referenceType","collapsed")},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(v),strong:a((function(){return{type:"strong",children:[]}})),thematicBreak:a((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:h(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const i=this.sliceSerialize(e).length;t.depth=i}},autolink:h(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:h(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){const t=this.sliceSerialize(e),i=s("characterReferenceType");let n;i?(n=fo(t,"characterReferenceMarkerNumeric"===i?10:16),o("characterReferenceType")):n=zn(t);const a=this.stack.pop();a.value+=n,a.position.end=r(e.end)},codeFenced:h((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")})),codeFencedFence:function(){s("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:h((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:h((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:p,data:p,definition:h(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.label=t,i.identifier=Dn(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:h(),hardBreakEscape:h(m),hardBreakTrailing:h(m),htmlFlow:h((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:p,htmlText:h((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:p,image:h((function(){const e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),o("referenceType")})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),i=this.stack[this.stack.length-1];o("inReference",!0),"link"===i.type?i.children=e.children:i.alt=t},labelText:function(e){const t=this.stack[this.stack.length-2],i=this.sliceSerialize(e);t.label=vo(i),t.identifier=Dn(i).toLowerCase()},lineEnding:function(e){const i=this.stack[this.stack.length-1];if(s("atHardBreak"))return i.children[i.children.length-1].position.end=r(e.end),void o("atHardBreak");!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(i.type)&&(g.call(this,e),p.call(this,e))},link:h((function(){const e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),o("referenceType")})),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:function(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.label=t,i.identifier=Dn(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){o("inReference")},setextHeading:h((function(){o("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){o("setextHeadingSlurpLineEnding",!0)},strong:h(),thematicBreak:h()}},e.mdastExtensions||[]),i={};return function(e){let i={type:"root",children:[]};const a=[],h=[],g={stack:[i],tokenStack:a,config:t,enter:c,exit:d,buffer:l,resume:u,setData:o,getData:s};let p=-1;for(;++p<e.length;)"listOrdered"!==e[p][1].type&&"listUnordered"!==e[p][1].type||("enter"===e[p][0]?h.push(p):p=n(e,h.pop(),p));for(p=-1;++p<e.length;){const i=t[e[p][0]];Co.call(i,e[p][1].type)&&i[e[p][1].type].call(Object.assign({sliceSerialize:e[p][2].sliceSerialize},g),e[p][1])}if(a.length>0){const e=a[a.length-1];(e[1]||ko).call(g,void 0,e[0])}for(i.position={start:r(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:r(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)i=t.transforms[p](i)||i;return i};function n(e,t,i){let n,o,s,r,a=t-1,l=-1,c=!1;for(;++a<=i;){const t=e[a];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?l++:l--,r=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||r||l||s||(s=a),r=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(r=void 0),!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let r=a;for(o=void 0;r--;){const t=e[r];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=r}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}s&&(!o||s<o)&&(n._spread=!0),n.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",n,t[2]]),a++,i++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(a,0,["enter",n,t[2]]),a++,i++,s=void 0,r=!0)}}return e[t][1]._spread=c,i}function o(e,t){i[e]=t}function s(e){return i[e]}function r(e){return{line:e.line,column:e.column,offset:e.offset}}function a(e,t){return function(i){c.call(this,e(i),i),t&&t.call(this,i)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(e,t,i){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,i]),e.position={start:r(t.start)},e}function h(e){return function(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){const i=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+ai({start:e.start,end:e.end})+"): its not open");return n[0].type!==e.type&&(t?t.call(this,e,n[0]):(n[1]||ko).call(this,e,n[0])),i.position.end=r(e.end),i}function u(){return function(e,t){var{includeImageAlt:i=!0}={};return Ri(e,i)}(this.stack.pop())}function g(e){const t=this.stack[this.stack.length-1];let i=t.children[t.children.length-1];i&&"text"===i.type||(i={type:"text",value:""},i.position={start:r(e.start)},t.children.push(i)),this.stack.push(i)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=r(e.end)}function m(){o("atHardBreak",!0)}function f(e){o("characterReferenceType",e.type)}function _(){return{type:"code",lang:null,meta:null,value:""}}function v(){return{type:"heading",depth:void 0,children:[]}}function b(){return{type:"break"}}function C(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function w(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!an(e););return e}(function(e={}){const i={defined:[],lazy:{},constructs:Hi([t].concat(e.extensions||[])),content:n(nn),document:n(on),flow:n(dn),string:n(gn),text:n(pn)};return i;function n(e){return function(t){return bn(i,e,t)}}}(n).document().write(function(){let e,t=1,i="",n=!0;return function(o,s,r){const a=[];let l,c,h,d,u;for(o=i+o.toString(s),h=0,i="",n&&(65279===o.charCodeAt(0)&&h++,n=void 0);h<o.length;){if(mo.lastIndex=h,l=mo.exec(o),d=l&&void 0!==l.index?l.index:o.length,u=o.charCodeAt(d),!l){i=o.slice(h);break}if(10===u&&h===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),h<d&&(a.push(o.slice(h,d)),t+=d-h),u){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}h=d+1}return r&&(e&&a.push(-5),i&&a.push(i),a.push(null)),a}}()(e,i,!0))))};function wo(e,t){let i=-1;for(;++i<t.length;){const n=t[i];Array.isArray(n)?wo(e,n):So(e,n)}return e}function So(e,t){let i;for(i in t)if(Co.call(t,i)){const n="canContainEols"===i||"transforms"===i,o=(Co.call(e,i)?e[i]:void 0)||(e[i]=n?[]:{}),s=t[i];s&&(n?e[i]=[...o,...s]:Object.assign(o,s))}}function ko(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ai({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ai({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ai({start:t.start,end:t.end})+") is still open")}const xo=function(e){Object.assign(this,{Parser:t=>{const i=this.data("settings");return yo(t,Object.assign({},i,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})},Lo={tokenize:function(e,t,i){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),o):i(t)}function o(t){return 87===t||119===t?(e.consume(t),s):i(t)}function s(t){return 46===t?(e.consume(t),r):i(t)}function r(e){return null===e||Yi(e)?i(e):t(e)}},partial:!0},Eo={tokenize:function(e,t,i){let n,o;return s;function s(t){return 38===t?e.check(To,a,r)(t):46===t||95===t?e.check(Do,a,r)(t):null===t||Gi(t)||Xi(t)||45!==t&&Ji(t)?a(t):(e.consume(t),s)}function r(t){return 46===t?(o=n,n=void 0,e.consume(t),s):(95===t&&(n=!0),e.consume(t),s)}function a(e){return o||n?i(e):t(e)}},partial:!0},No={tokenize:function(e,t){let i=0;return n;function n(r){return 38===r?e.check(To,t,o)(r):(40===r&&i++,41===r?e.check(Do,s,o)(r):Bo(r)?t(r):Fo(r)?e.check(Do,t,o)(r):(e.consume(r),n))}function o(t){return e.consume(t),n}function s(e){return i--,i<0?t(e):o(e)}},partial:!0},Do={tokenize:function(e,t,i){return function(t){return e.consume(t),n};function n(o){return Fo(o)?(e.consume(o),n):Bo(o)?t(o):i(o)}},partial:!0},To={tokenize:function(e,t,i){return function(t){return e.consume(t),n};function n(t){return zi(t)?(e.consume(t),n):59===t?(e.consume(t),o):i(t)}function o(e){return Bo(e)?t(e):i(e)}},partial:!0},Io={tokenize:function(e,t,i){const n=this;return function(t){return 87!==t&&119!==t||!Wo(n.previous)||Uo(n.events)?i(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lo,e.attempt(Eo,e.attempt(No,o),i),i)(t))};function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}},previous:Wo},Ao={tokenize:function(e,t,i){const n=this;return function(t){return 72!==t&&104!==t||!Vo(n.previous)||Uo(n.events)?i(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),o)};function o(t){return 84===t||116===t?(e.consume(t),s):i(t)}function s(t){return 84===t||116===t?(e.consume(t),r):i(t)}function r(t){return 80===t||112===t?(e.consume(t),a):i(t)}function a(t){return 83===t||115===t?(e.consume(t),l):l(t)}function l(t){return 58===t?(e.consume(t),c):i(t)}function c(t){return 47===t?(e.consume(t),h):i(t)}function h(t){return 47===t?(e.consume(t),d):i(t)}function d(t){return null===t||Gi(t)||Xi(t)||Ji(t)?i(t):e.attempt(Eo,e.attempt(No,u),i)(t)}function u(i){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(i)}},previous:Vo},Mo={tokenize:function(e,t,i){const n=this;let o,s;return function(t){return Ho(t)&&zo(n.previous)&&!Uo(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),r(t)):i(t)};function r(t){return Ho(t)?(e.consume(t),r):64===t?(e.consume(t),a):i(t)}function a(t){return 46===t?e.check(Do,d,l)(t):45===t||95===t?e.check(Do,i,c)(t):Ki(t)?(!s&&Ui(t)&&(s=!0),e.consume(t),a):d(t)}function l(t){return e.consume(t),o=!0,s=void 0,a}function c(t){return e.consume(t),h}function h(t){return 46===t?e.check(Do,i,l)(t):a(t)}function d(n){return o&&!s?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):i(n)}},previous:zo},Ro={},Oo={text:Ro};let Po=48;for(;Po<123;)Ro[Po]=Mo,Po++,58===Po?Po=65:91===Po&&(Po=97);function Fo(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Bo(e){return null===e||60===e||Qi(e)}function Ho(e){return 43===e||45===e||46===e||95===e||Ki(e)}function Wo(e){return null===e||40===e||42===e||95===e||126===e||Qi(e)}function Vo(e){return null===e||!zi(e)}function zo(e){return 47!==e&&Vo(e)}function Uo(e){let t=e.length,i=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){i=!0;break}if(n._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}Ro[43]=Mo,Ro[45]=Mo,Ro[46]=Mo,Ro[95]=Mo,Ro[72]=[Mo,Ao],Ro[104]=[Mo,Ao],Ro[87]=[Mo,Io],Ro[119]=[Mo,Io];const jo={tokenize:function(e,t,i){const n=this;return tn(e,(function(e){const o=n.events[n.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):i(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ko(e,t,i){const n=this;let o=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r;for(;o--;){const e=n.events[o][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!r||!r._balanced)return i(o);const a=Dn(n.sliceSerialize({start:r.end,end:n.now()}));return 94===a.charCodeAt(0)&&s.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):i(o)}}function qo(e,t){let i,n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){i=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const r={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},l=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",r,t],["enter",a,t],["exit",a,t],["exit",r,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...l),e}function $o(e,t,i){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,r=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?i(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){let h;return null===a||91===a||r++>999?i(a):93===a?s?(e.exit("chunkString"),h=e.exit("gfmFootnoteCallString"),o.includes(Dn(n.sliceSerialize(h)))?function(i){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(a):i(a)):i(a):(e.consume(a),Qi(a)||(s=!0),92===a?c:l)}function c(t){return 91===t||92===t||93===t?(e.consume(t),r++,l):l(t)}}function Go(e,t,i){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,r,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),c):i(t)}function c(t){let o;return null===t||91===t||a>999?i(t):93===t?r?(o=e.exit("gfmFootnoteDefinitionLabelString"),s=Dn(n.sliceSerialize(o)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u):i(t):Yi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a++,c):(e.enter("chunkString").contentType="string",h(t))}function h(t){return null===t||Yi(t)||91===t||93===t||a>999?(e.exit("chunkString"),c(t)):(Qi(t)||(r=!0),a++,e.consume(t),92===t?d:h)}function d(t){return 91===t||92===t||93===t?(e.consume(t),a++,h):h(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),tn(e,g,"gfmFootnoteDefinitionWhitespace")):i(t)}function g(e){return o.includes(s)||o.push(s),t(e)}}function Qo(e,t,i){return e.check(rn,t,e.attempt(jo,t,i))}function Yo(e){e.exit("gfmFootnoteDefinition")}function Zo(e={}){let t=e.singleTilde;const i={tokenize:function(e,i,n){const o=this.previous,s=this.events;let r=0;return function(t){return 126===o&&"characterEscape"!==s[s.length-1][1].type?n(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(s){const l=Zn(o);if(126===s)return r>1?n(s):(e.consume(s),r++,a);if(r<2&&!t)return n(s);const c=e.exit("strikethroughSequenceTemporary"),h=Zn(s);return c._open=!h||2===h&&Boolean(l),c._close=!l||2===l&&Boolean(h),i(s)}},resolveAll:function(e,t){let i=-1;for(;++i<e.length;)if("enter"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._close){let n=i;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[i][1].end.offset-e[i][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[i][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},s={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[i][1].start)},r=[["enter",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",s,t]];Pi(r,r.length,0,vn(t.parser.constructs.insideSpan.null,e.slice(n+1,i),t)),Pi(r,r.length,0,[["exit",s,t],["enter",e[i][1],t],["exit",e[i][1],t],["exit",o,t]]),Pi(e,n-1,i-n+3,r),i=n+r.length-2;break}}for(i=-1;++i<e.length;)"strikethroughSequenceTemporary"===e[i][1].type&&(e[i][1].type="data");return e}};return null==t&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}}}const Xo={flow:{null:{tokenize:function(e,t,i){const n=this,o=[];let s,r,a=0;return function(t){return e.enter("table")._align=o,e.enter("tableHead"),e.enter("tableRow"),124===t?l(t):(a++,e.enter("temporaryTableCellContent"),d(t))};function l(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),s=!0,c}function c(t){return null===t||Yi(t)?function(t){if(null===t)return i(t);e.exit("tableRow"),e.exit("tableHead");const o=n.interrupt;return n.interrupt=!0,e.attempt({tokenize:N,partial:!0},(function(t){return n.interrupt=o,e.enter("tableDelimiterRow"),g(t)}),(function(e){return n.interrupt=o,i(e)}))(t)}(t):Zi(t)?(e.enter("whitespace"),e.consume(t),h):(s&&(s=void 0,a++),124===t?l(t):(e.enter("temporaryTableCellContent"),d(t)))}function h(t){return Zi(t)?(e.consume(t),h):(e.exit("whitespace"),c(t))}function d(t){return null===t||124===t||Qi(t)?(e.exit("temporaryTableCellContent"),c(t)):(e.consume(t),92===t?u:d)}function u(t){return 92===t||124===t?(e.consume(t),d):d(t)}function g(t){return null===t||Yi(t)?v(t):Zi(t)?(e.enter("whitespace"),e.consume(t),p):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),r=!0,o.push("none"),m):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),o.push("left"),f):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):i(t)}function p(t){return Zi(t)?(e.consume(t),p):(e.exit("whitespace"),g(t))}function m(t){return 45===t?(e.consume(t),m):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),o[o.length-1]="left"===o[o.length-1]?"center":"right",_):g(t))}function f(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),r=!0,m):i(t)}function _(t){return null===t||Yi(t)?v(t):Zi(t)?(e.enter("whitespace"),e.consume(t),p):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):i(t)}function v(t){return e.exit("tableDelimiterRow"),r&&a===o.length?null===t?b(t):e.check(Jo,b,e.attempt({tokenize:N,partial:!0},tn(e,C,"linePrefix",4),b))(t):i(t)}function b(i){return e.exit("table"),t(i)}function C(t){return e.enter("tableBody"),y(t)}function y(t){return e.enter("tableRow"),124===t?w(t):(e.enter("temporaryTableCellContent"),x(t))}function w(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),S}function S(t){return null===t||Yi(t)?function(t){return e.exit("tableRow"),null===t?E(t):e.check(Jo,E,e.attempt({tokenize:N,partial:!0},tn(e,y,"linePrefix",4),E))(t)}(t):Zi(t)?(e.enter("whitespace"),e.consume(t),k):124===t?w(t):(e.enter("temporaryTableCellContent"),x(t))}function k(t){return Zi(t)?(e.consume(t),k):(e.exit("whitespace"),S(t))}function x(t){return null===t||124===t||Qi(t)?(e.exit("temporaryTableCellContent"),S(t)):(e.consume(t),92===t?L:x)}function L(t){return 92===t||124===t?(e.consume(t),x):x(t)}function E(t){return e.exit("tableBody"),b(t)}function N(e,t,i){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tn(e,o,"linePrefix")};function o(o){if(n.parser.lazy[n.now().line]||null===o||Yi(o))return i(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?i(o):(n._gfmTableDynamicInterruptHack=!0,e.check(n.parser.constructs.flow,(function(e){return n._gfmTableDynamicInterruptHack=!1,i(e)}),(function(e){return n._gfmTableDynamicInterruptHack=!1,t(e)}))(o))}}},resolve:function(e,t){let i,n,o,s,r,a,l,c=-1;for(;++c<e.length;){const h=e[c][1];if(o&&("temporaryTableCellContent"===h.type&&(s=s||c,r=c),("tableCellDivider"===h.type||"tableRow"===h.type)&&r)){const i={type:"tableContent",start:e[s][1].start,end:e[r][1].end},n={type:"chunkText",start:i.start,end:i.end,contentType:"text"};e.splice(s,r-s+1,["enter",i,t],["enter",n,t],["exit",n,t],["exit",i,t]),c-=r-s-3,s=void 0,r=void 0}if("exit"===e[c][0]&&void 0!==a&&a+(l?0:1)<c&&("tableCellDivider"===h.type||"tableRow"===h.type&&(a+3<c||"whitespace"!==e[a][1].type))){const o={type:n?"tableDelimiter":i?"tableHeader":"tableData",start:e[a][1].start,end:e[c][1].end};e.splice(c+("tableCellDivider"===h.type?1:0),0,["exit",o,t]),e.splice(a,0,["enter",o,t]),c+=2,a=c+1,l=!0}"tableRow"===h.type&&(o="enter"===e[c][0],o&&(a=c+1,l=!1)),"tableDelimiterRow"===h.type&&(n="enter"===e[c][0],n&&(a=c+1,l=!1)),"tableHead"===h.type&&(i="enter"===e[c][0])}return e}}}},Jo={tokenize:function(e,t,i){let n=0;return function(t){return e.enter("check"),e.consume(t),o};function o(s){return-1===s||32===s?(e.consume(s),n++,4===n?t:o):null===s||Qi(s)?t(s):i(s)}},partial:!0},es={tokenize:function(e,t,i){const n=this;return function(t){return null===n.previous&&n._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):i(t)};function o(t){return Qi(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),s):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),s):i(t)}function s(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:is},t,i)):i(n)}}},ts={text:{91:es}};function is(e,t,i){const n=this;return tn(e,(function(e){const o=n.events[n.events.length-1];return(o&&"whitespace"===o[1].type||Yi(e))&&null!==e?t(e):i(e)}),"whitespace")}function ns(e,t){const i=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,o=i.indexOf(t);for(;-1!==o;)n++,o=i.indexOf(t,o+t.length);return n}const os=function(e){if(null==e)return rs;if("string"==typeof e)return t=e,ss((function(e){return e&&e.type===t}));var t;if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=os(e[i]);return ss((function(...e){let i=-1;for(;++i<t.length;)if(t[i].call(this,...e))return!0;return!1}))}(e):function(e){return ss((function(t){let i;for(i in e)if(t[i]!==e[i])return!1;return!0}))}(e);if("function"==typeof e)return ss(e);throw new Error("Expected function, string, or object as test")};function ss(e){return function(...t){return Boolean(e.call(this,...t))}}function rs(){return!0}const as=function(e,t,i,n){"function"==typeof t&&"function"!=typeof i&&(n=i,i=t,t=null);var o=os(t),s=n?-1:1;!function e(r,a,l){var c,h="object"==typeof r&&null!==r?r:{};return"string"==typeof h.type&&(c="string"==typeof h.tagName?h.tagName:"string"==typeof h.name?h.name:void 0,Object.defineProperty(d,"name",{value:"node ("+h.type+(c?"<"+c+">":"")+")"})),d;function d(){var c,h,d,u=[];if((!t||o(r,a,l[l.length-1]||null))&&(u=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(i(r,l)),!1===u[0]))return u;if(r.children&&"skip"!==u[0])for(h=(n?r.children.length:-1)+s,d=l.concat(r);h>-1&&h<r.children.length;){if(!1===(c=e(r.children[h],h,d)())[0])return c;h="number"==typeof c[1]?c[1]:h+s}return u}}(e,null,[])()},ls={}.hasOwnProperty;function cs(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function hs(e){return"function"==typeof e?e:()=>e}const ds="phrasing",us=["autolink","link","image","label"],gs={transforms:[function(e){!function(e,t,i,n){let o,s;"string"==typeof t||t instanceof RegExp?(s=[[t,i]],o=n):(s=t,o=i),o||(o={});const r=os(o.ignore||[]),a=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let i=-1;for(;++i<e.length;)t.push([cs(e[i][0]),hs(e[i][1])])}else{let i;for(i in e)ls.call(e,i)&&t.push([cs(i),hs(e[i])])}return t}(s);let l=-1;for(;++l<a.length;)as(e,"text",c);return e;function c(e,t){let i,n=-1;for(;++n<t.length;){const e=t[n];if(r(e,i?i.children.indexOf(e):void 0,i))return;i=e}if(i)return function(e,t){const i=a[l][0],n=a[l][1];let o,s=0,r=t.children.indexOf(e),c=[];i.lastIndex=0;let h=i.exec(e.value);for(;h;){o=h.index;let t=n(...h,{index:h.index,input:h.input});if("string"==typeof t&&(t=t.length>0?{type:"text",value:t}:void 0),!1!==t&&(s!==o&&c.push({type:"text",value:e.value.slice(s,o)}),Array.isArray(t)?c.push(...t):t&&c.push(t),s=o+h[0].length),!i.global)break;h=i.exec(e.value)}return void 0===o?(c=[e],r--):(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),t.children.splice(r,1,...c)),r+c.length+1}(e,i)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,_s]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:ms,literalAutolinkHttp:ms,literalAutolinkWww:ms},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},ps={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ds,notInConstruct:us},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ds,notInConstruct:us},{character:":",before:"[ps]",after:"\\/",inConstruct:ds,notInConstruct:us}]};function ms(e){this.config.enter.autolinkProtocol.call(this,e)}function fs(e,t,i,n,o){let s="";if(!vs(o))return!1;if(/^w/i.test(t)&&(i=t+i,t="",s="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(i))return!1;const r=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);let i,n,o,s;if(t)for(e=e.slice(0,t.index),s=t[0],i=s.indexOf(")"),n=ns(e,"("),o=ns(e,")");-1!==i&&n>o;)e+=s.slice(0,i+1),s=s.slice(i+1),i=s.indexOf(")"),o++;return[e,s]}(i+n);if(!r[0])return!1;const a={type:"link",title:null,url:s+t+r[0],children:[{type:"text",value:t+r[0]}]};return r[1]?[a,{type:"text",value:r[1]}]:a}function _s(e,t,i,n){return!(!vs(n,!0)||/[_-\d]$/.test(i))&&{type:"link",title:null,url:"mailto:"+t+"@"+i,children:[{type:"text",value:t+"@"+i}]}}function vs(e,t){const i=e.input.charCodeAt(e.index-1);return(0===e.index||Xi(i)||Ji(i))&&(!t||47!==i)}function bs(e){return e.label||!e.identifier?e.label||"":vo(e.identifier)}function Cs(e){const t=e||{},i=t.now||{};let n=t.lineShift||0,o=i.line||1,s=i.column||1;return{move:function(e=""){const t=e.split(/\r?\n|\r/g),i=t[t.length-1];return o+=t.length-1,s=1===t.length?s+i.length:1+i.length+n,e},current:function(){return{now:{line:o,column:s},lineShift:n}},shift:function(e){n+=e}}}function ys(e,t,i){const n=t.indexStack,o=e.children||[],s=Cs(i),r=[];let a=-1;for(n.push(-1);++a<o.length;){const i=o[a];n[n.length-1]=a,r.push(s.move(t.handle(i,e,t,{before:"\n",after:"\n",...s.current()}))),"list"!==i.type&&(t.bulletLastUsed=void 0),a<o.length-1&&r.push(s.move(l(i,o[a+1])))}return n.pop(),r.join("");function l(i,n){let o=t.join.length;for(;o--;){const s=t.join[o](i,n,e,t);if(!0===s||1===s)break;if("number"==typeof s)return"\n".repeat(1+s);if(!1===s)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}}const ws=/\r?\n|\r/g;function Ss(e,t){const i=[];let n,o=0,s=0;for(;n=ws.exec(e);)r(e.slice(o,n.index)),i.push(n[0]),o=n.index+n[0].length,s++;return r(e.slice(o)),i.join("");function r(e){i.push(t(e,s,!e))}}function ks(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function xs(e,t){return Ls(e,t.inConstruct,!0)&&!Ls(e,t.notInConstruct,!1)}function Ls(e,t,i){if(!t)return i;"string"==typeof t&&(t=[t]);let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Es(e,t,i){const n=(i.before||"")+(t||"")+(i.after||""),o=[],s=[],r={};let a=-1;for(;++a<e.unsafe.length;){const t=e.unsafe[a];if(!xs(e.stack,t))continue;const i=ks(t);let s;for(;s=i.exec(n);){const e="before"in t||Boolean(t.atBreak),i="after"in t,n=s.index+(e?s[1].length:0);o.includes(n)?(r[n].before&&!e&&(r[n].before=!1),r[n].after&&!i&&(r[n].after=!1)):(o.push(n),r[n]={before:e,after:i})}}o.sort(Ns);let l=i.before?i.before.length:0;const c=n.length-(i.after?i.after.length:0);for(a=-1;++a<o.length;){const e=o[a];e<l||e>=c||e+1<c&&o[a+1]===e+1&&r[e].after&&!r[e+1].before&&!r[e+1].after||o[a-1]===e-1&&r[e].before&&!r[e-1].before&&!r[e-1].after||(l!==e&&s.push(Ds(n.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||i.encode&&i.encode.includes(n.charAt(e))?(s.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),l++):s.push("\\"))}return s.push(Ds(n.slice(l,c),i.after)),s.join("")}function Ns(e,t){return e-t}function Ds(e,t){const i=/\\(?=[!-/:-@[-`{-~])/g,n=[],o=[],s=e+t;let r,a=-1,l=0;for(;r=i.exec(s);)n.push(r.index);for(;++a<n.length;)l!==n[a]&&o.push(e.slice(l,n[a])),o.push("\\"),l=n[a];return o.push(e.slice(l)),o.join("")}function Ts(){return e.peek=function(){return"["},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:function(e,t,i,n){const o=Cs(n);let s=o.move("[^");const r=i.enter("footnoteDefinition"),a=i.enter("label");return s+=o.move(Es(i,bs(e),{...o.current(),before:s,after:"]"})),a(),s+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),s+=o.move(Ss(ys(e,i,o.current()),(function(e,t,i){return t?(i?"":" ")+e:e}))),r(),s},footnoteReference:e}};function e(e,t,i,n){const o=Cs(n);let s=o.move("[^");const r=i.enter("footnoteReference"),a=i.enter("reference");return s+=o.move(Es(i,bs(e),{...o.current(),before:s,after:"]"})),a(),r(),s+=o.move("]"),s}}function Is(e,t,i){const n=t.indexStack,o=e.children||[],s=[];let r=-1,a=i.before;n.push(-1);let l=Cs(i);for(;++r<o.length;){const c=o[r];let h;if(n[n.length-1]=r,r+1<o.length){let i=t.handle.handlers[o[r+1].type];i&&i.peek&&(i=i.peek),h=i?i(o[r+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else h=i.after;s.length>0&&("\r"===a||"\n"===a)&&"html"===c.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=Cs(i),l.move(s.join(""))),s.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:h}))),a=s[s.length-1].slice(-1)}return n.pop(),s.join("")}const As={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Ms={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:Rs}};function Rs(e,t,i,n){const o=Cs(n),s=i.enter("emphasis");let r=o.move("~~");return r+=Is(e,i,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),s(),r}function Os(e,t,i){let n=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(n);)o+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<i.unsafe.length;){const e=i.unsafe[s],t=ks(e);let o;if(e.atBreak)for(;o=t.exec(n);){let e=o.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(o.index+1)}}return o+n+o}function Ps(e){return e.length}function Fs(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Rs.peek=function(){return"~"},Os.peek=function(){return"`"};const Bs={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t.map((e=>"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:Ws,tableHeader:Ws,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Vs)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Hs,tableHeader:Hs,tableRow:Hs}};function Hs(e){this.exit(e)}function Ws(e){this.enter({type:"tableCell",children:[]},e)}function Vs(e,t){return"|"===t?t:e}function zs(e){const t=e||{},i=t.tableCellPadding,n=t.tablePipeAlign,o=t.stringLength,s=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,i,n){return a(function(e,t,i){const n=e.children;let o=-1;const s=[],r=t.enter("table");for(;++o<n.length;)s[o]=l(n[o],t,i);return r(),s}(e,i,n),e.align)},tableRow:function(e,t,i,n){const o=a([l(e,i,n)]);return o.slice(0,o.indexOf("\n"))},tableCell:r,inlineCode:function(e,t,i){let n=Os(e,0,i);return i.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&")),n}}};function r(e,t,i,n){const o=i.enter("tableCell"),r=i.enter("phrasing"),a=Is(e,i,{...n,before:s,after:s});return r(),o(),a}function a(e,t){return function(e,t={}){const i=(t.align||[]).concat(),n=t.stringLength||Ps,o=[],s=[],r=[],a=[];let l=0,c=-1;for(;++c<e.length;){const i=[],o=[];let d=-1;for(e[c].length>l&&(l=e[c].length);++d<e[c].length;){const s=null==(h=e[c][d])?"":String(h);if(!1!==t.alignDelimiters){const e=n(s);o[d]=e,(void 0===a[d]||e>a[d])&&(a[d]=e)}i.push(s)}s[c]=i,r[c]=o}var h;let d=-1;if("object"==typeof i&&"length"in i)for(;++d<l;)o[d]=Fs(i[d]);else{const e=Fs(i);for(;++d<l;)o[d]=e}d=-1;const u=[],g=[];for(;++d<l;){const e=o[d];let i="",n="";99===e?(i=":",n=":"):108===e?i=":":114===e&&(n=":");let s=!1===t.alignDelimiters?1:Math.max(1,a[d]-i.length-n.length);const r=i+"-".repeat(s)+n;!1!==t.alignDelimiters&&(s=i.length+s+n.length,s>a[d]&&(a[d]=s),g[d]=s),u[d]=r}s.splice(1,0,u),r.splice(1,0,g),c=-1;const p=[];for(;++c<s.length;){const e=s[c],i=r[c];d=-1;const n=[];for(;++d<l;){const s=e[d]||"";let r="",c="";if(!1!==t.alignDelimiters){const e=a[d]-(i[d]||0),t=o[d];114===t?r=" ".repeat(e):99===t?e%2?(r=" ".repeat(e/2+.5),c=" ".repeat(e/2-.5)):(r=" ".repeat(e/2),c=r):c=" ".repeat(e)}!1===t.delimiterStart||d||n.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===s||!1===t.delimiterStart&&!d||n.push(" "),!1!==t.alignDelimiters&&n.push(r),n.push(s),!1!==t.alignDelimiters&&n.push(c),!1!==t.padding&&n.push(" "),!1===t.delimiterEnd&&d===l-1||n.push("|")}p.push(!1===t.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:n,padding:i,stringLength:o})}function l(e,t,i){const n=e.children;let o=-1;const s=[],a=t.enter("tableRow");for(;++o<n.length;)s[o]=r(n[o],0,t,i);return a(),s}}const Us={exit:{taskListCheckValueChecked:Ks,taskListCheckValueUnchecked:Ks,paragraph:function(e){const t=this.stack[this.stack.length-2],i=this.stack[this.stack.length-1],n=t.children,o=i.children[0];let s,r=-1;if(t&&"listItem"===t.type&&"boolean"==typeof t.checked&&o&&"text"===o.type){for(;++r<n.length;){const e=n[r];if("paragraph"===e.type){s=e;break}}s===i&&(o.value=o.value.slice(1),0===o.value.length?i.children.shift():i.position&&o.position&&"number"==typeof o.position.start.offset&&(o.position.start.column++,o.position.start.offset++,i.position.start=Object.assign({},o.position.start)))}this.exit(e)}}},js={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,i,n){const o=e.children[0],s="boolean"==typeof e.checked&&o&&"paragraph"===o.type,r="["+(e.checked?"x":" ")+"] ",a=Cs(n);s&&a.move(r);let l=function(e,t,i,n){const o=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(i);let s=i.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(i);t&&"list"===t.type&&t.ordered&&(s=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===i.options.incrementListMarker?0:t.children.indexOf(e))+s);let r=s.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(r=4*Math.ceil(r/4));const a=Cs(n);a.move(s+" ".repeat(r-s.length)),a.shift(r);const l=i.enter("listItem"),c=Ss(ys(e,i,a.current()),(function(e,t,i){return t?(i?"":" ".repeat(r))+e:(i?s:s+" ".repeat(r-s.length))+e}));return l(),c}(e,t,i,{...n,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+r}))),l}}};function Ks(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}function qs(e={}){const t=this.data();function i(e,i){(t[e]?t[e]:t[e]=[]).push(i)}i("micromarkExtensions",function(e){return Hi([Oo,{document:{91:{tokenize:Go,continuation:{tokenize:Qo},exit:Yo}},text:{91:{tokenize:$o},93:{add:"after",tokenize:Ko,resolveTo:qo}}},Zo(e),Xo,ts])}(e)),i("fromMarkdownExtensions",[gs,{enter:{gfmFootnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},gfmFootnoteDefinitionLabelString:function(){this.buffer()},gfmFootnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},gfmFootnoteCallString:function(){this.buffer()}},exit:{gfmFootnoteDefinition:function(e){this.exit(e)},gfmFootnoteDefinitionLabelString:function(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.label=t,i.identifier=Dn(this.sliceSerialize(e)).toLowerCase()},gfmFootnoteCall:function(e){this.exit(e)},gfmFootnoteCallString:function(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.label=t,i.identifier=Dn(this.sliceSerialize(e)).toLowerCase()}}},As,Bs,Us]),i("toMarkdownExtensions",function(e){return{extensions:[ps,Ts(),Ms,zs(e),js]}}(e))}const $s={tokenize:function(e,t,i){const n=this,o=n.events[n.events.length-1],s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let r=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),a(t)};function a(t){return 36===t?(e.consume(t),r++,a):(e.exit("mathFlowFenceSequence"),r<2?i(t):tn(e,l,"whitespace")(t))}function l(t){return null===t||Yi(t)?h(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return null===t||Yi(t)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),h(t)):36===t?i(t):(e.consume(t),c)}function h(i){return e.exit("mathFlowFence"),n.interrupt?t(i):d(i)}function d(t){return null===t?g(t):Yi(t)?e.attempt(Gs,e.attempt({tokenize:p,partial:!0},g,s?tn(e,d,"linePrefix",s+1):d),g)(t):(e.enter("mathFlowValue"),u(t))}function u(t){return null===t||Yi(t)?(e.exit("mathFlowValue"),d(t)):(e.consume(t),u)}function g(i){return e.exit("mathFlow"),t(i)}function p(e,t,i){let n=0;return tn(e,(function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),o(t)}),"linePrefix",4);function o(t){return 36===t?(e.consume(t),n++,o):n<r?i(t):(e.exit("mathFlowFenceSequence"),tn(e,s,"whitespace")(t))}function s(n){return null===n||Yi(n)?(e.exit("mathFlowFence"),t(n)):i(n)}}},concrete:!0},Gs={tokenize:function(e,t,i){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return n.parser.lazy[n.now().line]?i(e):t(e)}},partial:!0};function Qs(e={}){let t=e.singleDollarTextMath;return null==t&&(t=!0),{tokenize:function(e,i,n){let o,s,r=0;return function(t){return e.enter("mathText"),e.enter("mathTextSequence"),a(t)};function a(i){return 36===i?(e.consume(i),r++,a):r<2&&!t?n(i):(e.exit("mathTextSequence"),l(i))}function l(t){return null===t?n(t):36===t?(s=e.enter("mathTextSequence"),o=0,h(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):Yi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("mathTextData"),c(t))}function c(t){return null===t||32===t||36===t||Yi(t)?(e.exit("mathTextData"),l(t)):(e.consume(t),c)}function h(t){return 36===t?(e.consume(t),o++,h):o===r?(e.exit("mathTextSequence"),e.exit("mathText"),i(t)):(s.type="mathTextData",c(t))}},resolve:Ys,previous:Zs}}function Ys(e){let t,i,n=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=o;++t<n;)if("mathTextData"===e[t][1].type){e[n][1].type="mathTextPadding",e[o][1].type="mathTextPadding",o+=2,n-=2;break}for(t=o-1,n++;++t<=n;)void 0===i?t!==n&&"lineEnding"!==e[t][1].type&&(i=t):t!==n&&"lineEnding"!==e[t][1].type||(e[i][1].type="mathTextData",t!==i+2&&(e[i][1].end=e[t-1][1].end,e.splice(i+2,t-i-2),n-=t-i-2,t=i+2),i=void 0);return e}function Zs(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}function Xs(e={}){const t=this.data();function i(e,i){(t[e]?t[e]:t[e]=[]).push(i)}i("micromarkExtensions",function(e){return{flow:{36:$s},text:{36:Qs(e)}}}(e)),i("fromMarkdownExtensions",function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},e),this.buffer()}},exit:{mathFlow:function(e){const t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),i=this.exit(e);i.value=t,i.data.hChildren[0].value=t,this.setData("mathFlowInside")},mathFlowFence:function(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))},mathFlowFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},mathFlowValue:e,mathText:function(e){const t=this.resume(),i=this.exit(e);i.value=t,i.data.hChildren[0].value=t},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),i("toMarkdownExtensions",function(e={}){let t=e.singleDollarTextMath;return null==t&&(t=!0),i.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},t?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,i,n){const o=e.value||"",s="$".repeat(Math.max(function(e,t){const i=String(e);let n=i.indexOf(t),o=n,s=0,r=0;if(1!==t.length)throw new Error("Expected character");for(;-1!==n;)n===o?++s>r&&(r=s):s=1,o=n+1,n=i.indexOf(t,o);return r}(o,"$")+1,2)),r=i.enter("mathFlow"),a=Cs(n);let l=a.move(s);if(e.meta){const t=i.enter("mathFlowMeta");l+=a.move(Es(i,e.meta,{...a.current(),before:l,after:" ",encode:["$"]})),t()}return l+=a.move("\n"),o&&(l+=a.move(o+"\n")),l+=a.move(s),r(),l},inlineMath:i}};function i(e){const i=e.value||"";let n=1,o="";for(t||n++;new RegExp("(^|[^$])"+"\\$".repeat(n)+"([^$]|$)").test(i);)n++;/[^ \r\n]/.test(i)&&(/[ \r\n$]/.test(i.charAt(0))||/[ \r\n$]/.test(i.charAt(i.length-1)))&&(o=" ");const s="$".repeat(n);return s+o+i+o+s}}(e))}var Js=function(e,t,i){var n={type:String(e)};return null!=i||"string"!=typeof t&&!Array.isArray(t)?Object.assign(n,t):i=t,Array.isArray(i)?n.children=i:null!=i&&(n.value=String(i)),n};const er=function(e,t,i,n){"function"==typeof t&&"function"!=typeof i&&(n=i,i=t,t=null),function(e,t,i,n){"function"==typeof t&&"function"!=typeof i&&(n=i,i=t,t=null);const o=os(t),s=n?-1:1;!function e(r,a,l){const c="object"==typeof r&&null!==r?r:{};let h;return"string"==typeof c.type&&(h="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0,Object.defineProperty(d,"name",{value:"node ("+c.type+(h?"<"+h+">":"")+")"})),d;function d(){let c,h,d,u=[];if((!t||o(r,a,l[l.length-1]||null))&&(u=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(i(r,l)),!1===u[0]))return u;if(r.children&&"skip"!==u[0])for(h=(n?r.children.length:-1)+s,d=l.concat(r);h>-1&&h<r.children.length;){if(c=e(r.children[h],h,d)(),!1===c[0])return c;h="number"==typeof c[1]?c[1]:h+s}return u}}(e,null,[])()}(e,t,(function(e,t){const n=t[t.length-1];return i(e,n?n.children.indexOf(e):null,n)}),n)},tr=nr("start"),ir=nr("end");function nr(e){return function(t){const i=t&&t.position&&t.position[e]||{};return{line:i.line||null,column:i.column||null,offset:i.offset>-1?i.offset:null}}}const or={}.hasOwnProperty;function sr(e){return String(e||"").toUpperCase()}const rr={}.hasOwnProperty;function ar(e,t){const i=t.data||{};return"value"in t&&!(rr.call(i,"hName")||rr.call(i,"hProperties")||rr.call(i,"hChildren"))?e.augment(t,Js("text",t.value)):e(t,"div",hr(e,t))}function lr(e,t,i){const n=t&&t.type;let o;if(!n)throw new Error("Expected node, got `"+t+"`");return o=rr.call(e.handlers,n)?e.handlers[n]:e.passThrough&&e.passThrough.includes(n)?cr:e.unknownHandler,("function"==typeof o?o:ar)(e,t,i)}function cr(e,t){return"children"in t?{...t,children:hr(e,t)}:t}function hr(e,t){const i=[];if("children"in t){const n=t.children;let o=-1;for(;++o<n.length;){const s=lr(e,n[o],t);if(s){if(o&&"break"===n[o-1].type&&(Array.isArray(s)||"text"!==s.type||(s.value=s.value.replace(/^\s+/,"")),!Array.isArray(s)&&"element"===s.type)){const e=s.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(s)?i.push(...s):i.push(s)}}}return i}const dr={'"':"quot","&":"amp","<":"lt",">":"gt"};function ur(e,t){const i=function(e){return e.replace(/["&<>]/g,(function(e){return"&"+dr[e]+";"}))}(function(e){const t=[];let i=-1,n=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let r="";if(37===s&&Ki(e.charCodeAt(i+1))&&Ki(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(r=String.fromCharCode(s));else if(s>55295&&s<57344){const t=e.charCodeAt(i+1);s<56320&&t>56319&&t<57344?(r=String.fromCharCode(s,t),o=1):r="<22>"}else r=String.fromCharCode(s);r&&(t.push(e.slice(n,i),encodeURIComponent(r)),n=i+o+1,r=""),o&&(i+=o,o=0)}return t.join("")+e.slice(n)}(e||""));if(!t)return i;const n=i.indexOf(":"),o=i.indexOf("?"),s=i.indexOf("#"),r=i.indexOf("/");return n<0||r>-1&&n>r||o>-1&&n>o||s>-1&&n>s||t.test(i.slice(0,n))?i:""}function gr(e,t){const i=[];let n=-1;for(t&&i.push(Js("text","\n"));++n<e.length;)n&&i.push(Js("text","\n")),i.push(e[n]);return t&&e.length>0&&i.push(Js("text","\n")),i}function pr(e,t){const i=String(t.identifier),n=ur(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let s;-1===o?(e.footnoteOrder.push(i),e.footnoteCounts[i]=1,s=e.footnoteOrder.length):(e.footnoteCounts[i]++,s=o+1);const r=e.footnoteCounts[i];return e(t,"sup",[e(t.position,"a",{href:"#"+e.clobberPrefix+"fn-"+n,id:e.clobberPrefix+"fnref-"+n+(r>1?"-"+r:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[Js("text",String(s))])])}var mr=o(70729);function fr(e,t){const i=t.referenceType;let n="]";if("collapsed"===i?n+="[]":"full"===i&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return Js("text","!["+t.alt+n);const o=hr(e,t),s=o[0];s&&"text"===s.type?s.value="["+s.value:o.unshift(Js("text","["));const r=o[o.length-1];return r&&"text"===r.type?r.value+=n:o.push(Js("text",n)),o}function _r(e){const t=e.spread;return null==t?e.children.length>1:t}const vr={blockquote:function(e,t){return e(t,"blockquote",gr(hr(e,t),!0))},break:function(e,t){return[e(t,"br"),Js("text","\n")]},code:function(e,t){const i=t.value?t.value+"\n":"",n=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),o={};n&&(o.className=["language-"+n]);const s=e(t,"code",o,[Js("text",i)]);return t.meta&&(s.data={meta:t.meta}),e(t.position,"pre",[s])},delete:function(e,t){return e(t,"del",hr(e,t))},emphasis:function(e,t){return e(t,"em",hr(e,t))},footnoteReference:pr,footnote:function(e,t){const i=e.footnoteById;let n=1;for(;n in i;)n++;const o=String(n);return i[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},pr(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){return e(t,"h"+t.depth,hr(e,t))},html:function(e,t){return e.dangerous?e.augment(t,Js("raw",t.value)):null},imageReference:function(e,t){const i=e.definition(t.identifier);if(!i)return fr(e,t);const n={src:mr(i.url||""),alt:t.alt};return null!==i.title&&void 0!==i.title&&(n.title=i.title),e(t,"img",n)},image:function(e,t){const i={src:mr(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(i.title=t.title),e(t,"img",i)},inlineCode:function(e,t){return e(t,"code",[Js("text",t.value.replace(/\r?\n|\r/g," "))])},linkReference:function(e,t){const i=e.definition(t.identifier);if(!i)return fr(e,t);const n={href:mr(i.url||"")};return null!==i.title&&void 0!==i.title&&(n.title=i.title),e(t,"a",n,hr(e,t))},link:function(e,t){const i={href:mr(t.url)};return null!==t.title&&void 0!==t.title&&(i.title=t.title),e(t,"a",i,hr(e,t))},listItem:function(e,t,i){const n=hr(e,t),o=i?function(e){let t=e.spread;const i=e.children;let n=-1;for(;!t&&++n<i.length;)t=_r(i[n]);return Boolean(t)}(i):_r(t),s={},r=[];if("boolean"==typeof t.checked){let i;n[0]&&"element"===n[0].type&&"p"===n[0].tagName?i=n[0]:(i=e(null,"p",[]),n.unshift(i)),i.children.length>0&&i.children.unshift(Js("text"," ")),i.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),s.className=["task-list-item"]}let a=-1;for(;++a<n.length;){const e=n[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&r.push(Js("text","\n")),"element"!==e.type||"p"!==e.tagName||o?r.push(e):r.push(...e.children)}const l=n[n.length-1];return!l||!o&&"tagName"in l&&"p"===l.tagName||r.push(Js("text","\n")),e(t,"li",s,r)},list:function(e,t){const i={},n=t.ordered?"ol":"ul",o=hr(e,t);let s=-1;for("number"==typeof t.start&&1!==t.start&&(i.start=t.start);++s<o.length;){const e=o[s];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}return e(t,n,i,gr(o,!0))},paragraph:function(e,t){return e(t,"p",hr(e,t))},root:function(e,t){return e.augment(t,Js("root",gr(hr(e,t))))},strong:function(e,t){return e(t,"strong",hr(e,t))},table:function(e,t){const i=t.children;let n=-1;const o=t.align||[],s=[];for(;++n<i.length;){const r=i[n].children,a=0===n?"th":"td",l=[];let c=-1;const h=t.align?o.length:r.length;for(;++c<h;){const t=r[c];l.push(e(t,a,{align:o[c]},t?hr(e,t):[]))}s[n]=e(i[n],"tr",gr(l,!0))}return e(t,"table",gr([e(s[0].position,"thead",gr([s[0]],!0))].concat(s[1]?e({start:tr(s[1]),end:ir(s[s.length-1])},"tbody",gr(s.slice(1),!0)):[]),!0))},text:function(e,t){return e.augment(t,Js("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))},thematicBreak:function(e,t){return e(t,"hr")},toml:br,yaml:br,definition:br,footnoteDefinition:br};function br(){return null}const Cr={}.hasOwnProperty;function yr(e,t){const i=function(e,t){const i=t||{},n=i.allowDangerousHtml||!1,o={};return r.dangerous=n,r.clobberPrefix=void 0===i.clobberPrefix||null===i.clobberPrefix?"user-content-":i.clobberPrefix,r.footnoteLabel=i.footnoteLabel||"Footnotes",r.footnoteBackLabel=i.footnoteBackLabel||"Back to content",r.definition=function(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");var i,n,o;return n=function(e){const i=sr(e.identifier);i&&!or.call(t,i)&&(t[i]=e)},"function"==typeof(i="definition")&&"function"!=typeof n&&(o=n,n=i,i=null),as(e,i,(function(e,t){var i=t[t.length-1];return n(e,i?i.children.indexOf(e):null,i)}),o),function(e){const i=sr(e);return i&&or.call(t,i)?t[i]:null}}(e),r.footnoteById=o,r.footnoteOrder=[],r.footnoteCounts={},r.augment=s,r.handlers={...vr,...i.handlers},r.unknownHandler=i.unknownHandler,r.passThrough=i.passThrough,er(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Cr.call(o,t)||(o[t]=e)})),r;function s(e,t){if(e&&"data"in e&&e.data){const i=e.data;i.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=i.hName),"element"===t.type&&i.hProperties&&(t.properties={...t.properties,...i.hProperties}),"children"in t&&t.children&&i.hChildren&&(t.children=i.hChildren)}if(e){const n="type"in e?e:{position:e};(i=n)&&i.position&&i.position.start&&i.position.start.line&&i.position.start.column&&i.position.end&&i.position.end.line&&i.position.end.column&&(t.position={start:tr(n),end:ir(n)})}var i;return t}function r(e,t,i,n){return Array.isArray(i)&&(n=i,i={}),s(e,{type:"element",tagName:t,properties:i||{},children:n||[]})}}(e,t),n=lr(i,e,null),o=function(e){let t=-1;const i=[];for(;++t<e.footnoteOrder.length;){const n=e.footnoteById[e.footnoteOrder[t].toUpperCase()];if(!n)continue;const o=hr(e,n),s=String(n.identifier),r=ur(s.toLowerCase());let a=0;const l=[];for(;++a<=e.footnoteCounts[s];){const t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const c=o[o.length-1];if(c&&"element"===c.type&&"p"===c.tagName){const e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else o.push(...l);const h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+r},children:gr(o,!0)};n.position&&(h.position=n.position),i.push(h)}return 0===i.length?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:"h2",properties:{id:"footnote-label",className:["sr-only"]},children:[Js("text",e.footnoteLabel)]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:gr(i,!0)},{type:"text",value:"\n"}]}}(i);return o&&n.children.push(Js("text","\n"),o),Array.isArray(n)?{type:"root",children:n}:n}const wr=function(e,t){return e&&"run"in e?function(e,t){return(i,n,o)=>{e.run(yr(i,t),n,(e=>{o(e)}))}}(e,t):function(e){return t=>yr(t,e)}(e||t)};var Sr=o(7045);class kr{constructor(e,t,i){this.property=e,this.normal=t,i&&(this.space=i)}}function xr(e,t){const i={},n={};let o=-1;for(;++o<e.length;)Object.assign(i,e[o].property),Object.assign(n,e[o].normal);return new kr(i,n,t)}function Lr(e){return e.toLowerCase()}kr.prototype.property={},kr.prototype.normal={},kr.prototype.space=null;class Er{constructor(e,t){this.property=e,this.attribute=t}}Er.prototype.space=null,Er.prototype.boolean=!1,Er.prototype.booleanish=!1,Er.prototype.overloadedBoolean=!1,Er.prototype.number=!1,Er.prototype.commaSeparated=!1,Er.prototype.spaceSeparated=!1,Er.prototype.commaOrSpaceSeparated=!1,Er.prototype.mustUseProperty=!1,Er.prototype.defined=!1;let Nr=0;const Dr=Pr(),Tr=Pr(),Ir=Pr(),Ar=Pr(),Mr=Pr(),Rr=Pr(),Or=Pr();function Pr(){return 2**++Nr}const Fr=Object.keys(i);class Br extends Er{constructor(e,t,n,o){let s=-1;if(super(e,t),Hr(this,"space",o),"number"==typeof n)for(;++s<Fr.length;){const e=Fr[s];Hr(this,Fr[s],(n&i[e])===i[e])}}}function Hr(e,t,i){i&&(e[t]=i)}Br.prototype.defined=!0;const Wr={}.hasOwnProperty;function Vr(e){const t={},i={};let n;for(n in e.properties)if(Wr.call(e.properties,n)){const o=e.properties[n],s=new Br(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,i[Lr(n)]=n,i[Lr(s.attribute)]=n}return new kr(t,i,e.space)}const zr=Vr({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ur=Vr({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function jr(e,t){return t in e?e[t]:t}function Kr(e,t){return jr(e,t.toLowerCase())}const qr=Vr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Kr,properties:{xmlns:null,xmlnsXLink:null}}),$r=Vr({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Tr,ariaAutoComplete:null,ariaBusy:Tr,ariaChecked:Tr,ariaColCount:Ar,ariaColIndex:Ar,ariaColSpan:Ar,ariaControls:Mr,ariaCurrent:null,ariaDescribedBy:Mr,ariaDetails:null,ariaDisabled:Tr,ariaDropEffect:Mr,ariaErrorMessage:null,ariaExpanded:Tr,ariaFlowTo:Mr,ariaGrabbed:Tr,ariaHasPopup:null,ariaHidden:Tr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mr,ariaLevel:Ar,ariaLive:null,ariaModal:Tr,ariaMultiLine:Tr,ariaMultiSelectable:Tr,ariaOrientation:null,ariaOwns:Mr,ariaPlaceholder:null,ariaPosInSet:Ar,ariaPressed:Tr,ariaReadOnly:Tr,ariaRelevant:null,ariaRequired:Tr,ariaRoleDescription:Mr,ariaRowCount:Ar,ariaRowIndex:Ar,ariaRowSpan:Ar,ariaSelected:Tr,ariaSetSize:Ar,ariaSort:null,ariaValueMax:Ar,ariaValueMin:Ar,ariaValueNow:Ar,ariaValueText:null,role:null}}),Gr=Vr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Kr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rr,acceptCharset:Mr,accessKey:Mr,action:null,allow:null,allowFullScreen:Dr,allowPaymentRequest:Dr,allowUserMedia:Dr,alt:null,as:null,async:Dr,autoCapitalize:null,autoComplete:Mr,autoFocus:Dr,autoPlay:Dr,capture:Dr,charSet:null,checked:Dr,cite:null,className:Mr,cols:Ar,colSpan:null,content:null,contentEditable:Tr,controls:Dr,controlsList:Mr,coords:Ar|Rr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Dr,defer:Dr,dir:null,dirName:null,disabled:Dr,download:Ir,draggable:Tr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Dr,formTarget:null,headers:Mr,height:Ar,hidden:Dr,high:Ar,href:null,hrefLang:null,htmlFor:Mr,httpEquiv:Mr,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Dr,itemId:null,itemProp:Mr,itemRef:Mr,itemScope:Dr,itemType:Mr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Dr,low:Ar,manifest:null,max:null,maxLength:Ar,media:null,method:null,min:null,minLength:Ar,multiple:Dr,muted:Dr,name:null,nonce:null,noModule:Dr,noValidate:Dr,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Dr,optimum:Ar,pattern:null,ping:Mr,placeholder:null,playsInline:Dr,poster:null,preload:null,readOnly:Dr,referrerPolicy:null,rel:Mr,required:Dr,reversed:Dr,rows:Ar,rowSpan:Ar,sandbox:Mr,scope:null,scoped:Dr,seamless:Dr,selected:Dr,shape:null,size:Ar,sizes:null,slot:null,span:Ar,spellCheck:Tr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ar,step:null,style:null,tabIndex:Ar,target:null,title:null,translate:null,type:null,typeMustMatch:Dr,useMap:null,value:Tr,width:Ar,wrap:null,align:null,aLink:null,archive:Mr,axis:null,background:null,bgColor:null,border:Ar,borderColor:null,bottomMargin:Ar,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Dr,declare:Dr,event:null,face:null,frame:null,frameBorder:null,hSpace:Ar,leftMargin:Ar,link:null,longDesc:null,lowSrc:null,marginHeight:Ar,marginWidth:Ar,noResize:Dr,noHref:Dr,noShade:Dr,noWrap:Dr,object:null,profile:null,prompt:null,rev:null,rightMargin:Ar,rules:null,scheme:null,scrolling:Tr,standby:null,summary:null,text:null,topMargin:Ar,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ar,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Dr,disableRemotePlayback:Dr,prefix:null,property:null,results:Ar,security:null,unselectable:null}}),Qr=Vr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:jr,properties:{about:Or,accentHeight:Ar,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ar,amplitude:Ar,arabicForm:null,ascent:Ar,attributeName:null,attributeType:null,azimuth:Ar,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ar,by:null,calcMode:null,capHeight:Ar,className:Mr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ar,diffuseConstant:Ar,direction:null,display:null,dur:null,divisor:Ar,dominantBaseline:null,download:Dr,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ar,enableBackground:null,end:null,event:null,exponent:Ar,externalResourcesRequired:null,fill:null,fillOpacity:Ar,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Rr,g2:Rr,glyphName:Rr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ar,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ar,horizOriginX:Ar,horizOriginY:Ar,id:null,ideographic:Ar,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ar,k:Ar,k1:Ar,k2:Ar,k3:Ar,k4:Ar,kernelMatrix:Or,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ar,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ar,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ar,overlineThickness:Ar,paintOrder:null,panose1:null,path:null,pathLength:Ar,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ar,pointsAtY:Ar,pointsAtZ:Ar,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Or,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Or,rev:Or,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Or,requiredFeatures:Or,requiredFonts:Or,requiredFormats:Or,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ar,specularExponent:Ar,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ar,strikethroughThickness:Ar,string:null,stroke:null,strokeDashArray:Or,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ar,strokeOpacity:Ar,strokeWidth:null,style:null,surfaceScale:Ar,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Or,tabIndex:Ar,tableValues:null,target:null,targetX:Ar,targetY:Ar,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Or,to:null,transform:null,u1:null,u2:null,underlinePosition:Ar,underlineThickness:Ar,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ar,values:null,vAlphabetic:Ar,vMathematical:Ar,vectorEffect:null,vHanging:Ar,vIdeographic:Ar,version:null,vertAdvY:Ar,vertOriginX:Ar,vertOriginY:Ar,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ar,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Yr=xr([Ur,zr,qr,$r,Gr],"html"),Zr=xr([Ur,zr,qr,$r,Qr],"svg"),Xr=/^data[-\w.:]+$/i,Jr=/-[a-z]/g,ea=/[A-Z]/g;function ta(e,t){const i=Lr(t);let n=t,o=Er;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&"data"===i.slice(0,4)&&Xr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Jr,na);n="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Jr.test(e)){let i=e.replace(ea,ia);"-"!==i.charAt(0)&&(i="-"+i),t="data"+i}}o=Br}return new o(n,t)}function ia(e){return"-"+e.toLowerCase()}function na(e){return e.charAt(1).toUpperCase()}var oa=/[#.]/g;function sa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ra(e){return e.join(" ").trim()}function aa(e){for(var t,i,n=[],o=String(e||""),s=o.indexOf(","),r=0;!t;)-1===s&&(s=o.length,t=!0),!(i=o.slice(r,s).trim())&&t||n.push(i),r=s+1,s=o.indexOf(",",r);return n}function la(e,t){var i=t||{};return""===e[e.length-1]&&(e=e.concat("")),e.join((i.padRight?" ":"")+","+(!1===i.padLeft?"":" ")).trim()}const ca=new Set(["menu","submit","reset","button"]),ha={}.hasOwnProperty;function da(e,t,i){const n=i&&function(e){const t={};let i=-1;for(;++i<e.length;)t[e[i].toLowerCase()]=e[i];return t}(i);return function(i,o,...s){let r,a=-1;if(null==i)r={type:"root",children:[]},s.unshift(o);else if(r=function(e,t="div"){for(var i,n,o,s=e||"",r={},a=0;a<s.length;)oa.lastIndex=a,o=oa.exec(s),(i=s.slice(a,o?o.index:s.length))&&(n?"#"===n?r.id=i:Array.isArray(r.className)?r.className.push(i):r.className=[i]:t=i,a+=i.length),o&&(n=o[0],a++);return{type:"element",tagName:t,properties:r,children:[]}}(i,t),r.tagName=r.tagName.toLowerCase(),n&&ha.call(n,r.tagName)&&(r.tagName=n[r.tagName]),l=o,c=r.tagName,null==l||"object"!=typeof l||Array.isArray(l)||"input"!==c&&l.type&&"string"==typeof l.type&&("children"in l&&Array.isArray(l.children)||("button"===c?!ca.has(l.type.toLowerCase()):"value"in l)))s.unshift(o);else{let t;for(t in o)ha.call(o,t)&&ua(e,r.properties,t,o[t])}for(var l,c;++a<s.length;)ga(r.children,s[a]);return"element"===r.type&&"template"===r.tagName&&(r.content={type:"root",children:r.children},r.children=[]),r}}function ua(e,t,i,n){const o=ta(e,i);let s,r=-1;if(null!=n){if("number"==typeof n){if(Number.isNaN(n))return;s=n}else s="boolean"==typeof n?n:"string"==typeof n?o.spaceSeparated?sa(n):o.commaSeparated?aa(n):o.commaOrSpaceSeparated?sa(aa(n).join(" ")):pa(o,o.property,n):Array.isArray(n)?n.concat():"style"===o.property?function(e){const t=[];let i;for(i in e)ha.call(e,i)&&t.push([i,e[i]].join(": "));return t.join("; ")}(n):String(n);if(Array.isArray(s)){const e=[];for(;++r<s.length;)e[r]=pa(o,o.property,s[r]);s=e}"className"===o.property&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[o.property]=s}}function ga(e,t){let i=-1;if(null==t);else if("string"==typeof t||"number"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++i<t.length;)ga(e,t[i]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?ga(e,t.children):e.push(t)}}function pa(e,t,i){if("string"==typeof i){if(e.number&&i&&!Number.isNaN(Number(i)))return Number(i);if((e.boolean||e.overloadedBoolean)&&(""===i||Lr(i)===Lr(t)))return!0}return i}const ma=da(Zr,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),fa=da(Yr,"div"),_a={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},va={}.hasOwnProperty,ba={"#document":wa,"#document-fragment":wa,"#text":function(e,t){return{type:"text",value:t.value}},"#comment":function(e,t){return{type:"comment",value:t.data}},"#documentType":function(){return{type:"doctype"}}};function Ca(e,t={}){let i,n;return"messages"in t?(n=t,i={}):(n=t.file,i=t),ya({schema:"svg"===i.space?Zr:Yr,file:n,verbose:i.verbose,location:!1},e)}function ya(e,t){const i=e.schema,n=va.call(ba,t.nodeName)?ba[t.nodeName]:Sa;let o;"tagName"in t&&(e.schema=t.namespaceURI===_a.svg?Zr:Yr),"childNodes"in t&&(o=function(e,t){let i=-1;const n=[];for(;++i<t.length;)n[i]=ya(e,t[i]);return n}(e,t.childNodes));const s=n(e,t,o);if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=function(e,t,i){const n=ka(i);if("element"===t.type){const o=t.children[t.children.length-1];if(n&&!i.endTag&&o&&o.position&&o.position.end&&(n.end=Object.assign({},o.position.end)),e.verbose){const n={};let o;for(o in i.attrs)va.call(i.attrs,o)&&(n[ta(e.schema,o).property]=ka(i.attrs[o]));t.data={position:{opening:ka(i.startTag),closing:i.endTag?ka(i.endTag):null,properties:n}}}}return n}(e,s,t.sourceCodeLocation);i&&(e.location=!0,s.position=i)}return e.schema=i,s}function wa(e,t,i){const n={type:"root",children:i,data:{quirksMode:"quirks"===t.mode||"limited-quirks"===t.mode}};if(e.file&&e.location){const t=String(e.file),i=function(e){for(var t=String(e),i=[],n=/\r?\n|\r/g;n.test(t);)i.push(n.lastIndex);return i.push(t.length+1),{toPoint:function(e){var t=-1;if(e>-1&&e<i[i.length-1])for(;++t<i.length;)if(i[t]>e)return{line:t+1,column:e-(i[t-1]||0)+1,offset:e};return{line:void 0,column:void 0,offset:void 0}},toOffset:function(e){var t,n=e&&e.line,o=e&&e.column;return"number"!=typeof n||"number"!=typeof o||Number.isNaN(n)||Number.isNaN(o)||!(n-1 in i)||(t=(i[n-2]||0)+o-1||0),t>-1&&t<i[i.length-1]?t:-1}}}(t);n.position={start:i.toPoint(0),end:i.toPoint(t.length)}}return n}function Sa(e,t,i){const n="svg"===e.schema.space?ma:fa;let o=-1;const s={};for(;++o<t.attrs.length;){const e=t.attrs[o];s[(e.prefix?e.prefix+":":"")+e.name]=e.value}const r=n(t.tagName,s,i);if("template"===r.tagName&&"content"in t){const i=t.sourceCodeLocation,n=i&&i.startTag&&ka(i.startTag),o=i&&i.endTag&&ka(i.endTag),s=ya(e,t.content);n&&o&&e.file&&(s.position={start:n.end,end:o.start}),r.content=s}return r}function ka(e){const t=xa({line:e.startLine,column:e.startCol,offset:e.startOffset}),i=xa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||i?{start:t,end:i}:null}function xa(e){return e.line&&e.column?e:null}var La=o(57848);const Ea=_a,Na={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Da={}.hasOwnProperty,Ta=os("root"),Ia=os("element"),Aa=os("text");function Ma(e,t,i){if("function"!=typeof e)throw new TypeError("h is not a function");const n=function(e){const t=e("div",{});return Boolean(t&&("_owner"in t||"_store"in t)&&(void 0===t.key||null===t.key))}(e),o=function(e){const t=e("div",{});return Boolean(t&&t.context&&t.context._isVue)}(e),s=function(e){return"VirtualNode"===e("div",{}).type}(e);let r,a;if("string"==typeof i||"boolean"==typeof i?(r=i,i={}):(i||(i={}),r=i.prefix),Ta(t))a=1===t.children.length&&Ia(t.children[0])?t.children[0]:{type:"element",tagName:"div",properties:{},children:t.children};else{if(!Ia(t))throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");a=t}return Ra(e,a,{schema:"svg"===i.space?Zr:Yr,prefix:null==r?n||o||s?"h-":null:"string"==typeof r?r:r?"h-":null,key:0,react:n,vue:o,vdom:s,hyperscript:Pa(e)})}function Ra(e,t,i){const n=i.schema;let o=n,s=t.tagName;const r={},a=[];let l,c=-1;for(l in"html"===n.space&&"svg"===s.toLowerCase()&&(o=Zr,i.schema=o),t.properties)t.properties&&Da.call(t.properties,l)&&Oa(r,l,t.properties[l],i,s);if(i.vdom&&("html"===o.space?s=s.toUpperCase():o.space&&(r.namespace=Ea[o.space])),i.prefix&&(i.key++,r.key=i.prefix+i.key),t.children)for(;++c<t.children.length;){const n=t.children[c];Ia(n)?a.push(Ra(e,n,i)):Aa(n)&&a.push(n.value)}return i.schema=n,a.length>0?e.call(t,s,r,a):e.call(t,s,r)}function Oa(e,t,i,n,o){const s=ta(n.schema,t);let r;null==i||"number"==typeof i&&Number.isNaN(i)||!1===i&&(n.vue||n.vdom||n.hyperscript)||!i&&s.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(i)&&(i=s.commaSeparated?la(i):ra(i)),s.boolean&&n.hyperscript&&(i=""),"style"===s.property&&"string"==typeof i&&(n.react||n.vue||n.vdom)&&(i=function(e,t){const i={};try{La(e,((e,t)=>{"-ms-"===e.slice(0,4)&&(e="ms-"+e.slice(4)),i[e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()))]=t}))}catch(e){throw e.message=t+"[style]"+e.message.slice("undefined".length),e}return i}(i,o)),n.vue?"style"!==s.property&&(r="attrs"):s.mustUseProperty||(n.vdom?"style"!==s.property&&(r="attributes"):n.hyperscript&&(r="attrs")),r?e[r]=Object.assign(e[r]||{},{[s.attribute]:i}):s.space&&n.react?e[Na[s.property]||s.property]=i:e[s.attribute]=i)}function Pa(e){return"context"in e&&"cleanup"in e}var Fa={}.hasOwnProperty;function Ba(e,t){var i=t||{};function n(t){var i=n.invalid,o=n.handlers;if(t&&Fa.call(t,e)&&(i=Fa.call(o,t[e])?o[t[e]]:n.unknown),i)return i.apply(this,arguments)}return n.handlers=i.handlers||{},n.invalid=i.invalid,n.unknown=i.unknown,n}var Ha={}.hasOwnProperty,Wa=Ba("type",{handlers:{root:function(e,t){var i={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return i.childNodes=Va(e.children,i,t),za(e,i)},element:function(e,t){var i=t.space;return Ma((function(i,n){var o,s,r,a,l,c=[];for(r in n)Ha.call(n,r)&&!1!==n[r]&&((o=ta(t,r)).boolean&&!n[r]||(s={name:r,value:!0===n[r]?"":String(n[r])},o.space&&"html"!==o.space&&"svg"!==o.space&&((a=r.indexOf(":"))<0?s.prefix="":(s.name=r.slice(a+1),s.prefix=r.slice(0,a)),s.namespace=_a[o.space]),c.push(s)));return"html"===t.space&&"svg"===e.tagName&&(t=Zr),(l=za(e,{nodeName:i,tagName:i,attrs:c,namespaceURI:_a[t.space],childNodes:[],parentNode:void 0})).childNodes=Va(e.children,l,t),"template"===i&&(l.content=function(e,t){var i={nodeName:"#document-fragment",childNodes:[]};return i.childNodes=Va(e.children,i,t),za(e,i)}(e.content,t)),l}),Object.assign({},e,{children:[]}),{space:i})},text:function(e){return za(e,{nodeName:"#text",value:e.value,parentNode:void 0})},comment:function(e){return za(e,{nodeName:"#comment",data:e.value,parentNode:void 0})},doctype:function(e){return za(e,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}}});function Va(e,t,i){var n,o=-1,s=[];if(e)for(;++o<e.length;)(n=Wa(e[o],i)).parentNode=t,s.push(n);return s}function za(e,t){var i=e.position;return i&&i.start&&i.end&&(t.sourceCodeLocation={startLine:i.start.line,startCol:i.start.column,startOffset:i.start.offset,endLine:i.end.line,endCol:i.end.column,endOffset:i.end.offset}),t}const Ua=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"],ja={sourceCodeLocationInfo:!0,scriptingEnabled:!1},Ka=function(e,t,i){let n=-1;const o=new Sr(ja),s=Ba("type",{handlers:{root:function(e){g(e.children)},element:function(e){f(),o._processToken(function(e){const t=Object.assign(Ga(e));return t.startTag=Object.assign({},t),{type:"START_TAG_TOKEN",tagName:e.tagName,selfClosing:!1,attrs:qa(e),location:t}}(e),_a.html),g(e.children),Ua.includes(e.tagName)||(f(),o._processToken(function(e){const t=Object.assign(Ga(e));return t.startTag=Object.assign({},t),{type:"END_TAG_TOKEN",tagName:e.tagName,attrs:[],location:t}}(e)))},text:function(e){f(),o._processToken({type:"CHARACTER_TOKEN",chars:e.value,location:Ga(e)})},comment:p,doctype:function(e){f(),o._processToken({type:"DOCTYPE_TOKEN",name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ga(e)})},raw:function(e){const t=tr(e),i=t.line||1,n=t.column||1,s=t.offset||0;if(!l)throw new Error("Expected `preprocessor`");if(!a)throw new Error("Expected `tokenizer`");if(!c)throw new Error("Expected `posTracker`");if(!h)throw new Error("Expected `locationTracker`");l.html=void 0,l.pos=-1,l.lastGapPos=-1,l.lastCharPos=-1,l.gapStack=[],l.skipNextNewLine=!1,l.lastChunkWritten=!1,l.endOfChunkHit=!1,c.isEol=!1,c.lineStartPos=1-n,c.droppedBufferSize=s,c.offset=0,c.col=1,c.line=i,h.currentAttrLocation=void 0,h.ctLoc=Ga(e),a.write(e.value),o._runParsingLoop(null),("NAMED_CHARACTER_REFERENCE_STATE"===a.state||"NUMERIC_CHARACTER_REFERENCE_END_STATE"===a.state)&&(l.lastChunkWritten=!0,a[a.state](a._consume()));const r=a.currentCharacterToken;r&&(r.location.endLine=c.line,r.location.endCol=c.col+1,r.location.endOffset=c.offset+1,o._processToken(r))}},unknown:$a});let r,a,l,c,h;var d;if(d=t,Boolean(d&&!("message"in d&&"messages"in d))&&(i=t,t=void 0),i&&i.passThrough)for(;++n<i.passThrough.length;)s.handlers[i.passThrough[n]]=m;const u=Ca(function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName))}(e)?function(){const t=o.treeAdapter.createDocument();if(o._bootstrap(t,void 0),a=o.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,h=a.__mixins[0],c=h.posTracker,s(e),t}():function(){const t={nodeName:"template",tagName:"template",attrs:[],namespaceURI:_a.html,childNodes:[]},i={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:_a.html,childNodes:[]},n={nodeName:"#document-fragment",childNodes:[]};if(o._bootstrap(i,t),o._pushTmplInsertionMode("IN_TEMPLATE_MODE"),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),a=o.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,h=a.__mixins[0],c=h.posTracker,s(e),o._adoptNodes(i.childNodes[0],n),n}(),t);return r&&er(u,"comment",((e,t,i)=>{const n=e;if(n.value.stitch&&null!==i&&null!==t)return i.children[t]=n.value.stitch,t})),"root"!==e.type&&"root"===u.type&&1===u.children.length?u.children[0]:u;function g(e){let t=-1;if(e)for(;++t<e.length;)s(e[t])}function p(e){f(),o._processToken({type:"COMMENT_TOKEN",data:e.value,location:Ga(e)})}function m(e){let n;r=!0,n="children"in e?{...e,children:Ka({type:"root",children:e.children},t,i).children}:{...e},p({type:"comment",value:{stitch:n}})}function f(){if(!a)throw new Error("Expected `tokenizer`");a.tokenQueue=[],a.state="DATA_STATE",a.returnState="",a.charRefCode=-1,a.tempBuff=[],a.lastStartTagName="",a.consumedAfterSnapshot=-1,a.active=!1,a.currentCharacterToken=void 0,a.currentToken=void 0,a.currentAttr=void 0}};function qa(e){return(t={tagName:e.tagName,type:"element",properties:e.properties,children:[]},Wa(t,Yr)).attrs;var t}function $a(e){throw new Error("Cannot compile `"+e.type+"` node")}function Ga(e){const t=tr(e),i=ir(e);return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:i.line,endCol:i.column,endOffset:i.offset}}function Qa(e={}){return(t,i)=>Ka(t,i,e)}class Ya{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Ya(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Za{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Za(t,Ya.range(this,e))}}class Xa{constructor(e,t){this.position=void 0;var i,n="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start;var r=o.end;i===s.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var a=s.slice(i,r).replace(/[^]/g,"$&̲");n+=(i>15?"…"+s.slice(i-15,i):s.slice(0,i))+a+(r+15<s.length?s.slice(r,r+15)+"…":s.slice(r))}var l=new Error(n);return l.name="ParseError",l.__proto__=Xa.prototype,l.position=i,l}}Xa.prototype.__proto__=Error.prototype;var Ja=/([A-Z])/g,el={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},tl=/[&><"']/g,il=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},nl=function(e,t){return-1!==e.indexOf(t)},ol=function(e,t){return void 0===e?t:e},sl=function(e){return String(e).replace(tl,(e=>el[e]))},rl=function(e){return e.replace(Ja,"-$1").toLowerCase()},al=il,ll=function(e){var t=il(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},cl=function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return null!=t?t[1]:"_relative"},hl={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function dl(e){if(e.default)return e.default;var t=e.type,i=Array.isArray(t)?t[0]:t;if("string"!=typeof i)return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class ul{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},hl)if(hl.hasOwnProperty(t)){var i=hl[t];this[t]=void 0!==e[t]?i.processor?i.processor(e[t]):e[t]:dl(i)}}reportNonstrict(e,t,i){var n=this.strict;if("function"==typeof n&&(n=n(e,t,i)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new Xa("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1)))}isTrusted(e){e.url&&!e.protocol&&(e.protocol=cl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class gl{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return pl[ml[this.id]]}sub(){return pl[fl[this.id]]}fracNum(){return pl[_l[this.id]]}fracDen(){return pl[vl[this.id]]}cramp(){return pl[bl[this.id]]}text(){return pl[Cl[this.id]]}isTight(){return this.size>=2}}var pl=[new gl(0,0,!1),new gl(1,0,!0),new gl(2,1,!1),new gl(3,1,!0),new gl(4,2,!1),new gl(5,2,!0),new gl(6,3,!1),new gl(7,3,!0)],ml=[4,5,4,5,6,7,6,7],fl=[5,5,5,5,7,7,7,7],_l=[2,3,4,5,6,7,6,7],vl=[3,3,5,5,7,7,7,7],bl=[1,1,3,3,5,5,7,7],Cl=[0,1,2,3,2,3,2,3],yl={DISPLAY:pl[0],TEXT:pl[2],SCRIPT:pl[4],SCRIPTSCRIPT:pl[6]},wl=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],Sl=[];function kl(e){for(var t=0;t<Sl.length;t+=2)if(e>=Sl[t]&&e<=Sl[t+1])return!0;return!1}wl.forEach((e=>e.blocks.forEach((e=>Sl.push(...e)))));var xl={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Ll{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return nl(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var El={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Nl={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Dl={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Tl(e,t,i){if(!El[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),o=El[t][n];if(!o&&e[0]in Dl&&(n=Dl[e[0]].charCodeAt(0),o=El[t][n]),o||"text"!==i||kl(n)&&(o=El[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var Il={},Al=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ml=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Rl=function(e,t){return t.size<2?e:Al[e-1][t.size-1]};class Ol{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Ol.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ml[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new Ol(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Rl(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ml[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Rl(Ol.BASESIZE,e);return this.size===t&&this.textSize===Ol.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ol.BASESIZE?["sizing","reset-size"+this.size,"size"+Ol.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!Il[t=e>=5?0:e>=3?1:2]){var i=Il[t]={cssEmPerMu:Nl.quad[t]/18};for(var n in Nl)Nl.hasOwnProperty(n)&&(i[n]=Nl[n][t])}return Il[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ol.BASESIZE=6;var Pl={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Fl={ex:!0,em:!0,mu:!0},Bl=function(e){return"string"!=typeof e&&(e=e.unit),e in Pl||e in Fl||"ex"===e},Hl=function(e,t){var i;if(e.unit in Pl)i=Pl[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Xa("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},Wl=function(e){return+e.toFixed(4)+"em"},Vl=function(e){return e.filter((e=>e)).join(" ")},zl=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Ul=function(e){var t=document.createElement(e);for(var i in t.className=Vl(this.classes),this.style)this.style.hasOwnProperty(i)&&(t.style[i]=this.style[i]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},jl=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+sl(Vl(this.classes))+'"');var i="";for(var n in this.style)this.style.hasOwnProperty(n)&&(i+=rl(n)+":"+this.style[n]+";");for(var o in i&&(t+=' style="'+sl(i)+'"'),this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+sl(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+"</"+e+">"};class Kl{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,zl.call(this,e,i,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return nl(this.classes,e)}toNode(){return Ul.call(this,"span")}toMarkup(){return jl.call(this,"span")}}class ql{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,zl.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return nl(this.classes,e)}toNode(){return Ul.call(this,"a")}toMarkup(){return jl.call(this,"a")}}class $l{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}hasClass(e){return nl(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var i in this.style)this.style.hasOwnProperty(i)&&(t+=rl(i)+":"+this.style[i]+";");return t&&(e+=' style="'+sl(t)+'"'),e+"'/>"}}var Gl={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Ql{constructor(e,t,i,n,o,s,r,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=r||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<wl.length;t++)for(var i=wl[t],n=0;n<i.blocks.length;n++){var o=i.blocks[n];if(e>=o[0]&&e<=o[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Gl[this.text])}hasClass(e){return nl(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var i in this.italic>0&&((t=document.createElement("span")).style.marginRight=Wl(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Vl(this.classes)),this.style)this.style.hasOwnProperty(i)&&((t=t||document.createElement("span")).style[i]=this.style[i]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=sl(Vl(this.classes)),t+='"');var i="";for(var n in this.italic>0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(i+=rl(n)+":"+this.style[n]+";");i&&(e=!0,t+=' style="'+sl(i)+'"');var o=sl(this.text);return e?(t+=">",t+=o,t+="</span>"):o}}class Yl{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+"</svg>"}}class Zl{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",xl[this.pathName]),e}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+xl[this.pathName]+"'/>"}}class Xl{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+"/>"}}function Jl(e){if(e instanceof Ql)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ec={bin:1,close:1,inner:1,open:1,punct:1,rel:1},tc={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ic={math:{},text:{}};function nc(e,t,i,n,o,s){ic[e][o]={font:t,group:i,replace:n},s&&n&&(ic[e][n]=ic[e][o])}var oc="math",sc="text",rc="main",ac="ams",lc="accent-token",cc="bin",hc="close",dc="inner",uc="mathord",gc="op-token",pc="open",mc="punct",fc="rel",_c="spacing",vc="textord";nc(oc,rc,fc,"≡","\\equiv",!0),nc(oc,rc,fc,"≺","\\prec",!0),nc(oc,rc,fc,"≻","\\succ",!0),nc(oc,rc,fc,"","\\sim",!0),nc(oc,rc,fc,"⊥","\\perp"),nc(oc,rc,fc,"⪯","\\preceq",!0),nc(oc,rc,fc,"⪰","\\succeq",!0),nc(oc,rc,fc,"≃","\\simeq",!0),nc(oc,rc,fc,"","\\mid",!0),nc(oc,rc,fc,"≪","\\ll",!0),nc(oc,rc,fc,"≫","\\gg",!0),nc(oc,rc,fc,"≍","\\asymp",!0),nc(oc,rc,fc,"∥","\\parallel"),nc(oc,rc,fc,"⋈","\\bowtie",!0),nc(oc,rc,fc,"⌣","\\smile",!0),nc(oc,rc,fc,"⊑","\\sqsubseteq",!0),nc(oc,rc,fc,"⊒","\\sqsupseteq",!0),nc(oc,rc,fc,"≐","\\doteq",!0),nc(oc,rc,fc,"⌢","\\frown",!0),nc(oc,rc,fc,"∋","\\ni",!0),nc(oc,rc,fc,"∝","\\propto",!0),nc(oc,rc,fc,"⊢","\\vdash",!0),nc(oc,rc,fc,"⊣","\\dashv",!0),nc(oc,rc,fc,"∋","\\owns"),nc(oc,rc,mc,".","\\ldotp"),nc(oc,rc,mc,"⋅","\\cdotp"),nc(oc,rc,vc,"#","\\#"),nc(sc,rc,vc,"#","\\#"),nc(oc,rc,vc,"&","\\&"),nc(sc,rc,vc,"&","\\&"),nc(oc,rc,vc,"ℵ","\\aleph",!0),nc(oc,rc,vc,"∀","\\forall",!0),nc(oc,rc,vc,"ℏ","\\hbar",!0),nc(oc,rc,vc,"∃","\\exists",!0),nc(oc,rc,vc,"∇","\\nabla",!0),nc(oc,rc,vc,"♭","\\flat",!0),nc(oc,rc,vc,"","\\ell",!0),nc(oc,rc,vc,"♮","\\natural",!0),nc(oc,rc,vc,"♣","\\clubsuit",!0),nc(oc,rc,vc,"℘","\\wp",!0),nc(oc,rc,vc,"♯","\\sharp",!0),nc(oc,rc,vc,"♢","\\diamondsuit",!0),nc(oc,rc,vc,"","\\Re",!0),nc(oc,rc,vc,"♡","\\heartsuit",!0),nc(oc,rc,vc,"","\\Im",!0),nc(oc,rc,vc,"♠","\\spadesuit",!0),nc(oc,rc,vc,"§","\\S",!0),nc(sc,rc,vc,"§","\\S"),nc(oc,rc,vc,"¶","\\P",!0),nc(sc,rc,vc,"¶","\\P"),nc(oc,rc,vc,"†","\\dag"),nc(sc,rc,vc,"†","\\dag"),nc(sc,rc,vc,"†","\\textdagger"),nc(oc,rc,vc,"‡","\\ddag"),nc(sc,rc,vc,"‡","\\ddag"),nc(sc,rc,vc,"‡","\\textdaggerdbl"),nc(oc,rc,hc,"⎱","\\rmoustache",!0),nc(oc,rc,pc,"⎰","\\lmoustache",!0),nc(oc,rc,hc,"⟯","\\rgroup",!0),nc(oc,rc,pc,"⟮","\\lgroup",!0),nc(oc,rc,cc,"∓","\\mp",!0),nc(oc,rc,cc,"⊖","\\ominus",!0),nc(oc,rc,cc,"⊎","\\uplus",!0),nc(oc,rc,cc,"⊓","\\sqcap",!0),nc(oc,rc,cc,"","\\ast"),nc(oc,rc,cc,"⊔","\\sqcup",!0),nc(oc,rc,cc,"◯","\\bigcirc",!0),nc(oc,rc,cc,"∙","\\bullet",!0),nc(oc,rc,cc,"‡","\\ddagger"),nc(oc,rc,cc,"≀","\\wr",!0),nc(oc,rc,cc,"⨿","\\amalg"),nc(oc,rc,cc,"&","\\And"),nc(oc,rc,fc,"⟵","\\longleftarrow",!0),nc(oc,rc,fc,"⇐","\\Leftarrow",!0),nc(oc,rc,fc,"⟸","\\Longleftarrow",!0),nc(oc,rc,fc,"⟶","\\longrightarrow",!0),nc(oc,rc,fc,"⇒","\\Rightarrow",!0),nc(oc,rc,fc,"⟹","\\Longrightarrow",!0),nc(oc,rc,fc,"↔","\\leftrightarrow",!0),nc(oc,rc,fc,"⟷","\\longleftrightarrow",!0),nc(oc,rc,fc,"⇔","\\Leftrightarrow",!0),nc(oc,rc,fc,"⟺","\\Longleftrightarrow",!0),nc(oc,rc,fc,"↦","\\mapsto",!0),nc(oc,rc,fc,"⟼","\\longmapsto",!0),nc(oc,rc,fc,"↗","\\nearrow",!0),nc(oc,rc,fc,"↩","\\hookleftarrow",!0),nc(oc,rc,fc,"↪","\\hookrightarrow",!0),nc(oc,rc,fc,"↘","\\searrow",!0),nc(oc,rc,fc,"↼","\\leftharpoonup",!0),nc(oc,rc,fc,"⇀","\\rightharpoonup",!0),nc(oc,rc,fc,"↙","\\swarrow",!0),nc(oc,rc,fc,"↽","\\leftharpoondown",!0),nc(oc,rc,fc,"⇁","\\rightharpoondown",!0),nc(oc,rc,fc,"↖","\\nwarrow",!0),nc(oc,rc,fc,"⇌","\\rightleftharpoons",!0),nc(oc,ac,fc,"≮","\\nless",!0),nc(oc,ac,fc,"","\\@nleqslant"),nc(oc,ac,fc,"","\\@nleqq"),nc(oc,ac,fc,"⪇","\\lneq",!0),nc(oc,ac,fc,"≨","\\lneqq",!0),nc(oc,ac,fc,"","\\@lvertneqq"),nc(oc,ac,fc,"⋦","\\lnsim",!0),nc(oc,ac,fc,"⪉","\\lnapprox",!0),nc(oc,ac,fc,"⊀","\\nprec",!0),nc(oc,ac,fc,"⋠","\\npreceq",!0),nc(oc,ac,fc,"⋨","\\precnsim",!0),nc(oc,ac,fc,"⪹","\\precnapprox",!0),nc(oc,ac,fc,"≁","\\nsim",!0),nc(oc,ac,fc,"","\\@nshortmid"),nc(oc,ac,fc,"∤","\\nmid",!0),nc(oc,ac,fc,"⊬","\\nvdash",!0),nc(oc,ac,fc,"⊭","\\nvDash",!0),nc(oc,ac,fc,"⋪","\\ntriangleleft"),nc(oc,ac,fc,"⋬","\\ntrianglelefteq",!0),nc(oc,ac,fc,"⊊","\\subsetneq",!0),nc(oc,ac,fc,"","\\@varsubsetneq"),nc(oc,ac,fc,"⫋","\\subsetneqq",!0),nc(oc,ac,fc,"","\\@varsubsetneqq"),nc(oc,ac,fc,"≯","\\ngtr",!0),nc(oc,ac,fc,"","\\@ngeqslant"),nc(oc,ac,fc,"","\\@ngeqq"),nc(oc,ac,fc,"⪈","\\gneq",!0),nc(oc,ac,fc,"≩","\\gneqq",!0),nc(oc,ac,fc,"","\\@gvertneqq"),nc(oc,ac,fc,"⋧","\\gnsim",!0),nc(oc,ac,fc,"⪊","\\gnapprox",!0),nc(oc,ac,fc,"⊁","\\nsucc",!0),nc(oc,ac,fc,"⋡","\\nsucceq",!0),nc(oc,ac,fc,"⋩","\\succnsim",!0),nc(oc,ac,fc,"⪺","\\succnapprox",!0),nc(oc,ac,fc,"≆","\\ncong",!0),nc(oc,ac,fc,"","\\@nshortparallel"),nc(oc,ac,fc,"∦","\\nparallel",!0),nc(oc,ac,fc,"⊯","\\nVDash",!0),nc(oc,ac,fc,"⋫","\\ntriangleright"),nc(oc,ac,fc,"⋭","\\ntrianglerighteq",!0),nc(oc,ac,fc,"","\\@nsupseteqq"),nc(oc,ac,fc,"⊋","\\supsetneq",!0),nc(oc,ac,fc,"","\\@varsupsetneq"),nc(oc,ac,fc,"⫌","\\supsetneqq",!0),nc(oc,ac,fc,"","\\@varsupsetneqq"),nc(oc,ac,fc,"⊮","\\nVdash",!0),nc(oc,ac,fc,"⪵","\\precneqq",!0),nc(oc,ac,fc,"⪶","\\succneqq",!0),nc(oc,ac,fc,"","\\@nsubseteqq"),nc(oc,ac,cc,"⊴","\\unlhd"),nc(oc,ac,cc,"⊵","\\unrhd"),nc(oc,ac,fc,"↚","\\nleftarrow",!0),nc(oc,ac,fc,"↛","\\nrightarrow",!0),nc(oc,ac,fc,"⇍","\\nLeftarrow",!0),nc(oc,ac,fc,"⇏","\\nRightarrow",!0),nc(oc,ac,fc,"↮","\\nleftrightarrow",!0),nc(oc,ac,fc,"⇎","\\nLeftrightarrow",!0),nc(oc,ac,fc,"△","\\vartriangle"),nc(oc,ac,vc,"ℏ","\\hslash"),nc(oc,ac,vc,"▽","\\triangledown"),nc(oc,ac,vc,"◊","\\lozenge"),nc(oc,ac,vc,"Ⓢ","\\circledS"),nc(oc,ac,vc,"®","\\circledR"),nc(sc,ac,vc,"®","\\circledR"),nc(oc,ac,vc,"∡","\\measuredangle",!0),nc(oc,ac,vc,"∄","\\nexists"),nc(oc,ac,vc,"℧","\\mho"),nc(oc,ac,vc,"Ⅎ","\\Finv",!0),nc(oc,ac,vc,"⅁","\\Game",!0),nc(oc,ac,vc,"","\\backprime"),nc(oc,ac,vc,"▲","\\blacktriangle"),nc(oc,ac,vc,"▼","\\blacktriangledown"),nc(oc,ac,vc,"■","\\blacksquare"),nc(oc,ac,vc,"⧫","\\blacklozenge"),nc(oc,ac,vc,"★","\\bigstar"),nc(oc,ac,vc,"∢","\\sphericalangle",!0),nc(oc,ac,vc,"∁","\\complement",!0),nc(oc,ac,vc,"ð","\\eth",!0),nc(sc,rc,vc,"ð","ð"),nc(oc,ac,vc,"","\\diagup"),nc(oc,ac,vc,"╲","\\diagdown"),nc(oc,ac,vc,"□","\\square"),nc(oc,ac,vc,"□","\\Box"),nc(oc,ac,vc,"◊","\\Diamond"),nc(oc,ac,vc,"¥","\\yen",!0),nc(sc,ac,vc,"¥","\\yen",!0),nc(oc,ac,vc,"✓","\\checkmark",!0),nc(sc,ac,vc,"✓","\\checkmark"),nc(oc,ac,vc,"ℶ","\\beth",!0),nc(oc,ac,vc,"ℸ","\\daleth",!0),nc(oc,ac,vc,"ℷ","\\gimel",!0),nc(oc,ac,vc,"ϝ","\\digamma",!0),nc(oc,ac,vc,"ϰ","\\varkappa"),nc(oc,ac,pc,"┌","\\@ulcorner",!0),nc(oc,ac,hc,"┐","\\@urcorner",!0),nc(oc,ac,pc,"└","\\@llcorner",!0),nc(oc,ac,hc,"┘","\\@lrcorner",!0),nc(oc,ac,fc,"≦","\\leqq",!0),nc(oc,ac,fc,"⩽","\\leqslant",!0),nc(oc,ac,fc,"⪕","\\eqslantless",!0),nc(oc,ac,fc,"≲","\\lesssim",!0),nc(oc,ac,fc,"⪅","\\lessapprox",!0),nc(oc,ac,fc,"≊","\\approxeq",!0),nc(oc,ac,cc,"⋖","\\lessdot"),nc(oc,ac,fc,"⋘","\\lll",!0),nc(oc,ac,fc,"≶","\\lessgtr",!0),nc(oc,ac,fc,"⋚","\\lesseqgtr",!0),nc(oc,ac,fc,"⪋","\\lesseqqgtr",!0),nc(oc,ac,fc,"≑","\\doteqdot"),nc(oc,ac,fc,"≓","\\risingdotseq",!0),nc(oc,ac,fc,"≒","\\fallingdotseq",!0),nc(oc,ac,fc,"∽","\\backsim",!0),nc(oc,ac,fc,"⋍","\\backsimeq",!0),nc(oc,ac,fc,"⫅","\\subseteqq",!0),nc(oc,ac,fc,"⋐","\\Subset",!0),nc(oc,ac,fc,"⊏","\\sqsubset",!0),nc(oc,ac,fc,"≼","\\preccurlyeq",!0),nc(oc,ac,fc,"⋞","\\curlyeqprec",!0),nc(oc,ac,fc,"≾","\\precsim",!0),nc(oc,ac,fc,"⪷","\\precapprox",!0),nc(oc,ac,fc,"⊲","\\vartriangleleft"),nc(oc,ac,fc,"⊴","\\trianglelefteq"),nc(oc,ac,fc,"⊨","\\vDash",!0),nc(oc,ac,fc,"⊪","\\Vvdash",!0),nc(oc,ac,fc,"⌣","\\smallsmile"),nc(oc,ac,fc,"⌢","\\smallfrown"),nc(oc,ac,fc,"≏","\\bumpeq",!0),nc(oc,ac,fc,"≎","\\Bumpeq",!0),nc(oc,ac,fc,"≧","\\geqq",!0),nc(oc,ac,fc,"⩾","\\geqslant",!0),nc(oc,ac,fc,"⪖","\\eqslantgtr",!0),nc(oc,ac,fc,"≳","\\gtrsim",!0),nc(oc,ac,fc,"⪆","\\gtrapprox",!0),nc(oc,ac,cc,"⋗","\\gtrdot"),nc(oc,ac,fc,"⋙","\\ggg",!0),nc(oc,ac,fc,"≷","\\gtrless",!0),nc(oc,ac,fc,"⋛","\\gtreqless",!0),nc(oc,ac,fc,"⪌","\\gtreqqless",!0),nc(oc,ac,fc,"≖","\\eqcirc",!0),nc(oc,ac,fc,"≗","\\circeq",!0),nc(oc,ac,fc,"≜","\\triangleq",!0),nc(oc,ac,fc,"","\\thicksim"),nc(oc,ac,fc,"≈","\\thickapprox"),nc(oc,ac,fc,"⫆","\\supseteqq",!0),nc(oc,ac,fc,"⋑","\\Supset",!0),nc(oc,ac,fc,"⊐","\\sqsupset",!0),nc(oc,ac,fc,"≽","\\succcurlyeq",!0),nc(oc,ac,fc,"⋟","\\curlyeqsucc",!0),nc(oc,ac,fc,"≿","\\succsim",!0),nc(oc,ac,fc,"⪸","\\succapprox",!0),nc(oc,ac,fc,"⊳","\\vartriangleright"),nc(oc,ac,fc,"⊵","\\trianglerighteq"),nc(oc,ac,fc,"⊩","\\Vdash",!0),nc(oc,ac,fc,"","\\shortmid"),nc(oc,ac,fc,"∥","\\shortparallel"),nc(oc,ac,fc,"≬","\\between",!0),nc(oc,ac,fc,"⋔","\\pitchfork",!0),nc(oc,ac,fc,"∝","\\varpropto"),nc(oc,ac,fc,"◀","\\blacktriangleleft"),nc(oc,ac,fc,"∴","\\therefore",!0),nc(oc,ac,fc,"∍","\\backepsilon"),nc(oc,ac,fc,"▶","\\blacktriangleright"),nc(oc,ac,fc,"∵","\\because",!0),nc(oc,ac,fc,"⋘","\\llless"),nc(oc,ac,fc,"⋙","\\gggtr"),nc(oc,ac,cc,"⊲","\\lhd"),nc(oc,ac,cc,"⊳","\\rhd"),nc(oc,ac,fc,"≂","\\eqsim",!0),nc(oc,rc,fc,"⋈","\\Join"),nc(oc,ac,fc,"≑","\\Doteq",!0),nc(oc,ac,cc,"∔","\\dotplus",!0),nc(oc,ac,cc,"","\\smallsetminus"),nc(oc,ac,cc,"⋒","\\Cap",!0),nc(oc,ac,cc,"⋓","\\Cup",!0),nc(oc,ac,cc,"⩞","\\doublebarwedge",!0),nc(oc,ac,cc,"⊟","\\boxminus",!0),nc(oc,ac,cc,"⊞","\\boxplus",!0),nc(oc,ac,cc,"⋇","\\divideontimes",!0),nc(oc,ac,cc,"⋉","\\ltimes",!0),nc(oc,ac,cc,"⋊","\\rtimes",!0),nc(oc,ac,cc,"⋋","\\leftthreetimes",!0),nc(oc,ac,cc,"⋌","\\rightthreetimes",!0),nc(oc,ac,cc,"⋏","\\curlywedge",!0),nc(oc,ac,cc,"⋎","\\curlyvee",!0),nc(oc,ac,cc,"⊝","\\circleddash",!0),nc(oc,ac,cc,"⊛","\\circledast",!0),nc(oc,ac,cc,"⋅","\\centerdot"),nc(oc,ac,cc,"⊺","\\intercal",!0),nc(oc,ac,cc,"⋒","\\doublecap"),nc(oc,ac,cc,"⋓","\\doublecup"),nc(oc,ac,cc,"⊠","\\boxtimes",!0),nc(oc,ac,fc,"⇢","\\dashrightarrow",!0),nc(oc,ac,fc,"⇠","\\dashleftarrow",!0),nc(oc,ac,fc,"⇇","\\leftleftarrows",!0),nc(oc,ac,fc,"⇆","\\leftrightarrows",!0),nc(oc,ac,fc,"⇚","\\Lleftarrow",!0),nc(oc,ac,fc,"↞","\\twoheadleftarrow",!0),nc(oc,ac,fc,"↢","\\leftarrowtail",!0),nc(oc,ac,fc,"↫","\\looparrowleft",!0),nc(oc,ac,fc,"⇋","\\leftrightharpoons",!0),nc(oc,ac,fc,"↶","\\curvearrowleft",!0),nc(oc,ac,fc,"↺","\\circlearrowleft",!0),nc(oc,ac,fc,"↰","\\Lsh",!0),nc(oc,ac,fc,"⇈","\\upuparrows",!0),nc(oc,ac,fc,"↿","\\upharpoonleft",!0),nc(oc,ac,fc,"⇃","\\downharpoonleft",!0),nc(oc,rc,fc,"⊶","\\origof",!0),nc(oc,rc,fc,"⊷","\\imageof",!0),nc(oc,ac,fc,"⊸","\\multimap",!0),nc(oc,ac,fc,"↭","\\leftrightsquigarrow",!0),nc(oc,ac,fc,"⇉","\\rightrightarrows",!0),nc(oc,ac,fc,"⇄","\\rightleftarrows",!0),nc(oc,ac,fc,"↠","\\twoheadrightarrow",!0),nc(oc,ac,fc,"↣","\\rightarrowtail",!0),nc(oc,ac,fc,"↬","\\looparrowright",!0),nc(oc,ac,fc,"↷","\\curvearrowright",!0),nc(oc,ac,fc,"↻","\\circlearrowright",!0),nc(oc,ac,fc,"↱","\\Rsh",!0),nc(oc,ac,fc,"⇊","\\downdownarrows",!0),nc(oc,ac,fc,"↾","\\upharpoonright",!0),nc(oc,ac,fc,"⇂","\\downharpoonright",!0),nc(oc,ac,fc,"⇝","\\rightsquigarrow",!0),nc(oc,ac,fc,"⇝","\\leadsto"),nc(oc,ac,fc,"⇛","\\Rrightarrow",!0),nc(oc,ac,fc,"↾","\\restriction"),nc(oc,rc,vc,"","`"),nc(oc,rc,vc,"$","\\$"),nc(sc,rc,vc,"$","\\$"),nc(sc,rc,vc,"$","\\textdollar"),nc(oc,rc,vc,"%","\\%"),nc(sc,rc,vc,"%","\\%"),nc(oc,rc,vc,"_","\\_"),nc(sc,rc,vc,"_","\\_"),nc(sc,rc,vc,"_","\\textunderscore"),nc(oc,rc,vc,"∠","\\angle",!0),nc(oc,rc,vc,"∞","\\infty",!0),nc(oc,rc,vc,"","\\prime"),nc(oc,rc,vc,"△","\\triangle"),nc(oc,rc,vc,"Γ","\\Gamma",!0),nc(oc,rc,vc,"Δ","\\Delta",!0),nc(oc,rc,vc,"Θ","\\Theta",!0),nc(oc,rc,vc,"Λ","\\Lambda",!0),nc(oc,rc,vc,"Ξ","\\Xi",!0),nc(oc,rc,vc,"Π","\\Pi",!0),nc(oc,rc,vc,"Σ","\\Sigma",!0),nc(oc,rc,vc,"Υ","\\Upsilon",!0),nc(oc,rc,vc,"Φ","\\Phi",!0),nc(oc,rc,vc,"Ψ","\\Psi",!0),nc(oc,rc,vc,"Ω","\\Omega",!0),nc(oc,rc,vc,"A","Α"),nc(oc,rc,vc,"B","Β"),nc(oc,rc,vc,"E","Ε"),nc(oc,rc,vc,"Z","Ζ"),nc(oc,rc,vc,"H","Η"),nc(oc,rc,vc,"I","Ι"),nc(oc,rc,vc,"K","Κ"),nc(oc,rc,vc,"M","Μ"),nc(oc,rc,vc,"N","Ν"),nc(oc,rc,vc,"O","Ο"),nc(oc,rc,vc,"P","Ρ"),nc(oc,rc,vc,"T","Τ"),nc(oc,rc,vc,"X","Χ"),nc(oc,rc,vc,"¬","\\neg",!0),nc(oc,rc,vc,"¬","\\lnot"),nc(oc,rc,vc,"","\\top"),nc(oc,rc,vc,"⊥","\\bot"),nc(oc,rc,vc,"∅","\\emptyset"),nc(oc,ac,vc,"∅","\\varnothing"),nc(oc,rc,uc,"α","\\alpha",!0),nc(oc,rc,uc,"β","\\beta",!0),nc(oc,rc,uc,"γ","\\gamma",!0),nc(oc,rc,uc,"δ","\\delta",!0),nc(oc,rc,uc,"ϵ","\\epsilon",!0),nc(oc,rc,uc,"ζ","\\zeta",!0),nc(oc,rc,uc,"η","\\eta",!0),nc(oc,rc,uc,"θ","\\theta",!0),nc(oc,rc,uc,"ι","\\iota",!0),nc(oc,rc,uc,"κ","\\kappa",!0),nc(oc,rc,uc,"λ","\\lambda",!0),nc(oc,rc,uc,"μ","\\mu",!0),nc(oc,rc,uc,"ν","\\nu",!0),nc(oc,rc,uc,"ξ","\\xi",!0),nc(oc,rc,uc,"ο","\\omicron",!0),nc(oc,rc,uc,"π","\\pi",!0),nc(oc,rc,uc,"ρ","\\rho",!0),nc(oc,rc,uc,"σ","\\sigma",!0),nc(oc,rc,uc,"τ","\\tau",!0),nc(oc,rc,uc,"υ","\\upsilon",!0),nc(oc,rc,uc,"ϕ","\\phi",!0),nc(oc,rc,uc,"χ","\\chi",!0),nc(oc,rc,uc,"ψ","\\psi",!0),nc(oc,rc,uc,"ω","\\omega",!0),nc(oc,rc,uc,"ε","\\varepsilon",!0),nc(oc,rc,uc,"ϑ","\\vartheta",!0),nc(oc,rc,uc,"ϖ","\\varpi",!0),nc(oc,rc,uc,"ϱ","\\varrho",!0),nc(oc,rc,uc,"ς","\\varsigma",!0),nc(oc,rc,uc,"φ","\\varphi",!0),nc(oc,rc,cc,"","*",!0),nc(oc,rc,cc,"+","+"),nc(oc,rc,cc,"","-",!0),nc(oc,rc,cc,"⋅","\\cdot",!0),nc(oc,rc,cc,"∘","\\circ",!0),nc(oc,rc,cc,"÷","\\div",!0),nc(oc,rc,cc,"±","\\pm",!0),nc(oc,rc,cc,"×","\\times",!0),nc(oc,rc,cc,"∩","\\cap",!0),nc(oc,rc,cc,"","\\cup",!0),nc(oc,rc,cc,"","\\setminus",!0),nc(oc,rc,cc,"∧","\\land"),nc(oc,rc,cc,"","\\lor"),nc(oc,rc,cc,"∧","\\wedge",!0),nc(oc,rc,cc,"","\\vee",!0),nc(oc,rc,vc,"√","\\surd"),nc(oc,rc,pc,"⟨","\\langle",!0),nc(oc,rc,pc,"","\\lvert"),nc(oc,rc,pc,"∥","\\lVert"),nc(oc,rc,hc,"?","?"),nc(oc,rc,hc,"!","!"),nc(oc,rc,hc,"⟩","\\rangle",!0),nc(oc,rc,hc,"","\\rvert"),nc(oc,rc,hc,"∥","\\rVert"),nc(oc,rc,fc,"=","="),nc(oc,rc,fc,":",":"),nc(oc,rc,fc,"≈","\\approx",!0),nc(oc,rc,fc,"≅","\\cong",!0),nc(oc,rc,fc,"≥","\\ge"),nc(oc,rc,fc,"≥","\\geq",!0),nc(oc,rc,fc,"←","\\gets"),nc(oc,rc,fc,">","\\gt",!0),nc(oc,rc,fc,"∈","\\in",!0),nc(oc,rc,fc,"","\\@not"),nc(oc,rc,fc,"⊂","\\subset",!0),nc(oc,rc,fc,"⊃","\\supset",!0),nc(oc,rc,fc,"⊆","\\subseteq",!0),nc(oc,rc,fc,"⊇","\\supseteq",!0),nc(oc,ac,fc,"⊈","\\nsubseteq",!0),nc(oc,ac,fc,"⊉","\\nsupseteq",!0),nc(oc,rc,fc,"⊨","\\models"),nc(oc,rc,fc,"←","\\leftarrow",!0),nc(oc,rc,fc,"≤","\\le"),nc(oc,rc,fc,"≤","\\leq",!0),nc(oc,rc,fc,"<","\\lt",!0),nc(oc,rc,fc,"→","\\rightarrow",!0),nc(oc,rc,fc,"→","\\to"),nc(oc,ac,fc,"≱","\\ngeq",!0),nc(oc,ac,fc,"≰","\\nleq",!0),nc(oc,rc,_c," ","\\ "),nc(oc,rc,_c," ","\\space"),nc(oc,rc,_c," ","\\nobreakspace"),nc(sc,rc,_c," ","\\ "),nc(sc,rc,_c," "," "),nc(sc,rc,_c," ","\\space"),nc(sc,rc,_c," ","\\nobreakspace"),nc(oc,rc,_c,null,"\\nobreak"),nc(oc,rc,_c,null,"\\allowbreak"),nc(oc,rc,mc,",",","),nc(oc,rc,mc,";",";"),nc(oc,ac,cc,"⊼","\\barwedge",!0),nc(oc,ac,cc,"⊻","\\veebar",!0),nc(oc,rc,cc,"⊙","\\odot",!0),nc(oc,rc,cc,"⊕","\\oplus",!0),nc(oc,rc,cc,"⊗","\\otimes",!0),nc(oc,rc,vc,"∂","\\partial",!0),nc(oc,rc,cc,"⊘","\\oslash",!0),nc(oc,ac,cc,"⊚","\\circledcirc",!0),nc(oc,ac,cc,"⊡","\\boxdot",!0),nc(oc,rc,cc,"△","\\bigtriangleup"),nc(oc,rc,cc,"▽","\\bigtriangledown"),nc(oc,rc,cc,"†","\\dagger"),nc(oc,rc,cc,"⋄","\\diamond"),nc(oc,rc,cc,"⋆","\\star"),nc(oc,rc,cc,"◃","\\triangleleft"),nc(oc,rc,cc,"▹","\\triangleright"),nc(oc,rc,pc,"{","\\{"),nc(sc,rc,vc,"{","\\{"),nc(sc,rc,vc,"{","\\textbraceleft"),nc(oc,rc,hc,"}","\\}"),nc(sc,rc,vc,"}","\\}"),nc(sc,rc,vc,"}","\\textbraceright"),nc(oc,rc,pc,"{","\\lbrace"),nc(oc,rc,hc,"}","\\rbrace"),nc(oc,rc,pc,"[","\\lbrack",!0),nc(sc,rc,vc,"[","\\lbrack",!0),nc(oc,rc,hc,"]","\\rbrack",!0),nc(sc,rc,vc,"]","\\rbrack",!0),nc(oc,rc,pc,"(","\\lparen",!0),nc(oc,rc,hc,")","\\rparen",!0),nc(sc,rc,vc,"<","\\textless",!0),nc(sc,rc,vc,">","\\textgreater",!0),nc(oc,rc,pc,"⌊","\\lfloor",!0),nc(oc,rc,hc,"⌋","\\rfloor",!0),nc(oc,rc,pc,"⌈","\\lceil",!0),nc(oc,rc,hc,"⌉","\\rceil",!0),nc(oc,rc,vc,"\\","\\backslash"),nc(oc,rc,vc,"","|"),nc(oc,rc,vc,"","\\vert"),nc(sc,rc,vc,"|","\\textbar",!0),nc(oc,rc,vc,"∥","\\|"),nc(oc,rc,vc,"∥","\\Vert"),nc(sc,rc,vc,"∥","\\textbardbl"),nc(sc,rc,vc,"~","\\textasciitilde"),nc(sc,rc,vc,"\\","\\textbackslash"),nc(sc,rc,vc,"^","\\textasciicircum"),nc(oc,rc,fc,"↑","\\uparrow",!0),nc(oc,rc,fc,"⇑","\\Uparrow",!0),nc(oc,rc,fc,"↓","\\downarrow",!0),nc(oc,rc,fc,"⇓","\\Downarrow",!0),nc(oc,rc,fc,"↕","\\updownarrow",!0),nc(oc,rc,fc,"⇕","\\Updownarrow",!0),nc(oc,rc,gc,"∐","\\coprod"),nc(oc,rc,gc,"","\\bigvee"),nc(oc,rc,gc,"⋀","\\bigwedge"),nc(oc,rc,gc,"⨄","\\biguplus"),nc(oc,rc,gc,"⋂","\\bigcap"),nc(oc,rc,gc,"","\\bigcup"),nc(oc,rc,gc,"∫","\\int"),nc(oc,rc,gc,"∫","\\intop"),nc(oc,rc,gc,"∬","\\iint"),nc(oc,rc,gc,"∭","\\iiint"),nc(oc,rc,gc,"∏","\\prod"),nc(oc,rc,gc,"∑","\\sum"),nc(oc,rc,gc,"⨂","\\bigotimes"),nc(oc,rc,gc,"⨁","\\bigoplus"),nc(oc,rc,gc,"⨀","\\bigodot"),nc(oc,rc,gc,"∮","\\oint"),nc(oc,rc,gc,"∯","\\oiint"),nc(oc,rc,gc,"∰","\\oiiint"),nc(oc,rc,gc,"⨆","\\bigsqcup"),nc(oc,rc,gc,"∫","\\smallint"),nc(sc,rc,dc,"…","\\textellipsis"),nc(oc,rc,dc,"…","\\mathellipsis"),nc(sc,rc,dc,"…","\\ldots",!0),nc(oc,rc,dc,"…","\\ldots",!0),nc(oc,rc,dc,"⋯","\\@cdots",!0),nc(oc,rc,dc,"⋱","\\ddots",!0),nc(oc,rc,vc,"⋮","\\varvdots"),nc(oc,rc,lc,"ˊ","\\acute"),nc(oc,rc,lc,"ˋ","\\grave"),nc(oc,rc,lc,"¨","\\ddot"),nc(oc,rc,lc,"~","\\tilde"),nc(oc,rc,lc,"ˉ","\\bar"),nc(oc,rc,lc,"˘","\\breve"),nc(oc,rc,lc,"ˇ","\\check"),nc(oc,rc,lc,"^","\\hat"),nc(oc,rc,lc,"⃗","\\vec"),nc(oc,rc,lc,"˙","\\dot"),nc(oc,rc,lc,"˚","\\mathring"),nc(oc,rc,uc,"","\\@imath"),nc(oc,rc,uc,"","\\@jmath"),nc(oc,rc,vc,"ı","ı"),nc(oc,rc,vc,"ȷ","ȷ"),nc(sc,rc,vc,"ı","\\i",!0),nc(sc,rc,vc,"ȷ","\\j",!0),nc(sc,rc,vc,"ß","\\ss",!0),nc(sc,rc,vc,"æ","\\ae",!0),nc(sc,rc,vc,"œ","\\oe",!0),nc(sc,rc,vc,"ø","\\o",!0),nc(sc,rc,vc,"Æ","\\AE",!0),nc(sc,rc,vc,"Œ","\\OE",!0),nc(sc,rc,vc,"Ø","\\O",!0),nc(sc,rc,lc,"ˊ","\\'"),nc(sc,rc,lc,"ˋ","\\`"),nc(sc,rc,lc,"ˆ","\\^"),nc(sc,rc,lc,"˜","\\~"),nc(sc,rc,lc,"ˉ","\\="),nc(sc,rc,lc,"˘","\\u"),nc(sc,rc,lc,"˙","\\."),nc(sc,rc,lc,"¸","\\c"),nc(sc,rc,lc,"˚","\\r"),nc(sc,rc,lc,"ˇ","\\v"),nc(sc,rc,lc,"¨",'\\"'),nc(sc,rc,lc,"˝","\\H"),nc(sc,rc,lc,"◯","\\textcircled");var bc={"--":!0,"---":!0,"``":!0,"''":!0};nc(sc,rc,vc,"","--",!0),nc(sc,rc,vc,"","\\textendash"),nc(sc,rc,vc,"—","---",!0),nc(sc,rc,vc,"—","\\textemdash"),nc(sc,rc,vc,"","`",!0),nc(sc,rc,vc,"","\\textquoteleft"),nc(sc,rc,vc,"","'",!0),nc(sc,rc,vc,"","\\textquoteright"),nc(sc,rc,vc,"“","``",!0),nc(sc,rc,vc,"“","\\textquotedblleft"),nc(sc,rc,vc,"”","''",!0),nc(sc,rc,vc,"”","\\textquotedblright"),nc(oc,rc,vc,"°","\\degree",!0),nc(sc,rc,vc,"°","\\degree"),nc(sc,rc,vc,"°","\\textdegree",!0),nc(oc,rc,vc,"£","\\pounds"),nc(oc,rc,vc,"£","\\mathsterling",!0),nc(sc,rc,vc,"£","\\pounds"),nc(sc,rc,vc,"£","\\textsterling",!0),nc(oc,ac,vc,"✠","\\maltese"),nc(sc,ac,vc,"✠","\\maltese");for(var Cc='0123456789/@."',yc=0;yc<Cc.length;yc++){var wc=Cc.charAt(yc);nc(oc,rc,vc,wc,wc)}for(var Sc='0123456789!@*()-=+";:?/.,',kc=0;kc<Sc.length;kc++){var xc=Sc.charAt(kc);nc(sc,rc,vc,xc,xc)}for(var Lc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ec=0;Ec<Lc.length;Ec++){var Nc=Lc.charAt(Ec);nc(oc,rc,uc,Nc,Nc),nc(sc,rc,vc,Nc,Nc)}nc(oc,ac,vc,"C",""),nc(sc,ac,vc,"C",""),nc(oc,ac,vc,"H",""),nc(sc,ac,vc,"H",""),nc(oc,ac,vc,"N",""),nc(sc,ac,vc,"N",""),nc(oc,ac,vc,"P",""),nc(sc,ac,vc,"P",""),nc(oc,ac,vc,"Q",""),nc(sc,ac,vc,"Q",""),nc(oc,ac,vc,"R",""),nc(sc,ac,vc,"R",""),nc(oc,ac,vc,"Z",""),nc(sc,ac,vc,"Z",""),nc(oc,rc,uc,"h",""),nc(sc,rc,uc,"h","");for(var Dc="",Tc=0;Tc<Lc.length;Tc++){var Ic=Lc.charAt(Tc);nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56320+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56372+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56424+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56580+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56736+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56788+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56840+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56944+Tc)),nc(sc,rc,vc,Ic,Dc),Tc<26&&(nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56632+Tc)),nc(sc,rc,vc,Ic,Dc),nc(oc,rc,uc,Ic,Dc=String.fromCharCode(55349,56476+Tc)),nc(sc,rc,vc,Ic,Dc))}nc(oc,rc,uc,"k",Dc=String.fromCharCode(55349,56668)),nc(sc,rc,vc,"k",Dc);for(var Ac=0;Ac<10;Ac++){var Mc=Ac.toString();nc(oc,rc,uc,Mc,Dc=String.fromCharCode(55349,57294+Ac)),nc(sc,rc,vc,Mc,Dc),nc(oc,rc,uc,Mc,Dc=String.fromCharCode(55349,57314+Ac)),nc(sc,rc,vc,Mc,Dc),nc(oc,rc,uc,Mc,Dc=String.fromCharCode(55349,57324+Ac)),nc(sc,rc,vc,Mc,Dc),nc(oc,rc,uc,Mc,Dc=String.fromCharCode(55349,57334+Ac)),nc(sc,rc,vc,Mc,Dc)}for(var Rc="ÐÞþ",Oc=0;Oc<Rc.length;Oc++){var Pc=Rc.charAt(Oc);nc(oc,rc,uc,Pc,Pc),nc(sc,rc,vc,Pc,Pc)}var Fc=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Bc=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Hc=function(e,t,i){return ic[i][e]&&ic[i][e].replace&&(e=ic[i][e].replace),{value:e,metrics:Tl(e,t,i)}},Wc=function(e,t,i,n,o){var s,r=Hc(e,t,i),a=r.metrics;if(e=r.value,a){var l=a.italic;("text"===i||n&&"mathit"===n.font)&&(l=0),s=new Ql(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),s=new Ql(e,0,0,0,0,0,o);if(n){s.maxFontSize=n.sizeMultiplier,n.style.isTight()&&s.classes.push("mtight");var c=n.getColor();c&&(s.style.color=c)}return s},Vc=(e,t)=>{if(Vl(e.classes)!==Vl(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},zc=function(e){for(var t=0,i=0,n=0,o=0;o<e.children.length;o++){var s=e.children[o];s.height>t&&(t=s.height),s.depth>i&&(i=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=n},Uc=function(e,t,i,n){var o=new Kl(e,t,i,n);return zc(o),o},jc=(e,t,i,n)=>new Kl(e,t,i,n),Kc=function(e){var t=new Ll(e);return zc(t),t},qc=function(e,t,i){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$c={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Gc={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Qc={fontMap:$c,makeSymbol:Wc,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&Hc(e,"Main-Bold",t).metrics?Wc(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===ic[t][e].font?Wc(e,"Main-Regular",t,i,n):Wc(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},makeSpan:Uc,makeSvgSpan:jc,makeLineSpan:function(e,t,i){var n=Uc([e],[],t);return n.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=Wl(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,i,n){var o=new ql(e,t,i,n);return zc(o),o},makeFragment:Kc,wrapFragment:function(e,t){return e instanceof Ll?Uc([],[e],t):e},makeVList:function(e,t){for(var{children:i,depth:n}=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,s=1;s<t.length;s++){var r=-t[s].shift-o-t[s].elem.depth,a=r-(t[s-1].elem.height+t[s-1].elem.depth);o+=r,i.push({type:"kern",size:a}),i.push(t[s])}return{children:i,depth:n}}var l;if("top"===e.positionType){for(var c=e.positionData,h=0;h<e.children.length;h++){var d=e.children[h];c-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),o=0,s=0;s<i.length;s++){var r=i[s];if("elem"===r.type){var a=r.elem;o=Math.max(o,a.maxFontSize,a.height)}}o+=2;var l=Uc(["pstrut"],[]);l.style.height=Wl(o);for(var c=[],h=n,d=n,u=n,g=0;g<i.length;g++){var p=i[g];if("kern"===p.type)u+=p.size;else{var m=p.elem,f=p.wrapperClasses||[],_=p.wrapperStyle||{},v=Uc(f,[l,m],void 0,_);v.style.top=Wl(-o-u-m.depth),p.marginLeft&&(v.style.marginLeft=p.marginLeft),p.marginRight&&(v.style.marginRight=p.marginRight),c.push(v),u+=m.height+m.depth}h=Math.min(h,u),d=Math.max(d,u)}var b,C=Uc(["vlist"],c);if(C.style.height=Wl(d),h<0){var y=Uc([],[]),w=Uc(["vlist"],[y]);w.style.height=Wl(-h);var S=Uc(["vlist-s"],[new Ql("")]);b=[Uc(["vlist-r"],[C,S]),Uc(["vlist-r"],[w])]}else b=[Uc(["vlist-r"],[C])];var k=Uc(["vlist-t"],b);return 2===b.length&&k.classes.push("vlist-t2"),k.height=d,k.depth=-h,k},makeOrd:function(e,t,i){var n=e.mode,o=e.text,s=["mord"],r="math"===n||"text"===n&&t.font,a=r?t.font:t.fontFamily;if(55349===o.charCodeAt(0)){var[l,c]=function(e,t){var i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,n="math"===t?0:1;if(119808<=i&&i<120484){var o=Math.floor((i-119808)/26);return[Fc[o][2],Fc[o][n]]}if(120782<=i&&i<=120831){var s=Math.floor((i-120782)/10);return[Bc[s][2],Bc[s][n]]}if(120485===i||120486===i)return[Fc[0][2],Fc[0][n]];if(120486<i&&i<120782)return["",""];throw new Xa("Unsupported character: "+e)}(o,n);return Wc(o,l,n,t,s.concat(c))}if(a){var h,d;if("boldsymbol"===a){var u=function(e,t,i,n,o){return"textord"!==o&&Hc(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,n,0,0,i);h=u.fontName,d=[u.fontClass]}else r?(h=$c[a].fontName,d=[a]):(h=qc(a,t.fontWeight,t.fontShape),d=[a,t.fontWeight,t.fontShape]);if(Hc(o,h,n).metrics)return Wc(o,h,n,t,s.concat(d));if(bc.hasOwnProperty(o)&&"Typewriter"===h.substr(0,10)){for(var g=[],p=0;p<o.length;p++)g.push(Wc(o[p],h,n,t,s.concat(d)));return Kc(g)}}if("mathord"===i)return Wc(o,"Math-Italic",n,t,s.concat(["mathnormal"]));if("textord"===i){var m=ic[n][o]&&ic[n][o].font;if("ams"===m){var f=qc("amsrm",t.fontWeight,t.fontShape);return Wc(o,f,n,t,s.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==m&&m){var _=qc(m,t.fontWeight,t.fontShape);return Wc(o,_,n,t,s.concat(_,t.fontWeight,t.fontShape))}var v=qc("textrm",t.fontWeight,t.fontShape);return Wc(o,v,n,t,s.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+i+" in makeOrd")},makeGlue:(e,t)=>{var i=Uc(["mspace"],[],t),n=Hl(e,t);return i.style.marginRight=Wl(n),i},staticSvg:function(e,t){var[i,n,o]=Gc[e],s=new Zl(i),r=new Yl([s],{width:Wl(n),height:Wl(o),style:"width:"+Wl(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=jc(["overlay"],[r],t);return a.height=o,a.style.height=Wl(o),a.style.width=Wl(n),a},svgData:Gc,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];i instanceof Ql&&n instanceof Ql&&Vc(i,n)&&(i.text+=n.text,i.height=Math.max(i.height,n.height),i.depth=Math.max(i.depth,n.depth),i.italic=n.italic,e.splice(t+1,1),t--)}return e}},Yc={number:3,unit:"mu"},Zc={number:4,unit:"mu"},Xc={number:5,unit:"mu"},Jc={mord:{mop:Yc,mbin:Zc,mrel:Xc,minner:Yc},mop:{mord:Yc,mop:Yc,mrel:Xc,minner:Yc},mbin:{mord:Zc,mop:Zc,mopen:Zc,minner:Zc},mrel:{mord:Xc,mop:Xc,mopen:Xc,minner:Xc},mopen:{},mclose:{mop:Yc,mbin:Zc,mrel:Xc,minner:Yc},mpunct:{mord:Yc,mop:Yc,mrel:Xc,mopen:Yc,mclose:Yc,mpunct:Yc,minner:Yc},minner:{mord:Yc,mop:Yc,mbin:Zc,mrel:Xc,mopen:Yc,mpunct:Yc,minner:Yc}},eh={mord:{mop:Yc},mop:{mord:Yc,mop:Yc},mbin:{},mrel:{},mopen:{},mclose:{mop:Yc},mpunct:{},minner:{mop:Yc}},th={},ih={},nh={};function oh(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:s,mathmlBuilder:r}=e,a={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o},l=0;l<i.length;++l)th[i[l]]=a;t&&(s&&(ih[t]=s),r&&(nh[t]=r))}function sh(e){var{type:t,htmlBuilder:i,mathmlBuilder:n}=e;oh({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:i,mathmlBuilder:n})}var rh=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ah=function(e){return"ordgroup"===e.type?e.body:[e]},lh=Qc.makeSpan,ch=["leftmost","mbin","mopen","mrel","mop","mpunct"],hh=["rightmost","mrel","mclose","mpunct"],dh={display:yl.DISPLAY,text:yl.TEXT,script:yl.SCRIPT,scriptscript:yl.SCRIPTSCRIPT},uh={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gh=function(e,t,i,n){void 0===n&&(n=[null,null]);for(var o=[],s=0;s<e.length;s++){var r=bh(e[s],t);if(r instanceof Ll){var a=r.children;o.push(...a)}else o.push(r)}if(Qc.tryCombineChars(o),!i)return o;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(dh[c.style]))}var h=lh([n[0]||"leftmost"],[],t),d=lh([n[1]||"rightmost"],[],t),u="root"===i;return ph(o,((e,t)=>{var i=t.classes[0],n=e.classes[0];"mbin"===i&&nl(hh,n)?t.classes[0]="mord":"mbin"===n&&nl(ch,i)&&(e.classes[0]="mord")}),{node:h},d,u),ph(o,((e,t)=>{var i=_h(t),n=_h(e),o=i&&n?e.hasClass("mtight")?eh[i][n]:Jc[i][n]:null;if(o)return Qc.makeGlue(o,l)}),{node:h},d,u),o},ph=function e(t,i,n,o,s){o&&t.push(o);for(var r=0;r<t.length;r++){var a=t[r],l=mh(a);if(l)e(l.children,i,n,null,s);else{var c=!a.hasClass("mspace");if(c){var h=i(a,n.node);h&&(n.insertAfter?n.insertAfter(h):(t.unshift(h),r++))}c?n.node=a:s&&a.hasClass("newline")&&(n.node=lh(["leftmost"])),n.insertAfter=(e=>i=>{t.splice(e+1,0,i),r++})(r)}}o&&t.pop()},mh=function(e){return e instanceof Ll||e instanceof ql||e instanceof Kl&&e.hasClass("enclosing")?e:null},fh=function e(t,i){var n=mh(t);if(n){var o=n.children;if(o.length){if("right"===i)return e(o[o.length-1],"right");if("left"===i)return e(o[0],"left")}}return t},_h=function(e,t){return e?(t&&(e=fh(e,t)),uh[e.classes[0]]||null):null},vh=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return lh(t.concat(i))},bh=function(e,t,i){if(!e)return lh();if(ih[e.type]){var n=ih[e.type](e,t);if(i&&t.size!==i.size){n=lh(t.sizingClasses(i),[n],t);var o=t.sizeMultiplier/i.sizeMultiplier;n.height*=o,n.depth*=o}return n}throw new Xa("Got group of unknown type: '"+e.type+"'")};function Ch(e,t){var i=lh(["base"],e,t),n=lh(["strut"]);return n.style.height=Wl(i.height+i.depth),i.depth&&(n.style.verticalAlign=Wl(-i.depth)),i.children.unshift(n),i}function yh(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var n,o=gh(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(n=o.pop());for(var s,r=[],a=[],l=0;l<o.length;l++)if(a.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var c=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,a.push(o[l]),o[l].hasClass("nobreak")&&(c=!0);c||(r.push(Ch(a,t)),a=[])}else o[l].hasClass("newline")&&(a.pop(),a.length>0&&(r.push(Ch(a,t)),a=[]),r.push(o[l]));a.length>0&&r.push(Ch(a,t)),i?((s=Ch(gh(i,t,!0))).classes=["tag"],r.push(s)):n&&r.push(n);var h=lh(["katex-html"],r);if(h.setAttribute("aria-hidden","true"),s){var d=s.children[0];d.style.height=Wl(h.height+h.depth),h.depth&&(d.style.verticalAlign=Wl(-h.depth))}return h}function wh(e){return new Ll(e)}class Sh{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Vl(this.classes));for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=sl(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+sl(Vl(this.classes))+'"'),e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+"</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class kh{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return sl(this.toText())}toText(){return this.text}}var xh={MathNode:Sh,TextNode:kh,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"":e>=.1666&&e<=.1667?"":e>=.2222&&e<=.2223?"":e>=.2777&&e<=.2778?"":e>=-.05556&&e<=-.05555?"":e>=-.1667&&e<=-.1666?"":e>=-.2223&&e<=-.2222?"":e>=-.2778&&e<=-.2777?"":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Wl(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Wl(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:wh},Lh=function(e,t,i){return!ic[t][e]||!ic[t][e].replace||55349===e.charCodeAt(0)||bc.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.substr(4,2)||i.font&&"tt"===i.font.substr(4,2))||(e=ic[t][e].replace),new xh.TextNode(e)},Eh=function(e){return 1===e.length?e[0]:new xh.MathNode("mrow",e)},Nh=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var n=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var o=e.text;return nl(["\\imath","\\jmath"],o)?null:(ic[n][o]&&ic[n][o].replace&&(o=ic[n][o].replace),Tl(o,Qc.fontMap[i].fontName,n)?Qc.fontMap[i].variant:null)},Dh=function(e,t,i){if(1===e.length){var n=Ih(e[0],t);return i&&n instanceof Sh&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o,s=[],r=0;r<e.length;r++){var a=Ih(e[r],t);if(a instanceof Sh&&o instanceof Sh){if("mtext"===a.type&&"mtext"===o.type&&a.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...a.children);continue}if("mn"===a.type&&"mn"===o.type){o.children.push(...a.children);continue}if("mi"===a.type&&1===a.children.length&&"mn"===o.type){var l=a.children[0];if(l instanceof kh&&"."===l.text){o.children.push(...a.children);continue}}else if("mi"===o.type&&1===o.children.length){var c=o.children[0];if(c instanceof kh&&"̸"===c.text&&("mo"===a.type||"mi"===a.type||"mn"===a.type)){var h=a.children[0];h instanceof kh&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),s.pop())}}}s.push(a),o=a}return s},Th=function(e,t,i){return Eh(Dh(e,t,i))},Ih=function(e,t){if(!e)return new xh.MathNode("mrow");if(nh[e.type])return nh[e.type](e,t);throw new Xa("Got group of unknown type: '"+e.type+"'")};function Ah(e,t,i,n,o){var s,r=Dh(e,i);s=1===r.length&&r[0]instanceof Sh&&nl(["mrow","mtable"],r[0].type)?r[0]:new xh.MathNode("mrow",r);var a=new xh.MathNode("annotation",[new xh.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new xh.MathNode("semantics",[s,a]),c=new xh.MathNode("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block"),Qc.makeSpan([o?"katex":"katex-mathml"],[c])}var Mh=function(e){return new Ol({style:e.displayMode?yl.DISPLAY:yl.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Rh=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=Qc.makeSpan(i,[e])}return e},Oh={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Ph={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Fh=function(e){var t=new xh.MathNode("mo",[new xh.TextNode(Oh[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Bh=function(e,t){var{span:i,minWidth:n,height:o}=function(){var i=4e5,n=e.label.substr(1);if(nl(["widehat","widecheck","widetilde","utilde"],n)){var o,s,r,a="ordgroup"===(g=e.base).type?g.body.length:1;if(a>5)"widehat"===n||"widecheck"===n?(o=420,i=2364,r=.42,s=n+"4"):(o=312,i=2340,r=.34,s="tilde4");else{var l=[1,1,2,2,3,3][a];"widehat"===n||"widecheck"===n?(i=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],r=[0,.24,.3,.3,.36,.42][l],s=n+l):(i=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],r=[0,.26,.286,.3,.306,.34][l],s="tilde"+l)}var c=new Zl(s),h=new Yl([c],{width:"100%",height:Wl(r),viewBox:"0 0 "+i+" "+o,preserveAspectRatio:"none"});return{span:Qc.makeSvgSpan([],[h],t),minWidth:0,height:r}}var d,u,g,p=[],m=Ph[n],[f,_,v]=m,b=v/1e3,C=f.length;if(1===C)d=["hide-tail"],u=[m[3]];else if(2===C)d=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==C)throw new Error("Correct katexImagesData or update code here to support\n "+C+" children.");d=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var y=0;y<C;y++){var w=new Zl(f[y]),S=new Yl([w],{width:"400em",height:Wl(b),viewBox:"0 0 "+i+" "+v,preserveAspectRatio:u[y]+" slice"}),k=Qc.makeSvgSpan([d[y]],[S],t);if(1===C)return{span:k,minWidth:_,height:b};k.style.height=Wl(b),p.push(k)}return{span:Qc.makeSpan(["stretchy"],p,t),minWidth:_,height:b}}();return i.height=o,i.style.height=Wl(o),n>0&&(i.style.minWidth=Wl(n)),i};function Hh(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Wh(e){var t=Vh(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Vh(e){return e&&("atom"===e.type||tc.hasOwnProperty(e.type))?e:null}var zh=(e,t)=>{var i,n,o;e&&"supsub"===e.type?(i=(n=Hh(e.base,"accent")).base,e.base=i,o=function(e){if(e instanceof Kl)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(bh(e,t)),e.base=n):i=(n=Hh(e,"accent")).base;var s=bh(i,t.havingCrampedStyle()),r=0;if(n.isShifty&&ll(i)){var a=al(i);r=Jl(bh(a,t.havingCrampedStyle())).skew}var l,c="\\c"===n.label,h=c?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(n.isStretchy)l=Bh(n,t),l=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:r>0?{width:"calc(100% - "+Wl(2*r)+")",marginLeft:Wl(2*r)}:void 0}]},t);else{var d,u;"\\vec"===n.label?(d=Qc.staticSvg("vec",t),u=Qc.svgData.vec[1]):((d=Jl(d=Qc.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,u=d.width,c&&(h+=d.depth)),l=Qc.makeSpan(["accent-body"],[d]);var g="\\textcircled"===n.label;g&&(l.classes.push("accent-full"),h=s.height);var p=r;g||(p-=u/2),l.style.left=Wl(p),"\\textcircled"===n.label&&(l.style.top=".2em"),l=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-h},{type:"elem",elem:l}]},t)}var m=Qc.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Uh=(e,t)=>{var i=e.isStretchy?Fh(e.label):new xh.MathNode("mo",[Lh(e.label,e.mode)]),n=new xh.MathNode("mover",[Ih(e.base,t),i]);return n.setAttribute("accent","true"),n},jh=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));oh({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=rh(t[0]),n=!jh.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:i}},htmlBuilder:zh,mathmlBuilder:Uh}),oh({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:zh,mathmlBuilder:Uh}),oh({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"accentUnder",mode:i.mode,label:n,base:o}},htmlBuilder:(e,t)=>{var i=bh(e.base,t),n=Bh(e,t),o="\\utilde"===e.label?.12:0,s=Qc.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:i}]},t);return Qc.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var i=Fh(e.label),n=new xh.MathNode("munder",[Ih(e.base,t),i]);return n.setAttribute("accentunder","true"),n}});var Kh=e=>{var t=new xh.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};oh({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,n=t.style,o=t.havingStyle(n.sup()),s=Qc.wrapFragment(bh(e.body,o,t),t),r="\\x"===e.label.slice(0,2)?"x":"cd";s.classes.push(r+"-arrow-pad"),e.below&&(o=t.havingStyle(n.sub()),(i=Qc.wrapFragment(bh(e.below,o,t),t)).classes.push(r+"-arrow-pad"));var a,l=Bh(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,h=-t.fontMetrics().axisHeight-.5*l.height-.111;if((s.depth>.25||"\\xleftequilibrium"===e.label)&&(h-=s.depth),i){var d=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;a=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:l,shift:c},{type:"elem",elem:i,shift:d}]},t)}else a=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:l,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),Qc.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var i,n=Fh(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=Kh(Ih(e.body,t));if(e.below){var s=Kh(Ih(e.below,t));i=new xh.MathNode("munderover",[n,s,o])}else i=new xh.MathNode("mover",[n,o])}else if(e.below){var r=Kh(Ih(e.below,t));i=new xh.MathNode("munder",[n,r])}else i=Kh(),i=new xh.MathNode("mover",[n,i]);return i}});var qh={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},$h=e=>"textord"===e.type&&"@"===e.text;function Gh(e,t,i){var n=qh[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:n,mode:"math",family:"rel"},s={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[o],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[s],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}oh({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"cdlabel",mode:i.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),n=Qc.wrapFragment(bh(e.label,i,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Wl(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var i=new xh.MathNode("mrow",[Ih(e.label,t)]);return(i=new xh.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new xh.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),oh({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:i}=e;return{type:"cdlabelparent",mode:i.mode,fragment:t[0]}},htmlBuilder(e,t){var i=Qc.wrapFragment(bh(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:(e,t)=>new xh.MathNode("mrow",[Ih(e.fragment,t)])}),oh({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:i}=e,n=Hh(t[0],"ordgroup").body,o="",s=0;s<n.length;s++)o+=Hh(n[s],"textord").text;var r,a=parseInt(o);if(isNaN(a))throw new Xa("\\@char has non-numeric argument "+o);if(a<0||a>=1114111)throw new Xa("\\@char with invalid code point "+o);return a<=65535?r=String.fromCharCode(a):(a-=65536,r=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:i.mode,text:r}}});var Qh=(e,t)=>{var i=gh(e.body,t.withColor(e.color),!1);return Qc.makeFragment(i)},Yh=(e,t)=>{var i=Dh(e.body,t.withColor(e.color)),n=new xh.MathNode("mstyle",i);return n.setAttribute("mathcolor",e.color),n};oh({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,n=Hh(t[0],"color-token").color,o=t[1];return{type:"color",mode:i.mode,color:n,body:ah(o)}},htmlBuilder:Qh,mathmlBuilder:Yh}),oh({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:n}=e,o=Hh(t[0],"color-token").color;i.gullet.macros.set("\\current@color",o);var s=i.parseExpression(!0,n);return{type:"color",mode:i.mode,color:o,body:s}},htmlBuilder:Qh,mathmlBuilder:Yh}),oh({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler(e,t,i){var{parser:n}=e,o=i[0],s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:o&&Hh(o,"size").value}},htmlBuilder(e,t){var i=Qc.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=Wl(Hl(e.size,t)))),i},mathmlBuilder(e,t){var i=new xh.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",Wl(Hl(e.size,t)))),i}});var Zh={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xh=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Xa("Expected a control sequence",e);return t},Jh=(e,t,i,n)=>{var o=e.gullet.macros.get(i.text);null==o&&(i.noexpand=!0,o={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,o,n)};oh({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var n=t.fetch();if(Zh[n.text])return"\\global"!==i&&"\\\\globallong"!==i||(n.text=Zh[n.text]),Hh(t.parseFunction(),"internal");throw new Xa("Invalid token after macro prefix",n)}}),oh({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=t.gullet.popToken(),o=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Xa("Expected a control sequence",n);for(var s,r=0,a=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){s=t.gullet.future(),a[r].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Xa('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==r+1)throw new Xa('Argument number "'+n.text+'" out of order');r++,a.push([])}else{if("EOF"===n.text)throw new Xa("Expected a macro definition");a[r].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:r,delimiters:a},i===Zh[i]),{type:"internal",mode:t.mode}}}),oh({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=Xh(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Jh(t,n,o,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),oh({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=Xh(t.gullet.popToken()),o=t.gullet.popToken(),s=t.gullet.popToken();return Jh(t,n,s,"\\\\globalfuture"===i),t.gullet.pushToken(s),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var ed=function(e,t,i){var n=Tl(ic.math[e]&&ic.math[e].replace||e,t,i);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},td=function(e,t,i,n){var o=i.havingBaseStyle(t),s=Qc.makeSpan(n.concat(o.sizingClasses(i)),[e],i),r=o.sizeMultiplier/i.sizeMultiplier;return s.height*=r,s.depth*=r,s.maxFontSize=o.sizeMultiplier,s},id=function(e,t,i){var n=t.havingBaseStyle(i),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Wl(o),e.height-=o,e.depth+=o},nd=function(e,t,i,n,o,s){var r=function(e,t,i,n){return Qc.makeSymbol(e,"Size"+t+"-Regular",i,n)}(e,t,o,n),a=td(Qc.makeSpan(["delimsizing","size"+t],[r],n),yl.TEXT,n,s);return i&&id(a,n,yl.TEXT),a},od=function(e,t,i){return{type:"elem",elem:Qc.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Qc.makeSpan([],[Qc.makeSymbol(e,t,i)])])}},sd=function(e,t,i){var n=El["Size4-Regular"][e.charCodeAt(0)]?El["Size4-Regular"][e.charCodeAt(0)][4]:El["Size1-Regular"][e.charCodeAt(0)][4],o=new Zl("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),s=new Yl([o],{width:Wl(n),height:Wl(t),style:"width:"+Wl(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),r=Qc.makeSvgSpan([],[s],i);return r.height=t,r.style.height=Wl(t),r.style.width=Wl(n),{type:"elem",elem:r}},rd={type:"kern",size:-.008},ad=["|","\\lvert","\\rvert","\\vert"],ld=["\\|","\\lVert","\\rVert","\\Vert"],cd=function(e,t,i,n,o,s){var r,a,l,c;r=l=c=e,a=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?r=l="⏐":"\\Downarrow"===e?r=l="‖":"\\updownarrow"===e?(r="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(r="\\Uparrow",l="‖",c="\\Downarrow"):nl(ad,e)?l="":nl(ld,e)?l="∥":"["===e||"\\lbrack"===e?(r="⎡",l="⎢",c="⎣",h="Size4-Regular"):"]"===e||"\\rbrack"===e?(r="⎤",l="⎥",c="⎦",h="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(l=r="⎢",c="⎣",h="Size4-Regular"):"\\lceil"===e||"⌈"===e?(r="⎡",l=c="⎢",h="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(l=r="⎥",c="⎦",h="Size4-Regular"):"\\rceil"===e||"⌉"===e?(r="⎤",l=c="⎥",h="Size4-Regular"):"("===e||"\\lparen"===e?(r="⎛",l="⎜",c="⎝",h="Size4-Regular"):")"===e||"\\rparen"===e?(r="⎞",l="⎟",c="⎠",h="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(r="⎧",a="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(r="⎫",a="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(r="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(r="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(r="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(r="⎫",c="⎩",l="⎪",h="Size4-Regular");var d=ed(r,h,o),u=d.height+d.depth,g=ed(l,h,o),p=g.height+g.depth,m=ed(c,h,o),f=m.height+m.depth,_=0,v=1;if(null!==a){var b=ed(a,h,o);_=b.height+b.depth,v=2}var C=u+f+_,y=C+Math.max(0,Math.ceil((t-C)/(v*p)))*v*p,w=n.fontMetrics().axisHeight;i&&(w*=n.sizeMultiplier);var S=y/2-w,k=[];if(k.push(od(c,h,o)),k.push(rd),null===a){var x=y-u-f+.016;k.push(sd(l,x,n))}else{var L=(y-u-f-_)/2+.016;k.push(sd(l,L,n)),k.push(rd),k.push(od(a,h,o)),k.push(rd),k.push(sd(l,L,n))}k.push(rd),k.push(od(r,h,o));var E=n.havingBaseStyle(yl.TEXT),N=Qc.makeVList({positionType:"bottom",positionData:S,children:k},E);return td(Qc.makeSpan(["delimsizing","mult"],[N],E),yl.TEXT,n,s)},hd=.08,dd=function(e,t,i,n,o){var s=function(e,t,i){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":n=function(e,t,i){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(i-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,i)}return n}(e,n,i),r=new Zl(e,s),a=new Yl([r],{width:"400em",height:Wl(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return Qc.makeSvgSpan(["hide-tail"],[a],o)},ud=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],gd=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],pd=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],md=[0,1.2,1.8,2.4,3],fd=[{type:"small",style:yl.SCRIPTSCRIPT},{type:"small",style:yl.SCRIPT},{type:"small",style:yl.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],_d=[{type:"small",style:yl.SCRIPTSCRIPT},{type:"small",style:yl.SCRIPT},{type:"small",style:yl.TEXT},{type:"stack"}],vd=[{type:"small",style:yl.SCRIPTSCRIPT},{type:"small",style:yl.SCRIPT},{type:"small",style:yl.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],bd=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Cd=function(e,t,i,n){for(var o=Math.min(2,3-n.style.size);o<i.length&&"stack"!==i[o].type;o++){var s=ed(e,bd(i[o]),"math"),r=s.height+s.depth;if("small"===i[o].type&&(r*=n.havingBaseStyle(i[o].style).sizeMultiplier),r>t)return i[o]}return i[i.length-1]},yd=function(e,t,i,n,o,s){var r;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),r=nl(pd,e)?fd:nl(ud,e)?vd:_d;var a=Cd(e,t,r,n);return"small"===a.type?function(e,t,i,n,o,s){var r=Qc.makeSymbol(e,"Main-Regular",o,n),a=td(r,t,n,s);return i&&id(a,n,t),a}(e,a.style,i,n,o,s):"large"===a.type?nd(e,a.size,i,n,o,s):cd(e,t,i,n,o,s)},wd={sqrtImage:function(e,t){var i,n,o=t.havingBaseSizing(),s=Cd("\\surd",e*o.sizeMultiplier,vd,o),r=o.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,h=0;return"small"===s.type?(e<1?r=1:e<1.4&&(r=.7),c=(1+a)/r,(i=dd("sqrtMain",l=(1+a+hd)/r,h=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",n=.833/r):"large"===s.type?(h=1080*md[s.size],c=(md[s.size]+a)/r,l=(md[s.size]+a+hd)/r,(i=dd("sqrtSize"+s.size,l,h,a,t)).style.minWidth="1.02em",n=1/r):(l=e+a+hd,c=e+a,h=Math.floor(1e3*e+a)+80,(i=dd("sqrtTall",l,h,a,t)).style.minWidth="0.742em",n=1.056),i.height=c,i.style.height=Wl(l),{span:i,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*r}},sizedDelim:function(e,t,i,n,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),nl(ud,e)||nl(pd,e))return nd(e,t,!1,i,n,o);if(nl(gd,e))return cd(e,md[t],!1,i,n,o);throw new Xa("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:md,customSizedDelim:yd,leftRightDelim:function(e,t,i,n,o,s){var r=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-r,i+r),c=Math.max(l/500*901,2*l-a);return yd(e,c,!0,n,o,s)}},Sd={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},kd=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function xd(e,t){var i=Vh(e);if(i&&nl(kd,i.text))return i;throw new Xa(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ld(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}oh({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=xd(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Sd[e.funcName].size,mclass:Sd[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?Qc.makeSpan([e.mclass]):wd.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Lh(e.delim,e.mode));var i=new xh.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var n=Wl(wd.sizeToMaxHeight[e.size]);return i.setAttribute("minsize",n),i.setAttribute("maxsize",n),i}}),oh({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new Xa("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:xd(t[0],e).text,color:i}}}),oh({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=xd(t[0],e),n=e.parser;++n.leftrightDepth;var o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Hh(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:i.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{Ld(e);for(var i,n,o=gh(e.body,t,!0,["mopen","mclose"]),s=0,r=0,a=!1,l=0;l<o.length;l++)o[l].isMiddle?a=!0:(s=Math.max(o[l].height,s),r=Math.max(o[l].depth,r));if(s*=t.sizeMultiplier,r*=t.sizeMultiplier,i="."===e.left?vh(t,["mopen"]):wd.leftRightDelim(e.left,s,r,t,e.mode,["mopen"]),o.unshift(i),a)for(var c=1;c<o.length;c++){var h=o[c].isMiddle;h&&(o[c]=wd.leftRightDelim(h.delim,s,r,h.options,e.mode,[]))}if("."===e.right)n=vh(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;n=wd.leftRightDelim(e.right,s,r,d,e.mode,["mclose"])}return o.push(n),Qc.makeSpan(["minner"],o,t)},mathmlBuilder:(e,t)=>{Ld(e);var i=Dh(e.body,t);if("."!==e.left){var n=new xh.MathNode("mo",[Lh(e.left,e.mode)]);n.setAttribute("fence","true"),i.unshift(n)}if("."!==e.right){var o=new xh.MathNode("mo",[Lh(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),i.push(o)}return Eh(i)}}),oh({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=xd(t[0],e);if(!e.parser.leftrightDepth)throw new Xa("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;if("."===e.delim)i=vh(t,[]);else{i=wd.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};i.isMiddle=n}return i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?Lh("|","text"):Lh(e.delim,e.mode),n=new xh.MathNode("mo",[i]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Ed=(e,t)=>{var i,n,o=Qc.wrapFragment(bh(e.body,t),t),s=e.label.substr(1),r=t.sizeMultiplier,a=0,l=ll(e.body);if("sout"===s)(i=Qc.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/r,a=-.5*t.fontMetrics().xHeight;else if("phase"===s){var c=Hl({number:.6,unit:"pt"},t),h=Hl({number:.35,unit:"ex"},t);r/=t.havingBaseSizing().sizeMultiplier;var d=o.height+o.depth+c+h;o.style.paddingLeft=Wl(d/2+c);var u=Math.floor(1e3*d*r),g=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(u),p=new Yl([new Zl("phase",g)],{width:"400em",height:Wl(u/1e3),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});(i=Qc.makeSvgSpan(["hide-tail"],[p],t)).style.height=Wl(d),a=o.depth+c+h}else{/cancel/.test(s)?l||o.classes.push("cancel-pad"):"angl"===s?o.classes.push("anglpad"):o.classes.push("boxpad");var m=0,f=0,_=0;/box/.test(s)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),f=m=t.fontMetrics().fboxsep+("colorbox"===s?0:_)):"angl"===s?(m=4*(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),f=Math.max(0,.25-o.depth)):f=m=l?.2:0,i=function(e,t,i,n,o){var s,r=e.height+e.depth+i+n;if(/fbox|color|angl/.test(t)){if(s=Qc.makeSpan(["stretchy",t],[],o),"fbox"===t){var a=o.color&&o.getColor();a&&(s.style.borderColor=a)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Xl({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Xl({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Yl(l,{width:"100%",height:Wl(r)});s=Qc.makeSvgSpan([],[c],o)}return s.height=r,s.style.height=Wl(r),s}(o,s,m,f,t),/fbox|boxed|fcolorbox/.test(s)?(i.style.borderStyle="solid",i.style.borderWidth=Wl(_)):"angl"===s&&.049!==_&&(i.style.borderTopWidth=Wl(_),i.style.borderRightWidth=Wl(_)),a=o.depth+f,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:o,shift:0}]},t);else{var v=/cancel|phase/.test(s)?["svg-align"]:[];n=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:v}]},t)}return/cancel/.test(s)&&(n.height=o.height,n.depth=o.depth),/cancel/.test(s)&&!l?Qc.makeSpan(["mord","cancel-lap"],[n],t):Qc.makeSpan(["mord"],[n],t)},Nd=(e,t)=>{var i=0,n=new xh.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ih(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};oh({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,i){var{parser:n,funcName:o}=e,s=Hh(t[0],"color-token").color,r=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,body:r}},htmlBuilder:Ed,mathmlBuilder:Nd}),oh({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,i){var{parser:n,funcName:o}=e,s=Hh(t[0],"color-token").color,r=Hh(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:r,borderColor:s,body:a}},htmlBuilder:Ed,mathmlBuilder:Nd}),oh({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),oh({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:Ed,mathmlBuilder:Nd}),oh({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var Dd={};function Td(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:s,mathmlBuilder:r}=e,a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l<i.length;++l)Dd[i[l]]=a;s&&(ih[t]=s),r&&(nh[t]=r)}var Id={};function Ad(e,t){Id[e]=t}function Md(e){var t=[];e.consumeSpaces();for(var i=e.fetch().text;"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}var Rd=e=>{if(!e.parser.settings.displayMode)throw new Xa("{"+e.envName+"} can be used only in display mode.")};function Od(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Pd(e,t,i){var{hskipBeforeAndAfter:n,addJot:o,cols:s,arraystretch:r,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:h,maxNumCols:d,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!r){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)r=1;else if(!(r=parseFloat(g))||r<0)throw new Xa("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var p=[],m=[p],f=[],_=[],v=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new Za("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(b(),_.push(Md(e));;){var y=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),y={type:"ordgroup",mode:e.mode,body:y},i&&(y={type:"styling",mode:e.mode,style:i,body:[y]}),p.push(y);var w=e.fetch().text;if("&"===w){if(d&&p.length===d){if(c||a)throw new Xa("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){C(),1===p.length&&"styling"===y.type&&0===y.body[0].body.length&&(m.length>1||!h)&&m.pop(),_.length<m.length+1&&_.push([]);break}if("\\\\"!==w)throw new Xa("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var S=void 0;" "!==e.gullet.future().text&&(S=e.parseSizeGroup(!0)),f.push(S?S.value:null),C(),_.push(Md(e)),p=[],m.push(p),b()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:r,body:m,cols:s,rowGaps:f,hskipBeforeAndAfter:n,hLinesBeforeRow:_,colSeparationType:a,tags:v,leqno:u}}function Fd(e){return"d"===e.substr(0,1)?"display":"text"}var Bd=function(e,t){var i,n,o=e.body.length,s=e.hLinesBeforeRow,r=0,a=new Array(o),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),h=1/t.fontMetrics().ptPerEm,d=5*h;e.colSeparationType&&"small"===e.colSeparationType&&(d=t.havingStyle(yl.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?Hl({number:3,unit:"ex"},t):12*h,g=3*h,p=e.arraystretch*u,m=.7*p,f=.3*p,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),l.push({pos:_,isDashed:e[t]})}for(v(s[0]),i=0;i<e.body.length;++i){var b=e.body[i],C=m,y=f;r<b.length&&(r=b.length);var w=new Array(b.length);for(n=0;n<b.length;++n){var S=bh(b[n],t);y<S.depth&&(y=S.depth),C<S.height&&(C=S.height),w[n]=S}var k=e.rowGaps[i],x=0;k&&(x=Hl(k,t))>0&&(y<(x+=f)&&(y=x),x=0),e.addJot&&(y+=g),w.height=C,w.depth=y,_+=C,w.pos=_,_+=y+x,a[i]=w,v(s[i+1])}var L,E,N=_/2+t.fontMetrics().axisHeight,D=e.cols||[],T=[],I=[];if(e.tags&&e.tags.some((e=>e)))for(i=0;i<o;++i){var A=a[i],M=A.pos-N,R=e.tags[i],O=void 0;(O=!0===R?Qc.makeSpan(["eqn-num"],[],t):Qc.makeSpan([],!1===R?[]:gh(R,t,!0),t)).depth=A.depth,O.height=A.height,I.push({type:"elem",elem:O,shift:M})}for(n=0,E=0;n<r||E<D.length;++n,++E){for(var P=D[E]||{},F=!0;"separator"===P.type;){if(F||((L=Qc.makeSpan(["arraycolsep"],[])).style.width=Wl(t.fontMetrics().doubleRuleSep),T.push(L)),"|"!==P.separator&&":"!==P.separator)throw new Xa("Invalid separator type: "+P.separator);var B="|"===P.separator?"solid":"dashed",H=Qc.makeSpan(["vertical-separator"],[],t);H.style.height=Wl(_),H.style.borderRightWidth=Wl(c),H.style.borderRightStyle=B,H.style.margin="0 "+Wl(-c/2);var W=_-N;W&&(H.style.verticalAlign=Wl(-W)),T.push(H),P=D[++E]||{},F=!1}if(!(n>=r)){var V=void 0;(n>0||e.hskipBeforeAndAfter)&&0!==(V=ol(P.pregap,d))&&((L=Qc.makeSpan(["arraycolsep"],[])).style.width=Wl(V),T.push(L));var z=[];for(i=0;i<o;++i){var U=a[i],j=U[n];if(j){var K=U.pos-N;j.depth=U.depth,j.height=U.height,z.push({type:"elem",elem:j,shift:K})}}z=Qc.makeVList({positionType:"individualShift",children:z},t),z=Qc.makeSpan(["col-align-"+(P.align||"c")],[z]),T.push(z),(n<r-1||e.hskipBeforeAndAfter)&&0!==(V=ol(P.postgap,d))&&((L=Qc.makeSpan(["arraycolsep"],[])).style.width=Wl(V),T.push(L))}}if(a=Qc.makeSpan(["mtable"],T),l.length>0){for(var q=Qc.makeLineSpan("hline",t,c),$=Qc.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:a,shift:0}];l.length>0;){var Q=l.pop(),Y=Q.pos-N;Q.isDashed?G.push({type:"elem",elem:$,shift:Y}):G.push({type:"elem",elem:q,shift:Y})}a=Qc.makeVList({positionType:"individualShift",children:G},t)}if(0===I.length)return Qc.makeSpan(["mord"],[a],t);var Z=Qc.makeVList({positionType:"individualShift",children:I},t);return Z=Qc.makeSpan(["tag"],[Z],t),Qc.makeFragment([a,Z])},Hd={c:"center ",l:"left ",r:"right "},Wd=function(e,t){for(var i=[],n=new xh.MathNode("mtd",[],["mtr-glue"]),o=new xh.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var r=e.body[s],a=[],l=0;l<r.length;l++)a.push(new xh.MathNode("mtd",[Ih(r[l],t)]));e.tags&&e.tags[s]&&(a.unshift(n),a.push(n),e.leqno?a.unshift(o):a.push(o)),i.push(new xh.MathNode("mtr",a))}var c=new xh.MathNode("mtable",i),h=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",Wl(h));var d="",u="";if(e.cols&&e.cols.length>0){var g=e.cols,p="",m=!1,f=0,_=g.length;"separator"===g[0].type&&(d+="top ",f=1),"separator"===g[g.length-1].type&&(d+="bottom ",_-=1);for(var v=f;v<_;v++)"align"===g[v].type?(u+=Hd[g[v].align],m&&(p+="none "),m=!0):"separator"===g[v].type&&m&&(p+="|"===g[v].separator?"solid ":"dashed ",m=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],C="",y=1;y<b.length;y++)C+=y%2?"0em ":"1em ";c.setAttribute("columnspacing",C.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var w="",S=e.hLinesBeforeRow;d+=S[0].length>0?"left ":"",d+=S[S.length-1].length>0?"right ":"";for(var k=1;k<S.length-1;k++)w+=0===S[k].length?"none ":S[k][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==d&&(c=new xh.MathNode("menclose",[c])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(c=new xh.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Vd=function(e,t){-1===e.envName.indexOf("ed")&&Rd(e);var i,n=[],o=e.envName.indexOf("at")>-1?"alignat":"align",s="split"===e.envName,r=Pd(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Od(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",h=0;h<t[0].body.length;h++)c+=Hh(t[0].body[h],"textord").text;i=Number(c),a=2*i}var d=!a;r.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var n=Hh(e[t],"styling");Hh(n.body[0],"ordgroup").body.unshift(l)}if(d)a<e.length&&(a=e.length);else{var o=e.length/2;if(i<o)throw new Xa("Too many math in a row: expected "+i+", but got "+o,e[0])}}));for(var u=0;u<a;++u){var g="r",p=0;u%2==1?g="l":u>0&&d&&(p=1),n[u]={type:"align",align:g,pregap:p,postgap:0}}return r.colSeparationType=d?"align":"alignat",r};Td({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=(Vh(t[0])?[t[0]]:Hh(t[0],"ordgroup").body).map((function(e){var t=Wh(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Xa("Unknown column alignment: "+t,e)})),n={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Pd(e.parser,n,Fd(e.envName))},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),i=o.fetch().text,-1==="lcr".indexOf(i))throw new Xa("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),n.cols=[{type:"align",align:i}]}}var s=Pd(e.parser,n,Fd(e.envName)),r=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(r).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Pd(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=(Vh(t[0])?[t[0]]:Hh(t[0],"ordgroup").body).map((function(e){var t=Wh(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Xa("Unknown column alignment: "+t,e)}));if(i.length>1)throw new Xa("{subarray} can contain only one column");var n={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=Pd(e.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new Xa("{subarray} can contain only one column");return n},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Pd(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Fd(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Vd,htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){nl(["gather","gather*"],e.envName)&&Rd(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Od(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Pd(e.parser,t,"display")},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Vd,htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Rd(e);var t={autoTag:Od(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Pd(e.parser,t,"display")},htmlBuilder:Bd,mathmlBuilder:Wd}),Td({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Rd(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new Xa("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,o,s=[],r=[s],a=0;a<t.length;a++){for(var l=t[a],c={type:"styling",body:[],mode:"math",style:"display"},h=0;h<l.length;h++)if($h(l[h])){s.push(c);var d=Wh(l[h+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new Xa('Expected one of "<>AV=|." after @',l[h]);for(var g=0;g<2;g++){for(var p=!0,m=h+1;m<l.length;m++){if(o=d,("mathord"===(n=l[m]).type||"atom"===n.type)&&n.text===o){p=!1,h=m;break}if($h(l[m]))throw new Xa("Missing a "+d+" character to complete a CD arrow.",l[m]);u[g].body.push(l[m])}if(p)throw new Xa("Missing a "+d+" character to complete a CD arrow.",l[h])}}var f={type:"styling",body:[Gh(d,u,e)],mode:"math",style:"display"};s.push(f),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(l[h]);a%2==0?s.push(c):s.shift(),s=[],r.push(s)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}(e.parser)),htmlBuilder:Bd,mathmlBuilder:Wd}),Ad("\\nonumber","\\gdef\\@eqnsw{0}"),Ad("\\notag","\\nonumber"),oh({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Xa(e.funcName+" valid only within array environment")}});var zd=Dd;oh({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];if("ordgroup"!==o.type)throw new Xa("Invalid environment name",o);for(var s="",r=0;r<o.body.length;++r)s+=Hh(o.body[r],"textord").text;if("\\begin"===n){if(!zd.hasOwnProperty(s))throw new Xa("No such environment: "+s,o);var a=zd[s],{args:l,optArgs:c}=i.parseArguments("\\begin{"+s+"}",a),h={mode:i.mode,envName:s,parser:i},d=a.handler(h,l,c);i.expect("\\end",!1);var u=i.nextToken,g=Hh(i.parseFunction(),"environment");if(g.name!==s)throw new Xa("Mismatch: \\begin{"+s+"} matched by \\end{"+g.name+"}",u);return d}return{type:"environment",mode:i.mode,name:s,nameGroup:o}}});var Ud=Qc.makeSpan;function jd(e,t){var i=gh(e.body,t,!0);return Ud([e.mclass],i,t)}function Kd(e,t){var i,n=Dh(e.body,t);return"minner"===e.mclass?i=new xh.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(i=n[0]).type="mi":i=new xh.MathNode("mi",n):(e.isCharacterBox?(i=n[0]).type="mo":i=new xh.MathNode("mo",n),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}oh({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"mclass",mode:i.mode,mclass:"m"+n.substr(5),body:ah(o),isCharacterBox:ll(o)}},htmlBuilder:jd,mathmlBuilder:Kd});var qd=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};oh({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:qd(t[0]),body:ah(t[1]),isCharacterBox:ll(t[1])}}}),oh({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:n,funcName:o}=e,s=t[1],r=t[0];i="\\stackrel"!==o?qd(s):"mrel";var a={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:ah(s)},l={type:"supsub",mode:r.mode,base:a,sup:"\\underset"===o?null:r,sub:"\\underset"===o?r:null};return{type:"mclass",mode:n.mode,mclass:i,body:[l],isCharacterBox:ll(l)}},htmlBuilder:jd,mathmlBuilder:Kd});var $d=(e,t)=>{var i=e.font,n=t.withFont(i);return bh(e.body,n)},Gd=(e,t)=>{var i=e.font,n=t.withFont(i);return Ih(e.body,n)},Qd={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};oh({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=rh(t[0]),s=n;return s in Qd&&(s=Qd[s]),{type:"font",mode:i.mode,font:s.slice(1),body:o}},htmlBuilder:$d,mathmlBuilder:Gd}),oh({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,n=t[0],o=ll(n);return{type:"mclass",mode:i.mode,mclass:qd(n),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:n}],isCharacterBox:o}}}),oh({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n,breakOnTokenText:o}=e,{mode:s}=i,r=i.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:i.mode,body:r}}},htmlBuilder:$d,mathmlBuilder:Gd});var Yd=(e,t)=>{var i=t;return"display"===e?i=i.id>=yl.SCRIPT.id?i.text():yl.DISPLAY:"text"===e&&i.size===yl.DISPLAY.size?i=yl.TEXT:"script"===e?i=yl.SCRIPT:"scriptscript"===e&&(i=yl.SCRIPTSCRIPT),i},Zd=(e,t)=>{var i,n=Yd(e.size,t.style),o=n.fracNum(),s=n.fracDen();i=t.havingStyle(o);var r=bh(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;r.height=r.height<a?a:r.height,r.depth=r.depth<l?l:r.depth}i=t.havingStyle(s);var c,h,d,u,g,p,m,f,_,v,b=bh(e.denom,i,t);if(e.hasBarLine?(e.barSize?(h=Hl(e.barSize,t),c=Qc.makeLineSpan("frac-line",t,h)):c=Qc.makeLineSpan("frac-line",t),h=c.height,d=c.height):(c=null,h=0,d=t.fontMetrics().defaultRuleThickness),n.size===yl.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,g=h>0?3*d:7*d,p=t.fontMetrics().denom1):(h>0?(u=t.fontMetrics().num2,g=d):(u=t.fontMetrics().num3,g=3*d),p=t.fontMetrics().denom2),c){var C=t.fontMetrics().axisHeight;u-r.depth-(C+.5*h)<g&&(u+=g-(u-r.depth-(C+.5*h))),C-.5*h-(b.height-p)<g&&(p+=g-(C-.5*h-(b.height-p))),m=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:c,shift:-(C-.5*h)},{type:"elem",elem:r,shift:-u}]},t)}else{var y=u-r.depth-(b.height-p);y<g&&(u+=.5*(g-y),p+=.5*(g-y)),m=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:r,shift:-u}]},t)}return i=t.havingStyle(n),m.height*=i.sizeMultiplier/t.sizeMultiplier,m.depth*=i.sizeMultiplier/t.sizeMultiplier,f=n.size===yl.DISPLAY.size?t.fontMetrics().delim1:n.size===yl.SCRIPTSCRIPT.size?t.havingStyle(yl.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,_=null==e.leftDelim?vh(t,["mopen"]):wd.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(n),e.mode,["mopen"]),v=e.continued?Qc.makeSpan([]):null==e.rightDelim?vh(t,["mclose"]):wd.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(n),e.mode,["mclose"]),Qc.makeSpan(["mord"].concat(i.sizingClasses(t)),[_,Qc.makeSpan(["mfrac"],[m]),v],t)},Xd=(e,t)=>{var i=new xh.MathNode("mfrac",[Ih(e.numer,t),Ih(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=Hl(e.barSize,t);i.setAttribute("linethickness",Wl(n))}}else i.setAttribute("linethickness","0px");var o=Yd(e.size,t.style);if(o.size!==t.style.size){i=new xh.MathNode("mstyle",[i]);var s=o.size===yl.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",s),i.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var r=[];if(null!=e.leftDelim){var a=new xh.MathNode("mo",[new xh.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),r.push(a)}if(r.push(i),null!=e.rightDelim){var l=new xh.MathNode("mo",[new xh.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),r.push(l)}return Eh(r)}return i};oh({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:n,funcName:o}=e,s=t[0],r=t[1],a=null,l=null,c="auto";switch(o){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(o){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:s,denom:r,hasBarLine:i,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:Zd,mathmlBuilder:Xd}),oh({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0],s=t[1];return{type:"genfrac",mode:i.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),oh({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:o}}});var Jd=["display","text","script","scriptscript"],eu=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};oh({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:n}=e,o=t[4],s=t[5],r=rh(t[0]),a="atom"===r.type&&"open"===r.family?eu(r.text):null,l=rh(t[1]),c="atom"===l.type&&"close"===l.family?eu(l.text):null,h=Hh(t[2],"size"),d=null;i=!!h.isBlank||(d=h.value).number>0;var u="auto",g=t[3];if("ordgroup"===g.type){if(g.body.length>0){var p=Hh(g.body[0],"textord");u=Jd[Number(p.text)]}}else g=Hh(g,"textord"),u=Jd[Number(g.text)];return{type:"genfrac",mode:n.mode,numer:o,denom:s,continued:!1,hasBarLine:i,barSize:d,leftDelim:a,rightDelim:c,size:u}},htmlBuilder:Zd,mathmlBuilder:Xd}),oh({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:n,token:o}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:Hh(t[0],"size").value,token:o}}}),oh({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Hh(t[1],"infix").size),r=t[2],a=s.number>0;return{type:"genfrac",mode:i.mode,numer:o,denom:r,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Zd,mathmlBuilder:Xd});var tu=(e,t)=>{var i,n,o=t.style;"supsub"===e.type?(i=e.sup?bh(e.sup,t.havingStyle(o.sup()),t):bh(e.sub,t.havingStyle(o.sub()),t),n=Hh(e.base,"horizBrace")):n=Hh(e,"horizBrace");var s,r=bh(n.base,t.havingBaseStyle(yl.DISPLAY)),a=Bh(n,t);if(n.isOver?(s=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(s=Qc.makeVList({positionType:"bottom",positionData:r.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:r}]},t)).children[0].children[0].children[0].classes.push("svg-align"),i){var l=Qc.makeSpan(["mord",n.isOver?"mover":"munder"],[s],t);s=n.isOver?Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):Qc.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Qc.makeSpan(["mord",n.isOver?"mover":"munder"],[s],t)};oh({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"horizBrace",mode:i.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:tu,mathmlBuilder:(e,t)=>{var i=Fh(e.label);return new xh.MathNode(e.isOver?"mover":"munder",[Ih(e.base,t),i])}}),oh({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[1],o=Hh(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:i.mode,href:o,body:ah(n)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=gh(e.body,t,!1);return Qc.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=Th(e.body,t);return i instanceof Sh||(i=new Sh("mrow",[i])),i.setAttribute("href",e.href),i}}),oh({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=Hh(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:n}))return i.formatUnsupportedCmd("\\url");for(var o=[],s=0;s<n.length;s++){var r=n[s];"~"===r&&(r="\\textasciitilde"),o.push({type:"textord",mode:"text",text:r})}var a={type:"text",mode:i.mode,font:"\\texttt",body:o};return{type:"href",mode:i.mode,href:n,body:ah(a)}}}),oh({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:i}=e;return{type:"hbox",mode:i.mode,body:ah(t[0])}},htmlBuilder(e,t){var i=gh(e.body,t,!1);return Qc.makeFragment(i)},mathmlBuilder:(e,t)=>new xh.MathNode("mrow",Dh(e.body,t))}),oh({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var i,{parser:n,funcName:o,token:s}=e,r=Hh(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=r,i={command:"\\htmlClass",class:r};break;case"\\htmlId":l.id=r,i={command:"\\htmlId",id:r};break;case"\\htmlStyle":l.style=r,i={command:"\\htmlStyle",style:r};break;case"\\htmlData":for(var c=r.split(","),h=0;h<c.length;h++){var d=c[h].split("=");if(2!==d.length)throw new Xa("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}i={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(i)?{type:"html",mode:n.mode,attributes:l,body:ah(a)}:n.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var i=gh(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var o=Qc.makeSpan(n,i,t);for(var s in e.attributes)"class"!==s&&e.attributes.hasOwnProperty(s)&&o.setAttribute(s,e.attributes[s]);return o},mathmlBuilder:(e,t)=>Th(e.body,t)}),oh({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:ah(t[0]),mathml:ah(t[1])}},htmlBuilder:(e,t)=>{var i=gh(e.html,t,!1);return Qc.makeFragment(i)},mathmlBuilder:(e,t)=>Th(e.mathml,t)});var iu=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Xa("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!Bl(i))throw new Xa("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};oh({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:n}=e,o={number:0,unit:"em"},s={number:.9,unit:"em"},r={number:0,unit:"em"},a="";if(i[0])for(var l=Hh(i[0],"raw").string.split(","),c=0;c<l.length;c++){var h=l[c].split("=");if(2===h.length){var d=h[1].trim();switch(h[0].trim()){case"alt":a=d;break;case"width":o=iu(d);break;case"height":s=iu(d);break;case"totalheight":r=iu(d);break;default:throw new Xa("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var u=Hh(t[0],"url").url;return""===a&&(a=(a=(a=u).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:n.mode,alt:a,width:o,height:s,totalheight:r,src:u}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=Hl(e.height,t),n=0;e.totalheight.number>0&&(n=Hl(e.totalheight,t)-i);var o=0;e.width.number>0&&(o=Hl(e.width,t));var s={height:Wl(i+n)};o>0&&(s.width=Wl(o)),n>0&&(s.verticalAlign=Wl(-n));var r=new $l(e.src,e.alt,s);return r.height=i,r.depth=n,r},mathmlBuilder:(e,t)=>{var i=new xh.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var n=Hl(e.height,t),o=0;if(e.totalheight.number>0&&(o=Hl(e.totalheight,t)-n,i.setAttribute("valign",Wl(-o))),i.setAttribute("height",Wl(n+o)),e.width.number>0){var s=Hl(e.width,t);i.setAttribute("width",Wl(s))}return i.setAttribute("src",e.src),i}}),oh({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=Hh(t[0],"size");if(i.settings.strict){var s="m"===n[1],r="mu"===o.value.unit;s?(r||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):r&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:o.value}},htmlBuilder:(e,t)=>Qc.makeGlue(e.dimension,t),mathmlBuilder(e,t){var i=Hl(e.dimension,t);return new xh.SpaceNode(i)}}),oh({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"lap",mode:i.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=Qc.makeSpan([],[bh(e.body,t)]),i=Qc.makeSpan(["inner"],[i],t)):i=Qc.makeSpan(["inner"],[bh(e.body,t)]);var n=Qc.makeSpan(["fix"],[]),o=Qc.makeSpan([e.alignment],[i,n],t),s=Qc.makeSpan(["strut"]);return s.style.height=Wl(o.height+o.depth),o.depth&&(s.style.verticalAlign=Wl(-o.depth)),o.children.unshift(s),o=Qc.makeSpan(["thinbox"],[o],t),Qc.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{var i=new xh.MathNode("mpadded",[Ih(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",n+"width")}return i.setAttribute("width","0px"),i}}),oh({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:n}=e,o=n.mode;n.switchMode("math");var s="\\("===i?"\\)":"$",r=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:r}}}),oh({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Xa("Mismatched "+e.funcName)}});var nu=(e,t)=>{switch(t.style.size){case yl.DISPLAY.size:return e.display;case yl.TEXT.size:return e.text;case yl.SCRIPT.size:return e.script;case yl.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};oh({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:ah(t[0]),text:ah(t[1]),script:ah(t[2]),scriptscript:ah(t[3])}},htmlBuilder:(e,t)=>{var i=nu(e,t),n=gh(i,t,!1);return Qc.makeFragment(n)},mathmlBuilder:(e,t)=>{var i=nu(e,t);return Th(i,t)}});var ou=(e,t,i,n,o,s,r)=>{e=Qc.makeSpan([],[e]);var a,l,c,h=i&&ll(i);if(t){var d=bh(t,n.havingStyle(o.sup()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(i){var u=bh(i,n.havingStyle(o.sub()),n);a={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}if(l&&a){var g=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+r;c=Qc.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:Wl(-s)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Wl(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(a){var p=e.height-r;c=Qc.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:Wl(-s)},{type:"kern",size:a.kern},{type:"elem",elem:e}]},n)}else{if(!l)return e;var m=e.depth+r;c=Qc.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Wl(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var f=[c];if(a&&0!==s&&!h){var _=Qc.makeSpan(["mspace"],[],n);_.style.marginRight=Wl(s),f.unshift(_)}return Qc.makeSpan(["mop","op-limits"],f,n)},su=["\\smallint"],ru=(e,t)=>{var i,n,o,s=!1;"supsub"===e.type?(i=e.sup,n=e.sub,o=Hh(e.base,"op"),s=!0):o=Hh(e,"op");var r,a=t.style,l=!1;if(a.size===yl.DISPLAY.size&&o.symbol&&!nl(su,o.name)&&(l=!0),o.symbol){var c=l?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(h=o.name.substr(1),o.name="oiint"===h?"\\iint":"\\iiint"),r=Qc.makeSymbol(o.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),h.length>0){var d=r.italic,u=Qc.staticSvg(h+"Size"+(l?"2":"1"),t);r=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:u,shift:l?.08:0}]},t),o.name="\\"+h,r.classes.unshift("mop"),r.italic=d}}else if(o.body){var g=gh(o.body,t,!0);1===g.length&&g[0]instanceof Ql?(r=g[0]).classes[0]="mop":r=Qc.makeSpan(["mop"],g,t)}else{for(var p=[],m=1;m<o.name.length;m++)p.push(Qc.mathsym(o.name[m],o.mode,t));r=Qc.makeSpan(["mop"],p,t)}var f=0,_=0;return(r instanceof Ql||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(f=(r.height-r.depth)/2-t.fontMetrics().axisHeight,_=r.italic),s?ou(r,i,n,t,a,_,f):(f&&(r.style.position="relative",r.style.top=Wl(f)),r)},au=(e,t)=>{var i;if(e.symbol)i=new Sh("mo",[Lh(e.name,e.mode)]),nl(su,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new Sh("mo",Dh(e.body,t));else{i=new Sh("mi",[new kh(e.name.slice(1))]);var n=new Sh("mo",[Lh("","text")]);i=e.parentIsSupSub?new Sh("mrow",[i,n]):wh([i,n])}return i},lu={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};oh({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=n;return 1===o.length&&(o=lu[o]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:ru,mathmlBuilder:au}),oh({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ah(n)}},htmlBuilder:ru,mathmlBuilder:au});var cu={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};oh({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:ru,mathmlBuilder:au}),oh({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:ru,mathmlBuilder:au}),oh({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e,n=i;return 1===n.length&&(n=cu[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ru,mathmlBuilder:au});var hu=(e,t)=>{var i,n,o,s,r=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,o=Hh(e.base,"operatorname"),r=!0):o=Hh(e,"operatorname"),o.body.length>0){for(var a=o.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=gh(a,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var h=l[c];h instanceof Ql&&(h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Qc.makeSpan(["mop"],l,t)}else s=Qc.makeSpan(["mop"],[],t);return r?ou(s,i,n,t,t.style,0,0):s};function du(e,t,i){for(var n=gh(e,t,!1),o=t.sizeMultiplier/i.sizeMultiplier,s=0;s<n.length;s++){var r=n[s].classes.indexOf("sizing");r<0?Array.prototype.push.apply(n[s].classes,t.sizingClasses(i)):n[s].classes[r+1]==="reset-size"+t.size&&(n[s].classes[r+1]="reset-size"+i.size),n[s].height*=o,n[s].depth*=o}return Qc.makeFragment(n)}oh({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"operatorname",mode:i.mode,body:ah(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:hu,mathmlBuilder:(e,t)=>{for(var i=Dh(e.body,t.withFont("mathrm")),n=!0,o=0;o<i.length;o++){var s=i[o];if(s instanceof xh.SpaceNode);else if(s instanceof xh.MathNode)switch(s.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var r=s.children[0];1===s.children.length&&r instanceof xh.TextNode?r.text=r.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var a=i.map((e=>e.toText())).join("");i=[new xh.TextNode(a)]}var l=new xh.MathNode("mi",i);l.setAttribute("mathvariant","normal");var c=new xh.MathNode("mo",[Lh("","text")]);return e.parentIsSupSub?new xh.MathNode("mrow",[l,c]):xh.newDocumentFragment([l,c])}}),Ad("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),sh({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Qc.makeFragment(gh(e.body,t,!1)):Qc.makeSpan(["mord"],gh(e.body,t,!0),t),mathmlBuilder:(e,t)=>Th(e.body,t,!0)}),oh({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,n=t[0];return{type:"overline",mode:i.mode,body:n}},htmlBuilder(e,t){var i=bh(e.body,t.havingCrampedStyle()),n=Qc.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]},t);return Qc.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var i=new xh.MathNode("mo",[new xh.TextNode("‾")]);i.setAttribute("stretchy","true");var n=new xh.MathNode("mover",[Ih(e.body,t),i]);return n.setAttribute("accent","true"),n}}),oh({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"phantom",mode:i.mode,body:ah(n)}},htmlBuilder:(e,t)=>{var i=gh(e.body,t.withPhantom(),!1);return Qc.makeFragment(i)},mathmlBuilder:(e,t)=>{var i=Dh(e.body,t);return new xh.MathNode("mphantom",i)}}),oh({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"hphantom",mode:i.mode,body:n}},htmlBuilder:(e,t)=>{var i=Qc.makeSpan([],[bh(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(var n=0;n<i.children.length;n++)i.children[n].height=0,i.children[n].depth=0;return i=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t),Qc.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var i=Dh(ah(e.body),t),n=new xh.MathNode("mphantom",i),o=new xh.MathNode("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),oh({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"vphantom",mode:i.mode,body:n}},htmlBuilder:(e,t)=>{var i=Qc.makeSpan(["inner"],[bh(e.body,t.withPhantom())]),n=Qc.makeSpan(["fix"],[]);return Qc.makeSpan(["mord","rlap"],[i,n],t)},mathmlBuilder:(e,t)=>{var i=Dh(ah(e.body),t),n=new xh.MathNode("mphantom",i),o=new xh.MathNode("mpadded",[n]);return o.setAttribute("width","0px"),o}}),oh({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,n=Hh(t[0],"size").value,o=t[1];return{type:"raisebox",mode:i.mode,dy:n,body:o}},htmlBuilder(e,t){var i=bh(e.body,t),n=Hl(e.dy,t);return Qc.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){var i=new xh.MathNode("mpadded",[Ih(e.body,t)]),n=e.dy.number+e.dy.unit;return i.setAttribute("voffset",n),i}}),oh({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),oh({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,i){var{parser:n}=e,o=i[0],s=Hh(t[0],"size"),r=Hh(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&Hh(o,"size").value,width:s.value,height:r.value}},htmlBuilder(e,t){var i=Qc.makeSpan(["mord","rule"],[],t),n=Hl(e.width,t),o=Hl(e.height,t),s=e.shift?Hl(e.shift,t):0;return i.style.borderRightWidth=Wl(n),i.style.borderTopWidth=Wl(o),i.style.bottom=Wl(s),i.width=n,i.height=o+s,i.depth=-s,i.maxFontSize=1.125*o*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=Hl(e.width,t),n=Hl(e.height,t),o=e.shift?Hl(e.shift,t):0,s=t.color&&t.getColor()||"black",r=new xh.MathNode("mspace");r.setAttribute("mathbackground",s),r.setAttribute("width",Wl(i)),r.setAttribute("height",Wl(n));var a=new xh.MathNode("mpadded",[r]);return o>=0?a.setAttribute("height",Wl(o)):(a.setAttribute("height",Wl(o)),a.setAttribute("depth",Wl(-o))),a.setAttribute("voffset",Wl(o)),a}});var uu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];oh({type:"sizing",names:uu,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:n,parser:o}=e,s=o.parseExpression(!1,i);return{type:"sizing",mode:o.mode,size:uu.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return du(e.body,i,t)},mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),n=Dh(e.body,i),o=new xh.MathNode("mstyle",n);return o.setAttribute("mathsize",Wl(i.sizeMultiplier)),o}}),oh({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:n}=e,o=!1,s=!1,r=i[0]&&Hh(i[0],"ordgroup");if(r)for(var a="",l=0;l<r.body.length;++l)if("t"===(a=r.body[l].text))o=!0;else{if("b"!==a){o=!1,s=!1;break}s=!0}else o=!0,s=!0;var c=t[0];return{type:"smash",mode:n.mode,body:c,smashHeight:o,smashDepth:s}},htmlBuilder:(e,t)=>{var i=Qc.makeSpan([],[bh(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(var n=0;n<i.children.length;n++)i.children[n].height=0;if(e.smashDepth&&(i.depth=0,i.children))for(var o=0;o<i.children.length;o++)i.children[o].depth=0;var s=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t);return Qc.makeSpan(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var i=new xh.MathNode("mpadded",[Ih(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),oh({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n}=e,o=i[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){var i=bh(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=Qc.wrapFragment(i,t);var n=t.fontMetrics().defaultRuleThickness,o=n;t.style.id<yl.TEXT.id&&(o=t.fontMetrics().xHeight);var s=n+o/4,r=i.height+i.depth+s+n,{span:a,ruleWidth:l,advanceWidth:c}=wd.sqrtImage(r,t),h=a.height-l;h>i.height+i.depth+s&&(s=(s+h-i.height-i.depth)/2);var d=a.height-i.height-s-l;i.style.paddingLeft=Wl(c);var u=Qc.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){var g=t.havingStyle(yl.SCRIPTSCRIPT),p=bh(e.index,g,t),m=.6*(u.height-u.depth),f=Qc.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:p}]},t),_=Qc.makeSpan(["root"],[f]);return Qc.makeSpan(["mord","sqrt"],[_,u],t)}return Qc.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:i,index:n}=e;return n?new xh.MathNode("mroot",[Ih(i,t),Ih(n,t)]):new xh.MathNode("msqrt",[Ih(i,t)])}});var gu={display:yl.DISPLAY,text:yl.TEXT,script:yl.SCRIPT,scriptscript:yl.SCRIPTSCRIPT};oh({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:n,parser:o}=e,s=o.parseExpression(!0,i),r=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:r,body:s}},htmlBuilder(e,t){var i=gu[e.style],n=t.havingStyle(i).withFont("");return du(e.body,n,t)},mathmlBuilder(e,t){var i=gu[e.style],n=t.havingStyle(i),o=Dh(e.body,n),s=new xh.MathNode("mstyle",o),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",r[0]),s.setAttribute("displaystyle",r[1]),s}}),sh({type:"supsub",htmlBuilder(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===yl.DISPLAY.size||i.alwaysHandleSupSub)?ru:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===yl.DISPLAY.size||i.limits)?hu:null:"accent"===i.type?ll(i.base)?zh:null:"horizBrace"===i.type&&!e.sub===i.isOver?tu:null:null}(e,t);if(i)return i(e,t);var n,o,s,{base:r,sup:a,sub:l}=e,c=bh(r,t),h=t.fontMetrics(),d=0,u=0,g=r&&ll(r);if(a){var p=t.havingStyle(t.style.sup());n=bh(a,p,t),g||(d=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());o=bh(l,m,t),g||(u=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}s=t.style===yl.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2;var f,_=t.sizeMultiplier,v=Wl(.5/h.ptPerEm/_),b=null;if(o){var C=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Ql||C)&&(b=Wl(-c.italic))}if(n&&o){d=Math.max(d,s,n.depth+.25*h.xHeight),u=Math.max(u,h.sub2);var y=4*h.defaultRuleThickness;if(d-n.depth-(o.height-u)<y){u=y-(d-n.depth)+o.height;var w=.8*h.xHeight-(d-n.depth);w>0&&(d+=w,u-=w)}f=Qc.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u,marginRight:v,marginLeft:b},{type:"elem",elem:n,shift:-d,marginRight:v}]},t)}else if(o){u=Math.max(u,h.sub1,o.height-.8*h.xHeight),f=Qc.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:o,marginLeft:b,marginRight:v}]},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");d=Math.max(d,s,n.depth+.25*h.xHeight),f=Qc.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:n,marginRight:v}]},t)}var S=_h(c,"right")||"mord";return Qc.makeSpan([S],[c,Qc.makeSpan(["msupsub"],[f])],t)},mathmlBuilder(e,t){var i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,s=[Ih(e.base,t)];if(e.sub&&s.push(Ih(e.sub,t)),e.sup&&s.push(Ih(e.sup,t)),n)o=i?"mover":"munder";else if(e.sub)if(e.sup){var r=e.base;o=r&&"op"===r.type&&r.limits&&t.style===yl.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===yl.DISPLAY||r.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===yl.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===yl.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===yl.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===yl.DISPLAY)?"mover":"msup"}return new xh.MathNode(o,s)}}),sh({type:"atom",htmlBuilder:(e,t)=>Qc.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var i=new xh.MathNode("mo",[Lh(e.text,e.mode)]);if("bin"===e.family){var n=Nh(e,t);"bold-italic"===n&&i.setAttribute("mathvariant",n)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var pu={mi:"italic",mn:"normal",mtext:"normal"};sh({type:"mathord",htmlBuilder:(e,t)=>Qc.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var i=new xh.MathNode("mi",[Lh(e.text,e.mode,t)]),n=Nh(e,t)||"italic";return n!==pu[i.type]&&i.setAttribute("mathvariant",n),i}}),sh({type:"textord",htmlBuilder:(e,t)=>Qc.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var i,n=Lh(e.text,e.mode,t),o=Nh(e,t)||"normal";return i="text"===e.mode?new xh.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new xh.MathNode("mn",[n]):"\\prime"===e.text?new xh.MathNode("mo",[n]):new xh.MathNode("mi",[n]),o!==pu[i.type]&&i.setAttribute("mathvariant",o),i}});var mu={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},fu={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};sh({type:"spacing",htmlBuilder(e,t){if(fu.hasOwnProperty(e.text)){var i=fu[e.text].className||"";if("text"===e.mode){var n=Qc.makeOrd(e,t,"textord");return n.classes.push(i),n}return Qc.makeSpan(["mspace",i],[Qc.mathsym(e.text,e.mode,t)],t)}if(mu.hasOwnProperty(e.text))return Qc.makeSpan(["mspace",mu[e.text]],[],t);throw new Xa('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!fu.hasOwnProperty(e.text)){if(mu.hasOwnProperty(e.text))return new xh.MathNode("mspace");throw new Xa('Unknown type of space "'+e.text+'"')}return new xh.MathNode("mtext",[new xh.TextNode(" ")])}});var _u=()=>{var e=new xh.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};sh({type:"tag",mathmlBuilder(e,t){var i=new xh.MathNode("mtable",[new xh.MathNode("mtr",[_u(),new xh.MathNode("mtd",[Th(e.body,t)]),_u(),new xh.MathNode("mtd",[Th(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var vu={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},bu={"\\textbf":"textbf","\\textmd":"textmd"},Cu={"\\textit":"textit","\\textup":"textup"},yu=(e,t)=>{var i=e.font;return i?vu[i]?t.withTextFontFamily(vu[i]):bu[i]?t.withTextFontWeight(bu[i]):t.withTextFontShape(Cu[i]):t};oh({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"text",mode:i.mode,body:ah(o),font:n}},htmlBuilder(e,t){var i=yu(e,t),n=gh(e.body,i,!0);return Qc.makeSpan(["mord","text"],n,i)},mathmlBuilder(e,t){var i=yu(e,t);return Th(e.body,i)}}),oh({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=bh(e.body,t),n=Qc.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Qc.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:i}]},t);return Qc.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var i=new xh.MathNode("mo",[new xh.TextNode("‾")]);i.setAttribute("stretchy","true");var n=new xh.MathNode("munder",[Ih(e.body,t),i]);return n.setAttribute("accentunder","true"),n}}),oh({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=bh(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(i.height-n-(i.depth+n));return Qc.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:(e,t)=>new xh.MathNode("mpadded",[Ih(e.body,t)],["vcenter"])}),oh({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new Xa("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=wu(e),n=[],o=t.havingStyle(t.style.text()),s=0;s<i.length;s++){var r=i[s];"~"===r&&(r="\\textasciitilde"),n.push(Qc.makeSymbol(r,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return Qc.makeSpan(["mord","text"].concat(o.sizingClasses(t)),Qc.tryCombineChars(n),o)},mathmlBuilder(e,t){var i=new xh.TextNode(wu(e)),n=new xh.MathNode("mtext",[i]);return n.setAttribute("mathvariant","monospace"),n}});var wu=e=>e.body.replace(/ /g,e.star?"␣":" "),Su=th,ku=new RegExp("[̀-ͯ]+$");class xu{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Za("EOF",new Ya(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new Xa("Unexpected character: '"+e[t]+"'",new Za(e[t],new Ya(this,t,t+1)));var n=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[n]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Za(n,new Ya(this,t,this.tokenRegex.lastIndex))}}class Lu{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Xa("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Eu=Id;Ad("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Ad("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Ad("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Ad("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Ad("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Ad("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ad("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Nu={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Ad("\\char",(function(e){var t,i=e.popToken(),n="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new Xa("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Nu[i.text])||n>=t)throw new Xa("Invalid base-"+t+" digit "+i.text);for(var o;null!=(o=Nu[e.future().text])&&o<t;)n*=t,n+=o,e.popToken()}return"\\@char{"+n+"}"}));var Du=(e,t,i)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new Xa("\\newcommand's first argument must be a macro name");var o=n[0].text,s=e.isDefined(o);if(s&&!t)throw new Xa("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!i)throw new Xa("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var r=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var a="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)a+=l.text,l=e.expandNextToken();if(!a.match(/^\s*[0-9]+\s*$/))throw new Xa("Invalid number of arguments: "+a);r=parseInt(a),n=e.consumeArg().tokens}return e.macros.set(o,{tokens:n,numArgs:r}),""};Ad("\\newcommand",(e=>Du(e,!1,!0))),Ad("\\renewcommand",(e=>Du(e,!0,!1))),Ad("\\providecommand",(e=>Du(e,!0,!0))),Ad("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Ad("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Ad("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),Su[i],ic.math[i],ic.text[i]),""})),Ad("\\bgroup","{"),Ad("\\egroup","}"),Ad("~","\\nobreakspace"),Ad("\\lq","`"),Ad("\\rq","'"),Ad("\\aa","\\r a"),Ad("\\AA","\\r A"),Ad("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Ad("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ad("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Ad("","\\mathscr{B}"),Ad("","\\mathscr{E}"),Ad("","\\mathscr{F}"),Ad("","\\mathscr{H}"),Ad("","\\mathscr{I}"),Ad("","\\mathscr{L}"),Ad("","\\mathscr{M}"),Ad("","\\mathscr{R}"),Ad("","\\mathfrak{C}"),Ad("","\\mathfrak{H}"),Ad("","\\mathfrak{Z}"),Ad("\\Bbbk","\\Bbb{k}"),Ad("·","\\cdotp"),Ad("\\llap","\\mathllap{\\textrm{#1}}"),Ad("\\rlap","\\mathrlap{\\textrm{#1}}"),Ad("\\clap","\\mathclap{\\textrm{#1}}"),Ad("\\mathstrut","\\vphantom{(}"),Ad("\\underbar","\\underline{\\text{#1}}"),Ad("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Ad("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Ad("\\ne","\\neq"),Ad("≠","\\neq"),Ad("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Ad("∉","\\notin"),Ad("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Ad("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Ad("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Ad("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Ad("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Ad("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Ad("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Ad("⟂","\\perp"),Ad("‼","\\mathclose{!\\mkern-0.8mu!}"),Ad("∌","\\notni"),Ad("⌜","\\ulcorner"),Ad("⌝","\\urcorner"),Ad("⌞","\\llcorner"),Ad("⌟","\\lrcorner"),Ad("©","\\copyright"),Ad("®","\\textregistered"),Ad("","\\textregistered"),Ad("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Ad("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Ad("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Ad("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Ad("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Ad("⋮","\\vdots"),Ad("\\varGamma","\\mathit{\\Gamma}"),Ad("\\varDelta","\\mathit{\\Delta}"),Ad("\\varTheta","\\mathit{\\Theta}"),Ad("\\varLambda","\\mathit{\\Lambda}"),Ad("\\varXi","\\mathit{\\Xi}"),Ad("\\varPi","\\mathit{\\Pi}"),Ad("\\varSigma","\\mathit{\\Sigma}"),Ad("\\varUpsilon","\\mathit{\\Upsilon}"),Ad("\\varPhi","\\mathit{\\Phi}"),Ad("\\varPsi","\\mathit{\\Psi}"),Ad("\\varOmega","\\mathit{\\Omega}"),Ad("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ad("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Ad("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ad("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ad("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ad("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Tu={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Ad("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Tu?t=Tu[i]:("\\not"===i.substr(0,4)||i in ic.math&&nl(["bin","rel"],ic.math[i].group))&&(t="\\dotsb"),t}));var Iu={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Ad("\\dotso",(function(e){return e.future().text in Iu?"\\ldots\\,":"\\ldots"})),Ad("\\dotsc",(function(e){var t=e.future().text;return t in Iu&&","!==t?"\\ldots\\,":"\\ldots"})),Ad("\\cdots",(function(e){return e.future().text in Iu?"\\@cdots\\,":"\\@cdots"})),Ad("\\dotsb","\\cdots"),Ad("\\dotsm","\\cdots"),Ad("\\dotsi","\\!\\cdots"),Ad("\\dotsx","\\ldots\\,"),Ad("\\DOTSI","\\relax"),Ad("\\DOTSB","\\relax"),Ad("\\DOTSX","\\relax"),Ad("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ad("\\,","\\tmspace+{3mu}{.1667em}"),Ad("\\thinspace","\\,"),Ad("\\>","\\mskip{4mu}"),Ad("\\:","\\tmspace+{4mu}{.2222em}"),Ad("\\medspace","\\:"),Ad("\\;","\\tmspace+{5mu}{.2777em}"),Ad("\\thickspace","\\;"),Ad("\\!","\\tmspace-{3mu}{.1667em}"),Ad("\\negthinspace","\\!"),Ad("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ad("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ad("\\enspace","\\kern.5em "),Ad("\\enskip","\\hskip.5em\\relax"),Ad("\\quad","\\hskip1em\\relax"),Ad("\\qquad","\\hskip2em\\relax"),Ad("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ad("\\tag@paren","\\tag@literal{({#1})}"),Ad("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Xa("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Ad("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ad("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ad("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ad("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ad("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Ad("\\newline","\\\\\\relax"),Ad("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Au=Wl(El["Main-Regular"]["T".charCodeAt(0)][1]-.7*El["Main-Regular"]["A".charCodeAt(0)][1]);Ad("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Au+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Ad("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Au+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Ad("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ad("\\@hspace","\\hskip #1\\relax"),Ad("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ad("\\ordinarycolon",":"),Ad("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ad("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ad("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ad("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ad("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ad("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ad("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ad("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ad("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ad("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ad("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ad("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ad("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ad("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ad("∷","\\dblcolon"),Ad("∹","\\eqcolon"),Ad("≔","\\coloneqq"),Ad("≕","\\eqqcolon"),Ad("⩴","\\Coloneqq"),Ad("\\ratio","\\vcentcolon"),Ad("\\coloncolon","\\dblcolon"),Ad("\\colonequals","\\coloneqq"),Ad("\\coloncolonequals","\\Coloneqq"),Ad("\\equalscolon","\\eqqcolon"),Ad("\\equalscoloncolon","\\Eqqcolon"),Ad("\\colonminus","\\coloneq"),Ad("\\coloncolonminus","\\Coloneq"),Ad("\\minuscolon","\\eqcolon"),Ad("\\minuscoloncolon","\\Eqcolon"),Ad("\\coloncolonapprox","\\Colonapprox"),Ad("\\coloncolonsim","\\Colonsim"),Ad("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ad("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ad("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ad("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ad("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Ad("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ad("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ad("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ad("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ad("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ad("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ad("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ad("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ad("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Ad("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Ad("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Ad("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Ad("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Ad("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Ad("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Ad("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Ad("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Ad("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Ad("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Ad("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Ad("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Ad("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Ad("\\imath","\\html@mathml{\\@imath}{ı}"),Ad("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Ad("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Ad("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Ad("⟦","\\llbracket"),Ad("⟧","\\rrbracket"),Ad("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Ad("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Ad("⦃","\\lBrace"),Ad("⦄","\\rBrace"),Ad("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Ad("⦵","\\minuso"),Ad("\\darr","\\downarrow"),Ad("\\dArr","\\Downarrow"),Ad("\\Darr","\\Downarrow"),Ad("\\lang","\\langle"),Ad("\\rang","\\rangle"),Ad("\\uarr","\\uparrow"),Ad("\\uArr","\\Uparrow"),Ad("\\Uarr","\\Uparrow"),Ad("\\N","\\mathbb{N}"),Ad("\\R","\\mathbb{R}"),Ad("\\Z","\\mathbb{Z}"),Ad("\\alef","\\aleph"),Ad("\\alefsym","\\aleph"),Ad("\\Alpha","\\mathrm{A}"),Ad("\\Beta","\\mathrm{B}"),Ad("\\bull","\\bullet"),Ad("\\Chi","\\mathrm{X}"),Ad("\\clubs","\\clubsuit"),Ad("\\cnums","\\mathbb{C}"),Ad("\\Complex","\\mathbb{C}"),Ad("\\Dagger","\\ddagger"),Ad("\\diamonds","\\diamondsuit"),Ad("\\empty","\\emptyset"),Ad("\\Epsilon","\\mathrm{E}"),Ad("\\Eta","\\mathrm{H}"),Ad("\\exist","\\exists"),Ad("\\harr","\\leftrightarrow"),Ad("\\hArr","\\Leftrightarrow"),Ad("\\Harr","\\Leftrightarrow"),Ad("\\hearts","\\heartsuit"),Ad("\\image","\\Im"),Ad("\\infin","\\infty"),Ad("\\Iota","\\mathrm{I}"),Ad("\\isin","\\in"),Ad("\\Kappa","\\mathrm{K}"),Ad("\\larr","\\leftarrow"),Ad("\\lArr","\\Leftarrow"),Ad("\\Larr","\\Leftarrow"),Ad("\\lrarr","\\leftrightarrow"),Ad("\\lrArr","\\Leftrightarrow"),Ad("\\Lrarr","\\Leftrightarrow"),Ad("\\Mu","\\mathrm{M}"),Ad("\\natnums","\\mathbb{N}"),Ad("\\Nu","\\mathrm{N}"),Ad("\\Omicron","\\mathrm{O}"),Ad("\\plusmn","\\pm"),Ad("\\rarr","\\rightarrow"),Ad("\\rArr","\\Rightarrow"),Ad("\\Rarr","\\Rightarrow"),Ad("\\real","\\Re"),Ad("\\reals","\\mathbb{R}"),Ad("\\Reals","\\mathbb{R}"),Ad("\\Rho","\\mathrm{P}"),Ad("\\sdot","\\cdot"),Ad("\\sect","\\S"),Ad("\\spades","\\spadesuit"),Ad("\\sub","\\subset"),Ad("\\sube","\\subseteq"),Ad("\\supe","\\supseteq"),Ad("\\Tau","\\mathrm{T}"),Ad("\\thetasym","\\vartheta"),Ad("\\weierp","\\wp"),Ad("\\Zeta","\\mathrm{Z}"),Ad("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ad("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ad("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ad("\\bra","\\mathinner{\\langle{#1}|}"),Ad("\\ket","\\mathinner{|{#1}\\rangle}"),Ad("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ad("\\Bra","\\left\\langle#1\\right|"),Ad("\\Ket","\\left|#1\\right\\rangle"),Ad("\\angln","{\\angl n}"),Ad("\\blue","\\textcolor{##6495ed}{#1}"),Ad("\\orange","\\textcolor{##ffa500}{#1}"),Ad("\\pink","\\textcolor{##ff00af}{#1}"),Ad("\\red","\\textcolor{##df0030}{#1}"),Ad("\\green","\\textcolor{##28ae7b}{#1}"),Ad("\\gray","\\textcolor{gray}{#1}"),Ad("\\purple","\\textcolor{##9d38bd}{#1}"),Ad("\\blueA","\\textcolor{##ccfaff}{#1}"),Ad("\\blueB","\\textcolor{##80f6ff}{#1}"),Ad("\\blueC","\\textcolor{##63d9ea}{#1}"),Ad("\\blueD","\\textcolor{##11accd}{#1}"),Ad("\\blueE","\\textcolor{##0c7f99}{#1}"),Ad("\\tealA","\\textcolor{##94fff5}{#1}"),Ad("\\tealB","\\textcolor{##26edd5}{#1}"),Ad("\\tealC","\\textcolor{##01d1c1}{#1}"),Ad("\\tealD","\\textcolor{##01a995}{#1}"),Ad("\\tealE","\\textcolor{##208170}{#1}"),Ad("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ad("\\greenB","\\textcolor{##8af281}{#1}"),Ad("\\greenC","\\textcolor{##74cf70}{#1}"),Ad("\\greenD","\\textcolor{##1fab54}{#1}"),Ad("\\greenE","\\textcolor{##0d923f}{#1}"),Ad("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ad("\\goldB","\\textcolor{##ffbb71}{#1}"),Ad("\\goldC","\\textcolor{##ff9c39}{#1}"),Ad("\\goldD","\\textcolor{##e07d10}{#1}"),Ad("\\goldE","\\textcolor{##a75a05}{#1}"),Ad("\\redA","\\textcolor{##fca9a9}{#1}"),Ad("\\redB","\\textcolor{##ff8482}{#1}"),Ad("\\redC","\\textcolor{##f9685d}{#1}"),Ad("\\redD","\\textcolor{##e84d39}{#1}"),Ad("\\redE","\\textcolor{##bc2612}{#1}"),Ad("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ad("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ad("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ad("\\maroonD","\\textcolor{##ca337c}{#1}"),Ad("\\maroonE","\\textcolor{##9e034e}{#1}"),Ad("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ad("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ad("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ad("\\purpleD","\\textcolor{##7854ab}{#1}"),Ad("\\purpleE","\\textcolor{##543b78}{#1}"),Ad("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ad("\\mintB","\\textcolor{##edf2df}{#1}"),Ad("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ad("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ad("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ad("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ad("\\grayD","\\textcolor{##d6d8da}{#1}"),Ad("\\grayE","\\textcolor{##babec2}{#1}"),Ad("\\grayF","\\textcolor{##888d93}{#1}"),Ad("\\grayG","\\textcolor{##626569}{#1}"),Ad("\\grayH","\\textcolor{##3b3e40}{#1}"),Ad("\\grayI","\\textcolor{##21242c}{#1}"),Ad("\\kaBlue","\\textcolor{##314453}{#1}"),Ad("\\kaGreen","\\textcolor{##71B307}{#1}");var Mu={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Ru{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Lu(Eu,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new xu(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:i}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:i}=this.consumeArg());return this.pushToken(new Za("EOF",i.loc)),this.pushTokens(n),t.range(i,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var n,o=this.future(),s=0,r=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++s;else if("}"===n.text){if(-1==--s)throw new Xa("Extra }",n)}else if("EOF"===n.text)throw new Xa("Unexpected end of input in a macro argument, expected '"+(e&&i?e[r]:"}")+"'",n);if(e&&i)if((0===s||1===s&&"{"===e[r])&&n.text===e[r]){if(++r===e.length){t.splice(-r,r);break}}else r=0}while(0!==s||i);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Xa("The length of delimiters doesn't match the number of args!");for(var i=t[0],n=0;n<i.length;n++){var o=this.popToken();if(i[n]!==o.text)throw new Xa("Use of the macro doesn't match its definition",o)}}for(var s=[],r=0;r<e;r++)s.push(this.consumeArg(t&&t[r+1]).tokens);return s}expandOnce(e){var t=this.popToken(),i=t.text,n=t.noexpand?null:this._getExpansion(i);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===i[0]&&!this.isDefined(i))throw new Xa("Undefined control sequence: "+i);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Xa("Too many expansions: infinite loop or need to increase maxExpand setting");var o=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var r=(o=o.slice()).length-1;r>=0;--r){var a=o[r];if("#"===a.text){if(0===r)throw new Xa("Incomplete placeholder at end of macro body",a);if("#"===(a=o[--r]).text)o.splice(r+1,1);else{if(!/^[1-9]$/.test(a.text))throw new Xa("Not a valid argument number",a);o.splice(r,2,...s[+a.text-1])}}}return this.pushTokens(o),o}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e=this.expandOnce();if(e instanceof Za)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Za(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;){var n=this.expandOnce(!0);n instanceof Za&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var o=0;if(-1!==n.indexOf("#"))for(var s=n.replace(/##/g,"");-1!==s.indexOf("#"+(o+1));)++o;for(var r=new xu(n,this.settings),a=[],l=r.lex();"EOF"!==l.text;)a.push(l),l=r.lex();return a.reverse(),{tokens:a,numArgs:o}}return n}isDefined(e){return this.macros.has(e)||Su.hasOwnProperty(e)||ic.math.hasOwnProperty(e)||ic.text.hasOwnProperty(e)||Mu.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Su.hasOwnProperty(e)&&!Su[e].primitive}}var Ou={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Pu={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Fu{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ru(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Xa("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Za("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==Fu.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&Su[n.text]&&Su[n.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&i.push(o)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,n=0;n<e.length;n++)if("infix"===e[n].type){if(-1!==i)throw new Xa("only one infix operator per group",e[n].token);i=n,t=e[n].replaceWith}if(-1!==i&&t){var o,s,r=e.slice(0,i),a=e.slice(i+1);return o=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},s=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===t?this.callFunction(t,[o,e[i],s],[]):this.callFunction(t,[o,s],[])]}return e}handleSupSubscript(e){var t=this.fetch(),i=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new Xa("Expected group after '"+i+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],i=0;i<e.length;i++)t.push({type:"textord",mode:"text",text:e[i]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,i,n=this.parseGroup("atom",e);if("text"===this.mode)return n;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(n&&"op"===n.type){var s="\\limits"===o.text;n.limits=s,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new Xa("Limit controls must follow a math operator",o);n.alwaysHandleSupSub&&(n.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new Xa("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(i)throw new Xa("Double subscript",o);i=this.handleSupSubscript("subscript")}else{if("'"!==o.text)break;if(t)throw new Xa("Double superscript",o);var r={type:"textord",mode:this.mode,text:"\\prime"},a=[r];for(this.consume();"'"===this.fetch().text;)a.push(r),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:a}}}return t||i?{type:"supsub",mode:this.mode,base:n,sup:t,sub:i}:n}parseFunction(e,t){var i=this.fetch(),n=i.text,o=Su[n];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new Xa("Got function '"+n+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!o.allowedInText)throw new Xa("Can't use function '"+n+"' in text mode",i);if("math"===this.mode&&!1===o.allowedInMath)throw new Xa("Can't use function '"+n+"' in math mode",i);var{args:s,optArgs:r}=this.parseArguments(n,o);return this.callFunction(n,s,r,i,e)}callFunction(e,t,i,n,o){var s={funcName:e,parser:this,token:n,breakOnTokenText:o},r=Su[e];if(r&&r.handler)return r.handler(s,t,i);throw new Xa("No function handler for "+e)}parseArguments(e,t){var i=t.numArgs+t.numOptionalArgs;if(0===i)return{args:[],optArgs:[]};for(var n=[],o=[],s=0;s<i;s++){var r=t.argTypes&&t.argTypes[s],a=s<t.numOptionalArgs;(t.primitive&&null==r||"sqrt"===t.type&&1===s&&null==o[0])&&(r="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",r,a);if(a)o.push(l);else{if(null==l)throw new Xa("Null argument, please report this as a bug");n.push(l)}}return{args:n,optArgs:o}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":var n=this.parseArgumentGroup(i,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",i);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(i)throw new Xa("A primitive argument cannot be optional");var s=this.parseGroup(e);if(null==s)throw new Xa("Expected group as "+e,this.fetch());return s;case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new Xa("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var i=this.gullet.scanArgument(t);if(null==i)return null;for(var n,o="";"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),i.text=o,i}parseRegexGroup(e,t){for(var i,n=this.fetch(),o=n,s="";"EOF"!==(i=this.fetch()).text&&e.test(s+i.text);)s+=(o=i).text,this.consume();if(""===s)throw new Xa("Invalid "+t+": '"+n.text+"'",n);return n.range(o,s)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var i=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!i)throw new Xa("Invalid color: '"+t.text+"'",t);var n=i[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new Xa("Invalid size: '"+t.text+"'",t);var o={number:+(n[1]+n[2]),unit:n[3]};if(!Bl(o))throw new Xa("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:i}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var i=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:i}}parseArgumentGroup(e,t){var i=this.gullet.scanArgument(e);if(null==i)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:i.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){var i,n=this.fetch(),o=n.text;if("{"===o||"\\begingroup"===o){this.consume();var s="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var r=this.parseExpression(!1,s),a=this.fetch();this.expect(s),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:Ya.range(n,a),body:r,semisimple:"\\begingroup"===o||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Mu.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Xa("Undefined control sequence: "+o,n);i=this.formatUnsupportedCmd(o),this.consume()}return i}formLigatures(e){for(var t=e.length-1,i=0;i<t;++i){var n=e[i],o=n.text;"-"===o&&"-"===e[i+1].text&&(i+1<t&&"-"===e[i+2].text?(e.splice(i,3,{type:"textord",mode:"text",loc:Ya.range(n,e[i+2]),text:"---"}),t-=2):(e.splice(i,2,{type:"textord",mode:"text",loc:Ya.range(n,e[i+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[i+1].text!==o||(e.splice(i,2,{type:"textord",mode:"text",loc:Ya.range(n,e[i+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var i=t.slice(5),n="*"===i.charAt(0);if(n&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new Xa("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:n}}Pu.hasOwnProperty(t[0])&&!ic[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Pu[t[0]]+t.substr(1));var o,s=ku.exec(t);if(s&&("i"===(t=t.substring(0,s.index))?t="ı":"j"===t&&(t="ȷ")),ic[this.mode][t]){this.settings.strict&&"math"===this.mode&&Rc.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var r,a=ic[this.mode][t].group,l=Ya.range(e);if(ec.hasOwnProperty(a)){var c=a;r={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else r={type:a,mode:this.mode,loc:l,text:t};o=r}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(kl(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Ya.range(e),text:t}}if(this.consume(),s)for(var h=0;h<s[0].length;h++){var d=s[0][h];if(!Ou[d])throw new Xa("Unknown accent ' "+d+"'",e);var u=Ou[d][this.mode]||Ou[d].text;if(!u)throw new Xa("Accent "+d+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:Ya.range(e),label:u,isStretchy:!1,isShifty:!0,base:o}}return o}}Fu.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Bu=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new Fu(e,t);delete i.gullet.macros.current["\\df@tag"];var n=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Xa("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:i.subparse([new Za("\\df@tag")])}]}return n},Hu=function(e,t,i){t.textContent="";var n=Vu(e,i).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Hu=function(){throw new Xa("KaTeX doesn't work in quirks mode.")});var Wu=function(e,t,i){if(i.throwOnError||!(e instanceof Xa))throw e;var n=Qc.makeSpan(["katex-error"],[new Ql(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+i.errorColor),n},Vu=function(e,t){var i=new ul(t);try{return function(e,t,i){var n,o=Mh(i);if("mathml"===i.output)return Ah(e,t,o,i.displayMode,!0);if("html"===i.output){var s=yh(e,o);n=Qc.makeSpan(["katex"],[s])}else{var r=Ah(e,t,o,i.displayMode,!1),a=yh(e,o);n=Qc.makeSpan(["katex"],[r,a])}return Rh(n,i)}(Bu(e,i),e,i)}catch(t){return Wu(t,e,i)}},zu={version:"0.15.3",render:Hu,renderToString:function(e,t){return Vu(e,t).toMarkup()},ParseError:Xa,SETTINGS_SCHEMA:hl,__parse:function(e,t){var i=new ul(t);return Bu(e,i)},__renderToDomTree:Vu,__renderToHTMLTree:function(e,t){var i=new ul(t);try{return function(e,t,i){var n=yh(e,Mh(i)),o=Qc.makeSpan(["katex"],[n]);return Rh(o,i)}(Bu(e,i),0,i)}catch(t){return Wu(t,e,i)}},__setFontMetrics:function(e,t){El[e]=t},__defineSymbol:nc,__defineMacro:Ad,__domTree:{Span:Kl,Anchor:ql,SymbolNode:Ql,SvgNode:Yl,PathNode:Zl,LineNode:Xl}};const Uu=function(e,t){return er(e,(function(e){t?delete e.position:e.position=void 0})),e},ju=function(e,t,i,n,o){const s=Ku(t);if(null!=i&&("number"!=typeof i||i<0||i===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index for child node");if(!(null==n||n.type&&n.children))throw new Error("Expected parent node");if(!e||!e.type||"string"!=typeof e.type)return!1;if(null==n!=(null==i))throw new Error("Expected both parent and index");return s.call(o,e,i,n)},Ku=function(e){if(null==e)return $u;if("string"==typeof e)return t=e,function(e){return $u(e)&&e.tagName===t};var t;if("object"==typeof e)return function(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=Ku(e[i]);return qu((function(...e){let i=-1;for(;++i<t.length;)if(t[i].call(this,...e))return!0;return!1}))}(e);if("function"==typeof e)return qu(e);throw new Error("Expected function, string, or array as test")};function qu(e){return function(t,...i){return $u(t)&&Boolean(e.call(this,t,...i))}}function $u(e){return Boolean(e&&"object"==typeof e&&"element"===e.type&&"string"==typeof e.tagName)}var Gu=function(e,t,i){var n=os(i);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof t){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t];return null};const Qu=/\n/g,Yu=/[\t ]+/g,Zu=Ku("br"),Xu=Ku("p"),Ju=Ku(["th","td"]),eg=Ku("tr"),tg=Ku(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),ig=Ku(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function ng(e,t={}){const i=e.children||[],n=ig(e),o=lg(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1});let s,r,a,l=-1;if("text"===e.type||"comment"===e.type)return sg(e,{whitespace:o,breakBefore:!0,breakAfter:!0});for(s=[];++l<i.length;)s=s.concat(og(i[l],e,{whitespace:o,breakBefore:l?null:n,breakAfter:l<i.length-1?Zu(i[l+1]):n}));l=-1;const c=[];for(;++l<s.length;)r=s[l],"number"==typeof r?void 0!==a&&r>a&&(a=r):r&&(a&&c.push("\n".repeat(a)),a=0,c.push(r));return c.join("")}function og(e,t,i){return"element"===e.type?function(e,t,i){const n=lg(e,i),o=e.children||[];let s,r,a=-1,l=[];if(tg(e))return l;for(Zu(e)||eg(e)&&Gu(t,e,eg)?r="\n":Xu(e)?(s=2,r=2):ig(e)&&(s=1,r=1);++a<o.length;)l=l.concat(og(o[a],e,{whitespace:n,breakBefore:a?void 0:s,breakAfter:a<o.length-1?Zu(o[a+1]):r}));return Ju(e)&&Gu(t,e,Ju)&&l.push("\t"),s&&l.unshift(s),r&&l.push(r),l}(e,t,i):"text"===e.type?["normal"===i.whitespace?sg(e,i):rg(e)]:[]}function sg(e,t){const i=String(e.value),n=[],o=[];let s,r,a,l=0,c=-1;for(;l<i.length;)Qu.lastIndex=l,s=Qu.exec(i),r=s?s.index:i.length,n.push(ag(i.slice(l,r).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),t.breakBefore,t.breakAfter)),l=r+1;for(;++c<n.length;)8203===n[c].charCodeAt(n[c].length-1)||c<n.length-1&&8203===n[c+1].charCodeAt(0)?(o.push(n[c]),a=""):n[c]&&(a&&o.push(a),o.push(n[c]),a=" ");return o.join("")}function rg(e){return String(e.value)}function ag(e,t,i){const n=[];let o,s,r=0;for(;r<e.length;)Yu.lastIndex=r,o=Yu.exec(e),s=o?o.index:e.length,r||s||!o||t||n.push(""),r!==s&&n.push(e.slice(r,s)),r=o?s+o[0].length:s;return r===s||i||n.push(""),n.join(" ")}function lg(e,t){let i;if("element"===e.type)switch(i=e.properties||{},e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return i.wrap?"pre-wrap":"pre";case"td":case"th":return i.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}return t.whitespace}const cg={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `--\x3e` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `--\x3e` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `--\x3e` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `--\x3e` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `\x3c!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `\x3c!--`. Expected `--\x3e`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}},hg={2:!0,1:!1,0:null};function dg(e){const t=this.data("settings"),i=Object.assign({},t,e);Object.assign(this,{Parser:function(e,t){const n=i.fragment?"parseFragment":"parse",o=i.emitParseErrors?function(n){const o=n.code,s=o.replace(/-[a-z]/g,(e=>e.charAt(1).toUpperCase())),r=i[s],a=null==r||r,l="number"==typeof a?a:a?1:0,c={line:n.startLine,column:n.startCol,offset:n.startOffset},h={line:n.endLine,column:n.endCol,offset:n.endOffset};if(l){const e=cg[s]||{reason:"",description:"",url:""},i=t.message(d(e.reason),{start:c,end:h});i.source="parse-error",i.ruleId=o,i.fatal=hg[l],i.note=d(e.description),i.url="url"in e&&!1===e.url?null:"https://html.spec.whatwg.org/multipage/parsing.html#parse-error-"+o}function d(t){return t.replace(/%c(?:-(\d+))?/g,((t,i)=>{const o=i?-Number.parseInt(i,10):0,s=e.charAt(n.startOffset+o);return"`"===s?"` ` `":s})).replace(/%x/g,(()=>"0x"+e.charCodeAt(n.startOffset).toString(16).toUpperCase()))}}:null;return Ca(new Sr({sourceCodeLocationInfo:!0,onParseError:o,scriptingEnabled:!1})[n](e),{space:i.space,file:t,verbose:i.verbose})}})}const ug=Object.assign,gg=xi().use(dg,{fragment:!0}),pg="rehype-katex";function mg(e){const t=e||{},i=t.throwOnError||!1;return(e,n)=>{er(e,"element",(e=>{const o=e.properties&&Array.isArray(e.properties.className)?e.properties.className:[],s=o.includes("math-inline"),r=o.includes("math-display");if(!s&&!r)return;const a=ng(e,{whitespace:"pre"});let l;try{l=zu.renderToString(a,ug({},t,{displayMode:r,throwOnError:!0}))}catch(o){const s=o,c=i?"fail":"message",h=[pg,s.name.toLowerCase()].join(":");n[c](s.message,e.position,h),l=zu.renderToString(a,ug({},t,{displayMode:r,throwOnError:!1,strict:"ignore"}))}e.children=Uu(gg.parse(l),!0).children}))}}const fg={strip:["script"],clobberPrefix:"user-content-",clobber:["name","id"],ancestors:{tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols:{href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames:["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes:{a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required:{input:{type:"checkbox",disabled:!0}}};var _g={}.hasOwnProperty,vg=[].push,bg={root:{children:yg},doctype:function(e){return e.allowDoctypes?{name:wg}:null},comment:function(e){return e.allowComments?{value:kg}:null},element:{tagName:Sg,properties:function(e,t,i,n){var o,s,r,a,l=Sg(e,i.tagName,0,n),c=e.required||{},h=t||{},d=Object.assign({},Ng(e.attributes["*"]),Ng(l&&_g.call(e.attributes,l)?e.attributes[l]:[])),u={};for(r in h)if(_g.call(h,r)){if(_g.call(d,r))o=d[r];else{if(!((a=r).length>4&&"data"===a.slice(0,4).toLowerCase()&&_g.call(d,"data*")))continue;o=d["data*"]}s=h[r],null!=(s=Array.isArray(s)?Lg(e,s,r,o):Eg(e,s,r,o))&&(u[r]=s)}if(l&&_g.call(c,l))for(r in c[l])_g.call(u,r)||(u[r]=c[l][r]);return u},children:yg},text:{value:function(e,t){return"string"==typeof t?t:""}},"*":{data:xg,position:xg}};function Cg(e,t,i){var n,o,s,r,a,l=t&&t.type,c={type:t.type};if(_g.call(bg,l)&&("function"==typeof(o=bg[l])&&(o=o(e,t)),o))for(a in n=!0,s=Object.assign({},o,bg["*"]))_g.call(s,a)&&(!1===(r=s[a](e,t[a],t,i))?(n=null,c[a]=t[a]):null!=r&&(c[a]=r));return n?c:"element"!==c.type||e.strip.includes(c.tagName)?null:c.children}function yg(e,t,i,n){var o,s=[],r=-1;if(Array.isArray(t)){for("element"===i.type&&n.push(i.tagName);++r<t.length;)(o=Cg(e,t[r],n))&&("length"in o?vg.apply(s,o):s.push(o));"element"===i.type&&n.pop()}return s}function wg(){return"html"}function Sg(e,t,i,n){var o="string"==typeof t?t:"",s=-1;if(!o||"*"===o||!e.tagNames.includes(o))return!1;if(_g.call(e.ancestors,o)){for(;++s<e.ancestors[o].length;)if(n.includes(e.ancestors[o][s]))return o;return!1}return o}function kg(e,t){var i="string"==typeof t?t:"",n=i.indexOf("--\x3e");return n<0?i:i.slice(0,n)}function xg(e,t){return t}function Lg(e,t,i,n){for(var o,s=-1,r=[];++s<t.length;)null!=(o=Eg(e,t[s],i,n))&&r.push(o);return r}function Eg(e,t,i,n){if(("boolean"==typeof t||"number"==typeof t||"string"==typeof t)&&function(e,t,i){var n=String(t),o=n.indexOf(":"),s=n.indexOf("?"),r=n.indexOf("#"),a=n.indexOf("/"),l=_g.call(e.protocols,i)?e.protocols[i].concat():[],c=-1;if(0===l.length||o<0||a>-1&&o>a||s>-1&&o>s||r>-1&&o>r)return!0;for(;++c<l.length;)if(o===l[c].length&&n.slice(0,l[c].length)===l[c])return!0;return!1}(e,t,i)&&(0===n.length||n.includes(t)))return e.clobber.includes(i)?e.clobberPrefix+t:t}function Ng(e){for(var t,i={},n=-1;++n<e.length;)t=e[n],Array.isArray(t)?i[t[0]]=t.slice(1):i[t]=[];return i}function Dg(e=fg){return t=>function(e,t){var i,n={type:"root",children:[]};return e&&"object"==typeof e&&e.type&&(i=Cg(Object.assign({},fg,t||{}),e,[]))&&(Array.isArray(i)?1===i.length?n=i[0]:n.children=i:n=i),n}(t,e)}const Tg=os("comment");function Ig(e){var t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}const Ag=Rg(1),Mg=Rg(-1);function Rg(e){return function(t,i,n){const o=t&&t.children;let s=i+e,r=o&&o[s];if(!n)for(;r&&Ig(r);)s+=e,r=o[s];return r}}const Og=os("text");function Pg(e){return Og(e)&&Ig(e.value.charAt(0))}const Fg={}.hasOwnProperty;function Bg(e){return function(t,i,n){return Fg.call(e,t.tagName)&&e[t.tagName](t,i,n)}}const Hg=Bg({html:function(e,t,i){const n=Ag(i,t);return!n||!Tg(n)},head:Wg,body:function(e,t,i){const n=Ag(i,t);return!n||!Tg(n)},p:function(e,t,i){const n=Ag(i,t);return n?ju(n,["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]):!i||!ju(i,["a","audio","del","ins","map","noscript","video"])},li:function(e,t,i){const n=Ag(i,t);return!n||ju(n,"li")},dt:function(e,t,i){const n=Ag(i,t);return n&&ju(n,["dt","dd"])},dd:function(e,t,i){const n=Ag(i,t);return!n||ju(n,["dt","dd"])},rt:Vg,rp:Vg,optgroup:function(e,t,i){const n=Ag(i,t);return!n||ju(n,"optgroup")},option:function(e,t,i){const n=Ag(i,t);return!n||ju(n,["option","optgroup"])},menuitem:function(e,t,i){const n=Ag(i,t);return!n||ju(n,["menuitem","hr","menu"])},colgroup:Wg,caption:Wg,thead:function(e,t,i){const n=Ag(i,t);return n&&ju(n,["tbody","tfoot"])},tbody:function(e,t,i){const n=Ag(i,t);return!n||ju(n,["tbody","tfoot"])},tfoot:function(e,t,i){return!Ag(i,t)},tr:function(e,t,i){const n=Ag(i,t);return!n||ju(n,"tr")},td:zg,th:zg});function Wg(e,t,i){const n=Ag(i,t,!0);return!n||!Tg(n)&&!Pg(n)}function Vg(e,t,i){const n=Ag(i,t);return!n||ju(n,["rp","rt"])}function zg(e,t,i){const n=Ag(i,t);return!n||ju(n,["td","th"])}const Ug=Bg({html:function(e){const t=Ag(e,-1);return!t||!Tg(t)},head:function(e){const t=e.children,i=[];let n,o=-1;for(;++o<t.length;)if(n=t[o],ju(n,["title","base"])){if(i.includes(n.tagName))return!1;i.push(n.tagName)}return t.length>0},body:function(e){const t=Ag(e,-1,!0);return!t||!Tg(t)&&!Pg(t)&&!ju(t,["meta","link","script","style","template"])},colgroup:function(e,t,i){const n=Mg(i,t),o=Ag(e,-1,!0);return(!ju(n,"colgroup")||!Hg(n,i.children.indexOf(n),i))&&(o&&ju(o,"col"))},tbody:function(e,t,i){const n=Mg(i,t),o=Ag(e,-1);return(!ju(n,["thead","tbody"])||!Hg(n,i.children.indexOf(n),i))&&(o&&ju(o,"tr"))}}),jg={opening:Ug,closing:Hg};const Kg=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],qg={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"",Prime:"″",oline:"‾",frasl:"",weierp:"℘",image:"",real:"",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"",lowast:"",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"",cap:"∩",cup:"",int:"∫",there4:"∴",sim:"",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:"",emsp:"",thinsp:"",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"",mdash:"—",lsquo:"",rsquo:"",sbquo:"",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"",rsaquo:"",euro:"€"},$g=["cent","copy","divide","gt","lt","not","para","times"],Gg={}.hasOwnProperty,Qg={};let Yg;for(Yg in qg)Gg.call(qg,Yg)&&(Qg[qg[Yg]]=Yg);function Zg(e,t,i){let n,o=function(e,t,i){const n="&#x"+e.toString(16).toUpperCase();return i&&t&&!/[\dA-Fa-f]/.test(String.fromCharCode(t))?n:n+";"}(e,t,i.omitOptionalSemicolons);if((i.useNamedReferences||i.useShortestReferences)&&(n=function(e,t,i,n){const o=String.fromCharCode(e);if(Gg.call(Qg,o)){const e=Qg[o],s="&"+e;return i&&Kg.includes(e)&&!$g.includes(e)&&(!n||t&&61!==t&&/[^\da-z]/i.test(String.fromCharCode(t)))?s:s+";"}return""}(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!n)&&i.useShortestReferences){const n=function(e,t,i){const n="&#"+String(e);return i&&t&&!/\d/.test(String.fromCharCode(t))?n:n+";"}(e,t,i.omitOptionalSemicolons);n.length<o.length&&(o=n)}return n&&(!i.useShortestReferences||n.length<o.length)?n:o}function Xg(e,t){return function(e,t){return e=e.replace(t.subset?function(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,i),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,i,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(i+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,i);function i(e,i,n){return t.format(e.charCodeAt(0),n.charCodeAt(i+1),t)}}(e,Object.assign({format:Zg},t))}const Jg={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function ep(e,t,i,n){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?Xg(t.value,Object.assign({},e.entities,{subset:["<","&"]})):t.value}const tp={comment:function(e,t){return e.bogusComments?"<?"+Xg(t.value,Object.assign({},e.entities,{subset:[">"]}))+">":"\x3c!--"+t.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,(function(t){return Xg(t,Object.assign({},e.entities,{subset:["<",">"]}))}))+"--\x3e"},doctype:function(e){return"<!"+(e.upperDoctype?"DOCTYPE":"doctype")+(e.tightDoctype?"":" ")+"html>"},element:function(e,t,i,n){const o=e.schema,s="svg"===o.space?void 0:e.omit;let r="svg"===o.space?e.closeEmpty:e.voids.includes(t.tagName.toLowerCase());const a=[];let l;"html"===o.space&&"svg"===t.tagName&&(e.schema=Zr);const c=function(e,t){const i=[];let n,o,s,r=-1;for(n in t)void 0!==t[n]&&null!==t[n]&&(o=sp(e,n,t[n]),o&&i.push(o));for(;++r<i.length;)s=e.tight?i[r].charAt(i[r].length-1):null,r!==i.length-1&&'"'!==s&&"'"!==s&&(i[r]+=" ");return i.join("")}(e,t.properties),h=op(e,"html"===o.space&&"template"===t.tagName?t.content:t);return e.schema=o,h&&(r=!1),!c&&s&&s.opening(t,i,n)||(a.push("<",t.tagName,c?" "+c:""),r&&("svg"===o.space||e.close)&&(l=c.charAt(c.length-1),(!e.tightClose||"/"===l||l&&'"'!==l&&"'"!==l)&&a.push(" "),a.push("/")),a.push(">")),a.push(h),r||s&&s.closing(t,i,n)||a.push("</"+t.tagName+">"),a.join("")},raw:function(e,t,i,n){return e.dangerous?t.value:ep(e,t,0,n)},root:op,text:ep},ip={}.hasOwnProperty;function np(e,t,i,n){if(!t||!t.type)throw new Error("Expected node, not `"+t+"`");if(!ip.call(tp,t.type))throw new Error("Cannot compile unknown node `"+t.type+"`");return tp[t.type](e,t,i,n)}function op(e,t){const i=[],n=t&&t.children||[];let o=-1;for(;++o<n.length;)i[o]=np(e,n[o],o,t);return i.join("")}function sp(e,t,i){const n=ta(e.schema,t);let o,s=e.quote;if(!n.overloadedBoolean||i!==n.attribute&&""!==i?(n.boolean||n.overloadedBoolean&&"string"!=typeof i)&&(i=Boolean(i)):i=!0,null==i||!1===i||"number"==typeof i&&Number.isNaN(i))return"";const r=Xg(n.attribute,Object.assign({},e.entities,{subset:Jg.name["html"===e.schema.space?e.valid:1][e.safe]}));return!0===i?r:(i="object"==typeof i&&"length"in i?(n.commaSeparated?la:ra)(i,{padLeft:!e.tightLists}):String(i),e.collapseEmpty&&!i?r:(e.unquoted&&(o=Xg(i,Object.assign({},e.entities,{subset:Jg.unquoted[e.valid][e.safe],attribute:!0}))),o!==i&&(e.smart&&ns(i,s)>ns(i,e.alternative)&&(s=e.alternative),o=s+Xg(i,Object.assign({},e.entities,{subset:("'"===s?Jg.single:Jg.double)["html"===e.schema.space?e.valid:1][e.safe],attribute:!0}))+s),r+(o?"="+o:o)))}function rp(e){const t=this.data("settings"),i=Object.assign({},t,e);Object.assign(this,{Compiler:function(e){return function(e,t={}){const i=t.quote||'"',n='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return np({valid:t.allowParseErrors?0:1,safe:t.allowDangerousCharacters?0:1,schema:"svg"===t.space?Zr:Yr,omit:t.omitOptionalTags?jg:void 0,quote:i,alternative:n,smart:t.quoteSmart,unquoted:t.preferUnquoted,tight:t.tightAttributes,upperDoctype:t.upperDoctype,tightDoctype:t.tightDoctype,bogusComments:t.bogusComments,tightLists:t.tightCommaSeparatedLists,tightClose:t.tightSelfClosing,collapseEmpty:t.collapseEmptyAttributes,dangerous:t.allowDangerousHtml,voids:t.voids||Ua.concat(),entities:t.entities||{},close:t.closeSelfClosing,closeEmpty:t.closeEmptyElements},Array.isArray(e)?{type:"root",children:e}:e,null,null)}(e,i)}})}var ap={inline:["$","$"],display:["$$","$$"]};document.addEventListener("copy",(function(e){var t=window.getSelection();if(!t.isCollapsed){var i=t.getRangeAt(0).cloneContents();if(i.querySelector(".katex-mathml")){for(var n=[],o=0;o<i.childNodes.length;o++)n.push(i.childNodes[o].outerHTML);e.clipboardData.setData("text/html",n.join("")),e.clipboardData.setData("text/plain",function(e,t){void 0===t&&(t=ap);for(var i=e.querySelectorAll(".katex-mathml + .katex-html"),n=0;n<i.length;n++){var o=i[n];o.remove?o.remove(null):o.parentNode.removeChild(o)}for(var s=e.querySelectorAll(".katex-mathml"),r=0;r<s.length;r++){var a=s[r],l=a.querySelector("annotation");l&&(a.replaceWith?a.replaceWith(l):a.parentNode.replaceChild(l,a),l.innerHTML=t.inline[0]+l.innerHTML+t.inline[1])}for(var c=e.querySelectorAll(".katex-display annotation"),h=0;h<c.length;h++){var d=c[h];d.innerHTML=t.display[0]+d.innerHTML.substr(t.inline[0].length,d.innerHTML.length-t.inline[0].length-t.inline[1].length)+t.display[1]}return e}(i).textContent),e.preventDefault()}}}));var lp=o(1593);function cp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hp(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?hp(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hp(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}o(94565);var dp={autoFormatTriggerCharacters:["\n"],provideOnTypeFormattingEdits:function(e,t,i,n,o){return"\n"===i?function(e,t){var i=e.getLinesContent(),n=t.lineNumber-1,o=i[n],s=up(i[n-1]);if(function(e,t){var i=e[t-1],n=up(i),o=gp(i);if("do"===pp(o)||o.includes("fn")&&"->"===pp(o)){var s=e.slice(t+1).filter((function(e){return!mp(e)})).find((function(e){return up(e)===n}));if(s){var r=cp(gp(s),1)[0];if(["after","else","catch","rescue","end"].includes(r))return!1}return!0}return!1}(i,n)){var r=t.lineNumber<i.length&&mp(o);if(!r)return[];var a=function(e,t,i){return i?{range:new Up.Range(e.lineNumber+1,1,e.lineNumber+1,1),text:"".concat(t,"end\n")}:{range:new Up.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:"\n".concat(t,"end")}}(t,s,r);return[a]}return[]}(e,t):[]}};function up(e){return cp(e.match(/^\s*/),1)[0]}function gp(e){return e.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function pp(e){return e[e.length-1]}function mp(e){return""===e.trim()}const fp=dp;function _p(e){return _p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_p(e)}function vp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function bp(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vp(Object(i),!0).forEach((function(t){Cp(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):vp(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Cp(e,t,i){return(t=function(e){var t=function(e,t){if("object"!==_p(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==_p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===_p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var yp="#c4cad6",wp="#e06c75",Sp="#61afef",kp="#98c379",xp="#c678dd",Lp="#56b6c2",Ep="#d19a66",Np={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:yp},{token:"variable",foreground:wp},{token:"constant",foreground:Sp},{token:"constant.character.escape",foreground:Sp},{token:"comment",foreground:"#8c92a3"},{token:"number",foreground:Sp},{token:"regexp",foreground:wp},{token:"type",foreground:wp},{token:"string",foreground:kp},{token:"keyword",foreground:xp},{token:"operator",foreground:Ep},{token:"delimiter.bracket.embed",foreground:"#be5046"},{token:"sigil",foreground:Lp},{token:"function",foreground:Sp},{token:"function.call",foreground:yp},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"keyword.md",foreground:wp},{token:"keyword.table",foreground:wp},{token:"string.link.md",foreground:Sp},{token:"variable.md",foreground:Lp},{token:"string.md",foreground:yp},{token:"variable.source.md",foreground:yp},{token:"tag",foreground:wp},{token:"metatag",foreground:wp},{token:"attribute.name",foreground:Ep},{token:"attribute.value",foreground:kp},{token:"string.key",foreground:wp},{token:"keyword.json",foreground:Sp},{token:"operator.sql",foreground:xp}],colors:{"editor.background":"#282c34","editor.foreground":yp,"editorLineNumber.foreground":"#636d83","editorCursor.foreground":"#636d83","editor.selectionBackground":"#3e4451","editor.findMatchHighlightBackground":"#528bff3D","editorSuggestWidget.background":"#21252b","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","input.background":"#1b1d23","input.border":"#181a1f","editorBracketMatch.border":"#282c34","editorBracketMatch.background":"#3e4451"}},Dp=bp(bp({},Np),{},{colors:bp(bp({},Np.colors),{},{"editor.background":"#060708"})}),Tp=o(89676);function Ip(e){return Ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ip(e)}function Ap(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Mp(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ap(Object(i),!0).forEach((function(t){Rp(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ap(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Rp(e,t,i){return(t=Pp(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Op(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pp(n.key),n)}}function Pp(e){var t=function(e,t){if("object"!==Ip(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==Ip(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Ip(t)?t:String(t)}var Fp="settings",Bp="default",Hp="highContrast",Wp={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:14,editor_theme:Bp,editor_markdown_word_wrap:!0},Vp=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._subscribers=[],this._settings=Wp,this._loadSettings()}var t,i;return t=e,(i=[{key:"get",value:function(){return this._settings}},{key:"update",value:function(e){var t=this,i=this._settings;this._settings=Mp(Mp({},this._settings),e),this._subscribers.forEach((function(e){return e(t._settings,i)})),this._storeSettings()}},{key:"getAndSubscribe",value:function(e){this._subscribers.push(e),e(this._settings)}},{key:"_loadSettings",value:function(){var e=lt(Fp);e&&(this._settings=Mp(Mp({},this._settings),e))}},{key:"_storeSettings",value:function(){ct(Fp,this._settings)}}])&&Op(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}());if(!Tp.M.prototype.finish)throw new Error("failed to override line endings to LF");var zp=Tp.M.prototype.finish;Tp.M.prototype.finish=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=zp.apply(this,t);if(!n._getEOL)throw new Error("failed to override line endings to LF");return n._getEOL=function(e){return"\n"},n},lp.languages.registerOnTypeFormattingEditProvider("elixir",fp),lp.editor.defineTheme("default",Np),lp.editor.defineTheme("highContrast",Dp),document.fonts.addEventListener("loadingdone",(function(e){e.fontfaces.some((function(e){return e.family.includes("JetBrains Mono")}))&&lp.editor.remeasureFonts()})),lp.languages.registerCompletionItemProvider("elixir",{provideCompletionItems:function(e,t,i,n){return e.__getCompletionItems__?e.__getCompletionItems__(e,t):null}}),lp.languages.registerHoverProvider("elixir",{provideHover:function(e,t,i){return e.__getHover__?e.__getHover__(e,t):null}}),lp.languages.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:function(e,t,i,n){return e.__getSignatureHelp__?e.__getSignatureHelp__(e,t):null}}),lp.languages.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:function(e,t,i){return e.__getDocumentFormattingEdits__?e.__getDocumentFormattingEdits__(e):null}});const Up=lp;function jp(e,t){if(!jp.initialized){var i=Vp.get();lp.editor.create(document.createElement("div"),{theme:i.editor_theme}),jp.initialized=!0}return lp.editor.colorize(e,t).then((function(e){return e.replace(/<br\/>$/,"")}))}function Kp(e){return Kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kp(e)}function qp(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$p(n.key),n)}}function $p(e){var t=function(e,t){if("object"!==Kp(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==Kp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Kp(t)?t:String(t)}var Gp=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.size=t,this.cache=new Map}var t,i;return t=e,i=[{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}}},{key:"set",value:function(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size===this.size){var i=this.cache.keys().next().value;this.cache.delete(i)}this.cache.set(e,t)}}],i&&qp(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Qp=0,Yp=!1,Zp=new Gp(25);function Xp(e){return function(e){if(Array.isArray(e))return om(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function em(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Jp(Object(i),!0).forEach((function(t){tm(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Jp(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function tm(e,t,i){return(t=am(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function im(e){return im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},im(e)}function nm(e,t){if(e){if("string"==typeof e)return om(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?om(e,t):void 0}}function om(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,am(n.key),n)}}function am(e){var t=function(e,t){if("object"!==im(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==im(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===im(t)?t:String(t)}var lm=function(){function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.baseUrl,s=void 0===o?null:o,r=n.emptyText,a=void 0===r?"":r,l=n.allowedUriSchemes,c=void 0===l?[]:l;sm(this,e),this.container=t,this.content=i,this.baseUrl=s,this.emptyText=a,this.allowedUriSchemes=c,this._render()}var t,i;return t=e,i=[{key:"setContent",value:function(e){this.content=e,this._render()}},{key:"_render",value:function(){var e=this;this._getHtml().then((function(t){var i="<div>".concat(t,"</div>");ii(e.container,i,{childrenOnly:!0}),e._fixMermaidSpacing()}))}},{key:"_getHtml",value:function(){var e,t=this;return xi().use(xo).use(qs).use(Xs).use(gm).use(hm,{highlight:jp}).use(wr,{allowDangerousHtml:!0}).use(Qa).use(dm,{baseUrl:this.baseUrl}).use(Dg,(e=this.allowedUriSchemes,em(em({},fg),{},{attributes:em(em({},fg.attributes),{},{"*":[].concat(Xp(fg.attributes["*"]||[]),["className","style"])}),protocols:em(em({},fg.protocols),{},{href:[].concat(Xp(fg.protocols.href),Xp(e))})}))).use(mg).use(pm).use(mm,{baseUrl:this.baseUrl}).use(rp).process(this.content).then((function(e){return String(e)})).catch((function(e){console.error("Failed to render markdown, reason: ".concat(e.message))})).then((function(e){return e||'\n <div class="text-gray-300">\n '.concat(t.emptyText,"\n </div>\n ")}))}},{key:"_fixMermaidSpacing",value:function(){var e,t=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=nm(e))){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){a=!0,s=e},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}(this.container.querySelectorAll(".mermaid svg"));try{for(t.s();!(e=t.n()).done;)e.value.removeAttribute("height")}catch(e){t.e(e)}finally{t.f()}}}],i&&rm(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();const cm=lm;function hm(e){return function(t){var i=[];return er(t,"code",(function(t){if(t.lang){var n=function(e){t.type="html",t.value="<pre><code>".concat(e,"</code></pre>")},o=e.highlight(t.value,t.lang);if(o&&"function"==typeof o.then){var s=Promise.resolve(o).then(n);i.push(s)}else n(o)}})),Promise.all(i).then((function(){return null}))}}function dm(e){return function(t){e.baseUrl&&er(t,"element",(function(t){if("a"===t.tagName&&t.properties){var i=t.properties.href;!i||fm(i)||_m(i)||function(e){return e.startsWith("#")}(i)||(t.properties.href=vm(e.baseUrl,i))}if("img"===t.tagName&&t.properties){var n=t.properties.src;!n||fm(n)||_m(n)||(t.properties.src=vm(e.baseUrl,n))}})),er(t,"element",(function(e){"a"===e.tagName&&e.properties&&e.properties.href&&(e.properties.href=e.properties.href.split("/").map((function(e){return".."===e?"__parent__":e})).join("/"))}))}}var um=xi().use(dg,{fragment:!0});function gm(e){return function(e){er(e,"code",(function(e,t,i){"mermaid"===e.lang&&(e.type="html",e.value='\n <div class="mermaid">'.concat(function(e){return(e||"").replace(/[&<>"']/g,(function(e){return Pt[e]}))}(e.value),"</div>\n "))}))}}function pm(t){return function(t){var i=[];return er(t,"element",(function(t){if((t.properties&&Array.isArray(t.properties.className)?t.properties.className:[]).includes("mermaid")){var n=function(t){var i=At(t),n=Zp.get(i);return n?Promise.resolve(n):Promise.all([o.e(121),o.e(552)]).then(o.bind(o,76637)).then((function(e){var t=e.default;return Yp||(t.initialize({startOnLoad:!1}),Yp=!0),t})).then((function(n){return function(e){var t="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/".concat("5.15.4","/css/all.min.css");if(e.includes("fa:")&&!document.querySelector('link[href="'.concat(t,'"]'))){var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.href=t,document.head.appendChild(i)}}(t),n.renderAsync("mermaid-graph-".concat(Qp++),t).then((function(e){return Zp.set(i,e),e})).catch((function(t){return'<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span>\n'.concat(e.message,"</div>")}))}))}(ng(t,{whitespace:"pre"})).then((function(e){t.children=Uu(um.parse(e),!0).children}));i.push(n)}})),Promise.all(i).then((function(){return null}))}}function mm(e){return function(t){er(t,"element",(function(t){if(t.properties&&t.properties.href){var i=t.properties.href;_m(i)?(t.properties["data-phx-link"]=e.baseUrl&&i.startsWith(e.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):fm(i)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}}))}}function fm(e){return/^(?:[a-z]+:)?\/\//i.test(e)}function _m(e){return e.startsWith("/")||e.startsWith(window.location.origin)}function vm(e,t){return e.replace(/\/$/,"")+"/"+t}function bm(e){return bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bm(e)}function Cm(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ym(n.key),n)}}function ym(e){var t=function(e,t){if("object"!==bm(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==bm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===bm(t)?t:String(t)}var wm=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.subscribersByTopic={}}var t,i;return t=e,(i=[{key:"subscribe",value:function(e,t){var i=this;return Array.isArray(this.subscribersByTopic[e])||(this.subscribersByTopic[e]=[]),this.subscribersByTopic[e].push(t),function(){i.unsubscribe(e,t)}}},{key:"unsubscribe",value:function(e,t){var i=this.subscribersByTopic[e].indexOf(t);-1!==i&&this.subscribersByTopic[e].splice(i,1)}},{key:"broadcast",value:function(e,t){Array.isArray(this.subscribersByTopic[e])&&this.subscribersByTopic[e].forEach((function(e){e(t)}))}}])&&Cm(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}());let Sm=e=>"object"==typeof e&&null!=e&&1===e.nodeType,km=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,xm=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let i=getComputedStyle(e,null);return km(i.overflowY,t)||km(i.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Lm=(e,t,i,n,o,s,r,a)=>s<e&&r>t||s>e&&r<t?0:s<=e&&a<=i||r>=t&&a>=i?s-e-n:r>t&&a<i||s<e&&a>i?r-t+o:0,Em=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var Nm=(e,t)=>{var i,n,o,s,r,a;if("undefined"==typeof document)return[];let{scrollMode:l,block:c,inline:h,boundary:d,skipOverflowHiddenElements:u}=t,g="function"==typeof d?d:e=>e!==d;if(!Sm(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,m=[],f=e;for(;Sm(f)&&g(f);){if(f=Em(f),f===p){m.push(f);break}null!=f&&f===document.body&&xm(f)&&!xm(document.documentElement)||null!=f&&xm(f,u)&&m.push(f)}let _=null!=(n=null==(i=window.visualViewport)?void 0:i.width)?n:innerWidth,v=null!=(s=null==(o=window.visualViewport)?void 0:o.height)?s:innerHeight,b=null!=(r=window.scrollX)?r:pageXOffset,C=null!=(a=window.scrollY)?a:pageYOffset,{height:y,width:w,top:S,right:k,bottom:x,left:L}=e.getBoundingClientRect(),E="start"===c||"nearest"===c?S:"end"===c?x:S+y/2,N="center"===h?L+w/2:"end"===h?k:L,D=[];for(let e=0;e<m.length;e++){let t=m[e],{height:i,width:n,top:o,right:s,bottom:r,left:a}=t.getBoundingClientRect();if("if-needed"===l&&S>=0&&L>=0&&x<=v&&k<=_&&S>=o&&x<=r&&L>=a&&k<=s)return D;let d=getComputedStyle(t),u=parseInt(d.borderLeftWidth,10),g=parseInt(d.borderTopWidth,10),f=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10),I=0,A=0,M="offsetWidth"in t?t.offsetWidth-t.clientWidth-u-f:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-g-T:0,O="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,P="offsetHeight"in t?0===t.offsetHeight?0:i/t.offsetHeight:0;if(p===t)I="start"===c?E:"end"===c?E-v:"nearest"===c?Lm(C,C+v,v,g,T,C+E,C+E+y,y):E-v/2,A="start"===h?N:"center"===h?N-_/2:"end"===h?N-_:Lm(b,b+_,_,u,f,b+N,b+N+w,w),I=Math.max(0,I+C),A=Math.max(0,A+b);else{I="start"===c?E-o-g:"end"===c?E-r+T+R:"nearest"===c?Lm(o,r,i,g,T+R,E,E+y,y):E-(o+i/2)+R/2,A="start"===h?N-a-u:"center"===h?N-(a+n/2)+M/2:"end"===h?N-s+f+M:Lm(a,s,n,u,f+M,N,N+w,w);let{scrollLeft:e,scrollTop:l}=t;I=Math.max(0,Math.min(l+I/P,t.scrollHeight-i/P+R)),A=Math.max(0,Math.min(e+A/O,t.scrollWidth-n/O+M)),E+=l-I,N+=e-A}D.push({el:t,top:I,left:A})}return D};function Dm(e){return["code","smart","setup"].includes(e)}function Tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Im={mounted:function(){var e=this;this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.liveEditors={},this.updateInsertModeAvailability(),"code"===this.props.type&&this.el.querySelector("[data-el-amplify-outputs-button]").addEventListener("click",(function(t){e.el.toggleAttribute("data-js-amplified")})),"smart"===this.props.type&&this.el.querySelector("[data-el-toggle-source-button]").addEventListener("click",(function(t){e.el.toggleAttribute("data-js-source-visible"),e.updateInsertModeAvailability(),e.maybeFocusCurrentEditor()})),this.el.addEventListener("lb:cell:editor_created",(function(t){var i=t.detail,n=i.tag,o=i.liveEditor;e.handleCellEditorCreated(n,o)})),this.el.addEventListener("lb:cell:editor_removed",(function(t){var i=t.detail.tag;e.handleCellEditorRemoved(i)})),this.el.addEventListener("mouseenter",(function(t){e.el.setAttribute("data-js-hover","")})),this.el.addEventListener("mouseleave",(function(t){e.el.removeAttribute("data-js-hover")})),this.unsubscribeFromNavigationEvents=wm.subscribe("navigation",(function(t){return e.handleNavigationEvent(t)})),this.unsubscribeFromCellsEvents=wm.subscribe("cells",(function(t){return e.handleCellsEvent(t)})),this.unsubscribeFromCellEvents=wm.subscribe("cells:".concat(this.props.cellId),(function(t){return e.handleCellEvent(t)}))},disconnected:function(){this.el.removeAttribute("id")},destroyed:function(){this.unsubscribeFromNavigationEvents(),this.unsubscribeFromCellsEvents(),this.unsubscribeFromCellEvents()},updated:function(){var e=this.props;this.props=this.getProps(),this.props.evaluationDigest!==e.evaluationDigest&&this.updateChangeIndicator()},getProps:function(){return{cellId:gt(this.el,"data-cell-id"),type:gt(this.el,"data-type"),sessionPath:gt(this.el,"data-session-path"),evaluationDigest:pt(this.el,"data-evaluation-digest",null),smartCellJSViewRef:pt(this.el,"data-smart-cell-js-view-ref",null),allowedUriSchemes:gt(this.el,"data-allowed-uri-schemes")}},handleNavigationEvent:function(e){"element_focused"===e.type?this.handleElementFocused(e.focusableId,e.scroll):"insert_mode_changed"===e.type?this.handleInsertModeChanged(e.enabled):"location_report"===e.type&&this.handleLocationReport(e.client,e.report)},handleCellsEvent:function(e){"cell_moved"===e.type?this.handleCellMoved(e.cellId):"cell_upload"===e.type&&this.handleCellUpload(e.cellId,e.url)},handleCellEvent:function(e){"dispatch_queue_evaluation"===e.type&&this.handleDispatchQueueEvaluation(e.dispatch)},handleElementFocused:function(e,t){this.props.cellId===e?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),t&&Nt(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleCellEditorCreated:function(e,t){var i=this;if(this.liveEditors[e]=t,this.updateInsertModeAvailability(),"markdown"!==this.props.type&&setTimeout((function(){t.isMounted()||t.mount()}),0),t===this.currentEditor()&&this.maybeFocusCurrentEditor(!0),t.onBlur((function(){i.isFocused&&i.insertMode&&i.currentEditor().focus()})),t.onCursorSelectionChange((function(e){i.broadcastSelection(e)})),"primary"===e){var n=t.getSource();if(this.el.toggleAttribute("data-js-empty",""===n),t.onChange((function(e){i.el.toggleAttribute("data-js-empty",""===e)})),"markdown"===this.props.type){var o=this.el.querySelector("[data-el-markdown-container]"),s=new cm(o,n,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes.split(",")});t.onChange((function(e){s.setContent(e)}))}Dm(this.props.type)&&(this.updateChangeIndicator(),t.onChange((function(e){i.updateChangeIndicator()})),this.handleEvent("evaluation_finished:".concat(this.props.cellId),(function(e){var i=e.code_error;t.setCodeErrorMarker(i)})))}},handleCellEditorRemoved:function(e){delete this.liveEditors[e]},currentEditor:function(){return this.liveEditors[this.currentEditorTag()]},currentEditorTag:function(){return"smart"===this.props.type?this.el.hasAttribute("data-js-source-visible")?"primary":"secondary":"primary"},updateInsertModeAvailability:function(){this.el.toggleAttribute("data-js-insert-mode-disabled",!this.currentEditor())},maybeFocusCurrentEditor:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isFocused&&this.insertMode&&(this.currentEditor().focus(),e&&Nt(this.el),this.broadcastSelection())},updateChangeIndicator:function(){var e=this.el.querySelector("[data-el-cell-status]");if(e&&e.querySelector("[data-el-change-indicator]")&&this.props.evaluationDigest){var t=At(this.liveEditors.primary.getSource()),i=this.props.evaluationDigest!==t;this.el.toggleAttribute("data-js-changed",i)}},handleInsertModeChanged:function(e){this.isFocused&&!this.insertMode&&e?(this.insertMode=e,this.currentEditor()&&(this.currentEditor().focus(),setTimeout((function(){!function(e,t){let i=e.isConnected||e.ownerDocument.documentElement.contains(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(i?Nm(e,t):[]);if(!i)return;let n=(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t),o=Nm(e,n),s="scrollBehavior"in document.body.style;o.forEach((e=>{let{el:t,top:i,left:o}=e;t.scroll&&s?t.scroll({top:i,left:o,behavior:n.behavior}):(t.scrollTop=i,t.scrollLeft=o)}))}(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}),0),this.broadcastSelection())):this.insertMode&&!e&&(this.insertMode=e,this.currentEditor()&&this.currentEditor().blur())},handleCellMoved:function(e){this.isFocused&&e===this.props.cellId&&Nt(this.el)},handleCellUpload:function(e,t){var i=this.liveEditors.primary;if(i&&this.props.cellId===e){var n="![](".concat(t,")");i.insert(n)}},handleDispatchQueueEvaluation:function(e){"smart"===this.props.type&&this.props.smartCellJSViewRef?wm.broadcast("js_views:".concat(this.props.smartCellJSViewRef),{type:"sync",callback:e}):e()},handleLocationReport:function(e,t){var i=this;Object.entries(this.liveEditors).forEach((function(n){var o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tm(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Tm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n,2),s=o[0],r=o[1];i.props.cellId===t.focusableId&&t.selection&&t.selection.tag===s?r.updateUserSelection(e,t.selection.editorSelection):r.removeUserSelection(e)}))},broadcastSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e=e||this.currentEditor().editor.getSelection();var t=this.currentEditorTag();this.isFocused&&this.insertMode&&wm.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:t,editorSelection:e}})}};const Am=Im;var Mm=function(e,t,i){for(var n=i,o=0,s=e.length;n<t.length;){var r=t[n];if(o<=0&&t.slice(n,n+s)===e)return n;"\\"===r?n++:"{"===r?o++:"}"===r&&o--,n++}return-1},Rm=/^\\begin{/,Om=function(e,t){var i=function(e,t){for(var i,n=[],o=new RegExp("("+t.map((e=>function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.left))).join("|")+")");-1!==(i=e.search(o));){i>0&&(n.push({type:"text",data:e.slice(0,i)}),e=e.slice(i));var s=t.findIndex((t=>e.startsWith(t.left)));if(-1===(i=Mm(t[s].right,e,t[s].left.length)))break;var r=e.slice(0,i+t[s].right.length),a=Rm.test(r)?r:e.slice(t[s].left.length,i);n.push({type:"math",data:a,rawData:r,display:t[s].display}),e=e.slice(i+t[s].right.length)}return""!==e&&n.push({type:"text",data:e}),n}(e,t.delimiters);if(1===i.length&&"text"===i[0].type)return null;for(var n=document.createDocumentFragment(),o=0;o<i.length;o++)if("text"===i[o].type)n.appendChild(document.createTextNode(i[o].data));else{var s=document.createElement("span"),r=i[o].data;t.displayMode=i[o].display;try{t.preProcess&&(r=t.preProcess(r)),zu.render(r,s,t)}catch(e){if(!(e instanceof zu.ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+i[o].data+"` with ",e),n.appendChild(document.createTextNode(i[o].rawData));continue}n.appendChild(s)}return n},Pm=function e(t,i){for(var n=0;n<t.childNodes.length;n++){var o=t.childNodes[n];if(3===o.nodeType){var s=Om(o.textContent,i);s&&(n+=s.childNodes.length-1,t.replaceChild(s,o))}else 1===o.nodeType&&function(){var t=" "+o.className+" ",n=-1===i.ignoredTags.indexOf(o.nodeName.toLowerCase())&&i.ignoredClasses.every((e=>-1===t.indexOf(" "+e+" ")));n&&e(o,i)}()}},Fm=function(e,t){if(!e)throw new Error("No element provided to render");var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.delimiters=i.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],i.ignoredTags=i.ignoredTags||["script","noscript","style","textarea","pre","code","option"],i.ignoredClasses=i.ignoredClasses||[],i.errorCallback=i.errorCallback||console.error,i.macros=i.macros||{},Pm(e,i)};function Bm(e){return Bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bm(e)}function Hm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zm(n.key),n)}}function Vm(e,t,i){return t&&Wm(e.prototype,t),i&&Wm(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function zm(e){var t=function(e,t){if("object"!==Bm(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==Bm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Bm(t)?t:String(t)}var Um=function(){function e(t,i){var n=this;Hm(this,e),this.serverAdapter=t,this.revision=i,this.state=new jm(this),this._onDelta=null,this.serverAdapter.onDelta((function(e){n._handleServerDelta(e)})),this.serverAdapter.onAcknowledgement((function(){n._handleServerAcknowledgement()}))}return Vm(e,[{key:"setEditorAdapter",value:function(e){var t=this;this.editorAdapter=e,this.editorAdapter.onDelta((function(e){t._handleClientDelta(e),t._emitDelta(e)}))}},{key:"onDelta",value:function(e){this._onDelta=e}},{key:"_emitDelta",value:function(e){this._onDelta&&this._onDelta(e)}},{key:"_handleClientDelta",value:function(e){this.state=this.state.onClientDelta(e)}},{key:"_handleServerDelta",value:function(e){this.revision++,this.state=this.state.onServerDelta(e)}},{key:"_handleServerAcknowledgement",value:function(){this.revision++,this.state=this.state.onServerAcknowledgement()}},{key:"applyDelta",value:function(e){this.editorAdapter&&this.editorAdapter.applyDelta(e),this._emitDelta(e)}},{key:"sendDelta",value:function(e){this.serverAdapter.sendDelta(e,this.revision+1)}},{key:"reportCurrentRevision",value:function(){this.serverAdapter.reportRevision(this.revision)}}]),e}(),jm=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;Hm(this,e),this.client=t,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=i}return Vm(e,[{key:"onClientDelta",value:function(e){return null!==this.reportRevisionTimeoutId&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new Km(this.client,e)}},{key:"onServerDelta",value:function(e){var t=this;return this.client.applyDelta(e),null===this.reportRevisionTimeoutId&&(this.reportRevisionTimeoutId=setTimeout((function(){t.client.reportCurrentRevision(),t.reportRevisionTimeoutId=null}),this.reportRevisionTimeout)),this}},{key:"onServerAcknowledgement",value:function(){throw new Error("Unexpected server acknowledgement.")}}]),e}(),Km=function(){function e(t,i){Hm(this,e),this.client=t,this.awaitedDelta=i}return Vm(e,[{key:"onClientDelta",value:function(e){return new qm(this.client,this.awaitedDelta,e)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right");this.client.applyDelta(i);var n=t.transform(this.awaitedDelta,"left");return new e(this.client,n)}},{key:"onServerAcknowledgement",value:function(){return new jm(this.client)}}]),e}(),qm=function(){function e(t,i,n){Hm(this,e),this.client=t,this.awaitedDelta=i,this.buffer=n}return Vm(e,[{key:"onClientDelta",value:function(t){var i=this.buffer.compose(t);return new e(this.client,this.awaitedDelta,i)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right"),n=this.buffer.transform(i,"right");this.client.applyDelta(n);var o=t.transform(this.awaitedDelta,"left"),s=i.transform(this.buffer,"left");return new e(this.client,o,s)}},{key:"onServerAcknowledgement",value:function(){return this.client.sendDelta(this.buffer),new Km(this.client,this.buffer)}}]),e}();function $m(e){return $m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$m(e)}function Gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qm(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zm(n.key),n)}}function Ym(e,t,i){return t&&Qm(e.prototype,t),i&&Qm(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zm(e){var t=function(e,t){if("object"!==$m(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==$m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===$m(t)?t:String(t)}var Xm=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Gm(this,e),this.ops=t}return Ym(e,[{key:"retain",value:function(e){return e<=0?this:this.append({retain:e})}},{key:"insert",value:function(e){return""===e?this:this.append({insert:e})}},{key:"delete",value:function(e){return e<=0?this:this.append({delete:e})}},{key:"append",value:function(e){if(0===this.ops.length)return this.ops.push(e),this;var t=this.ops.pop();return tf(e)&&of(t)?this.append(e).append(t):tf(e)&&tf(t)?(this.ops.push({insert:t.insert+e.insert}),this):of(e)&&of(t)?(this.ops.push({delete:t.delete+e.delete}),this):nf(e)&&nf(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}},{key:"compose",value:function(t){for(var i=new Jm(this.ops),n=new Jm(t.ops),o=new e;i.hasNext()||n.hasNext();)if(tf(n.peek()))o.append(n.next());else if(of(i.peek()))o.append(i.next());else{var s=Math.min(i.peekLength(),n.peekLength()),r=i.next(s),a=n.next(s);nf(a)?o.append(r):of(a)&&nf(r)&&o.append(a)}return o._trim()}},{key:"transform",value:function(t,i){if("left"!==i&&"right"!==i)throw new Error('Invalid priority "'.concat(i,'", should be either "left" or "right"'));for(var n=new Jm(this.ops),o=new Jm(t.ops),s=new e;n.hasNext()||o.hasNext();)if(!tf(n.peek())||tf(o.peek())&&"left"!==i)if(tf(o.peek()))s.append(o.next());else{var r=Math.min(n.peekLength(),o.peekLength()),a=n.next(r),l=o.next(r);if(of(a))continue;of(l)?s.append(l):s.retain(r)}else{var c=ef(n.next());s.retain(c)}return s._trim()}},{key:"_trim",value:function(){return this.ops.length>0&&nf(this.ops[this.ops.length-1])&&this.ops.pop(),this}},{key:"toCompressed",value:function(){return this.ops.map((function(e){if(tf(e))return e.insert;if(nf(e))return e.retain;if(of(e))return-e.delete;throw new Error("Invalid operation ".concat(e))}))}},{key:"applyToString",value:function(e){var t="",i=0;return this.ops.forEach((function(n){nf(n)&&(t+=e.slice(i,i+n.retain),i+=n.retain),tf(n)&&(t+=n.insert),of(n)&&(i+=n.delete)})),t+=e.slice(i)}}],[{key:"fromCompressed",value:function(e){return e.reduce((function(e,t){if("string"==typeof t)return e.insert(t);if("number"==typeof t&&t>=0)return e.retain(t);if("number"==typeof t&&t<0)return e.delete(-t);throw new Error("Invalid compressed operation ".concat(t))}),new this)}}]),e}(),Jm=function(){function e(t){Gm(this,e),this.ops=t,this.index=0,this.offset=0}return Ym(e,[{key:"hasNext",value:function(){return this.peekLength()<1/0}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=this.ops[this.index];if(!t)return{retain:e};var i=this.offset,n=ef(t);return e>=n-i?(e=n-i,this.index+=1,this.offset=0):this.offset+=e,of(t)?{delete:e}:nf(t)?{retain:e}:tf(t)?{insert:t.insert.substr(i,e)}:void 0}},{key:"peek",value:function(){return this.ops[this.index]||{retain:1/0}}},{key:"peekLength",value:function(){return this.ops[this.index]?ef(this.ops[this.index])-this.offset:1/0}}]),e}();function ef(e){return tf(e)?e.insert.length:nf(e)?e.retain:of(e)?e.delete:void 0}function tf(e){return"string"==typeof e.insert}function nf(e){return"number"==typeof e.retain}function of(e){return"number"==typeof e.delete}function sf(e){return sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sf(e)}function rf(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,af(n.key),n)}}function af(e){var t=function(e,t){if("object"!==sf(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===sf(t)?t:String(t)}var lf=function(){function e(t){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=t,this._onDelta=null,this.isLastChangeRemote=!1,this.editor.onDidChangeModelContent((function(e){if(!i.ignoreChange){i.isLastChangeRemote=!1;var t=i._deltaFromEditorChange(e);i._onDelta&&i._onDelta(t)}}))}var t,i;return t=e,i=[{key:"onDelta",value:function(e){this._onDelta=e}},{key:"applyDelta",value:function(e){var t=e.ops.some((function(e){return!!of(e)||!!tf(e)&&e.insert.match(/\s+/)}));t||!this.isLastChangeRemote?this.editor.getModel().pushStackElement():this.editor.getModel().popStackElement();var i=this._deltaToEditorOperations(e);this.ignoreChange=!0,this.editor.getModel().pushEditOperations(null,i,null),this.editor.getModel().pushStackElement(),this.ignoreChange=!1,this.isLastChangeRemote=!0}},{key:"_deltaFromEditorChange",value:function(e){return e.changes.map((function(e){var t=e.rangeOffset,i=e.rangeLength,n=e.text,o=new Xm;return t&&o.retain(t),i&&o.delete(i),n&&o.insert(n),o})).reduce((function(e,t){return e.compose(t)}))}},{key:"_deltaToEditorOperations",value:function(e){var t=this.editor.getModel(),i=[],n=0;return e.ops.forEach((function(e){if(nf(e)&&(n+=e.retain),tf(e)){var o=t.getPositionAt(n);i.push({forceMoveMarkers:!0,range:new Up.Range(o.lineNumber,o.column,o.lineNumber,o.column),text:e.insert})}if(of(e)){var s=t.getPositionAt(n),r=t.getPositionAt(n+e.delete);i.push({forceMoveMarkers:!1,range:new Up.Range(s.lineNumber,s.column,r.lineNumber,r.column),text:null}),n+=e.delete}})),i}}],i&&rf(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function cf(e){return cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cf(e)}function hf(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,df(n.key),n)}}function df(e){var t=function(e,t){if("object"!==cf(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===cf(t)?t:String(t)}var uf=function(){function e(t,i,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hook=t,this.cellId=i,this.tag=n,this._onDelta=null,this._onAcknowledgement=null,this.hook.handleEvent("cell_delta:".concat(this.cellId,":").concat(this.tag),(function(e){var t=e.delta;o._onDelta&&o._onDelta(Xm.fromCompressed(t))})),this.hook.handleEvent("cell_acknowledgement:".concat(this.cellId,":").concat(this.tag),(function(){o._onAcknowledgement&&o._onAcknowledgement()}))}var t,i;return t=e,(i=[{key:"onDelta",value:function(e){this._onDelta=e}},{key:"onAcknowledgement",value:function(e){this._onAcknowledgement=e}},{key:"sendDelta",value:function(e,t){this.hook.pushEvent("apply_cell_delta",{cell_id:this.cellId,tag:this.tag,delta:e.toCompressed(),revision:t})}},{key:"reportRevision",value:function(e){this.hook.pushEvent("report_cell_revision",{cell_id:this.cellId,tag:this.tag,revision:e})}}])&&hf(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gf(e){return gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gf(e)}function pf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mf(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_f(n.key),n)}}function ff(e,t,i){return t&&mf(e.prototype,t),i&&mf(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function _f(e){var t=function(e,t){if("object"!==gf(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===gf(t)?t:String(t)}var vf=function(){function e(t,i,n,o){pf(this,e),this._cursorWidget=new bf(t,i.getPosition(),n,o),this._selectionDecoration=new Cf(t,i,n)}return ff(e,[{key:"update",value:function(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}},{key:"dispose",value:function(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}}]),e}(),bf=function(){function e(t,i,n,o){var s=this;pf(this,e),this._id=Tt(),this._editor=t,this._position=i,this._isPositionValid=this._checkPositionValidity(i),this._buildDomNode(n,o),this._editor.addContentWidget(this),this._onDidChangeModelContentDisposable=this._editor.onDidChangeModelContent((function(e){s._isPositionValid||s.update(s._position)}))}return ff(e,[{key:"getId",value:function(){return this._id}},{key:"getPosition",value:function(){return{position:this._position,preference:[Up.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"update",value:function(e){this._position=e,this._isPositionValid=this._checkPositionValidity(e),this._updateDomNode(),this._editor.layoutContentWidget(this)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"dispose",value:function(){this._editor.removeContentWidget(this),this._onDidChangeModelContentDisposable.dispose()}},{key:"_checkPositionValidity",value:function(e){var t=this._editor.getModel().validatePosition(e);return e.equals(t)}},{key:"_buildDomNode",value:function(e,t){var i=this._editor.getOption(Up.editor.EditorOption.lineHeight),n=document.createElement("div");n.classList.add("monaco-cursor-widget-container");var o=document.createElement("div");o.classList.add("monaco-cursor-widget-cursor"),o.style.background=e,o.style.height="".concat(i,"px");var s=document.createElement("div");s.classList.add("monaco-cursor-widget-label"),s.style.height="".concat(i,"px"),s.innerText=t,s.style.background=e,n.appendChild(o),n.appendChild(s),this._domNode=n,this._updateDomNode()}},{key:"_updateDomNode",value:function(){var e=1===this._position.lineNumber;this._domNode.classList.toggle("inline",e)}}]),e}(),Cf=function(){function e(t,i,n){pf(this,e),this._editor=t,this._decorations=[],this._className="user-selection-".concat(n.replace("#","")),this._styleElement=document.createElement("style"),this._styleElement.innerHTML="\n .".concat(this._className," {\n background-color: ").concat(n,"30;\n }\n "),document.body.appendChild(this._styleElement),this.update(i)}return ff(e,[{key:"update",value:function(e){var t=[{range:e,options:{className:this._className}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}},{key:"dispose",value:function(){this._editor.deltaDecorations(this._decorations,[]),this._styleElement.remove()}}]),e}();function yf(e){return yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yf(e)}function wf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Sf(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?wf(Object(i),!0).forEach((function(t){kf(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wf(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function kf(e,t,i){return(t=Nf(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function xf(e,t){if(e){if("string"==typeof e)return Lf(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Lf(e,t):void 0}}function Lf(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Ef(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nf(n.key),n)}}function Nf(e){var t=function(e,t){if("object"!==yf(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==yf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===yf(t)?t:String(t)}var Df=function(){function e(t,i,n,o,s,r,a,l,c){var h=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hook=t,this.container=i,this.cellId=n,this.source=s,this.language=a,this.intellisense=l,this.readOnly=c,this._onMount=[],this._onChange=[],this._onBlur=[],this._onCursorSelectionChange=[],this._remoteUserByClientId={};var d=new uf(t,n,o);this.editorClient=new Um(d,r),this.editorClient.onDelta((function(e){h.source=e.applyToString(h.source),h._onChange.forEach((function(e){return e(h.source)}))}))}var t,i;return t=e,i=[{key:"isMounted",value:function(){return!!this.editor}},{key:"mount",value:function(){var e=this;if(this.isMounted())throw new Error("The editor is already mounted");this._mountEditor(),this.intellisense&&this._setupIntellisense(),this.editorClient.setEditorAdapter(new lf(this.editor)),this.editor.onDidFocusEditorWidget((function(){e.editor.updateOptions({matchBrackets:"always"})})),this.editor.onDidBlurEditorWidget((function(){e.editor.updateOptions({matchBrackets:"never"}),e._onBlur.forEach((function(e){return e()}))})),this.editor.onDidChangeCursorSelection((function(t){e._onCursorSelectionChange.forEach((function(e){return e(t.selection)}))})),this._onMount.forEach((function(e){return e()}))}},{key:"_ensureMounted",value:function(){this.isMounted()||this.mount()}},{key:"getSource",value:function(){return this.source}},{key:"onMount",value:function(e){this._onMount.push(e)}},{key:"onChange",value:function(e){this._onChange.push(e)}},{key:"onCursorSelectionChange",value:function(e){this._onCursorSelectionChange.push(e)}},{key:"onBlur",value:function(e){this._onBlur.push(e)}},{key:"focus",value:function(){this._ensureMounted(),this.editor.focus()}},{key:"blur",value:function(){this._ensureMounted(),this.editor.hasTextFocus()&&document.activeElement.blur()}},{key:"insert",value:function(e){this._ensureMounted();var t=this.editor.getSelection();this.editor.getModel().pushEditOperations([],[{forceMoveMarkers:!0,range:t,text:e}])}},{key:"dispose",value:function(){if(this.isMounted()){this.editor.dispose();var e=this.editor.getModel();e&&e.dispose()}}},{key:"updateUserSelection",value:function(e,t){this._ensureMounted(),this._remoteUserByClientId[e.id]?this._remoteUserByClientId[e.id].update(t):this._remoteUserByClientId[e.id]=new vf(this.editor,t,e.hex_color,e.name)}},{key:"removeUserSelection",value:function(e){this._ensureMounted(),this._remoteUserByClientId[e.id]&&(this._remoteUserByClientId[e.id].dispose(),delete this._remoteUserByClientId[e.id])}},{key:"setCodeErrorMarker",value:function(e){this._ensureMounted();var t="livebook.error.syntax";if(e){var i=this.editor.getModel().getLineContent(e.line),n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||xf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i.match(/^(\s*).*?(\s*)$/),3),o=n[1],s=n[2];Up.editor.setModelMarkers(this.editor.getModel(),t,[{startLineNumber:e.line,startColumn:o.length+1,endLineNumber:e.line,endColumn:i.length+1-s.length,message:e.description,severity:Up.MarkerSeverity.Error}])}else Up.editor.setModelMarkers(this.editor.getModel(),t,[])}},{key:"_mountEditor",value:function(){var e=this,t=Vp.get();this.editor=Up.editor.create(this.container,{language:this.language,value:this.source,readOnly:this.readOnly,scrollbar:{vertical:"hidden",alwaysConsumeMouseWheel:!1},minimap:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,guides:{indentation:!1},occurrencesHighlight:!1,renderLineHighlight:"none",theme:t.editor_theme,fontFamily:"JetBrains Mono, Droid Sans Mono, monospace",fontSize:t.editor_font_size,tabIndex:-1,tabSize:2,autoIndent:!0,formatOnType:!0,formatOnPaste:!0,quickSuggestions:this.intellisense&&t.editor_auto_completion,tabCompletion:"on",suggestSelection:"first",wordBasedSuggestions:!this.intellisense,parameterHints:this.intellisense&&t.editor_auto_signature,wordWrap:"markdown"===this.language&&t.editor_markdown_word_wrap?"on":"off"}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"enable-word-wrapping",label:"Enable word wrapping",precondition:"config.editor.wordWrap == off",keybindings:[Up.KeyMod.Alt|Up.KeyCode.KeyZ],run:function(e){return e.updateOptions({wordWrap:"on"})}}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"disable-word-wrapping",label:"Disable word wrapping",precondition:"config.editor.wordWrap == on",keybindings:[Up.KeyMod.Alt|Up.KeyCode.KeyZ],run:function(e){return e.updateOptions({wordWrap:"off"})}}),new ResizeObserver((function(t){t.forEach((function(t){e.container.offsetHeight>0&&e.editor.layout()}))})).observe(this.container),this.editor.onDidContentSizeChange((function(){var t=e.editor.getContentHeight();e.container.style.height="".concat(t,"px")}));var i=this.editor.getContribution("editor.controller.quickInput").widget.domNode;i.remove(),this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(i)}},{key:"_setupIntellisense",value:function(){var e=this,t=Vp.get();this.handlerByRef={},this.editor.getModel().__getCompletionItems__=function(i,n){var o=i.getLineContent(n.lineNumber).slice(0,n.column-1);return e._asyncIntellisenseRequest("completion",{hint:o,editor_auto_completion:t.editor_auto_completion}).then((function(e){var i=function(e,t){return e.map((function(e){return function(e,t){return{label:e.label,kind:Tf(e.kind),detail:e.detail,documentation:e.documentation&&{value:e.documentation,isTrusted:!0},insertText:e.insert_text,insertTextRules:Up.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:t.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}(e,t)})).map((function(t,i){return Sf(Sf({},t),{},{sortText:If(i,e.length)})}))}(e.items,t).map((function(e){var t=function(e,t){for(var i=t;!e.endsWith(i);)i=i.slice(0,-1);return i.length}(o,e.insertText),i=new Up.Range(n.lineNumber,n.column-t,n.lineNumber,n.column);return Sf(Sf({},e),{},{range:i})}));return{suggestions:i}})).catch((function(){return null}))},this.editor.getModel().__getHover__=function(t,i){e.hoverContentProcessed=!1,e.hoverContentEl||(e.hoverContentEl=e.container.querySelector(".monaco-hover-content"),e.hoverContentEl?new MutationObserver((function(t){e.hoverContentProcessed||(Fm(e.hoverContentEl,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}),e.hoverContentProcessed=!0)})).observe(e.hoverContentEl,{childList:!0}):console.warn("Could not find an element matching .monaco-hover-content"));var n=t.getLineContent(i.lineNumber),o=i.column;return e._asyncIntellisenseRequest("details",{line:n,column:o}).then((function(e){var t=e.contents.map((function(e){return{value:e,isTrusted:!0}}));return{contents:t,range:new Up.Range(i.lineNumber,e.range.from,i.lineNumber,e.range.to)}})).catch((function(){return null}))};var i={codeUntilLastStop:null,response:null};this.editor.getModel().__getSignatureHelp__=function(t,n){var o,s=t.getLinesContent(),r=n.lineNumber-1,a=s.slice(0,r),l=s[r].slice(0,n.column-1),c=[].concat((o=a,function(e){if(Array.isArray(e))return Lf(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||xf(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[l]).join("\n"),h=c.replace(/[^(),\s]*?$/,"").replace(/([(),])\s*$/,"$1");return h===i.codeUntilLastStop?{value:Af(i.response),dispose:function(){}}:e._asyncIntellisenseRequest("signature",{hint:c}).then((function(e){return i.response=e,i.codeUntilLastStop=h,{value:Af(e),dispose:function(){}}})).catch((function(){return null}))},this.editor.getModel().__getDocumentFormattingEdits__=function(t){var i=t.getValue();return e._asyncIntellisenseRequest("format",{code:i}).then((function(i){return e.setCodeErrorMarker(i.code_error),i.code?[{range:t.getFullModelRange(),text:i.code}]:[]})).catch((function(){return null}))},this.hook.handleEvent("intellisense_response",(function(t){var i=t.ref,n=t.response,o=e.handlerByRef[i];o&&(o(n),delete e.handlerByRef[i])}))}},{key:"_asyncIntellisenseRequest",value:function(e,t){var i=this;return new Promise((function(n,o){i.hook.pushEvent("intellisense_request",Sf({cell_id:i.cellId,type:e},t),(function(e){var t=e.ref;t?i.handlerByRef[t]=function(e){e?n(e):o(null)}:o(null)}))}))}}],i&&Ef(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tf(e){switch(e){case"function":return Up.languages.CompletionItemKind.Function;case"module":return Up.languages.CompletionItemKind.Module;case"struct":return Up.languages.CompletionItemKind.Struct;case"interface":return Up.languages.CompletionItemKind.Interface;case"type":return Up.languages.CompletionItemKind.Class;case"variable":return Up.languages.CompletionItemKind.Variable;case"field":return Up.languages.CompletionItemKind.Field;case"keyword":return Up.languages.CompletionItemKind.Keyword;default:return null}}function If(e,t){return String(e).padStart(t,"0")}function Af(e){return{activeSignature:0,activeParameter:e.active_argument,signatures:e.signature_items.map((function(e){return{label:e.signature,parameters:e.arguments.map((function(e){return{label:e}})),documentation:null}}))}}const Mf=Df,Rf={mounted:function(){var e=this;this.props=this.getProps(),this.handleEvent("cell_editor_init:".concat(this.props.cellId,":").concat(this.props.tag),(function(t){var i=t.source_view,n=t.language,o=t.intellisense,s=t.read_only,r=e.el.querySelector("[data-el-editor-container]"),a=document.createElement("div");r.appendChild(a),e.liveEditor=new Mf(e,a,e.props.cellId,e.props.tag,i.source,i.revision,n,o,s),e.liveEditor.onMount((function(){var e=r.querySelector("[data-el-skeleton]");e&&e.remove()})),e.el.dispatchEvent(new CustomEvent("lb:cell:editor_created",{detail:{tag:e.props.tag,liveEditor:e.liveEditor},bubbles:!0}))}))},disconnected:function(){this.el.removeAttribute("id")},destroyed:function(){this.liveEditor&&(this.el.dispatchEvent(new CustomEvent("lb:cell:editor_removed",{detail:{tag:this.props.tag},bubbles:!0})),this.liveEditor.dispose())},getProps:function(){return{cellId:gt(this.el,"data-cell-id"),tag:gt(this.el,"data-tag")}}};var Of="confirm-opted-out-ids";const Pf={mounted:function(){var e=this,t=null,i=this.el.querySelector("[data-title]"),n=this.el.querySelector("[data-description]"),o=this.el.querySelector("[data-confirm-icon]"),s=this.el.querySelector("[data-confirm-text]"),r=this.el.querySelector("[data-confirm-button]"),a=this.el.querySelector("[data-actions]"),l=this.el.querySelector("[data-opt-out]"),c=l.querySelector("input"),h=lt(Of)||[];this.handleConfirmRequest=function(d){t=d;var u=d.detail,g=u.title,p=u.description,m=u.confirm_text,f=u.confirm_icon,_=u.danger,v=u.html,b=u.opt_out_id;b&&h.includes(b)?liveSocket.execJS(d.target,d.detail.on_confirm):(i.textContent=g,v?n.innerHTML=p:n.textContent=p,s.textContent=m,o.className=f?"align-middle mr-1 ri-".concat(f):"hidden",r.classList.toggle("button-red",_),r.classList.toggle("button-blue",!_),a.classList.toggle("flex-row-reverse",_),a.classList.toggle("space-x-reverse",_),c.checked=!1,l.classList.toggle("hidden",!b),liveSocket.execJS(e.el,e.el.getAttribute("data-js-show")))},window.addEventListener("lb:confirm_request",this.handleConfirmRequest),this.el.addEventListener("lb:confirm",(function(e){var i=t.detail.opt_out_id;i&&c.checked&&(h.push(i),ct(Of,h)),liveSocket.execJS(t.target,t.detail.on_confirm)}))},destroyed:function(){window.removeEventListener("lb:confirm_request",this.handleConfirmRequest)}};var Ff="data-js-dragging";const Bf={mounted:function(){var e=this;this.el.addEventListener("dragenter",(function(t){e.el.setAttribute(Ff,"")})),this.el.addEventListener("dragleave",(function(t){e.el.contains(t.relatedTarget)||e.el.removeAttribute(Ff)})),this.el.addEventListener("drop",(function(t){e.el.removeAttribute(Ff)}))}},Hf={mounted:function(){var e=Vp.get(),t=this.el.querySelector('[name="editor_auto_completion"][value="true"]'),i=this.el.querySelector('[name="editor_auto_signature"][value="true"]'),n=this.el.querySelector('[name="editor_font_size"][value="true"]'),o=this.el.querySelector('[name="editor_high_contrast"][value="true"]'),s=this.el.querySelector('[name="editor_markdown_word_wrap"][value="true"]');t.checked=e.editor_auto_completion,i.checked=e.editor_auto_signature,n.checked=16===e.editor_font_size,o.checked=e.editor_theme===Hp,s.checked=e.editor_markdown_word_wrap,t.addEventListener("change",(function(e){Vp.update({editor_auto_completion:e.target.checked})})),i.addEventListener("change",(function(e){Vp.update({editor_auto_signature:e.target.checked})})),n.addEventListener("change",(function(e){Vp.update({editor_font_size:e.target.checked?16:14})})),o.addEventListener("change",(function(e){Vp.update({editor_theme:e.target.checked?Hp:Bp})})),s.addEventListener("change",(function(e){Vp.update({editor_markdown_word_wrap:e.target.checked})}))}};var Wf=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Vf=(e,t,i)=>(Wf(e,t,"read from private field"),i?i.call(e):t.get(e)),zf=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},Uf=(e,t,i,n)=>(Wf(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),jf=(e,t,i)=>(Wf(e,t,"access private method"),i);async function Kf(e,t={}){const{local:i=!1,version:n="latest",cdnUrl:o,...s}=t,r=function(e,t,i){let n=`https://cdn.jsdelivr.net/npm/emojibase-data@${t}/${e}`;return"function"==typeof i?n=i(e,t):"string"==typeof i&&(n=`${i}/${e}`),n}(e,n,o),a=i?localStorage:sessionStorage,l=`emojibase/${n}/${e}`,c=a.getItem(l);if(c)return Promise.resolve(JSON.parse(c));const h=await fetch(r,{credentials:"omit",mode:"cors",redirect:"error",...s});if(!h.ok)throw new Error("Failed to load Emojibase dataset.");const d=await h.json();try{a.setItem(l,JSON.stringify(d))}catch{}return d}const qf={discord:"joypixels",slack:"iamcal"};async function $f(e,t,i){var n;return Kf(`${e}/shortcodes/${null!==(n=qf[t])&&void 0!==n?n:t}.json`,i)}function Gf(e,t){if(0===t.length)return e;const i=new Set(e.shortcodes);return t.forEach((t=>{const n=t[e.hexcode];Array.isArray(n)?n.forEach((e=>i.add(e))):n&&i.add(n)})),e.shortcodes=[...i],e.skins&&e.skins.forEach((e=>{Gf(e,t)})),e}async function Qf(e,t={}){const{compact:i=!1,flat:n=!1,shortcodes:o=[],...s}=t,r=await Kf(`${e}/${i?"compact":"data"}.json`,s);let a=[];return o.length>0&&(a=await Promise.all(o.map((t=>{let i;if(t.includes("/")){const[e,n]=t.split("/");i=$f(e,n,s)}else i=$f(e,t,s);return i.catch((()=>({})))})))),n?function(e,t=[]){const i=[];return e.forEach((e=>{if(e.skins){const{skins:n,...o}=e;i.push(Gf(o,t)),n.forEach((e=>{const n={...e};o.tags&&(n.tags=[...o.tags]),i.push(Gf(n,t))}))}else i.push(Gf(e,t))})),i}(r,a):function(e,t){return 0===t.length||e.forEach((e=>{Gf(e,t)})),e}(r,a)}async function Yf(e,t){return Kf(`${e}/messages.json`,t)}function Zf(e,t){const i=e.target.closest("[data-emoji]");if(i){const e=t.find((e=>e.emoji===i.dataset.emoji));if(e)return e}return null}function Xf(e){var t;const i=null==(t=window.matchMedia)?void 0:t.call(window,"(prefers-reduced-motion: reduce)");return e.animate&&!(null!=i&&i.matches)}function Jf(e,t){return e.toLowerCase().includes(t.toLowerCase())}function e_(e,t,i,n){if(Xf(n)&&e.animate)return e.animate(t,i).finished;const o="normal"===i.direction?1:0,s=Object.entries(t).reduce(((e,[t,i])=>({...e,[t]:i[o]})),{});return Object.assign(e.style,s),Promise.resolve()}function t_(e){var t;const i=document.createElement("template");return i.innerHTML=e,null==(t=i.content)?void 0:t.firstElementChild}function i_(...e){return e.reduce(((e,t)=>({...e,[t]:n_(t)})),{})}function n_(e){return`picmo__${e}`}function o_(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function s_(e,...t){o_(e).append(...t)}function r_(e){try{return window[e].length,!0}catch{return!1}}function a_(){let e={};return{getItem:t=>e[t],setItem:(t,i)=>e[t]=i,length:Object.keys(e).length,clear:()=>e={},key:t=>Object.keys(e)[t],removeItem:t=>delete e[t]}}function l_(e){var t;return{emoji:e.emoji,label:e.label,tags:e.tags,skins:null==(t=e.skins)?void 0:t.map((e=>l_(e))),order:e.order,custom:!1,hexcode:e.hexcode,version:e.version}}function c_(e,t,i){var n;return!(i&&!i.some((t=>t.order===e.group)))&&(Jf(e.label,t)||(null==(n=e.tags)?void 0:n.some((e=>Jf(e,t)))))}class h_{constructor(e="en"){this.locale=e}}const d_=[(e,t)=>("1F91D"===e.hexcode&&t<14&&(e.skins=[]),e),(e,t)=>(e.skins&&(e.skins=e.skins.filter((e=>!e.version||e.version<=t))),e)];function u_(e,t){return e.filter((e=>null!==function(e,t){return d_.some((i=>null===i(e,t)))?null:e}(e,t)))}const g_={};function p_(e){return g_[e]||(g_[e]=new m_(e)),g_[e]}p_.deleteDatabase=e=>{};class m_ extends h_{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let i=this.categories.filter((e=>"component"!==e.key));if(e.showRecents&&i.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&i.push({key:"custom",order:10}),e.categories){const t=e.categories;i=i.filter((e=>t.includes(e.key))),i.sort(((e,i)=>t.indexOf(e.key)-t.indexOf(i.key)))}else i.sort(((e,t)=>e.order-t.order));return Promise.resolve(i)}getEmojis(e,t){const i=this.emojis.filter((t=>t.group===e.order)).filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(l_);return Promise.resolve(u_(i,t))}searchEmojis(e,t,i,n){const o=this.emojis.filter((t=>c_(t,e,n)&&t.version<=i)).map(l_),s=t.filter((t=>c_(t,e,n))),r=[...u_(o,i),...s];return Promise.resolve(r)}setMeta(e){this.meta=e}}async function f_(e){try{return(await fetch(e,{method:"HEAD"})).headers.get("etag")}catch{return null}}async function __(e,t,i){let n=i||t(e);try{await n.open()}catch{console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),n=p_(e)}return n}async function v_(e,t,i,n,o){return i&&n?async function(e,t,i,n,o){const s=await __(e,t,o),r=await async function(e){const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(i)).map((e=>e.toString(16).padStart(2,"0"))).join("")}(n);return(!await s.isPopulated()||await async function(e,t){return t!==await e.getHash()}(s,r))&&await s.populate({groups:i.groups,emojis:n,hash:r}),s}(e,t,i,n,o):async function(e,t,i){const n=await __(e,t,i),[o,s]=await function(e){const{emojisUrl:t,messagesUrl:i}=function(e,t){const i=`https://cdn.jsdelivr.net/npm/emojibase-data@latest/${t}`;return{emojisUrl:`${i}/data.json`,messagesUrl:`${i}/messages.json`}}(0,e);try{return Promise.all([f_(t),f_(i)])}catch{return Promise.all([null,null])}}(e);if(await n.isPopulated())o&&s&&await async function(e,t,i){let n;try{n=await e.getEtags()}catch{n={}}const{storedEmojisEtag:o,storedMessagesEtag:s}=n;if(i!==s||t!==o){const[n,o]=await Promise.all([Yf(e.locale),Qf(e.locale)]);await e.populate({groups:n.groups,emojis:o,emojisEtag:t,messagesEtag:i})}}(n,o,s);else{const[t,i]=await Promise.all([Yf(e),Qf(e)]);await n.populate({groups:t.groups,emojis:i,emojisEtag:o,messagesEtag:s})}return n}(e,t,o)}r_("sessionStorage")||(console.warn("[picmo] sessionStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"sessionStorage",{value:a_()}));class b_{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;null==(e=this.rootElement)||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,i){e.target===t&&(i.focus(),e.preventDefault())}handleKeyDown(e){"Tab"===e.key&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}}const{light:C_,dark:y_,auto:w_}=i_("light","dark","auto");class S_{constructor({template:e,classes:t,parent:i}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=i,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then((e=>{this.emojiData=e}))}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.on(e,this.appEvents[e],this)})),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.off(e,this.appEvents[e])})),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){const t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce(((e,t)=>({...e,[t]:this.el.querySelector(this.uiElements[t])})),{})}bindUIEvents(){this.uiEvents.forEach((e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)}))}unbindUIEvents(){this.uiEvents.forEach((e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)}))}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){const e=new MutationObserver((t=>{const[i]=t;"childList"===i.type&&i.addedNodes[0]===this.el&&(Xf(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)}));e.observe(this.parent,{childList:!0})}}static childEvent(e,t,i,n={}){return{target:e,event:t,handler:i,options:n}}static uiEvent(e,t,i={}){return{event:e,handler:t,options:i}}static byClass(e){return`.${e}`}}const k_={clock:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',frown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',gamepad:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',lightbulb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',mug:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',plane:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',robot:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',sad:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n <defs>\n <radialGradient gradientUnits="userSpaceOnUse" cy="10%" id="gradient-0">\n <stop offset="0" stop-color="hsl(50, 100%, 50%)" />\n <stop offset="1" stop-color="hsl(50, 100%, 60%)" />\n </radialGradient>\n </defs>\n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="172.586" cy="207.006" rx="39.974" ry="39.974"/>\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="334.523" cy="207.481" rx="39.974" ry="39.974"/>\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="313.325" cy="356.208" rx="91.497" ry="59.893"/>\n <path fill="#55a7ff" d="M 159.427 274.06 L 102.158 363.286 L 124.366 417.011 L 160.476 423.338 L 196.937 414.736 L 218.502 375.214"></path>\n <path fill="url(#gradient-0)" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM256 352C290.9 352 323.2 367.8 348.3 394.9C354.3 401.4 364.4 401.7 370.9 395.7C377.4 389.7 377.7 379.6 371.7 373.1C341.6 340.5 301 320 256 320C247.2 320 240 327.2 240 336C240 344.8 247.2 352 256 352H256zM208 369C208 349 179.6 308.6 166.4 291.3C163.2 286.9 156.8 286.9 153.6 291.3C140.6 308.6 112 349 112 369C112 395 133.5 416 160 416C186.5 416 208 395 208 369H208zM303.6 208C303.6 225.7 317.1 240 335.6 240C353.3 240 367.6 225.7 367.6 208C367.6 190.3 353.3 176 335.6 176C317.1 176 303.6 190.3 303.6 208zM207.6 208C207.6 190.3 193.3 176 175.6 176C157.1 176 143.6 190.3 143.6 208C143.6 225.7 157.1 240 175.6 240C193.3 240 207.6 225.7 207.6 208z" />\n</svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>',smiley:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256.3 331.8C208.9 331.8 164.1 324.9 124.5 312.8C112.2 309 100.2 319.7 105.2 331.5C130.1 390.6 188.4 432 256.3 432C324.2 432 382.4 390.6 407.4 331.5C412.4 319.7 400.4 309 388.1 312.8C348.4 324.9 303.7 331.8 256.3 331.8H256.3zM176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176zM336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240z"/></svg>',symbols:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"/></svg>',tree:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M413.8 447.1L256 448l0 31.99C256 497.7 241.8 512 224.1 512c-17.67 0-32.1-14.32-32.1-31.99l0-31.99l-158.9-.0099c-28.5 0-43.69-34.49-24.69-56.4l68.98-79.59H62.22c-25.41 0-39.15-29.8-22.67-49.13l60.41-70.85H89.21c-21.28 0-32.87-22.5-19.28-37.31l134.8-146.5c10.4-11.3 28.22-11.3 38.62-.0033l134.9 146.5c13.62 14.81 2.001 37.31-19.28 37.31h-10.77l60.35 70.86c16.46 19.34 2.716 49.12-22.68 49.12h-15.2l68.98 79.59C458.7 413.7 443.1 447.1 413.8 447.1z"/></svg>',users:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM479.1 320h-73.85C451.2 357.7 480 414.1 480 477.3C480 490.1 476.2 501.9 470 512h138C625.7 512 640 497.6 640 479.1C640 391.6 568.4 320 479.1 320zM432 256C493.9 256 544 205.9 544 144S493.9 32 432 32c-25.11 0-48.04 8.555-66.72 22.51C376.8 76.63 384 101.4 384 128c0 35.52-11.93 68.14-31.59 94.71C372.7 243.2 400.8 256 432 256z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n <defs>\n <radialGradient id="radial" cy="85%">\n <stop offset="20%" stop-color="var(--color-secondary)" />\n <stop offset="100%" stop-color="var(--color-primary)" />\n </radialGradient>\n </defs>\n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n <path fill="url(\'#radial\')" d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z" />\n</svg>',xmark:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>'},x_={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function L_(e,t){if(!(e in k_))return console.warn(`Unknown icon: "${e}"`),document.createElement("div");const i=function(e,t){const i=t_(t);return i.dataset.icon=e,i.classList.add(n_("icon")),i}(e,k_[e]);return t&&i.classList.add(n_(`icon-${t}`)),i}var E_,N_,D_,T_,I_,A_,M_,R_;class O_{constructor(e,t={}){zf(this,D_),zf(this,I_),zf(this,M_),zf(this,E_,void 0),zf(this,N_,void 0),Uf(this,E_,e),Uf(this,N_,t.mode||"sync")}renderSync(e={}){const t=t_(Vf(this,E_).call(this,e));return jf(this,M_,R_).call(this,t,e),jf(this,I_,A_).call(this,t),jf(this,D_,T_).call(this,t,e),t}async renderAsync(e={}){const t=t_(Vf(this,E_).call(this,e));return jf(this,M_,R_).call(this,t,e),jf(this,I_,A_).call(this,t),await jf(this,D_,T_).call(this,t,e),t}render(e){return"sync"===Vf(this,N_)?this.renderSync(e):this.renderAsync(e)}}E_=new WeakMap,N_=new WeakMap,D_=new WeakSet,T_=async function(e,t){const i=e.querySelectorAll("[data-view]"),n=[];for(const e of i){const i=t[e.dataset.view];i?"sync"!==e.dataset.render?n.push(i.render().then((t=>(e.replaceWith(t),t)))):e.replaceWith(i.renderSync()):e.remove()}return Promise.all(n)},I_=new WeakSet,A_=function(e){e.querySelectorAll("i[data-icon]").forEach((e=>{const{icon:t,size:i}=e.dataset;e.replaceWith(L_(t,i))}))},M_=new WeakSet,R_=function(e,t){return e.querySelectorAll("[data-placeholder]").forEach((e=>{const i=e.dataset.placeholder;if(i&&t[i]){const n=t[i];e.replaceWith(...[n].flat())}else console.warn(`Missing placeholder element for key "${i}"`)})),e};const P_=i_("imagePlaceholder","placeholder"),F_=new O_((({classes:e})=>`\n <div class="${e.placeholder} ${e.imagePlaceholder}"></div>\n`));class B_ extends S_{constructor({classNames:e}={}){super({template:F_,classes:P_}),this.classNames=e}load(e){const t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",(()=>{this.el.replaceWith(t)}),{once:!0}),Promise.resolve(e).then((e=>t.src=e))}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach((e=>this.el.classList.add(e))),this.el}}const H_=i_("customEmoji"),W_=new O_((({emoji:e})=>`<span>${e}</span>`));class V_ extends class{renderElement(e){return{content:e}}renderImage(e="",t){const i=new B_({classNames:e});return i.renderSync(),{content:i,resolver:()=>(i.load(t()),i.el)}}doRender(e,t,i){if(e.custom)return this.renderCustom(e,t,i);const{content:n,resolver:o}=this.render(e,i),s=n instanceof Element?n:n.el;return o&&o(),s}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:i,data:n}){return{url:e,label:t,emoji:i,data:n}}renderCustom(e,t,i=""){const n=[H_.customEmoji,i].join(" ").trim(),{content:o,resolver:s}=this.renderImage(n,(()=>e.url)),r=o instanceof Element?o:o.el;return s&&s(),r}}{render(e){return this.renderElement(W_.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:i}){return{emoji:e,hexcode:t,label:i}}}function z_(e){return new U_(e)}z_.deleteDatabase=e=>new Promise(((t,i)=>{const n=indexedDB.deleteDatabase(`PicMo-${e}`);n.addEventListener("success",t),n.addEventListener("error",i)}));class U_ extends h_{async open(){const e=indexedDB.open(`PicMo-${this.locale}`);return new Promise(((t,i)=>{e.addEventListener("success",(e=>{var i;this.db=null==(i=e.target)?void 0:i.result,t()})),e.addEventListener("error",i),e.addEventListener("upgradeneeded",(async e=>{var t;this.db=null==(t=e.target)?void 0:t.result,this.db.createObjectStore("category",{keyPath:"order"});const i=this.db.createObjectStore("emoji",{keyPath:"emoji"});i.createIndex("category","group"),i.createIndex("version","version"),this.db.createObjectStore("meta")}))}))}async delete(){this.close();const e=indexedDB.deleteDatabase(`PicMo-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){const e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){const e=this.db.transaction("meta","readonly").objectStore("meta"),[t,i]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:i.target.result}}async setMeta(e){const t=this.db.transaction("meta","readwrite"),i=t.objectStore("meta");return new Promise((n=>{t.oncomplete=n,Object.keys(e).filter(Boolean).forEach((t=>{i.put(e[t],t)}))}))}async getHash(){const e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){const e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:i,messagesEtag:n,hash:o}){await this.removeAllObjects("category","emoji");const s=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:i,messagesEtag:n,hash:o})];await Promise.all(s)}async getCategories(e){var t;const i=this.db.transaction("category","readonly").objectStore("category");let n=(await this.waitForRequest(i.getAll())).target.result.filter((e=>"component"!==e.key));if(e.showRecents&&n.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&n.push({key:"custom",order:10}),e.categories){const t=e.categories;n=n.filter((e=>t.includes(e.key))),n.sort(((e,i)=>t.indexOf(e.key)-t.indexOf(i.key)))}else n.sort(((e,t)=>e.order-t.order));return n}async getEmojis(e,t){const i=this.db.transaction("emoji","readonly").objectStore("emoji").index("category");return u_((await this.waitForRequest(i.getAll(e.order))).target.result.filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(l_),t)}async searchEmojis(e,t,i,n){const o=[];return new Promise(((s,r)=>{const a=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();a.addEventListener("success",(r=>{var a;const l=null==(a=r.target)?void 0:a.result;if(!l)return s([...u_(o,i),...t.filter((t=>c_(t,e)))]);const c=l.value;c_(c,e,n)&&c.version<=i&&o.push(l_(c)),l.continue()})),a.addEventListener("error",(e=>{r(e)}))}))}async waitForRequest(e){return new Promise(((t,i)=>{e.onsuccess=t,e.onerror=i}))}withTransaction(e,t="readwrite",i){return new Promise(((n,o)=>{const s=this.db.transaction(e,t);s.oncomplete=n,s.onerror=o,i(s)}))}async removeAllObjects(...e){const t=this.db.transaction(e,"readwrite"),i=e.map((e=>t.objectStore(e)));await Promise.all(i.map((e=>this.waitForRequest(e.clear()))))}async addObjects(e,t){return this.withTransaction(e,"readwrite",(i=>{const n=i.objectStore(e);t.forEach((e=>{n.add(e)}))}))}}const j_="PicMo:recents";class K_ extends class extends class{}{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(j_)}getRecents(e){var t;try{return JSON.parse(null!=(t=this.storage.getItem(j_))?t:"[]").slice(0,e)}catch{return[]}}addOrUpdateRecent(e,t){const i=[e,...this.getRecents(t).filter((t=>t.hexcode!==e.hexcode))].slice(0,t);try{this.storage.setItem(j_,JSON.stringify(i))}catch{console.warn("storage is not available, recent emojis will not be saved")}}}{constructor(){super(localStorage)}}const q_={dataStore:z_,theme:C_,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:{"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},locale:"en",maxRecents:50,custom:[]};function $_(e={}){return{...q_,...e,renderer:e.renderer||new V_,recentsProvider:e.recentsProvider||new K_}}var G_,Q_,Y_,Z_,X_;r_("localStorage")||(console.warn("[picmo] localStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"localStorage",{value:a_()}));class J_{constructor(){zf(this,Q_),zf(this,Z_),zf(this,G_,new Map)}on(e,t,i){jf(this,Z_,X_).call(this,e,t,i)}once(e,t,i){jf(this,Z_,X_).call(this,e,t,i,!0)}off(e,t){const i=jf(this,Q_,Y_).call(this,e);Vf(this,G_).set(e,i.filter((e=>e.handler!==t)))}emit(e,...t){jf(this,Q_,Y_).call(this,e).forEach((i=>{i.handler.apply(i.context,t),i.once&&this.off(e,i.handler)}))}removeAll(){Vf(this,G_).clear()}}G_=new WeakMap,Q_=new WeakSet,Y_=function(e){return Vf(this,G_).has(e)||Vf(this,G_).set(e,[]),Vf(this,G_).get(e)},Z_=new WeakSet,X_=function(e,t,i,n=!1){jf(this,Q_,Y_).call(this,e).push({context:i,handler:t,once:n})};class ev extends J_{}class tv extends J_{}const iv=i_("emojiCategory","categoryName","noRecents","recentEmojis");class nv extends S_{constructor({template:e,category:t,showVariants:i,lazyLoader:n}){super({template:e,classes:iv}),this.baseUIElements={categoryName:S_.byClass(iv.categoryName)},this.category=t,this.showVariants=i,this.lazyLoader=n}setActive(e,t,i){this.emojiContainer.setActive(e,t,i)}}const ov=new O_((({classes:e,emoji:t})=>`\n <button\n type="button"\n class="${e.emojiButton}"\n title="${t.label}"\n data-emoji="${t.emoji}"\n tabindex="-1">\n <div data-placeholder="emojiContent"></div>\n </button>\n`)),sv=i_("emojiButton");class rv extends S_{constructor({emoji:e,lazyLoader:t,category:i}){super({template:ov,classes:sv}),this.emoji=e,this.lazyLoader=t,this.category=i}initialize(){this.uiEvents=[S_.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}}class av{constructor(e,t,i=0,n=0,o=!1){this.events=new J_,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=i,this.focusedColumn=n,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,i=!0){const n=this.getIndex();this.focusedRow=e,void 0!==t&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:n,to:this.getIndex(),performFocus:i})}setFocusedIndex(e,t=!0){const i=Math.floor(e/this.columnCount),n=e%this.columnCount;this.setCell(i,n,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}}const lv=new O_((({classes:e})=>`\n <div class="${e.emojiContainer}">\n <div data-placeholder="emojis"></div>\n </div>\n`)),cv=i_("emojiContainer");class hv extends S_{constructor({emojis:e,showVariants:t,preview:i=!0,lazyLoader:n,category:o,fullHeight:s=!1}){super({template:lv,classes:cv}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=n,this.preview=i,this.emojis=e,this.category=o,this.fullHeight=s,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new av(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[S_.uiEvent("click",this.selectEmoji),S_.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(S_.uiEvent("mouseover",this.showPreview),S_.uiEvent("mouseout",this.hidePreview),S_.uiEvent("focus",this.showPreview,{capture:!0}),S_.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if("string"==typeof e){const t=this.emojis.findIndex((t=>t.emoji===e));this.grid.setFocusedIndex(t,!1),setTimeout((()=>{var e,i,n,o;const s=this.emojiViews[t].el;s.scrollIntoView();const r=null==(e=s.parentElement)?void 0:e.previousElementSibling;(null==(n=null==(i=s.parentElement)?void 0:i.parentElement)?void 0:n.parentElement).scrollTop-=null!=(o=null==r?void 0:r.offsetHeight)?o:0}))}else"first"===e.row||0===e.row?this.grid.setCell(0,e.offset,t):"last"===e.row&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,i){var n;e?this.setFocusedView(t,i):null==(n=this.emojiViews[this.grid.getIndex()])||n.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map((e=>this.viewFactory.create(rv,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer}))),this.emojiElements=this.emojiViews.map((e=>e.renderSync())),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach((e=>e.destroy())),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:i}){var n,o;null==(n=this.emojiViews[e])||n.deactivateFocus(),null==(o=this.emojiViews[t])||o.activateFocus(i)}selectEmoji(e){e.stopPropagation();const t=Zf(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){const t=e.target.closest("button"),i=null==t?void 0:t.firstElementChild,n=Zf(e,this.emojis);n&&this.events.emit("preview:show",n,null==i?void 0:i.cloneNode(!0))}hidePreview(e){Zf(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}}const dv=new O_((({classes:e,category:t,pickerId:i,icon:n,i18n:o})=>`\n <section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${i}-category-${t.key}">\n <h3 data-category="${t.key}" class="${e.categoryName}">\n <i data-icon="${n}"></i>\n ${o.get(`categories.${t.key}`,t.message||t.key)}\n </h3>\n <div data-view="emojis" data-render="sync"></div>\n </section>\n`));class uv extends nv{constructor({category:e,showVariants:t,lazyLoader:i,emojiVersion:n}){super({category:e,showVariants:t,lazyLoader:i,template:dv}),this.showVariants=t,this.lazyLoader=i,this.emojiVersion=n}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){await this.emojiDataPromise;const e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(hv,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:x_[this.category.key]})}}class gv extends hv{constructor({category:e,emojis:t,preview:i=!0,lazyLoader:n}){super({category:e,emojis:t,showVariants:!1,preview:i,lazyLoader:n})}async addOrUpdate(e){const t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter((t=>t!==e)));const i=this.viewFactory.create(rv,{emoji:e});if(this.el.insertBefore(i.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter((t=>t!==e))],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);const e=this.el.childElementCount-this.options.maxRecents;for(let t=0;t<e;t++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}}const pv=new O_((({emojiCount:e,classes:t,category:i,pickerId:n,icon:o,i18n:s})=>`\n <section class="${t.emojiCategory}" role="tabpanel" aria-labelledby="${n}-category-${i.key}">\n <h3 data-category="${i.key}" class="${t.categoryName}">\n <i data-icon="${o}"></i>\n ${s.get(`categories.${i.key}`,i.message||i.key)}\n </h3>\n <div data-empty="${0===e}" class="${t.recentEmojis}">\n <div data-view="emojis" data-render="sync"></div>\n </div>\n <div class="${t.noRecents}">\n ${s.get("recents.none")}\n </div>\n </section>\n`),{mode:"async"}),mv=new O_((({classes:e,category:t,pickerId:i,icon:n,i18n:o})=>`\n <section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${i}-category-${t.key}">\n <h3 data-category="${t.key}" class="${e.categoryName}">\n <i data-icon="${n}"></i>\n ${o.get(`categories.${t.key}`,t.message||t.key)}\n </h3>\n <div data-view="emojis" data-render="sync"></div>\n </section>\n`));class fv{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){const t=new IntersectionObserver((e=>{e.filter((e=>e.intersectionRatio>0)).map((e=>e.target)).forEach((e=>{const i=this.elements.get(e);null==i||i(),t.unobserve(e)}))}),{root:e});this.elements.forEach(((e,i)=>{t.observe(i)}))}else this.elements.forEach((e=>{e()}))}}const _v=i_("emojiArea"),vv=new O_((({classes:e})=>`\n <div class="${e.emojiArea}">\n <div data-placeholder="emojis"></div>\n </div>\n`),{mode:"async"}),bv={recents:class extends nv{constructor({category:e,lazyLoader:t,provider:i}){super({category:e,showVariants:!1,lazyLoader:t,template:pv}),this.provider=i}initialize(){this.uiElements={...this.baseUIElements,recents:S_.byClass(iv.recentEmojis)},this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;const t=null==(e=this.provider)?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(gv,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:x_[this.category.key]}),this.el}},custom:class extends nv{constructor({category:e,lazyLoader:t}){super({template:mv,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(hv,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:x_[this.category.key]})}}};class Cv extends S_{constructor({categoryTabs:e,categories:t,emojiVersion:i}){super({template:vv,classes:_v}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new fv,this.categoryTabs=e,this.categories=t,this.emojiVersion=i,this.handleScroll=function(e,t){let i=null;return()=>{i||(i=window.setTimeout((()=>{e(),i=null}),100))}}(this.handleScroll.bind(this))}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:S_.byClass(_v.emojiArea)},this.uiEvents=[S_.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);const e={};return this.categories.forEach(((t,i)=>{e[`emojis-${t.key}`]=this.emojiCategories[i]})),await super.render({emojis:await Promise.all(this.emojiCategories.map((e=>e.render())))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach((e=>{var t;null==(t=this.observer)||t.unobserve(e.el),e.destroy()}))}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){const t=function(e){return bv[e.key]||uv}(e);return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find((e=>e.key===this.options.initialCategory))?this.options.initialCategory:null==(e=this.categories.find((e=>"recents"!==e.key)))?void 0:e.key}determineFocusTarget(e){const t=this.emojiCategories.find((t=>t.category.key===e));return this.options.initialEmoji&&(null==t?void 0:t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");const t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex((t=>t.key===e))}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:null!=e?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:null!=e?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var i;this.scrollListenerState="suspend";const{focus:n,performFocus:o,scroll:s}={performFocus:!1,...t};this.emojiCategories[this.selectedCategory].setActive(!1);const r=this.selectedCategory="number"==typeof e?e:this.getCategoryIndex(e);null==(i=this.categoryTabs)||i.setActiveTab(this.selectedCategory,{performFocus:o,scroll:"button"===n});const a=this.emojiCategories[r].el.offsetTop;this.emojiCategories[r].setActive(!0,function(e){return e&&"button"!==e?e:{row:"first",offset:0}}(n),"button"!==n&&o),s&&(this.el.scrollTop=a),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),null==(t=this.categoryTabs)||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if("suspend"===this.scrollListenerState||!this.categoryTabs)return;if("resume"===this.scrollListenerState)return void(this.scrollListenerState="active");const e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,i=this.emojiCategories.findIndex(((t,i)=>{var n;return e<(null==(n=this.emojiCategories[i+1])?void 0:n.el.offsetTop)})),n={changeFocusable:!1,performFocus:!1,scroll:!1};0===e?this.categoryTabs.setActiveTab(0,n):Math.floor(e)===Math.floor(t)||i<0?this.categoryTabs.setActiveTab(this.categories.length-1,n):this.categoryTabs.setActiveTab(i,n)}}const yv=new O_((({classList:e,classes:t,icon:i,message:n})=>`\n<div class="${e}" role="alert">\n <div class="${t.iconContainer}"><i data-size="10x" data-icon="${i}"></i></div>\n <h3 class="${t.title}">${n}</h3>\n</div>\n`)),wv=i_("error","iconContainer","title");class Sv extends S_{constructor({message:e,icon:t="warning",template:i=yv,className:n}){super({template:i,classes:wv}),this.message=e,this.icon=t,this.className=n}renderSync(){const e=[wv.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}}const kv=new O_((({classList:e,classes:t,icon:i,i18n:n,message:o})=>`\n <div class="${e}" role="alert">\n <div class="${t.icon}"><i data-size="10x" data-icon="${i}"></i></div>\n <h3 class="${t.title}">${o}</h3>\n <button type="button">${n.get("retry")}</button>\n </div>\n`)),xv=i_("dataError");class Lv extends Sv{constructor({message:e}){super({message:e,template:kv,className:xv.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[S_.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");const e=await v_(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}}const Ev=i_("preview","previewEmoji","previewName","tagList","tag"),Nv=new O_((({classes:e,tag:t})=>`\n <li class="${e.tag}">${t}</li>\n`)),Dv=new O_((({classes:e})=>`\n <div class="${e.preview}">\n <div class="${e.previewEmoji}"></div>\n <div class="${e.previewName}"></div>\n <ul class="${e.tagList}"></ul>\n </div>\n`));class Tv extends S_{constructor(){super({template:Dv,classes:Ev})}initialize(){this.uiElements={emoji:S_.byClass(Ev.previewEmoji),name:S_.byClass(Ev.previewName),tagList:S_.byClass(Ev.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(s_(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";const t=e.tags.map((e=>Nv.renderSync({tag:e,classes:Ev})));s_(this.ui.tagList,...t)}}hidePreview(){o_(this.ui.emoji),o_(this.ui.name),o_(this.ui.tagList)}}const Iv=new O_((({classes:e,i18n:t})=>`\n <button title="${t.get("search.clear")}" class="${e.clearSearchButton}">\n <i data-icon="xmark"></i>\n </button>\n`)),Av=new O_((({classes:e,i18n:t})=>`\n<div class="${e.searchContainer}">\n <input class="${e.searchField}" placeholder="${t.get("search")}">\n <span class="${e.searchAccessory}"></span>\n</div>\n`),{mode:"async"}),Mv=i_("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound");class Rv extends S_{constructor({categories:e,emojiVersion:t}){super({template:Av,classes:Mv}),this.categories=e.filter((e=>"recents"!==e.key)),this.emojiVersion=t,this.search=function(e,t){let i=null;return(...t)=>{i&&window.clearTimeout(i),i=window.setTimeout((()=>{e(...t),i=null}),100)}}(this.search.bind(this))}initialize(){this.uiElements={searchField:S_.byClass(Mv.searchField),searchAccessory:S_.byClass(Mv.searchAccessory)},this.uiEvents=[S_.childEvent("searchField","keydown",this.onKeyDown),S_.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=L_("search"),this.notFoundMessage=this.viewFactory.create(Sv,{message:this.i18n.get("search.notFound"),className:Mv.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Sv,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=Iv.render({classes:Mv,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",(e=>this.onClearSearch(e))),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){s_(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",null==(t=this.resultsContainer)||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&"Escape"===e.key&&this.onClearSearch(e)}onKeyDown(e){var t;"Escape"===e.key&&this.searchField.value?this.onClearSearch(e):("Enter"===e.key||"ArrowDown"===e.key)&&this.resultsContainer&&(e.preventDefault(),null==(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{const t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){const i=new fv;this.resultsContainer=this.viewFactory.create(hv,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:i}),this.resultsContainer.renderSync(),null!=(e=this.resultsContainer)&&e.el&&(i.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",(e=>this.handleResultsKeydown(e))),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch{this.events.emit("content:show",this.errorMessage)}}}const Ov=new O_((({classes:e})=>`\n <div class="${e.variantOverlay}">\n <div class="${e.variantPopup}">\n <div data-view="emojis" data-render="sync"></div>\n </div>\n </div>\n`)),Pv=i_("variantOverlay","variantPopup"),Fv={easing:"ease-in-out",duration:250,fill:"both"},Bv={opacity:[0,1]},Hv={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]};class Wv extends S_{constructor({emoji:e,parent:t}){super({template:Ov,classes:Pv,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new b_,this.animateShow=()=>Promise.all([e_(this.el,Bv,Fv,this.options),e_(this.ui.popup,Hv,Fv,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:S_.byClass(Pv.variantPopup)},this.uiEvents=[S_.uiEvent("click",this.handleClick),S_.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){const e={...Fv,direction:"reverse"};return Promise.all([e_(this.el,Bv,e,this.options),e_(this.ui.popup,Hv,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){"Escape"===e.key&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){this.getEmoji(this.focusedEmojiIndex).tabIndex=-1,this.focusedEmojiIndex=e;const t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=0,t.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){const e={...this.emoji,skins:null},t=(this.emoji.skins||[]).map((e=>({...e,label:this.emoji.label,tags:this.emoji.tags}))),i=[e,...t];return this.emojiContainer=this.viewFactory.create(hv,{emojis:i,preview:!1}),super.renderSync({emojis:this.emojiContainer}),i.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",i.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}}const Vv=new O_((({classes:e,i18n:t,category:i,pickerId:n,icon:o})=>`\n<li class="${e.categoryTab}">\n <button\n aria-selected="false"\n role="tab"\n class="${e.categoryButton}"\n tabindex="-1"\n title="${t.get(`categories.${i.key}`,i.message||i.key)}"\n type="button"\n data-category="${i.key}"\n id="${n}-category-${i.key}"\n >\n <i data-icon="${o}"></i>\n</li>\n`)),zv=i_("categoryTab","categoryTabActive","categoryButton");class Uv extends S_{constructor({category:e,icon:t}){super({template:Vv,classes:zv}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:S_.byClass(zv.categoryButton)},this.uiEvents=[S_.childEvent("button","click",this.selectCategory),S_.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){const{changeFocusable:i,performFocus:n,scroll:o}={changeFocusable:!0,performFocus:!0,scroll:!0,...t};this.el.classList.toggle(zv.categoryTabActive,e),i&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&n&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}}const jv=new O_((({classes:e})=>`\n <div class="${e.categoryButtonsContainer}">\n <ul role="tablist" class="${e.categoryButtons}">\n <div data-placeholder="tabs"></div>\n </ul>\n </div>\n`)),Kv=i_("categoryButtons","categoryButtonsContainer");class qv extends S_{constructor({categories:e}){super({template:jv,classes:Kv}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[S_.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){const e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map((e=>this.viewFactory.create(Uv,{category:e,icon:x_[e.key]}))),super.renderSync({tabs:this.tabViews.map((e=>e.renderSync()))}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();const i=this.currentTabView,n=this.tabViews[e];i.setActive(!1,t),n.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{const t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}}const $v=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function Gv(e,t){return Array.from({length:e},(()=>t)).join("")}const Qv=new O_((e=>e.isLoaded?function(e){const{classes:t,theme:i,className:n=""}=e;return`\n <div class="picmo__picker ${t.picker} ${i} ${n}">\n ${function({showHeader:e,classes:t}){return e?`\n <header class="${t.header}">\n <div data-view="search"></div>\n <div data-view="categoryTabs" data-render="sync"></div>\n </header>\n `:""}(e)}\n <div class="${t.content}">\n <div data-view="emojiArea"></div>\n </div>\n <div data-view="preview"></div>\n </div>\n `}(e):function(e){const{emojiCount:t,classes:i,theme:n,className:o,categoryCount:s}=e;return`\n <div class="picmo__picker ${i.skeleton} ${i.picker} ${n} ${o}">\n ${(({showHeader:t,classes:i})=>t?`\n <header class="${i.headerSkeleton}">\n ${(({showSearch:e,classes:t})=>e?`\n <div class="${t.searchSkeleton}">\n <div class="${t.searchInput} ${t.placeholder}"></div>\n </div>\n `:"")(e)}\n ${(({showCategoryTabs:e,classes:t})=>e?`\n <div class="${t.categoryTabsSkeleton}">\n ${Gv(s,`<div class="${t.placeholder} ${t.categoryTab}"></div>`)}\n </div>\n `:"")(e)}\n </header>\n `:"")(e)}\n <div class="${i.contentSkeleton}">\n <div class="${i.placeholder} ${i.categoryName}"></div>\n <div class="${i.emojiGrid}">\n ${Gv(t,`<div class="${i.placeholder} ${i.emoji}"></div>`)}\n </div>\n </div>\n ${(({showPreview:e,classes:t})=>e?`\n <div class="${t.previewSkeleton}">\n <div class="${t.placeholder} ${t.previewEmoji}"></div>\n <div class="${t.placeholder} ${t.previewName}"></div>\n <ul class="${t.tagList}">\n ${Gv(3,`<li class="${t.placeholder} ${t.tag}"></li>`)}\n </ul>\n </div>\n `:"")(e)}\n </div>\n `}(e))),Yv=i_("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),Zv={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"};class Xv extends S_{constructor(){super({template:Qv,classes:Yv}),this.pickerReady=!1,this.externalEvents=new tv,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(Zv[e],t.toString()),theme:e=>{const t=this.options.theme,i=this.el.closest(`.${t}`);this.el.classList.remove(t),null==i||i.classList.remove(t),this.el.classList.add(e),null==i||i.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:S_.byClass(Yv.content),header:S_.byClass(Yv.header)},this.uiEvents=[S_.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),null==(e=this.search)||e.destroy(),this.emojiArea.destroy(),null==(t=this.categoryTabs)||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){const t=e.ctrlKey||e.metaKey;"s"===e.key&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(Tv)),this.options.showSearch&&(this.search=this.viewFactory.create(Rv,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(qv,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(Cv,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(Zv).forEach((e=>{this.options[e]&&this.el.style.setProperty(Zv[e],this.options[e].toString())}))}updateStyleProperty(e,t){this.el.style.setProperty(Zv[e],t.toString())}reinitialize(){this.renderSync()}onError(e){const t=this.viewFactory.create(Lv,{message:this.i18n.get("error.load")}),i=this.el.offsetHeight||375;throw this.el.style.height=`${i}px`,s_(this.el,t.renderSync()),e}async onDataReady(e){const t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,"auto"===this.options.emojiVersion?this.emojiVersion=function(){var e;const t=$v.find((e=>function(e){const t=document.createElement("canvas").getContext("2d");if(t)return t.textBaseline="top",t.font="32px Arial",t.fillText(e,0,0),0!==t.getImageData(16,16,1,1).data[0]}(e.emoji)));return null!=(e=null==t?void 0:t.version)?e:1}()||parseFloat("14.0"):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);const[i,n,o,s]=this.buildChildViews();await super.render({isLoaded:!0,search:n,categoryTabs:s,emojiArea:o,preview:i,showHeader:Boolean(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(e){this.events.emit("error",e)}}renderSync(){var e;let t=(null==(e=this.options.categories)?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return s_(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(!0===this.options.autoFocusSearch)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||null==(e=this.getInitialFocusTarget())||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),null==(t=this.search)||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,i;e!==this.currentView&&(this.currentView!==this.emojiArea&&(null==(t=this.currentView)||t.destroy()),this.ui.pickerContent.classList.toggle(Yv.fullHeight,e!==this.emojiArea),s_(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):null==(i=this.categoryTabs)||i.el.remove())}hideVariantPopup(){var e;null==(e=this.variantPopup)||e.destroy()}isPickerClick(e){var t,i;const n=e.target,o=this.el.contains(n),s=null==(i=null==(t=this.variantPopup)?void 0:t.el)?void 0:i.contains(n);return o||s}async selectEmoji({emoji:e}){var t,i;(null==(t=e.skins)?void 0:t.length)&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await(null==(i=this.variantPopup)?void 0:i.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){const t=document.activeElement;this.events.once("variantPopup:hide",(()=>{null==t||t.focus()})),this.variantPopup=this.viewFactory.create(Wv,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach((t=>{this.updaters[t](e[t])})),Object.assign(this.options,e)}}class Jv{constructor({events:e,i18n:t,renderer:i,emojiData:n,options:o,customEmojis:s=[],pickerId:r}){this.events=e,this.i18n=t,this.renderer=i,this.emojiData=n,this.options=o,this.customEmojis=s,this.pickerId=r}setEmojiData(e){this.emojiData=Promise.resolve(e)}create(e,...t){const i=new e(...t);return i.setPickerId(this.pickerId),i.setEvents(this.events),i.setI18n(this.i18n),i.setRenderer(this.renderer),i.setEmojiData(this.emojiData),i.setOptions(this.options),i.setCustomEmojis(this.customEmojis),i.viewFactory=this,i.initialize(),i}}var eb;class tb{constructor(e={}){zf(this,eb,void 0),Uf(this,eb,new Map(Object.entries(e)))}get(e,t=e){return Vf(this,eb).get(e)||t}}function ib(){let e=!1;return function(t){!e&&(function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(t),e=!0)}}eb=new WeakMap;let nb=0;const ob=ib();function sb(e){return e.split("-")[0]}function rb(e){return e.split("-")[1]}function ab(e){return["top","bottom"].includes(sb(e))?"x":"y"}function lb(e){return"y"===e?"height":"width"}function cb(e,t,i){let{reference:n,floating:o}=e;const s=n.x+n.width/2-o.width/2,r=n.y+n.height/2-o.height/2,a=ab(t),l=lb(a),c=n[l]/2-o[l]/2,h="x"===a;let d;switch(sb(t)){case"top":d={x:s,y:n.y-o.height};break;case"bottom":d={x:s,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:r};break;case"left":d={x:n.x-o.width,y:r};break;default:d={x:n.x,y:n.y}}switch(rb(t)){case"start":d[a]-=c*(i&&h?-1:1);break;case"end":d[a]+=c*(i&&h?-1:1)}return d}function hb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function db(e,t){var i;void 0===t&&(t={});const{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:g=0}=t,p=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(g),m=a[u?"floating"===d?"reference":"floating":d],f=hb(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),_=hb(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...r.floating,x:n,y:o}:r.reference,offsetParent:await(null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),strategy:l}):r[d]);return{top:f.top-_.top+p.top,bottom:_.bottom-f.bottom+p.bottom,left:f.left-_.left+p.left,right:_.right-f.right+p.right}}const ub=Math.min,gb=Math.max;function pb(e,t,i){return gb(e,ub(t,i))}const mb={left:"right",right:"left",bottom:"top",top:"bottom"};function fb(e){return e.replace(/left|right|bottom|top/g,(e=>mb[e]))}function _b(e,t,i){void 0===i&&(i=!1);const n=rb(e),o=ab(e),s=lb(o);let r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=fb(r)),{main:r,cross:fb(r)}}const vb={start:"end",end:"start"};function bb(e){return e.replace(/start|end/g,(e=>vb[e]))}const Cb=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),yb=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var i,n,o,s,r;const{x:a,y:l,rects:c,middlewareData:h,placement:d,platform:u,elements:g}=t,{alignment:p=null,allowedPlacements:m=Cb,autoAlignment:f=!0,..._}=e,v=function(e,t,i){return(e?[...i.filter((t=>rb(t)===e)),...i.filter((t=>rb(t)!==e))]:i.filter((e=>sb(e)===e))).filter((i=>!e||rb(i)===e||!!t&&bb(i)!==i))}(p,f,m),b=await db(t,_),C=null!=(i=null==(n=h.autoPlacement)?void 0:n.index)?i:0,y=v[C];if(null==y)return{};const{main:w,cross:S}=_b(y,c,await(null==u.isRTL?void 0:u.isRTL(g.floating)));if(d!==y)return{x:a,y:l,reset:{placement:v[0]}};const k=[b[sb(y)],b[w],b[S]],x=[...null!=(o=null==(s=h.autoPlacement)?void 0:s.overflows)?o:[],{placement:y,overflows:k}],L=v[C+1];if(L)return{data:{index:C+1,overflows:x},reset:{placement:L}};const E=x.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),N=null==(r=E.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:r.placement,D=null!=N?N:E[0].placement;return D!==d?{data:{index:C+1,overflows:x},reset:{placement:D}}:{}}}},wb=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i;const{placement:n,middlewareData:o,rects:s,initialPlacement:r,platform:a,elements:l}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",flipAlignment:g=!0,...p}=e,m=sb(n),f=d||(m!==r&&g?function(e){const t=fb(e);return[bb(e),t,bb(t)]}(r):[fb(r)]),_=[r,...f],v=await db(t,p),b=[];let C=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&b.push(v[m]),h){const{main:e,cross:t}=_b(n,s,await(null==a.isRTL?void 0:a.isRTL(l.floating)));b.push(v[e],v[t])}if(C=[...C,{placement:n,overflows:b}],!b.every((e=>e<=0))){var y,w;const e=(null!=(y=null==(w=o.flip)?void 0:w.index)?y:0)+1,t=_[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let i="bottom";switch(u){case"bestFit":{var S;const e=null==(S=C.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0].placement;e&&(i=e);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}},Sb=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:i,y:n}=t,o=await async function(e,t){const{placement:i,platform:n,elements:o}=e,s=await(null==n.isRTL?void 0:n.isRTL(o.floating)),r=sb(i),a=rb(i),l="x"===ab(i),c=["left","top"].includes(r)?-1:1,h=s&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:u,crossAxis:g,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof p&&(g="end"===a?-1*p:p),l?{x:g*h,y:u*c}:{x:u*c,y:g*h}}(t,e);return{x:i+o.x,y:n+o.y,data:o}}}},kb=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=e,c={x:i,y:n},h=await db(t,l),d=ab(sb(o)),u=function(e){return"x"===e?"y":"x"}(d);let g=c[d],p=c[u];if(s){const e="y"===d?"bottom":"right";g=pb(g+h["y"===d?"top":"left"],g,g-h[e])}if(r){const e="y"===u?"bottom":"right";p=pb(p+h["y"===u?"top":"left"],p,p-h[e])}const m=a.fn({...t,[d]:g,[u]:p});return{...m,data:{x:m.x-i,y:m.y-n}}}}};function xb(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Lb(e){if(null==e)return window;if(!xb(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Eb(e){return Lb(e).getComputedStyle(e)}function Nb(e){return xb(e)?"":e?(e.nodeName||"").toLowerCase():""}function Db(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Tb(e){return e instanceof Lb(e).HTMLElement}function Ib(e){return e instanceof Lb(e).Element}function Ab(e){return!(typeof ShadowRoot>"u")&&(e instanceof Lb(e).ShadowRoot||e instanceof ShadowRoot)}function Mb(e){const{overflow:t,overflowX:i,overflowY:n}=Eb(e);return/auto|scroll|overlay|hidden/.test(t+n+i)}function Rb(e){return["table","td","th"].includes(Nb(e))}function Ob(e){const t=/firefox/i.test(Db()),i=Eb(e);return"none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||["transform","perspective"].includes(i.willChange)||t&&"filter"===i.willChange||t&&!!i.filter&&"none"!==i.filter}function Pb(){return!/^((?!chrome|android).)*safari/i.test(Db())}const Fb=Math.min,Bb=Math.max,Hb=Math.round;function Wb(e,t,i){var n,o,s,r;void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect();let l=1,c=1;t&&Tb(e)&&(l=e.offsetWidth>0&&Hb(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Hb(a.height)/e.offsetHeight||1);const h=Ib(e)?Lb(e):window,d=!Pb()&&i,u=(a.left+(d&&null!=(n=null==(o=h.visualViewport)?void 0:o.offsetLeft)?n:0))/l,g=(a.top+(d&&null!=(s=null==(r=h.visualViewport)?void 0:r.offsetTop)?s:0))/c,p=a.width/l,m=a.height/c;return{width:p,height:m,top:g,right:u+p,bottom:g+m,left:u,x:u,y:g}}function Vb(e){return((function(e){return e instanceof Lb(e).Node}(e)?e.ownerDocument:e.document)||window.document).documentElement}function zb(e){return Ib(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ub(e){return Wb(Vb(e)).left+zb(e).scrollLeft}function jb(e,t,i){const n=Tb(t),o=Vb(t),s=Wb(e,n&&function(e){const t=Wb(e);return Hb(t.width)!==e.offsetWidth||Hb(t.height)!==e.offsetHeight}(t),"fixed"===i);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(n||!n&&"fixed"!==i)if(("body"!==Nb(t)||Mb(o))&&(r=zb(t)),Tb(t)){const e=Wb(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Ub(o));return{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function Kb(e){return"html"===Nb(e)?e:e.assignedSlot||e.parentNode||(Ab(e)?e.host:null)||Vb(e)}function qb(e){return Tb(e)&&"fixed"!==Eb(e).position?function(e){let{offsetParent:t}=e,i=e,n=!1;for(;i&&i!==t;){const{assignedSlot:e}=i;if(e){let o=e.offsetParent;if("contents"===Eb(e).display){const t=e.hasAttribute("style"),n=e.style.display;e.style.display=Eb(i).display,o=e.offsetParent,e.style.display=n,t||e.removeAttribute("style")}i=e,t!==o&&(t=o,n=!0)}else if(Ab(i)&&i.host&&n)break;i=Ab(i)&&i.host||i.parentNode}return t}(e):null}function $b(e){const t=Lb(e);let i=qb(e);for(;i&&Rb(i)&&"static"===Eb(i).position;)i=qb(i);return i&&("html"===Nb(i)||"body"===Nb(i)&&"static"===Eb(i).position&&!Ob(i))?t:i||function(e){let t=Kb(e);for(Ab(t)&&(t=t.host);Tb(t)&&!["html","body"].includes(Nb(t));){if(Ob(t))return t;{const e=t.parentNode;t=Ab(e)?e.host:e}}return null}(e)||t}function Gb(e){if(Tb(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Wb(e);return{width:t.width,height:t.height}}function Qb(e){const t=Kb(e);return["html","body","#document"].includes(Nb(t))?e.ownerDocument.body:Tb(t)&&Mb(t)?t:Qb(t)}function Yb(e,t){var i;void 0===t&&(t=[]);const n=Qb(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),s=Lb(n),r=o?[s].concat(s.visualViewport||[],Mb(n)?n:[]):n,a=t.concat(r);return o?a:a.concat(Yb(r))}function Zb(e,t,i){return"viewport"===t?hb(function(e,t){const i=Lb(e),n=Vb(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;const e=Pb();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a,y:l}}(e,i)):Ib(t)?function(e,t){const i=Wb(e,!1,"fixed"===t),n=i.top+e.clientTop,o=i.left+e.clientLeft;return{top:n,left:o,x:o,y:n,right:o+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,i):hb(function(e){var t;const i=Vb(e),n=zb(e),o=null==(t=e.ownerDocument)?void 0:t.body,s=Bb(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=Bb(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-n.scrollLeft+Ub(e);const l=-n.scrollTop;return"rtl"===Eb(o||i).direction&&(a+=Bb(i.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}(Vb(e)))}function Xb(e){const t=Yb(e),i=["absolute","fixed"].includes(Eb(e).position)&&Tb(e)?$b(e):e;return Ib(i)?t.filter((e=>Ib(e)&&function(e,t){const i=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&Ab(i)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(e,i)&&"body"!==Nb(e))):[]}const Jb={getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[..."clippingAncestors"===i?Xb(t):[].concat(i),n],r=s[0],a=s.reduce(((e,i)=>{const n=Zb(t,i,o);return e.top=Bb(n.top,e.top),e.right=Fb(n.right,e.right),e.bottom=Fb(n.bottom,e.bottom),e.left=Bb(n.left,e.left),e}),Zb(t,r,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:i,strategy:n}=e;const o=Tb(i),s=Vb(i);if(i===s)return t;let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==n)&&(("body"!==Nb(i)||Mb(s))&&(r=zb(i)),Tb(i))){const e=Wb(i,!0);a.x=e.x+i.clientLeft,a.y=e.y+i.clientTop}return{...t,x:t.x-r.scrollLeft+a.x,y:t.y-r.scrollTop+a.y}},isElement:Ib,getDimensions:Gb,getOffsetParent:$b,getDocumentElement:Vb,getElementRects:e=>{let{reference:t,floating:i,strategy:n}=e;return{reference:jb(t,$b(i),n),floating:{...Gb(i),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Eb(e).direction};async function eC(e,t,i,n){if(!n)throw new Error("Must provide a positioning option");return await("string"==typeof n?async function(e,t,i,n){if(!i)throw new Error("Reference element is required for relative positioning");let o;return o="auto"===n?{middleware:[yb(),kb(),Sb({mainAxis:5,crossAxis:12})]}:{placement:n,middleware:[wb(),kb(),Sb(5)]},function(e,t,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=!0,animationFrame:a=!1}=n,l=o&&!a,c=s&&!a,h=l||c?[...Ib(e)?Yb(e):[],...Yb(t)]:[];h.forEach((e=>{l&&e.addEventListener("scroll",i,{passive:!0}),c&&e.addEventListener("resize",i)}));let d=null;if(r){let n=!0;d=new ResizeObserver((()=>{n||i(),n=!1})),Ib(e)&&!a&&d.observe(e),d.observe(t)}let u,g=a?Wb(e):null;return a&&function t(){const n=Wb(e);g&&(n.x!==g.x||n.y!==g.y||n.width!==g.width||n.height!==g.height)&&i(),g=n,u=requestAnimationFrame(t)}(),i(),()=>{var e;h.forEach((e=>{l&&e.removeEventListener("scroll",i),c&&e.removeEventListener("resize",i)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}(i,t,(async()=>{if((!i.isConnected||!i.offsetParent)&&function(e){switch(e.options.onPositionLost){case"close":return e.close(),!0;case"destroy":return e.destroy(),!0;case"hold":return!0}}(e))return;const{x:n,y:s}=await((e,t,i)=>(async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,a=await(null==r.isRTL?void 0:r.isRTL(t));let l=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:h}=cb(l,n,a),d=n,u={},g=0;for(let i=0;i<s.length;i++){const{name:p,fn:m}=s[i],{x:f,y:_,data:v,reset:b}=await m({x:c,y:h,initialPlacement:n,placement:d,strategy:o,middlewareData:u,rects:l,platform:r,elements:{reference:e,floating:t}});c=null!=f?f:c,h=null!=_?_:h,u={...u,[p]:{...u[p],...v}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await r.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:h}=cb(l,d,a))),i=-1)}return{x:c,y:h,placement:d,strategy:o,middlewareData:u}})(e,t,{platform:Jb,...i}))(i,t,o);Object.assign(t.style,{position:"absolute",left:`${n}px`,top:`${s}px`})}))}(e,t,i,n):function(e,t){return e.style.position="fixed",Object.entries(t).forEach((([t,i])=>{e.style[t]=i})),()=>{}}(t,n))}const tC={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function iC(e={}){return{...tC,rootElement:document.body,...e}}const nC=i_("popupContainer","closeButton");class oC{constructor(e,t){this.isOpen=!1,this.externalEvents=new J_,this.options={...iC(t),...$_(e)},this.popupEl=document.createElement("div"),this.popupEl.classList.add(nC.popupContainer),this.popupEl.classList.add(this.options.theme),t.className&&this.popupEl.classList.add(t.className),this.options.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.type="button",this.closeButton.classList.add(nC.closeButton),this.closeButton.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>',this.closeButton.addEventListener("click",(()=>{this.close()})),this.popupEl.appendChild(this.closeButton));const i=document.createElement("div");this.popupEl.appendChild(i),this.picker=function(e){ob('.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}\n');const t=$_(e),i=((null==t?void 0:t.custom)||[]).map((e=>({...e,custom:!0,tags:["custom",...e.tags||[]]}))),n=new ev,o=function(e){return v_(e.locale,e.dataStore,e.messages,e.emojiData)}(t),s=new tb(t.i18n);o.then((e=>{n.emit("data:ready",e)})).catch((e=>{n.emit("error",e)}));const r=new Jv({events:n,i18n:s,customEmojis:i,renderer:t.renderer,options:t,emojiData:o,pickerId:`picmo-${Date.now()}-${nb++}`}).create(Xv);return r.renderSync(),r}({...this.options,rootElement:i}),this.focusTrap=new b_,this.picker.addEventListener("data:ready",(()=>{this.focusTrap.activate(this.picker.el),this.picker.setInitialFocus()})),this.options.hideOnEmojiSelect&&this.picker.addEventListener("emoji:select",(()=>{var e;this.close(),null==(e=this.triggerElement)||e.focus()})),this.options.hideOnClickOutside&&(this.onDocumentClick=this.onDocumentClick.bind(this),document.addEventListener("click",this.onDocumentClick)),this.options.hideOnEscape&&(this.handleKeydown=this.handleKeydown.bind(this),this.popupEl.addEventListener("keydown",this.handleKeydown)),this.referenceElement=this.options.referenceElement,this.triggerElement=this.options.triggerElement}addEventListener(e,t){this.externalEvents.on(e,t),this.picker.addEventListener(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t),this.picker.removeEventListener(e,t)}handleKeydown(e){var t;"Escape"===e.key&&(this.close(),null==(t=this.triggerElement)||t.focus())}async destroy(){this.isOpen&&await this.close(),document.removeEventListener("click",this.onDocumentClick),this.picker.destroy(),this.externalEvents.removeAll()}toggle(e){return this.isOpen?this.close():this.open(e)}async open({triggerElement:e,referenceElement:t}={}){this.isOpen||(e&&(this.triggerElement=e),t&&(this.referenceElement=t),await this.initiateOpenStateChange(!0),this.popupEl.style.opacity="0",this.options.rootElement.appendChild(this.popupEl),await this.setPosition(),this.picker.reset(!1),await this.animatePopup(!0),await this.animateCloseButton(!0),this.picker.setInitialFocus(),this.externalEvents.emit("picker:open"))}async close(){var e;!this.isOpen||(await this.initiateOpenStateChange(!1),await this.animateCloseButton(!1),await this.animatePopup(!1),this.popupEl.remove(),this.picker.reset(),null==(e=this.positionCleanup)||e.call(this),this.focusTrap.deactivate(),this.externalEvents.emit("picker:close"))}getRunningAnimations(){return this.picker.el.getAnimations().filter((e=>"running"===e.playState))}async setPosition(){var e;null==(e=this.positionCleanup)||e.call(this),this.positionCleanup=await eC(this,this.popupEl,this.referenceElement,this.options.position)}awaitPendingAnimations(){return Promise.all(this.getRunningAnimations().map((e=>e.finished)))}onDocumentClick(e){var t;const i=e.target,n=null==(t=this.triggerElement)?void 0:t.contains(i);this.isOpen&&!this.picker.isPickerClick(e)&&!n&&this.close()}animatePopup(e){return e_(this.popupEl,{opacity:[0,1],transform:["scale(0.9)","scale(1)"]},{duration:150,id:e?"show-picker":"hide-picker",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}animateCloseButton(e){if(this.closeButton)return e_(this.closeButton,{opacity:[0,1]},{duration:25,id:e?"show-close":"hide-close",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}async initiateOpenStateChange(e){this.isOpen=e,await this.awaitPendingAnimations()}}const sC=ib();const rC={mounted:function(){var e=this.el.querySelector("[data-emoji-button]"),t=this.el.querySelector("[data-emoji-preview]"),i=this.el.querySelector("[data-emoji-input]"),n=function(e,t){return sC(".picmo__popupContainer{display:flex;flex-direction:column;position:absolute}.picmo__popupContainer .picmo__closeButton{position:absolute;opacity:0;background:transparent;border:none;z-index:1;right:0;top:0;cursor:pointer;padding:4px;align-self:flex-end;transform:translate(50%,-50%);background:#999999;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%}.picmo__popupContainer .picmo__closeButton:hover{background:var(--accent-color)}.picmo__popupContainer .picmo__closeButton svg{fill:#fff;width:1.25rem;height:1.25rem}\n"),new oC({autoFocus:"auto",showPreview:!1},t)}(0,{triggerElement:e,referenceElement:e,position:"bottom"});n.addEventListener("emoji:select",(function(e){var n=e.emoji;t.innerHTML=n,i.value=n})),e.addEventListener("click",(function(e){n.toggle()}))}},aC={mounted:function(){this.focus()},updated:function(){this.el!==document.activeElement&&this.focus()},focus:function(){kt(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}};function lC(e){var t=document.createRange();t.selectNodeContents(e),t.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}const cC={mounted:function(){var e=this;this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=wm.subscribe("navigation",(function(t){e.handleNavigationEvent(t)}))},updated:function(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed:function(){this.unsubscribeFromNavigationEvents()},getProps:function(){return{focusableId:gt(this.el,"data-focusable-id"),onValueChange:gt(this.el,"data-on-value-change"),metadata:gt(this.el,"data-metadata")}},initializeHeadingEl:function(){var e=this,t=this.el.querySelector("[data-el-heading]");t!==this.headingEl&&(this.headingEl=t,this.headingEl.addEventListener("paste",(function(e){e.preventDefault();var t=e.clipboardData.getData("text/plain").replace("\n"," ");document.execCommand("insertText",!1,t)})),this.headingEl.addEventListener("keydown",(function(e){"Enter"===e.key&&e.preventDefault()})),this.headingEl.addEventListener("blur",(function(t){setTimeout((function(){e.isFocused&&e.insertMode&&(e.headingEl.focus(),lC(e.headingEl))}),0)})))},handleNavigationEvent:function(e){"element_focused"===e.type?this.handleElementFocused(e.focusableId,e.scroll):"insert_mode_changed"===e.type&&this.handleInsertModeChanged(e.enabled)},handleElementFocused:function(e,t){this.props.focusableId===e?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),t&&Nt(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleInsertModeChanged:function(e){this.isFocused&&!this.insertMode&&e?(this.insertMode=e,this.el.setAttribute("phx-update","ignore"),this.headingEl.setAttribute("contenteditable",""),this.headingEl.focus(),lC(this.headingEl)):this.insertMode&&!e&&(this.insertMode=e,this.headingEl.removeAttribute("contenteditable"),this.el.removeAttribute("phx-update"),this.pushEvent(this.props.onValueChange,{value:this.headingEl.textContent.trim(),metadata:this.props.metadata}))}};const hC={mounted:function(){this.props=this.getProps(),this.sourceEl=Rt(this.el,"[data-source]"),this.targetEl=Rt(this.el,"[data-target]"),this.updateDOM()},updated:function(){this.props=this.getProps(),this.updateDOM()},getProps:function(){return{language:gt(this.el,"data-language")}},updateDOM:function(){var e=this;jp(this.sourceEl.innerText,this.props.language).then((function(t){e.targetEl.innerHTML=t,e.el.setAttribute("data-highlighted","")}))}};function dC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||uC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uC(e,t){if(e){if("string"==typeof e)return gC(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?gC(e,t):void 0}}function gC(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var pC=["bg-yellow-100","border-yellow-300"],mC={mounted:function(){var e=this;this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.previewEl=this.el.querySelector("[data-preview]"),this.cameraPreviewEl=this.el.querySelector("[data-camera-preview]"),this.cameraListEl=this.el.querySelector("[data-camera-list]"),this.cameraItemTemplateEl=this.cameraListEl.firstElementChild,this.cameraItemTemplateEl.remove(),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.openCameraButton=this.el.querySelector("[data-btn-open-camera]"),this.captureCameraButton=this.el.querySelector("[data-btn-capture-camera]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.cameraListPopulated=!1,this.cameraVideoEl=null,this.cameraStream=null,this.handleEvent("image_input_init:".concat(this.props.id),(function(t){var i=function(e,t){if("png"===t||"jpeg"===t){var i="data:image/".concat(t,";base64,").concat(e.data),n=document.createElement("img");return n.src=i,n}if("rgb"===t){var o=document.createElement("canvas");o.height=e.height,o.width=e.width;var s=function(e,t,i){for(var n=t*i,o=new Uint8Array(e),s=new Uint8ClampedArray(4*n),r=0;r<n;r++)s[4*r]=o[3*r],s[4*r+1]=o[3*r+1],s[4*r+2]=o[3*r+2],s[4*r+3]=255;return new ImageData(s,t,i)}(Bt(e.data),e.width,e.height);return o.getContext("2d").putImageData(s,0,0),o}throw new Error("Unexpected format: ".concat(t))}(t,e.props.format);e.setPreview(i)})),this.uploadButton.addEventListener("click",(function(t){e.inputEl.click()})),this.inputEl.addEventListener("change",(function(t){var i=dC(t.target.files,1)[0];i&&e.loadFile(i)})),this.el.addEventListener("dragover",(function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"})),this.el.addEventListener("drop",(function(t){t.stopPropagation(),t.preventDefault();var i=dC(t.dataTransfer.files,1)[0];i&&e.loadFile(i),e.closeCameraView()})),this.el.addEventListener("dragenter",(function(t){var i;(i=e.el.classList).add.apply(i,pC)})),this.el.addEventListener("dragleave",(function(t){var i;e.el.contains(t.relatedTarget)||(i=e.el.classList).remove.apply(i,pC)})),this.el.addEventListener("drop",(function(t){var i;(i=e.el.classList).remove.apply(i,pC)})),this.openCameraButton.addEventListener("click",(function(t){e.cameraListPopulated||(e.renderCameraList(),e.cameraListPopulated=!0)})),this.cameraListEl.addEventListener("click",(function(t){var i=t.target.closest("[data-camera-id]");if(i){var n=i.dataset.cameraId;e.openCameraView(n)}})),this.captureCameraButton.addEventListener("click",(function(t){var i=e.toCanvas(e.cameraVideoEl,e.cameraVideoEl.videoWidth,e.cameraVideoEl.videoHeight);e.setPreview(i),e.pushImage(i),e.closeCameraView()})),this.cancelButton.addEventListener("click",(function(t){e.closeCameraView()}))},updated:function(){this.props=this.getProps()},getProps:function(){return{id:gt(this.el,"data-id"),phxTarget:gt(this.el,"data-phx-target",ft),height:pt(this.el,"data-height",null,ft),width:pt(this.el,"data-width",null,ft),format:gt(this.el,"data-format"),fit:gt(this.el,"data-fit")}},loadFile:function(e){var t=this,i=new FileReader;i.onload=function(e){var i=document.createElement("img");i.addEventListener("load",(function(e){var n=t.toCanvas(i,i.width,i.height);t.setPreview(n),t.pushImage(n)})),i.src=e.target.result},i.readAsDataURL(e)},openCameraView:function(e){var t=this;this.cameraPreviewEl.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.captureCameraButton.classList.remove("hidden"),this.previewEl.classList.add("hidden"),this.openCameraButton.classList.add("hidden"),this.uploadButton.classList.add("hidden"),navigator.mediaDevices.getUserMedia(this.cameraConstraints(e)).then((function(e){t.cameraStream=e,t.cameraVideoEl=document.createElement("video"),t.cameraVideoEl.autoplay=!0,t.cameraVideoEl.playsinline=!0,t.cameraVideoEl.muted=!0,t.cameraVideoEl.srcObject=e,t.setCameraPreview(t.cameraVideoEl)})).catch((function(){}))},cameraConstraints:function(e){return"system_default"===e?{audio:!1,video:!0}:{audio:!1,video:{deviceId:e}}},renderCameraList:function(){var e=this;navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then((function(t){return navigator.mediaDevices.enumerateDevices().then((function(i){return e.stopMediaStream(t),i}))})).then((function(t){var i,n=t.filter((function(e){return"videoinput"===e.kind})).map((function(e){return{deviceId:e.deviceId,label:e.label}}));[{deviceId:"system_default",label:"System Default"}].concat((i=n,function(e){if(Array.isArray(e))return gC(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||uC(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).forEach((function(t){var i=t.deviceId,n=t.label,o=e.cameraItemTemplateEl.cloneNode(!0);o.querySelector("[data-camera-id]").setAttribute("data-camera-id",i),o.querySelector("[data-label]").innerHTML=n,e.cameraListEl.appendChild(o)}))})).catch((function(t){console.error(t),e.openCameraButton.disabled=!0}))},closeCameraView:function(){return null!==this.cameraStream&&(this.stopMediaStream(this.cameraStream),this.cameraStream=null),null!==this.cameraVideoEl&&(this.cameraVideoEl.remove(),this.cameraVideoEl=null),this.cameraPreviewEl.classList.add("hidden"),this.cancelButton.classList.add("hidden"),this.captureCameraButton.classList.add("hidden"),this.previewEl.classList.remove("hidden"),this.openCameraButton.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),!0},stopMediaStream:function(e){e.getTracks().forEach((function(e){e.stop()}))},pushImage:function(e){this.pushEventTo(this.props.phxTarget,"change",{data:fC(e,this.props.format),height:e.height,width:e.width})},toCanvas:function(e,t,i){var n=this.props,o=n.width,s=n.height,r=document.createElement("canvas"),a=r.getContext("2d");if(null===o&&null===s||o===t&&s===i)r.width=t,r.height=i,r.getContext("2d").drawImage(e,0,0,t,i,0,0,t,i);else if("contain"===this.props.fit){var l=o/t,c=s/i,h=Math.min(l,c),d=Math.round(t*h),u=Math.round(i*h);r.width=d,r.height=u,a.drawImage(e,0,0,t,i,0,0,d,u)}else if("crop"===this.props.fit){var g=o/t,p=s/i,m=Math.max(g,p),f=Math.round(t*m),_=Math.round(i*m);r.width=o,r.height=s,a.drawImage(e,Math.round((f-o)/m/2),Math.round((_-s)/m/2),t-Math.round((f-o)/m),i-Math.round((_-s)/m),0,0,o,s)}else if("pad"===this.props.fit){var v=o/t,b=s/i,C=Math.min(v,b),y=Math.round(t*C),w=Math.round(i*C);r.width=o,r.height=s,a.fillStyle="black",a.fillRect(0,0,r.width,r.height),a.drawImage(e,0,0,t,i,Math.round((o-y)/2),Math.round((s-w)/2),y,w)}else r.width=o,r.height=s,a.drawImage(e,0,0,t,i,0,0,o,s);return r},setPreview:function(e){e.style.maxHeight="300px",this.previewEl.replaceChildren(e)},setCameraPreview:function(e){e.style.maxHeight="300px",this.cameraPreviewEl.replaceChildren(e)}};function fC(e,t){if("png"===t||"jpeg"===t){var i="data:image/".concat(t,";base64,");return e.toDataURL("image/".concat(t)).slice(i.length)}if("rgb"===t){var n=function(e){for(var t=e.width*e.height,i=new Uint8ClampedArray(3*t),n=0;n<t;n++)i[3*n]=e.data[4*n],i[3*n+1]=e.data[4*n+1],i[3*n+2]=e.data[4*n+2];return i.buffer}(e.getContext("2d").getImageData(0,0,e.width,e.height));return Ft(n)}throw new Error("Unexpected format: ".concat(t))}const _C=mC;var vC={mounted:function(){this.updateSrc()},updated:function(){this.updateSrc()},updateSrc:function(){var e=this.el.src,t="data:image/x-pixel;base64,",i=e.slice(t.length);if(e.startsWith(t)){var n=Bt(i),o=new DataView(n),s=o.getUint32(0,!1),r=o.getUint32(4,!1),a=o.getUint8(8),l=function(e,t,i,n){for(var o=t*i,s=new Uint8Array(e),r=new Uint8ClampedArray(4*o),a=0;a<o;a++)1===n?(r[4*a]=s[a],r[4*a+1]=s[a],r[4*a+2]=s[a],r[4*a+3]=255):2===n?(r[4*a]=s[2*a],r[4*a+1]=s[2*a],r[4*a+2]=s[2*a],r[4*a+3]=s[2*a+1]):3===n?(r[4*a]=s[3*a],r[4*a+1]=s[3*a+1],r[4*a+2]=s[3*a+2],r[4*a+3]=255):4===n&&(r[4*a]=s[4*a],r[4*a+1]=s[4*a+1],r[4*a+2]=s[4*a+2],r[4*a+3]=s[4*a+3]);return new ImageData(r,t,i)}(n.slice(9),r,s,a),c=document.createElement("canvas");c.height=s,c.width=r,c.getContext("2d").putImageData(l,0,0);var h=c.toDataURL("image/png");this.el.src=h}}};const bC=vC;function CC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yC(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yC(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yC(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var wC=document.querySelector("meta[name='csrf-token']").getAttribute("content"),SC=new S(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:wC}}),kC=null;function xC(e){if(e.constructor===ArrayBuffer){var t=function(e){var t=new DataView(e).getUint32(0),i=new Uint8Array(e,4,t),n=e.slice(4+t),o=new TextDecoder;return[JSON.parse(o.decode(i)),n]}(e),i=CC(t,2),n=CC(i[0],2);return[n[0],[n[1],i[1]]]}var o=CC(e.root,2);return[o[0],o[1]]}var LC=null;function EC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return NC(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?NC(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NC(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var DC={mounted:function(){var e,t=this;this.props=this.getProps(),this.id=Tt(),this.childToken=It(40),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout((function(){return t.handleInitTimeout()}),2e3),this.channel=(e=this.props.sessionToken,kC||(SC.connect(),(kC=SC.channel("js_view",{session_token:e})).join()),kC),this.iframeActions=this.createIframe(),this.childReadyPromise=new Promise((function(e,i){t._handleWindowMessage=function(i){i.source===t.iframe.contentWindow&&t.handleChildMessage(i.data,e)},window.addEventListener("message",t._handleWindowMessage)})),this.hiddenInput=document.createElement("input"),this.hiddenInput.style.display="none",this.el.appendChild(this.hiddenInput),this.iframeActions.visibilityPromise.then((function(){t.loadIframe()}));var i=this.channel.on("init:".concat(this.props.ref,":").concat(this.id),(function(e){var i=EC(xC(e),2)[1];t.handleServerInit(i)})),n=this.channel.on("event:".concat(this.props.ref),(function(e){var i=EC(xC(e),2),n=EC(i[0],1)[0],o=i[1];t.handleServerEvent(n,o)})),o=this.channel.on("error:".concat(this.props.ref),(function(e){var i=e.message,n=e.init;t.handleServerError(i,n)})),s=this.channel.on("pong:".concat(this.props.ref),(function(){t.handleServerPong()}));this.unsubscribeFromChannelEvents=function(){t.channel.off("init:".concat(t.props.ref,":").concat(t.id),i),t.channel.off("event:".concat(t.props.ref),n),t.channel.off("error:".concat(t.props.ref),o),t.channel.off("pong:".concat(t.props.ref),s)},this.unsubscribeFromJSViewEvents=wm.subscribe("js_views:".concat(this.props.ref),(function(e){return t.handleJSViewEvent(e)})),this.channel.push("connect",{connect_token:this.props.connectToken,ref:this.props.ref,id:this.id},3e4)},updated:function(){this.props=this.getProps(this)},disconnected:function(){this.el.removeAttribute("id")},destroyed:function(){window.removeEventListener("message",this._handleWindowMessage),this.iframeActions.remove(),this.unsubscribeFromChannelEvents(),this.channel.push("disconnect",{ref:this.props.ref}),this.unsubscribeFromJSViewEvents()},getProps:function(){return{ref:gt(this.el,"data-ref"),assetsBasePath:gt(this.el,"data-assets-base-path"),jsPath:gt(this.el,"data-js-path"),sessionToken:gt(this.el,"data-session-token"),connectToken:gt(this.el,"data-connect-token"),iframePort:gt(this.el,"data-iframe-local-port",ft),iframeUrl:pt(this.el,"data-iframe-url",null),timeoutMessage:gt(this.el,"data-timeout-message")}},createIframe:function(){var e=this;this.iframePlaceholder=document.createElement("div"),this.el.appendChild(this.iframePlaceholder),this.iframe=document.createElement("iframe"),this.iframe.className="w-full h-0 absolute z-[1]";var t=document.querySelector("[data-el-notebook]"),i=t.querySelector("[data-el-notebook-content]"),n=new ResizeObserver((function(t){e.repositionIframe()}));n.observe(i),n.observe(t);var o=new IntersectionObserver((function(t){e.repositionIframe()}),{root:i});o.observe(this.iframePlaceholder),this.iframe.addEventListener("mouseenter",(function(t){e.iframePlaceholder.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0}))})),this.iframe.addEventListener("mouseleave",(function(t){e.iframePlaceholder.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0}))}));var s=null;return{visibilityPromise:new Promise((function(t,i){Et(e.iframePlaceholder)?t():(s=new IntersectionObserver((function(i){Et(e.iframePlaceholder)&&(s.disconnect(),t())}))).observe(e.iframePlaceholder)})),remove:function(){n.disconnect(),o.disconnect(),s&&s.disconnect(),e.iframe.remove(),e.iframePlaceholder.remove()}}},repositionIframe:function(){var e=this.iframe,t=this.iframePlaceholder,i=document.querySelector("[data-el-notebook]");if(Lt(t))e.classList.add("hidden");else{e.classList.remove("hidden");var n=i.getBoundingClientRect(),o=t.getBoundingClientRect(),s=o.top-n.top+i.scrollTop;e.style.top="".concat(s,"px");var r=o.left-n.left+i.scrollLeft;e.style.left="".concat(r,"px"),e.style.height="".concat(o.height,"px"),e.style.width="".concat(o.width,"px")}},loadIframe:function(){var e,t,i,n,o=this,s=document.querySelector("[data-el-js-view-iframes]");(e=this.iframe,t=this.props.iframePort,i=this.props.iframeUrl,n=function(e,t){var i=window.location.protocol;return t?t.replace(/^https?:/,i):"https:"===i?"https://livebook.space/iframe/v4.html":"http://".concat(window.location.hostname,":").concat(e,"/iframe/v4.html")}(t,i),function(e){return LC||(LC=fetch(e).then((function(e){return e.text()})).then((function(e){if("vd7g1B8fLBFZH6C6KNpG4H8B0SQ/oIuqKaTW6jD053A="!==function(e){return Ct()(e).toString(wt())}(e))throw new Error("The loaded iframe content doesn't have the expected checksum")}))),LC}(n).then((function(){e.sandbox="allow-scripts allow-same-origin allow-downloads allow-modals allow-popups",e.allow="accelerometer; ambient-light-sensor; camera; display-capture; encrypted-media; geolocation; gyroscope; microphone; midi; usb; xr-spatial-tracking; clipboard-read; clipboard-write",e.src=n}))).then((function(){s.appendChild(o.iframe)}))},handleChildMessage:function(e,t){if("ready"!==e.type||this.childReady){if(e.token!==this.childToken)throw new Error("Token mismatch");if("resize"===e.type)this.iframePlaceholder.style.height="".concat(e.height,"px"),this.iframe.style.height="".concat(e.height,"px");else if("domEvent"===e.type){var i=this.replicateDomEvent(e.event);e.isTargetEditable?this.hiddenInput.dispatchEvent(i):this.el.dispatchEvent(i)}else if("event"===e.type){var n=e.event,o=e.payload,s=function(e,t){if(Array.isArray(t)&&t[1]&&t[1].constructor===ArrayBuffer){var i=CC(t,2);return function(e,t){var i=(new TextEncoder).encode(JSON.stringify(e)),n=new ArrayBuffer(4+i.byteLength+t.byteLength);return new DataView(n).setUint32(0,i.byteLength),new Uint8Array(n,4,i.byteLength).set(i),new Uint8Array(n,4+i.byteLength).set(new Uint8Array(t)),n}([e,i[0]],i[1])}return{root:[e,t]}}([n,this.props.ref],o);this.channel.push("event",s)}else"syncReply"===e.type?(this.pongCallbackQueue.push(this.syncCallbackQueue.shift()),this.channel.push("ping",{ref:this.props.ref})):"selectSecret"==e.type&&this.pushEvent("select_secret",{js_view_ref:this.props.ref,preselect_name:e.preselectName,options:e.options})}else{var r=window.location.origin+this.props.assetsBasePath;this.postMessage({type:"readyReply",token:this.childToken,baseUrl:r,jsPath:this.props.jsPath}),this.childReady=!0,t()}},postMessage:function(e){this.iframe.contentWindow.postMessage(e,"*")},replicateDomEvent:function(e){return"focus"===e.type?new FocusEvent("focus"):"mousedown"===e.type?new MouseEvent("mousedown",{bubbles:!0}):"keydown"===e.type?new KeyboardEvent(e.type,e.props):void 0},handleInitTimeout:function(){this.initTimeoutContainer=document.createElement("div"),this.initTimeoutContainer.classList.add("info-box"),this.el.prepend(this.initTimeoutContainer),this.initTimeoutContainer.textContent=this.props.timeoutMessage},clearInitTimeout:function(){clearTimeout(this.initTimeout),this.initTimeoutContainer&&this.initTimeoutContainer.remove()},handleServerInit:function(e){var t=this;this.clearInitTimeout(),this.initReceived=!0,this.childReadyPromise.then((function(){t.postMessage({type:"init",data:e})}))},handleServerEvent:function(e,t){var i=this;this.initReceived&&this.childReadyPromise.then((function(){i.postMessage({type:"event",event:e,payload:t})}))},handleServerError:function(e,t){t&&this.clearInitTimeout(),this.errorContainer||(this.errorContainer=document.createElement("div"),this.errorContainer.classList.add("error-box","mb-4"),this.el.prepend(this.errorContainer)),this.errorContainer.textContent=e},handleServerPong:function(){this.pongCallbackQueue.shift()()},handleJSViewEvent:function(e){"sync"===e.type?(this.syncCallbackQueue.push(e.callback),this.postMessage({type:"sync"})):"secretSelected"==e.type&&this.postMessage({type:"secretSelected",secretName:e.secretName})}};const TC=DC;var IC={mounted:function(){this.props=this.getProps(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),window.addEventListener("keydown",this._handleDocumentKeyDown,!0),window.addEventListener("keyup",this._handleDocumentKeyUp,!0),window.addEventListener("focus",this._handleDocumentFocus,!0)},updated:function(){this.props=this.getProps()},destroyed:function(){window.removeEventListener("keydown",this._handleDocumentKeyDown,!0),window.removeEventListener("keyup",this._handleDocumentKeyUp,!0),window.removeEventListener("focus",this._handleDocumentFocus,!0)},getProps:function(){return{isKeydownEnabled:gt(this.el,"data-keydown-enabled",mt),isKeyupEnabled:gt(this.el,"data-keyup-enabled",mt),target:gt(this.el,"data-target")}},handleDocumentKeyDown:function(e){if(this.keyboardEnabled()&&Ot(e),this.props.isKeydownEnabled){if(e.repeat)return;var t=e.key;this.pushEventTo(this.props.target,"keydown",{key:t})}},handleDocumentKeyUp:function(e){if(this.keyboardEnabled()&&Ot(e),this.props.isKeyupEnabled){var t=e.key;this.pushEventTo(this.props.target,"keyup",{key:t})}},handleDocumentFocus:function(e){this.props.isKeydownEnabled&&kt(e.target)&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled:function(){return this.props.isKeydownEnabled||this.props.isKeyupEnabled}};const AC=IC;var MC={mounted:function(){this.props=this.getProps();var e=new cm(this.el,"",{baseUrl:this.props.sessionPath,allowedUriSchemes:this.props.allowedUriSchemes.split(",")});this.handleEvent("markdown_renderer:".concat(this.props.id,":content"),(function(t){var i=t.content;e.setContent(i)}))},getProps:function(){return{id:gt(this.el,"data-id"),sessionPath:gt(this.el,"data-session-path"),allowedUriSchemes:gt(this.el,"data-allowed-uri-schemes")}}};const RC=MC,OC={mounted:function(){this.scroll()},updated:function(){this.scroll()},scroll:function(){Dt(this.el)}};function PC(e){return PC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PC(e)}function FC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BC(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,HC(n.key),n)}}function HC(e){var t=function(e,t){if("object"!==PC(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!==PC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===PC(t)?t:String(t)}var WC=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;FC(this,e),this.resetTimeout=t,this.buffer=[],this.resetTimeoutId=null}var t,i;return t=e,i=[{key:"push",value:function(e){var t=this;this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout((function(){t.reset()}),this.resetTimeout)}},{key:"reset",value:function(){this.resetTimeout&&clearTimeout(this.resetTimeout),this.clearTimeout=null,this.buffer=[]}},{key:"tryMatch",value:function(e){if(e.length>this.buffer.length)return!1;var t=this.buffer.slice(-e.length),i=e.every((function(e,i){return e===t[i]}));return i&&this.reset(),i}}],i&&BC(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();const VC=WC;function zC(e){return function(e){if(Array.isArray(e))return jC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||UC(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UC(e,t){if(e){if("string"==typeof e)return jC(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jC(e,t):void 0}}function jC(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var KC={mounted:function(){var e=this;this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.codeZen=!1,this.keyBuffer=new VC,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,Mt(this.faviconForEvaluationStatus(this.props.globalStatus)),this.updateSectionListHighlight(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),this._handleDocumentClick=this.handleDocumentClick.bind(this),this._handleDocumentDoubleClick=this.handleDocumentDoubleClick.bind(this),document.addEventListener("keydown",this._handleDocumentKeyDown,!0),document.addEventListener("mousedown",this._handleDocumentMouseDown),document.addEventListener("focus",this._handleDocumentFocus,!0),document.addEventListener("click",this._handleDocumentClick),document.addEventListener("dblclick",this._handleDocumentDoubleClick),this.getElement("sections-list").addEventListener("click",(function(t){e.handleSectionsListClick(t),e.handleCellIndicatorsClick(t)})),this.getElement("clients-list").addEventListener("click",(function(t){return e.handleClientsListClick(t)})),this.getElement("sections-list-toggle").addEventListener("click",(function(t){return e.toggleSectionsList()})),this.getElement("clients-list-toggle").addEventListener("click",(function(t){return e.toggleClientsList()})),this.getElement("secrets-list-toggle").addEventListener("click",(function(t){return e.toggleSecretsList()})),this.getElement("runtime-info-toggle").addEventListener("click",(function(t){return e.toggleRuntimeInfo()})),this.getElement("app-info-toggle").addEventListener("click",(function(t){return e.toggleAppInfo()})),this.getElement("notebook").addEventListener("scroll",(function(t){return e.updateSectionListHighlight()})),this.getElement("notebook-indicators").addEventListener("click",(function(t){return e.handleCellIndicatorsClick(t)})),this.getElement("code-zen-enable-button").addEventListener("click",(function(t){return e.setCodeZen(!0)})),this.getElement("code-zen-disable-button").addEventListener("click",(function(t){return e.setCodeZen(!1)})),this.getElement("code-zen-outputs-toggle").addEventListener("click",(function(t){return e.el.toggleAttribute("data-js-no-outputs")})),window.addEventListener("phx:page-loading-stop",(function(){e.initializeFocus()}),{once:!0}),this.handleEvent("session_init",(function(t){t.clients.forEach((function(t){e.clientsMap[t.id]=t}))})),this.handleEvent("cell_inserted",(function(t){var i=t.cell_id;e.handleCellInserted(i)})),this.handleEvent("cell_deleted",(function(t){var i=t.cell_id,n=t.sibling_cell_id;e.handleCellDeleted(i,n)})),this.handleEvent("cell_restored",(function(t){var i=t.cell_id;e.handleCellRestored(i)})),this.handleEvent("cell_moved",(function(t){var i=t.cell_id;e.handleCellMoved(i)})),this.handleEvent("section_inserted",(function(t){var i=t.section_id;e.handleSectionInserted(i)})),this.handleEvent("section_deleted",(function(t){var i=t.section_id;e.handleSectionDeleted(i)})),this.handleEvent("section_moved",(function(t){var i=t.section_id;e.handleSectionMoved(i)})),this.handleEvent("cell_upload",(function(t){var i=t.cell_id,n=t.url;e.handleCellUpload(i,n)})),this.handleEvent("client_joined",(function(t){var i=t.client;e.handleClientJoined(i)})),this.handleEvent("client_left",(function(t){var i=t.client_id;e.handleClientLeft(i)})),this.handleEvent("clients_updated",(function(t){var i=t.clients;e.handleClientsUpdated(i)})),this.handleEvent("secret_selected",(function(t){var i=t.select_secret_ref,n=t.secret_name;e.handleSecretSelected(i,n)})),this.handleEvent("location_report",(function(t){var i=t.client_id,n=t.focusable_id,o=t.selection,s={focusableId:n,selection:e.decodeSelection(o)};e.handleLocationReport(i,s)})),this.unsubscribeFromSessionEvents=wm.subscribe("session",(function(t){e.handleSessionEvent(t)}))},updated:function(){var e=this.props;this.props=this.getProps(),this.props.globalStatus!==e.globalStatus&&Mt(this.faviconForEvaluationStatus(this.props.globalStatus))},disconnected:function(){this.el.removeAttribute("id"),this.keepChannel=!0},destroyed:function(){this.unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this._handleDocumentKeyDown,!0),document.removeEventListener("mousedown",this._handleDocumentMouseDown),document.removeEventListener("focus",this._handleDocumentFocus,!0),document.removeEventListener("click",this._handleDocumentClick),document.removeEventListener("dblclick",this._handleDocumentDoubleClick),Mt("favicon"),this.keepChannel||kC&&(kC.leave(),kC=null,SC.disconnect())},getProps:function(){return{autofocusCellId:pt(this.el,"data-autofocus-cell-id",null),globalStatus:pt(this.el,"data-global-status",null)}},faviconForEvaluationStatus:function(e){return"evaluating"===e?"favicon-evaluating":"stale"===e?"favicon-stale":"errored"===e?"favicon-errored":"favicon"},handleDocumentKeyDown:function(e){if(!e.repeat){var t=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?e.metaKey:e.ctrlKey,i=e.altKey,n=e.shiftKey,o=e.key,s=this.keyBuffer;if(!kt(e.target)||!e.target.closest("[data-el-outputs-container]")){if(t&&n&&!i&&"Enter"===o)return Ot(e),void this.queueFullCellsEvaluation(!0);if(!t&&n&&!i&&"Enter"===o)return Ot(e),Dm(this.focusedCellType())&&this.queueFocusedCellEvaluation(),void this.moveFocus(1);if(t&&!i&&"Enter"===o)return Ot(e),void(Dm(this.focusedCellType())&&this.queueFocusedCellEvaluation());if(t&&"s"===o)return Ot(e),void this.saveNotebook()}this.insertMode?(s.reset(),"Escape"===o&&(this.escapesMonacoWidget(e)||this.escapeInsertMode())):kt(e.target)?(s.reset(),"Escape"===o&&e.target.blur()):(s.push(e.key),s.tryMatch(["d","d"])?this.deleteFocusedCell():s.tryMatch(["e","a"])?this.queueFullCellsEvaluation(!1):s.tryMatch(["e","e"])?Dm(this.focusedCellType())&&this.queueFocusedCellEvaluation():s.tryMatch(["e","s"])?this.queueFocusedSectionEvaluation():s.tryMatch(["s","s"])?this.toggleSectionsList():s.tryMatch(["s","e"])?this.toggleSecretsList():s.tryMatch(["s","a"])?this.toggleAppInfo():s.tryMatch(["s","u"])?this.toggleClientsList():s.tryMatch(["s","r"])?this.toggleRuntimeInfo():s.tryMatch(["s","b"])?this.showBin():s.tryMatch(["s","p"])?this.showPackageSearch():s.tryMatch(["e","x"])?this.cancelFocusedCellEvaluation():s.tryMatch(["0","0"])?this.reconnectRuntime():s.tryMatch(["Escape","Escape"])?this.setFocusedEl(null):s.tryMatch(["?"])?this.showShortcuts():s.tryMatch(["i"])||e.target.matches("body, [data-el-cell-body], [data-el-heading], [data-focusable-id]")&&this.focusedId&&"Enter"===o?(Ot(e),this.isInsertModeAvailable()&&this.enterInsertMode()):s.tryMatch(["j"])?this.moveFocus(1):s.tryMatch(["k"])?this.moveFocus(-1):s.tryMatch(["J"])?this.moveFocusedCell(1):s.tryMatch(["K"])?this.moveFocusedCell(-1):s.tryMatch(["n"])?this.insertCellBelowFocused("code"):s.tryMatch(["N"])?this.insertCellAboveFocused("code"):s.tryMatch(["m"])?!this.codeZen&&this.insertCellBelowFocused("markdown"):s.tryMatch(["M"])?!this.codeZen&&this.insertCellAboveFocused("markdown"):s.tryMatch(["z"])&&this.setCodeZen(!this.codeZen))}},escapesMonacoWidget:function(e){if(e.target.closest(".monaco-inputbox"))return!0;var t=e.target.closest(".monaco-editor.focused");return!!t&&(!!t.querySelector(".editor-widget.parameter-hints-widget.visible")||!!t.querySelector(".editor-widget.suggest-widget.visible")||t.querySelectorAll(".cursor").length>1)},handleDocumentMouseDown:function(e){if(e.target.closest("[data-el-notebook]")){if(!e.target.closest("[data-el-insert-buttons] button")){var t=e.target.closest("[data-focusable-id]"),i=t?t.dataset.focusableId:null,n=this.editableElementClicked(e,t);i!==this.focusedId&&this.setFocusedEl(i,{scroll:!1,focusElement:!1}),e.target.closest("[data-el-actions]")||this.insertMode!==n&&this.setInsertMode(n)}}else this.insertMode&&this.setInsertMode(!1)},editableElementClicked:function(e,t){if(t){var i=e.target.closest("[data-el-editor-container], [data-el-heading]");return i&&t.contains(i)}return!1},handleDocumentFocus:function(e){var t=e.target.closest&&e.target.closest("[data-focusable-id]");if(t){var i=t.dataset.focusableId;i!==this.focusedId&&this.setFocusedEl(i,{scroll:!1,focusElement:!1})}},handleDocumentClick:function(e){e.target.closest("[data-el-enable-insert-mode-button]")&&this.setInsertMode(!0),e.target.closest("[data-btn-package-search]")&&this.insertMode&&this.setInsertMode(!1);var t=e.target.closest("[data-el-queue-cell-evaluation-button]");if(t){var i=t.getAttribute("data-cell-id"),n=t.hasAttribute("data-disable-dependencies-cache");this.queueCellEvaluation(i,n)}var o=window.location.hash;if(o){var s=o.replace(/^#/,"");document.getElementById(s).contains(e.target)||e.target.closest("a")||history.pushState(null,document.title,window.location.pathname+window.location.search)}},handleDocumentDoubleClick:function(e){var t=e.target.closest("[data-el-cell]"),i=t&&t.getAttribute("data-type");i&&"markdown"===i&&this.focusedId&&!this.insertMode&&this.setInsertMode(!0)},handleSectionsListClick:function(e){var t=e.target.closest("[data-el-sections-list-item]");if(t){var i=t.getAttribute("data-section-id");this.getSectionById(i).scrollIntoView({behavior:"smooth",block:"start"})}},handleClientsListClick:function(e){var t=e.target.closest("[data-el-clients-list-item]");if(t){var i=t.getAttribute("data-client-id");e.target.closest("[data-el-client-link]")&&this.handleClientLinkClick(i),e.target.closest("[data-el-client-follow-toggle]")&&this.handleClientFollowToggleClick(i,t)}},handleClientLinkClick:function(e){this.mirrorClientFocus(e)},handleClientFollowToggleClick:function(e,t){var i=this.el.querySelector("[data-el-clients-list-item][data-js-followed]");i&&i.removeAttribute("data-js-followed"),e===this.followedClientId?this.followedClientId=null:(t.setAttribute("data-js-followed",""),this.followedClientId=e,this.mirrorClientFocus(e))},mirrorClientFocus:function(e){var t=this.lastLocationReportByClientId[e];t&&t.focusableId&&this.setFocusedEl(t.focusableId)},handleCellIndicatorsClick:function(e){var t=e.target.closest("[data-el-focus-cell-button]");if(t){var i=t.getAttribute("data-target");this.setFocusedEl(i)}},initializeFocus:function(){var e=window.location.hash;if(e){var t=e.replace(/^#/,""),i=document.getElementById(t);if(i){var n=i.closest("[data-focusable-id]");n?this.setFocusedEl(n.dataset.focusableId):i.scrollIntoView()}}else this.props.autofocusCellId&&(this.setFocusedEl(this.props.autofocusCellId,{scroll:!1}),this.setInsertMode(!0))},updateSectionListHighlight:function(){var e=this.el.querySelector("[data-el-sections-list-item][data-js-is-viewed]");e&&e.removeAttribute("data-js-is-viewed");var t=this.getSections().reverse().find((function(e){return e.getBoundingClientRect().top<=document.documentElement.scrollTop+.35*window.innerHeight}));if(t){var i=t.getAttribute("data-section-id");this.el.querySelector('[data-el-sections-list-item][data-section-id="'.concat(i,'"]')).setAttribute("data-js-is-viewed","")}},toggleSectionsList:function(){this.toggleSidePanelContent("sections-list")},toggleClientsList:function(){this.toggleSidePanelContent("clients-list")},toggleSecretsList:function(){this.toggleSidePanelContent("secrets-list")},toggleAppInfo:function(){this.toggleSidePanelContent("app-info")},toggleRuntimeInfo:function(){this.toggleSidePanelContent("runtime-info")},toggleSidePanelContent:function(e){this.el.getAttribute("data-js-side-panel-content")===e?this.el.removeAttribute("data-js-side-panel-content"):this.el.setAttribute("data-js-side-panel-content",e)},showBin:function(){var e=this.el.querySelector("[data-btn-show-bin]");e&&e.click()},showPackageSearch:function(){this.setFocusedEl("setup");var e=this.el.querySelector("[data-btn-package-search]");e&&e.click()},saveNotebook:function(){this.pushEvent("save",{})},deleteFocusedCell:function(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("delete_cell",{cell_id:this.focusedId})},queueCellEvaluation:function(e,t){var i=this;this.dispatchQueueEvaluation((function(){i.pushEvent("queue_cell_evaluation",{cell_id:e,disable_dependencies_cache:t})}))},queueFocusedCellEvaluation:function(){var e=this;this.focusedId&&this.isCell(this.focusedId)&&this.dispatchQueueEvaluation((function(){e.pushEvent("queue_cell_evaluation",{cell_id:e.focusedId})}))},queueFullCellsEvaluation:function(e){var t=this,i=e&&this.focusedId&&this.isCell(this.focusedId)?[this.focusedId]:[];this.dispatchQueueEvaluation((function(){t.pushEvent("queue_full_evaluation",{forced_cell_ids:i})}))},queueFocusedSectionEvaluation:function(){var e=this;if(this.focusedId){var t=this.getSectionIdByFocusableId(this.focusedId);t&&this.dispatchQueueEvaluation((function(){e.pushEvent("queue_section_evaluation",{section_id:t})}))}},dispatchQueueEvaluation:function(e){Dm(this.focusedCellType())?wm.broadcast("cells:".concat(this.focusedId),{type:"dispatch_queue_evaluation",dispatch:e}):e()},cancelFocusedCellEvaluation:function(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("cancel_cell_evaluation",{cell_id:this.focusedId})},reconnectRuntime:function(){this.pushEvent("reconnect_runtime",{})},showShortcuts:function(){var e=this.el.querySelector("[data-btn-show-shortcuts]");e&&e.click()},isInsertModeAvailable:function(){if(!this.focusedId)return!1;var e=this.getFocusableEl(this.focusedId);return!this.isCell(this.focusedId)||!e.hasAttribute("data-js-insert-mode-disabled")},enterInsertMode:function(){this.focusedId&&this.setInsertMode(!0)},escapeInsertMode:function(){this.setInsertMode(!1)},moveFocus:function(e){var t=this.nearbyFocusableId(this.focusedId,e);this.setFocusedEl(t)},moveFocusedCell:function(e){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("move_cell",{cell_id:this.focusedId,offset:e})},insertCellBelowFocused:function(e){if(this.focusedId)this.insertCellBelowFocusableId(this.focusedId,e);else{var t=this.getFocusableIds();t.length>0&&this.insertCellBelowFocusableId(t[t.length-1],e)}},insertCellAboveFocused:function(e){if(this.focusedId){var t=this.nearbyFocusableId(this.focusedId,-1);this.insertCellBelowFocusableId(t,e)}else{var i=this.getFocusableIds();i.length>0&&this.insertCellBelowFocusableId(i[0],e)}},insertCellBelowFocusableId:function(e,t){if(this.isCell(e))this.pushEvent("insert_cell_below",{type:t,cell_id:e});else if(this.isSection(e))this.pushEvent("insert_cell_below",{type:t,section_id:e});else if(this.isNotebook(e)){var i=this.getSectionIds();i.length>0&&this.pushEvent("insert_cell_below",{type:t,section_id:i[0]})}},setFocusedEl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.scroll,n=void 0===i||i,o=t.focusElement,s=void 0===o||o;if(this.focusedId=e,e){var r=this.getFocusableEl(e);if(s){var a=r.querySelector("[data-el-cell-body]")||r.querySelector("[data-el-heading]")||r;a.focus({preventScroll:!0})}}wm.broadcast("navigation",{type:"element_focused",focusableId:e,scroll:n}),this.setInsertMode(!1)},setInsertMode:function(e){this.insertMode=e,e?this.el.setAttribute("data-js-insert-mode",""):(this.el.removeAttribute("data-js-insert-mode"),this.sendLocationReport({focusableId:this.focusedId,selection:null})),wm.broadcast("navigation",{type:"insert_mode_changed",enabled:e})},setCodeZen:function(e){this.codeZen=e;var t=this.focusedId||this.nearbyFocusableId(null,0);if(e?this.el.setAttribute("data-js-code-zen",""):this.el.removeAttribute("data-js-code-zen"),t){var i=this.ensureVisibleFocusableEl(t);i!==this.focused&&this.setFocusedEl(i,{scroll:!1}),i&&this.getFocusableEl(i).scrollIntoView({block:"center"})}},handleCellInserted:function(e){var t;this.setFocusedEl(e),t=this.focusedCellType(),["markdown","code","setup"].includes(t)&&this.setInsertMode(!0)},handleCellDeleted:function(e,t){if(this.focusedId===e)if(this.codeZen){var i=this.ensureVisibleFocusableEl(t);this.setFocusedEl(i)}else this.setFocusedEl(t)},handleCellRestored:function(e){this.setFocusedEl(e)},handleCellMoved:function(e){this.focusedId===e&&wm.broadcast("cells",{type:"cell_moved",cellId:e})},handleSectionInserted:function(e){var t=this.getSectionById(e).querySelector("[data-el-section-headline]").dataset.focusableId;this.setFocusedEl(t),this.setInsertMode(!0),function(e){var t=window.getSelection(),i=document.createRange();i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i)}(document.activeElement)},handleSectionDeleted:function(e){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved:function(e){Nt(this.getSectionById(e))},handleCellUpload:function(e,t){this.focusedId!==e&&this.setFocusedEl(e),this.insertMode||this.setInsertMode(!0),wm.broadcast("cells",{type:"cell_upload",cellId:e,url:t})},handleClientJoined:function(e){this.clientsMap[e.id]=e},handleClientLeft:function(e){var t=this.clientsMap[e];t&&(delete this.clientsMap[e],this.broadcastLocationReport(t,{focusableId:null,selection:null}),t.id===this.followedClientId&&(this.followedClientId=null))},handleClientsUpdated:function(e){var t=this;e.forEach((function(e){t.clientsMap[e.id]=e}))},handleSecretSelected:function(e,t){wm.broadcast("js_views:".concat(e),{type:"secretSelected",secretName:t})},handleLocationReport:function(e,t){var i=this.clientsMap[e];this.lastLocationReportByClientId[e]=t,i&&(this.broadcastLocationReport(i,t),i.id===this.followedClientId&&t.focusableId!==this.focusedId&&this.setFocusedEl(t.focusableId))},handleSessionEvent:function(e){"cursor_selection_changed"===e.type&&this.sendLocationReport({focusableId:e.focusableId,selection:e.selection})},broadcastLocationReport:function(e,t){wm.broadcast("navigation",{type:"location_report",client:e,report:t})},sendLocationReport:function(e){Object.keys(this.clientsMap).length>1&&this.pushEvent("location_report",{focusable_id:e.focusableId,selection:this.encodeSelection(e.selection)})},encodeSelection:function(e){if(null===e)return null;var t=e.tag,i=e.editorSelection;return[t,i.selectionStartLineNumber,i.selectionStartColumn,i.positionLineNumber,i.positionColumn]},decodeSelection:function(e){if(null===e)return null;var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(e,t)||UC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,5),i=t[0],n=t[1],o=t[2],s=t[3],r=t[4];return{tag:i,editorSelection:new Up.Selection(n,o,s,r)}},focusedCellType:function(){return this.focusedId&&this.isCell(this.focusedId)?this.getFocusableEl(this.focusedId).getAttribute("data-type"):null},nearbyFocusableId:function(e,t){var i=this.getFocusableIds();if(0===i.length)return null;var n=i.indexOf(e);if(-1===n){var o=this.getFocusableEls().find(xt);return o?o.getAttribute("data-focusable-id"):i[0]}var s=function(e,t,i){return Math.min(Math.max(e,0),i)}(n+t,0,i.length-1);return i[s]},ensureVisibleFocusableEl:function(e){var t=this.getFocusableEl(e),i=Array.from(this.el.querySelectorAll("[data-focusable-id]")),n=i.indexOf(t),o=[].concat(zC(i.slice(n,-1)),zC(i.slice(0,n).reverse())).find((function(e){return!Lt(e)}));return o&&o.getAttribute("data-focusable-id")},isCell:function(e){return this.getFocusableEl(e).hasAttribute("data-el-cell")},isSection:function(e){return this.getFocusableEl(e).hasAttribute("data-el-section-headline")},isNotebook:function(e){return this.getFocusableEl(e).hasAttribute("data-el-notebook-headline")},getFocusableEl:function(e){return this.el.querySelector('[data-focusable-id="'.concat(e,'"]'))},getFocusableEls:function(){return Array.from(this.el.querySelectorAll("[data-focusable-id]")).filter((function(e){return!Lt(e)}))},getFocusableIds:function(){return this.getFocusableEls().map((function(e){return e.getAttribute("data-focusable-id")}))},getSectionIdByFocusableId:function(e){var t=this.getFocusableEl(e).closest("[data-el-section]");return t&&t.getAttribute("data-section-id")},getSectionIds:function(){return this.getSections().map((function(e){return e.getAttribute("data-section-id")}))},getSections:function(){return Array.from(this.el.querySelectorAll("[data-el-section]"))},getSectionById:function(e){return this.el.querySelector('[data-el-section][data-section-id="'.concat(e,'"]'))},getElement:function(e){return this.el.querySelector("[data-el-".concat(e,"]"))}};const qC=KC,$C={mounted:function(){var e=this;this.props=this.getProps(),this.interval=setInterval((function(){return e.updateDOM()}),100)},updated:function(){this.props=this.getProps(),this.updateDOM()},destroyed:function(){clearInterval(this.interval)},getProps:function(){return{start:gt(this.el,"data-start")}},updateDOM:function(){var e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML="".concat(e.toFixed(1),"s")}};var GC="user_data";function QC(){var e=function(e){var t=document.cookie.split("; ").find((function(t){return t.startsWith("".concat(e,"="))}));return t?t.replace("".concat(e,"="),""):null}(GC);if(e){var t=decodeURIComponent(escape(atob(e)));return JSON.parse(t)}return null}const YC={mounted:function(){var e=this;this.el.addEventListener("submit",(function(t){var i,n,o,s;i={name:e.el.user_form_name.value,hex_color:e.el.user_form_hex_color.value},s=function(e){return btoa(unescape(encodeURIComponent(e)))}(JSON.stringify(i)),n=s,o="".concat("user_data","=").concat(n,";max-age=").concat(15768e4,";path=/"),document.cookie=o}))}};var ZC=o(4612),XC=o.n(ZC);function JC(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var ey={mounted:function(){this.props=this.getProps(),this.lineHeight=function(e){var t=window.getComputedStyle(e),i=parseInt(t.lineHeight,10);if(Number.isNaN(i)){var n=e.cloneNode();n.innerHTML="<br>",e.appendChild(n);var o=n.clientHeight;n.innerHTML="<br><br>";var s=n.clientHeight;return e.removeChild(n),s-o}return i}(this.el),this.templateEl=Rt(this.el,"[data-template]"),this.contentEl=Rt(this.el,"[data-content]"),this.capLines();var e=this.hyperListConfig();this.virtualizedList=new(XC())(this.contentEl,e),this.props.follow&&Dt(this.contentEl)},updated:function(){this.props=this.getProps(),this.capLines();var e,t=this.props.follow&&(e=this.contentEl,Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<1),i=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,i),t&&Dt(this.contentEl)},getProps:function(){return{maxHeight:gt(this.el,"data-max-height",ft),follow:pt(this.el,"data-follow",!1,mt),maxLines:pt(this.el,"data-max-lines",null,ft),ignoreTrailingEmptyLine:pt(this.el,"data-ignore-trailing-empty-line",!1,mt)}},hyperListConfig:function(){var e=this,t=this.getLineElements(),i=t.length,n=Math.min(this.props.maxHeight,this.lineHeight*i);return{height:n,total:i,itemHeight:this.lineHeight,generate:function(e){var i=t[e].cloneNode(!0);return i.removeAttribute("id"),i},afterRender:function(){e.contentEl.scrollWidth>e.contentEl.clientWidth?e.contentEl.style.height="".concat(n+12,"px"):e.contentEl.style.height="".concat(n,"px")}}},getLineElements:function(){var e=Array.from(this.templateEl.querySelectorAll("[data-line]"));if(0===e.length)return[];var t=e[e.length-1];return this.props.ignoreTrailingEmptyLine&&""===t.innerText?e.slice(0,-1):e},capLines:function(){if(this.props.maxLines){var e=function(e){if(Array.isArray(e))return e}(i=Array.from(this.templateEl.querySelectorAll("[data-line]")).slice(0,-this.props.maxLines))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return JC(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?JC(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),t=e[0];e.slice(1).forEach((function(e){return e.remove()})),t&&(t.innerHTML="...")}var i}};const ty={AppAuth:ut,AudioInput:Kt,Cell:Am,CellEditor:Rf,ConfirmModal:Pf,Dropzone:Bf,EditorSettings:Hf,EmojiPicker:rC,FocusOnUpdate:aC,Headline:cC,Highlight:hC,ImageInput:_C,ImageOutput:bC,JSView:TC,KeyboardControl:AC,MarkdownRenderer:RC,ScrollOnUpdate:OC,Session:qC,TextareaAutosize:{mounted:function(){var e=this;this.autosize(),this.el.addEventListener("input",(function(t){e.autosize()}))},updated:function(){this.autosize()},autosize:function(){this.el.style.height="0px",this.el.style.height="".concat(this.el.scrollHeight+2,"px")}},Timer:$C,UserForm:YC,VirtualizedLines:ey};function iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var ny={onBeforeElUpdated:function(e,t){var i,n=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return iy(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?iy(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){a=!0,s=e},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}(e.attributes);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.name.startsWith("data-js-")&&t.setAttribute(o.name,o.value),"data-keep-attribute"===o.name&&(e.hasAttribute(o.value)?t.setAttribute(o.value,e.getAttribute(o.value)):t.removeAttribute(o.value))}}catch(e){n.e(e)}finally{n.f()}},onNodeAdded:function(e){if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("autofocus")&&(e.focus(),e.setSelectionRange&&e.value)){var t=e.value.length;e.setSelectionRange(t,t)}}},oy=o(24173),sy=o.n(oy),ry=document.querySelector("meta[name='csrf-token']").getAttribute("content"),ay=new class{constructor(e,t,i={}){if(this.unloaded=!1,!t||"Object"===t.constructor.name)throw new Error('\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from "phoenix"\n import {LiveSocket} from "phoenix_live_view"\n let liveSocket = new LiveSocket("/live", Socket, {...})\n ');this.socket=new t(e,i),this.bindingPrefix=i.bindingPrefix||"phx-",this.opts=i,this.params=xe(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(Le(fe),i.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Le(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||1,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||10,this.reloadJitterMin=i.reloadJitterMin||5e3,this.reloadJitterMax=i.reloadJitterMax||1e4,this.failsafeJitter=i.failsafeJitter||3e4,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:xe(),onBeforeElUpdated:xe()},i.dom||{}),this.transitions=new class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach((e=>{clearTimeout(e),this.transitions.delete(e)})),this.flushPendingOps()}after(e){0===this.size()?e():this.pushPendingOp(e)}addTransition(e,t,i){t();let n=setTimeout((()=>{this.transitions.delete(n),i(),this.flushPendingOps()}),e);this.transitions.add(n)}pushPendingOp(e){this.pendingOps.push(e)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let e=this.pendingOps.shift();e&&(e(),this.flushPendingOps())}},window.addEventListener("pagehide",(e=>{this.unloaded=!0})),this.socket.onOpen((()=>{this.isUnloaded()&&window.location.reload()}))}isProfileEnabled(){return"true"===this.sessionStorage.getItem(he)}isDebugEnabled(){return"true"===this.sessionStorage.getItem(ce)}isDebugDisabled(){return"false"===this.sessionStorage.getItem(ce)}enableDebug(){this.sessionStorage.setItem(ce,"true")}enableProfiling(){this.sessionStorage.setItem(he,"true")}disableDebug(){this.sessionStorage.setItem(ce,"false")}disableProfiling(){this.sessionStorage.removeItem(he)}enableLatencySim(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(de,e)}disableLatencySim(){this.sessionStorage.removeItem(de)}getLatencySim(){let e=this.sessionStorage.getItem(de);return e?parseInt(e):null}getSocket(){return this.socket}connect(){"localhost"!==window.location.hostname||this.isDebugDisabled()||this.enableDebug();let e=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?e():document.addEventListener("DOMContentLoaded",(()=>e()))}disconnect(e){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(e)}replaceTransport(e){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(e),this.connect()}execJS(e,t,i=null){this.owner(e,(n=>ot.exec(i,t,n,e)))}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",(()=>["disconnect for page nav"])),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(e,t){this.domCallbacks[e](...t)}time(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);let i=t();return console.timeEnd(e),i}log(e,t,i){if(this.viewLogger){let[n,o]=i();this.viewLogger(e,t,n,o)}else if(this.isDebugEnabled()){let[n,o]=i();((e,t,i,n)=>{e.liveSocket.isDebugEnabled()&&console.log(`${e.id} ${t}: ${i} - `,n)})(e,t,n,o)}}requestDOMUpdate(e){this.transitions.after(e)}transition(e,t,i=function(){}){this.transitions.addTransition(e,t,i)}onChannel(e,t,i){e.on(t,(e=>{let t=this.getLatencySim();t?setTimeout((()=>i(e)),t):i(e)}))}wrapPush(e,t,i){let n=this.getLatencySim(),o=e.joinCount;if(!n)return this.isConnected()&&t.timeout?i().receive("timeout",(()=>{e.joinCount!==o||e.isDestroyed()||this.reloadWithJitter(e,(()=>{this.log(e,"timeout",(()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"]))}))})):i();let s={receives:[],receive(e,t){this.receives.push([e,t])}};return setTimeout((()=>{e.isDestroyed()||s.receives.reduce(((e,[t,i])=>e.receive(t,i)),i())}),n),s}reloadWithJitter(e,t){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,n=this.reloadJitterMax,o=Math.floor(Math.random()*(n-i+1))+i,s=Me.updateLocal(this.localStorage,window.location.pathname,k,0,(e=>e+1));s>this.maxReloads&&(o=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout((()=>{e.isDestroyed()||e.isConnected()||(e.destroy(),t?t():this.log(e,"join",(()=>[`encountered ${s} consecutive reloads`])),s>this.maxReloads&&this.log(e,"join",(()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`])),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())}),o)}getHookCallbacks(e){return e&&e.startsWith("Phoenix.")?We[e.split(".")[1]]:this.hooks[e]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(e){return`${this.getBindingPrefix()}${e}`}channel(e,t){return this.socket.channel(e,t)}joinDeadView(){let e=document.body;if(e&&!this.isPhxView(e)&&!this.isPhxView(document.firstElementChild)){let t=this.newRootView(e);t.setHref(this.getHref()),t.joinDead(),this.main||(this.main=t),window.requestAnimationFrame((()=>t.execNewMounted()))}}joinRootViews(){let e=!1;return Oe.all(document,`${X}:not([${U}])`,(t=>{if(!this.getRootById(t.id)){let e=this.newRootView(t);e.setHref(this.getHref()),e.join(),t.hasAttribute(j)&&(this.main=e)}e=!0})),e}redirect(e,t){this.unload(),Me.redirect(e,t)}replaceMain(e,t,i=null,n=this.setPendingLink(e)){let o=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let s=Oe.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(s,t,o),this.main.setRedirect(e),this.transitionRemoves(),this.main.join(((e,t)=>{1===e&&this.commitPendingLink(n)&&this.requestDOMUpdate((()=>{Oe.findPhxSticky(document).forEach((e=>s.appendChild(e))),this.outgoingMainEl.replaceWith(s),this.outgoingMainEl=null,i&&requestAnimationFrame(i),t()}))}))}transitionRemoves(e){let t=this.binding("remove");(e=e||Oe.all(document,`[${t}]`)).forEach((e=>{document.body.contains(e)&&this.execJS(e,e.getAttribute(t),"remove")}))}isPhxView(e){return e.getAttribute&&null!==e.getAttribute(Z)}newRootView(e,t,i){let n=new rt(e,this,null,t,i);return this.roots[n.id]=n,n}owner(e,t){let i=Te(e.closest(X),(e=>this.getViewByEl(e)))||this.main;i&&t(i)}withinOwners(e,t){this.owner(e,(i=>t(i,e)))}getViewByEl(e){let t=e.getAttribute(K);return Te(this.getRootById(t),(t=>t.getDescendentByEl(e)))}getRootById(e){return this.roots[e]}destroyAllViews(){for(let e in this.roots)this.roots[e].destroy(),delete this.roots[e];this.main=null}destroyViewByEl(e){let t=this.getRootById(e.getAttribute(K));t&&t.id===e.id?(t.destroy(),delete this.roots[t.id]):t&&t.destroyDescendent(e.id)}setActiveElement(e){if(this.activeElement===e)return;this.activeElement=e;let t=()=>{e===this.activeElement&&(this.activeElement=null),e.removeEventListener("mouseup",this),e.removeEventListener("touchend",this)};e.addEventListener("mouseup",t),e.addEventListener("touchend",t)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:e}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose((e=>e&&1001===e.code?this.unload():e&&1e3===e.code&&this.main?this.reloadWithJitter(this.main):void 0)),document.body.addEventListener("click",(function(){})),window.addEventListener("pageshow",(e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())}),!0),e||this.bindNav(),this.bindClicks(),e||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},((e,t,i,n,o,s)=>{let r=n.getAttribute(this.binding("key")),a=e.key&&e.key.toLowerCase();if(r&&r.toLowerCase()!==a)return;let l={key:e.key,...this.eventMeta(t,e,n)};ot.exec(t,o,i,n,["push",{data:l}])})),this.bind({blur:"focusout",focus:"focusin"},((e,t,i,n,o,s)=>{if(!s){let s={key:e.key,...this.eventMeta(t,e,n)};ot.exec(t,o,i,n,["push",{data:s}])}})),this.bind({blur:"blur",focus:"focus"},((e,t,i,n,o,s,r)=>{if("window"===r){let o=this.eventMeta(t,e,n);ot.exec(t,s,i,n,["push",{data:o}])}})),window.addEventListener("dragover",(e=>e.preventDefault())),window.addEventListener("drop",(e=>{e.preventDefault();let t=Te(Ee(e.target,this.binding(M)),(e=>e.getAttribute(this.binding(M)))),i=t&&document.getElementById(t),n=Array.from(e.dataTransfer.files||[]);i&&!i.disabled&&0!==n.length&&i.files instanceof FileList&&(Be.trackFiles(i,n,e.dataTransfer),i.dispatchEvent(new Event("input",{bubbles:!0})))})),this.on(T,(e=>{let t=e.target;if(!Oe.isUploadInput(t))return;let i=Array.from(e.detail.files||[]).filter((e=>e instanceof File||e instanceof Blob));Be.trackFiles(t,i),t.dispatchEvent(new Event("input",{bubbles:!0}))})))}eventMeta(e,t,i){let n=this.metadataCallbacks[e];return n?n(t,i):{}}setPendingLink(e){return this.linkRef++,this.pendingLink=e,this.linkRef}commitPendingLink(e){return this.linkRef===e&&(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(e,t){for(let i in e){let n=e[i];this.on(n,(e=>{let o=this.binding(i),s=this.binding(`window-${i}`),r=e.target.getAttribute&&e.target.getAttribute(o);r?this.debounce(e.target,e,n,(()=>{this.withinOwners(e.target,(n=>{t(e,i,n,e.target,r,null)}))})):Oe.all(document,`[${s}]`,(o=>{let r=o.getAttribute(s);this.debounce(o,e,n,(()=>{this.withinOwners(o,(n=>{t(e,i,n,o,r,"window")}))}))}))}))}}bindClicks(){window.addEventListener("click",(e=>this.clickStartedAtTarget=e.target)),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(e,t,i){let n=this.binding(t);window.addEventListener(e,(e=>{let t=null;if(i)t=e.target.matches(`[${n}]`)?e.target:e.target.querySelector(`[${n}]`);else{let i=this.clickStartedAtTarget||e.target;t=Ee(i,n),this.dispatchClickAway(e,i),this.clickStartedAtTarget=null}let o=t&&t.getAttribute(n);if(o)"#"===t.getAttribute("href")&&e.preventDefault(),this.debounce(t,e,"click",(()=>{this.withinOwners(t,(i=>{ot.exec("click",o,i,t,["push",{data:this.eventMeta("click",e,t)}])}))}));else{let t=e.target instanceof HTMLAnchorElement?e.target.getAttribute("href"):null;i||null===t||Oe.wantsNewTab(e)||!Oe.isNewPageHref(t,window.location)||this.unload()}}),i)}dispatchClickAway(e,t){let i=this.binding("click-away");Oe.all(document,`[${i}]`,(n=>{n.isSameNode(t)||n.contains(t)||this.withinOwners(e.target,(t=>{let o=n.getAttribute(i);ot.isVisible(n)&&ot.exec("click",o,t,n,["push",{data:this.eventMeta("click",e,e.target)}])}))}))}bindNav(){if(!Me.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let e=null;window.addEventListener("scroll",(t=>{clearTimeout(e),e=setTimeout((()=>{Me.updateCurrentState((e=>Object.assign(e,{scroll:window.scrollY})))}),100)})),window.addEventListener("popstate",(e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:i,root:n,scroll:o}=e.state||{},s=window.location.href;this.requestDOMUpdate((()=>{this.main.isConnected()&&"patch"===t&&i===this.main.id?this.main.pushLinkPatch(s,null,(()=>{this.maybeScroll(o)})):this.replaceMain(s,null,(()=>{n&&this.replaceRootHistory(),this.maybeScroll(o)}))}))}),!1),window.addEventListener("click",(e=>{let t=Ee(e.target,E),i=t&&t.getAttribute(E);if(!i||!this.isConnected()||!this.main||Oe.wantsNewTab(e))return;let n=t.href,o=t.getAttribute("data-phx-link-state");e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate((()=>{if("patch"===i)this.pushHistoryPatch(n,o,t);else{if("redirect"!==i)throw new Error(`expected data-phx-link to be "patch" or "redirect", got: ${i}`);this.historyRedirect(n,o)}let e=t.getAttribute(this.binding("click"));e&&this.requestDOMUpdate((()=>this.execJS(t,e,"click")))}))}),!1)}maybeScroll(e){"number"==typeof e&&requestAnimationFrame((()=>{window.scrollTo(0,e)}))}dispatchEvent(e,t={}){Oe.dispatchEvent(window,`phx:${e}`,{detail:t})}dispatchEvents(e){e.forEach((([e,t])=>this.dispatchEvent(e,t)))}withPageLoading(e,t){Oe.dispatchEvent(window,"phx:page-loading-start",{detail:e});let i=()=>Oe.dispatchEvent(window,"phx:page-loading-stop",{detail:e});return t?t(i):i}pushHistoryPatch(e,t,i){if(!this.isConnected())return Me.redirect(e);this.withPageLoading({to:e,kind:"patch"},(n=>{this.main.pushLinkPatch(e,i,(i=>{this.historyPatch(e,t,i),n()}))}))}historyPatch(e,t,i=this.setPendingLink(e)){this.commitPendingLink(i)&&(Me.pushState(t,{type:"patch",id:this.main.id},e),this.registerNewLocation(window.location))}historyRedirect(e,t,i){if(!this.isConnected())return Me.redirect(e,i);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:t,host:i}=window.location;e=`${t}//${i}${e}`}let n=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},(o=>{this.replaceMain(e,i,(()=>{Me.pushState(t,{type:"redirect",id:this.main.id,scroll:n},e),this.registerNewLocation(window.location),o()}))}))}replaceRootHistory(){Me.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(e){let{pathname:t,search:i}=this.currentLocation;return t+i!==e.pathname+e.search&&(this.currentLocation=Le(e),!0)}bindForms(){let e=0,t=!1;this.on("submit",(e=>{let i=e.target.getAttribute(this.binding("submit")),n=e.target.getAttribute(this.binding("change"));t||!n||i||(t=!0,e.preventDefault(),this.withinOwners(e.target,(t=>{t.disableForm(e.target),window.requestAnimationFrame((()=>{Oe.isUnloadableFormSubmit(e)&&this.unload(),e.target.submit()}))})))}),!0),this.on("submit",(e=>{let t=e.target.getAttribute(this.binding("submit"));t?(e.preventDefault(),e.target.disabled=!0,this.withinOwners(e.target,(i=>{ot.exec("submit",t,i,e.target,["push",{}])}))):Oe.isUnloadableFormSubmit(e)&&this.unload()}),!1);for(let t of["change","input"])this.on(t,(i=>{let n=this.binding("change"),o=i.target,s=o.getAttribute(n),r=o.form&&o.form.getAttribute(n),a=s||r;if(!a)return;if("number"===o.type&&o.validity&&o.validity.badInput)return;let l=s?o:o.form,c=e;e++;let{at:h,type:d}=Oe.private(o,"prev-iteration")||{};h===c-1&&t!==d||(Oe.putPrivate(o,"prev-iteration",{at:c,type:t}),this.debounce(o,i,t,(()=>{this.withinOwners(l,(e=>{Oe.putPrivate(o,$,!0),Oe.isTextualInput(o)||this.setActiveElement(o),ot.exec("change",a,e,o,["push",{_target:i.target.name,dispatcher:l}])}))})))}),!1);this.on("reset",(e=>{let t=e.target;Oe.resetForm(t,this.binding(q));let i=Array.from(t.elements).find((e=>"reset"===e.type));window.requestAnimationFrame((()=>{i.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}))}))}debounce(e,t,i,n){if("blur"===i||"focusout"===i)return n();let o=this.binding("debounce"),s=this.binding("throttle"),r=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(e,(i=>{Oe.debounce(e,t,o,r,s,a,(()=>!i.isDestroyed()&&document.body.contains(e)),(()=>{n()}))}))}silenceEvents(e){this.silenced=!0,e(),this.silenced=!1}on(e,t){window.addEventListener(e,(e=>{this.silenced||t(e)}))}}(window.LIVEBOOK_BASE_URL_PATH+"/live",S,{params:function(e){return{_csrf_token:ry,user_data:QC(),app_auth_token:dt()}},hooks:ty,dom:ny});!function(){sy().config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"});var e=null;window.addEventListener("phx:page-loading-start",(function(){e||(e=setTimeout((function(){return sy().show()}),500))})),window.addEventListener("phx:page-loading-stop",(function(){clearTimeout(e),e=null,sy().hide()}))}(),window.addEventListener("lb:focus",(function(e){requestAnimationFrame((function(){e.target.focus()}))})),window.addEventListener("lb:set_value",(function(e){e.target.value=e.detail.value})),window.addEventListener("lb:check",(function(e){e.target.checked=!0})),window.addEventListener("lb:uncheck",(function(e){e.target.checked=!1})),window.addEventListener("lb:set_text",(function(e){e.target.textContent=e.detail.value})),window.addEventListener("lb:clipcopy",(function(e){if("clipboard"in navigator){var t=e.target.textContent;navigator.clipboard.writeText(t)}else alert("Sorry, your browser does not support clipboard copy.\nThis generally requires a secure origin — either HTTPS or localhost.")})),window.addEventListener("lb:session_list:on_selection_change",(function(){var e=!!document.querySelector("[name='session_ids[]']:checked"),t=document.querySelector("#edit-sessions [name='disconnect']"),i=document.querySelector("#edit-sessions [name='close_all']");t.disabled=!e,i.disabled=!e})),window.addEventListener("contextmenu",(function(e){var t=e.target.closest("[data-contextmenu-trigger-click]");t&&(e.preventDefault(),t.dispatchEvent(new Event("mousedown",{bubbles:!0})),t.dispatchEvent(new Event("click",{bubbles:!0})))})),Vp.getAndSubscribe((function(e){document.body.setAttribute("data-editor-theme",e.editor_theme)})),ay.connect(),window.liveSocket=ay})()})();