@camunda/play 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{json.worker-i_PJ2S3l.js → json.worker-CPVxyQ8I.js} +3 -3
- package/build/index.js +25377 -25190
- package/build/jsonMode.js +2 -2
- package/package.json +23 -23
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
|
|
15
15
|
* Released under the MIT license
|
|
16
16
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
17
|
-
*-----------------------------------------------------------------------------*/function lr(e,t=!1){const n=e.length;let r=0,i="",s=0,a=16,l=0,o=0,u=0,h=0,c=0;function d(x,_){let b=0,L=0;for(;b<x
|
|
18
|
-
`;break;case 114:x+="\r";break;case 116:x+=" ";break;case 117:const A=d(4
|
|
17
|
+
*-----------------------------------------------------------------------------*/function lr(e,t=!1){const n=e.length;let r=0,i="",s=0,a=16,l=0,o=0,u=0,h=0,c=0;function d(x,_){let b=0,L=0;for(;b<x;){let A=e.charCodeAt(r);if(A>=48&&A<=57)L=L*16+A-48;else if(A>=65&&A<=70)L=L*16+A-65+10;else if(A>=97&&A<=102)L=L*16+A-97+10;else break;r++,b++}return b<x&&(L=-1),L}function m(x){r=x,i="",s=0,a=16,c=0}function g(){let x=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&pt(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&pt(e.charCodeAt(r)))for(r++;r<e.length&&pt(e.charCodeAt(r));)r++;else return c=3,e.substring(x,r);let _=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&pt(e.charCodeAt(r))){for(r++;r<e.length&&pt(e.charCodeAt(r));)r++;_=r}else c=3;return e.substring(x,_)}function p(){let x="",_=r;for(;;){if(r>=n){x+=e.substring(_,r),c=2;break}const b=e.charCodeAt(r);if(b===34){x+=e.substring(_,r),r++;break}if(b===92){if(x+=e.substring(_,r),r++,r>=n){c=2;break}switch(e.charCodeAt(r++)){case 34:x+='"';break;case 92:x+="\\";break;case 47:x+="/";break;case 98:x+="\b";break;case 102:x+="\f";break;case 110:x+=`
|
|
18
|
+
`;break;case 114:x+="\r";break;case 116:x+=" ";break;case 117:const A=d(4);A>=0?x+=String.fromCharCode(A):c=4;break;default:c=5}_=r;continue}if(b>=0&&b<=31)if(Ft(b)){x+=e.substring(_,r),c=2;break}else c=6;r++}return x}function v(){if(i="",c=0,s=r,o=l,h=u,r>=n)return s=n,a=17;let x=e.charCodeAt(r);if(ur(x)){do r++,i+=String.fromCharCode(x),x=e.charCodeAt(r);while(ur(x));return a=15}if(Ft(x))return r++,i+=String.fromCharCode(x),x===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
19
19
|
`),l++,u=r,a=14;switch(x){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=p(),a=10;case 47:const _=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!Ft(e.charCodeAt(r));)r++;return i=e.substring(_,r),a=12}if(e.charCodeAt(r+1)===42){r+=2;const b=n-1;let L=!1;for(;r<b;){const A=e.charCodeAt(r);if(A===42&&e.charCodeAt(r+1)===47){r+=2,L=!0;break}r++,Ft(A)&&(A===13&&e.charCodeAt(r)===10&&r++,l++,u=r)}return L||(r++,c=1),i=e.substring(_,r),a=13}return i+=String.fromCharCode(x),r++,a=16;case 45:if(i+=String.fromCharCode(x),r++,r===n||!pt(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=g(),a=11;default:for(;r<n&&w(x);)r++,x=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(x),r++,a=16}}function w(x){if(ur(x)||Ft(x))return!1;switch(x){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function N(){let x;do x=v();while(x>=12&&x<=15);return x}return{setPosition:m,getPosition:()=>r,scan:t?N:v,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>o,getTokenStartCharacter:()=>s-h,getTokenError:()=>c}}function ur(e){return e===32||e===9}function Ft(e){return e===10||e===13}function pt(e){return e>=48&&e<=57}var Us;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Us||(Us={}));var _e=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),bt=200,qs={" ":{"\n":new Array(bt).fill(0).map((e,t)=>`
|
|
20
20
|
`+" ".repeat(t)),"\r":new Array(bt).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(bt).fill(0).map((e,t)=>`\r
|
|
21
21
|
`+" ".repeat(t))}," ":{"\n":new Array(bt).fill(0).map((e,t)=>`
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
|
|
46
46
|
`),p+=`\`${xc(g)}\`: ${m}`),l([p])}return null})}};function Rr(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
47
47
|
|
|
48
|
-
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function xc(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var yc=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:pe.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},a=o=>{const u=o.range.start.line+" "+o.range.start.character+" "+o.message;s[u]||(s[u]=!0,i.push(o))},l=o=>{let u=n?.trailingCommas?xn(n.trailingCommas):pe.Error,h=n?.comments?xn(n.comments):this.commentSeverity,c=n?.schemaValidation?xn(n.schemaValidation):pe.Warning,d=n?.schemaRequest?xn(n.schemaRequest):pe.Warning;if(o){const m=(g,p)=>{if(t.root&&d){const v=t.root,w=v.type==="object"?v.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){const N=w.valueNode||w,x=U.create(e.positionAt(N.offset),e.positionAt(N.offset+N.length));a(Oe.create(x,g,d,p))}else{const N=U.create(e.positionAt(v.offset),e.positionAt(v.offset+1));a(Oe.create(N,g,d,p))}}};if(o.errors.length)m(o.errors[0],H.SchemaResolveError);else if(c){for(const p of o.warnings)m(p,H.SchemaUnsupportedFeature);const g=t.validate(e,o.schema,c,n?.schemaDraft);g&&g.forEach(a)}Ka(o.schema)&&(h=void 0),eo(o.schema)&&(u=void 0)}for(const m of t.syntaxErrors){if(m.code===H.TrailingComma){if(typeof u!="number")continue;m.severity=u}a(m)}if(typeof h=="number"){const m=E("Comments are not permitted in JSON.");t.comments.forEach(g=>{a(Oe.create(g,m,h,H.CommentNotPermitted))})}return i};if(r){const o=r.id||"schemaservice://untitled/"+_c++;return this.jsonSchemaService.registerExternalSchema({uri:o,schema:r}).getResolvedSchema().then(h=>l(h))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(o=>l(o))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},_c=0;function Ka(e){if(e&&typeof e=="object"){if(Te(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const n=Ka(t);if(Te(n))return n}}}function eo(e){if(e&&typeof e=="object"){if(Te(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(Te(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const n of e.allOf){const r=eo(n);if(Te(r))return r}}}function xn(e){switch(e){case"error":return pe.Error;case"warning":return pe.Warning;case"ignore":return}}var to=48,wc=57,Lc=65,yn=97,Nc=102;function ee(e){return e<to?0:e<=wc?e-to:(e<yn&&(e+=yn-Lc),e>=yn&&e<=Nc?e-yn+10:0)}function Sc(e){if(e[0]==="#")switch(e.length){case 4:return{red:ee(e.charCodeAt(1))*17/255,green:ee(e.charCodeAt(2))*17/255,blue:ee(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ee(e.charCodeAt(1))*17/255,green:ee(e.charCodeAt(2))*17/255,blue:ee(e.charCodeAt(3))*17/255,alpha:ee(e.charCodeAt(4))*17/255};case 7:return{red:(ee(e.charCodeAt(1))*16+ee(e.charCodeAt(2)))/255,green:(ee(e.charCodeAt(3))*16+ee(e.charCodeAt(4)))/255,blue:(ee(e.charCodeAt(5))*16+ee(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ee(e.charCodeAt(1))*16+ee(e.charCodeAt(2)))/255,green:(ee(e.charCodeAt(3))*16+ee(e.charCodeAt(4)))/255,blue:(ee(e.charCodeAt(5))*16+ee(e.charCodeAt(6)))/255,alpha:(ee(e.charCodeAt(7))*16+ee(e.charCodeAt(8)))/255}}}var Ac=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if((s==="vscode://defaultsettings/keybindings.json"||Vt(s.toLowerCase(),"/user/keybindings.json"))&&r.type==="array"){const c=[];for(const d of r.items)if(d.type==="object"){for(const m of d.properties)if(m.keyNode.value==="key"&&m.valueNode){const g=yt.create(e.uri,Je(e,d));if(c.push({name:no(m.valueNode),kind:Ie.Function,location:g}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),c}}return c}const a=[{node:r,containerName:""}];let l=0,o=!1;const u=[],h=(c,d)=>{c.type==="array"?c.items.forEach(m=>{m&&a.push({node:m,containerName:d})}):c.type==="object"&&c.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=yt.create(e.uri,Je(e,m)),v=d?d+"."+m.keyNode.value:m.keyNode.value;u.push({name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),location:p,containerName:d}),a.push({node:g,containerName:v})}else o=!0})};for(;l<a.length;){const c=a[l++];h(c.node,c.containerName)}return o&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if((s==="vscode://defaultsettings/keybindings.json"||Vt(s.toLowerCase(),"/user/keybindings.json"))&&r.type==="array"){const c=[];for(const d of r.items)if(d.type==="object"){for(const m of d.properties)if(m.keyNode.value==="key"&&m.valueNode){const g=Je(e,d),p=Je(e,m.keyNode);if(c.push({name:no(m.valueNode),kind:Ie.Function,range:g,selectionRange:p}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),c}}return c}const a=[],l=[{node:r,result:a}];let o=0,u=!1;const h=(c,d)=>{c.type==="array"?c.items.forEach((m,g)=>{if(m)if(i>0){i--;const p=Je(e,m),v=p,N={name:String(g),kind:this.getSymbolKind(m.type),range:p,selectionRange:v,children:[]};d.push(N),l.push({result:N.children,node:m})}else u=!0}):c.type==="object"&&c.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=Je(e,m),v=Je(e,m.keyNode),w=[],N={name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),range:p,selectionRange:v,children:w,detail:this.getDetail(g)};d.push(N),l.push({result:w,node:g})}else u=!0})};for(;o<l.length;){const c=l[o++];h(c.node,c.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),a}getSymbolKind(e){switch(e){case"object":return Ie.Module;case"string":return Ie.String;case"number":return Ie.Number;case"array":return Ie.Array;case"boolean":return Ie.Boolean;default:return Ie.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{const i=[];if(r){let s=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE;const a=t.getMatchingSchemas(r.schema),l={};for(const o of a)if(!o.inverted&&o.schema&&(o.schema.format==="color"||o.schema.format==="color-hex")&&o.node&&o.node.type==="string"){const u=String(o.node.offset);if(!l[u]){const h=Sc(nt(o.node));if(h){const c=Je(e,o.node);i.push({color:h,range:c})}if(l[u]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){const i=[],s=Math.round(n.red*255),a=Math.round(n.green*255),l=Math.round(n.blue*255);function o(h){const c=h.toString(16);return c.length!==2?"0"+c:c}let u;return n.alpha===1?u=`#${o(s)}${o(a)}${o(l)}`:u=`#${o(s)}${o(a)}${o(l)}${o(Math.round(n.alpha*255))}`,i.push({label:u,textEdit:Pe.replace(r,JSON.stringify(u))}),i}};function Je(e,t){return U.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function no(e){return nt(e)||E("<empty>")}var Mr={schemaAssociations:[],schemas:{"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}}},kc={id:E("A unique identifier for the schema."),$schema:E("The schema to verify this document against."),title:E("A descriptive title of the element."),description:E("A long description of the element. Used in hover menus and suggestions."),default:E("A default value. Used by suggestions."),multipleOf:E("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:E("The maximum numerical value, inclusive by default."),exclusiveMaximum:E("Makes the maximum property exclusive."),minimum:E("The minimum numerical value, inclusive by default."),exclusiveMinimum:E("Makes the minimum property exclusive."),maxLength:E("The maximum length of a string."),minLength:E("The minimum length of a string."),pattern:E("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:E("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:E("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:E("The maximum number of items that can be inside an array. Inclusive."),minItems:E("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:E("If all of the items in the array must be unique. Defaults to false."),maxProperties:E("The maximum number of properties an object can have. Inclusive."),minProperties:E("The minimum number of properties an object can have. Inclusive."),required:E("An array of strings that lists the names of all properties required on this object."),additionalProperties:E("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:E("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:E("A map of property names to schemas for each property."),patternProperties:E("A map of regular expressions on property names to schemas for matching properties."),dependencies:E("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:E("The set of literal values that are valid."),type:E("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:E("Describes the format expected for the value."),allOf:E("An array of schemas, all of which must match."),anyOf:E("An array of schemas, where at least one must match."),oneOf:E("An array of schemas, exactly one of which must match."),not:E("A schema which must not match."),$id:E("A unique identifier for the schema."),$ref:E("Reference a definition hosted on any location."),$comment:E("Comments from schema authors to readers or maintainers of the schema."),readOnly:E("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:E("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:E('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:E("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:E("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:E("Describes the media type of a string property."),contentEncoding:E("Describes the content encoding of a string property."),if:E('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:E('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:E('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Mr.schemas){const t=Mr.schemas[e];for(const n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});const i=kc[n];i&&(r.description=i)}}var ro;(()=>{var e={470:i=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,u){for(var h,c="",d=0,m=-1,g=0,p=0;p<=o.length;++p){if(p<o.length)h=o.charCodeAt(p);else{if(h===47)break;h=47}if(h===47){if(!(m===p-1||g===1))if(m!==p-1&&g===2){if(c.length<2||d!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",d=0):d=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),m=p,g=0;continue}}else if(c.length===2||c.length===1){c="",d=0,m=p,g=0;continue}}u&&(c.length>0?c+="/..":c="..",d=2)}else c.length>0?c+="/"+o.slice(m+1,p):c=o.slice(m+1,p),d=p-m-1;m=p,g=0}else h===46&&g!==-1?++g:g=-1}return c}var l={resolve:function(){for(var o,u="",h=!1,c=arguments.length-1;c>=-1&&!h;c--){var d;c>=0?d=arguments[c]:(o===void 0&&(o=process.cwd()),d=o),s(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=a(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(s(o),o.length===0)return".";var u=o.charCodeAt(0)===47,h=o.charCodeAt(o.length-1)===47;return(o=a(o,!u)).length!==0||u||(o="."),o.length>0&&h&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var h=arguments[u];s(h),h.length>0&&(o===void 0?o=h:o+="/"+h)}return o===void 0?".":l.normalize(o)},relative:function(o,u){if(s(o),s(u),o===u||(o=l.resolve(o))===(u=l.resolve(u)))return"";for(var h=1;h<o.length&&o.charCodeAt(h)===47;++h);for(var c=o.length,d=c-h,m=1;m<u.length&&u.charCodeAt(m)===47;++m);for(var g=u.length-m,p=d<g?d:g,v=-1,w=0;w<=p;++w){if(w===p){if(g>p){if(u.charCodeAt(m+w)===47)return u.slice(m+w+1);if(w===0)return u.slice(m+w)}else d>p&&(o.charCodeAt(h+w)===47?v=w:w===0&&(v=0));break}var N=o.charCodeAt(h+w);if(N!==u.charCodeAt(m+w))break;N===47&&(v=w)}var x="";for(w=h+v+1;w<=c;++w)w!==c&&o.charCodeAt(w)!==47||(x.length===0?x+="..":x+="/..");return x.length>0?x+u.slice(m+v):(m+=v,u.charCodeAt(m)===47&&++m,u.slice(m))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var u=o.charCodeAt(0),h=u===47,c=-1,d=!0,m=o.length-1;m>=1;--m)if((u=o.charCodeAt(m))===47){if(!d){c=m;break}}else d=!1;return c===-1?h?"/":".":h&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(o);var h,c=0,d=-1,m=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var g=u.length-1,p=-1;for(h=o.length-1;h>=0;--h){var v=o.charCodeAt(h);if(v===47){if(!m){c=h+1;break}}else p===-1&&(m=!1,p=h+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=p))}return c===d?d=p:d===-1&&(d=o.length),o.slice(c,d)}for(h=o.length-1;h>=0;--h)if(o.charCodeAt(h)===47){if(!m){c=h+1;break}}else d===-1&&(m=!1,d=h+1);return d===-1?"":o.slice(c,d)},extname:function(o){s(o);for(var u=-1,h=0,c=-1,d=!0,m=0,g=o.length-1;g>=0;--g){var p=o.charCodeAt(g);if(p!==47)c===-1&&(d=!1,c=g+1),p===46?u===-1?u=g:m!==1&&(m=1):u!==-1&&(m=-1);else if(!d){h=g+1;break}}return u===-1||c===-1||m===0||m===1&&u===c-1&&u===h+1?"":o.slice(u,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,h){var c=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return c?c===h.root?c+d:c+"/"+d:d}(0,o)},parse:function(o){s(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var h,c=o.charCodeAt(0),d=c===47;d?(u.root="/",h=1):h=0;for(var m=-1,g=0,p=-1,v=!0,w=o.length-1,N=0;w>=h;--w)if((c=o.charCodeAt(w))!==47)p===-1&&(v=!1,p=w+1),c===46?m===-1?m=w:N!==1&&(N=1):m!==-1&&(N=-1);else if(!v){g=w+1;break}return m===-1||p===-1||N===0||N===1&&m===p-1&&m===g+1?p!==-1&&(u.base=u.name=g===0&&d?o.slice(1,p):o.slice(g,p)):(g===0&&d?(u.name=o.slice(1,m),u.base=o.slice(1,p)):(u.name=o.slice(g,m),u.base=o.slice(g,p)),u.ext=o.slice(m,p)),g>0?u.dir=o.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>D}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(M,y){if(!M.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!s.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!a.test(M.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(l.test(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",h="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(y){return y instanceof d||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}scheme;authority;path;query;fragment;constructor(y,S,C,T,P,F=!1){typeof y=="object"?(this.scheme=y.scheme||u,this.authority=y.authority||u,this.path=y.path||u,this.query=y.query||u,this.fragment=y.fragment||u):(this.scheme=function(q,z){return q||z?q:"file"}(y,F),this.authority=S||u,this.path=function(q,z){switch(q){case"https":case"http":case"file":z?z[0]!==h&&(z=h+z):z=h}return z}(this.scheme,C||u),this.query=T||u,this.fragment=P||u,o(this,F))}get fsPath(){return N(this)}with(y){if(!y)return this;let{scheme:S,authority:C,path:T,query:P,fragment:F}=y;return S===void 0?S=this.scheme:S===null&&(S=u),C===void 0?C=this.authority:C===null&&(C=u),T===void 0?T=this.path:T===null&&(T=u),P===void 0?P=this.query:P===null&&(P=u),F===void 0?F=this.fragment:F===null&&(F=u),S===this.scheme&&C===this.authority&&T===this.path&&P===this.query&&F===this.fragment?this:new g(S,C,T,P,F)}static parse(y,S=!1){const C=c.exec(y);return C?new g(C[2]||u,L(C[4]||u),L(C[5]||u),L(C[7]||u),L(C[9]||u),S):new g(u,u,u,u,u)}static file(y){let S=u;if(i&&(y=y.replace(/\\/g,h)),y[0]===h&&y[1]===h){const C=y.indexOf(h,2);C===-1?(S=y.substring(2),y=h):(S=y.substring(2,C),y=y.substring(C)||h)}return new g("file",S,y,u,u)}static from(y){const S=new g(y.scheme,y.authority,y.path,y.query,y.fragment);return o(S,!0),S}toString(y=!1){return x(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof d)return y;{const S=new g(y);return S._formatted=y.external,S._fsPath=y._sep===m?y.fsPath:null,S}}return y}}const m=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=N(this)),this._fsPath}toString(y=!1){return y?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){const y={$mid:1};return this._fsPath&&(y.fsPath=this._fsPath,y._sep=m),this._formatted&&(y.external=this._formatted),this.path&&(y.path=this.path),this.scheme&&(y.scheme=this.scheme),this.authority&&(y.authority=this.authority),this.query&&(y.query=this.query),this.fragment&&(y.fragment=this.fragment),y}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(M,y,S){let C,T=-1;for(let P=0;P<M.length;P++){const F=M.charCodeAt(P);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||y&&F===47||S&&F===91||S&&F===93||S&&F===58)T!==-1&&(C+=encodeURIComponent(M.substring(T,P)),T=-1),C!==void 0&&(C+=M.charAt(P));else{C===void 0&&(C=M.substr(0,P));const q=p[F];q!==void 0?(T!==-1&&(C+=encodeURIComponent(M.substring(T,P)),T=-1),C+=q):T===-1&&(T=P)}}return T!==-1&&(C+=encodeURIComponent(M.substring(T))),C!==void 0?C:M}function w(M){let y;for(let S=0;S<M.length;S++){const C=M.charCodeAt(S);C===35||C===63?(y===void 0&&(y=M.substr(0,S)),y+=p[C]):y!==void 0&&(y+=M[S])}return y!==void 0?y:M}function N(M,y){let S;return S=M.authority&&M.path.length>1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?M.path[1].toLowerCase()+M.path.substr(2):M.path,i&&(S=S.replace(/\//g,"\\")),S}function x(M,y){const S=y?w:v;let C="",{scheme:T,authority:P,path:F,query:q,fragment:z}=M;if(T&&(C+=T,C+=":"),(P||T==="file")&&(C+=h,C+=h),P){let j=P.indexOf("@");if(j!==-1){const Re=P.substr(0,j);P=P.substr(j+1),j=Re.lastIndexOf(":"),j===-1?C+=S(Re,!1,!1):(C+=S(Re.substr(0,j),!1,!1),C+=":",C+=S(Re.substr(j+1),!1,!0)),C+="@"}P=P.toLowerCase(),j=P.lastIndexOf(":"),j===-1?C+=S(P,!1,!0):(C+=S(P.substr(0,j),!1,!0),C+=P.substr(j))}if(F){if(F.length>=3&&F.charCodeAt(0)===47&&F.charCodeAt(2)===58){const j=F.charCodeAt(1);j>=65&&j<=90&&(F=`/${String.fromCharCode(j+32)}:${F.substr(3)}`)}else if(F.length>=2&&F.charCodeAt(1)===58){const j=F.charCodeAt(0);j>=65&&j<=90&&(F=`${String.fromCharCode(j+32)}:${F.substr(2)}`)}C+=S(F,!0,!1)}return q&&(C+="?",C+=S(q,!1,!1)),z&&(C+="#",C+=y?z:v(z,!1,!1)),C}function _(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+_(M.substr(3)):M}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function L(M){return M.match(b)?M.replace(b,y=>_(y)):M}var A=n(470);const R=A.posix||A,I="/";var D;(function(M){M.joinPath=function(y,...S){return y.with({path:R.join(y.path,...S)})},M.resolvePath=function(y,...S){let C=y.path,T=!1;C[0]!==I&&(C=I+C,T=!0);let P=R.resolve(C,...S);return T&&P[0]===I&&!y.authority&&(P=P.substring(1)),y.with({path:P})},M.dirname=function(y){if(y.path.length===0||y.path===I)return y;let S=R.dirname(y.path);return S.length===1&&S.charCodeAt(0)===46&&(S=""),y.with({path:S})},M.basename=function(y){return R.basename(y.path)},M.extname=function(y){return R.extname(y.path)}})(D||(D={}))})(),ro=r})();var{URI:Lt,Utils:a1}=ro;function Ec(e,t){if(typeof e!="string")throw new TypeError("Expected a string");const n=String(e);let r="";const i=t?!!t.extended:!1,s=t?!!t.globstar:!1;let a=!1;const l=t&&typeof t.flags=="string"?t.flags:"";let o;for(let u=0,h=n.length;u<h;u++)switch(o=n[u],o){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+o;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=o;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+o;break;case"*":const c=n[u-1];let d=1;for(;n[u+1]==="*";)d++,u++;const m=n[u+1];s?d>1&&(c==="/"||c===void 0||c==="{"||c===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?u++:c==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=o}return(!l||!~l.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,l)}var Rc="!",Mc="/",Cc=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let r of e){const i=r[0]!==Rc;i||(r=r.substring(1)),r.length>0&&(r[0]===Mc&&(r=r.substring(1)),this.globWrappers.push({regexp:Ec("**/"+r,{extended:!0,globstar:!0}),include:i}))}t&&(t=so(t),t.endsWith("/")||(t=t+"/"),this.folderUri=t)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},Tc=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Ut(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Ut=class{constructor(e,t=[]){this.schema=e,this.errors=t}},io=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return ve(t)}getSectionRecursive(e,t){if(!t||typeof t=="boolean"||e.length===0)return t;const n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(const r of Object.keys(t.patternProperties))if(mn(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}},Pc=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=Lt.parse(t).scheme;return n!=="schemaservice"&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=Xe(e);const n=[e],r=Object.keys(this.schemasById).map(i=>this.schemasById[i]);for(;n.length;){const i=n.pop();for(let s=0;s<r.length;s++){const a=r[s];a&&(a.uri===i||a.dependencies.has(i))&&(a.uri!==i&&n.push(a.uri),a.clearSchema()&&(t=!0),r[s]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const n in t){const r=Xe(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let n of t){const r=n.uris.map(Xe),i=this.addFilePatternAssociation(n.pattern,n.folderUri,r);this.contributionAssociations.push(i)}}}addSchemaHandle(e,t){const n=new Tc(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new Cc(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=Xe(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=Xe(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=E("Unable to load schema from '{0}'. No schema request service available",qt(e));return this.promise.resolve(new Ut({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then(t=>{if(!t){const s=E("Unable to load schema from '{0}': No content.",qt(e));return new Ut({},[s])}const n=[];t.charCodeAt(0)===65279&&(n.push(E("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",qt(e))),t=t.trimStart());let r={};const i=[];return r=Zu(t,i),i.length&&n.push(E("Unable to parse content from '{0}': Parse error at offset {1}.",qt(e),i[0].offset)),new Ut(r,n)},t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),Vt(n,".")&&(n=n.substr(0,n.length-1)),new Ut({},[E("Unable to load schema from '{0}': {1}.",qt(e),n)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let i=r.$schema?Xe(r.$schema):void 0;if(i==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new io({},[E("Draft-03 schemas are not supported.")],[],i));let s=new Set;const a=this.contextService,l=(g,p)=>{p=decodeURIComponent(p);let v=g;return p[0]==="/"&&(p=p.substring(1)),p.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[w],!v)),v},o=(g,p,v)=>(p.anchors||(p.anchors=m(g)),p.anchors.get(v)),u=(g,p)=>{for(const v in p)p.hasOwnProperty(v)&&v!=="id"&&v!=="$id"&&(g[v]=p[v])},h=(g,p,v,w)=>{let N;w===void 0||w.length===0?N=p:w.charAt(0)==="/"?N=l(p,w):N=o(p,v,w),N?u(g,N):n.push(E("$ref '{0}' in '{1}' can not be resolved.",w||"",v.uri))},c=(g,p,v,w)=>{a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(p)&&(p=a.resolveRelativePath(p,w.uri)),p=Xe(p);const N=this.getOrAddSchemaHandle(p);return N.getUnresolvedSchema().then(x=>{if(w.dependencies.add(p),x.errors.length){const _=v?p+"#"+v:p;n.push(E("Problems loading reference '{0}': {1}",_,x.errors[0]))}return h(g,x.schema,N,v),d(g,x.schema,N)})},d=(g,p,v)=>{const w=[];return this.traverseNodes(g,N=>{const x=new Set;for(;N.$ref;){const _=N.$ref,b=_.split("#",2);if(delete N.$ref,b[0].length>0){w.push(c(N,b[0],b[1],v));return}else if(!x.has(_)){const L=b[1];h(N,p,v,L),x.add(_)}}N.$recursiveRef&&s.add("$recursiveRef"),N.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(w)},m=g=>{const p=new Map;return this.traverseNodes(g,v=>{const w=v.$id||v.id,N=Js(w)&&w.charAt(0)==="#"?w.substring(1):v.$anchor;N&&(p.has(N)?n.push(E("Duplicate anchor declaration: '{0}'",N)):p.set(N,v)),v.$recursiveAnchor&&s.add("$recursiveAnchor"),v.$dynamicAnchor&&s.add("$dynamicAnchor")}),p};return d(r,r,t).then(g=>{let p=[];return s.size&&p.push(E("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new io(r,n,p,i)})}traverseNodes(e,t){if(!e||typeof e!="object")return Promise.resolve(null);const n=new Set,r=(...u)=>{for(const h of u)Ge(h)&&l.push(h)},i=(...u)=>{for(const h of u)if(Ge(h))for(const c in h){const m=h[c];Ge(m)&&l.push(m)}},s=(...u)=>{for(const h of u)if(Array.isArray(h))for(const c of h)Ge(c)&&l.push(c)},a=u=>{if(Array.isArray(u))for(const h of u)Ge(h)&&l.push(h);else Ge(u)&&l.push(u)},l=[e];let o=l.pop();for(;o;)n.has(o)||(n.add(o),t(o),r(o.additionalItems,o.additionalProperties,o.not,o.contains,o.propertyNames,o.if,o.then,o.else,o.unevaluatedItems,o.unevaluatedProperties),i(o.definitions,o.$defs,o.properties,o.patternProperties,o.dependencies,o.dependentSchemas),s(o.anyOf,o.allOf,o.oneOf,o.prefixItems),a(o.items)),o=l.pop()}getSchemaFromProperty(e,t){if(t.root?.type==="object"){for(const n of t.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let r=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(r)&&(r=this.contextService.resolveRelativePath(r,e)),r}}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=so(e);for(const i of this.filePatternAssociations)if(i.matchesPattern(r))for(const s of i.getURIs())t[s]||(n.push(s),t[s]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let i=this.getSchemaFromProperty(e,t);if(i){const s=Xe(i);return this.getOrAddSchemaHandle(s).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(i=>({$ref:i}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const r=n.id||"schemaservice://untitled/matchingSchemas/"+Ic++;return this.addSchemaHandle(r,n).getResolvedSchema().then(s=>t.getMatchingSchemas(s.schema).filter(a=>!a.inverted))}return this.getSchemaForResource(e.uri,t).then(r=>r?t.getMatchingSchemas(r.schema).filter(i=>!i.inverted):[])}},Ic=0;function Xe(e){try{return Lt.parse(e).toString(!0)}catch{return e}}function so(e){try{return Lt.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function qt(e){try{const t=Lt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function Fc(e,t){const n=[],r=[],i=[];let s=-1;const a=Ke(e.getText(),!1);let l=a.scan();function o(g){n.push(g),r.push(i.length)}for(;l!==17;){switch(l){case 1:case 3:{const g=e.positionAt(a.getTokenOffset()).line,p={startLine:g,endLine:g,kind:l===1?"object":"array"};i.push(p);break}case 2:case 4:{const g=l===2?"object":"array";if(i.length>0&&i[i.length-1].kind===g){const p=i.pop(),v=e.positionAt(a.getTokenOffset()).line;p&&v>p.startLine+1&&s!==p.startLine&&(p.endLine=v-1,o(p),s=p.startLine)}break}case 13:{const g=e.positionAt(a.getTokenOffset()).line,p=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&g+1<e.lineCount?a.setPosition(e.offsetAt(Z.create(g+1,0))):g<p&&(o({startLine:g,endLine:p,kind:Dt.Comment}),s=g);break}case 12:{const p=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(p){const v=e.positionAt(a.getTokenOffset()).line;if(p[1]){const w={startLine:v,endLine:v,kind:Dt.Region};i.push(w)}else{let w=i.length-1;for(;w>=0&&i[w].kind!==Dt.Region;)w--;if(w>=0){const N=i[w];i.length=w,v>N.startLine&&s!==N.startLine&&(N.endLine=v,o(N),s=N.startLine)}}}break}}l=a.scan()}const u=t&&t.rangeLimit;if(typeof u!="number"||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let g of r)g<30&&(h[g]=(h[g]||0)+1);let c=0,d=0;for(let g=0;g<h.length;g++){const p=h[g];if(p){if(p+c>u){d=g;break}c+=p}}const m=[];for(let g=0;g<n.length;g++){const p=r[g];typeof p=="number"&&(p<d||p===d&&c++<u)&&m.push(n[g])}return m}function Vc(e,t,n){function r(l){let o=e.offsetAt(l),u=n.getNodeFromOffset(o,!0);const h=[];for(;u;){switch(u.type){case"string":case"object":case"array":const d=u.offset+1,m=u.offset+u.length-1;d<m&&o>=d&&o<=m&&h.push(i(d,m)),h.push(i(u.offset,u.offset+u.length));break;case"number":case"boolean":case"null":case"property":h.push(i(u.offset,u.offset+u.length));break}if(u.type==="property"||u.parent&&u.parent.type==="array"){const d=a(u.offset+u.length,5);d!==-1&&h.push(i(u.offset,d))}u=u.parent}let c;for(let d=h.length-1;d>=0;d--)c=vn.create(h[d],c);return c||(c=vn.create(U.create(l,l))),c}function i(l,o){return U.create(e.positionAt(l),e.positionAt(o))}const s=Ke(e.getText(),!0);function a(l,o){return s.setPosition(l),s.scan()===o?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function Cr(e,t,n){let r;if(n){const s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}const i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
|
|
48
|
+
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function xc(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var yc=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:pe.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},a=o=>{const u=o.range.start.line+" "+o.range.start.character+" "+o.message;s[u]||(s[u]=!0,i.push(o))},l=o=>{let u=n?.trailingCommas?xn(n.trailingCommas):pe.Error,h=n?.comments?xn(n.comments):this.commentSeverity,c=n?.schemaValidation?xn(n.schemaValidation):pe.Warning,d=n?.schemaRequest?xn(n.schemaRequest):pe.Warning;if(o){const m=(g,p)=>{if(t.root&&d){const v=t.root,w=v.type==="object"?v.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){const N=w.valueNode||w,x=U.create(e.positionAt(N.offset),e.positionAt(N.offset+N.length));a(Oe.create(x,g,d,p))}else{const N=U.create(e.positionAt(v.offset),e.positionAt(v.offset+1));a(Oe.create(N,g,d,p))}}};if(o.errors.length)m(o.errors[0],H.SchemaResolveError);else if(c){for(const p of o.warnings)m(p,H.SchemaUnsupportedFeature);const g=t.validate(e,o.schema,c,n?.schemaDraft);g&&g.forEach(a)}Ka(o.schema)&&(h=void 0),eo(o.schema)&&(u=void 0)}for(const m of t.syntaxErrors){if(m.code===H.TrailingComma){if(typeof u!="number")continue;m.severity=u}a(m)}if(typeof h=="number"){const m=E("Comments are not permitted in JSON.");t.comments.forEach(g=>{a(Oe.create(g,m,h,H.CommentNotPermitted))})}return i};if(r){const o=r.id||"schemaservice://untitled/"+_c++;return this.jsonSchemaService.registerExternalSchema({uri:o,schema:r}).getResolvedSchema().then(h=>l(h))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(o=>l(o))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},_c=0;function Ka(e){if(e&&typeof e=="object"){if(Te(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const n=Ka(t);if(Te(n))return n}}}function eo(e){if(e&&typeof e=="object"){if(Te(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(Te(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const n of e.allOf){const r=eo(n);if(Te(r))return r}}}function xn(e){switch(e){case"error":return pe.Error;case"warning":return pe.Warning;case"ignore":return}}var to=48,wc=57,Lc=65,yn=97,Nc=102;function ee(e){return e<to?0:e<=wc?e-to:(e<yn&&(e+=yn-Lc),e>=yn&&e<=Nc?e-yn+10:0)}function Sc(e){if(e[0]==="#")switch(e.length){case 4:return{red:ee(e.charCodeAt(1))*17/255,green:ee(e.charCodeAt(2))*17/255,blue:ee(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ee(e.charCodeAt(1))*17/255,green:ee(e.charCodeAt(2))*17/255,blue:ee(e.charCodeAt(3))*17/255,alpha:ee(e.charCodeAt(4))*17/255};case 7:return{red:(ee(e.charCodeAt(1))*16+ee(e.charCodeAt(2)))/255,green:(ee(e.charCodeAt(3))*16+ee(e.charCodeAt(4)))/255,blue:(ee(e.charCodeAt(5))*16+ee(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ee(e.charCodeAt(1))*16+ee(e.charCodeAt(2)))/255,green:(ee(e.charCodeAt(3))*16+ee(e.charCodeAt(4)))/255,blue:(ee(e.charCodeAt(5))*16+ee(e.charCodeAt(6)))/255,alpha:(ee(e.charCodeAt(7))*16+ee(e.charCodeAt(8)))/255}}}var Ac=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if((s==="vscode://defaultsettings/keybindings.json"||Vt(s.toLowerCase(),"/user/keybindings.json"))&&r.type==="array"){const c=[];for(const d of r.items)if(d.type==="object"){for(const m of d.properties)if(m.keyNode.value==="key"&&m.valueNode){const g=yt.create(e.uri,Je(e,d));if(c.push({name:no(m.valueNode),kind:Ie.Function,location:g}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),c}}return c}const a=[{node:r,containerName:""}];let l=0,o=!1;const u=[],h=(c,d)=>{c.type==="array"?c.items.forEach(m=>{m&&a.push({node:m,containerName:d})}):c.type==="object"&&c.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=yt.create(e.uri,Je(e,m)),v=d?d+"."+m.keyNode.value:m.keyNode.value;u.push({name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),location:p,containerName:d}),a.push({node:g,containerName:v})}else o=!0})};for(;l<a.length;){const c=a[l++];h(c.node,c.containerName)}return o&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if((s==="vscode://defaultsettings/keybindings.json"||Vt(s.toLowerCase(),"/user/keybindings.json"))&&r.type==="array"){const c=[];for(const d of r.items)if(d.type==="object"){for(const m of d.properties)if(m.keyNode.value==="key"&&m.valueNode){const g=Je(e,d),p=Je(e,m.keyNode);if(c.push({name:no(m.valueNode),kind:Ie.Function,range:g,selectionRange:p}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),c}}return c}const a=[],l=[{node:r,result:a}];let o=0,u=!1;const h=(c,d)=>{c.type==="array"?c.items.forEach((m,g)=>{if(m)if(i>0){i--;const p=Je(e,m),v=p,N={name:String(g),kind:this.getSymbolKind(m.type),range:p,selectionRange:v,children:[]};d.push(N),l.push({result:N.children,node:m})}else u=!0}):c.type==="object"&&c.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=Je(e,m),v=Je(e,m.keyNode),w=[],N={name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),range:p,selectionRange:v,children:w,detail:this.getDetail(g)};d.push(N),l.push({result:w,node:g})}else u=!0})};for(;o<l.length;){const c=l[o++];h(c.node,c.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),a}getSymbolKind(e){switch(e){case"object":return Ie.Module;case"string":return Ie.String;case"number":return Ie.Number;case"array":return Ie.Array;case"boolean":return Ie.Boolean;default:return Ie.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{const i=[];if(r){let s=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE;const a=t.getMatchingSchemas(r.schema),l={};for(const o of a)if(!o.inverted&&o.schema&&(o.schema.format==="color"||o.schema.format==="color-hex")&&o.node&&o.node.type==="string"){const u=String(o.node.offset);if(!l[u]){const h=Sc(nt(o.node));if(h){const c=Je(e,o.node);i.push({color:h,range:c})}if(l[u]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){const i=[],s=Math.round(n.red*255),a=Math.round(n.green*255),l=Math.round(n.blue*255);function o(h){const c=h.toString(16);return c.length!==2?"0"+c:c}let u;return n.alpha===1?u=`#${o(s)}${o(a)}${o(l)}`:u=`#${o(s)}${o(a)}${o(l)}${o(Math.round(n.alpha*255))}`,i.push({label:u,textEdit:Pe.replace(r,JSON.stringify(u))}),i}};function Je(e,t){return U.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function no(e){return nt(e)||E("<empty>")}var Mr={schemaAssociations:[],schemas:{"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}}},kc={id:E("A unique identifier for the schema."),$schema:E("The schema to verify this document against."),title:E("A descriptive title of the element."),description:E("A long description of the element. Used in hover menus and suggestions."),default:E("A default value. Used by suggestions."),multipleOf:E("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:E("The maximum numerical value, inclusive by default."),exclusiveMaximum:E("Makes the maximum property exclusive."),minimum:E("The minimum numerical value, inclusive by default."),exclusiveMinimum:E("Makes the minimum property exclusive."),maxLength:E("The maximum length of a string."),minLength:E("The minimum length of a string."),pattern:E("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:E("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:E("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:E("The maximum number of items that can be inside an array. Inclusive."),minItems:E("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:E("If all of the items in the array must be unique. Defaults to false."),maxProperties:E("The maximum number of properties an object can have. Inclusive."),minProperties:E("The minimum number of properties an object can have. Inclusive."),required:E("An array of strings that lists the names of all properties required on this object."),additionalProperties:E("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:E("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:E("A map of property names to schemas for each property."),patternProperties:E("A map of regular expressions on property names to schemas for matching properties."),dependencies:E("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:E("The set of literal values that are valid."),type:E("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:E("Describes the format expected for the value."),allOf:E("An array of schemas, all of which must match."),anyOf:E("An array of schemas, where at least one must match."),oneOf:E("An array of schemas, exactly one of which must match."),not:E("A schema which must not match."),$id:E("A unique identifier for the schema."),$ref:E("Reference a definition hosted on any location."),$comment:E("Comments from schema authors to readers or maintainers of the schema."),readOnly:E("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:E("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:E('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:E("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:E("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:E("Describes the media type of a string property."),contentEncoding:E("Describes the content encoding of a string property."),if:E('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:E('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:E('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Mr.schemas){const t=Mr.schemas[e];for(const n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});const i=kc[n];i&&(r.description=i)}}var ro;(()=>{var e={470:i=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,u){for(var h,c="",d=0,m=-1,g=0,p=0;p<=o.length;++p){if(p<o.length)h=o.charCodeAt(p);else{if(h===47)break;h=47}if(h===47){if(!(m===p-1||g===1))if(m!==p-1&&g===2){if(c.length<2||d!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",d=0):d=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),m=p,g=0;continue}}else if(c.length===2||c.length===1){c="",d=0,m=p,g=0;continue}}u&&(c.length>0?c+="/..":c="..",d=2)}else c.length>0?c+="/"+o.slice(m+1,p):c=o.slice(m+1,p),d=p-m-1;m=p,g=0}else h===46&&g!==-1?++g:g=-1}return c}var l={resolve:function(){for(var o,u="",h=!1,c=arguments.length-1;c>=-1&&!h;c--){var d;c>=0?d=arguments[c]:(o===void 0&&(o=process.cwd()),d=o),s(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=a(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(s(o),o.length===0)return".";var u=o.charCodeAt(0)===47,h=o.charCodeAt(o.length-1)===47;return(o=a(o,!u)).length!==0||u||(o="."),o.length>0&&h&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var h=arguments[u];s(h),h.length>0&&(o===void 0?o=h:o+="/"+h)}return o===void 0?".":l.normalize(o)},relative:function(o,u){if(s(o),s(u),o===u||(o=l.resolve(o))===(u=l.resolve(u)))return"";for(var h=1;h<o.length&&o.charCodeAt(h)===47;++h);for(var c=o.length,d=c-h,m=1;m<u.length&&u.charCodeAt(m)===47;++m);for(var g=u.length-m,p=d<g?d:g,v=-1,w=0;w<=p;++w){if(w===p){if(g>p){if(u.charCodeAt(m+w)===47)return u.slice(m+w+1);if(w===0)return u.slice(m+w)}else d>p&&(o.charCodeAt(h+w)===47?v=w:w===0&&(v=0));break}var N=o.charCodeAt(h+w);if(N!==u.charCodeAt(m+w))break;N===47&&(v=w)}var x="";for(w=h+v+1;w<=c;++w)w!==c&&o.charCodeAt(w)!==47||(x.length===0?x+="..":x+="/..");return x.length>0?x+u.slice(m+v):(m+=v,u.charCodeAt(m)===47&&++m,u.slice(m))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var u=o.charCodeAt(0),h=u===47,c=-1,d=!0,m=o.length-1;m>=1;--m)if((u=o.charCodeAt(m))===47){if(!d){c=m;break}}else d=!1;return c===-1?h?"/":".":h&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(o);var h,c=0,d=-1,m=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var g=u.length-1,p=-1;for(h=o.length-1;h>=0;--h){var v=o.charCodeAt(h);if(v===47){if(!m){c=h+1;break}}else p===-1&&(m=!1,p=h+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=p))}return c===d?d=p:d===-1&&(d=o.length),o.slice(c,d)}for(h=o.length-1;h>=0;--h)if(o.charCodeAt(h)===47){if(!m){c=h+1;break}}else d===-1&&(m=!1,d=h+1);return d===-1?"":o.slice(c,d)},extname:function(o){s(o);for(var u=-1,h=0,c=-1,d=!0,m=0,g=o.length-1;g>=0;--g){var p=o.charCodeAt(g);if(p!==47)c===-1&&(d=!1,c=g+1),p===46?u===-1?u=g:m!==1&&(m=1):u!==-1&&(m=-1);else if(!d){h=g+1;break}}return u===-1||c===-1||m===0||m===1&&u===c-1&&u===h+1?"":o.slice(u,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,h){var c=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return c?c===h.root?c+d:c+"/"+d:d}(0,o)},parse:function(o){s(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var h,c=o.charCodeAt(0),d=c===47;d?(u.root="/",h=1):h=0;for(var m=-1,g=0,p=-1,v=!0,w=o.length-1,N=0;w>=h;--w)if((c=o.charCodeAt(w))!==47)p===-1&&(v=!1,p=w+1),c===46?m===-1?m=w:N!==1&&(N=1):m!==-1&&(N=-1);else if(!v){g=w+1;break}return m===-1||p===-1||N===0||N===1&&m===p-1&&m===g+1?p!==-1&&(u.base=u.name=g===0&&d?o.slice(1,p):o.slice(g,p)):(g===0&&d?(u.name=o.slice(1,m),u.base=o.slice(1,p)):(u.name=o.slice(g,m),u.base=o.slice(g,p)),u.ext=o.slice(m,p)),g>0?u.dir=o.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>D}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(M,y){if(!M.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!s.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!a.test(M.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(l.test(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",h="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(y){return y instanceof d||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}scheme;authority;path;query;fragment;constructor(y,S,C,T,P,F=!1){typeof y=="object"?(this.scheme=y.scheme||u,this.authority=y.authority||u,this.path=y.path||u,this.query=y.query||u,this.fragment=y.fragment||u):(this.scheme=function(q,z){return q||z?q:"file"}(y,F),this.authority=S||u,this.path=function(q,z){switch(q){case"https":case"http":case"file":z?z[0]!==h&&(z=h+z):z=h}return z}(this.scheme,C||u),this.query=T||u,this.fragment=P||u,o(this,F))}get fsPath(){return N(this)}with(y){if(!y)return this;let{scheme:S,authority:C,path:T,query:P,fragment:F}=y;return S===void 0?S=this.scheme:S===null&&(S=u),C===void 0?C=this.authority:C===null&&(C=u),T===void 0?T=this.path:T===null&&(T=u),P===void 0?P=this.query:P===null&&(P=u),F===void 0?F=this.fragment:F===null&&(F=u),S===this.scheme&&C===this.authority&&T===this.path&&P===this.query&&F===this.fragment?this:new g(S,C,T,P,F)}static parse(y,S=!1){const C=c.exec(y);return C?new g(C[2]||u,L(C[4]||u),L(C[5]||u),L(C[7]||u),L(C[9]||u),S):new g(u,u,u,u,u)}static file(y){let S=u;if(i&&(y=y.replace(/\\/g,h)),y[0]===h&&y[1]===h){const C=y.indexOf(h,2);C===-1?(S=y.substring(2),y=h):(S=y.substring(2,C),y=y.substring(C)||h)}return new g("file",S,y,u,u)}static from(y){const S=new g(y.scheme,y.authority,y.path,y.query,y.fragment);return o(S,!0),S}toString(y=!1){return x(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof d)return y;{const S=new g(y);return S._formatted=y.external,S._fsPath=y._sep===m?y.fsPath:null,S}}return y}}const m=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=N(this)),this._fsPath}toString(y=!1){return y?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){const y={$mid:1};return this._fsPath&&(y.fsPath=this._fsPath,y._sep=m),this._formatted&&(y.external=this._formatted),this.path&&(y.path=this.path),this.scheme&&(y.scheme=this.scheme),this.authority&&(y.authority=this.authority),this.query&&(y.query=this.query),this.fragment&&(y.fragment=this.fragment),y}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(M,y,S){let C,T=-1;for(let P=0;P<M.length;P++){const F=M.charCodeAt(P);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||y&&F===47||S&&F===91||S&&F===93||S&&F===58)T!==-1&&(C+=encodeURIComponent(M.substring(T,P)),T=-1),C!==void 0&&(C+=M.charAt(P));else{C===void 0&&(C=M.substr(0,P));const q=p[F];q!==void 0?(T!==-1&&(C+=encodeURIComponent(M.substring(T,P)),T=-1),C+=q):T===-1&&(T=P)}}return T!==-1&&(C+=encodeURIComponent(M.substring(T))),C!==void 0?C:M}function w(M){let y;for(let S=0;S<M.length;S++){const C=M.charCodeAt(S);C===35||C===63?(y===void 0&&(y=M.substr(0,S)),y+=p[C]):y!==void 0&&(y+=M[S])}return y!==void 0?y:M}function N(M,y){let S;return S=M.authority&&M.path.length>1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?M.path[1].toLowerCase()+M.path.substr(2):M.path,i&&(S=S.replace(/\//g,"\\")),S}function x(M,y){const S=y?w:v;let C="",{scheme:T,authority:P,path:F,query:q,fragment:z}=M;if(T&&(C+=T,C+=":"),(P||T==="file")&&(C+=h,C+=h),P){let j=P.indexOf("@");if(j!==-1){const Re=P.substr(0,j);P=P.substr(j+1),j=Re.lastIndexOf(":"),j===-1?C+=S(Re,!1,!1):(C+=S(Re.substr(0,j),!1,!1),C+=":",C+=S(Re.substr(j+1),!1,!0)),C+="@"}P=P.toLowerCase(),j=P.lastIndexOf(":"),j===-1?C+=S(P,!1,!0):(C+=S(P.substr(0,j),!1,!0),C+=P.substr(j))}if(F){if(F.length>=3&&F.charCodeAt(0)===47&&F.charCodeAt(2)===58){const j=F.charCodeAt(1);j>=65&&j<=90&&(F=`/${String.fromCharCode(j+32)}:${F.substr(3)}`)}else if(F.length>=2&&F.charCodeAt(1)===58){const j=F.charCodeAt(0);j>=65&&j<=90&&(F=`${String.fromCharCode(j+32)}:${F.substr(2)}`)}C+=S(F,!0,!1)}return q&&(C+="?",C+=S(q,!1,!1)),z&&(C+="#",C+=y?z:v(z,!1,!1)),C}function _(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+_(M.substr(3)):M}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function L(M){return M.match(b)?M.replace(b,y=>_(y)):M}var A=n(470);const R=A.posix||A,I="/";var D;(function(M){M.joinPath=function(y,...S){return y.with({path:R.join(y.path,...S)})},M.resolvePath=function(y,...S){let C=y.path,T=!1;C[0]!==I&&(C=I+C,T=!0);let P=R.resolve(C,...S);return T&&P[0]===I&&!y.authority&&(P=P.substring(1)),y.with({path:P})},M.dirname=function(y){if(y.path.length===0||y.path===I)return y;let S=R.dirname(y.path);return S.length===1&&S.charCodeAt(0)===46&&(S=""),y.with({path:S})},M.basename=function(y){return R.basename(y.path)},M.extname=function(y){return R.extname(y.path)}})(D||(D={}))})(),ro=r})();var{URI:Lt,Utils:a1}=ro;function Ec(e,t){if(typeof e!="string")throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t,s=!!t;let a=!1;const l=t&&typeof t.flags=="string"?t.flags:"";let o;for(let u=0,h=n.length;u<h;u++)switch(o=n[u],o){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+o;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=o;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+o;break;case"*":const c=n[u-1];let d=1;for(;n[u+1]==="*";)d++,u++;const m=n[u+1];s?d>1&&(c==="/"||c===void 0||c==="{"||c===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?u++:c==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=o}return(!l||!~l.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,l)}var Rc="!",Mc="/",Cc=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let r of e){const i=r[0]!==Rc;i||(r=r.substring(1)),r.length>0&&(r[0]===Mc&&(r=r.substring(1)),this.globWrappers.push({regexp:Ec("**/"+r,{extended:!0,globstar:!0}),include:i}))}t&&(t=so(t),t.endsWith("/")||(t=t+"/"),this.folderUri=t)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},Tc=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Ut(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Ut=class{constructor(e,t=[]){this.schema=e,this.errors=t}},io=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return ve(t)}getSectionRecursive(e,t){if(!t||typeof t=="boolean"||e.length===0)return t;const n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(const r of Object.keys(t.patternProperties))if(mn(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}},Pc=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=Lt.parse(t).scheme;return n!=="schemaservice"&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=Xe(e);const n=[e],r=Object.keys(this.schemasById).map(i=>this.schemasById[i]);for(;n.length;){const i=n.pop();for(let s=0;s<r.length;s++){const a=r[s];a&&(a.uri===i||a.dependencies.has(i))&&(a.uri!==i&&n.push(a.uri),a.clearSchema()&&(t=!0),r[s]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const n in t){const r=Xe(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let n of t){const r=n.uris.map(Xe),i=this.addFilePatternAssociation(n.pattern,n.folderUri,r);this.contributionAssociations.push(i)}}}addSchemaHandle(e,t){const n=new Tc(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new Cc(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=Xe(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=Xe(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=E("Unable to load schema from '{0}'. No schema request service available",qt(e));return this.promise.resolve(new Ut({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then(t=>{if(!t){const s=E("Unable to load schema from '{0}': No content.",qt(e));return new Ut({},[s])}const n=[];t.charCodeAt(0)===65279&&(n.push(E("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",qt(e))),t=t.trimStart());let r={};const i=[];return r=Zu(t,i),i.length&&n.push(E("Unable to parse content from '{0}': Parse error at offset {1}.",qt(e),i[0].offset)),new Ut(r,n)},t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),Vt(n,".")&&(n=n.substr(0,n.length-1)),new Ut({},[E("Unable to load schema from '{0}': {1}.",qt(e),n)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let i=r.$schema?Xe(r.$schema):void 0;if(i==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new io({},[E("Draft-03 schemas are not supported.")],[],i));let s=new Set;const a=this.contextService,l=(g,p)=>{p=decodeURIComponent(p);let v=g;return p[0]==="/"&&(p=p.substring(1)),p.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[w],!v)),v},o=(g,p,v)=>(p.anchors||(p.anchors=m(g)),p.anchors.get(v)),u=(g,p)=>{for(const v in p)p.hasOwnProperty(v)&&v!=="id"&&v!=="$id"&&(g[v]=p[v])},h=(g,p,v,w)=>{let N;w===void 0||w.length===0?N=p:w.charAt(0)==="/"?N=l(p,w):N=o(p,v,w),N?u(g,N):n.push(E("$ref '{0}' in '{1}' can not be resolved.",w||"",v.uri))},c=(g,p,v,w)=>{a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(p)&&(p=a.resolveRelativePath(p,w.uri)),p=Xe(p);const N=this.getOrAddSchemaHandle(p);return N.getUnresolvedSchema().then(x=>{if(w.dependencies.add(p),x.errors.length){const _=v?p+"#"+v:p;n.push(E("Problems loading reference '{0}': {1}",_,x.errors[0]))}return h(g,x.schema,N,v),d(g,x.schema,N)})},d=(g,p,v)=>{const w=[];return this.traverseNodes(g,N=>{const x=new Set;for(;N.$ref;){const _=N.$ref,b=_.split("#",2);if(delete N.$ref,b[0].length>0){w.push(c(N,b[0],b[1],v));return}else if(!x.has(_)){const L=b[1];h(N,p,v,L),x.add(_)}}N.$recursiveRef&&s.add("$recursiveRef"),N.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(w)},m=g=>{const p=new Map;return this.traverseNodes(g,v=>{const w=v.$id||v.id,N=Js(w)&&w.charAt(0)==="#"?w.substring(1):v.$anchor;N&&(p.has(N)?n.push(E("Duplicate anchor declaration: '{0}'",N)):p.set(N,v)),v.$recursiveAnchor&&s.add("$recursiveAnchor"),v.$dynamicAnchor&&s.add("$dynamicAnchor")}),p};return d(r,r,t).then(g=>{let p=[];return s.size&&p.push(E("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new io(r,n,p,i)})}traverseNodes(e,t){if(!e||typeof e!="object")return Promise.resolve(null);const n=new Set,r=(...u)=>{for(const h of u)Ge(h)&&l.push(h)},i=(...u)=>{for(const h of u)if(Ge(h))for(const c in h){const m=h[c];Ge(m)&&l.push(m)}},s=(...u)=>{for(const h of u)if(Array.isArray(h))for(const c of h)Ge(c)&&l.push(c)},a=u=>{if(Array.isArray(u))for(const h of u)Ge(h)&&l.push(h);else Ge(u)&&l.push(u)},l=[e];let o=l.pop();for(;o;)n.has(o)||(n.add(o),t(o),r(o.additionalItems,o.additionalProperties,o.not,o.contains,o.propertyNames,o.if,o.then,o.else,o.unevaluatedItems,o.unevaluatedProperties),i(o.definitions,o.$defs,o.properties,o.patternProperties,o.dependencies,o.dependentSchemas),s(o.anyOf,o.allOf,o.oneOf,o.prefixItems),a(o.items)),o=l.pop()}getSchemaFromProperty(e,t){if(t.root?.type==="object"){for(const n of t.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let r=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(r)&&(r=this.contextService.resolveRelativePath(r,e)),r}}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=so(e);for(const i of this.filePatternAssociations)if(i.matchesPattern(r))for(const s of i.getURIs())t[s]||(n.push(s),t[s]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let i=this.getSchemaFromProperty(e,t);if(i){const s=Xe(i);return this.getOrAddSchemaHandle(s).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(i=>({$ref:i}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const r=n.id||"schemaservice://untitled/matchingSchemas/"+Ic++;return this.addSchemaHandle(r,n).getResolvedSchema().then(s=>t.getMatchingSchemas(s.schema).filter(a=>!a.inverted))}return this.getSchemaForResource(e.uri,t).then(r=>r?t.getMatchingSchemas(r.schema).filter(i=>!i.inverted):[])}},Ic=0;function Xe(e){try{return Lt.parse(e).toString(!0)}catch{return e}}function so(e){try{return Lt.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function qt(e){try{const t=Lt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function Fc(e,t){const n=[],r=[],i=[];let s=-1;const a=Ke(e.getText(),!1);let l=a.scan();function o(g){n.push(g),r.push(i.length)}for(;l!==17;){switch(l){case 1:case 3:{const g=e.positionAt(a.getTokenOffset()).line,p={startLine:g,endLine:g,kind:l===1?"object":"array"};i.push(p);break}case 2:case 4:{const g=l===2?"object":"array";if(i.length>0&&i[i.length-1].kind===g){const p=i.pop(),v=e.positionAt(a.getTokenOffset()).line;p&&v>p.startLine+1&&s!==p.startLine&&(p.endLine=v-1,o(p),s=p.startLine)}break}case 13:{const g=e.positionAt(a.getTokenOffset()).line,p=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&g+1<e.lineCount?a.setPosition(e.offsetAt(Z.create(g+1,0))):g<p&&(o({startLine:g,endLine:p,kind:Dt.Comment}),s=g);break}case 12:{const p=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(p){const v=e.positionAt(a.getTokenOffset()).line;if(p[1]){const w={startLine:v,endLine:v,kind:Dt.Region};i.push(w)}else{let w=i.length-1;for(;w>=0&&i[w].kind!==Dt.Region;)w--;if(w>=0){const N=i[w];i.length=w,v>N.startLine&&s!==N.startLine&&(N.endLine=v,o(N),s=N.startLine)}}}break}}l=a.scan()}const u=t&&t.rangeLimit;if(typeof u!="number"||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let g of r)g<30&&(h[g]=(h[g]||0)+1);let c=0,d=0;for(let g=0;g<h.length;g++){const p=h[g];if(p){if(p+c>u){d=g;break}c+=p}}const m=[];for(let g=0;g<n.length;g++){const p=r[g];typeof p=="number"&&(p<d||p===d&&c++<u)&&m.push(n[g])}return m}function Vc(e,t,n){function r(l){let o=e.offsetAt(l),u=n.getNodeFromOffset(o,!0);const h=[];for(;u;){switch(u.type){case"string":case"object":case"array":const d=u.offset+1,m=u.offset+u.length-1;d<m&&o>=d&&o<=m&&h.push(i(d,m)),h.push(i(u.offset,u.offset+u.length));break;case"number":case"boolean":case"null":case"property":h.push(i(u.offset,u.offset+u.length));break}if(u.type==="property"||u.parent&&u.parent.type==="array"){const d=a(u.offset+u.length,5);d!==-1&&h.push(i(u.offset,d))}u=u.parent}let c;for(let d=h.length-1;d>=0;d--)c=vn.create(h[d],c);return c||(c=vn.create(U.create(l,l))),c}function i(l,o){return U.create(e.positionAt(l),e.positionAt(o))}const s=Ke(e.getText(),!0);function a(l,o){return s.setPosition(l),s.scan()===o?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function Cr(e,t,n){let r;if(n){const s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}const i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
|
|
49
49
|
`,keepLines:t?.keepLines===!0};return tc(e.getText(),r,i).map(s=>Pe.replace(U.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var re;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(re||(re={}));var _n=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;e.noKeyName?t=this.childrenProperties.length:t=Oc(this.childrenProperties,e,Dc),t<0&&(t=t*-1-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Dc(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function Oc(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return e.length;let a=0,l=e.length-1;for(;a<=l;){let o=l+a>>1,u=n(t,e[o]);if(u>0)a=o+1;else if(u<0)l=o-1;else return o}return-a-1}function Bc(e,t){const n={...t,keepLines:!1},r=ke.applyEdits(e,Cr(e,n,void 0)),i=ke.create("test://test.json","json",0,r),s=Uc(i),a=qc(i,s),l=Cr(a,n,void 0),o=ke.applyEdits(a,l);return[Pe.replace(U.create(Z.create(0,0),e.positionAt(e.getText().length)),o)]}function Uc(e){const t=e.getText(),n=Ke(t,!1);let r=new _n,i=r,s=r,a=r,l,o=0,u=0,h,c,d=-1,m=-1,g=0,p=0,v=[],w=!1,N=!1;for(;(l=n.scan())!==17;){if(w===!0&&l!==14&&l!==15&&l!==12&&l!==13&&s.endLineNumber===void 0){let x=n.getTokenStartLine();c===2||c===4?a.endLineNumber=x-1:s.endLineNumber=x-1,g=x,w=!1}if(N===!0&&l!==14&&l!==15&&l!==12&&l!==13&&(g=n.getTokenStartLine(),N=!1),n.getTokenStartLine()!==o){for(let x=o;x<n.getTokenStartLine();x++){const _=e.getText(U.create(Z.create(x,0),Z.create(x+1,0))).length;u=u+_}o=n.getTokenStartLine()}switch(l){case 10:{if(h===void 0||h===1||h===5&&v[v.length-1]===re.Object){const x=new _n(n.getTokenValue(),g);a=s,s=i.addChildProperty(x)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),v[v.length-1]===re.Object)i=s;else if(v[v.length-1]===re.Array){const x=new _n(n.getTokenValue(),g);x.noKeyName=!0,a=s,s=i.addChildProperty(x),i=s}v.push(re.Array),s.type=re.Array,g=n.getTokenStartLine(),g++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(v[v.length-1]===re.Array){const x=new _n(n.getTokenValue(),g);x.noKeyName=!0,a=s,s=i.addChildProperty(x)}s.type=re.Object,v.push(re.Object),i=s,g=n.getTokenStartLine(),g++;break}case 4:{p=n.getTokenStartLine(),v.pop(),s.endLineNumber===void 0&&(h===2||h===4)&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=m,a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=p,g=p+1;break}case 2:{p=n.getTokenStartLine(),v.pop(),h!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=m),a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),g=p+1;break}case 5:{p=n.getTokenStartLine(),s.endLineNumber===void 0&&(v[v.length-1]===re.Object||v[v.length-1]===re.Array&&(h===2||h===4))&&(s.endLineNumber=p,s.commaIndex=n.getTokenOffset()-u,s.commaLine=p),(h===2||h===4)&&(a=s,s=s?s.parent:void 0,i=s),g=p+1;break}case 13:{h===5&&d===n.getTokenStartLine()&&(v[v.length-1]===re.Array&&(c===2||c===4)||v[v.length-1]===re.Object)&&(v[v.length-1]===re.Array&&(c===2||c===4)||v[v.length-1]===re.Object)&&(s.endLineNumber=void 0,w=!0),(h===1||h===3)&&d===n.getTokenStartLine()&&(N=!0);break}}l!==14&&l!==13&&l!==12&&l!==15&&(c=h,h=l,d=n.getTokenStartLine(),m=n.getTokenOffset()+n.getTokenLength()-u)}return r}function qc(e,t){if(t.childrenProperties.length===0)return e;const n=ke.create("test://test.json","json",0,e.getText()),r=[];for(ao(r,t,t.beginningLineNumber);r.length>0;){const i=r.shift(),s=i.propertyTreeArray;let a=i.beginningLineNumber;for(let l=0;l<s.length;l++){const o=s[l],u=U.create(Z.create(o.beginningLineNumber,0),Z.create(o.endLineNumber+1,0)),h=e.getText(u),c=ke.create("test://test.json","json",0,h);if(o.lastProperty===!0&&l!==s.length-1){const g=o.lineWhereToAddComma-o.beginningLineNumber,p=o.indexWhereToAddComa,v={range:U.create(Z.create(g,p),Z.create(g,p)),text:","};ke.update(c,[v],1)}else if(o.lastProperty===!1&&l===s.length-1){const g=o.commaIndex,v=o.commaLine-o.beginningLineNumber,w={range:U.create(Z.create(v,g),Z.create(v,g+1)),text:""};ke.update(c,[w],1)}const d=o.endLineNumber-o.beginningLineNumber+1,m={range:U.create(Z.create(a,0),Z.create(a+d,0)),text:c.getText()};ke.update(n,[m],1),ao(r,o,a),a=a+d}}return n}function ao(e,t,n){if(t.childrenProperties.length!==0)if(t.type===re.Object){let r=1/0;for(const s of t.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);const i=r-t.beginningLineNumber;n=n+i,e.push(new lo(n,t.childrenProperties))}else t.type===re.Array&&oo(e,t,n)}function oo(e,t,n){for(const r of t.childrenProperties){if(r.type===re.Object){let i=1/0;for(const a of r.childrenProperties)a.beginningLineNumber<i&&(i=a.beginningLineNumber);const s=i-r.beginningLineNumber;e.push(new lo(n+r.beginningLineNumber-t.beginningLineNumber+s,r.childrenProperties))}r.type===re.Array&&oo(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var lo=class{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}};function $c(e,t){const n=[];return t.visit(r=>{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){const i=r.valueNode.value,s=Hc(t,i);if(s){const a=e.positionAt(s.offset);n.push({target:`${e.uri}#${a.line+1},${a.character+1}`,range:jc(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function jc(e,t){return U.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Hc(e,t){const n=Wc(t);return n?Tr(n,e.root):null}function Tr(e,t){if(!t)return null;if(e.length===0)return t;const n=e.shift();if(t&&t.type==="object"){const r=t.properties.find(i=>i.keyNode.value===n);return r?Tr(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?Tr(e,i):null}return null}function Wc(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(zc)}function zc(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Gc(e){const t=e.promiseConstructor||Promise,n=new Pc(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Mr);const r=new bc(n,e.contributions,t,e.clientCapabilities),i=new vc(n,e.contributions,t),s=new Ac(n),a=new yc(n,t);return{configure:l=>{n.clearExternalSchemas(),l.schemas?.forEach(n.registerExternalSchema.bind(n)),a.configure(l)},resetSchema:l=>n.onResourceChange(l),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:l=>pc(l,{collectComments:!0}),newJSONDocument:(l,o)=>gc(l,o),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Fc,getSelectionRanges:Vc,findDefinition:()=>Promise.resolve([]),findLinks:$c,format:(l,o,u)=>Cr(l,u,o),sort:(l,o)=>Bc(l,o)}}var uo;typeof fetch<"u"&&(uo=function(e){return fetch(e).then(t=>t.text())});var Jc=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Gc({workspaceContext:{resolveRelativePath:(n,r)=>{const i=r.substr(0,r.lastIndexOf("/")+1);return Zc(i,n)}},schemaRequestService:t.enableSchemaRequest?uo:void 0,clientCapabilities:Sr.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let n=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,n,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.format(r,t,n);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(i)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return ke.create(e,this._languageId,n.version,n.getValue());return null}},Xc=47,Pr=46;function Qc(e){return e.charCodeAt(0)===Xc}function Zc(e,t){if(Qc(t)){const n=Lt.parse(e),r=t.split("/");return n.with({path:co(r)}).toString()}return Yc(e,t)}function co(e){const t=[];for(const r of e)r.length===0||r.length===1&&r.charCodeAt(0)===Pr||(r.length===2&&r.charCodeAt(0)===Pr&&r.charCodeAt(1)===Pr?t.pop():t.push(r));e.length>1&&e[e.length-1].length===0&&t.push("");let n=t.join("/");return e[0].length===0&&(n="/"+n),n}function Yc(e,...t){const n=Lt.parse(e),r=n.path.split("/");for(let i of t)r.push(...i.split("/"));return n.with({path:co(r)}).toString()}self.onmessage=()=>{Bs((e,t)=>new Jc(e,t))}})();
|