/*! For license information please see editor.worker.js.LICENSE.txt */ !function(){"use strict";var e={};function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="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},n(e)}function r(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function L(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}function E(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){k=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,a=Object.create(i.prototype),s=new I(r||[]);return o(a,"_invoke",{value:A(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",g="executing",v="completed",p={};function _(){}function y(){}function b(){}var C={};c(C,s,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(P([])));L&&L!==r&&i.call(L,s)&&(C=L);var E=b.prototype=_.prototype=Object.create(C);function N(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,a,s,u){var l=f(e[o],e,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==n(h)&&i.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(h).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function A(t,n,r){var i=d;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=x(s,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:m,l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function x(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}!function(e){var t=k().mark(s),n=k().mark(u),r=k().mark(l),i=k().mark(c),o=k().mark(h);e.is=function(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]};var a=Object.freeze([]);function s(e){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:case"end":return t.stop()}}),t)}function u(e,t){var r,i,o;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=S(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=10;break}if(o=i.value,!t(o)){n.next=8;break}return n.next=8,o;case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),r.e(n.t0);case 15:return n.prev=15,r.f(),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[1,12,15,18]])}function l(e,t){var n,i,o,a;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0,i=S(e),r.prev=2,i.s();case 4:if((o=i.n()).done){r.next=10;break}return a=o.value,r.next=8,t(a,n++);case 8:r.next=4;break;case 10:r.next=15;break;case 12:r.prev=12,r.t0=r.catch(2),i.e(r.t0);case 15:return r.prev=15,i.f(),r.finish(15);case 18:case"end":return r.stop()}}),r,null,[[2,12,15,18]])}function c(){var e,t,n,r,o,a,s,u,l,c=arguments;return k().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(e=c.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:e.length;return k().mark((function r(){return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);case 2:if(!(t1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,r=[];if(0===n)return[r,t];for(var i=t[Symbol.iterator](),o=0;o2&&void 0!==arguments[2]?arguments[2]:function(e,t){return e===t},r=e[Symbol.iterator](),i=t[Symbol.iterator]();;){var o=r.next(),a=i.next();if(o.done!==a.done)return!1;if(o.done)return!0;if(!n(o.value,a.value))return!1}}}(h||(h={}));var N=null;function w(e){return null===N||void 0===N||N.trackDisposable(e),e}function A(e){null===N||void 0===N||N.markAsDisposed(e)}function x(e,t){null===N||void 0===N||N.setParent(e,t)}var O=function(e){d(r,e);var n=p(r);function r(e){var i;return t(this,r),(i=n.call(this,"Encountered errors while disposing of store. Errors: [".concat(e.join(", "),"]"))).errors=e,i}return o(r)}(y(Error));function T(e){if(h.is(e)){var t,n=[],r=S(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i)try{i.dispose()}catch(o){n.push(o)}}}catch(a){r.e(a)}finally{r.f()}if(1===n.length)throw n[0];if(n.length>1)throw new O(n);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function I(){for(var e=arguments.length,t=new Array(e),n=0;n=0,K=W.indexOf("Macintosh")>=0,(W.indexOf("Macintosh")>=0||W.indexOf("iPad")>=0||W.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,B=W.indexOf("Linux")>=0,!0,navigator.language;var z=F,Q=K,X=function(){if(q.setImmediate)return q.setImmediate.bind(q);if("function"===typeof q.postMessage&&!q.importScripts){var e=[];q.addEventListener("message",(function(t){if(t.data&&t.data.vscodeSetImmediateId)for(var n=0,r=e.length;nt[3*r+1]))return t[3*r+2];r=2*r+1}return 0}}],[{key:"getInstance",value:function(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE}}]),e}();function ue(e,t){return(t<<5)-t+e|0}function le(e,t){t=ue(149417,t);for(var n=0,r=e.length;n2&&void 0!==arguments[2]?arguments[2]:32)-t;return(e<>>n)>>>0}function he(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=0;i1&&void 0!==arguments[1]?arguments[1]:32;return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join(""):function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0";e.length>>0).toString(16),t/4)}se._INSTANCE=null,(function(){function e(){t(this,e),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}return o(e,[{key:"update",value:function(e){var t=e.length;if(0!==t){var n,r,i=this._buff,o=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(n=a,r=-1,a=0):(n=e.charCodeAt(0),r=0);;){var s=n;if(ie(n)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}},{key:"digest",value:function(){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()),fe(this._h0)+fe(this._h1)+fe(this._h2)+fe(this._h3)+fe(this._h4)}},{key:"_wrapUp",value:function(){this._buff[this._buffLen++]=128,he(this._buff,this._buffLen),this._buffLen>56&&(this._step(),he(this._buff));var e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}},{key:"_step",value:function(){for(var t=e._bigBlock32,n=this._buffDV,r=0;r<64;r+=4)t.setUint32(r,n.getUint32(r,!1),!1);for(var i=64;i<320;i+=4)t.setUint32(i,ce(t.getUint32(i-12,!1)^t.getUint32(i-32,!1)^t.getUint32(i-56,!1)^t.getUint32(i-64,!1),1),!1);for(var o,a,s,u=this._h0,l=this._h1,c=this._h2,h=this._h3,f=this._h4,d=0;d<80;d++)d<20?(o=l&c|~l&h,a=1518500249):d<40?(o=l^c^h,a=1859775393):d<60?(o=l&c|l&h|c&h,a=2400959708):(o=l^c^h,a=3395469782),s=ce(u,5)+o+f+a+t.getUint32(4*d,!1)&4294967295,f=h,h=c,c=ce(l,30),l=u,u=s;this._h0=this._h0+u&4294967295,this._h1=this._h1+l&4294967295,this._h2=this._h2+c&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+f&4294967295}}]),e}())._bigBlock32=new DataView(new ArrayBuffer(320));var de=function(){function e(n){t(this,e),this.source=n}return o(e,[{key:"getElements",value:function(){for(var e=this.source,t=new Int32Array(e.length),n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new re(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}},{key:"AddOriginalElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}},{key:"AddModifiedElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}},{key:"getChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}},{key:"getReverseChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}]),e}(),ye=function(){function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t(this,e),this.ContinueProcessingPredicate=i,this._originalSequence=n,this._modifiedSequence=r;var o=ne(e._getElements(n),3),a=o[0],s=o[1],u=o[2],l=ne(e._getElements(r),3),c=l[0],h=l[1],f=l[2];this._hasStrings=u&&f,this._originalStringElements=a,this._originalElementsOrHash=s,this._modifiedStringElements=c,this._modifiedElementsOrHash=h,this.m_forwardHistory=[],this.m_reverseHistory=[]}return o(e,[{key:"ElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}},{key:"ElementsAreStrictEqual",value:function(t,n){return!!this.ElementsAreEqual(t,n)&&e._getStrictElement(this._originalSequence,t)===e._getStrictElement(this._modifiedSequence,n)}},{key:"OriginalElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}},{key:"ModifiedElementsAreEqual",value:function(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}},{key:"ComputeDiff",value:function(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}},{key:"_ComputeDiff",value:function(e,t,n,r,i){var o=[!1],a=this.ComputeDiffRecursive(e,t,n,r,o);return i&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}},{key:"ComputeDiffRecursive",value:function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;var o;if(e>t||n>r)return n<=r?(ve.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new re(e,0,n,r-n+1)]):e<=t?(ve.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new re(e,t-e+1,n,0)]):(ve.Assert(e===t+1,"originalStart should only be one more than originalEnd"),ve.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o;var a=[0],s=[0],u=this.ComputeRecursionPoint(e,t,n,r,a,s,i),l=a[0],c=s[0];if(null!==u)return u;if(!i[0]){var h=this.ComputeDiffRecursive(e,l,n,c,i),f=[];return f=i[0]?[new re(l+1,t-(l+1)+1,c+1,r-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,r,i),this.ConcatenateChanges(h,f)}return[new re(e,t-e+1,n,r-n+1)]}},{key:"WALKTRACE",value:function(e,t,n,r,i,o,a,s,u,l,c,h,f,d,m,g,v,p){var _,y=null,b=new _e,C=t,S=n,L=f[0]-g[0]-r,E=-1073741824,k=this.m_forwardHistory.length-1;do{var N=L+e;N===C||N=0&&(e=(u=this.m_forwardHistory[k])[0],C=1,S=u.length-1)}while(--k>=-1);if(_=b.getReverseChanges(),p[0]){var w=f[0]+1,A=g[0]+1;if(null!==_&&_.length>0){var x=_[_.length-1];w=Math.max(w,x.getOriginalEnd()),A=Math.max(A,x.getModifiedEnd())}y=[new re(w,h-w+1,A,m-A+1)]}else{b=new _e,C=o,S=a,L=f[0]-g[0]-s,E=1073741824,k=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var O=L+i;O===C||O=l[O+1]?(d=(c=l[O+1]-1)-L-s,c>E&&b.MarkNextChange(),E=c+1,b.AddOriginalElement(c+1,d+1),L=O+1-i):(d=(c=l[O-1])-L-s,c>E&&b.MarkNextChange(),E=c,b.AddModifiedElement(c+1,d+1),L=O-1-i),k>=0&&(i=(l=this.m_reverseHistory[k])[0],C=1,S=l.length-1)}while(--k>=-1);y=b.getChanges()}return this.ConcatenateChanges(_,y)}},{key:"ComputeRecursionPoint",value:function(e,t,n,r,i,o,a){var s=0,u=0,l=0,c=0,h=0,f=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var d=t-e+(r-n),m=d+1,g=new Int32Array(m),v=new Int32Array(m),p=r-n,_=t-e,y=e-n,b=t-r,C=(_-p)%2===0;g[p]=e,v[_]=t,a[0]=!1;for(var S=1;S<=d/2+1;S++){var L=0,E=0;l=this.ClipDiagonalBound(p-S,S,p,m),c=this.ClipDiagonalBound(p+S,S,p,m);for(var k=l;k<=c;k+=2){u=(s=k===l||kL+E&&(L=s,E=u),!C&&Math.abs(k-_)<=S-1&&s>=v[k])return i[0]=s,o[0]=u,N<=v[k]&&S<=1448?this.WALKTRACE(p,l,c,y,_,h,f,b,g,v,s,t,i,u,r,o,C,a):null}var w=(L-e+(E-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,w))return a[0]=!0,i[0]=L,o[0]=E,w>0&&S<=1448?this.WALKTRACE(p,l,c,y,_,h,f,b,g,v,s,t,i,u,r,o,C,a):(e++,n++,[new re(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(_-S,S,_,m),f=this.ClipDiagonalBound(_+S,S,_,m);for(var A=h;A<=f;A+=2){u=(s=A===h||A=v[A+1]?v[A+1]-1:v[A-1])-(A-_)-b;for(var x=s;s>e&&u>n&&this.ElementsAreEqual(s,u);)s--,u--;if(v[A]=s,C&&Math.abs(A-p)<=S&&s<=g[A])return i[0]=s,o[0]=u,x>=g[A]&&S<=1448?this.WALKTRACE(p,l,c,y,_,h,f,b,g,v,s,t,i,u,r,o,C,a):null}if(S<=1447){var O=new Int32Array(c-l+2);O[0]=p-l+1,pe.Copy2(g,l,O,1,c-l+1),this.m_forwardHistory.push(O),(O=new Int32Array(f-h+2))[0]=_-h+1,pe.Copy2(v,h,O,1,f-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(p,l,c,y,_,h,f,b,g,v,s,t,i,u,r,o,C,a)}},{key:"PrettifyChanges",value:function(e){for(var t=0;t0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;l--){var c=e[l],h=0,f=0;if(l>0){var d=e[l-1];h=d.originalStart+d.originalLength,f=d.modifiedStart+d.modifiedLength}for(var m=c.originalLength>0,g=c.modifiedLength>0,v=0,p=this._boundaryScore(c.originalStart,c.originalLength,c.modifiedStart,c.modifiedLength),_=1;;_++){var y=c.originalStart-_,b=c.modifiedStart-_;if(yp&&(p=C,v=_)}c.originalStart-=v,c.modifiedStart-=v;var S=[null];l>0&&this.ChangesOverlap(e[l-1],e[l],S)&&(e[l-1]=S[0],e.splice(l,1),l++)}if(this._hasStrings)for(var L=1,E=e.length;L0&&f>s&&(s=f,u=c,l=h)}return s>0?[u,l]:null}},{key:"_contiguousSequenceScore",value:function(e,t,n){for(var r=0,i=0;i=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}},{key:"_OriginalRegionIsBoundary",value:function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}},{key:"_ModifiedIsBoundary",value:function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}},{key:"_ModifiedRegionIsBoundary",value:function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}},{key:"_boundaryScore",value:function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}},{key:"ConcatenateChanges",value:function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return pe.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],pe.Copy(t,1,r,e.length,t.length-1),r}var i=new Array(e.length+t.length);return pe.Copy(e,0,i,0,e.length),pe.Copy(t,0,i,e.length,t.length),i}},{key:"ChangesOverlap",value:function(e,t,n){if(ve.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),ve.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){var r=e.originalStart,i=e.originalLength,o=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new re(r,i,o,a),!0}return n[0]=null,!1}},{key:"ClipDiagonalBound",value:function(e,t,n,r){if(e>=0&&e0&&"string"===typeof e[0]}},{key:"_getElements",value:function(t){var n=t.getElements();if(e._isStringArray(n)){for(var r=new Int32Array(n.length),i=0,o=n.length;i=65&&e<=90||e>=97&&e<=122}function Ie(e,t,n,r){for(var i="",o=0,a=-1,s=0,u=0,l=0;l<=e.length;++l){if(l2){var c=i.lastIndexOf(n);-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf(n),a=l,s=0;continue}if(0!==i.length){i="",o=0,a=l,s=0;continue}}t&&(i+=i.length>0?"".concat(n,".."):"..",o=2)}else i.length>0?i+="".concat(n).concat(e.slice(a+1,l)):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else u===Le&&-1!==s?++s:s=-1}return i}function Pe(e,t){if(null===t||"object"!==typeof t)throw new we("pathObject","Object",t);var n=t.dir||t.root,r=t.base||"".concat(t.name||"").concat(t.ext||"");return n?n===t.root?"".concat(n).concat(r):"".concat(n).concat(e).concat(r):r}var Me={resolve:function(){for(var e="",t="",n=!1,r=arguments.length-1;r>=-1;r--){var i=void 0;if(r>=0){if(Ae(i=r<0||arguments.length<=r?void 0:arguments[r],"path"),0===i.length)continue}else 0===e.length?i=Ce():(void 0===(i={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}["=".concat(e)]||Ce())||i.slice(0,2).toLowerCase()!==e.toLowerCase()&&i.charCodeAt(2)===ke)&&(i="".concat(e,"\\"));var o=i.length,a=0,s="",u=!1,l=i.charCodeAt(0);if(1===o)xe(l)&&(a=1,u=!0);else if(xe(l))if(u=!0,xe(i.charCodeAt(1))){for(var c=2,h=c;c2&&xe(i.charCodeAt(2))&&(u=!0,a=3));if(s.length>0)if(e.length>0){if(s.toLowerCase()!==e.toLowerCase())continue}else e=s;if(n){if(e.length>0)break}else if(t="".concat(i.slice(a),"\\").concat(t),n=u,u&&e.length>0)break}return t=Ie(t,!n,"\\",xe),n?"".concat(e,"\\").concat(t):"".concat(e).concat(t)||"."},normalize:function(e){Ae(e,"path");var t=e.length;if(0===t)return".";var n,r=0,i=!1,o=e.charCodeAt(0);if(1===t)return Oe(o)?"\\":e;if(xe(o))if(i=!0,xe(e.charCodeAt(1))){for(var a=2,s=a;a2&&xe(e.charCodeAt(2))&&(i=!0,r=3));var l=r0&&xe(e.charCodeAt(t-1))&&(l+="\\"),void 0===n?i?"\\".concat(l):l:i?"".concat(n,"\\").concat(l):"".concat(n).concat(l)},isAbsolute:function(e){Ae(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return xe(n)||t>2&&Te(n)&&e.charCodeAt(1)===Ne&&xe(e.charCodeAt(2))},join:function(){if(0===arguments.length)return".";for(var e,t,n=0;n0&&(void 0===e?e=t=r:e+="\\".concat(r))}if(void 0===e)return".";var i=!0,o=0;if("string"===typeof t&&xe(t.charCodeAt(0))){++o;var a=t.length;a>1&&xe(t.charCodeAt(1))&&(++o,a>2&&(xe(t.charCodeAt(2))?++o:i=!1))}if(i){for(;o=2&&(e="\\".concat(e.slice(o)))}return Me.normalize(e)},relative:function(e,t){if(Ae(e,"from"),Ae(t,"to"),e===t)return"";var n=Me.resolve(e),r=Me.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";for(var i=0;ii&&e.charCodeAt(o-1)===ke;)o--;for(var a=o-i,s=0;ss&&t.charCodeAt(u-1)===ke;)u--;for(var l=u-s,c=ac){if(t.charCodeAt(s+f)===ke)return r.slice(s+f+1);if(2===f)return r.slice(s+f)}a>c&&(e.charCodeAt(i+f)===ke?h=f:2===f&&(h=3)),-1===h&&(h=0)}var m="";for(f=i+h+1;f<=o;++f)f!==o&&e.charCodeAt(f)!==ke||(m+=0===m.length?"..":"\\..");return s+=h,m.length>0?"".concat(m).concat(r.slice(s,u)):(r.charCodeAt(s)===ke&&++s,r.slice(s,u))},toNamespacedPath:function(e){if("string"!==typeof e)return e;if(0===e.length)return"";var t=Me.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===ke){if(t.charCodeAt(1)===ke){var n=t.charCodeAt(2);if(63!==n&&n!==Le)return"\\\\?\\UNC\\".concat(t.slice(2))}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===Ne&&t.charCodeAt(2)===ke)return"\\\\?\\".concat(t);return e},dirname:function(e){Ae(e,"path");var t=e.length;if(0===t)return".";var n=-1,r=0,i=e.charCodeAt(0);if(1===t)return xe(i)?e:".";if(xe(i)){if(n=r=1,xe(e.charCodeAt(1))){for(var o=2,a=o;o2&&xe(e.charCodeAt(2))?3:2);for(var s=-1,u=!0,l=t-1;l>=r;--l)if(xe(e.charCodeAt(l))){if(!u){s=l;break}}else u=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename:function(e,t){void 0!==t&&Ae(t,"ext"),Ae(e,"path");var n,r=0,i=-1,o=!0;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===Ne&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=r;--n){var u=e.charCodeAt(n);if(xe(u)){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(u===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(xe(e.charCodeAt(n))){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){Ae(e,"path");var t=0,n=-1,r=0,i=-1,o=!0,a=0;e.length>=2&&e.charCodeAt(1)===Ne&&Te(e.charCodeAt(0))&&(t=r=2);for(var s=e.length-1;s>=t;--s){var u=e.charCodeAt(s);if(xe(u)){if(!o){r=s+1;break}}else-1===i&&(o=!1,i=s+1),u===Le?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1)}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Pe.bind(null,"\\"),parse:function(e){Ae(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n=e.length,r=0,i=e.charCodeAt(0);if(1===n)return xe(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(xe(i)){if(r=1,xe(e.charCodeAt(1))){for(var o=2,a=o;o0&&(t.root=e.slice(0,r));for(var s=-1,u=r,l=-1,c=!0,h=e.length-1,f=0;h>=r;--h)if(xe(i=e.charCodeAt(h))){if(!c){u=h+1;break}}else-1===l&&(c=!1,l=h+1),i===Le?-1===s?s=h:1!==f&&(f=1):-1!==s&&(f=-1);return-1!==l&&(-1===s||0===f||1===f&&s===l-1&&s===u+1?t.base=t.name=e.slice(u,l):(t.name=e.slice(u,s),t.base=e.slice(u,l),t.ext=e.slice(s,l))),t.dir=u>0&&u!==r?e.slice(0,u-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Re={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:Ce();Ae(r,"path"),0!==r.length&&(e="".concat(r,"/").concat(e),t=r.charCodeAt(0)===Ee)}return e=Ie(e,!t,"/",Oe),t?"/".concat(e):e.length>0?e:"."},normalize:function(e){if(Ae(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===Ee,n=e.charCodeAt(e.length-1)===Ee;return 0===(e=Ie(e,!t,"/",Oe)).length?t?"/":n?"./":".":(n&&(e+="/"),t?"/".concat(e):e)},isAbsolute:function(e){return Ae(e,"path"),e.length>0&&e.charCodeAt(0)===Ee},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/".concat(n))}return void 0===e?".":Re.normalize(e)},relative:function(e,t){if(Ae(e,"from"),Ae(t,"to"),e===t)return"";if((e=Re.resolve(e))===(t=Re.resolve(t)))return"";for(var n=e.length,r=n-1,i=t.length-1,o=ro){if(t.charCodeAt(1+s)===Ee)return t.slice(1+s+1);if(0===s)return t.slice(1+s)}else r>o&&(e.charCodeAt(1+s)===Ee?a=s:0===s&&(a=0));var l="";for(s=1+a+1;s<=n;++s)s!==n&&e.charCodeAt(s)!==Ee||(l+=0===l.length?"..":"/..");return"".concat(l).concat(t.slice(1+a))},toNamespacedPath:function(e){return e},dirname:function(e){if(Ae(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===Ee,n=-1,r=!0,i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Ee){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&Ae(t,"ext"),Ae(e,"path");var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(u===Ee){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(u===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===Ee){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){Ae(e,"path");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(s!==Ee)-1===r&&(i=!1,r=a+1),s===Le?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Pe.bind(null,"/"),parse:function(e){Ae(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0)===Ee;r?(t.root="/",n=1):n=0;for(var i=-1,o=0,a=-1,s=!0,u=e.length-1,l=0;u>=n;--u){var c=e.charCodeAt(u);if(c!==Ee)-1===a&&(s=!1,a=u+1),c===Le?-1===i?i=u:1!==l&&(l=1):-1!==i&&(l=-1);else if(!s){o=u+1;break}}if(-1!==a){var h=0===o&&r?1:o;-1===i||0===l||1===l&&i===a-1&&i===o+1?t.base=t.name=e.slice(h,a):(t.name=e.slice(h,i),t.base=e.slice(h,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Re.win32=Me.win32=Me,Re.posix=Me.posix=Re;"win32"===Se?Me.normalize:Re.normalize,"win32"===Se?Me.resolve:Re.resolve,"win32"===Se?Me.relative:Re.relative,"win32"===Se?Me.dirname:Re.dirname,"win32"===Se?Me.basename:Re.basename,"win32"===Se?Me.extname:Re.extname,"win32"===Se?Me.sep:Re.sep;var Ue,De=/^\w[\w\d+.-]*$/,Fe=/^\//,Ke=/^\/\//;function Be(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!De.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Fe.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(Ke.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 ("//")')}var We="",qe="/",He=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Ye=function(){function e(n,r,i,o,a){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];t(this,e),"object"===typeof n?(this.scheme=n.scheme||We,this.authority=n.authority||We,this.path=n.path||We,this.query=n.query||We,this.fragment=n.fragment||We):(this.scheme=function(e,t){return e||t?e:"file"}(n,s),this.authority=r||We,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==qe&&(t=qe+t):t=qe}return t}(this.scheme,i||We),this.query=o||We,this.fragment=a||We,Be(this,s))}return o(e,[{key:"fsPath",get:function(){return Xe(this,!1)}},{key:"with",value:function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=We),void 0===n?n=this.authority:null===n&&(n=We),void 0===r?r=this.path:null===r&&(r=We),void 0===i?i=this.query:null===i&&(i=We),void 0===o?o=this.fragment:null===o&&(o=We),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new je(t,n,r,i,o)}},{key:"toString",value:function(){return Ze(this,arguments.length>0&&void 0!==arguments[0]&&arguments[0])}},{key:"toJSON",value:function(){return this}}],[{key:"isUri",value:function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme&&"string"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)}},{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=He.exec(e);return n?new je(n[2]||We,et(n[4]||We),et(n[5]||We),et(n[7]||We),et(n[9]||We),t):new je(We,We,We,We,We)}},{key:"file",value:function(e){var t=We;if(z&&(e=e.replace(/\\/g,qe)),e[0]===qe&&e[1]===qe){var n=e.indexOf(qe,2);-1===n?(t=e.substring(2),e=qe):(t=e.substring(2,n),e=e.substring(n)||qe)}return new je("file",t,e,We,We)}},{key:"from",value:function(e){var t=new je(e.scheme,e.authority,e.path,e.query,e.fragment);return Be(t,!0),t}},{key:"joinPath",value:function(t){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");for(var n,r,i,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0]?Ze(this,!0):(this._formatted||(this._formatted=Ze(this,!1)),this._formatted)}},{key:"toJSON",value:function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ve),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}}]),r}(Ye),Ge=(E(Ue={},58,"%3A"),E(Ue,47,"%2F"),E(Ue,63,"%3F"),E(Ue,35,"%23"),E(Ue,91,"%5B"),E(Ue,93,"%5D"),E(Ue,64,"%40"),E(Ue,33,"%21"),E(Ue,36,"%24"),E(Ue,38,"%26"),E(Ue,39,"%27"),E(Ue,40,"%28"),E(Ue,41,"%29"),E(Ue,42,"%2A"),E(Ue,43,"%2B"),E(Ue,44,"%2C"),E(Ue,59,"%3B"),E(Ue,61,"%3D"),E(Ue,32,"%20"),Ue);function ze(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=Ge[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function Qe(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//".concat(e.authority).concat(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,z&&(n=n.replace(/\//g,"\\")),n}function Ze(e,t){var n=t?Qe:ze,r="",i=e.scheme,o=e.authority,a=e.path,s=e.query,u=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=qe,r+=qe),o){var l=o.indexOf("@");if(-1!==l){var c=o.substr(0,l);o=o.substr(l+1),-1===(l=c.indexOf(":"))?r+=n(c,!1):(r+=n(c.substr(0,l),!1),r+=":",r+=n(c.substr(l+1),!1)),r+="@"}-1===(l=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,l),!1),r+=o.substr(l))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){var h=a.charCodeAt(1);h>=65&&h<=90&&(a="/".concat(String.fromCharCode(h+32),":").concat(a.substr(3)))}else if(a.length>=2&&58===a.charCodeAt(1)){var f=a.charCodeAt(0);f>=65&&f<=90&&(a="".concat(String.fromCharCode(f+32),":").concat(a.substr(2)))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),u&&(r+="#",r+=t?u:ze(u,!1)),r}function $e(e){try{return decodeURIComponent(e)}catch(U){return e.length>3?e.substr(0,3)+$e(e.substr(3)):e}}var Je=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function et(e){return e.match(Je)?e.replace(Je,(function(e){return $e(e)})):e}var tt=function(){function e(n,r){t(this,e),this.lineNumber=n,this.column=r}return o(e,[{key:"with",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return t===this.lineNumber&&n===this.column?this:new e(t,n)}},{key:"delta",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}},{key:"equals",value:function(t){return e.equals(this,t)}},{key:"isBefore",value:function(t){return e.isBefore(this,t)}},{key:"isBeforeOrEqual",value:function(t){return e.isBeforeOrEqual(this,t)}},{key:"clone",value:function(){return new e(this.lineNumber,this.column)}},{key:"toString",value:function(){return"("+this.lineNumber+","+this.column+")"}}],[{key:"equals",value:function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}},{key:"isBefore",value:function(e,t){return e.lineNumberi||n===i&&r>o?(this.startLineNumber=i,this.startColumn=o,this.endLineNumber=n,this.endColumn=r):(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=i,this.endColumn=o)}return o(e,[{key:"isEmpty",value:function(){return e.isEmpty(this)}},{key:"containsPosition",value:function(t){return e.containsPosition(this,t)}},{key:"containsRange",value:function(t){return e.containsRange(this,t)}},{key:"strictContainsRange",value:function(t){return e.strictContainsRange(this,t)}},{key:"plusRange",value:function(t){return e.plusRange(this,t)}},{key:"intersectRanges",value:function(t){return e.intersectRanges(this,t)}},{key:"equalsRange",value:function(t){return e.equalsRange(this,t)}},{key:"getEndPosition",value:function(){return e.getEndPosition(this)}},{key:"getStartPosition",value:function(){return e.getStartPosition(this)}},{key:"toString",value:function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}},{key:"setEndPosition",value:function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}},{key:"setStartPosition",value:function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}},{key:"collapseToStart",value:function(){return e.collapseToStart(this)}}],[{key:"isEmpty",value:function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}},{key:"containsPosition",value:function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}},{key:"containsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}},{key:"strictContainsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}},{key:"plusRange",value:function(t,n){var r,i,o,a;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,a=t.endColumn),new e(r,i,o,a)}},{key:"intersectRanges",value:function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,a=t.endColumn,s=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(o=l,a=c):o===l&&(a=Math.min(a,c)),r>o||r===o&&i>a?null:new e(r,i,o,a)}},{key:"equalsRange",value:function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}},{key:"getEndPosition",value:function(e){return new tt(e.endLineNumber,e.endColumn)}},{key:"getStartPosition",value:function(e){return new tt(e.startLineNumber,e.startColumn)}},{key:"collapseToStart",value:function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}},{key:"fromPositions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"lift",value:function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}},{key:"isIRange",value:function(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}},{key:"areIntersectingOrTouching",value:function(e,t){return!(e.endLineNumbere.startLineNumber}}]),e}();function rt(e,t,n,r){return new ye(e,t,n).ComputeDiff(r)}var it=function(){function e(n){t(this,e);for(var r=[],i=[],o=0,a=n.length;o0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&o()){var d=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),m=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),g=rt(d,m,o,!0).changes;s&&(g=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r1&&p>1;){if(m.charCodeAt(v-2)!==g.charCodeAt(p-2))break;v--,p--}(v>1||p>1)&&this._pushTrimWhitespaceCharChange(a,s+1,1,v,u+1,1,p);for(var _=ct(m,1),y=ct(g,1),b=m.length+1,C=g.length+1;_1&&void 0!==arguments[1]?arguments[1]:e.length-1;t>=0;t--){var n=e.charCodeAt(t);if(32!==n&&9!==n)return t}return-1}(e);return-1===n?t:n+2}function ht(e){if(0===e)return function(){return!0};var t=Date.now();return function(){return Date.now()-t255?255:0|e}function dt(e){return e<0?0:e>4294967295?4294967295:0|e}var mt=o((function e(n,r){t(this,e),this._prefixSumIndexOfResultBrand=void 0,this.index=n,this.remainder=r})),gt=function(){function e(n){t(this,e),this.values=n,this.prefixSum=new Uint32Array(n.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return o(e,[{key:"insertValues",value:function(e,t){e=dt(e);var n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"changeValue",value:function(e,t){return e=dt(e),t=dt(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"getTotalSum",value:function(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}},{key:"getPrefixSum",value:function(e){return e<0?0:(e=dt(e),this._getPrefixSum(e))}},{key:"_getPrefixSum",value:function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}},{key:"getIndexOf",value:function(e){e=Math.floor(e),this.getTotalSum();for(var t=0,n=this.values.length-1,r=0,i=0,o=0;t<=n;)if(r=t+(n-t)/2|0,e<(o=(i=this.prefixSum[r])-this.values[r]))n=r-1;else{if(!(e>=i))break;t=r+1}return new mt(r,e-o)}}]),e}(),vt=function(){function e(n,r,i,o){t(this,e),this._uri=n,this._lines=r,this._eol=i,this._versionId=o,this._lineStarts=null,this._cachedTextValue=null}return o(e,[{key:"dispose",value:function(){this._lines.length=0}},{key:"version",get:function(){return this._versionId}},{key:"getText",value:function(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}},{key:"onEvents",value:function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);var t,n=S(e.changes);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._acceptDeleteRange(r.range),this._acceptInsertText(new tt(r.range.startLineNumber,r.range.startColumn),r.text)}}catch(i){n.e(i)}finally{n.f()}this._versionId=e.versionId,this._cachedTextValue=null}},{key:"_ensureLineStarts",value:function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,n=new Uint32Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",n="(-?\\d*\\.\\d\\w*)|([^",r=S("`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?");try{for(r.s();!(e=r.n()).done;){var i=e.value;t.indexOf(i)>=0||(n+="\\"+i)}}catch(o){r.e(o)}finally{r.f()}return n+="\\s]+)",new RegExp(n,"g")}();var _t={maxLen:1e3,windowSize:15,timeBudget:150};function yt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:_t;if(n.length>i.maxLen){var o=e-i.maxLen/2;return o<0?o=0:r+=o,yt(e,t,n=n.substring(o,e+i.maxLen/2),r,i)}for(var a=Date.now(),s=e-1-r,u=-1,l=null,c=1;!(Date.now()-a>=i.timeBudget);c++){var h=s-i.windowSize*c;t.lastIndex=Math.max(0,h);var f=bt(t,n,s,u);if(!f&&l)break;if(l=f,h<=0)break;u=h}if(l){var d={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return t.lastIndex=0,d}return null}function bt(e,t,n,r){for(var i;i=e.exec(t);){var o=i.index||0;if(o<=n&&e.lastIndex>=n)return i;if(r>0&&o>r)return null}return null}var Ct=function(){function e(n){t(this,e);var r=ft(n);this._defaultValue=r,this._asciiMap=e._createAsciiMap(r),this._map=new Map}return o(e,[{key:"set",value:function(e,t){var n=ft(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}},{key:"get",value:function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}],[{key:"_createAsciiMap",value:function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t}}]),e}(),St=function(){function e(n,r,i){t(this,e);for(var o=new Uint8Array(n*r),a=0,s=n*r;ar&&(r=l),u>i&&(i=u),c>i&&(i=c)}r++,i++;for(var h=new St(i,r,0),f=0,d=n.length;f=this._maxCharCode?0:this._states.get(e,t)}}]),e}(),Et=null;var kt=null;var Nt=function(){function e(){t(this,e)}return o(e,null,[{key:"_createLink",value:function(e,t,n,r,i){var o=i-1;do{var a=t.charCodeAt(o);if(2!==e.get(a))break;o--}while(o>r);if(r>0){var s=t.charCodeAt(r-1),u=t.charCodeAt(o);(40===s&&41===u||91===s&&93===u||123===s&&125===u)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}}},{key:"computeLinks",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(null===Et&&(Et=new Lt([[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]])),Et),r=function(){if(null===kt){kt=new Ct(0);for(var e=" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u3008\u300c\u300e\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u300f\u300d\u3009\u2019\uff40\uff5e\u2026",t=0;t<35;t++)kt.set(e.charCodeAt(t),1);for(var n=0;n<3;n++)kt.set(".,;".charCodeAt(n),2)}return kt}(),i=[],o=1,a=t.getLineCount();o<=a;o++){for(var s=t.getLineContent(o),u=s.length,l=0,c=0,h=0,f=1,d=!1,m=!1,g=!1,v=!1;l=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null}}]),e}();function xt(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(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.")}()}At.INSTANCE=new At;var Ot=o((function e(n){t(this,e),this.element=n,this.next=e.Undefined,this.prev=e.Undefined}));Ot.Undefined=new Ot(void 0);var Tt,It=function(e){function n(){t(this,n),this._first=Ot.Undefined,this._last=Ot.Undefined,this._size=0}return o(n,[{key:"size",get:function(){return this._size}},{key:"isEmpty",value:function(){return this._first===Ot.Undefined}},{key:"clear",value:function(){for(var e=this._first;e!==Ot.Undefined;){var t=e.next;e.prev=Ot.Undefined,e.next=Ot.Undefined,e=t}this._first=Ot.Undefined,this._last=Ot.Undefined,this._size=0}},{key:"unshift",value:function(e){return this._insert(e,!1)}},{key:"push",value:function(e){return this._insert(e,!0)}},{key:"_insert",value:function(e,t){var n=this,r=new Ot(e);if(this._first===Ot.Undefined)this._first=r,this._last=r;else if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}}},{key:"shift",value:function(){if(this._first!==Ot.Undefined){var e=this._first.element;return this._remove(this._first),e}}},{key:"pop",value:function(){if(this._last!==Ot.Undefined){var e=this._last.element;return this._remove(this._last),e}}},{key:"_remove",value:function(e){if(e.prev!==Ot.Undefined&&e.next!==Ot.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ot.Undefined&&e.next===Ot.Undefined?(this._first=Ot.Undefined,this._last=Ot.Undefined):e.next===Ot.Undefined?(this._last=this._last.prev,this._last.next=Ot.Undefined):e.prev===Ot.Undefined&&(this._first=this._first.next,this._first.prev=Ot.Undefined);this._size-=1}},{key:Symbol.iterator,value:k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._first;case 1:if(t===Ot.Undefined){e.next=7;break}return e.next=4,t.element;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}]),n}(),Pt=q.performance&&"function"===typeof q.performance.now,Mt=function(){function e(n){t(this,e),this._highResolution=Pt&&n,this._startTime=this._now(),this._stopTime=-1}return o(e,[{key:"stop",value:function(){this._stopTime=this._now()}},{key:"elapsed",value:function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}},{key:"_now",value:function(){return this._highResolution?q.performance.now():Date.now()}}],[{key:"create",value:function(){return new e(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}}]),e}();!function(e){function n(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=!1;return n=e((function(e){if(!i)return n?n.dispose():i=!0,t.call(r,e)}),null,arguments.length>2?arguments[2]:void 0),i&&n.dispose(),n}}function r(e,t){return u((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e((function(e){return n.call(r,t(e))}),null,arguments.length>2?arguments[2]:void 0)}))}function i(e,t){return u((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e((function(e){t(e),n.call(r,e)}),null,arguments.length>2?arguments[2]:void 0)}))}function a(e,t){return u((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e((function(e){return t(e)&&n.call(r,e)}),null,arguments.length>2?arguments[2]:void 0)}))}function s(e,t,n){var i=n;return r(e,(function(e){return i=t(i,e)}))}function u(e){var t,n=new Dt({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function l(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=void 0,a=void 0,s=0,u=new Dt({leakWarningThreshold:arguments.length>4?arguments[4]:void 0,onFirstListenerAdd:function(){n=e((function(e){s++,o=t(o,e),i&&!a&&(u.fire(o),o=void 0),clearTimeout(a),a=setTimeout((function(){var e=o;o=void 0,a=void 0,(!i||s>1)&&u.fire(e),s=0}),r)}))},onLastListenerRemove:function(){n.dispose()}});return u.event}function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e===t},r=!0;return a(e,(function(e){var i=r||!n(e,t);return r=!1,t=e,i}))}e.None=function(){return R.None},e.once=n,e.map=r,e.forEach=i,e.filter=a,e.signal=function(e){return e},e.any=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;return I.apply(void 0,xt(t.map((function(t){return t((function(t){return e.call(n,t)}),null,r)}))))}},e.reduce=s,e.debounce=l,e.latch=c,e.split=function(t,n){return[e.filter(t,n),e.filter(t,(function(e){return!n(e)}))]},e.buffer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).slice(),r=e((function(e){n?n.push(e):o.fire(e)})),i=function(){n&&n.forEach((function(e){return o.fire(e)})),n=null},o=new Dt({onFirstListenerAdd:function(){r||(r=e((function(e){return o.fire(e)})))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(i):i())},onLastListenerRemove:function(){r&&r.dispose(),r=null}});return o.event};var h=function(){function e(n){t(this,e),this.event=n}return o(e,[{key:"map",value:function(t){return new e(r(this.event,t))}},{key:"forEach",value:function(t){return new e(i(this.event,t))}},{key:"filter",value:function(t){return new e(a(this.event,t))}},{key:"reduce",value:function(t,n){return new e(s(this.event,t,n))}},{key:"latch",value:function(){return new e(c(this.event))}},{key:"debounce",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return new e(l(this.event,t,n,r,i))}},{key:"on",value:function(e,t,n){return this.event(e,t,n)}},{key:"once",value:function(e,t,r){return n(this.event)(e,t,r)}}]),e}();e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return i.fire(n.apply(void 0,arguments))},i=new Dt({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return i.event},e.fromDOMEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return i.fire(n.apply(void 0,arguments))},i=new Dt({onFirstListenerAdd:function(){return e.addEventListener(t,r)},onLastListenerRemove:function(){return e.removeEventListener(t,r)}});return i.event},e.toPromise=function(e){return new Promise((function(t){return n(e)(t)}))}}(Tt||(Tt={}));var Rt=function(){function e(n){t(this,e),this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name="".concat(n,"_").concat(e._idPool++)}return o(e,[{key:"start",value:function(e){this._stopWatch=new Mt(!0),this._listenerCount=e}},{key:"stop",value:function(){if(this._stopWatch){var e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info("did FIRE ".concat(this._name,": elapsed_ms: ").concat(e.toFixed(5),", listener: ").concat(this._listenerCount," (elapsed_overall: ").concat(this._elapsedOverall.toFixed(2),", invocations: ").concat(this._invocationCount,")")),this._stopWatch=void 0}}}]),e}();Rt._idPool=0;var Ut,Dt=function(){function e(n){var r;t(this,e),this._disposed=!1,this._options=n,this._leakageMon=void 0,this._perfMon=(null===(r=this._options)||void 0===r?void 0:r._profName)?new Rt(this._options._profName):void 0}return o(e,[{key:"event",get:function(){var e=this;return this._event||(this._event=function(t,n,r){var i;e._listeners||(e._listeners=new It);var o=e._listeners.isEmpty();o&&e._options&&e._options.onFirstListenerAdd&&e._options.onFirstListenerAdd(e);var a=e._listeners.push(n?[t,n]:t);o&&e._options&&e._options.onFirstListenerDidAdd&&e._options.onFirstListenerDidAdd(e),e._options&&e._options.onListenerDidAdd&&e._options.onListenerDidAdd(e,t,n);var s=null===(i=e._leakageMon)||void 0===i?void 0:i.check(e._listeners.size),u=P((function(){(s&&s(),e._disposed)||(a(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}));return r instanceof M?r.add(u):Array.isArray(r)&&r.push(u),u}),this._event}},{key:"fire",value:function(e){var t,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new It);var r,i=S(this._listeners);try{for(i.s();!(r=i.n()).done;){var o=r.value;this._deliveryQueue.push([o,e])}}catch(c){i.e(c)}finally{i.f()}for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){var a=ne(this._deliveryQueue.shift(),2),u=a[0],l=a[1];try{"function"===typeof u?u.call(void 0,l):u[0].call(u[1],l)}catch(Rn){s(Rn)}}null===(n=this._perfMon)||void 0===n||n.stop()}}},{key:"dispose",value:function(){var e,t,n,r,i;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(r=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===r||r.call(n),null===(i=this._leakageMon)||void 0===i||i.dispose())}}]),e}(),Ft=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof Bt||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ft})}(Ut||(Ut={}));var Kt,Bt=function(){function e(){t(this,e),this._isCancelled=!1,this._emitter=null}return o(e,[{key:"cancel",value:function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}},{key:"isCancellationRequested",get:function(){return this._isCancelled}},{key:"onCancellationRequested",get:function(){return this._isCancelled?Ft:(this._emitter||(this._emitter=new Dt),this._emitter.event)}},{key:"dispose",value:function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}]),e}(),Wt=function(){function e(n){t(this,e),this._token=void 0,this._parentListener=void 0,this._parentListener=n&&n.onCancellationRequested(this.cancel,this)}return o(e,[{key:"token",get:function(){return this._token||(this._token=new Bt),this._token}},{key:"cancel",value:function(){this._token?this._token instanceof Bt&&this._token.cancel():this._token=Ut.Cancelled}},{key:"dispose",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Bt&&this._token.dispose():this._token=Ut.None}}]),e}(),qt=function(){function e(){t(this,e),this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return o(e,[{key:"define",value:function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}},{key:"keyCodeToStr",value:function(e){return this._keyCodeToStr[e]}},{key:"strToKeyCode",value:function(e){return this._strToKeyCode[e.toLowerCase()]||0}}]),e}(),Ht=new qt,Yt=new qt,Vt=new qt;!function(){function e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;Ht.define(e,t),Yt.define(e,n),Vt.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return Ht.keyCodeToStr(e)},e.fromString=function(e){return Ht.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Yt.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return Vt.keyCodeToStr(e)},e.fromUserSettings=function(e){return Yt.strToKeyCode(e)||Vt.strToKeyCode(e)}}(Kt||(Kt={}));var jt,Gt,zt,Qt,Xt,Zt,$t,Jt,en,tn,nn,rn,on,an,sn,un,ln,cn,hn,fn,dn,mn,gn,vn,pn,_n,yn,bn,Cn,Sn,Ln,En,kn,Nn,wn,An=function(e){d(r,e);var n=p(r);function r(e,i,o,a){var s;return t(this,r),(s=n.call(this,e,i,o,a)).selectionStartLineNumber=e,s.selectionStartColumn=i,s.positionLineNumber=o,s.positionColumn=a,s}return o(r,[{key:"toString",value:function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}},{key:"equalsSelection",value:function(e){return r.selectionsEqual(this,e)}},{key:"getDirection",value:function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}},{key:"setEndPosition",value:function(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}},{key:"getPosition",value:function(){return new tt(this.positionLineNumber,this.positionColumn)}},{key:"setStartPosition",value:function(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}}],[{key:"selectionsEqual",value:function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}},{key:"fromPositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new r(e.lineNumber,e.column,t.lineNumber,t.column)}},{key:"liftSelection",value:function(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}},{key:"selectionsArrEqual",value:function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n>>0)>>>0}(e,t)}}]),e}();On.CtrlCmd=2048,On.Shift=1024,On.Alt=512,On.WinCtrl=256;var Tn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(Rn){o(Rn)}}function s(e){try{u(r.throw(e))}catch(Rn){o(Rn)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},In=function(e){d(r,e);var n=p(r);function r(){return t(this,r),n.apply(this,arguments)}return o(r,[{key:"uri",get:function(){return this._uri}},{key:"eol",get:function(){return this._eol}},{key:"getValue",value:function(){return this.getText()}},{key:"getLinesContent",value:function(){return this._lines.slice(0)}},{key:"getLineCount",value:function(){return this._lines.length}},{key:"getLineContent",value:function(e){return this._lines[e-1]}},{key:"getWordAtPosition",value:function(e,t){var n=yt(e.column,function(e){var t=pt;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}(t),this._lines[e.lineNumber-1],0);return n?new nt(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}},{key:"words",value:function(e){var t=this._lines,n=this._wordenize.bind(this),r=0,i="",o=0,a=[];return E({},Symbol.iterator,k().mark((function s(){var u;return k().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!(othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e}}]),r}(vt),Pn=function(){function e(n,r){t(this,e),this._host=n,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}return o(e,[{key:"dispose",value:function(){this._models=Object.create(null)}},{key:"_getModel",value:function(e){return this._models[e]}},{key:"_getModels",value:function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t}},{key:"acceptNewModel",value:function(e){this._models[e.url]=new In(Ye.parse(e.url),e.lines,e.EOL,e.versionId)}},{key:"acceptModelChanged",value:function(e,t){this._models[e]&&this._models[e].onEvents(t)}},{key:"acceptRemovedModel",value:function(e){this._models[e]&&delete this._models[e]}},{key:"computeDiff",value:function(e,t,n,r){return Tn(this,void 0,void 0,k().mark((function i(){var o,a,s,u,l,c,h;return k().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e),a=this._getModel(t),o&&a){i.next=4;break}return i.abrupt("return",null);case 4:return s=o.getLinesContent(),u=a.getLinesContent(),l=new ut(s,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}),c=l.computeDiff(),h=!(c.changes.length>0)&&this._modelsAreIdentical(o,a),i.abrupt("return",{quitEarly:c.quitEarly,identical:h,changes:c.changes});case 10:case"end":return i.stop()}}),i,this)})))}},{key:"_modelsAreIdentical",value:function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0}},{key:"computeMoreMinimalEdits",value:function(t,n){return Tn(this,void 0,void 0,k().mark((function r(){var i,o,a,s,u,l,c,h,f,d,m,g,v,p,_,y,b,C;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this._getModel(t)){r.next=3;break}return r.abrupt("return",n);case 3:o=[],a=void 0,n=n.slice(0).sort((function(e,t){return e.range&&t.range?nt.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)})),s=S(n),r.prev=7,s.s();case 9:if((u=s.n()).done){r.next=27;break}if(l=u.value,c=l.range,h=l.text,"number"===typeof(f=l.eol)&&(a=f),!nt.isEmpty(c)||h){r.next=14;break}return r.abrupt("continue",25);case 14:if(d=i.getValueInRange(c),h=h.replace(/\r\n|\n|\r/g,i.eol),d!==h){r.next=18;break}return r.abrupt("continue",25);case 18:if(!(Math.max(h.length,d.length)>e._diffLimit)){r.next=21;break}return o.push({range:c,text:h}),r.abrupt("continue",25);case 21:m=me(d,h,!1),g=i.offsetAt(nt.lift(c).getStartPosition()),v=S(m);try{for(v.s();!(p=v.n()).done;)_=p.value,y=i.positionAt(g+_.originalStart),b=i.positionAt(g+_.originalStart+_.originalLength),C={text:h.substr(_.modifiedStart,_.modifiedLength),range:{startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:b.lineNumber,endColumn:b.column}},i.getValueInRange(C.range)!==C.text&&o.push(C)}catch(L){v.e(L)}finally{v.f()}case 25:r.next=9;break;case 27:r.next=32;break;case 29:r.prev=29,r.t0=r.catch(7),s.e(r.t0);case 32:return r.prev=32,s.f(),r.finish(32);case 35:return"number"===typeof a&&o.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r.abrupt("return",o);case 37:case"end":return r.stop()}}),r,this,[[7,29,32,35]])})))}},{key:"computeLinks",value:function(e){return Tn(this,void 0,void 0,k().mark((function t(){var n;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._getModel(e)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",wt(n));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"textualSuggest",value:function(t,n,r,i){return Tn(this,void 0,void 0,k().mark((function o(){var a,s,u,l,c,h,f,d,m,g;return k().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:a=new Mt(!0),s=new RegExp(r,i),u=new Set,l=S(t),o.prev=4,l.s();case 6:if((c=l.n()).done){o.next=33;break}if(h=c.value,f=this._getModel(h)){o.next=11;break}return o.abrupt("continue",31);case 11:d=S(f.words(s)),o.prev=12,d.s();case 14:if((m=d.n()).done){o.next=23;break}if((g=m.value)!==n&&isNaN(Number(g))){o.next=18;break}return o.abrupt("continue",21);case 18:if(u.add(g),!(u.size>e._suggestionsLimit)){o.next=21;break}return o.abrupt("break",33);case 21:o.next=14;break;case 23:o.next=28;break;case 25:o.prev=25,o.t0=o.catch(12),d.e(o.t0);case 28:return o.prev=28,d.f(),o.finish(28);case 31:o.next=6;break;case 33:o.next=38;break;case 35:o.prev=35,o.t1=o.catch(4),l.e(o.t1);case 38:return o.prev=38,l.f(),o.finish(38);case 41:return o.abrupt("return",{words:Array.from(u),duration:a.elapsed()});case 42:case"end":return o.stop()}}),o,this,[[4,35,38,41],[12,25,28,31]])})))}},{key:"computeWordRanges",value:function(e,t,n,r){return Tn(this,void 0,void 0,k().mark((function i(){var o,a,s,u,l,c,h,f,d;return k().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e)){i.next=3;break}return i.abrupt("return",Object.create(null));case 3:a=new RegExp(n,r),s=Object.create(null),u=t.startLineNumber;case 6:if(!(u