D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
grafana
/
public
/
lib
/
monaco
/
min
/
vs
/
language
/
json
/
Filename :
jsonWorker.js
back
Copy
"use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/define("vs/language/json/jsonWorker",["require","require"],Fr=>{var An=(()=>{var Xe=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyNames,wn=Object.prototype.hasOwnProperty,Tn=(e,n)=>{for(var i in n)Xe(e,i,{get:n[i],enumerable:!0})},On=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Cn(n))!wn.call(e,r)&&r!==i&&Xe(e,r,{get:()=>n[r],enumerable:!(t=Sn(n,r))||t.enumerable});return e},En=e=>On(Xe({},"__esModule",{value:!0}),e),xt={};Tn(xt,{JSONWorker:()=>mn,create:()=>Vr});function Ze(e,n){n===void 0&&(n=!1);var i=e.length,t=0,r="",o=0,s=16,a=0,c=0,f=0,u=0,l=0;function h(v,T){for(var j=0,M=0;j<v||!T;){var A=e.charCodeAt(t);if(A>=48&&A<=57)M=M*16+A-48;else if(A>=65&&A<=70)M=M*16+A-65+10;else if(A>=97&&A<=102)M=M*16+A-97+10;else break;t++,j++}return j<v&&(M=-1),M}function d(v){t=v,r="",o=0,s=16,l=0}function g(){var v=t;if(e.charCodeAt(t)===48)t++;else for(t++;t<e.length&&ye(e.charCodeAt(t));)t++;if(t<e.length&&e.charCodeAt(t)===46)if(t++,t<e.length&&ye(e.charCodeAt(t)))for(t++;t<e.length&&ye(e.charCodeAt(t));)t++;else return l=3,e.substring(v,t);var T=t;if(t<e.length&&(e.charCodeAt(t)===69||e.charCodeAt(t)===101))if(t++,(t<e.length&&e.charCodeAt(t)===43||e.charCodeAt(t)===45)&&t++,t<e.length&&ye(e.charCodeAt(t))){for(t++;t<e.length&&ye(e.charCodeAt(t));)t++;T=t}else l=3;return e.substring(v,T)}function m(){for(var v="",T=t;;){if(t>=i){v+=e.substring(T,t),l=2;break}var j=e.charCodeAt(t);if(j===34){v+=e.substring(T,t),t++;break}if(j===92){if(v+=e.substring(T,t),t++,t>=i){l=2;break}var M=e.charCodeAt(t++);switch(M){case 34:v+='"';break;case 92:v+="\\";break;case 47:v+="/";break;case 98:v+="\b";break;case 102:v+="\f";break;case 110:v+=` `;break;case 114:v+="\r";break;case 116:v+=" ";break;case 117:var A=h(4,!0);A>=0?v+=String.fromCharCode(A):l=4;break;default:l=5}T=t;continue}if(j>=0&&j<=31)if(Ce(j)){v+=e.substring(T,t),l=2;break}else l=6;t++}return v}function p(){if(r="",l=0,o=t,c=a,u=f,t>=i)return o=i,s=17;var v=e.charCodeAt(t);if(Ge(v)){do t++,r+=String.fromCharCode(v),v=e.charCodeAt(t);while(Ge(v));return s=15}if(Ce(v))return t++,r+=String.fromCharCode(v),v===13&&e.charCodeAt(t)===10&&(t++,r+=` `),a++,f=t,s=14;switch(v){case 123:return t++,s=1;case 125:return t++,s=2;case 91:return t++,s=3;case 93:return t++,s=4;case 58:return t++,s=6;case 44:return t++,s=5;case 34:return t++,r=m(),s=10;case 47:var T=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t<i&&!Ce(e.charCodeAt(t));)t++;return r=e.substring(T,t),s=12}if(e.charCodeAt(t+1)===42){t+=2;for(var j=i-1,M=!1;t<j;){var A=e.charCodeAt(t);if(A===42&&e.charCodeAt(t+1)===47){t+=2,M=!0;break}t++,Ce(A)&&(A===13&&e.charCodeAt(t)===10&&t++,a++,f=t)}return M||(t++,l=1),r=e.substring(T,t),s=13}return r+=String.fromCharCode(v),t++,s=16;case 45:if(r+=String.fromCharCode(v),t++,t===i||!ye(e.charCodeAt(t)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=g(),s=11;default:for(;t<i&&x(v);)t++,v=e.charCodeAt(t);if(o!==t){switch(r=e.substring(o,t),r){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return r+=String.fromCharCode(v),t++,s=16}}function x(v){if(Ge(v)||Ce(v))return!1;switch(v){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function y(){var v;do v=p();while(v>=12&&v<=15);return v}return{setPosition:d,getPosition:function(){return t},scan:n?y:p,getToken:function(){return s},getTokenValue:function(){return r},getTokenOffset:function(){return o},getTokenLength:function(){return t-o},getTokenStartLine:function(){return c},getTokenStartCharacter:function(){return o-u},getTokenError:function(){return l}}}function Ge(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Ce(e){return e===10||e===13||e===8232||e===8233}function ye(e){return e>=48&&e<=57}function In(e,n,i){var t,r,o,s,a;if(n){for(s=n.offset,a=s+n.length,o=s;o>0&&!kt(e,o-1);)o--;for(var c=a;c<e.length&&!kt(e,c);)c++;r=e.substring(o,c),t=jn(r,i)}else r=e,t=0,o=0,s=0,a=e.length;var f=Mn(i,e),u=!1,l=0,h;i.insertSpaces?h=Qe(" ",i.tabSize||4):h=" ";var d=Ze(r,!1),g=!1;function m(){return f+Qe(h,t+l)}function p(){var N=d.scan();for(u=!1;N===15||N===14;)u=u||N===14,N=d.scan();return g=N===16||d.getTokenError()!==0,N}var x=[];function y(N,V,L){!g&&(!n||V<a&&L>s)&&e.substring(V,L)!==N&&x.push({offset:V,length:L-V,content:N})}var v=p();if(v!==17){var T=d.getTokenOffset()+o,j=Qe(h,t);y(j,o,T)}for(;v!==17;){for(var M=d.getTokenOffset()+d.getTokenLength()+o,A=p(),E="",S=!1;!u&&(A===12||A===13);){var O=d.getTokenOffset()+o;y(" ",M,O),M=d.getTokenOffset()+d.getTokenLength()+o,S=A===12,E=S?m():"",A=p()}if(A===2)v!==1&&(l--,E=m());else if(A===4)v!==3&&(l--,E=m());else{switch(v){case 3:case 1:l++,E=m();break;case 5:case 12:E=m();break;case 13:u?E=m():S||(E=" ");break;case 6:S||(E=" ");break;case 10:if(A===6){S||(E="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?S||(E=" "):A!==5&&A!==17&&(g=!0);break;case 16:g=!0;break}u&&(A===12||A===13)&&(E=m())}A===17&&(E=i.insertFinalNewline?f:"");var _=d.getTokenOffset()+o;y(E,M,_),v=A}return x}function Qe(e,n){for(var i="",t=0;t<n;t++)i+=e;return i}function jn(e,n){for(var i=0,t=0,r=n.tabSize||4;i<e.length;){var o=e.charAt(i);if(o===" ")t++;else if(o===" ")t+=r;else break;i++}return Math.floor(t/r)}function Mn(e,n){for(var i=0;i<n.length;i++){var t=n.charAt(i);if(t==="\r")return i+1<n.length&&n.charAt(i+1)===` `?`\r `:"\r";if(t===` `)return` `}return e&&e.eol||` `}function kt(e,n){return`\r `.indexOf(e.charAt(n))!==-1}var Ve;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ve||(Ve={}));function Nn(e,n,i){n===void 0&&(n=[]),i===void 0&&(i=Ve.DEFAULT);var t=null,r=[],o=[];function s(c){Array.isArray(r)?r.push(c):t!==null&&(r[t]=c)}var a={onObjectBegin:function(){var c={};s(c),o.push(r),r=c,t=null},onObjectProperty:function(c){t=c},onObjectEnd:function(){r=o.pop()},onArrayBegin:function(){var c=[];s(c),o.push(r),r=c,t=null},onArrayEnd:function(){r=o.pop()},onLiteralValue:s,onError:function(c,f,u){n.push({error:c,offset:f,length:u})}};return _n(e,a,i),r[0]}function At(e){if(!e.parent||!e.parent.children)return[];var n=At(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;n.push(i)}else if(e.parent.type==="array"){var t=e.parent.children.indexOf(e);t!==-1&&n.push(t)}return n}function Ye(e){switch(e.type){case"array":return e.children.map(Ye);case"object":for(var n=Object.create(null),i=0,t=e.children;i<t.length;i++){var r=t[i],o=r.children[1];o&&(n[r.children[0].value]=Ye(o))}return n;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Pn(e,n,i){return i===void 0&&(i=!1),n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}function St(e,n,i){if(i===void 0&&(i=!1),Pn(e,n,i)){var t=e.children;if(Array.isArray(t))for(var r=0;r<t.length&&t[r].offset<=n;r++){var o=St(t[r],n,i);if(o)return o}return e}}function _n(e,n,i){i===void 0&&(i=Ve.DEFAULT);var t=Ze(e,!1);function r(S){return S?function(){return S(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:function(){return!0}}function o(S){return S?function(O){return S(O,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:function(){return!0}}var s=r(n.onObjectBegin),a=o(n.onObjectProperty),c=r(n.onObjectEnd),f=r(n.onArrayBegin),u=r(n.onArrayEnd),l=o(n.onLiteralValue),h=o(n.onSeparator),d=r(n.onComment),g=o(n.onError),m=i&&i.disallowComments,p=i&&i.allowTrailingComma;function x(){for(;;){var S=t.scan();switch(t.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:m||y(11);break;case 2:y(12);break;case 6:y(16);break}switch(S){case 12:case 13:m?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return S}}}function y(S,O,_){if(O===void 0&&(O=[]),_===void 0&&(_=[]),g(S),O.length+_.length>0)for(var N=t.getToken();N!==17;){if(O.indexOf(N)!==-1){x();break}else if(_.indexOf(N)!==-1)break;N=x()}}function v(S){var O=t.getTokenValue();return S?l(O):a(O),x(),!0}function T(){switch(t.getToken()){case 11:var S=t.getTokenValue(),O=Number(S);isNaN(O)&&(y(2),O=0),l(O);break;case 7:l(null);break;case 8:l(!0);break;case 9:l(!1);break;default:return!1}return x(),!0}function j(){return t.getToken()!==10?(y(3,[],[2,5]),!1):(v(!1),t.getToken()===6?(h(":"),x(),E()||y(4,[],[2,5])):y(5,[],[2,5]),!0)}function M(){s(),x();for(var S=!1;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(S||y(4,[],[]),h(","),x(),t.getToken()===2&&p)break}else S&&y(6,[],[]);j()||y(4,[],[2,5]),S=!0}return c(),t.getToken()!==2?y(7,[2],[]):x(),!0}function A(){f(),x();for(var S=!1;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(S||y(4,[],[]),h(","),x(),t.getToken()===4&&p)break}else S&&y(6,[],[]);E()||y(4,[],[4,5]),S=!0}return u(),t.getToken()!==4?y(8,[4],[]):x(),!0}function E(){switch(t.getToken()){case 3:return A();case 1:return M();case 10:return v(!0);default:return T()}}return x(),t.getToken()===17?i.allowEmptyContent?!0:(y(4,[],[]),!1):E()?(t.getToken()!==17&&y(9,[],[]),!0):(y(4,[],[]),!1)}var be=Ze,Vn=Nn,Rn=St,Fn=At,$n=Ye;function Ln(e,n,i){return In(e,n,i)}function we(e,n){if(e===n)return!0;if(e==null||n===null||n===void 0||typeof e!=typeof n||typeof e!="object"||Array.isArray(e)!==Array.isArray(n))return!1;var i,t;if(Array.isArray(e)){if(e.length!==n.length)return!1;for(i=0;i<e.length;i++)if(!we(e[i],n[i]))return!1}else{var r=[];for(t in e)r.push(t);r.sort();var o=[];for(t in n)o.push(t);if(o.sort(),!we(r,o))return!1;for(i=0;i<r.length;i++)if(!we(e[r[i]],n[r[i]]))return!1}return!0}function Y(e){return typeof e=="number"}function ue(e){return typeof e<"u"}function ie(e){return typeof e=="boolean"}function Dn(e){return typeof e=="string"}function Un(e,n){if(e.length<n.length)return!1;for(var i=0;i<n.length;i++)if(e[i]!==n[i])return!1;return!0}function Te(e,n){var i=e.length-n.length;return i>0?e.lastIndexOf(n)===i:i===0?e===n:!1}function Re(e){var n="";Un(e,"(?i)")&&(e=e.substring(4),n="i");try{return new RegExp(e,n+"u")}catch{try{return new RegExp(e,n)}catch{return}}}var Ct;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Ct||(Ct={}));var Fe;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(Fe||(Fe={}));var ne;(function(e){function n(t,r){return t===Number.MAX_VALUE&&(t=Fe.MAX_VALUE),r===Number.MAX_VALUE&&(r=Fe.MAX_VALUE),{line:t,character:r}}e.create=n;function i(t){var r=t;return b.objectLiteral(r)&&b.uinteger(r.line)&&b.uinteger(r.character)}e.is=i})(ne||(ne={}));var W;(function(e){function n(t,r,o,s){if(b.uinteger(t)&&b.uinteger(r)&&b.uinteger(o)&&b.uinteger(s))return{start:ne.create(t,r),end:ne.create(o,s)};if(ne.is(t)&&ne.is(r))return{start:t,end:r};throw new Error("Range#create called with invalid arguments["+t+", "+r+", "+o+", "+s+"]")}e.create=n;function i(t){var r=t;return b.objectLiteral(r)&&ne.is(r.start)&&ne.is(r.end)}e.is=i})(W||(W={}));var Oe;(function(e){function n(t,r){return{uri:t,range:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&W.is(r.range)&&(b.string(r.uri)||b.undefined(r.uri))}e.is=i})(Oe||(Oe={}));var wt;(function(e){function n(t,r,o,s){return{targetUri:t,targetRange:r,targetSelectionRange:o,originSelectionRange:s}}e.create=n;function i(t){var r=t;return b.defined(r)&&W.is(r.targetRange)&&b.string(r.targetUri)&&(W.is(r.targetSelectionRange)||b.undefined(r.targetSelectionRange))&&(W.is(r.originSelectionRange)||b.undefined(r.originSelectionRange))}e.is=i})(wt||(wt={}));var et;(function(e){function n(t,r,o,s){return{red:t,green:r,blue:o,alpha:s}}e.create=n;function i(t){var r=t;return b.numberRange(r.red,0,1)&&b.numberRange(r.green,0,1)&&b.numberRange(r.blue,0,1)&&b.numberRange(r.alpha,0,1)}e.is=i})(et||(et={}));var Tt;(function(e){function n(t,r){return{range:t,color:r}}e.create=n;function i(t){var r=t;return W.is(r.range)&&et.is(r.color)}e.is=i})(Tt||(Tt={}));var Ot;(function(e){function n(t,r,o){return{label:t,textEdit:r,additionalTextEdits:o}}e.create=n;function i(t){var r=t;return b.string(r.label)&&(b.undefined(r.textEdit)||re.is(r))&&(b.undefined(r.additionalTextEdits)||b.typedArray(r.additionalTextEdits,re.is))}e.is=i})(Ot||(Ot={}));var Ee;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ee||(Ee={}));var Et;(function(e){function n(t,r,o,s,a){var c={startLine:t,endLine:r};return b.defined(o)&&(c.startCharacter=o),b.defined(s)&&(c.endCharacter=s),b.defined(a)&&(c.kind=a),c}e.create=n;function i(t){var r=t;return b.uinteger(r.startLine)&&b.uinteger(r.startLine)&&(b.undefined(r.startCharacter)||b.uinteger(r.startCharacter))&&(b.undefined(r.endCharacter)||b.uinteger(r.endCharacter))&&(b.undefined(r.kind)||b.string(r.kind))}e.is=i})(Et||(Et={}));var tt;(function(e){function n(t,r){return{location:t,message:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&Oe.is(r.location)&&b.string(r.message)}e.is=i})(tt||(tt={}));var ee;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ee||(ee={}));var It;(function(e){e.Unnecessary=1,e.Deprecated=2})(It||(It={}));var jt;(function(e){function n(i){var t=i;return t!=null&&b.string(t.href)}e.is=n})(jt||(jt={}));var le;(function(e){function n(t,r,o,s,a,c){var f={range:t,message:r};return b.defined(o)&&(f.severity=o),b.defined(s)&&(f.code=s),b.defined(a)&&(f.source=a),b.defined(c)&&(f.relatedInformation=c),f}e.create=n;function i(t){var r,o=t;return b.defined(o)&&W.is(o.range)&&b.string(o.message)&&(b.number(o.severity)||b.undefined(o.severity))&&(b.integer(o.code)||b.string(o.code)||b.undefined(o.code))&&(b.undefined(o.codeDescription)||b.string((r=o.codeDescription)===null||r===void 0?void 0:r.href))&&(b.string(o.source)||b.undefined(o.source))&&(b.undefined(o.relatedInformation)||b.typedArray(o.relatedInformation,tt.is))}e.is=i})(le||(le={}));var Ie;(function(e){function n(t,r){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a={title:t,command:r};return b.defined(o)&&o.length>0&&(a.arguments=o),a}e.create=n;function i(t){var r=t;return b.defined(r)&&b.string(r.title)&&b.string(r.command)}e.is=i})(Ie||(Ie={}));var re;(function(e){function n(o,s){return{range:o,newText:s}}e.replace=n;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function t(o){return{range:o,newText:""}}e.del=t;function r(o){var s=o;return b.objectLiteral(s)&&b.string(s.newText)&&W.is(s.range)}e.is=r})(re||(re={}));var xe;(function(e){function n(t,r,o){var s={label:t};return r!==void 0&&(s.needsConfirmation=r),o!==void 0&&(s.description=o),s}e.create=n;function i(t){var r=t;return r!==void 0&&b.objectLiteral(r)&&b.string(r.label)&&(b.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(b.string(r.description)||r.description===void 0)}e.is=i})(xe||(xe={}));var J;(function(e){function n(i){var t=i;return typeof t=="string"}e.is=n})(J||(J={}));var he;(function(e){function n(o,s,a){return{range:o,newText:s,annotationId:a}}e.replace=n;function i(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}e.insert=i;function t(o,s){return{range:o,newText:"",annotationId:s}}e.del=t;function r(o){var s=o;return re.is(s)&&(xe.is(s.annotationId)||J.is(s.annotationId))}e.is=r})(he||(he={}));var $e;(function(e){function n(t,r){return{textDocument:t,edits:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&De.is(r.textDocument)&&Array.isArray(r.edits)}e.is=i})($e||($e={}));var je;(function(e){function n(t,r,o){var s={kind:"create",uri:t};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(t){var r=t;return r&&r.kind==="create"&&b.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||b.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||b.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||J.is(r.annotationId))}e.is=i})(je||(je={}));var Me;(function(e){function n(t,r,o,s){var a={kind:"rename",oldUri:t,newUri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}e.create=n;function i(t){var r=t;return r&&r.kind==="rename"&&b.string(r.oldUri)&&b.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||b.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||b.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||J.is(r.annotationId))}e.is=i})(Me||(Me={}));var Ne;(function(e){function n(t,r,o){var s={kind:"delete",uri:t};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}e.create=n;function i(t){var r=t;return r&&r.kind==="delete"&&b.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||b.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||b.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||J.is(r.annotationId))}e.is=i})(Ne||(Ne={}));var nt;(function(e){function n(i){var t=i;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(function(r){return b.string(r.kind)?je.is(r)||Me.is(r)||Ne.is(r):$e.is(r)}))}e.is=n})(nt||(nt={}));var Le=function(){function e(n,i){this.edits=n,this.changeAnnotations=i}return e.prototype.insert=function(n,i,t){var r,o;if(t===void 0?r=re.insert(n,i):J.is(t)?(o=t,r=he.insert(n,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),r=he.insert(n,i,o)),this.edits.push(r),o!==void 0)return o},e.prototype.replace=function(n,i,t){var r,o;if(t===void 0?r=re.replace(n,i):J.is(t)?(o=t,r=he.replace(n,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),r=he.replace(n,i,o)),this.edits.push(r),o!==void 0)return o},e.prototype.delete=function(n,i){var t,r;if(i===void 0?t=re.del(n):J.is(i)?(r=i,t=he.del(n,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),t=he.del(n,r)),this.edits.push(t),r!==void 0)return r},e.prototype.add=function(n){this.edits.push(n)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(n){if(n===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Mt=function(){function e(n){this._annotations=n===void 0?Object.create(null):n,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(n,i){var t;if(J.is(n)?t=n:(t=this.nextId(),i=n),this._annotations[t]!==void 0)throw new Error("Id "+t+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+t);return this._annotations[t]=i,this._size++,t},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),$r=function(){function e(n){var i=this;this._textEditChanges=Object.create(null),n!==void 0?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new Mt(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach(function(t){if($e.is(t)){var r=new Le(t.edits,i._changeAnnotations);i._textEditChanges[t.textDocument.uri]=r}})):n.changes&&Object.keys(n.changes).forEach(function(t){var r=new Le(n.changes[t]);i._textEditChanges[t]=r})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(n){if(De.is(n)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:n.uri,version:n.version},t=this._textEditChanges[i.uri];if(!t){var r=[],o={textDocument:i,edits:r};this._workspaceEdit.documentChanges.push(o),t=new Le(r,this._changeAnnotations),this._textEditChanges[i.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var t=this._textEditChanges[n];if(!t){var r=[];this._workspaceEdit.changes[n]=r,t=new Le(r),this._textEditChanges[n]=t}return t}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Mt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(n,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;xe.is(i)||J.is(i)?r=i:t=i;var o,s;if(r===void 0?o=je.create(n,t):(s=J.is(r)?r:this._changeAnnotations.manage(r),o=je.create(n,t,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},e.prototype.renameFile=function(n,i,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;xe.is(t)||J.is(t)?o=t:r=t;var s,a;if(o===void 0?s=Me.create(n,i,r):(a=J.is(o)?o:this._changeAnnotations.manage(o),s=Me.create(n,i,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.deleteFile=function(n,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;xe.is(i)||J.is(i)?r=i:t=i;var o,s;if(r===void 0?o=Ne.create(n,t):(s=J.is(r)?r:this._changeAnnotations.manage(r),o=Ne.create(n,t,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},e}(),Nt;(function(e){function n(t){return{uri:t}}e.create=n;function i(t){var r=t;return b.defined(r)&&b.string(r.uri)}e.is=i})(Nt||(Nt={}));var Pt;(function(e){function n(t,r){return{uri:t,version:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&b.string(r.uri)&&b.integer(r.version)}e.is=i})(Pt||(Pt={}));var De;(function(e){function n(t,r){return{uri:t,version:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&b.string(r.uri)&&(r.version===null||b.integer(r.version))}e.is=i})(De||(De={}));var _t;(function(e){function n(t,r,o,s){return{uri:t,languageId:r,version:o,text:s}}e.create=n;function i(t){var r=t;return b.defined(r)&&b.string(r.uri)&&b.string(r.languageId)&&b.integer(r.version)&&b.string(r.text)}e.is=i})(_t||(_t={}));var fe;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(fe||(fe={})),function(e){function n(i){var t=i;return t===e.PlainText||t===e.Markdown}e.is=n}(fe||(fe={}));var rt;(function(e){function n(i){var t=i;return b.objectLiteral(i)&&fe.is(t.kind)&&b.string(t.value)}e.is=n})(rt||(rt={}));var Z;(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})(Z||(Z={}));var K;(function(e){e.PlainText=1,e.Snippet=2})(K||(K={}));var Vt;(function(e){e.Deprecated=1})(Vt||(Vt={}));var Rt;(function(e){function n(t,r,o){return{newText:t,insert:r,replace:o}}e.create=n;function i(t){var r=t;return r&&b.string(r.newText)&&W.is(r.insert)&&W.is(r.replace)}e.is=i})(Rt||(Rt={}));var Ft;(function(e){e.asIs=1,e.adjustIndentation=2})(Ft||(Ft={}));var it;(function(e){function n(i){return{label:i}}e.create=n})(it||(it={}));var $t;(function(e){function n(i,t){return{items:i||[],isIncomplete:!!t}}e.create=n})($t||($t={}));var Ue;(function(e){function n(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(t){var r=t;return b.string(r)||b.objectLiteral(r)&&b.string(r.language)&&b.string(r.value)}e.is=i})(Ue||(Ue={}));var Lt;(function(e){function n(i){var t=i;return!!t&&b.objectLiteral(t)&&(rt.is(t.contents)||Ue.is(t.contents)||b.typedArray(t.contents,Ue.is))&&(i.range===void 0||W.is(i.range))}e.is=n})(Lt||(Lt={}));var Dt;(function(e){function n(i,t){return t?{label:i,documentation:t}:{label:i}}e.create=n})(Dt||(Dt={}));var Ut;(function(e){function n(i,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var s={label:i};return b.defined(t)&&(s.documentation=t),b.defined(r)?s.parameters=r:s.parameters=[],s}e.create=n})(Ut||(Ut={}));var Wt;(function(e){e.Text=1,e.Read=2,e.Write=3})(Wt||(Wt={}));var qt;(function(e){function n(i,t){var r={range:i};return b.number(t)&&(r.kind=t),r}e.create=n})(qt||(qt={}));var oe;(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})(oe||(oe={}));var Bt;(function(e){e.Deprecated=1})(Bt||(Bt={}));var Kt;(function(e){function n(i,t,r,o,s){var a={name:i,kind:t,location:{uri:o,range:r}};return s&&(a.containerName=s),a}e.create=n})(Kt||(Kt={}));var zt;(function(e){function n(t,r,o,s,a,c){var f={name:t,detail:r,kind:o,range:s,selectionRange:a};return c!==void 0&&(f.children=c),f}e.create=n;function i(t){var r=t;return r&&b.string(r.name)&&b.number(r.kind)&&W.is(r.range)&&W.is(r.selectionRange)&&(r.detail===void 0||b.string(r.detail))&&(r.deprecated===void 0||b.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}e.is=i})(zt||(zt={}));var Jt;(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"})(Jt||(Jt={}));var Ht;(function(e){function n(t,r){var o={diagnostics:t};return r!=null&&(o.only=r),o}e.create=n;function i(t){var r=t;return b.defined(r)&&b.typedArray(r.diagnostics,le.is)&&(r.only===void 0||b.typedArray(r.only,b.string))}e.is=i})(Ht||(Ht={}));var Xt;(function(e){function n(t,r,o){var s={title:t},a=!0;return typeof r=="string"?(a=!1,s.kind=r):Ie.is(r)?s.command=r:s.edit=r,a&&o!==void 0&&(s.kind=o),s}e.create=n;function i(t){var r=t;return r&&b.string(r.title)&&(r.diagnostics===void 0||b.typedArray(r.diagnostics,le.is))&&(r.kind===void 0||b.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||Ie.is(r.command))&&(r.isPreferred===void 0||b.boolean(r.isPreferred))&&(r.edit===void 0||nt.is(r.edit))}e.is=i})(Xt||(Xt={}));var Zt;(function(e){function n(t,r){var o={range:t};return b.defined(r)&&(o.data=r),o}e.create=n;function i(t){var r=t;return b.defined(r)&&W.is(r.range)&&(b.undefined(r.command)||Ie.is(r.command))}e.is=i})(Zt||(Zt={}));var Gt;(function(e){function n(t,r){return{tabSize:t,insertSpaces:r}}e.create=n;function i(t){var r=t;return b.defined(r)&&b.uinteger(r.tabSize)&&b.boolean(r.insertSpaces)}e.is=i})(Gt||(Gt={}));var Qt;(function(e){function n(t,r,o){return{range:t,target:r,data:o}}e.create=n;function i(t){var r=t;return b.defined(r)&&W.is(r.range)&&(b.undefined(r.target)||b.string(r.target))}e.is=i})(Qt||(Qt={}));var We;(function(e){function n(t,r){return{range:t,parent:r}}e.create=n;function i(t){var r=t;return r!==void 0&&W.is(r.range)&&(r.parent===void 0||e.is(r.parent))}e.is=i})(We||(We={}));var Yt;(function(e){function n(o,s,a,c){return new Wn(o,s,a,c)}e.create=n;function i(o){var s=o;return!!(b.defined(s)&&b.string(s.uri)&&(b.undefined(s.languageId)||b.string(s.languageId))&&b.uinteger(s.lineCount)&&b.func(s.getText)&&b.func(s.positionAt)&&b.func(s.offsetAt))}e.is=i;function t(o,s){for(var a=o.getText(),c=r(s,function(g,m){var p=g.range.start.line-m.range.start.line;return p===0?g.range.start.character-m.range.start.character:p}),f=a.length,u=c.length-1;u>=0;u--){var l=c[u],h=o.offsetAt(l.range.start),d=o.offsetAt(l.range.end);if(d<=f)a=a.substring(0,h)+l.newText+a.substring(d,a.length);else throw new Error("Overlapping edit");f=h}return a}e.applyEdits=t;function r(o,s){if(o.length<=1)return o;var a=o.length/2|0,c=o.slice(0,a),f=o.slice(a);r(c,s),r(f,s);for(var u=0,l=0,h=0;u<c.length&&l<f.length;){var d=s(c[u],f[l]);d<=0?o[h++]=c[u++]:o[h++]=f[l++]}for(;u<c.length;)o[h++]=c[u++];for(;l<f.length;)o[h++]=f[l++];return o}})(Yt||(Yt={}));var Wn=function(){function e(n,i,t,r){this._uri=n,this._languageId=i,this._version=t,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(n){if(n){var i=this.offsetAt(n.start),t=this.offsetAt(n.end);return this._content.substring(i,t)}return this._content},e.prototype.update=function(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var n=[],i=this._content,t=!0,r=0;r<i.length;r++){t&&(n.push(r),t=!1);var o=i.charAt(r);t=o==="\r"||o===` `,o==="\r"&&r+1<i.length&&i.charAt(r+1)===` `&&r++}t&&i.length>0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets},e.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),t=0,r=i.length;if(r===0)return ne.create(0,n);for(;t<r;){var o=Math.floor((t+r)/2);i[o]>n?r=o:t=o+1}var s=t-1;return ne.create(s,n-i[s])},e.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var t=i[n.line],r=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(t+n.character,r),t)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),b;(function(e){var n=Object.prototype.toString;function i(d){return typeof d<"u"}e.defined=i;function t(d){return typeof d>"u"}e.undefined=t;function r(d){return d===!0||d===!1}e.boolean=r;function o(d){return n.call(d)==="[object String]"}e.string=o;function s(d){return n.call(d)==="[object Number]"}e.number=s;function a(d,g,m){return n.call(d)==="[object Number]"&&g<=d&&d<=m}e.numberRange=a;function c(d){return n.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}e.integer=c;function f(d){return n.call(d)==="[object Number]"&&0<=d&&d<=2147483647}e.uinteger=f;function u(d){return n.call(d)==="[object Function]"}e.func=u;function l(d){return d!==null&&typeof d=="object"}e.objectLiteral=l;function h(d,g){return Array.isArray(d)&&d.every(g)}e.typedArray=h})(b||(b={}));var qe=class{constructor(e,n,i,t){this._uri=e,this._languageId=n,this._version=i,this._content=t,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(n,i)}return this._content}update(e,n){for(let i of e)if(qe.isIncremental(i)){let t=tn(i.range),r=this.offsetAt(t.start),o=this.offsetAt(t.end);this._content=this._content.substring(0,r)+i.text+this._content.substring(o,this._content.length);let s=Math.max(t.start.line,0),a=Math.max(t.end.line,0),c=this._lineOffsets,f=en(i.text,!1,r);if(a-s===f.length)for(let l=0,h=f.length;l<h;l++)c[l+s+1]=f[l];else f.length<1e4?c.splice(s+1,a-s,...f):this._lineOffsets=c=c.slice(0,s+1).concat(f,c.slice(a+1));let u=i.text.length-(o-r);if(u!==0)for(let l=s+1+f.length,h=c.length;l<h;l++)c[l]=c[l]+u}else if(qe.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=en(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),i=0,t=n.length;if(t===0)return{line:0,character:e};for(;i<t;){let o=Math.floor((i+t)/2);n[o]>e?t=o:i=o+1}let r=i-1;return{line:r,character:e-n[r]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let i=n[e.line],t=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,t),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},ot;(function(e){function n(r,o,s,a){return new qe(r,o,s,a)}e.create=n;function i(r,o,s){if(r instanceof qe)return r.update(o,s),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function t(r,o){let s=r.getText(),a=at(o.map(qn),(u,l)=>{let h=u.range.start.line-l.range.start.line;return h===0?u.range.start.character-l.range.start.character:h}),c=0,f=[];for(let u of a){let l=r.offsetAt(u.range.start);if(l<c)throw new Error("Overlapping edit");l>c&&f.push(s.substring(c,l)),u.newText.length&&f.push(u.newText),c=r.offsetAt(u.range.end)}return f.push(s.substr(c)),f.join("")}e.applyEdits=t})(ot||(ot={}));function at(e,n){if(e.length<=1)return e;let i=e.length/2|0,t=e.slice(0,i),r=e.slice(i);at(t,n),at(r,n);let o=0,s=0,a=0;for(;o<t.length&&s<r.length;)n(t[o],r[s])<=0?e[a++]=t[o++]:e[a++]=r[s++];for(;o<t.length;)e[a++]=t[o++];for(;s<r.length;)e[a++]=r[s++];return e}function en(e,n,i=0){let t=n?[i]:[];for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);(o===13||o===10)&&(o===13&&r+1<e.length&&e.charCodeAt(r+1)===10&&r++,t.push(i+r+1))}return t}function tn(e){let n=e.start,i=e.end;return n.line>i.line||n.line===i.line&&n.character>i.character?{start:i,end:n}:e}function qn(e){let n=tn(e.range);return n!==e.range?{newText:e.newText,range:n}:e}var D;(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"})(D||(D={}));var nn;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fe.Markdown,fe.PlainText],commitCharactersSupport:!0}}}}})(nn||(nn={}));function Bn(e,n){let i;return n.length===0?i=e:i=e.replace(/\{(\d+)\}/g,(t,r)=>{let o=r[0];return typeof n[o]<"u"?n[o]:t}),i}function Kn(e,n,...i){return Bn(n,i)}function Pe(e){return Kn}var me=function(){var e=function(n,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])},e(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function t(){this.constructor=n}n.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}(),P=Pe(),zn={"color-hex":{errorMessage:P("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:P("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:P("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:P("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:P("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:P("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:P("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:P("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}},ge=function(){function e(n,i,t){t===void 0&&(t=0),this.offset=i,this.length=t,this.parent=n}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),Jn=function(e){me(n,e);function n(i,t){var r=e.call(this,i,t)||this;return r.type="null",r.value=null,r}return n}(ge),rn=function(e){me(n,e);function n(i,t,r){var o=e.call(this,i,r)||this;return o.type="boolean",o.value=t,o}return n}(ge),Hn=function(e){me(n,e);function n(i,t){var r=e.call(this,i,t)||this;return r.type="array",r.items=[],r}return Object.defineProperty(n.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),n}(ge),Xn=function(e){me(n,e);function n(i,t){var r=e.call(this,i,t)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}return n}(ge),st=function(e){me(n,e);function n(i,t,r){var o=e.call(this,i,t,r)||this;return o.type="string",o.value="",o}return n}(ge),Zn=function(e){me(n,e);function n(i,t,r){var o=e.call(this,i,t)||this;return o.type="property",o.colonOffset=-1,o.keyNode=r,o}return Object.defineProperty(n.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),n}(ge),Gn=function(e){me(n,e);function n(i,t){var r=e.call(this,i,t)||this;return r.type="object",r.properties=[],r}return Object.defineProperty(n.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),n}(ge);function G(e){return ie(e)?e?{}:{not:{}}:e}var on;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(on||(on={}));var Qn=function(){function e(n,i){n===void 0&&(n=-1),this.focusOffset=n,this.exclude=i,this.schemas=[]}return e.prototype.add=function(n){this.schemas.push(n)},e.prototype.merge=function(n){Array.prototype.push.apply(this.schemas,n.schemas)},e.prototype.include=function(n){return(this.focusOffset===-1||an(n,this.focusOffset))&&n!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),ct=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(n){},e.prototype.merge=function(n){},e.prototype.include=function(n){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Q=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(n){for(var i=0,t=n;i<t.length;i++){var r=t[i];this.merge(r)}},e.prototype.merge=function(n){this.problems=this.problems.concat(n.problems)},e.prototype.mergeEnumValues=function(n){if(!this.enumValueMatch&&!n.enumValueMatch&&this.enumValues&&n.enumValues){this.enumValues=this.enumValues.concat(n.enumValues);for(var i=0,t=this.problems;i<t.length;i++){var r=t[i];r.code===D.EnumValueMismatch&&(r.message=P("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(o){return JSON.stringify(o)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(n){this.merge(n),this.propertiesMatches++,(n.enumValueMatch||!n.hasProblems()&&n.propertiesMatches)&&this.propertiesValueMatches++,n.enumValueMatch&&n.enumValues&&n.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(n){var i=this.hasProblems();return i!==n.hasProblems()?i?-1:1:this.enumValueMatch!==n.enumValueMatch?n.enumValueMatch?-1:1:this.primaryValueMatches!==n.primaryValueMatches?this.primaryValueMatches-n.primaryValueMatches:this.propertiesValueMatches!==n.propertiesValueMatches?this.propertiesValueMatches-n.propertiesValueMatches:this.propertiesMatches-n.propertiesMatches},e}();function Yn(e,n){return n===void 0&&(n=[]),new sn(e,n,[])}function ve(e){return $n(e)}function ut(e){return Fn(e)}function an(e,n,i){return i===void 0&&(i=!1),n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}var sn=function(){function e(n,i,t){i===void 0&&(i=[]),t===void 0&&(t=[]),this.root=n,this.syntaxErrors=i,this.comments=t}return e.prototype.getNodeFromOffset=function(n,i){if(i===void 0&&(i=!1),this.root)return Rn(this.root,n,i)},e.prototype.visit=function(n){if(this.root){var i=function(t){var r=n(t),o=t.children;if(Array.isArray(o))for(var s=0;s<o.length&&r;s++)r=i(o[s]);return r};i(this.root)}},e.prototype.validate=function(n,i,t){if(t===void 0&&(t=ee.Warning),this.root&&i){var r=new Q;return z(this.root,i,r,ct.instance),r.problems.map(function(o){var s,a=W.create(n.positionAt(o.location.offset),n.positionAt(o.location.offset+o.location.length));return le.create(a,o.message,(s=o.severity)!==null&&s!==void 0?s:t,o.code)})}},e.prototype.getMatchingSchemas=function(n,i,t){i===void 0&&(i=-1);var r=new Qn(i,t);return this.root&&n&&z(this.root,n,new Q,r),r.schemas},e}();function z(e,n,i,t){if(!e||!t.include(e))return;var r=e;switch(r.type){case"object":f(r,n,i,t);break;case"array":c(r,n,i,t);break;case"string":a(r,n,i,t);break;case"number":s(r,n,i,t);break;case"property":return z(r.valueNode,n,i,t)}o(),t.add({node:r,schema:n});function o(){function u(V){return r.type===V||V==="integer"&&r.type==="number"&&r.isInteger}if(Array.isArray(n.type)?n.type.some(u)||i.problems.push({location:{offset:r.offset,length:r.length},message:n.errorMessage||P("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",n.type.join(", "))}):n.type&&(u(n.type)||i.problems.push({location:{offset:r.offset,length:r.length},message:n.errorMessage||P("typeMismatchWarning",'Incorrect type. Expected "{0}".',n.type)})),Array.isArray(n.allOf))for(var l=0,h=n.allOf;l<h.length;l++){var d=h[l];z(r,G(d),i,t)}var g=G(n.not);if(g){var m=new Q,p=t.newSub();z(r,g,m,p),m.hasProblems()||i.problems.push({location:{offset:r.offset,length:r.length},message:P("notSchemaWarning","Matches a schema that is not allowed.")});for(var x=0,y=p.schemas;x<y.length;x++){var v=y[x];v.inverted=!v.inverted,t.add(v)}}var T=function(V,L){for(var H=[],q=void 0,C=0,k=V;C<k.length;C++){var w=k[C],I=G(w),R=new Q,$=t.newSub();if(z(r,I,R,$),R.hasProblems()||H.push(I),!q)q={schema:I,validationResult:R,matchingSchemas:$};else if(!L&&!R.hasProblems()&&!q.validationResult.hasProblems())q.matchingSchemas.merge($),q.validationResult.propertiesMatches+=R.propertiesMatches,q.validationResult.propertiesValueMatches+=R.propertiesValueMatches;else{var U=R.compare(q.validationResult);U>0?q={schema:I,validationResult:R,matchingSchemas:$}:U===0&&(q.matchingSchemas.merge($),q.validationResult.mergeEnumValues(R))}}return H.length>1&&L&&i.problems.push({location:{offset:r.offset,length:1},message:P("oneOfWarning","Matches multiple schemas when only one must validate.")}),q&&(i.merge(q.validationResult),i.propertiesMatches+=q.validationResult.propertiesMatches,i.propertiesValueMatches+=q.validationResult.propertiesValueMatches,t.merge(q.matchingSchemas)),H.length};Array.isArray(n.anyOf)&&T(n.anyOf,!1),Array.isArray(n.oneOf)&&T(n.oneOf,!0);var j=function(V){var L=new Q,H=t.newSub();z(r,G(V),L,H),i.merge(L),i.propertiesMatches+=L.propertiesMatches,i.propertiesValueMatches+=L.propertiesValueMatches,t.merge(H)},M=function(V,L,H){var q=G(V),C=new Q,k=t.newSub();z(r,q,C,k),t.merge(k),C.hasProblems()?H&&j(H):L&&j(L)},A=G(n.if);if(A&&M(A,G(n.then),G(n.else)),Array.isArray(n.enum)){for(var E=ve(r),S=!1,O=0,_=n.enum;O<_.length;O++){var N=_[O];if(we(E,N)){S=!0;break}}i.enumValues=n.enum,i.enumValueMatch=S,S||i.problems.push({location:{offset:r.offset,length:r.length},code:D.EnumValueMismatch,message:n.errorMessage||P("enumWarning","Value is not accepted. Valid values: {0}.",n.enum.map(function(V){return JSON.stringify(V)}).join(", "))})}if(ue(n.const)){var E=ve(r);we(E,n.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:r.offset,length:r.length},code:D.EnumValueMismatch,message:n.errorMessage||P("constWarning","Value must be {0}.",JSON.stringify(n.const))}),i.enumValueMatch=!1),i.enumValues=[n.const]}n.deprecationMessage&&r.parent&&i.problems.push({location:{offset:r.parent.offset,length:r.parent.length},severity:ee.Warning,message:n.deprecationMessage,code:D.Deprecated})}function s(u,l,h,d){var g=u.value;function m(O){var _,N=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(O.toString());return N&&{value:Number(N[1]+(N[2]||"")),multiplier:(((_=N[2])===null||_===void 0?void 0:_.length)||0)-(parseInt(N[3])||0)}}if(Y(l.multipleOf)){var p=-1;if(Number.isInteger(l.multipleOf))p=g%l.multipleOf;else{var x=m(l.multipleOf),y=m(g);if(x&&y){var v=Math.pow(10,Math.abs(y.multiplier-x.multiplier));y.multiplier<x.multiplier?y.value*=v:x.value*=v,p=y.value%x.value}}p!==0&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("multipleOfWarning","Value is not divisible by {0}.",l.multipleOf)})}function T(O,_){if(Y(_))return _;if(ie(_)&&_)return O}function j(O,_){if(!ie(_)||!_)return O}var M=T(l.minimum,l.exclusiveMinimum);Y(M)&&g<=M&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",M)});var A=T(l.maximum,l.exclusiveMaximum);Y(A)&&g>=A&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var E=j(l.minimum,l.exclusiveMinimum);Y(E)&&g<E&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("minimumWarning","Value is below the minimum of {0}.",E)});var S=j(l.maximum,l.exclusiveMaximum);Y(S)&&g>S&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("maximumWarning","Value is above the maximum of {0}.",S)})}function a(u,l,h,d){if(Y(l.minLength)&&u.value.length<l.minLength&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("minLengthWarning","String is shorter than the minimum length of {0}.",l.minLength)}),Y(l.maxLength)&&u.value.length>l.maxLength&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("maxLengthWarning","String is longer than the maximum length of {0}.",l.maxLength)}),Dn(l.pattern)){var g=Re(l.pattern);g?.test(u.value)||h.problems.push({location:{offset:u.offset,length:u.length},message:l.patternErrorMessage||l.errorMessage||P("patternWarning",'String does not match the pattern of "{0}".',l.pattern)})}if(l.format)switch(l.format){case"uri":case"uri-reference":{var m=void 0;if(!u.value)m=P("uriEmpty","URI expected.");else{var p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(u.value);p?!p[2]&&l.format==="uri"&&(m=P("uriSchemeMissing","URI with a scheme is expected.")):m=P("uriMissing","URI is expected.")}m&&h.problems.push({location:{offset:u.offset,length:u.length},message:l.patternErrorMessage||l.errorMessage||P("uriFormatWarning","String is not a URI: {0}",m)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":var x=zn[l.format];(!u.value||!x.pattern.exec(u.value))&&h.problems.push({location:{offset:u.offset,length:u.length},message:l.patternErrorMessage||l.errorMessage||x.errorMessage});default:}}function c(u,l,h,d){if(Array.isArray(l.items)){for(var g=l.items,m=0;m<g.length;m++){var p=g[m],x=G(p),y=new Q,v=u.items[m];v?(z(v,x,y,d),h.mergePropertyMatch(y)):u.items.length>=g.length&&h.propertiesValueMatches++}if(u.items.length>g.length)if(typeof l.additionalItems=="object")for(var T=g.length;T<u.items.length;T++){var y=new Q;z(u.items[T],l.additionalItems,y,d),h.mergePropertyMatch(y)}else l.additionalItems===!1&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",g.length)})}else{var j=G(l.items);if(j)for(var M=0,A=u.items;M<A.length;M++){var v=A[M],y=new Q;z(v,j,y,d),h.mergePropertyMatch(y)}}var E=G(l.contains);if(E){var S=u.items.some(function(N){var V=new Q;return z(N,E,V,ct.instance),!V.hasProblems()});S||h.problems.push({location:{offset:u.offset,length:u.length},message:l.errorMessage||P("requiredItemMissingWarning","Array does not contain required item.")})}if(Y(l.minItems)&&u.items.length<l.minItems&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("minItemsWarning","Array has too few items. Expected {0} or more.",l.minItems)}),Y(l.maxItems)&&u.items.length>l.maxItems&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("maxItemsWarning","Array has too many items. Expected {0} or fewer.",l.maxItems)}),l.uniqueItems===!0){var O=ve(u),_=O.some(function(N,V){return V!==O.lastIndexOf(N)});_&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("uniqueItemsWarning","Array has duplicate items.")})}}function f(u,l,h,d){for(var g=Object.create(null),m=[],p=0,x=u.properties;p<x.length;p++){var y=x[p],v=y.keyNode.value;g[v]=y.valueNode,m.push(v)}if(Array.isArray(l.required))for(var T=0,j=l.required;T<j.length;T++){var M=j[T];if(!g[M]){var A=u.parent&&u.parent.type==="property"&&u.parent.keyNode,E=A?{offset:A.offset,length:A.length}:{offset:u.offset,length:1};h.problems.push({location:E,message:P("MissingRequiredPropWarning",'Missing property "{0}".',M)})}}var S=function(kn){for(var bt=m.indexOf(kn);bt>=0;)m.splice(bt,1),bt=m.indexOf(kn)};if(l.properties)for(var O=0,_=Object.keys(l.properties);O<_.length;O++){var M=_[O];S(M);var N=l.properties[M],V=g[M];if(V)if(ie(N))if(N)h.propertiesMatches++,h.propertiesValueMatches++;else{var y=V.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:l.errorMessage||P("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}else{var L=new Q;z(V,N,L,d),h.mergePropertyMatch(L)}}if(l.patternProperties)for(var H=0,q=Object.keys(l.patternProperties);H<q.length;H++)for(var C=q[H],k=Re(C),w=0,I=m.slice(0);w<I.length;w++){var M=I[w];if(k?.test(M)){S(M);var V=g[M];if(V){var N=l.patternProperties[C];if(ie(N))if(N)h.propertiesMatches++,h.propertiesValueMatches++;else{var y=V.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:l.errorMessage||P("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}else{var L=new Q;z(V,N,L,d),h.mergePropertyMatch(L)}}}}if(typeof l.additionalProperties=="object")for(var R=0,$=m;R<$.length;R++){var M=$[R],V=g[M];if(V){var L=new Q;z(V,l.additionalProperties,L,d),h.mergePropertyMatch(L)}}else if(l.additionalProperties===!1&&m.length>0)for(var U=0,se=m;U<se.length;U++){var M=se[U],V=g[M];if(V){var y=V.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:l.errorMessage||P("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}}if(Y(l.maxProperties)&&u.properties.length>l.maxProperties&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("MaxPropWarning","Object has more properties than limit of {0}.",l.maxProperties)}),Y(l.minProperties)&&u.properties.length<l.minProperties&&h.problems.push({location:{offset:u.offset,length:u.length},message:P("MinPropWarning","Object has fewer properties than the required number of {0}",l.minProperties)}),l.dependencies)for(var X=0,te=Object.keys(l.dependencies);X<te.length;X++){var v=te[X],Se=g[v];if(Se){var ce=l.dependencies[v];if(Array.isArray(ce))for(var vt=0,vn=ce;vt<vn.length;vt++){var yn=vn[vt];g[yn]?h.propertiesValueMatches++:h.problems.push({location:{offset:u.offset,length:u.length},message:P("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",yn,v)})}else{var N=G(ce);if(N){var L=new Q;z(u,N,L,d),h.mergePropertyMatch(L)}}}}var bn=G(l.propertyNames);if(bn)for(var yt=0,xn=u.properties;yt<xn.length;yt++){var Rr=xn[yt],v=Rr.keyNode;v&&z(v,bn,h,ct.instance)}}}function er(e,n){var i=[],t=-1,r=e.getText(),o=be(r,!1),s=n&&n.collectComments?[]:void 0;function a(){for(;;){var A=o.scan();switch(l(),A){case 12:case 13:Array.isArray(s)&&s.push(W.create(e.positionAt(o.getTokenOffset()),e.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return A}}}function c(A){return o.getToken()===A?(a(),!0):!1}function f(A,E,S,O,_){if(_===void 0&&(_=ee.Error),i.length===0||S!==t){var N=W.create(e.positionAt(S),e.positionAt(O));i.push(le.create(N,A,_,E,e.languageId)),t=S}}function u(A,E,S,O,_){S===void 0&&(S=void 0),O===void 0&&(O=[]),_===void 0&&(_=[]);var N=o.getTokenOffset(),V=o.getTokenOffset()+o.getTokenLength();if(N===V&&N>0){for(N--;N>0&&/\s/.test(r.charAt(N));)N--;V=N+1}if(f(A,E,N,V),S&&h(S,!1),O.length+_.length>0)for(var L=o.getToken();L!==17;){if(O.indexOf(L)!==-1){a();break}else if(_.indexOf(L)!==-1)break;L=a()}return S}function l(){switch(o.getTokenError()){case 4:return u(P("InvalidUnicode","Invalid unicode sequence in string."),D.InvalidUnicode),!0;case 5:return u(P("InvalidEscapeCharacter","Invalid escape character in string."),D.InvalidEscapeCharacter),!0;case 3:return u(P("UnexpectedEndOfNumber","Unexpected end of number."),D.UnexpectedEndOfNumber),!0;case 1:return u(P("UnexpectedEndOfComment","Unexpected end of comment."),D.UnexpectedEndOfComment),!0;case 2:return u(P("UnexpectedEndOfString","Unexpected end of string."),D.UnexpectedEndOfString),!0;case 6:return u(P("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),D.InvalidCharacter),!0}return!1}function h(A,E){return A.length=o.getTokenOffset()+o.getTokenLength()-A.offset,E&&a(),A}function d(A){if(o.getToken()===3){var E=new Hn(A,o.getTokenOffset());a();for(var S=0,O=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){O||u(P("ValueExpected","Value expected"),D.ValueExpected);var _=o.getTokenOffset();if(a(),o.getToken()===4){O&&f(P("TrailingComma","Trailing comma"),D.TrailingComma,_,_+1);continue}}else O&&u(P("ExpectedComma","Expected comma"),D.CommaExpected);var N=T(E);N?E.items.push(N):u(P("PropertyExpected","Value expected"),D.ValueExpected,void 0,[],[4,5]),O=!0}return o.getToken()!==4?u(P("ExpectedCloseBracket","Expected comma or closing bracket"),D.CommaOrCloseBacketExpected,E):h(E,!0)}}var g=new st(void 0,0,0);function m(A,E){var S=new Zn(A,o.getTokenOffset(),g),O=x(S);if(!O)if(o.getToken()===16){u(P("DoubleQuotesExpected","Property keys must be doublequoted"),D.Undefined);var _=new st(S,o.getTokenOffset(),o.getTokenLength());_.value=o.getTokenValue(),O=_,a()}else return;S.keyNode=O;var N=E[O.value];if(N?(f(P("DuplicateKeyWarning","Duplicate object key"),D.DuplicateKey,S.keyNode.offset,S.keyNode.offset+S.keyNode.length,ee.Warning),typeof N=="object"&&f(P("DuplicateKeyWarning","Duplicate object key"),D.DuplicateKey,N.keyNode.offset,N.keyNode.offset+N.keyNode.length,ee.Warning),E[O.value]=!0):E[O.value]=S,o.getToken()===6)S.colonOffset=o.getTokenOffset(),a();else if(u(P("ColonExpected","Colon expected"),D.ColonExpected),o.getToken()===10&&e.positionAt(O.offset+O.length).line<e.positionAt(o.getTokenOffset()).line)return S.length=O.length,S;var V=T(S);return V?(S.valueNode=V,S.length=V.offset+V.length-S.offset,S):u(P("ValueExpected","Value expected"),D.ValueExpected,S,[],[2,5])}function p(A){if(o.getToken()===1){var E=new Gn(A,o.getTokenOffset()),S=Object.create(null);a();for(var O=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){O||u(P("PropertyExpected","Property expected"),D.PropertyExpected);var _=o.getTokenOffset();if(a(),o.getToken()===2){O&&f(P("TrailingComma","Trailing comma"),D.TrailingComma,_,_+1);continue}}else O&&u(P("ExpectedComma","Expected comma"),D.CommaExpected);var N=m(E,S);N?E.properties.push(N):u(P("PropertyExpected","Property expected"),D.PropertyExpected,void 0,[],[2,5]),O=!0}return o.getToken()!==2?u(P("ExpectedCloseBrace","Expected comma or closing brace"),D.CommaOrCloseBraceExpected,E):h(E,!0)}}function x(A){if(o.getToken()===10){var E=new st(A,o.getTokenOffset());return E.value=o.getTokenValue(),h(E,!0)}}function y(A){if(o.getToken()===11){var E=new Xn(A,o.getTokenOffset());if(o.getTokenError()===0){var S=o.getTokenValue();try{var O=JSON.parse(S);if(!Y(O))return u(P("InvalidNumberFormat","Invalid number format."),D.Undefined,E);E.value=O}catch{return u(P("InvalidNumberFormat","Invalid number format."),D.Undefined,E)}E.isInteger=S.indexOf(".")===-1}return h(E,!0)}}function v(A){var E;switch(o.getToken()){case 7:return h(new Jn(A,o.getTokenOffset()),!0);case 8:return h(new rn(A,!0,o.getTokenOffset()),!0);case 9:return h(new rn(A,!1,o.getTokenOffset()),!0);default:return}}function T(A){return d(A)||p(A)||x(A)||y(A)||v(A)}var j=void 0,M=a();return M!==17&&(j=T(j),j?o.getToken()!==17&&u(P("End of file expected","End of file expected."),D.Undefined):u(P("Invalid symbol","Expected a JSON object, array or literal."),D.Undefined)),new sn(j,i,s)}function lt(e,n,i){if(e!==null&&typeof e=="object"){var t=n+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var r=`[ `,o=0;o<e.length;o++)r+=t+lt(e[o],t,i),o<e.length-1&&(r+=","),r+=` `;return r+=n+"]",r}else{var s=Object.keys(e);if(s.length===0)return"{}";for(var r=`{ `,o=0;o<s.length;o++){var a=s[o];r+=t+JSON.stringify(a)+": "+lt(e[a],t,i),o<s.length-1&&(r+=","),r+=` `}return r+=n+"}",r}}return i(e)}var ft=Pe(),tr=[",","}","]"],nr=[":"],rr=function(){function e(n,i,t,r){i===void 0&&(i=[]),t===void 0&&(t=Promise),r===void 0&&(r={}),this.schemaService=n,this.contributions=i,this.promiseConstructor=t,this.clientCapabilities=r}return e.prototype.doResolve=function(n){for(var i=this.contributions.length-1;i>=0;i--){var t=this.contributions[i].resolveCompletion;if(t){var r=t(n);if(r)return r}}return this.promiseConstructor.resolve(n)},e.prototype.doComplete=function(n,i,t){var r=this,o={items:[],isIncomplete:!1},s=n.getText(),a=n.offsetAt(i),c=t.getNodeFromOffset(a,!0);if(this.isInComment(n,c?c.offset:0,a))return Promise.resolve(o);if(c&&a===c.offset+c.length&&a>0){var f=s[a-1];(c.type==="object"&&f==="}"||c.type==="array"&&f==="]")&&(c=c.parent)}var u=this.getCurrentWord(n,a),l;if(c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null"))l=W.create(n.positionAt(c.offset),n.positionAt(c.offset+c.length));else{var h=a-u.length;h>0&&s[h-1]==='"'&&h--,l=W.create(n.positionAt(h),i)}var d=!1,g={},m={add:function(p){var x=p.label,y=g[x];if(y)y.documentation||(y.documentation=p.documentation),y.detail||(y.detail=p.detail);else{if(x=x.replace(/[\n]/g,"\u21B5"),x.length>60){var v=x.substr(0,57).trim()+"...";g[v]||(x=v)}l&&p.insertText!==void 0&&(p.textEdit=re.replace(l,p.insertText)),d&&(p.commitCharacters=p.kind===Z.Property?nr:tr),p.label=x,g[x]=p,o.items.push(p)}},setAsIncomplete:function(){o.isIncomplete=!0},error:function(p){console.error(p)},log:function(p){console.log(p)},getNumberOfProposals:function(){return o.items.length}};return this.schemaService.getSchemaForResource(n.uri,t).then(function(p){var x=[],y=!0,v="",T=void 0;if(c&&c.type==="string"){var j=c.parent;j&&j.type==="property"&&j.keyNode===c&&(y=!j.valueNode,T=j,v=s.substr(c.offset+1,c.length-2),j&&(c=j.parent))}if(c&&c.type==="object"){if(c.offset===a)return o;var M=c.properties;M.forEach(function(O){(!T||T!==O)&&(g[O.keyNode.value]=it.create("__"))});var A="";y&&(A=r.evaluateSeparatorAfter(n,n.offsetAt(l.end))),p?r.getPropertyCompletions(p,t,c,y,A,m):r.getSchemaLessPropertyCompletions(t,c,v,m);var E=ut(c);r.contributions.forEach(function(O){var _=O.collectPropertyCompletions(n.uri,E,u,y,A==="",m);_&&x.push(_)}),!p&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(m.add({kind:Z.Property,label:r.getLabelForValue(u),insertText:r.getInsertTextForProperty(u,void 0,!1,A),insertTextFormat:K.Snippet,documentation:""}),m.setAsIncomplete())}var S={};return p?r.getValueCompletions(p,t,c,a,n,m,S):r.getSchemaLessValueCompletions(t,c,a,n,m),r.contributions.length>0&&r.getContributedValueCompletions(t,c,a,n,m,x),r.promiseConstructor.all(x).then(function(){if(m.getNumberOfProposals()===0){var O=a;c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null")&&(O=c.offset+c.length);var _=r.evaluateSeparatorAfter(n,O);r.addFillerValueCompletions(S,_,m)}return o})})},e.prototype.getPropertyCompletions=function(n,i,t,r,o,s){var a=this,c=i.getMatchingSchemas(n.schema,t.offset);c.forEach(function(f){if(f.node===t&&!f.inverted){var u=f.schema.properties;u&&Object.keys(u).forEach(function(m){var p=u[m];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){var x={kind:Z.Property,label:m,insertText:a.getInsertTextForProperty(m,p,r,o),insertTextFormat:K.Snippet,filterText:a.getFilterTextForValue(m),documentation:a.fromMarkup(p.markdownDescription)||p.description||""};p.suggestSortText!==void 0&&(x.sortText=p.suggestSortText),x.insertText&&Te(x.insertText,"$1".concat(o))&&(x.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(x)}});var l=f.schema.propertyNames;if(typeof l=="object"&&!l.deprecationMessage&&!l.doNotSuggest){var h=function(m,p){p===void 0&&(p=void 0);var x={kind:Z.Property,label:m,insertText:a.getInsertTextForProperty(m,void 0,r,o),insertTextFormat:K.Snippet,filterText:a.getFilterTextForValue(m),documentation:p||a.fromMarkup(l.markdownDescription)||l.description||""};l.suggestSortText!==void 0&&(x.sortText=l.suggestSortText),x.insertText&&Te(x.insertText,"$1".concat(o))&&(x.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(x)};if(l.enum)for(var d=0;d<l.enum.length;d++){var g=void 0;l.markdownEnumDescriptions&&d<l.markdownEnumDescriptions.length?g=a.fromMarkup(l.markdownEnumDescriptions[d]):l.enumDescriptions&&d<l.enumDescriptions.length&&(g=l.enumDescriptions[d]),h(l.enum[d],g)}l.const&&h(l.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(n,i,t,r){var o=this,s=function(c){c.properties.forEach(function(f){var u=f.keyNode.value;r.add({kind:Z.Property,label:u,insertText:o.getInsertTextForValue(u,""),insertTextFormat:K.Snippet,filterText:o.getFilterTextForValue(u),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var a=i.parent.keyNode.value;n.visit(function(c){return c.type==="property"&&c!==i.parent&&c.keyNode.value===a&&c.valueNode&&c.valueNode.type==="object"&&s(c.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(c){c.type==="object"&&c!==i&&s(c)});else i.type==="object"&&r.add({kind:Z.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:K.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(n,i,t,r,o){var s=this,a=t;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(a=i.offset+i.length,i=i.parent),!i){o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:K.Snippet,documentation:""}),o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:K.Snippet,documentation:""});return}var c=this.evaluateSeparatorAfter(r,a),f=function(d){d.parent&&!an(d.parent,t,!0)&&o.add({kind:s.getSuggestionKind(d.type),label:s.getLabelTextForMatchingNode(d,r),insertText:s.getInsertTextForMatchingNode(d,r,c),insertTextFormat:K.Snippet,documentation:""}),d.type==="boolean"&&s.addBooleanValueCompletion(!d.value,c,o)};if(i.type==="property"&&t>(i.colonOffset||0)){var u=i.valueNode;if(u&&(t>u.offset+u.length||u.type==="object"||u.type==="array"))return;var l=i.keyNode.value;n.visit(function(d){return d.type==="property"&&d.keyNode.value===l&&d.valueNode&&f(d.valueNode),!0}),l==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(c,o)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var h=i.parent.keyNode.value;n.visit(function(d){return d.type==="property"&&d.keyNode.value===h&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(f),!0})}else i.items.forEach(f)},e.prototype.getValueCompletions=function(n,i,t,r,o,s,a){var c=r,f=void 0,u=void 0;if(t&&(t.type==="string"||t.type==="number"||t.type==="boolean"||t.type==="null")&&(c=t.offset+t.length,u=t,t=t.parent),!t){this.addSchemaValueCompletions(n.schema,"",s,a);return}if(t.type==="property"&&r>(t.colonOffset||0)){var l=t.valueNode;if(l&&r>l.offset+l.length)return;f=t.keyNode.value,t=t.parent}if(t&&(f!==void 0||t.type==="array")){for(var h=this.evaluateSeparatorAfter(o,c),d=i.getMatchingSchemas(n.schema,t.offset,u),g=0,m=d;g<m.length;g++){var p=m[g];if(p.node===t&&!p.inverted&&p.schema){if(t.type==="array"&&p.schema.items)if(Array.isArray(p.schema.items)){var x=this.findItemAtOffset(t,o,r);x<p.schema.items.length&&this.addSchemaValueCompletions(p.schema.items[x],h,s,a)}else this.addSchemaValueCompletions(p.schema.items,h,s,a);if(f!==void 0){var y=!1;if(p.schema.properties){var v=p.schema.properties[f];v&&(y=!0,this.addSchemaValueCompletions(v,h,s,a))}if(p.schema.patternProperties&&!y)for(var T=0,j=Object.keys(p.schema.patternProperties);T<j.length;T++){var M=j[T],A=Re(M);if(A?.test(f)){y=!0;var v=p.schema.patternProperties[M];this.addSchemaValueCompletions(v,h,s,a)}}if(p.schema.additionalProperties&&!y){var v=p.schema.additionalProperties;this.addSchemaValueCompletions(v,h,s,a)}}}}f==="$schema"&&!t.parent&&this.addDollarSchemaCompletions(h,s),a.boolean&&(this.addBooleanValueCompletion(!0,h,s),this.addBooleanValueCompletion(!1,h,s)),a.null&&this.addNullValueCompletion(h,s)}},e.prototype.getContributedValueCompletions=function(n,i,t,r,o,s){if(!i)this.contributions.forEach(function(u){var l=u.collectDefaultCompletions(r.uri,o);l&&s.push(l)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i&&i.type==="property"&&t>(i.colonOffset||0)){var a=i.keyNode.value,c=i.valueNode;if((!c||t<=c.offset+c.length)&&i.parent){var f=ut(i.parent);this.contributions.forEach(function(u){var l=u.collectValueCompletions(r.uri,f,a,o);l&&s.push(l)})}}},e.prototype.addSchemaValueCompletions=function(n,i,t,r){var o=this;typeof n=="object"&&(this.addEnumValueCompletions(n,i,t),this.addDefaultValueCompletions(n,i,t),this.collectTypes(n,r),Array.isArray(n.allOf)&&n.allOf.forEach(function(s){return o.addSchemaValueCompletions(s,i,t,r)}),Array.isArray(n.anyOf)&&n.anyOf.forEach(function(s){return o.addSchemaValueCompletions(s,i,t,r)}),Array.isArray(n.oneOf)&&n.oneOf.forEach(function(s){return o.addSchemaValueCompletions(s,i,t,r)}))},e.prototype.addDefaultValueCompletions=function(n,i,t,r){var o=this;r===void 0&&(r=0);var s=!1;if(ue(n.default)){for(var a=n.type,c=n.default,f=r;f>0;f--)c=[c],a="array";t.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,i),insertTextFormat:K.Snippet,detail:ft("json.suggest.default","Default value")}),s=!0}Array.isArray(n.examples)&&n.examples.forEach(function(u){for(var l=n.type,h=u,d=r;d>0;d--)h=[h],l="array";t.add({kind:o.getSuggestionKind(l),label:o.getLabelForValue(h),insertText:o.getInsertTextForValue(h,i),insertTextFormat:K.Snippet}),s=!0}),Array.isArray(n.defaultSnippets)&&n.defaultSnippets.forEach(function(u){var l=n.type,h=u.body,d=u.label,g,m;if(ue(h)){for(var p=n.type,x=r;x>0;x--)h=[h],p="array";g=o.getInsertTextForSnippetValue(h,i),m=o.getFilterTextForSnippetValue(h),d=d||o.getLabelForSnippetValue(h)}else if(typeof u.bodyText=="string"){for(var y="",v="",T="",x=r;x>0;x--)y=y+T+`[ `,v=v+` `+T+"]",T+=" ",l="array";g=y+T+u.bodyText.split(` `).join(` `+T)+v+i,d=d||g,m=g.replace(/[\n]/g,"")}else return;t.add({kind:o.getSuggestionKind(l),label:d,documentation:o.fromMarkup(u.markdownDescription)||u.description,insertText:g,insertTextFormat:K.Snippet,filterText:m}),s=!0}),!s&&typeof n.items=="object"&&!Array.isArray(n.items)&&r<5&&this.addDefaultValueCompletions(n.items,i,t,r+1)},e.prototype.addEnumValueCompletions=function(n,i,t){if(ue(n.const)&&t.add({kind:this.getSuggestionKind(n.type),label:this.getLabelForValue(n.const),insertText:this.getInsertTextForValue(n.const,i),insertTextFormat:K.Snippet,documentation:this.fromMarkup(n.markdownDescription)||n.description}),Array.isArray(n.enum))for(var r=0,o=n.enum.length;r<o;r++){var s=n.enum[r],a=this.fromMarkup(n.markdownDescription)||n.description;n.markdownEnumDescriptions&&r<n.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(n.markdownEnumDescriptions[r]):n.enumDescriptions&&r<n.enumDescriptions.length&&(a=n.enumDescriptions[r]),t.add({kind:this.getSuggestionKind(n.type),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,i),insertTextFormat:K.Snippet,documentation:a})}},e.prototype.collectTypes=function(n,i){if(!(Array.isArray(n.enum)||ue(n.const))){var t=n.type;Array.isArray(t)?t.forEach(function(r){return i[r]=!0}):t&&(i[t]=!0)}},e.prototype.addFillerValueCompletions=function(n,i,t){n.object&&t.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:K.Snippet,detail:ft("defaults.object","New object"),documentation:""}),n.array&&t.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:K.Snippet,detail:ft("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(n,i,t){t.add({kind:this.getSuggestionKind("boolean"),label:n?"true":"false",insertText:this.getInsertTextForValue(n,i),insertTextFormat:K.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(n,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+n,insertTextFormat:K.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(n,i){var t=this,r=this.schemaService.getRegisteredSchemaIds(function(o){return o==="http"||o==="https"});r.forEach(function(o){return i.add({kind:Z.Module,label:t.getLabelForValue(o),filterText:t.getFilterTextForValue(o),insertText:t.getInsertTextForValue(o,n),insertTextFormat:K.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(n){return JSON.stringify(n)},e.prototype.getFilterTextForValue=function(n){return JSON.stringify(n)},e.prototype.getFilterTextForSnippetValue=function(n){return JSON.stringify(n).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(n){var i=JSON.stringify(n);return i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(n){return n.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(n,i){var t=JSON.stringify(n,null," ");return t==="{}"?"{$1}"+i:t==="[]"?"[$1]"+i:this.getInsertTextForPlainText(t+i)},e.prototype.getInsertTextForSnippetValue=function(n,i){var t=function(r){return typeof r=="string"&&r[0]==="^"?r.substr(1):JSON.stringify(r)};return lt(n,"",t)+i},e.prototype.getInsertTextForGuessedValue=function(n,i){switch(typeof n){case"object":return n===null?"${1:null}"+i:this.getInsertTextForValue(n,i);case"string":var t=JSON.stringify(n);return t=t.substr(1,t.length-2),t=this.getInsertTextForPlainText(t),'"${1:'+t+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(n)+"}"+i}return this.getInsertTextForValue(n,i)},e.prototype.getSuggestionKind=function(n){if(Array.isArray(n)){var i=n;n=i.length>0?i[0]:void 0}if(!n)return Z.Value;switch(n){case"string":return Z.Value;case"object":return Z.Module;case"property":return Z.Property;default:return Z.Value}},e.prototype.getLabelTextForMatchingNode=function(n,i){switch(n.type){case"array":return"[]";case"object":return"{}";default:var t=i.getText().substr(n.offset,n.length);return t}},e.prototype.getInsertTextForMatchingNode=function(n,i,t){switch(n.type){case"array":return this.getInsertTextForValue([],t);case"object":return this.getInsertTextForValue({},t);default:var r=i.getText().substr(n.offset,n.length)+t;return this.getInsertTextForPlainText(r)}},e.prototype.getInsertTextForProperty=function(n,i,t,r){var o=this.getInsertTextForValue(n,"");if(!t)return o;var s=o+": ",a,c=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var f=i.defaultSnippets[0].body;ue(f)&&(a=this.getInsertTextForSnippetValue(f,""))}c+=i.defaultSnippets.length}if(i.enum&&(!a&&i.enum.length===1&&(a=this.getInsertTextForGuessedValue(i.enum[0],"")),c+=i.enum.length),ue(i.default)&&(a||(a=this.getInsertTextForGuessedValue(i.default,"")),c++),Array.isArray(i.examples)&&i.examples.length&&(a||(a=this.getInsertTextForGuessedValue(i.examples[0],"")),c+=i.examples.length),c===0){var u=Array.isArray(i.type)?i.type[0]:i.type;switch(u||(i.properties?u="object":i.items&&(u="array")),u){case"boolean":a="$1";break;case"string":a='"$1"';break;case"object":a="{$1}";break;case"array":a="[$1]";break;case"number":case"integer":a="${1:0}";break;case"null":a="${1:null}";break;default:return o}}}return(!a||c>1)&&(a="$1"),s+a+r},e.prototype.getCurrentWord=function(n,i){for(var t=i-1,r=n.getText();t>=0&&` \r\v":{[,]}`.indexOf(r.charAt(t))===-1;)t--;return r.substring(t+1,i)},e.prototype.evaluateSeparatorAfter=function(n,i){var t=be(n.getText(),!0);t.setPosition(i);var r=t.scan();switch(r){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(n,i,t){for(var r=be(i.getText(),!0),o=n.items,s=o.length-1;s>=0;s--){var a=o[s];if(t>a.offset+a.length){r.setPosition(a.offset+a.length);var c=r.scan();return c===5&&t>=r.getTokenOffset()+r.getTokenLength()?s+1:s}else if(t>=a.offset)return s}return 0},e.prototype.isInComment=function(n,i,t){var r=be(n.getText(),!1);r.setPosition(i);for(var o=r.scan();o!==17&&r.getTokenOffset()+r.getTokenLength()<t;)o=r.scan();return(o===12||o===13)&&r.getTokenOffset()<=t},e.prototype.fromMarkup=function(n){if(n&&this.doesSupportMarkdown())return{kind:fe.Markdown,value:n}},e.prototype.doesSupportMarkdown=function(){if(!ue(this.supportsMarkdown)){var n=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=n&&n.completionItem&&Array.isArray(n.completionItem.documentationFormat)&&n.completionItem.documentationFormat.indexOf(fe.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!ue(this.supportsCommitCharacters)){var n=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=n&&n.completionItem&&!!n.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),ir=function(){function e(n,i,t){i===void 0&&(i=[]),this.schemaService=n,this.contributions=i,this.promise=t||Promise}return e.prototype.doHover=function(n,i,t){var r=n.offsetAt(i),o=t.getNodeFromOffset(r);if(!o||(o.type==="object"||o.type==="array")&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);var s=o;if(o.type==="string"){var a=o.parent;if(a&&a.type==="property"&&a.keyNode===o&&(o=a.valueNode,!o))return this.promise.resolve(null)}for(var c=W.create(n.positionAt(s.offset),n.positionAt(s.offset+s.length)),f=function(g){var m={contents:g,range:c};return m},u=ut(o),l=this.contributions.length-1;l>=0;l--){var h=this.contributions[l],d=h.getInfoContribution(n.uri,u);if(d)return d.then(function(g){return f(g)})}return this.schemaService.getSchemaForResource(n.uri,t).then(function(g){if(g&&o){var m=t.getMatchingSchemas(g.schema,o.offset),p=void 0,x=void 0,y=void 0,v=void 0;m.every(function(j){if(j.node===o&&!j.inverted&&j.schema&&(p=p||j.schema.title,x=x||j.schema.markdownDescription||ht(j.schema.description),j.schema.enum)){var M=j.schema.enum.indexOf(ve(o));j.schema.markdownEnumDescriptions?y=j.schema.markdownEnumDescriptions[M]:j.schema.enumDescriptions&&(y=ht(j.schema.enumDescriptions[M])),y&&(v=j.schema.enum[M],typeof v!="string"&&(v=JSON.stringify(v)))}return!0});var T="";return p&&(T=ht(p)),x&&(T.length>0&&(T+=` `),T+=x),y&&(T.length>0&&(T+=` `),T+="`".concat(or(v),"`: ").concat(y)),f([T])}return null})},e}();function ht(e){if(e){var n=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function or(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var ar=Pe(),sr=function(){function e(n,i){this.jsonSchemaService=n,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(n){n&&(this.validationEnabled=n.validate!==!1,this.commentSeverity=n.allowComments?void 0:ee.Error)},e.prototype.doValidation=function(n,i,t,r){var o=this;if(!this.validationEnabled)return this.promise.resolve([]);var s=[],a={},c=function(h){var d=h.range.start.line+" "+h.range.start.character+" "+h.message;a[d]||(a[d]=!0,s.push(h))},f=function(h){var d=t?.trailingCommas?Be(t.trailingCommas):ee.Error,g=t?.comments?Be(t.comments):o.commentSeverity,m=t?.schemaValidation?Be(t.schemaValidation):ee.Warning,p=t?.schemaRequest?Be(t.schemaRequest):ee.Warning;if(h){if(h.errors.length&&i.root&&p){var x=i.root,y=x.type==="object"?x.properties[0]:void 0;if(y&&y.keyNode.value==="$schema"){var v=y.valueNode||y,T=W.create(n.positionAt(v.offset),n.positionAt(v.offset+v.length));c(le.create(T,h.errors[0],p,D.SchemaResolveError))}else{var T=W.create(n.positionAt(x.offset),n.positionAt(x.offset+1));c(le.create(T,h.errors[0],p,D.SchemaResolveError))}}else if(m){var j=i.validate(n,h.schema,m);j&&j.forEach(c)}cn(h.schema)&&(g=void 0),un(h.schema)&&(d=void 0)}for(var M=0,A=i.syntaxErrors;M<A.length;M++){var E=A[M];if(E.code===D.TrailingComma){if(typeof d!="number")continue;E.severity=d}c(E)}if(typeof g=="number"){var S=ar("InvalidCommentToken","Comments are not permitted in JSON.");i.comments.forEach(function(O){c(le.create(O,S,g,D.CommentNotPermitted))})}return s};if(r){var u=r.id||"schemaservice://untitled/"+cr++,l=this.jsonSchemaService.registerExternalSchema(u,[],r);return l.getResolvedSchema().then(function(h){return f(h)})}return this.jsonSchemaService.getSchemaForResource(n.uri,i).then(function(h){return f(h)})},e.prototype.getLanguageStatus=function(n,i){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(n.uri,i)}},e}(),cr=0;function cn(e){if(e&&typeof e=="object"){if(ie(e.allowComments))return e.allowComments;if(e.allOf)for(var n=0,i=e.allOf;n<i.length;n++){var t=i[n],r=cn(t);if(ie(r))return r}}}function un(e){if(e&&typeof e=="object"){if(ie(e.allowTrailingCommas))return e.allowTrailingCommas;var n=e;if(ie(n.allowsTrailingCommas))return n.allowsTrailingCommas;if(e.allOf)for(var i=0,t=e.allOf;i<t.length;i++){var r=t[i],o=un(r);if(ie(o))return o}}}function Be(e){switch(e){case"error":return ee.Error;case"warning":return ee.Warning;case"ignore":return}}var ln=48,ur=57,lr=65,Ke=97,fr=102;function B(e){return e<ln?0:e<=ur?e-ln:(e<Ke&&(e+=Ke-lr),e>=Ke&&e<=fr?e-Ke+10:0)}function hr(e){if(e[0]==="#")switch(e.length){case 4:return{red:B(e.charCodeAt(1))*17/255,green:B(e.charCodeAt(2))*17/255,blue:B(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:B(e.charCodeAt(1))*17/255,green:B(e.charCodeAt(2))*17/255,blue:B(e.charCodeAt(3))*17/255,alpha:B(e.charCodeAt(4))*17/255};case 7:return{red:(B(e.charCodeAt(1))*16+B(e.charCodeAt(2)))/255,green:(B(e.charCodeAt(3))*16+B(e.charCodeAt(4)))/255,blue:(B(e.charCodeAt(5))*16+B(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(B(e.charCodeAt(1))*16+B(e.charCodeAt(2)))/255,green:(B(e.charCodeAt(3))*16+B(e.charCodeAt(4)))/255,blue:(B(e.charCodeAt(5))*16+B(e.charCodeAt(6)))/255,alpha:(B(e.charCodeAt(7))*16+B(e.charCodeAt(8)))/255}}}var pr=function(){function e(n){this.schemaService=n}return e.prototype.findDocumentSymbols=function(n,i,t){var r=this;t===void 0&&(t={resultLimit:Number.MAX_VALUE});var o=i.root;if(!o)return[];var s=t.resultLimit||Number.MAX_VALUE,a=n.uri;if((a==="vscode://defaultsettings/keybindings.json"||Te(a.toLowerCase(),"/user/keybindings.json"))&&o.type==="array"){for(var c=[],f=0,u=o.items;f<u.length;f++){var l=u[f];if(l.type==="object")for(var h=0,d=l.properties;h<d.length;h++){var g=d[h];if(g.keyNode.value==="key"&&g.valueNode){var m=Oe.create(n.uri,pe(n,l));if(c.push({name:ve(g.valueNode),kind:oe.Function,location:m}),s--,s<=0)return t&&t.onResultLimitExceeded&&t.onResultLimitExceeded(a),c}}}return c}for(var p=[{node:o,containerName:""}],x=0,y=!1,v=[],T=function(M,A){M.type==="array"?M.items.forEach(function(E){E&&p.push({node:E,containerName:A})}):M.type==="object"&&M.properties.forEach(function(E){var S=E.valueNode;if(S)if(s>0){s--;var O=Oe.create(n.uri,pe(n,E)),_=A?A+"."+E.keyNode.value:E.keyNode.value;v.push({name:r.getKeyLabel(E),kind:r.getSymbolKind(S.type),location:O,containerName:A}),p.push({node:S,containerName:_})}else y=!0})};x<p.length;){var j=p[x++];T(j.node,j.containerName)}return y&&t&&t.onResultLimitExceeded&&t.onResultLimitExceeded(a),v},e.prototype.findDocumentSymbols2=function(n,i,t){var r=this;t===void 0&&(t={resultLimit:Number.MAX_VALUE});var o=i.root;if(!o)return[];var s=t.resultLimit||Number.MAX_VALUE,a=n.uri;if((a==="vscode://defaultsettings/keybindings.json"||Te(a.toLowerCase(),"/user/keybindings.json"))&&o.type==="array"){for(var c=[],f=0,u=o.items;f<u.length;f++){var l=u[f];if(l.type==="object")for(var h=0,d=l.properties;h<d.length;h++){var g=d[h];if(g.keyNode.value==="key"&&g.valueNode){var m=pe(n,l),p=pe(n,g.keyNode);if(c.push({name:ve(g.valueNode),kind:oe.Function,range:m,selectionRange:p}),s--,s<=0)return t&&t.onResultLimitExceeded&&t.onResultLimitExceeded(a),c}}}return c}for(var x=[],y=[{node:o,result:x}],v=0,T=!1,j=function(A,E){A.type==="array"?A.items.forEach(function(S,O){if(S)if(s>0){s--;var _=pe(n,S),N=_,V=String(O),L={name:V,kind:r.getSymbolKind(S.type),range:_,selectionRange:N,children:[]};E.push(L),y.push({result:L.children,node:S})}else T=!0}):A.type==="object"&&A.properties.forEach(function(S){var O=S.valueNode;if(O)if(s>0){s--;var _=pe(n,S),N=pe(n,S.keyNode),V=[],L={name:r.getKeyLabel(S),kind:r.getSymbolKind(O.type),range:_,selectionRange:N,children:V,detail:r.getDetail(O)};E.push(L),y.push({result:V,node:O})}else T=!0})};v<y.length;){var M=y[v++];j(M.node,M.result)}return T&&t&&t.onResultLimitExceeded&&t.onResultLimitExceeded(a),x},e.prototype.getSymbolKind=function(n){switch(n){case"object":return oe.Module;case"string":return oe.String;case"number":return oe.Number;case"array":return oe.Array;case"boolean":return oe.Boolean;default:return oe.Variable}},e.prototype.getKeyLabel=function(n){var i=n.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'.concat(i,'"')},e.prototype.getDetail=function(n){if(n){if(n.type==="boolean"||n.type==="number"||n.type==="null"||n.type==="string")return String(n.value);if(n.type==="array")return n.children.length?void 0:"[]";if(n.type==="object")return n.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(n,i,t){return this.schemaService.getSchemaForResource(n.uri,i).then(function(r){var o=[];if(r)for(var s=t&&typeof t.resultLimit=="number"?t.resultLimit:Number.MAX_VALUE,a=i.getMatchingSchemas(r.schema),c={},f=0,u=a;f<u.length;f++){var l=u[f];if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){var h=String(l.node.offset);if(!c[h]){var d=hr(ve(l.node));if(d){var g=pe(n,l.node);o.push({color:d,range:g})}if(c[h]=!0,s--,s<=0)return t&&t.onResultLimitExceeded&&t.onResultLimitExceeded(n.uri),o}}}return o})},e.prototype.getColorPresentations=function(n,i,t,r){var o=[],s=Math.round(t.red*255),a=Math.round(t.green*255),c=Math.round(t.blue*255);function f(l){var h=l.toString(16);return h.length!==2?"0"+h:h}var u;return t.alpha===1?u="#".concat(f(s)).concat(f(a)).concat(f(c)):u="#".concat(f(s)).concat(f(a)).concat(f(c)).concat(f(Math.round(t.alpha*255))),o.push({label:u,textEdit:re.replace(r,JSON.stringify(u))}),o},e}();function pe(e,n){return W.create(e.positionAt(n.offset),e.positionAt(n.offset+n.length))}var F=Pe(),pt={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},dr={id:F("schema.json.id","A unique identifier for the schema."),$schema:F("schema.json.$schema","The schema to verify this document against."),title:F("schema.json.title","A descriptive title of the element."),description:F("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:F("schema.json.default","A default value. Used by suggestions."),multipleOf:F("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:F("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:F("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:F("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:F("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:F("schema.json.maxLength","The maximum length of a string."),minLength:F("schema.json.minLength","The minimum length of a string."),pattern:F("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:F("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:F("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:F("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:F("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:F("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:F("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:F("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:F("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:F("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:F("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:F("schema.json.properties","A map of property names to schemas for each property."),patternProperties:F("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:F("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:F("schema.json.enum","The set of literal values that are valid."),type:F("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:F("schema.json.format","Describes the format expected for the value."),allOf:F("schema.json.allOf","An array of schemas, all of which must match."),anyOf:F("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:F("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:F("schema.json.not","A schema which must not match."),$id:F("schema.json.$id","A unique identifier for the schema."),$ref:F("schema.json.$ref","Reference a definition hosted on any location."),$comment:F("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:F("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:F("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:F("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:F("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:F("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:F("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:F("schema.json.contentEncoding","Describes the content encoding of a string property."),if:F("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:F("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:F("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(fn in pt.schemas){ze=pt.schemas[fn];for(ke in ze.properties)Je=ze.properties[ke],typeof Je=="boolean"&&(Je=ze.properties[ke]={}),dt=dr[ke],dt?Je.description=dt:console.log("".concat(ke,": localize('schema.json.").concat(ke,`', "")`))}var ze,Je,dt,ke,fn,hn;hn=(()=>{"use strict";var e={470:t=>{function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,c){for(var f,u="",l=0,h=-1,d=0,g=0;g<=a.length;++g){if(g<a.length)f=a.charCodeAt(g);else{if(f===47)break;f=47}if(f===47){if(!(h===g-1||d===1))if(h!==g-1&&d===2){if(u.length<2||l!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var m=u.lastIndexOf("/");if(m!==u.length-1){m===-1?(u="",l=0):l=(u=u.slice(0,m)).length-1-u.lastIndexOf("/"),h=g,d=0;continue}}else if(u.length===2||u.length===1){u="",l=0,h=g,d=0;continue}}c&&(u.length>0?u+="/..":u="..",l=2)}else u.length>0?u+="/"+a.slice(h+1,g):u=a.slice(h+1,g),l=g-h-1;h=g,d=0}else f===46&&d!==-1?++d:d=-1}return u}var s={resolve:function(){for(var a,c="",f=!1,u=arguments.length-1;u>=-1&&!f;u--){var l;u>=0?l=arguments[u]:(a===void 0&&(a=process.cwd()),l=a),r(l),l.length!==0&&(c=l+"/"+c,f=l.charCodeAt(0)===47)}return c=o(c,!f),f?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(a){if(r(a),a.length===0)return".";var c=a.charCodeAt(0)===47,f=a.charCodeAt(a.length-1)===47;return(a=o(a,!c)).length!==0||c||(a="."),a.length>0&&f&&(a+="/"),c?"/"+a:a},isAbsolute:function(a){return r(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,c=0;c<arguments.length;++c){var f=arguments[c];r(f),f.length>0&&(a===void 0?a=f:a+="/"+f)}return a===void 0?".":s.normalize(a)},relative:function(a,c){if(r(a),r(c),a===c||(a=s.resolve(a))===(c=s.resolve(c)))return"";for(var f=1;f<a.length&&a.charCodeAt(f)===47;++f);for(var u=a.length,l=u-f,h=1;h<c.length&&c.charCodeAt(h)===47;++h);for(var d=c.length-h,g=l<d?l:d,m=-1,p=0;p<=g;++p){if(p===g){if(d>g){if(c.charCodeAt(h+p)===47)return c.slice(h+p+1);if(p===0)return c.slice(h+p)}else l>g&&(a.charCodeAt(f+p)===47?m=p:p===0&&(m=0));break}var x=a.charCodeAt(f+p);if(x!==c.charCodeAt(h+p))break;x===47&&(m=p)}var y="";for(p=f+m+1;p<=u;++p)p!==u&&a.charCodeAt(p)!==47||(y.length===0?y+="..":y+="/..");return y.length>0?y+c.slice(h+m):(h+=m,c.charCodeAt(h)===47&&++h,c.slice(h))},_makeLong:function(a){return a},dirname:function(a){if(r(a),a.length===0)return".";for(var c=a.charCodeAt(0),f=c===47,u=-1,l=!0,h=a.length-1;h>=1;--h)if((c=a.charCodeAt(h))===47){if(!l){u=h;break}}else l=!1;return u===-1?f?"/":".":f&&u===1?"//":a.slice(0,u)},basename:function(a,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');r(a);var f,u=0,l=-1,h=!0;if(c!==void 0&&c.length>0&&c.length<=a.length){if(c.length===a.length&&c===a)return"";var d=c.length-1,g=-1;for(f=a.length-1;f>=0;--f){var m=a.charCodeAt(f);if(m===47){if(!h){u=f+1;break}}else g===-1&&(h=!1,g=f+1),d>=0&&(m===c.charCodeAt(d)?--d==-1&&(l=f):(d=-1,l=g))}return u===l?l=g:l===-1&&(l=a.length),a.slice(u,l)}for(f=a.length-1;f>=0;--f)if(a.charCodeAt(f)===47){if(!h){u=f+1;break}}else l===-1&&(h=!1,l=f+1);return l===-1?"":a.slice(u,l)},extname:function(a){r(a);for(var c=-1,f=0,u=-1,l=!0,h=0,d=a.length-1;d>=0;--d){var g=a.charCodeAt(d);if(g!==47)u===-1&&(l=!1,u=d+1),g===46?c===-1?c=d:h!==1&&(h=1):c!==-1&&(h=-1);else if(!l){f=d+1;break}}return c===-1||u===-1||h===0||h===1&&c===u-1&&c===f+1?"":a.slice(c,u)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(c,f){var u=f.dir||f.root,l=f.base||(f.name||"")+(f.ext||"");return u?u===f.root?u+l:u+"/"+l:l}(0,a)},parse:function(a){r(a);var c={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return c;var f,u=a.charCodeAt(0),l=u===47;l?(c.root="/",f=1):f=0;for(var h=-1,d=0,g=-1,m=!0,p=a.length-1,x=0;p>=f;--p)if((u=a.charCodeAt(p))!==47)g===-1&&(m=!1,g=p+1),u===46?h===-1?h=p:x!==1&&(x=1):h!==-1&&(x=-1);else if(!m){d=p+1;break}return h===-1||g===-1||x===0||x===1&&h===g-1&&h===d+1?g!==-1&&(c.base=c.name=d===0&&l?a.slice(1,g):a.slice(d,g)):(d===0&&l?(c.name=a.slice(1,h),c.base=a.slice(1,g)):(c.name=a.slice(d,h),c.base=a.slice(d,g)),c.ext=a.slice(h,g)),d>0?c.dir=a.slice(0,d-1):l&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,t.exports=s},447:(t,r,o)=>{var s;if(o.r(r),o.d(r,{URI:()=>y,Utils:()=>V}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;s=a.indexOf("Windows")>=0}var c,f,u=(c=function(C,k){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,I){w.__proto__=I}||function(w,I){for(var R in I)Object.prototype.hasOwnProperty.call(I,R)&&(w[R]=I[R])})(C,k)},function(C,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function w(){this.constructor=C}c(C,k),C.prototype=k===null?Object.create(k):(w.prototype=k.prototype,new w)}),l=/^\w[\w\d+.-]*$/,h=/^\//,d=/^\/\//;function g(C,k){if(!C.scheme&&k)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(C.authority,'", path: "').concat(C.path,'", query: "').concat(C.query,'", fragment: "').concat(C.fragment,'"}'));if(C.scheme&&!l.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!h.test(C.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(d.test(C.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var m="",p="/",x=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,y=function(){function C(k,w,I,R,$,U){U===void 0&&(U=!1),typeof k=="object"?(this.scheme=k.scheme||m,this.authority=k.authority||m,this.path=k.path||m,this.query=k.query||m,this.fragment=k.fragment||m):(this.scheme=function(se,X){return se||X?se:"file"}(k,U),this.authority=w||m,this.path=function(se,X){switch(se){case"https":case"http":case"file":X?X[0]!==p&&(X=p+X):X=p}return X}(this.scheme,I||m),this.query=R||m,this.fragment=$||m,g(this,U))}return C.isUri=function(k){return k instanceof C||!!k&&typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="string"&&typeof k.with=="function"&&typeof k.toString=="function"},Object.defineProperty(C.prototype,"fsPath",{get:function(){return E(this,!1)},enumerable:!1,configurable:!0}),C.prototype.with=function(k){if(!k)return this;var w=k.scheme,I=k.authority,R=k.path,$=k.query,U=k.fragment;return w===void 0?w=this.scheme:w===null&&(w=m),I===void 0?I=this.authority:I===null&&(I=m),R===void 0?R=this.path:R===null&&(R=m),$===void 0?$=this.query:$===null&&($=m),U===void 0?U=this.fragment:U===null&&(U=m),w===this.scheme&&I===this.authority&&R===this.path&&$===this.query&&U===this.fragment?this:new T(w,I,R,$,U)},C.parse=function(k,w){w===void 0&&(w=!1);var I=x.exec(k);return I?new T(I[2]||m,N(I[4]||m),N(I[5]||m),N(I[7]||m),N(I[9]||m),w):new T(m,m,m,m,m)},C.file=function(k){var w=m;if(s&&(k=k.replace(/\\/g,p)),k[0]===p&&k[1]===p){var I=k.indexOf(p,2);I===-1?(w=k.substring(2),k=p):(w=k.substring(2,I),k=k.substring(I)||p)}return new T("file",w,k,m,m)},C.from=function(k){var w=new T(k.scheme,k.authority,k.path,k.query,k.fragment);return g(w,!0),w},C.prototype.toString=function(k){return k===void 0&&(k=!1),S(this,k)},C.prototype.toJSON=function(){return this},C.revive=function(k){if(k){if(k instanceof C)return k;var w=new T(k);return w._formatted=k.external,w._fsPath=k._sep===v?k.fsPath:null,w}return k},C}(),v=s?1:void 0,T=function(C){function k(){var w=C!==null&&C.apply(this,arguments)||this;return w._formatted=null,w._fsPath=null,w}return u(k,C),Object.defineProperty(k.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=E(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),k.prototype.toString=function(w){return w===void 0&&(w=!1),w?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)},k.prototype.toJSON=function(){var w={$mid:1};return this._fsPath&&(w.fsPath=this._fsPath,w._sep=v),this._formatted&&(w.external=this._formatted),this.path&&(w.path=this.path),this.scheme&&(w.scheme=this.scheme),this.authority&&(w.authority=this.authority),this.query&&(w.query=this.query),this.fragment&&(w.fragment=this.fragment),w},k}(y),j=((f={})[58]="%3A",f[47]="%2F",f[63]="%3F",f[35]="%23",f[91]="%5B",f[93]="%5D",f[64]="%40",f[33]="%21",f[36]="%24",f[38]="%26",f[39]="%27",f[40]="%28",f[41]="%29",f[42]="%2A",f[43]="%2B",f[44]="%2C",f[59]="%3B",f[61]="%3D",f[32]="%20",f);function M(C,k){for(var w=void 0,I=-1,R=0;R<C.length;R++){var $=C.charCodeAt(R);if($>=97&&$<=122||$>=65&&$<=90||$>=48&&$<=57||$===45||$===46||$===95||$===126||k&&$===47)I!==-1&&(w+=encodeURIComponent(C.substring(I,R)),I=-1),w!==void 0&&(w+=C.charAt(R));else{w===void 0&&(w=C.substr(0,R));var U=j[$];U!==void 0?(I!==-1&&(w+=encodeURIComponent(C.substring(I,R)),I=-1),w+=U):I===-1&&(I=R)}}return I!==-1&&(w+=encodeURIComponent(C.substring(I))),w!==void 0?w:C}function A(C){for(var k=void 0,w=0;w<C.length;w++){var I=C.charCodeAt(w);I===35||I===63?(k===void 0&&(k=C.substr(0,w)),k+=j[I]):k!==void 0&&(k+=C[w])}return k!==void 0?k:C}function E(C,k){var w;return w=C.authority&&C.path.length>1&&C.scheme==="file"?"//".concat(C.authority).concat(C.path):C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?k?C.path.substr(1):C.path[1].toLowerCase()+C.path.substr(2):C.path,s&&(w=w.replace(/\//g,"\\")),w}function S(C,k){var w=k?A:M,I="",R=C.scheme,$=C.authority,U=C.path,se=C.query,X=C.fragment;if(R&&(I+=R,I+=":"),($||R==="file")&&(I+=p,I+=p),$){var te=$.indexOf("@");if(te!==-1){var Se=$.substr(0,te);$=$.substr(te+1),(te=Se.indexOf(":"))===-1?I+=w(Se,!1):(I+=w(Se.substr(0,te),!1),I+=":",I+=w(Se.substr(te+1),!1)),I+="@"}(te=($=$.toLowerCase()).indexOf(":"))===-1?I+=w($,!1):(I+=w($.substr(0,te),!1),I+=$.substr(te))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58)(ce=U.charCodeAt(1))>=65&&ce<=90&&(U="/".concat(String.fromCharCode(ce+32),":").concat(U.substr(3)));else if(U.length>=2&&U.charCodeAt(1)===58){var ce;(ce=U.charCodeAt(0))>=65&&ce<=90&&(U="".concat(String.fromCharCode(ce+32),":").concat(U.substr(2)))}I+=w(U,!0)}return se&&(I+="?",I+=w(se,!1)),X&&(I+="#",I+=k?X:M(X,!1)),I}function O(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+O(C.substr(3)):C}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(C){return C.match(_)?C.replace(_,function(k){return O(k)}):C}var V,L=o(470),H=function(C,k,w){if(w||arguments.length===2)for(var I,R=0,$=k.length;R<$;R++)!I&&R in k||(I||(I=Array.prototype.slice.call(k,0,R)),I[R]=k[R]);return C.concat(I||Array.prototype.slice.call(k))},q=L.posix||L;(function(C){C.joinPath=function(k){for(var w=[],I=1;I<arguments.length;I++)w[I-1]=arguments[I];return k.with({path:q.join.apply(q,H([k.path],w,!1))})},C.resolvePath=function(k){for(var w=[],I=1;I<arguments.length;I++)w[I-1]=arguments[I];var R=k.path||"/";return k.with({path:q.resolve.apply(q,H([R],w,!1))})},C.dirname=function(k){var w=q.dirname(k.path);return w.length===1&&w.charCodeAt(0)===46?k:k.with({path:w})},C.basename=function(k){return q.basename(k.path)},C.extname=function(k){return q.extname(k.path)}})(V||(V={}))}},n={};function i(t){if(n[t])return n[t].exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}return i.d=(t,r)=>{for(var o in r)i.o(r,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},i.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),i.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(447)})();var{URI:Ae,Utils:Lr}=hn;function mr(e,n){if(typeof e!="string")throw new TypeError("Expected a string");for(var i=String(e),t="",r=n?!!n.extended:!1,o=n?!!n.globstar:!1,s=!1,a=n&&typeof n.flags=="string"?n.flags:"",c,f=0,u=i.length;f<u;f++)switch(c=i[f],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":t+="\\"+c;break;case"?":if(r){t+=".";break}case"[":case"]":if(r){t+=c;break}case"{":if(r){s=!0,t+="(";break}case"}":if(r){s=!1,t+=")";break}case",":if(s){t+="|";break}t+="\\"+c;break;case"*":for(var l=i[f-1],h=1;i[f+1]==="*";)h++,f++;var d=i[f+1];if(!o)t+=".*";else{var g=h>1&&(l==="/"||l===void 0||l==="{"||l===",")&&(d==="/"||d===void 0||d===","||d==="}");g?(d==="/"?f++:l==="/"&&t.endsWith("\\/")&&(t=t.substr(0,t.length-2)),t+="((?:[^/]*(?:/|$))*)"):t+="([^/]*)"}break;default:t+=c}return(!a||!~a.indexOf("g"))&&(t="^"+t+"$"),new RegExp(t,a)}var ae=Pe(),gr="!",vr="/",yr=function(){function e(n,i){this.globWrappers=[];try{for(var t=0,r=n;t<r.length;t++){var o=r[t],s=o[0]!==gr;s||(o=o.substring(1)),o.length>0&&(o[0]===vr&&(o=o.substring(1)),this.globWrappers.push({regexp:mr("**/"+o,{extended:!0,globstar:!0}),include:s}))}this.uris=i}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(n){for(var i=!1,t=0,r=this.globWrappers;t<r.length;t++){var o=r[t],s=o.regexp,a=o.include;s.test(n)&&(i=a)}return i},e.prototype.getURIs=function(){return this.uris},e}(),br=function(){function e(n,i,t){this.service=n,this.uri=i,this.dependencies=new Set,this.anchors=void 0,t&&(this.unresolvedSchema=this.service.promise.resolve(new _e(t)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var n=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return n.service.resolveSchemaContent(i,n)})),this.resolvedSchema},e.prototype.clearSchema=function(){var n=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,n},e}(),_e=function(){function e(n,i){i===void 0&&(i=[]),this.schema=n,this.errors=i}return e}(),pn=function(){function e(n,i){i===void 0&&(i=[]),this.schema=n,this.errors=i}return e.prototype.getSection=function(n){var i=this.getSectionRecursive(n,this.schema);if(i)return G(i)},e.prototype.getSectionRecursive=function(n,i){if(!i||typeof i=="boolean"||n.length===0)return i;var t=n.shift();if(i.properties&&typeof i.properties[t])return this.getSectionRecursive(n,i.properties[t]);if(i.patternProperties)for(var r=0,o=Object.keys(i.patternProperties);r<o.length;r++){var s=o[r],a=Re(s);if(a?.test(t))return this.getSectionRecursive(n,i.patternProperties[s])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(n,i.additionalProperties);if(t.match("[0-9]+")){if(Array.isArray(i.items)){var c=parseInt(t,10);if(!isNaN(c)&&i.items[c])return this.getSectionRecursive(n,i.items[c])}else if(i.items)return this.getSectionRecursive(n,i.items)}}},e}(),xr=function(){function e(n,i,t){this.contextService=i,this.requestService=n,this.promiseConstructor=t||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(n){return Object.keys(this.registeredSchemasIds).filter(function(i){var t=Ae.parse(i).scheme;return t!=="schemaservice"&&(!n||n(t))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(n){var i=this;this.cachedSchemaForResource=void 0;var t=!1;n=de(n);for(var r=[n],o=Object.keys(this.schemasById).map(function(f){return i.schemasById[f]});r.length;)for(var s=r.pop(),a=0;a<o.length;a++){var c=o[a];c&&(c.uri===s||c.dependencies.has(s))&&(c.uri!==s&&r.push(c.uri),c.clearSchema()&&(t=!0),o[a]=void 0)}return t},e.prototype.setSchemaContributions=function(n){if(n.schemas){var i=n.schemas;for(var t in i){var r=de(t);this.contributionSchemas[r]=this.addSchemaHandle(r,i[t])}}if(Array.isArray(n.schemaAssociations))for(var o=n.schemaAssociations,s=0,a=o;s<a.length;s++){var c=a[s],f=c.uris.map(de),u=this.addFilePatternAssociation(c.pattern,f);this.contributionAssociations.push(u)}},e.prototype.addSchemaHandle=function(n,i){var t=new br(this,n,i);return this.schemasById[n]=t,t},e.prototype.getOrAddSchemaHandle=function(n,i){return this.schemasById[n]||this.addSchemaHandle(n,i)},e.prototype.addFilePatternAssociation=function(n,i){var t=new yr(n,i);return this.filePatternAssociations.push(t),t},e.prototype.registerExternalSchema=function(n,i,t){var r=de(n);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,i&&this.addFilePatternAssociation(i,[r]),t?this.addSchemaHandle(r,t):this.getOrAddSchemaHandle(r)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var n in this.contributionSchemas)this.schemasById[n]=this.contributionSchemas[n],this.registeredSchemasIds[n]=!0;for(var i=0,t=this.contributionAssociations;i<t.length;i++){var r=t[i];this.filePatternAssociations.push(r)}},e.prototype.getResolvedSchema=function(n){var i=de(n),t=this.schemasById[i];return t?t.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(n){if(!this.requestService){var i=ae("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",He(n));return this.promise.resolve(new _e({},[i]))}return this.requestService(n).then(function(t){if(!t){var r=ae("json.schema.nocontent","Unable to load schema from '{0}': No content.",He(n));return new _e({},[r])}var o={},s=[];o=Vn(t,s);var a=s.length?[ae("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",He(n),s[0].offset)]:[];return new _e(o,a)},function(t){var r=t.toString(),o=t.toString().split("Error: ");return o.length>1&&(r=o[1]),Te(r,".")&&(r=r.substr(0,r.length-1)),new _e({},[ae("json.schema.nocontent","Unable to load schema from '{0}': {1}.",He(n),r)])})},e.prototype.resolveSchemaContent=function(n,i){var t=this,r=n.errors.slice(0),o=n.schema;if(o.$schema){var s=de(o.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new pn({},[ae("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));s==="https://json-schema.org/draft/2019-09/schema"?r.push(ae("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported.")):s==="https://json-schema.org/draft/2020-12/schema"&&r.push(ae("json.schema.draft202012.notsupported","Draft 2020-12 schemas are not yet fully supported."))}var a=this.contextService,c=function(m,p){p=decodeURIComponent(p);var x=m;return p[0]==="/"&&(p=p.substring(1)),p.split("/").some(function(y){return y=y.replace(/~1/g,"/").replace(/~0/g,"~"),x=x[y],!x}),x},f=function(m,p,x){return p.anchors||(p.anchors=g(m)),p.anchors.get(x)},u=function(m,p){for(var x in p)p.hasOwnProperty(x)&&!m.hasOwnProperty(x)&&x!=="id"&&x!=="$id"&&(m[x]=p[x])},l=function(m,p,x,y){var v;y===void 0||y.length===0?v=p:y.charAt(0)==="/"?v=c(p,y):v=f(p,x,y),v?u(m,v):r.push(ae("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",y,x.uri))},h=function(m,p,x,y){a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(p)&&(p=a.resolveRelativePath(p,y.uri)),p=de(p);var v=t.getOrAddSchemaHandle(p);return v.getUnresolvedSchema().then(function(T){if(y.dependencies.add(p),T.errors.length){var j=x?p+"#"+x:p;r.push(ae("json.schema.problemloadingref","Problems loading reference '{0}': {1}",j,T.errors[0]))}return l(m,T.schema,v,x),d(m,T.schema,v)})},d=function(m,p,x){var y=[];return t.traverseNodes(m,function(v){for(var T=new Set;v.$ref;){var j=v.$ref,M=j.split("#",2);if(delete v.$ref,M[0].length>0){y.push(h(v,M[0],M[1],x));return}else if(!T.has(j)){var A=M[1];l(v,p,x,A),T.add(j)}}}),t.promise.all(y)},g=function(m){var p=new Map;return t.traverseNodes(m,function(x){var y=x.$id||x.id;if(typeof y=="string"&&y.charAt(0)==="#"){var v=y.substring(1);p.has(v)?r.push(ae("json.schema.duplicateid","Duplicate id declaration: '{0}'",y)):p.set(v,x)}}),p};return d(o,o,i).then(function(m){return new pn(o,r)})},e.prototype.traverseNodes=function(n,i){if(!n||typeof n!="object")return Promise.resolve(null);for(var t=new Set,r=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];for(var l=0,h=f;l<h.length;l++){var d=h[l];typeof d=="object"&&a.push(d)}},o=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];for(var l=0,h=f;l<h.length;l++){var d=h[l];if(typeof d=="object")for(var g in d){var m=g,p=d[m];typeof p=="object"&&a.push(p)}}},s=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];for(var l=0,h=f;l<h.length;l++){var d=h[l];if(Array.isArray(d))for(var g=0,m=d;g<m.length;g++){var p=m[g];typeof p=="object"&&a.push(p)}}},a=[n],c=a.pop();c;)t.has(c)||(t.add(c),i(c),r(c.items,c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else),o(c.definitions,c.properties,c.patternProperties,c.dependencies),s(c.anyOf,c.allOf,c.oneOf,c.items)),c=a.pop()},e.prototype.getSchemaFromProperty=function(n,i){var t,r;if(((t=i.root)===null||t===void 0?void 0:t.type)==="object")for(var o=0,s=i.root.properties;o<s.length;o++){var a=s[o];if(a.keyNode.value==="$schema"&&((r=a.valueNode)===null||r===void 0?void 0:r.type)==="string"){var c=a.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(c)&&(c=this.contextService.resolveRelativePath(c,n)),c}}},e.prototype.getAssociatedSchemas=function(n){for(var i=Object.create(null),t=[],r=Ar(n),o=0,s=this.filePatternAssociations;o<s.length;o++){var a=s[o];if(a.matchesPattern(r))for(var c=0,f=a.getURIs();c<f.length;c++){var u=f[c];i[u]||(t.push(u),i[u]=!0)}}return t},e.prototype.getSchemaURIsForResource=function(n,i){var t=i&&this.getSchemaFromProperty(n,i);return t?[t]:this.getAssociatedSchemas(n)},e.prototype.getSchemaForResource=function(n,i){if(i){var t=this.getSchemaFromProperty(n,i);if(t){var r=de(t);return this.getOrAddSchemaHandle(r).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===n)return this.cachedSchemaForResource.resolvedSchema;var o=this.getAssociatedSchemas(n),s=o.length>0?this.createCombinedSchema(n,o).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:n,resolvedSchema:s},s},e.prototype.createCombinedSchema=function(n,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var t="schemaservice://combinedSchema/"+encodeURIComponent(n),r={allOf:i.map(function(o){return{$ref:o}})};return this.addSchemaHandle(t,r)},e.prototype.getMatchingSchemas=function(n,i,t){if(t){var r=t.id||"schemaservice://untitled/matchingSchemas/"+kr++,o=this.addSchemaHandle(r,t);return o.getResolvedSchema().then(function(s){return i.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(n.uri,i).then(function(s){return s?i.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),kr=0;function de(e){try{return Ae.parse(e).toString(!0)}catch{return e}}function Ar(e){try{return Ae.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function He(e){try{var n=Ae.parse(e);if(n.scheme==="file")return n.fsPath}catch{}return e}function Sr(e,n){var i=[],t=[],r=[],o=-1,s=be(e.getText(),!1),a=s.scan();function c(O){i.push(O),t.push(r.length)}for(;a!==17;){switch(a){case 1:case 3:{var f=e.positionAt(s.getTokenOffset()).line,u={startLine:f,endLine:f,kind:a===1?"object":"array"};r.push(u);break}case 2:case 4:{var l=a===2?"object":"array";if(r.length>0&&r[r.length-1].kind===l){var u=r.pop(),h=e.positionAt(s.getTokenOffset()).line;u&&h>u.startLine+1&&o!==u.startLine&&(u.endLine=h-1,c(u),o=u.startLine)}break}case 13:{var f=e.positionAt(s.getTokenOffset()).line,d=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&f+1<e.lineCount?s.setPosition(e.offsetAt(ne.create(f+1,0))):f<d&&(c({startLine:f,endLine:d,kind:Ee.Comment}),o=f);break}case 12:{var g=e.getText().substr(s.getTokenOffset(),s.getTokenLength()),m=g.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(m){var h=e.positionAt(s.getTokenOffset()).line;if(m[1]){var u={startLine:h,endLine:h,kind:Ee.Region};r.push(u)}else{for(var p=r.length-1;p>=0&&r[p].kind!==Ee.Region;)p--;if(p>=0){var u=r[p];r.length=p,h>u.startLine&&o!==u.startLine&&(u.endLine=h,c(u),o=u.startLine)}}}break}}a=s.scan()}var x=n&&n.rangeLimit;if(typeof x!="number"||i.length<=x)return i;n&&n.onRangeLimitExceeded&&n.onRangeLimitExceeded(e.uri);for(var y=[],v=0,T=t;v<T.length;v++){var j=T[v];j<30&&(y[j]=(y[j]||0)+1)}for(var M=0,A=0,p=0;p<y.length;p++){var E=y[p];if(E){if(E+M>x){A=p;break}M+=E}}for(var S=[],p=0;p<i.length;p++){var j=t[p];typeof j=="number"&&(j<A||j===A&&M++<x)&&S.push(i[p])}return S}function Cr(e,n,i){function t(a){for(var c=e.offsetAt(a),f=i.getNodeFromOffset(c,!0),u=[];f;){switch(f.type){case"string":case"object":case"array":var l=f.offset+1,h=f.offset+f.length-1;l<h&&c>=l&&c<=h&&u.push(r(l,h)),u.push(r(f.offset,f.offset+f.length));break;case"number":case"boolean":case"null":case"property":u.push(r(f.offset,f.offset+f.length));break}if(f.type==="property"||f.parent&&f.parent.type==="array"){var d=s(f.offset+f.length,5);d!==-1&&u.push(r(f.offset,d))}f=f.parent}for(var g=void 0,m=u.length-1;m>=0;m--)g=We.create(u[m],g);return g||(g=We.create(W.create(a,a))),g}function r(a,c){return W.create(e.positionAt(a),e.positionAt(c))}var o=be(e.getText(),!0);function s(a,c){o.setPosition(a);var f=o.scan();return f===c?o.getTokenOffset()+o.getTokenLength():-1}return n.map(t)}function wr(e,n){var i=[];return n.visit(function(t){var r;if(t.type==="property"&&t.keyNode.value==="$ref"&&((r=t.valueNode)===null||r===void 0?void 0:r.type)==="string"){var o=t.valueNode.value,s=Or(n,o);if(s){var a=e.positionAt(s.offset);i.push({target:"".concat(e.uri,"#").concat(a.line+1,",").concat(a.character+1),range:Tr(e,t.valueNode)})}}return!0}),Promise.resolve(i)}function Tr(e,n){return W.create(e.positionAt(n.offset+1),e.positionAt(n.offset+n.length-1))}function Or(e,n){var i=Er(n);return i?mt(i,e.root):null}function mt(e,n){if(!n)return null;if(e.length===0)return n;var i=e.shift();if(n&&n.type==="object"){var t=n.properties.find(function(s){return s.keyNode.value===i});return t?mt(e,t.valueNode):null}else if(n&&n.type==="array"&&i.match(/^(0|[1-9][0-9]*)$/)){var r=Number.parseInt(i),o=n.items[r];return o?mt(e,o):null}return null}function Er(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Ir)}function Ir(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function jr(e){var n=e.promiseConstructor||Promise,i=new xr(e.schemaRequestService,e.workspaceContext,n);i.setSchemaContributions(pt);var t=new rr(i,e.contributions,n,e.clientCapabilities),r=new ir(i,e.contributions,n),o=new pr(i),s=new sr(i,n);return{configure:function(a){i.clearExternalSchemas(),a.schemas&&a.schemas.forEach(function(c){i.registerExternalSchema(c.uri,c.fileMatch,c.schema)}),s.configure(a)},resetSchema:function(a){return i.onResourceChange(a)},doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:function(a){return er(a,{collectComments:!0})},newJSONDocument:function(a,c){return Yn(a,c)},getMatchingSchemas:i.getMatchingSchemas.bind(i),doResolve:t.doResolve.bind(t),doComplete:t.doComplete.bind(t),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:r.doHover.bind(r),getFoldingRanges:Sr,getSelectionRanges:Cr,findDefinition:function(){return Promise.resolve([])},findLinks:wr,format:function(a,c,f){var u=void 0;if(c){var l=a.offsetAt(c.start),h=a.offsetAt(c.end)-l;u={offset:l,length:h}}var d={tabSize:f?f.tabSize:4,insertSpaces:f?.insertSpaces===!0,insertFinalNewline:f?.insertFinalNewline===!0,eol:` `};return Ln(a.getText(),u,d).map(function(g){return re.replace(W.create(a.positionAt(g.offset),a.positionAt(g.offset+g.length)),g.content)})}}}var dn;typeof fetch<"u"&&(dn=function(e){return fetch(e).then(n=>n.text())});var mn=class{_ctx;_languageService;_languageSettings;_languageId;constructor(e,n){this._ctx=e,this._languageSettings=n.languageSettings,this._languageId=n.languageId,this._languageService=jr({workspaceContext:{resolveRelativePath:(i,t)=>{let r=t.substr(0,t.lastIndexOf("/")+1);return Pr(r,i)}},schemaRequestService:n.enableSchemaRequest?dn:void 0}),this._languageService.configure(this._languageSettings)}async doValidation(e){let n=this._getTextDocument(e);if(n){let i=this._languageService.parseJSONDocument(n);return this._languageService.doValidation(n,i,this._languageSettings)}return Promise.resolve([])}async doComplete(e,n){let i=this._getTextDocument(e);if(!i)return null;let t=this._languageService.parseJSONDocument(i);return this._languageService.doComplete(i,n,t)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,n){let i=this._getTextDocument(e);if(!i)return null;let t=this._languageService.parseJSONDocument(i);return this._languageService.doHover(i,n,t)}async format(e,n,i){let t=this._getTextDocument(e);if(!t)return[];let r=this._languageService.format(t,n,i);return Promise.resolve(r)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.parseJSONDocument(n),t=this._languageService.findDocumentSymbols(n,i);return Promise.resolve(t)}async findDocumentColors(e){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.parseJSONDocument(n),t=this._languageService.findDocumentColors(n,i);return Promise.resolve(t)}async getColorPresentations(e,n,i){let t=this._getTextDocument(e);if(!t)return[];let r=this._languageService.parseJSONDocument(t),o=this._languageService.getColorPresentations(t,r,n,i);return Promise.resolve(o)}async getFoldingRanges(e,n){let i=this._getTextDocument(e);if(!i)return[];let t=this._languageService.getFoldingRanges(i,n);return Promise.resolve(t)}async getSelectionRanges(e,n){let i=this._getTextDocument(e);if(!i)return[];let t=this._languageService.parseJSONDocument(i),r=this._languageService.getSelectionRanges(i,n,t);return Promise.resolve(r)}_getTextDocument(e){let n=this._ctx.getMirrorModels();for(let i of n)if(i.uri.toString()===e)return ot.create(e,this._languageId,i.version,i.getValue());return null}},Mr="/".charCodeAt(0),gt=".".charCodeAt(0);function Nr(e){return e.charCodeAt(0)===Mr}function Pr(e,n){if(Nr(n)){let i=Ae.parse(e),t=n.split("/");return i.with({path:gn(t)}).toString()}return _r(e,n)}function gn(e){let n=[];for(let t of e)t.length===0||t.length===1&&t.charCodeAt(0)===gt||(t.length===2&&t.charCodeAt(0)===gt&&t.charCodeAt(1)===gt?n.pop():n.push(t));e.length>1&&e[e.length-1].length===0&&n.push("");let i=n.join("/");return e[0].length===0&&(i="/"+i),i}function _r(e,...n){let i=Ae.parse(e),t=i.path.split("/");for(let r of n)t.push(...r.split("/"));return i.with({path:gn(t)}).toString()}function Vr(e,n){return new mn(e,n)}return En(xt)})();return An}); //# sourceMappingURL=jsonWorker.js.map