UNPKG

cloudstudio

Version:

Run VS Code on a remote server.

1 lines 286 kB
var serverExportVar;(()=>{"use strict";var e={8735:(e,t,n)=>{function r(e,t){void 0===t&&(t=!1);var n=e.length,r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){for(var o=0,i=0;o<t||!n;){var s=e.charCodeAt(r);if(s>=48&&s<=57)i=16*i+s-48;else if(s>=65&&s<=70)i=16*i+s-65+10;else{if(!(s>=97&&s<=102))break;i=16*i+s-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",p=0,c=r,d=l,h=f,r>=n)return c=n,u=17;var t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){for(var t="",o=r;;){if(r>=n){t+=e.substring(o,r),p=2;break}var s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),++r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=m(4,!0);a>=0?t+=String.fromCharCode(a):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:var g=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(g,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;for(var v=n-1,b=!1;r<v;){var R=e.charCodeAt(r);if(42===R&&47===e.charCodeAt(r+1)){r+=2,b=!0;break}r++,i(R)&&(13===R&&10===e.charCodeAt(r)&&r++,l++,f=r)}return b||(r++,p=1),a=e.substring(g,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),++r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&s(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,p=0},getPosition:function(){return r},scan:t?function(){var e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:function(){return u},getTokenValue:function(){return a},getTokenOffset:function(){return c},getTokenLength:function(){return r-c},getTokenStartLine:function(){return d},getTokenStartCharacter:function(){return c-h},getTokenError:function(){return p}}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}function a(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function c(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var u;n.r(t),n.d(t,{ClientCapabilities:()=>Be,CodeAction:()=>we,CodeActionContext:()=>xe,CodeActionKind:()=>Te,Color:()=>v,ColorInformation:()=>b,ColorPresentation:()=>R,Command:()=>_,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>S,DiagnosticSeverity:()=>x,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>me,DocumentLink:()=>_e,DocumentSymbol:()=>ke,DocumentUri:()=>l,ErrorCode:()=>Ke,FoldingRange:()=>T,FoldingRangeKind:()=>k,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>g,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>p,Range:()=>m,SelectionRange:()=>Pe,SymbolInformation:()=>be,SymbolKind:()=>ye,TextDocument:()=>ze,TextDocumentEdit:()=>N,TextEdit:()=>P,VersionedTextDocumentIdentifier:()=>Q,WorkspaceEdit:()=>I,getLanguageService:()=>nn}),function(e){e.DEFAULT={allowTrailingComma:!1}}(u||(u={}));var l,d,f,h,p,m,g,y,v,b,R,k,T,C,x,w,D,S,_,P,E,q,O,N,A,M,j,I,L=r,F=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=u.DEFAULT);var o=null,i=[],s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n){void 0===n&&(n=u.DEFAULT);var o=r(e,!1),i=[];function s(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function a(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(function(){return i.slice()}))}:function(){return!0}}function c(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function l(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(function(){return i.slice()}))}:function(){return!0}}var d=a(t.onObjectBegin),f=l(t.onObjectProperty),h=s(t.onObjectEnd),p=a(t.onArrayBegin),m=s(t.onArrayEnd),g=l(t.onLiteralValue),y=c(t.onSeparator),v=s(t.onComment),b=c(t.onError),R=n&&n.disallowComments,k=n&&n.allowTrailingComma;function T(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:R||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:R?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),b(e),t.length+n.length>0)for(var r=o.getToken();17!==r;){if(-1!==t.indexOf(r)){T();break}if(-1!==n.indexOf(r))break;r=T()}}function x(e){var t=o.getTokenValue();return e?g(t):(f(t),i.push(t)),T(),!0}T(),17===o.getToken()?!!n.allowEmptyContent||C(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){p(),T();for(var t=!0,n=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||C(4,[],[]),y(","),T(),4===o.getToken()&&k)break}else n&&C(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||C(4,[],[4,5]),n=!0}return m(),t||i.pop(),4!==o.getToken()?C(8,[4],[]):T(),!0}();case 1:return function(){d(),T();for(var t=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||C(4,[],[]),y(","),T(),2===o.getToken()&&k)break}else t&&C(6,[],[]);(10!==o.getToken()?(C(3,[],[2,5]),0):(x(!1),6===o.getToken()?(y(":"),T(),e()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),1))||C(4,[],[2,5]),t=!0}return h(),2!==o.getToken()?C(7,[2],[]):T(),!0}();case 10:return x(!0);default:return function(){switch(o.getToken()){case 11:var e=o.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return T(),!0}()}}()?17!==o.getToken()&&C(9,[],[]):C(4,[],[])}(e,{onObjectBegin:function(){var e={};a(e),s.push(i),i=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),i[0]},W=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var i=0;i<o.length&&o[i].offset<=n;i++){var s=e(o[i],n,r);if(s)return s}return t}},V=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},$=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var i=o[r],s=i.children[1];s&&(n[i.children[0].value]=e(s))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function U(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;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!U(e[n],t[n]))return!1}else{var o=[];for(r in e)o.push(r);o.sort();var i=[];for(r in t)i.push(r);if(i.sort(),!U(o,i))return!1;for(n=0;n<o.length;n++)if(!U(e[o[n]],t[o[n]]))return!1}return!0}function H(e){return"number"==typeof e}function z(e){return void 0!==e}function K(e){return"boolean"==typeof e}function B(e){return"string"==typeof e}function J(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function X(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function G(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}!function(e){e.is=function(e){return"string"==typeof e}}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e}}(d||(d={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(f||(f={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(h||(h={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=h.MAX_VALUE),t===Number.MAX_VALUE&&(t=h.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.uinteger(t.line)&&He.uinteger(t.character)}}(p||(p={})),function(e){e.create=function(e,t,n,r){if(He.uinteger(e)&&He.uinteger(t)&&He.uinteger(n)&&He.uinteger(r))return{start:p.create(e,t),end:p.create(n,r)};if(p.is(e)&&p.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},e.is=function(e){var t=e;return He.objectLiteral(t)&&p.is(t.start)&&p.is(t.end)}}(m||(m={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.string(t.uri)||He.undefined(t.uri))}}(g||(g={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.targetRange)&&He.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||He.undefined(t.originSelectionRange))}}(y||(y={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.numberRange(t.red,0,1)&&He.numberRange(t.green,0,1)&&He.numberRange(t.blue,0,1)&&He.numberRange(t.alpha,0,1)}}(v||(v={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return He.objectLiteral(t)&&m.is(t.range)&&v.is(t.color)}}(b||(b={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.label)&&(He.undefined(t.textEdit)||P.is(t))&&(He.undefined(t.additionalTextEdits)||He.typedArray(t.additionalTextEdits,P.is))}}(R||(R={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(k||(k={})),function(e){e.create=function(e,t,n,r,o,i){var s={startLine:e,endLine:t};return He.defined(n)&&(s.startCharacter=n),He.defined(r)&&(s.endCharacter=r),He.defined(o)&&(s.kind=o),He.defined(i)&&(s.collapsedText=i),s},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.uinteger(t.startLine)&&He.uinteger(t.startLine)&&(He.undefined(t.startCharacter)||He.uinteger(t.startCharacter))&&(He.undefined(t.endCharacter)||He.uinteger(t.endCharacter))&&(He.undefined(t.kind)||He.string(t.kind))}}(T||(T={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return He.defined(t)&&g.is(t.location)&&He.string(t.message)}}(C||(C={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(w||(w={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.href)}}(D||(D={})),function(e){e.create=function(e,t,n,r,o,i){var s={range:e,message:t};return He.defined(n)&&(s.severity=n),He.defined(r)&&(s.code=r),He.defined(o)&&(s.source=o),He.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return He.defined(n)&&m.is(n.range)&&He.string(n.message)&&(He.number(n.severity)||He.undefined(n.severity))&&(He.integer(n.code)||He.string(n.code)||He.undefined(n.code))&&(He.undefined(n.codeDescription)||He.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(He.string(n.source)||He.undefined(n.source))&&(He.undefined(n.relatedInformation)||He.typedArray(n.relatedInformation,C.is))}}(S||(S={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return He.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.title)&&He.string(t.command)}}(_||(_={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.newText)&&m.is(t.range)}}(P||(P={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.label)&&(He.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(He.string(t.description)||void 0===t.description)}}(E||(E={})),function(e){e.is=function(e){var t=e;return He.string(t)}}(q||(q={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return P.is(t)&&(E.is(t.annotationId)||q.is(t.annotationId))}}(O||(O={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return He.defined(t)&&Y.is(t.textDocument)&&Array.isArray(t.edits)}}(N||(N={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&He.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||He.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||He.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||q.is(t.annotationId))}}(A||(A={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&He.string(t.oldUri)&&He.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||He.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||He.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||q.is(t.annotationId))}}(M||(M={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&He.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||He.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||He.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||q.is(t.annotationId))}}(j||(j={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return He.string(e.kind)?A.is(e)||M.is(e)||j.is(e):N.is(e)})))}}(I||(I={}));var Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,ve,be,Re,ke,Te,Ce,xe,we,De,Se,_e,Pe,Ee,qe,Oe,Ne,Ae,Me,je,Ie,Le,Fe,We,Ve,$e=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=P.insert(e,t):q.is(n)?(o=n,r=O.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=O.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=P.replace(e,t):q.is(n)?(o=n,r=O.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=O.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=P.del(e):q.is(t)?(r=t,n=O.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=O.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Ue=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(q.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ue(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(N.is(e)){var n=new $e(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new $e(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Y.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new $e(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new $e(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ue,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(E.is(t)||q.is(t)?r=t:n=t,void 0===r?o=A.create(e,n):(i=q.is(r)?r:this._changeAnnotations.manage(r),o=A.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,s;if(E.is(n)||q.is(n)?o=n:r=n,void 0===o?i=M.create(e,t,r):(s=q.is(o)?o:this._changeAnnotations.manage(o),i=M.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(E.is(t)||q.is(t)?r=t:n=t,void 0===r?o=j.create(e,n):(i=q.is(r)?r:this._changeAnnotations.manage(r),o=j.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}(),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&He.integer(t.version)}}(Q||(Q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&(null===t.version||He.integer(t.version))}}(Y||(Y={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&He.string(t.languageId)&&He.integer(t.version)&&He.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(e)&&te.is(t.kind)&&He.string(t.value)}}(ne||(ne={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&He.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){var t=e;return t&&(He.string(t.detail)||void 0===t.detail)&&(He.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return He.string(t)||He.objectLiteral(t)&&He.string(t.language)&&He.string(t.value)}}(de||(de={})),function(e){e.is=function(e){var t=e;return!!t&&He.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||He.typedArray(t.contents,de.is))&&(void 0===e.range||m.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return He.defined(t)&&(o.documentation=t),He.defined(n)?o.parameters=n:o.parameters=[],o}}(pe||(pe={})),function(e){e.Text=1,e.Read=2,e.Write=3}(me||(me={})),function(e){e.create=function(e,t){var n={range:e};return He.number(t)&&(n.kind=t),n}}(ge||(ge={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ye||(ye={})),function(e){e.Deprecated=1}(ve||(ve={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(be||(be={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Re||(Re={})),function(e){e.create=function(e,t,n,r,o,i){var s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&He.string(t.name)&&He.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||He.string(t.detail))&&(void 0===t.deprecated||He.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(ke||(ke={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(Ce||(Ce={})),function(e){e.create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){var t=e;return He.defined(t)&&He.typedArray(t.diagnostics,S.is)&&(void 0===t.only||He.typedArray(t.only,He.string))&&(void 0===t.triggerKind||t.triggerKind===Ce.Invoked||t.triggerKind===Ce.Automatic)}}(xe||(xe={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):_.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&He.string(t.title)&&(void 0===t.diagnostics||He.typedArray(t.diagnostics,S.is))&&(void 0===t.kind||He.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||_.is(t.command))&&(void 0===t.isPreferred||He.boolean(t.isPreferred))&&(void 0===t.edit||I.is(t.edit))}}(we||(we={})),function(e){e.create=function(e,t){var n={range:e};return He.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.undefined(t.command)||_.is(t.command))}}(De||(De={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return He.defined(t)&&He.uinteger(t.tabSize)&&He.boolean(t.insertSpaces)}}(Se||(Se={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.undefined(t.target)||He.string(t.target))}}(_e||(_e={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return He.objectLiteral(n)&&m.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Pe||(Pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Ee||(Ee={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(qe||(qe={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Oe||(Oe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&He.string(t.text)}}(Ne||(Ne={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&He.boolean(t.caseSensitiveLookup)&&(He.string(t.variableName)||void 0===t.variableName)}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&(He.string(t.expression)||void 0===t.expression)}}(Me||(Me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){var t=e;return He.defined(t)&&m.is(e.stoppedLocation)}}(je||(je={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ie||(Ie={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){var t=e;return He.objectLiteral(t)&&(void 0===t.tooltip||He.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||g.is(t.location))&&(void 0===t.command||_.is(t.command))}}(Le||(Le={})),function(e){e.create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return He.objectLiteral(t)&&p.is(t.position)&&(He.string(t.label)||He.typedArray(t.label,Le.is))&&(void 0===t.kind||Ie.is(t.kind))&&void 0===t.textEdits||He.typedArray(t.textEdits,P.is)&&(void 0===t.tooltip||He.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||He.boolean(t.paddingLeft))&&(void 0===t.paddingRight||He.boolean(t.paddingRight))}}(Fe||(Fe={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&d.is(t.uri)&&He.string(t.name)}}(We||(We={})),function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);for(var s=0,a=0,c=0;s<o.length&&a<i.length;){var u=n(o[s],i[a]);e[c++]=u<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new Je(e,t,n,r)},e.is=function(e){var t=e;return!!(He.defined(t)&&He.string(t.uri)&&(He.undefined(t.languageId)||He.string(t.languageId))&&He.uinteger(t.lineCount)&&He.func(t.getText)&&He.func(t.positionAt)&&He.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),o=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=r.length,s=o.length-1;s>=0;s--){var a=o[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(u,r.length),i=c}return r}}(Ve||(Ve={}));var He,ze,Ke,Be,Je=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return p.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return p.create(i,e-t[i])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(He||(He={}));class Xe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(Xe.isIncremental(t)){const e=Qe(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const o=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=Ze(t.text,!1,n);if(i-o===a.length)for(let e=0,t=a.length;e<t;e++)s[e+o+1]=a[e];else a.length<1e4?s.splice(o+1,i-o,...a):this._lineOffsets=s=s.slice(0,o+1).concat(a,s.slice(i+1));const c=t.text.length-(r-n);if(0!==c)for(let e=o+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!Xe.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Ze(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function Ge(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Ge(r,t),Ge(o,t);let i=0,s=0,a=0;for(;i<r.length&&s<o.length;){let n=t(r[i],o[s]);e[a++]=n<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function Ze(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);13!==o&&10!==o||(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function Qe(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ye(e){const t=Qe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Xe(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Xe)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),r=Ge(t.map(Ye),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=0;const i=[];for(const t of r){let r=e.offsetAt(t.range.start);if(r<o)throw new Error("Overlapping edit");r>o&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(ze||(ze={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(Ke||(Ke={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0}}}}}(Be||(Be={}));var et=n(189);const tt=et.loadMessageBundle(),nt={"color-hex":{errorMessage:tt("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:tt("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:tt("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:tt("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:tt("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:tt("hostnameFormatWarning","String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:tt("ipv4FormatWarning","String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:tt("ipv6FormatWarning","String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class rt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class ot extends rt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class it extends rt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class st extends rt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class at extends rt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class ct extends rt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class ut extends rt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class lt extends rt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function dt(e){return K(e)?e?{}:{not:{}}:e}var ft;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(ft||(ft={}));class ht{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||vt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new ht(-1,this.exclude)}}class pt{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}pt.instance=new pt;class mt{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}mergeAll(e){for(const t of e)this.merge(t)}merge(e){this.problems=this.problems.concat(e.problems)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===Ke.EnumValueMismatch&&(e.message=tt("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function gt(e){return $(e)}function yt(e){return V(e)}function vt(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class bt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return W(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=x.Warning){if(this.root&&t){const r=new mt;return Rt(this.root,t,r,pt.instance),r.problems.map((t=>{const r=m.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return S.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){const r=new ht(t,n);return this.root&&e&&Rt(this.root,e,new mt,r),r.schemas}}function Rt(e,t,n,r){if(!e||!r.include(e))return;if("property"===e.type)return Rt(e.valueNode,t,n,r);const o=e;switch(function(){function e(e){return o.type===e||"integer"===e&&"number"===o.type&&o.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||tt("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||tt("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf)Rt(o,dt(e),n,r);const i=dt(t.not);if(i){const e=new mt,t=r.newSub();Rt(o,i,e,t),e.hasProblems()||n.problems.push({location:{offset:o.offset,length:o.length},message:tt("notSchemaWarning","Matches a schema that is not allowed.")});for(const e of t.schemas)e.inverted=!e.inverted,r.add(e)}const s=(e,t)=>{const i=[];let s;for(const n of e){const e=dt(n),a=new mt,c=r.newSub();if(Rt(o,e,a,c),a.hasProblems()||i.push(e),s)if(t||a.hasProblems()||s.validationResult.hasProblems()){const t=a.compare(s.validationResult);t>0?s={schema:e,validationResult:a,matchingSchemas:c}:0===t&&(s.matchingSchemas.merge(c),s.validationResult.mergeEnumValues(a))}else s.matchingSchemas.merge(c),s.validationResult.propertiesMatches+=a.propertiesMatches,s.validationResult.propertiesValueMatches+=a.propertiesValueMatches,s.validationResult.mergeProcessedProperties(a);else s={schema:e,validationResult:a,matchingSchemas:c}}return i.length>1&&t&&n.problems.push({location:{offset:o.offset,length:1},message:tt("oneOfWarning","Matches multiple schemas when only one must validate.")}),s&&(n.merge(s.validationResult),n.propertiesMatches+=s.validationResult.propertiesMatches,n.propertiesValueMatches+=s.validationResult.propertiesValueMatches,n.mergeProcessedProperties(s.validationResult),r.merge(s.matchingSchemas)),i.length};Array.isArray(t.anyOf)&&s(t.anyOf,!1),Array.isArray(t.oneOf)&&s(t.oneOf,!0);const a=e=>{const t=new mt,i=r.newSub();Rt(o,dt(e),t,i),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,n.mergeProcessedProperties(t),r.merge(i)},c=dt(t.if);if(c&&((e,t,i)=>{const s=dt(e),c=new mt,u=r.newSub();Rt(o,s,c,u),r.merge(u),n.mergeProcessedProperties(c),c.hasProblems()?i&&a(i):t&&a(t)})(c,dt(t.then),dt(t.else)),Array.isArray(t.enum)){const e=gt(o);let r=!1;for(const n of t.enum)if(U(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:o.offset,length:o.length},code:Ke.EnumValueMismatch,message:t.errorMessage||tt("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}z(t.const)&&(U(gt(o),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:o.offset,length:o.length},code:Ke.EnumValueMismatch,message:t.errorMessage||tt("constWarning","Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let u=t.deprecationMessage;(u||t.deprecated)&&o.parent&&(u=u||tt("deprecated","Value is deprecated"),n.problems.push({location:{offset:o.parent.offset,length:o.parent.length},severity:x.Warning,message:u,code:Ke.Deprecated}))}(),o.type){case"object":!function(e){const o=Object.create(null),i=new Set;for(const t of e.properties){const e=t.keyNode.value;o[e]=t.valueNode,i.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!o[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:tt("MissingRequiredPropWarning",'Missing property "{0}".',r)})}const s=e=>{i.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){s(e);const i=t.properties[e],a=o[e];if(a)if(K(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=a.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{const e=new mt;Rt(a,i,e,r),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const a=G(e);if(a){const c=[];for(const s of i)if(a.test(s)){c.push(s);const i=o[s];if(i){const o=t.patternProperties[e];if(K(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=i.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",s)})}else{const e=new mt;Rt(i,o,e,r),n.mergePropertyMatch(e)}}}c.forEach(s)}}const a=t.additionalProperties;if(void 0!==a&&!0!==a)for(const e of i){s(e);const i=o[e];if(i)if(!1===a){const r=i.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{const e=new mt;Rt(i,a,e,r),n.mergePropertyMatch(e)}}const c=t.unevaluatedProperties;if(void 0!==c&&!0!==c){const e=[];for(const s of i)if(!n.processedProperties.has(s)){e.push(s);const i=o[s];if(i)if(!1===c){const e=i.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",s)})}else{const e=new mt;Rt(i,c,e,r),n.mergePropertyMatch(e)}}e.forEach(s)}if(H(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),H(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=o[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&l(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=o[e],r=t.dependentSchemas[e];n&&J(r)&&l(e,r)}if(t.dependencies)for(const e in t.dependencies)o[e]&&l(e,t.dependencies[e]);const u=dt(t.propertyNames);if(u)for(const t of e.properties){const e=t.keyNode;e&