@umoteam/editor-external 2.2.0 → 2.3.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.js +3 -2
- package/imgly/background-removal-data/12086412521285f855c2921ae13d3370ab243c9a250ebe340430075780f4624b +0 -0
- package/imgly/background-removal-data/26a663c5a768f39155009f52e0f66815f36983ae275eec676365f7d09ef97edd +0 -0
- package/imgly/background-removal-data/378cd0ab154b324c0b1fe3136a605a8618865d4ce38824a30c938cc1e6312ce4 +0 -0
- package/imgly/background-removal-data/391ce9664d3a506e4333adb82581fc2dc6fbef0354f497ab417c050cb6eba6c4 +0 -0
- package/imgly/background-removal-data/417316220b16ddd1c2a4730a315206ec0405aac7b64a878bdbe514e687b07b6f +0 -0
- package/imgly/background-removal-data/7b64520a3747dd5dcf6ac48f612504bb3b1e273a08b42b5a7efd614b9e4a397c +0 -0
- package/imgly/background-removal-data/7b95dd2733643f999b985105afb755122ca36de12decadc7855ebfbdab6920e6 +0 -0
- package/imgly/background-removal-data/8b993f75a6dc28aab79d1f216e62b59aaa6b3a15e62159bcad4a2ac197c4db0a +0 -0
- package/imgly/background-removal-data/90741e8ae8b47de7666ae4163ba26087500d534973a853bbd02cea715f24b5ee +0 -0
- package/imgly/background-removal-data/9f0512f9be98be0f44ad2f9ec9fe706ae626f2037aca910df6d1396a06a30d41 +0 -0
- package/imgly/background-removal-data/a2a1f2d68cd58b5a6262755e434dee496fc0f27c0ba8fcbb5d57c56ffa1bb15f +0 -0
- package/imgly/background-removal-data/a984abd436e7a8119dc170730260a37436ce0d0542984b71c5a1a386777ab7fd +0 -0
- package/imgly/background-removal-data/af8fb2b72ffb03ed999778c4de73fd4ade196890be6e0253230b198dd11e9db0 +0 -0
- package/imgly/background-removal-data/b53229786ebfbaabcfec4955c248135ba47a13972bf700116a2ff85b86507d2e +0 -0
- package/imgly/background-removal-data/bbf8e366b8f11bb64e60c8532fc2ffed21535fa1cf981464ac45485972107855 +0 -0
- package/imgly/background-removal-data/c1eba9d5d2ee58ba832bf98b50624ea8813f2279505643401c23674c6b326d0b +0 -0
- package/imgly/background-removal-data/c9f954707cb992edf62319d9aed365b4fc9ec3f08693a020db30040c0f953198 +0 -0
- package/imgly/background-removal-data/cad6b95099faeba3ea1299d717990453208cc075b53332db9123a4e2bdaf160c +0 -0
- package/imgly/background-removal-data/dd4fad06953738263bc4d5f94974376467fc74081cba665cef18af8223894ed4 +0 -0
- package/imgly/background-removal-data/e9445ca5ac21e04579658183cd886440f3524caafe6a8947dd20a73b34fba5b0 +0 -0
- package/imgly/background-removal-data/ea46f83f60203065638f183fc8a5446dfc28a163d7ba1922fc3bc6cf40347fa2 +0 -0
- package/imgly/background-removal-data/ef7fb517ae63534f48efa657702b3821fb5d59e4fd372016793edc0389341cc0 +0 -0
- package/imgly/background-removal-data/f69890cf74d0a687904dd088c0aaadce598c8bc217366ebee6993eadd4d56208 +0 -0
- package/imgly/background-removal-data/f6e7e01556358ed875f260bdfb22fb6f7213ac6fd4098ed72c0e7af081f0c23c +0 -0
- package/imgly/background-removal-data/fa3e4102c796fb6d1dab5417c5c0b4b5d219e6b9624d045d7361a033e7db183f +0 -0
- package/imgly/background-removal-data/resources.json +462 -0
- package/libs/katex/README.md +3 -3
- package/libs/katex/katex.css +239 -116
- package/libs/katex/katex.js +9 -7
- package/libs/katex/katex.min.css +1 -1
- package/libs/katex/katex.min.js +1 -1
- package/libs/katex/katex.mjs +9 -7
- package/libs/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.de.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.es.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.fr.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.it.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ja.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ko.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ru.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js +1 -1
- package/libs/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js +1 -1
- package/libs/monaco-editor/min/vs/base/worker/workerMain.js +20 -18
- package/libs/monaco-editor/min/vs/basic-languages/abap/abap.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/apex/apex.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/azcli/azcli.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/bat/bat.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/bicep/bicep.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/cameligo/cameligo.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/clojure/clojure.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/coffee/coffee.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/cpp/cpp.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/csharp/csharp.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/csp/csp.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/css/css.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/cypher/cypher.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/dart/dart.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/ecl/ecl.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/elixir/elixir.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/flow9/flow9.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/freemarker2/freemarker2.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/go/go.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/graphql/graphql.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/hcl/hcl.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/html/html.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/ini/ini.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/java/java.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/javascript/javascript.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/julia/julia.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/less/less.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/lexon/lexon.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/liquid/liquid.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/lua/lua.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/m3/m3.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/markdown/markdown.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/mdx/mdx.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/mips/mips.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/msdax/msdax.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/mysql/mysql.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/objective-c/objective-c.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/pascal/pascal.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/pascaligo/pascaligo.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/perl/perl.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/pgsql/pgsql.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/php/php.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/pla/pla.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/postiats/postiats.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/powershell/powershell.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/protobuf/protobuf.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/pug/pug.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/python/python.js +2 -2
- package/libs/monaco-editor/min/vs/basic-languages/qsharp/qsharp.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/r/r.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/razor/razor.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/redis/redis.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/redshift/redshift.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/ruby/ruby.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/rust/rust.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/sb/sb.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/scala/scala.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/scheme/scheme.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/scss/scss.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/shell/shell.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/solidity/solidity.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/sophia/sophia.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/sparql/sparql.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/sql/sql.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/st/st.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/swift/swift.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/systemverilog/systemverilog.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/tcl/tcl.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/twig/twig.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/typescript/typescript.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/typespec/typespec.js +10 -0
- package/libs/monaco-editor/min/vs/basic-languages/vb/vb.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/wgsl/wgsl.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/xml/xml.js +1 -1
- package/libs/monaco-editor/min/vs/basic-languages/yaml/yaml.js +1 -1
- package/libs/monaco-editor/min/vs/editor/editor.main.css +3 -3
- package/libs/monaco-editor/min/vs/editor/editor.main.js +238 -233
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.de.js +8 -6
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.es.js +8 -6
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.fr.js +7 -5
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.it.js +7 -5
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.ja.js +8 -6
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.js +7 -5
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.ko.js +7 -5
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.ru.js +8 -6
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.zh-cn.js +8 -6
- package/libs/monaco-editor/min/vs/editor/editor.main.nls.zh-tw.js +7 -5
- package/libs/monaco-editor/min/vs/language/css/cssMode.js +5 -5
- package/libs/monaco-editor/min/vs/language/css/cssWorker.js +46 -47
- package/libs/monaco-editor/min/vs/language/html/htmlMode.js +5 -5
- package/libs/monaco-editor/min/vs/language/html/htmlWorker.js +51 -49
- package/libs/monaco-editor/min/vs/language/json/jsonMode.js +11 -7
- package/libs/monaco-editor/min/vs/language/json/jsonWorker.js +28 -22
- package/libs/monaco-editor/min/vs/language/typescript/tsMode.js +8 -8
- package/libs/monaco-editor/min/vs/language/typescript/tsWorker.js +16501 -2189
- package/libs/monaco-editor/min/vs/loader.js +1 -1
- package/libs/umo-editor/style.css +1 -1
- package/libs/umo-editor/umo-editor.js +2 -2
- package/libs/umo-editor/umo-editor.js.gz +0 -0
- package/libs/vue.min.js +6 -9
- package/package.json +6 -7
|
@@ -1,36 +1,42 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
define("vs/language/json/jsonWorker", ["require","require"],(require)=>{
|
|
8
|
-
"use strict";var moduleExports=(()=>{var
|
|
9
|
-
`;break;case 114:
|
|
10
|
-
`),
|
|
8
|
+
"use strict";var moduleExports=(()=>{var ft=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var vr=Object.getOwnPropertyNames;var xr=Object.prototype.hasOwnProperty;var kr=(e,t)=>{for(var r in t)ft(e,r,{get:t[r],enumerable:!0})},Ar=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vr(t))!xr.call(e,i)&&i!==r&&ft(e,i,{get:()=>t[i],enumerable:!(n=br(t,i))||n.enumerable});return e};var Sr=e=>Ar(ft({},"__esModule",{value:!0}),e);var ai={};kr(ai,{JSONWorker:()=>ct,create:()=>oi});function Se(e,t=!1){let r=e.length,n=0,i="",s=0,o=16,c=0,l=0,a=0,u=0,f=0;function d(g,S){let x=0,T=0;for(;x<g||!S;){let O=e.charCodeAt(n);if(O>=48&&O<=57)T=T*16+O-48;else if(O>=65&&O<=70)T=T*16+O-65+10;else if(O>=97&&O<=102)T=T*16+O-97+10;else break;n++,x++}return x<g&&(T=-1),T}function h(g){n=g,i="",s=0,o=16,f=0}function p(){let g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Ae(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Ae(e.charCodeAt(n)))for(n++;n<e.length&&Ae(e.charCodeAt(n));)n++;else return f=3,e.substring(g,n);let S=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Ae(e.charCodeAt(n))){for(n++;n<e.length&&Ae(e.charCodeAt(n));)n++;S=n}else f=3;return e.substring(g,S)}function m(){let g="",S=n;for(;;){if(n>=r){g+=e.substring(S,n),f=2;break}let x=e.charCodeAt(n);if(x===34){g+=e.substring(S,n),n++;break}if(x===92){if(g+=e.substring(S,n),n++,n>=r){f=2;break}switch(e.charCodeAt(n++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
|
|
9
|
+
`;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:let O=d(4,!0);O>=0?g+=String.fromCharCode(O):f=4;break;default:f=5}S=n;continue}if(x>=0&&x<=31)if(Ie(x)){g+=e.substring(S,n),f=2;break}else f=6;n++}return g}function y(){if(i="",f=0,s=n,l=c,u=a,n>=r)return s=r,o=17;let g=e.charCodeAt(n);if(ut(g)){do n++,i+=String.fromCharCode(g),g=e.charCodeAt(n);while(ut(g));return o=15}if(Ie(g))return n++,i+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,i+=`
|
|
10
|
+
`),c++,a=n,o=14;switch(g){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,i=m(),o=10;case 47:let S=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!Ie(e.charCodeAt(n));)n++;return i=e.substring(S,n),o=12}if(e.charCodeAt(n+1)===42){n+=2;let x=r-1,T=!1;for(;n<x;){let O=e.charCodeAt(n);if(O===42&&e.charCodeAt(n+1)===47){n+=2,T=!0;break}n++,Ie(O)&&(O===13&&e.charCodeAt(n)===10&&n++,c++,a=n)}return T||(n++,f=1),i=e.substring(S,n),o=13}return i+=String.fromCharCode(g),n++,o=16;case 45:if(i+=String.fromCharCode(g),n++,n===r||!Ae(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),o=11;default:for(;n<r&&k(g);)n++,g=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(g),n++,o=16}}function k(g){if(ut(g)||Ie(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function w(){let g;do g=y();while(g>=12&&g<=15);return g}return{setPosition:h,getPosition:()=>n,scan:t?w:y,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-u,getTokenError:()=>f}}function ut(e){return e===32||e===9}function Ie(e){return e===10||e===13}function Ae(e){return e>=48&&e<=57}var sn;(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"})(sn||(sn={}));var Q=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),we=200,dt={" ":{"\n":new Array(we).fill(0).map((e,t)=>`
|
|
11
|
+
`+" ".repeat(t)),"\r":new Array(we).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(we).fill(0).map((e,t)=>`\r
|
|
12
|
+
`+" ".repeat(t))}," ":{"\n":new Array(we).fill(0).map((e,t)=>`
|
|
13
|
+
`+" ".repeat(t)),"\r":new Array(we).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(we).fill(0).map((e,t)=>`\r
|
|
14
|
+
`+" ".repeat(t))}},on=[`
|
|
15
|
+
`,"\r",`\r
|
|
16
|
+
`];function pt(e,t,r){let n,i,s,o,c;if(t){for(o=t.offset,c=o+t.length,s=o;s>0&&!ht(e,s-1);)s--;let x=c;for(;x<e.length&&!ht(e,x);)x++;i=e.substring(s,x),n=Or(i,r)}else i=e,n=0,s=0,o=0,c=e.length;let l=Tr(r,e),a=on.includes(l),u=0,f=0,d;r.insertSpaces?d=Q[r.tabSize||4]??Oe(Q[1],r.tabSize||4):d=" ";let h=d===" "?" ":" ",p=Se(i,!1),m=!1;function y(){if(u>1)return Oe(l,u)+Oe(d,n+f);let x=d.length*(n+f);return!a||x>dt[h][l].length?l+Oe(d,n+f):x<=0?l:dt[h][l][x]}function k(){let x=p.scan();for(u=0;x===15||x===14;)x===14&&r.keepLines?u+=1:x===14&&(u=1),x=p.scan();return m=x===16||p.getTokenError()!==0,x}let w=[];function g(x,T,O){!m&&(!t||T<c&&O>o)&&e.substring(T,O)!==x&&w.push({offset:T,length:O-T,content:x})}let S=k();if(r.keepLines&&u>0&&g(Oe(l,u),0,0),S!==17){let x=p.getTokenOffset()+s,T=d.length*n<20&&r.insertSpaces?Q[d.length*n]:Oe(d,n);g(T,s,x)}for(;S!==17;){let x=p.getTokenOffset()+p.getTokenLength()+s,T=k(),O="",I=!1;for(;u===0&&(T===12||T===13);){let j=p.getTokenOffset()+s;g(Q[1],x,j),x=p.getTokenOffset()+p.getTokenLength()+s,I=T===12,O=I?y():"",T=k()}if(T===2)S!==1&&f--,r.keepLines&&u>0||!r.keepLines&&S!==1?O=y():r.keepLines&&(O=Q[1]);else if(T===4)S!==3&&f--,r.keepLines&&u>0||!r.keepLines&&S!==3?O=y():r.keepLines&&(O=Q[1]);else{switch(S){case 3:case 1:f++,r.keepLines&&u>0||!r.keepLines?O=y():O=Q[1];break;case 5:r.keepLines&&u>0||!r.keepLines?O=y():O=Q[1];break;case 12:O=y();break;case 13:u>0?O=y():I||(O=Q[1]);break;case 6:r.keepLines&&u>0?O=y():I||(O=Q[1]);break;case 10:r.keepLines&&u>0?O=y():T===6&&!I&&(O="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&u>0?O=y():(T===12||T===13)&&!I?O=Q[1]:T!==5&&T!==17&&(m=!0);break;case 16:m=!0;break}u>0&&(T===12||T===13)&&(O=y())}T===17&&(r.keepLines&&u>0?O=y():O=r.insertFinalNewline?l:"");let E=p.getTokenOffset()+s;g(O,x,E),S=T}return w}function Oe(e,t){let r="";for(let n=0;n<t;n++)r+=e;return r}function Or(e,t){let r=0,n=0,i=t.tabSize||4;for(;r<e.length;){let s=e.charAt(r);if(s===Q[1])n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function Tr(e,t){for(let r=0;r<t.length;r++){let n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===`
|
|
11
17
|
`?`\r
|
|
12
|
-
`:"\r";if(
|
|
18
|
+
`:"\r";if(n===`
|
|
13
19
|
`)return`
|
|
14
|
-
`}return
|
|
15
|
-
`}function
|
|
16
|
-
`.indexOf(t.charAt(r))!==-1}var ze;(function(t){t.DEFAULT={allowTrailingComma:!1}})(ze||(ze={}));function Zt(t,r,i){r===void 0&&(r=[]),i===void 0&&(i=ze.DEFAULT);var e=null,n=[],a=[];function s(f){Array.isArray(n)?n.push(f):e!==null&&(n[e]=f)}var o={onObjectBegin:function(){var f={};s(f),a.push(n),n=f,e=null},onObjectProperty:function(f){e=f},onObjectEnd:function(){n=a.pop()},onArrayBegin:function(){var f=[];s(f),a.push(n),n=f,e=null},onArrayEnd:function(){n=a.pop()},onLiteralValue:s,onError:function(f,l,u){r.push({error:f,offset:l,length:u})}};return Qt(t,o,i),n[0]}function vt(t){if(!t.parent||!t.parent.children)return[];var r=vt(t.parent);if(t.parent.type==="property"){var i=t.parent.children[0].value;r.push(i)}else if(t.parent.type==="array"){var e=t.parent.children.indexOf(t);e!==-1&&r.push(e)}return r}function Be(t){switch(t.type){case"array":return t.children.map(Be);case"object":for(var r=Object.create(null),i=0,e=t.children;i<e.length;i++){var n=e[i],a=n.children[1];a&&(r[n.children[0].value]=Be(a))}return r;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function nn(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}function yt(t,r,i){if(i===void 0&&(i=!1),nn(t,r,i)){var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length&&e[n].offset<=r;n++){var a=yt(e[n],r,i);if(a)return a}return t}}function Qt(t,r,i){i===void 0&&(i=ze.DEFAULT);var e=Ce(t,!1);function n(w){return w?function(){return w(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return!0}}function a(w){return w?function(C){return w(C,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return!0}}var s=n(r.onObjectBegin),o=a(r.onObjectProperty),f=n(r.onObjectEnd),l=n(r.onArrayBegin),u=n(r.onArrayEnd),c=a(r.onLiteralValue),h=a(r.onSeparator),d=n(r.onComment),m=a(r.onError),p=i&&i.disallowComments,g=i&&i.allowTrailingComma;function b(){for(;;){var w=e.scan();switch(e.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:p||y(11);break;case 2:y(12);break;case 6:y(16);break}switch(w){case 12:case 13:p?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return w}}}function y(w,C,F){if(C===void 0&&(C=[]),F===void 0&&(F=[]),m(w),C.length+F.length>0)for(var N=e.getToken();N!==17;){if(C.indexOf(N)!==-1){b();break}else if(F.indexOf(N)!==-1)break;N=b()}}function v(w){var C=e.getTokenValue();return w?c(C):o(C),b(),!0}function O(){switch(e.getToken()){case 11:var w=e.getTokenValue(),C=Number(w);isNaN(C)&&(y(2),C=0),c(C);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return!1}return b(),!0}function E(){return e.getToken()!==10?(y(3,[],[2,5]),!1):(v(!1),e.getToken()===6?(h(":"),b(),P()||y(4,[],[2,5])):y(5,[],[2,5]),!0)}function I(){s(),b();for(var w=!1;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(w||y(4,[],[]),h(","),b(),e.getToken()===2&&g)break}else w&&y(6,[],[]);E()||y(4,[],[2,5]),w=!0}return f(),e.getToken()!==2?y(7,[2],[]):b(),!0}function A(){l(),b();for(var w=!1;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(w||y(4,[],[]),h(","),b(),e.getToken()===4&&g)break}else w&&y(6,[],[]);P()||y(4,[],[4,5]),w=!0}return u(),e.getToken()!==4?y(8,[4],[]):b(),!0}function P(){switch(e.getToken()){case 3:return A();case 1:return I();case 10:return v(!0);default:return O()}}return b(),e.getToken()===17?i.allowEmptyContent?!0:(y(4,[],[]),!1):P()?(e.getToken()!==17&&y(9,[],[]),!0):(y(4,[],[]),!1)}var le=Ce;var Yt=Zt;var Kt=yt,er=vt,tr=Be;function rr(t,r,i){return mt(t,r,i)}function Pe(t,r){if(t===r)return!0;if(t==null||r===null||r===void 0||typeof t!=typeof r||typeof t!="object"||Array.isArray(t)!==Array.isArray(r))return!1;var i,e;if(Array.isArray(t)){if(t.length!==r.length)return!1;for(i=0;i<t.length;i++)if(!Pe(t[i],r[i]))return!1}else{var n=[];for(e in t)n.push(e);n.sort();var a=[];for(e in r)a.push(e);if(a.sort(),!Pe(n,a))return!1;for(i=0;i<n.length;i++)if(!Pe(t[n[i]],r[n[i]]))return!1}return!0}function ee(t){return typeof t=="number"}function se(t){return typeof t<"u"}function ie(t){return typeof t=="boolean"}function nr(t){return typeof t=="string"}function un(t,r){if(t.length<r.length)return!1;for(var i=0;i<r.length;i++)if(t[i]!==r[i])return!1;return!0}function pe(t,r){var i=t.length-r.length;return i>0?t.lastIndexOf(r)===i:i===0?t===r:!1}function xe(t){var r="";un(t,"(?i)")&&(t=t.substring(4),r="i");try{return new RegExp(t,r+"u")}catch{try{return new RegExp(t,r)}catch{return}}}var ar;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(ar||(ar={}));var He;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(He||(He={}));var re;(function(t){function r(e,n){return e===Number.MAX_VALUE&&(e=He.MAX_VALUE),n===Number.MAX_VALUE&&(n=He.MAX_VALUE),{line:e,character:n}}t.create=r;function i(e){var n=e;return x.objectLiteral(n)&&x.uinteger(n.line)&&x.uinteger(n.character)}t.is=i})(re||(re={}));var U;(function(t){function r(e,n,a,s){if(x.uinteger(e)&&x.uinteger(n)&&x.uinteger(a)&&x.uinteger(s))return{start:re.create(e,n),end:re.create(a,s)};if(re.is(e)&&re.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+a+", "+s+"]")}t.create=r;function i(e){var n=e;return x.objectLiteral(n)&&re.is(n.start)&&re.is(n.end)}t.is=i})(U||(U={}));var Se;(function(t){function r(e,n){return{uri:e,range:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.range)&&(x.string(n.uri)||x.undefined(n.uri))}t.is=i})(Se||(Se={}));var or;(function(t){function r(e,n,a,s){return{targetUri:e,targetRange:n,targetSelectionRange:a,originSelectionRange:s}}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.targetRange)&&x.string(n.targetUri)&&(U.is(n.targetSelectionRange)||x.undefined(n.targetSelectionRange))&&(U.is(n.originSelectionRange)||x.undefined(n.originSelectionRange))}t.is=i})(or||(or={}));var Ge;(function(t){function r(e,n,a,s){return{red:e,green:n,blue:a,alpha:s}}t.create=r;function i(e){var n=e;return x.numberRange(n.red,0,1)&&x.numberRange(n.green,0,1)&&x.numberRange(n.blue,0,1)&&x.numberRange(n.alpha,0,1)}t.is=i})(Ge||(Ge={}));var xt;(function(t){function r(e,n){return{range:e,color:n}}t.create=r;function i(e){var n=e;return U.is(n.range)&&Ge.is(n.color)}t.is=i})(xt||(xt={}));var St;(function(t){function r(e,n,a){return{label:e,textEdit:n,additionalTextEdits:a}}t.create=r;function i(e){var n=e;return x.string(n.label)&&(x.undefined(n.textEdit)||Y.is(n))&&(x.undefined(n.additionalTextEdits)||x.typedArray(n.additionalTextEdits,Y.is))}t.is=i})(St||(St={}));var Ae;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Ae||(Ae={}));var At;(function(t){function r(e,n,a,s,o){var f={startLine:e,endLine:n};return x.defined(a)&&(f.startCharacter=a),x.defined(s)&&(f.endCharacter=s),x.defined(o)&&(f.kind=o),f}t.create=r;function i(e){var n=e;return x.uinteger(n.startLine)&&x.uinteger(n.startLine)&&(x.undefined(n.startCharacter)||x.uinteger(n.startCharacter))&&(x.undefined(n.endCharacter)||x.uinteger(n.endCharacter))&&(x.undefined(n.kind)||x.string(n.kind))}t.is=i})(At||(At={}));var wt;(function(t){function r(e,n){return{location:e,message:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&Se.is(n.location)&&x.string(n.message)}t.is=i})(wt||(wt={}));var Z;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Z||(Z={}));var sr;(function(t){t.Unnecessary=1,t.Deprecated=2})(sr||(sr={}));var fr;(function(t){function r(i){var e=i;return e!=null&&x.string(e.href)}t.is=r})(fr||(fr={}));var ae;(function(t){function r(e,n,a,s,o,f){var l={range:e,message:n};return x.defined(a)&&(l.severity=a),x.defined(s)&&(l.code=s),x.defined(o)&&(l.source=o),x.defined(f)&&(l.relatedInformation=f),l}t.create=r;function i(e){var n,a=e;return x.defined(a)&&U.is(a.range)&&x.string(a.message)&&(x.number(a.severity)||x.undefined(a.severity))&&(x.integer(a.code)||x.string(a.code)||x.undefined(a.code))&&(x.undefined(a.codeDescription)||x.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(x.string(a.source)||x.undefined(a.source))&&(x.undefined(a.relatedInformation)||x.typedArray(a.relatedInformation,wt.is))}t.is=i})(ae||(ae={}));var Ee;(function(t){function r(e,n){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var o={title:e,command:n};return x.defined(a)&&a.length>0&&(o.arguments=a),o}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.title)&&x.string(n.command)}t.is=i})(Ee||(Ee={}));var Y;(function(t){function r(a,s){return{range:a,newText:s}}t.replace=r;function i(a,s){return{range:{start:a,end:a},newText:s}}t.insert=i;function e(a){return{range:a,newText:""}}t.del=e;function n(a){var s=a;return x.objectLiteral(s)&&x.string(s.newText)&&U.is(s.range)}t.is=n})(Y||(Y={}));var je;(function(t){function r(e,n,a){var s={label:e};return n!==void 0&&(s.needsConfirmation=n),a!==void 0&&(s.description=a),s}t.create=r;function i(e){var n=e;return n!==void 0&&x.objectLiteral(n)&&x.string(n.label)&&(x.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(x.string(n.description)||n.description===void 0)}t.is=i})(je||(je={}));var X;(function(t){function r(i){var e=i;return typeof e=="string"}t.is=r})(X||(X={}));var me;(function(t){function r(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=r;function i(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=i;function e(a,s){return{range:a,newText:"",annotationId:s}}t.del=e;function n(a){var s=a;return Y.is(s)&&(je.is(s.annotationId)||X.is(s.annotationId))}t.is=n})(me||(me={}));var Fe;(function(t){function r(e,n){return{textDocument:e,edits:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&Ze.is(n.textDocument)&&Array.isArray(n.edits)}t.is=i})(Fe||(Fe={}));var Le;(function(t){function r(e,n,a){var s={kind:"create",uri:e};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}t.create=r;function i(e){var n=e;return n&&n.kind==="create"&&x.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||x.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||x.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})(Le||(Le={}));var Ve;(function(t){function r(e,n,a,s){var o={kind:"rename",oldUri:e,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=r;function i(e){var n=e;return n&&n.kind==="rename"&&x.string(n.oldUri)&&x.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||x.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||x.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})(Ve||(Ve={}));var De;(function(t){function r(e,n,a){var s={kind:"delete",uri:e};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}t.create=r;function i(e){var n=e;return n&&n.kind==="delete"&&x.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||x.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||x.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})(De||(De={}));var Xe;(function(t){function r(i){var e=i;return e&&(e.changes!==void 0||e.documentChanges!==void 0)&&(e.documentChanges===void 0||e.documentChanges.every(function(n){return x.string(n.kind)?Le.is(n)||Ve.is(n)||De.is(n):Fe.is(n)}))}t.is=r})(Xe||(Xe={}));var _e=function(){function t(r,i){this.edits=r,this.changeAnnotations=i}return t.prototype.insert=function(r,i,e){var n,a;if(e===void 0?n=Y.insert(r,i):X.is(e)?(a=e,n=me.insert(r,i,e)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(e),n=me.insert(r,i,a)),this.edits.push(n),a!==void 0)return a},t.prototype.replace=function(r,i,e){var n,a;if(e===void 0?n=Y.replace(r,i):X.is(e)?(a=e,n=me.replace(r,i,e)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(e),n=me.replace(r,i,a)),this.edits.push(n),a!==void 0)return a},t.prototype.delete=function(r,i){var e,n;if(i===void 0?e=Y.del(r):X.is(i)?(n=i,e=me.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(i),e=me.del(r,n)),this.edits.push(e),n!==void 0)return n},t.prototype.add=function(r){this.edits.push(r)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),ur=function(){function t(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(r,i){var e;if(X.is(r)?e=r:(e=this.nextId(),i=r),this._annotations[e]!==void 0)throw new Error("Id "+e+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+e);return this._annotations[e]=i,this._size++,e},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),ni=function(){function t(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new ur(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(e){if(Fe.is(e)){var n=new _e(e.edits,i._changeAnnotations);i._textEditChanges[e.textDocument.uri]=n}})):r.changes&&Object.keys(r.changes).forEach(function(e){var n=new _e(r.changes[e]);i._textEditChanges[e]=n})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(r){if(Ze.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},e=this._textEditChanges[i.uri];if(!e){var n=[],a={textDocument:i,edits:n};this._workspaceEdit.documentChanges.push(a),e=new _e(n,this._changeAnnotations),this._textEditChanges[i.uri]=e}return e}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var e=this._textEditChanges[r];if(!e){var n=[];this._workspaceEdit.changes[r]=n,e=new _e(n),this._textEditChanges[r]=e}return e}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ur,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(r,i,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;je.is(i)||X.is(i)?n=i:e=i;var a,s;if(n===void 0?a=Le.create(r,e):(s=X.is(n)?n:this._changeAnnotations.manage(n),a=Le.create(r,e,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s},t.prototype.renameFile=function(r,i,e,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;je.is(e)||X.is(e)?a=e:n=e;var s,o;if(a===void 0?s=Ve.create(r,i,n):(o=X.is(a)?a:this._changeAnnotations.manage(a),s=Ve.create(r,i,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},t.prototype.deleteFile=function(r,i,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;je.is(i)||X.is(i)?n=i:e=i;var a,s;if(n===void 0?a=De.create(r,e):(s=X.is(n)?n:this._changeAnnotations.manage(n),a=De.create(r,e,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s},t}();var cr;(function(t){function r(e){return{uri:e}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)}t.is=i})(cr||(cr={}));var Tt;(function(t){function r(e,n){return{uri:e,version:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&x.integer(n.version)}t.is=i})(Tt||(Tt={}));var Ze;(function(t){function r(e,n){return{uri:e,version:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&(n.version===null||x.integer(n.version))}t.is=i})(Ze||(Ze={}));var lr;(function(t){function r(e,n,a,s){return{uri:e,languageId:n,version:a,text:s}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&x.string(n.languageId)&&x.integer(n.version)&&x.string(n.text)}t.is=i})(lr||(lr={}));var fe;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(fe||(fe={}));(function(t){function r(i){var e=i;return e===t.PlainText||e===t.Markdown}t.is=r})(fe||(fe={}));var Qe;(function(t){function r(i){var e=i;return x.objectLiteral(i)&&fe.is(e.kind)&&x.string(e.value)}t.is=r})(Qe||(Qe={}));var Q;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Q||(Q={}));var z;(function(t){t.PlainText=1,t.Snippet=2})(z||(z={}));var kt;(function(t){t.Deprecated=1})(kt||(kt={}));var hr;(function(t){function r(e,n,a){return{newText:e,insert:n,replace:a}}t.create=r;function i(e){var n=e;return n&&x.string(n.newText)&&U.is(n.insert)&&U.is(n.replace)}t.is=i})(hr||(hr={}));var gr;(function(t){t.asIs=1,t.adjustIndentation=2})(gr||(gr={}));var $e;(function(t){function r(i){return{label:i}}t.create=r})($e||($e={}));var Ot;(function(t){function r(i,e){return{items:i||[],isIncomplete:!!e}}t.create=r})(Ot||(Ot={}));var Re;(function(t){function r(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=r;function i(e){var n=e;return x.string(n)||x.objectLiteral(n)&&x.string(n.language)&&x.string(n.value)}t.is=i})(Re||(Re={}));var Ct;(function(t){function r(i){var e=i;return!!e&&x.objectLiteral(e)&&(Qe.is(e.contents)||Re.is(e.contents)||x.typedArray(e.contents,Re.is))&&(i.range===void 0||U.is(i.range))}t.is=r})(Ct||(Ct={}));var dr;(function(t){function r(i,e){return e?{label:i,documentation:e}:{label:i}}t.create=r})(dr||(dr={}));var pr;(function(t){function r(i,e){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var s={label:i};return x.defined(e)&&(s.documentation=e),x.defined(n)?s.parameters=n:s.parameters=[],s}t.create=r})(pr||(pr={}));var Pt;(function(t){t.Text=1,t.Read=2,t.Write=3})(Pt||(Pt={}));var jt;(function(t){function r(i,e){var n={range:i};return x.number(e)&&(n.kind=e),n}t.create=r})(jt||(jt={}));var oe;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(oe||(oe={}));var mr;(function(t){t.Deprecated=1})(mr||(mr={}));var Et;(function(t){function r(i,e,n,a,s){var o={name:i,kind:e,location:{uri:a,range:n}};return s&&(o.containerName=s),o}t.create=r})(Et||(Et={}));var It;(function(t){function r(e,n,a,s,o,f){var l={name:e,detail:n,kind:a,range:s,selectionRange:o};return f!==void 0&&(l.children=f),l}t.create=r;function i(e){var n=e;return n&&x.string(n.name)&&x.number(n.kind)&&U.is(n.range)&&U.is(n.selectionRange)&&(n.detail===void 0||x.string(n.detail))&&(n.deprecated===void 0||x.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}t.is=i})(It||(It={}));var Nt;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Nt||(Nt={}));var Mt;(function(t){function r(e,n){var a={diagnostics:e};return n!=null&&(a.only=n),a}t.create=r;function i(e){var n=e;return x.defined(n)&&x.typedArray(n.diagnostics,ae.is)&&(n.only===void 0||x.typedArray(n.only,x.string))}t.is=i})(Mt||(Mt={}));var Ft;(function(t){function r(e,n,a){var s={title:e},o=!0;return typeof n=="string"?(o=!1,s.kind=n):Ee.is(n)?s.command=n:s.edit=n,o&&a!==void 0&&(s.kind=a),s}t.create=r;function i(e){var n=e;return n&&x.string(n.title)&&(n.diagnostics===void 0||x.typedArray(n.diagnostics,ae.is))&&(n.kind===void 0||x.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||Ee.is(n.command))&&(n.isPreferred===void 0||x.boolean(n.isPreferred))&&(n.edit===void 0||Xe.is(n.edit))}t.is=i})(Ft||(Ft={}));var vr;(function(t){function r(e,n){var a={range:e};return x.defined(n)&&(a.data=n),a}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.range)&&(x.undefined(n.command)||Ee.is(n.command))}t.is=i})(vr||(vr={}));var yr;(function(t){function r(e,n){return{tabSize:e,insertSpaces:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.uinteger(n.tabSize)&&x.boolean(n.insertSpaces)}t.is=i})(yr||(yr={}));var Lt;(function(t){function r(e,n,a){return{range:e,target:n,data:a}}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.range)&&(x.undefined(n.target)||x.string(n.target))}t.is=i})(Lt||(Lt={}));var Ie;(function(t){function r(e,n){return{range:e,parent:n}}t.create=r;function i(e){var n=e;return n!==void 0&&U.is(n.range)&&(n.parent===void 0||t.is(n.parent))}t.is=i})(Ie||(Ie={}));var br;(function(t){function r(a,s,o,f){return new cn(a,s,o,f)}t.create=r;function i(a){var s=a;return!!(x.defined(s)&&x.string(s.uri)&&(x.undefined(s.languageId)||x.string(s.languageId))&&x.uinteger(s.lineCount)&&x.func(s.getText)&&x.func(s.positionAt)&&x.func(s.offsetAt))}t.is=i;function e(a,s){for(var o=a.getText(),f=n(s,function(m,p){var g=m.range.start.line-p.range.start.line;return g===0?m.range.start.character-p.range.start.character:g}),l=o.length,u=f.length-1;u>=0;u--){var c=f[u],h=a.offsetAt(c.range.start),d=a.offsetAt(c.range.end);if(d<=l)o=o.substring(0,h)+c.newText+o.substring(d,o.length);else throw new Error("Overlapping edit");l=h}return o}t.applyEdits=e;function n(a,s){if(a.length<=1)return a;var o=a.length/2|0,f=a.slice(0,o),l=a.slice(o);n(f,s),n(l,s);for(var u=0,c=0,h=0;u<f.length&&c<l.length;){var d=s(f[u],l[c]);d<=0?a[h++]=f[u++]:a[h++]=l[c++]}for(;u<f.length;)a[h++]=f[u++];for(;c<l.length;)a[h++]=l[c++];return a}})(br||(br={}));var cn=function(){function t(r,i,e,n){this._uri=r,this._languageId=i,this._version=e,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),e=this.offsetAt(r.end);return this._content.substring(i,e)}return this._content},t.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,e=!0,n=0;n<i.length;n++){e&&(r.push(n),e=!1);var a=i.charAt(n);e=a==="\r"||a===`
|
|
17
|
-
`,
|
|
18
|
-
`&&n++}e&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),e=0,n=i.length;if(n===0)return re.create(0,r);for(;e<n;){var a=Math.floor((e+n)/2);i[a]>r?n=a:e=a+1}var s=e-1;return re.create(s,r-i[s])},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var e=i[r.line],n=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(e+r.character,n),e)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}(),x;(function(t){var r=Object.prototype.toString;function i(d){return typeof d<"u"}t.defined=i;function e(d){return typeof d>"u"}t.undefined=e;function n(d){return d===!0||d===!1}t.boolean=n;function a(d){return r.call(d)==="[object String]"}t.string=a;function s(d){return r.call(d)==="[object Number]"}t.number=s;function o(d,m,p){return r.call(d)==="[object Number]"&&m<=d&&d<=p}t.numberRange=o;function f(d){return r.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}t.integer=f;function l(d){return r.call(d)==="[object Number]"&&0<=d&&d<=2147483647}t.uinteger=l;function u(d){return r.call(d)==="[object Function]"}t.func=u;function c(d){return d!==null&&typeof d=="object"}t.objectLiteral=c;function h(d,m){return Array.isArray(d)&&d.every(m)}t.typedArray=h})(x||(x={}));var Ye=class t{constructor(r,i,e,n){this._uri=r,this._languageId=i,this._version=e,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(r){if(r){let i=this.offsetAt(r.start),e=this.offsetAt(r.end);return this._content.substring(i,e)}return this._content}update(r,i){for(let e of r)if(t.isIncremental(e)){let n=Sr(e.range),a=this.offsetAt(n.start),s=this.offsetAt(n.end);this._content=this._content.substring(0,a)+e.text+this._content.substring(s,this._content.length);let o=Math.max(n.start.line,0),f=Math.max(n.end.line,0),l=this._lineOffsets,u=xr(e.text,!1,a);if(f-o===u.length)for(let h=0,d=u.length;h<d;h++)l[h+o+1]=u[h];else u.length<1e4?l.splice(o+1,f-o,...u):this._lineOffsets=l=l.slice(0,o+1).concat(u,l.slice(f+1));let c=e.text.length-(s-a);if(c!==0)for(let h=o+1+u.length,d=l.length;h<d;h++)l[h]=l[h]+c}else if(t.isFull(e))this._content=e.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=i}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=xr(this._content,!0)),this._lineOffsets}positionAt(r){r=Math.max(Math.min(r,this._content.length),0);let i=this.getLineOffsets(),e=0,n=i.length;if(n===0)return{line:0,character:r};for(;e<n;){let s=Math.floor((e+n)/2);i[s]>r?n=s:e=s+1}let a=e-1;return{line:a,character:r-i[a]}}offsetAt(r){let i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;let e=i[r.line],n=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(e+r.character,n),e)}get lineCount(){return this.getLineOffsets().length}static isIncremental(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}static isFull(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}},Ue;(function(t){function r(n,a,s,o){return new Ye(n,a,s,o)}t.create=r;function i(n,a,s){if(n instanceof Ye)return n.update(a,s),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=i;function e(n,a){let s=n.getText(),o=Vt(a.map(ln),(u,c)=>{let h=u.range.start.line-c.range.start.line;return h===0?u.range.start.character-c.range.start.character:h}),f=0,l=[];for(let u of o){let c=n.offsetAt(u.range.start);if(c<f)throw new Error("Overlapping edit");c>f&&l.push(s.substring(f,c)),u.newText.length&&l.push(u.newText),f=n.offsetAt(u.range.end)}return l.push(s.substr(f)),l.join("")}t.applyEdits=e})(Ue||(Ue={}));function Vt(t,r){if(t.length<=1)return t;let i=t.length/2|0,e=t.slice(0,i),n=t.slice(i);Vt(e,r),Vt(n,r);let a=0,s=0,o=0;for(;a<e.length&&s<n.length;)r(e[a],n[s])<=0?t[o++]=e[a++]:t[o++]=n[s++];for(;a<e.length;)t[o++]=e[a++];for(;s<n.length;)t[o++]=n[s++];return t}function xr(t,r,i=0){let e=r?[i]:[];for(let n=0;n<t.length;n++){let a=t.charCodeAt(n);(a===13||a===10)&&(a===13&&n+1<t.length&&t.charCodeAt(n+1)===10&&n++,e.push(i+n+1))}return e}function Sr(t){let r=t.start,i=t.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:t}function ln(t){let r=Sr(t.range);return r!==t.range?{newText:t.newText,range:r}:t}var W;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(W||(W={}));var Ke;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fe.Markdown,fe.PlainText],commitCharactersSupport:!0}}}}})(Ke||(Ke={}));function hn(t,r){let i;return r.length===0?i=t:i=t.replace(/\{(\d+)\}/g,(e,n)=>{let a=n[0];return typeof r[a]<"u"?r[a]:e}),i}function gn(t,r,...i){return hn(r,i)}function he(t){return gn}var we=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function e(){this.constructor=r}r.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}(),M=he(),dn={"color-hex":{errorMessage:M("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:M("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:M("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:M("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:M("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:M("hostnameFormatWarning","String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:M("ipv4FormatWarning","String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:M("ipv6FormatWarning","String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Te=function(){function t(r,i,e){e===void 0&&(e=0),this.offset=i,this.length=e,this.parent=r}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}();var pn=function(t){we(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="null",n.value=null,n}return r}(Te);var Ar=function(t){we(r,t);function r(i,e,n){var a=t.call(this,i,n)||this;return a.type="boolean",a.value=e,a}return r}(Te);var mn=function(t){we(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="array",n.items=[],n}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),r}(Te);var vn=function(t){we(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return r}(Te);var Dt=function(t){we(r,t);function r(i,e,n){var a=t.call(this,i,e,n)||this;return a.type="string",a.value="",a}return r}(Te);var yn=function(t){we(r,t);function r(i,e,n){var a=t.call(this,i,e)||this;return a.type="property",a.colonOffset=-1,a.keyNode=n,a}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),r}(Te);var bn=function(t){we(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),r}(Te);function K(t){return ie(t)?t?{}:{not:{}}:t}var wr;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(wr||(wr={}));var xn=function(){function t(r,i){r===void 0&&(r=-1),this.focusOffset=r,this.exclude=i,this.schemas=[]}return t.prototype.add=function(r){this.schemas.push(r)},t.prototype.merge=function(r){Array.prototype.push.apply(this.schemas,r.schemas)},t.prototype.include=function(r){return(this.focusOffset===-1||Rt(r,this.focusOffset))&&r!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),$t=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.add=function(r){},t.prototype.merge=function(r){},t.prototype.include=function(r){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),te=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(r){for(var i=0,e=r;i<e.length;i++){var n=e[i];this.merge(n)}},t.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},t.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,e=this.problems;i<e.length;i++){var n=e[i];n.code===W.EnumValueMismatch&&(n.message=M("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(a){return JSON.stringify(a)}).join(", ")))}}},t.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},t}();function Tr(t,r){return r===void 0&&(r=[]),new kr(t,r,[])}function de(t){return tr(t)}function Je(t){return er(t)}function Rt(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}var kr=function(){function t(r,i,e){i===void 0&&(i=[]),e===void 0&&(e=[]),this.root=r,this.syntaxErrors=i,this.comments=e}return t.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return Kt(this.root,r,i)},t.prototype.visit=function(r){if(this.root){var i=function(e){var n=r(e),a=e.children;if(Array.isArray(a))for(var s=0;s<a.length&&n;s++)n=i(a[s]);return n};i(this.root)}},t.prototype.validate=function(r,i,e){if(e===void 0&&(e=Z.Warning),this.root&&i){var n=new te;return _(this.root,i,n,$t.instance),n.problems.map(function(a){var s,o=U.create(r.positionAt(a.location.offset),r.positionAt(a.location.offset+a.location.length));return ae.create(o,a.message,(s=a.severity)!==null&&s!==void 0?s:e,a.code)})}},t.prototype.getMatchingSchemas=function(r,i,e){i===void 0&&(i=-1);var n=new xn(i,e);return this.root&&r&&_(this.root,r,new te,n),n.schemas},t}();function _(t,r,i,e){if(!t||!e.include(t))return;var n=t;switch(n.type){case"object":l(n,r,i,e);break;case"array":f(n,r,i,e);break;case"string":o(n,r,i,e);break;case"number":s(n,r,i,e);break;case"property":return _(n.valueNode,r,i,e)}a(),e.add({node:n,schema:r});function a(){function u(L){return n.type===L||L==="integer"&&n.type==="number"&&n.isInteger}if(Array.isArray(r.type)?r.type.some(u)||i.problems.push({location:{offset:n.offset,length:n.length},message:r.errorMessage||M("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",r.type.join(", "))}):r.type&&(u(r.type)||i.problems.push({location:{offset:n.offset,length:n.length},message:r.errorMessage||M("typeMismatchWarning",'Incorrect type. Expected "{0}".',r.type)})),Array.isArray(r.allOf))for(var c=0,h=r.allOf;c<h.length;c++){var d=h[c];_(n,K(d),i,e)}var m=K(r.not);if(m){var p=new te,g=e.newSub();_(n,m,p,g),p.hasProblems()||i.problems.push({location:{offset:n.offset,length:n.length},message:M("notSchemaWarning","Matches a schema that is not allowed.")});for(var b=0,y=g.schemas;b<y.length;b++){var v=y[b];v.inverted=!v.inverted,e.add(v)}}var O=function(L,R){for(var H=[],q=void 0,T=0,S=L;T<S.length;T++){var k=S[T],j=K(k),V=new te,$=e.newSub();if(_(n,j,V,$),V.hasProblems()||H.push(j),!q)q={schema:j,validationResult:V,matchingSchemas:$};else if(!R&&!V.hasProblems()&&!q.validationResult.hasProblems())q.matchingSchemas.merge($),q.validationResult.propertiesMatches+=V.propertiesMatches,q.validationResult.propertiesValueMatches+=V.propertiesValueMatches;else{var J=V.compare(q.validationResult);J>0?q={schema:j,validationResult:V,matchingSchemas:$}:J===0&&(q.matchingSchemas.merge($),q.validationResult.mergeEnumValues(V))}}return H.length>1&&R&&i.problems.push({location:{offset:n.offset,length:1},message:M("oneOfWarning","Matches multiple schemas when only one must validate.")}),q&&(i.merge(q.validationResult),i.propertiesMatches+=q.validationResult.propertiesMatches,i.propertiesValueMatches+=q.validationResult.propertiesValueMatches,e.merge(q.matchingSchemas)),H.length};Array.isArray(r.anyOf)&&O(r.anyOf,!1),Array.isArray(r.oneOf)&&O(r.oneOf,!0);var E=function(L){var R=new te,H=e.newSub();_(n,K(L),R,H),i.merge(R),i.propertiesMatches+=R.propertiesMatches,i.propertiesValueMatches+=R.propertiesValueMatches,e.merge(H)},I=function(L,R,H){var q=K(L),T=new te,S=e.newSub();_(n,q,T,S),e.merge(S),T.hasProblems()?H&&E(H):R&&E(R)},A=K(r.if);if(A&&I(A,K(r.then),K(r.else)),Array.isArray(r.enum)){for(var P=de(n),w=!1,C=0,F=r.enum;C<F.length;C++){var N=F[C];if(Pe(P,N)){w=!0;break}}i.enumValues=r.enum,i.enumValueMatch=w,w||i.problems.push({location:{offset:n.offset,length:n.length},code:W.EnumValueMismatch,message:r.errorMessage||M("enumWarning","Value is not accepted. Valid values: {0}.",r.enum.map(function(L){return JSON.stringify(L)}).join(", "))})}if(se(r.const)){var P=de(n);Pe(P,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:n.offset,length:n.length},code:W.EnumValueMismatch,message:r.errorMessage||M("constWarning","Value must be {0}.",JSON.stringify(r.const))}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&n.parent&&i.problems.push({location:{offset:n.parent.offset,length:n.parent.length},severity:Z.Warning,message:r.deprecationMessage,code:W.Deprecated})}function s(u,c,h,d){var m=u.value;function p(C){var F,N=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(C.toString());return N&&{value:Number(N[1]+(N[2]||"")),multiplier:(((F=N[2])===null||F===void 0?void 0:F.length)||0)-(parseInt(N[3])||0)}}if(ee(c.multipleOf)){var g=-1;if(Number.isInteger(c.multipleOf))g=m%c.multipleOf;else{var b=p(c.multipleOf),y=p(m);if(b&&y){var v=Math.pow(10,Math.abs(y.multiplier-b.multiplier));y.multiplier<b.multiplier?y.value*=v:b.value*=v,g=y.value%b.value}}g!==0&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("multipleOfWarning","Value is not divisible by {0}.",c.multipleOf)})}function O(C,F){if(ee(F))return F;if(ie(F)&&F)return C}function E(C,F){if(!ie(F)||!F)return C}var I=O(c.minimum,c.exclusiveMinimum);ee(I)&&m<=I&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",I)});var A=O(c.maximum,c.exclusiveMaximum);ee(A)&&m>=A&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var P=E(c.minimum,c.exclusiveMinimum);ee(P)&&m<P&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("minimumWarning","Value is below the minimum of {0}.",P)});var w=E(c.maximum,c.exclusiveMaximum);ee(w)&&m>w&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maximumWarning","Value is above the maximum of {0}.",w)})}function o(u,c,h,d){if(ee(c.minLength)&&u.value.length<c.minLength&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("minLengthWarning","String is shorter than the minimum length of {0}.",c.minLength)}),ee(c.maxLength)&&u.value.length>c.maxLength&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maxLengthWarning","String is longer than the maximum length of {0}.",c.maxLength)}),nr(c.pattern)){var m=xe(c.pattern);m?.test(u.value)||h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||M("patternWarning",'String does not match the pattern of "{0}".',c.pattern)})}if(c.format)switch(c.format){case"uri":case"uri-reference":{var p=void 0;if(!u.value)p=M("uriEmpty","URI expected.");else{var g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(u.value);g?!g[2]&&c.format==="uri"&&(p=M("uriSchemeMissing","URI with a scheme is expected.")):p=M("uriMissing","URI is expected.")}p&&h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||M("uriFormatWarning","String is not a URI: {0}",p)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":var b=dn[c.format];(!u.value||!b.pattern.exec(u.value))&&h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||b.errorMessage});default:}}function f(u,c,h,d){if(Array.isArray(c.items)){for(var m=c.items,p=0;p<m.length;p++){var g=m[p],b=K(g),y=new te,v=u.items[p];v?(_(v,b,y,d),h.mergePropertyMatch(y)):u.items.length>=m.length&&h.propertiesValueMatches++}if(u.items.length>m.length)if(typeof c.additionalItems=="object")for(var O=m.length;O<u.items.length;O++){var y=new te;_(u.items[O],c.additionalItems,y,d),h.mergePropertyMatch(y)}else c.additionalItems===!1&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",m.length)})}else{var E=K(c.items);if(E)for(var I=0,A=u.items;I<A.length;I++){var v=A[I],y=new te;_(v,E,y,d),h.mergePropertyMatch(y)}}var P=K(c.contains);if(P){var w=u.items.some(function(N){var L=new te;return _(N,P,L,$t.instance),!L.hasProblems()});w||h.problems.push({location:{offset:u.offset,length:u.length},message:c.errorMessage||M("requiredItemMissingWarning","Array does not contain required item.")})}if(ee(c.minItems)&&u.items.length<c.minItems&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("minItemsWarning","Array has too few items. Expected {0} or more.",c.minItems)}),ee(c.maxItems)&&u.items.length>c.maxItems&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maxItemsWarning","Array has too many items. Expected {0} or fewer.",c.maxItems)}),c.uniqueItems===!0){var C=de(u),F=C.some(function(N,L){return L!==C.lastIndexOf(N)});F&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("uniqueItemsWarning","Array has duplicate items.")})}}function l(u,c,h,d){for(var m=Object.create(null),p=[],g=0,b=u.properties;g<b.length;g++){var y=b[g],v=y.keyNode.value;m[v]=y.valueNode,p.push(v)}if(Array.isArray(c.required))for(var O=0,E=c.required;O<E.length;O++){var I=E[O];if(!m[I]){var A=u.parent&&u.parent.type==="property"&&u.parent.keyNode,P=A?{offset:A.offset,length:A.length}:{offset:u.offset,length:1};h.problems.push({location:P,message:M("MissingRequiredPropWarning",'Missing property "{0}".',I)})}}var w=function(Xt){for(var lt=p.indexOf(Xt);lt>=0;)p.splice(lt,1),lt=p.indexOf(Xt)};if(c.properties)for(var C=0,F=Object.keys(c.properties);C<F.length;C++){var I=F[C];w(I);var N=c.properties[I],L=m[I];if(L)if(ie(N))if(N)h.propertiesMatches++,h.propertiesValueMatches++;else{var y=L.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:c.errorMessage||M("DisallowedExtraPropWarning","Property {0} is not allowed.",I)})}else{var R=new te;_(L,N,R,d),h.mergePropertyMatch(R)}}if(c.patternProperties)for(var H=0,q=Object.keys(c.patternProperties);H<q.length;H++)for(var T=q[H],S=xe(T),k=0,j=p.slice(0);k<j.length;k++){var I=j[k];if(S?.test(I)){w(I);var L=m[I];if(L){var N=c.patternProperties[T];if(ie(N))if(N)h.propertiesMatches++,h.propertiesValueMatches++;else{var y=L.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:c.errorMessage||M("DisallowedExtraPropWarning","Property {0} is not allowed.",I)})}else{var R=new te;_(L,N,R,d),h.mergePropertyMatch(R)}}}}if(typeof c.additionalProperties=="object")for(var V=0,$=p;V<$.length;V++){var I=$[V],L=m[I];if(L){var R=new te;_(L,c.additionalProperties,R,d),h.mergePropertyMatch(R)}}else if(c.additionalProperties===!1&&p.length>0)for(var J=0,ue=p;J<ue.length;J++){var I=ue[J],L=m[I];if(L){var y=L.parent;h.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:c.errorMessage||M("DisallowedExtraPropWarning","Property {0} is not allowed.",I)})}}if(ee(c.maxProperties)&&u.properties.length>c.maxProperties&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("MaxPropWarning","Object has more properties than limit of {0}.",c.maxProperties)}),ee(c.minProperties)&&u.properties.length<c.minProperties&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("MinPropWarning","Object has fewer properties than the required number of {0}",c.minProperties)}),c.dependencies)for(var G=0,ne=Object.keys(c.dependencies);G<ne.length;G++){var v=ne[G],ke=m[v];if(ke){var ce=c.dependencies[v];if(Array.isArray(ce))for(var ut=0,Bt=ce;ut<Bt.length;ut++){var _t=Bt[ut];m[_t]?h.propertiesValueMatches++:h.problems.push({location:{offset:u.offset,length:u.length},message:M("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",_t,v)})}else{var N=K(ce);if(N){var R=new te;_(u,N,R,d),h.mergePropertyMatch(R)}}}}var Ht=K(c.propertyNames);if(Ht)for(var ct=0,Gt=u.properties;ct<Gt.length;ct++){var _r=Gt[ct],v=_r.keyNode;v&&_(v,Ht,h,$t.instance)}}}function Or(t,r){var i=[],e=-1,n=t.getText(),a=le(n,!1),s=r&&r.collectComments?[]:void 0;function o(){for(;;){var A=a.scan();switch(c(),A){case 12:case 13:Array.isArray(s)&&s.push(U.create(t.positionAt(a.getTokenOffset()),t.positionAt(a.getTokenOffset()+a.getTokenLength())));break;case 15:case 14:break;default:return A}}}function f(A){return a.getToken()===A?(o(),!0):!1}function l(A,P,w,C,F){if(F===void 0&&(F=Z.Error),i.length===0||w!==e){var N=U.create(t.positionAt(w),t.positionAt(C));i.push(ae.create(N,A,F,P,t.languageId)),e=w}}function u(A,P,w,C,F){w===void 0&&(w=void 0),C===void 0&&(C=[]),F===void 0&&(F=[]);var N=a.getTokenOffset(),L=a.getTokenOffset()+a.getTokenLength();if(N===L&&N>0){for(N--;N>0&&/\s/.test(n.charAt(N));)N--;L=N+1}if(l(A,P,N,L),w&&h(w,!1),C.length+F.length>0)for(var R=a.getToken();R!==17;){if(C.indexOf(R)!==-1){o();break}else if(F.indexOf(R)!==-1)break;R=o()}return w}function c(){switch(a.getTokenError()){case 4:return u(M("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return u(M("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return u(M("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return u(M("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return u(M("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return u(M("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function h(A,P){return A.length=a.getTokenOffset()+a.getTokenLength()-A.offset,P&&o(),A}function d(A){if(a.getToken()===3){var P=new mn(A,a.getTokenOffset());o();for(var w=0,C=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){C||u(M("ValueExpected","Value expected"),W.ValueExpected);var F=a.getTokenOffset();if(o(),a.getToken()===4){C&&l(M("TrailingComma","Trailing comma"),W.TrailingComma,F,F+1);continue}}else C&&u(M("ExpectedComma","Expected comma"),W.CommaExpected);var N=O(P);N?P.items.push(N):u(M("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),C=!0}return a.getToken()!==4?u(M("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,P):h(P,!0)}}var m=new Dt(void 0,0,0);function p(A,P){var w=new yn(A,a.getTokenOffset(),m),C=b(w);if(!C)if(a.getToken()===16){u(M("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var F=new Dt(w,a.getTokenOffset(),a.getTokenLength());F.value=a.getTokenValue(),C=F,o()}else return;w.keyNode=C;var N=P[C.value];if(N?(l(M("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,Z.Warning),typeof N=="object"&&l(M("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,N.keyNode.offset,N.keyNode.offset+N.keyNode.length,Z.Warning),P[C.value]=!0):P[C.value]=w,a.getToken()===6)w.colonOffset=a.getTokenOffset(),o();else if(u(M("ColonExpected","Colon expected"),W.ColonExpected),a.getToken()===10&&t.positionAt(C.offset+C.length).line<t.positionAt(a.getTokenOffset()).line)return w.length=C.length,w;var L=O(w);return L?(w.valueNode=L,w.length=L.offset+L.length-w.offset,w):u(M("ValueExpected","Value expected"),W.ValueExpected,w,[],[2,5])}function g(A){if(a.getToken()===1){var P=new bn(A,a.getTokenOffset()),w=Object.create(null);o();for(var C=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){C||u(M("PropertyExpected","Property expected"),W.PropertyExpected);var F=a.getTokenOffset();if(o(),a.getToken()===2){C&&l(M("TrailingComma","Trailing comma"),W.TrailingComma,F,F+1);continue}}else C&&u(M("ExpectedComma","Expected comma"),W.CommaExpected);var N=p(P,w);N?P.properties.push(N):u(M("PropertyExpected","Property expected"),W.PropertyExpected,void 0,[],[2,5]),C=!0}return a.getToken()!==2?u(M("ExpectedCloseBrace","Expected comma or closing brace"),W.CommaOrCloseBraceExpected,P):h(P,!0)}}function b(A){if(a.getToken()===10){var P=new Dt(A,a.getTokenOffset());return P.value=a.getTokenValue(),h(P,!0)}}function y(A){if(a.getToken()===11){var P=new vn(A,a.getTokenOffset());if(a.getTokenError()===0){var w=a.getTokenValue();try{var C=JSON.parse(w);if(!ee(C))return u(M("InvalidNumberFormat","Invalid number format."),W.Undefined,P);P.value=C}catch{return u(M("InvalidNumberFormat","Invalid number format."),W.Undefined,P)}P.isInteger=w.indexOf(".")===-1}return h(P,!0)}}function v(A){var P;switch(a.getToken()){case 7:return h(new pn(A,a.getTokenOffset()),!0);case 8:return h(new Ar(A,!0,a.getTokenOffset()),!0);case 9:return h(new Ar(A,!1,a.getTokenOffset()),!0);default:return}}function O(A){return d(A)||g(A)||b(A)||y(A)||v(A)}var E=void 0,I=o();return I!==17&&(E=O(E),E?a.getToken()!==17&&u(M("End of file expected","End of file expected."),W.Undefined):u(M("Invalid symbol","Expected a JSON object, array or literal."),W.Undefined)),new kr(E,i,s)}function tt(t,r,i){if(t!==null&&typeof t=="object"){var e=r+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var n=`[
|
|
19
|
-
|
|
20
|
-
`;return
|
|
21
|
-
|
|
22
|
-
`}return n+=r+"}",n}}return i(t)}var Ut=he(),Sn=[",","}","]"],An=[":"],Cr=function(){function t(r,i,e,n){i===void 0&&(i=[]),e===void 0&&(e=Promise),n===void 0&&(n={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=e,this.clientCapabilities=n}return t.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--){var e=this.contributions[i].resolveCompletion;if(e){var n=e(r);if(n)return n}}return this.promiseConstructor.resolve(r)},t.prototype.doComplete=function(r,i,e){var n=this,a={items:[],isIncomplete:!1},s=r.getText(),o=r.offsetAt(i),f=e.getNodeFromOffset(o,!0);if(this.isInComment(r,f?f.offset:0,o))return Promise.resolve(a);if(f&&o===f.offset+f.length&&o>0){var l=s[o-1];(f.type==="object"&&l==="}"||f.type==="array"&&l==="]")&&(f=f.parent)}var u=this.getCurrentWord(r,o),c;if(f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null"))c=U.create(r.positionAt(f.offset),r.positionAt(f.offset+f.length));else{var h=o-u.length;h>0&&s[h-1]==='"'&&h--,c=U.create(r.positionAt(h),i)}var d=!1,m={},p={add:function(g){var b=g.label,y=m[b];if(y)y.documentation||(y.documentation=g.documentation),y.detail||(y.detail=g.detail);else{if(b=b.replace(/[\n]/g,"\u21B5"),b.length>60){var v=b.substr(0,57).trim()+"...";m[v]||(b=v)}c&&g.insertText!==void 0&&(g.textEdit=Y.replace(c,g.insertText)),d&&(g.commitCharacters=g.kind===Q.Property?An:Sn),g.label=b,m[b]=g,a.items.push(g)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(g){console.error(g)},log:function(g){console.log(g)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(r.uri,e).then(function(g){var b=[],y=!0,v="",O=void 0;if(f&&f.type==="string"){var E=f.parent;E&&E.type==="property"&&E.keyNode===f&&(y=!E.valueNode,O=E,v=s.substr(f.offset+1,f.length-2),E&&(f=E.parent))}if(f&&f.type==="object"){if(f.offset===o)return a;var I=f.properties;I.forEach(function(C){(!O||O!==C)&&(m[C.keyNode.value]=$e.create("__"))});var A="";y&&(A=n.evaluateSeparatorAfter(r,r.offsetAt(c.end))),g?n.getPropertyCompletions(g,e,f,y,A,p):n.getSchemaLessPropertyCompletions(e,f,v,p);var P=Je(f);n.contributions.forEach(function(C){var F=C.collectPropertyCompletions(r.uri,P,u,y,A==="",p);F&&b.push(F)}),!g&&u.length>0&&s.charAt(o-u.length-1)!=='"'&&(p.add({kind:Q.Property,label:n.getLabelForValue(u),insertText:n.getInsertTextForProperty(u,void 0,!1,A),insertTextFormat:z.Snippet,documentation:""}),p.setAsIncomplete())}var w={};return g?n.getValueCompletions(g,e,f,o,r,p,w):n.getSchemaLessValueCompletions(e,f,o,r,p),n.contributions.length>0&&n.getContributedValueCompletions(e,f,o,r,p,b),n.promiseConstructor.all(b).then(function(){if(p.getNumberOfProposals()===0){var C=o;f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null")&&(C=f.offset+f.length);var F=n.evaluateSeparatorAfter(r,C);n.addFillerValueCompletions(w,F,p)}return a})})},t.prototype.getPropertyCompletions=function(r,i,e,n,a,s){var o=this,f=i.getMatchingSchemas(r.schema,e.offset);f.forEach(function(l){if(l.node===e&&!l.inverted){var u=l.schema.properties;u&&Object.keys(u).forEach(function(p){var g=u[p];if(typeof g=="object"&&!g.deprecationMessage&&!g.doNotSuggest){var b={kind:Q.Property,label:p,insertText:o.getInsertTextForProperty(p,g,n,a),insertTextFormat:z.Snippet,filterText:o.getFilterTextForValue(p),documentation:o.fromMarkup(g.markdownDescription)||g.description||""};g.suggestSortText!==void 0&&(b.sortText=g.suggestSortText),b.insertText&&pe(b.insertText,"$1".concat(a))&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(b)}});var c=l.schema.propertyNames;if(typeof c=="object"&&!c.deprecationMessage&&!c.doNotSuggest){var h=function(p,g){g===void 0&&(g=void 0);var b={kind:Q.Property,label:p,insertText:o.getInsertTextForProperty(p,void 0,n,a),insertTextFormat:z.Snippet,filterText:o.getFilterTextForValue(p),documentation:g||o.fromMarkup(c.markdownDescription)||c.description||""};c.suggestSortText!==void 0&&(b.sortText=c.suggestSortText),b.insertText&&pe(b.insertText,"$1".concat(a))&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(b)};if(c.enum)for(var d=0;d<c.enum.length;d++){var m=void 0;c.markdownEnumDescriptions&&d<c.markdownEnumDescriptions.length?m=o.fromMarkup(c.markdownEnumDescriptions[d]):c.enumDescriptions&&d<c.enumDescriptions.length&&(m=c.enumDescriptions[d]),h(c.enum[d],m)}c.const&&h(c.const)}}})},t.prototype.getSchemaLessPropertyCompletions=function(r,i,e,n){var a=this,s=function(f){f.properties.forEach(function(l){var u=l.keyNode.value;n.add({kind:Q.Property,label:u,insertText:a.getInsertTextForValue(u,""),insertTextFormat:z.Snippet,filterText:a.getFilterTextForValue(u),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var o=i.parent.keyNode.value;r.visit(function(f){return f.type==="property"&&f!==i.parent&&f.keyNode.value===o&&f.valueNode&&f.valueNode.type==="object"&&s(f.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(f){f.type==="object"&&f!==i&&s(f)});else i.type==="object"&&n.add({kind:Q.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:z.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},t.prototype.getSchemaLessValueCompletions=function(r,i,e,n,a){var s=this,o=e;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(o=i.offset+i.length,i=i.parent),!i){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:z.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:z.Snippet,documentation:""});return}var f=this.evaluateSeparatorAfter(n,o),l=function(d){d.parent&&!Rt(d.parent,e,!0)&&a.add({kind:s.getSuggestionKind(d.type),label:s.getLabelTextForMatchingNode(d,n),insertText:s.getInsertTextForMatchingNode(d,n,f),insertTextFormat:z.Snippet,documentation:""}),d.type==="boolean"&&s.addBooleanValueCompletion(!d.value,f,a)};if(i.type==="property"&&e>(i.colonOffset||0)){var u=i.valueNode;if(u&&(e>u.offset+u.length||u.type==="object"||u.type==="array"))return;var c=i.keyNode.value;r.visit(function(d){return d.type==="property"&&d.keyNode.value===c&&d.valueNode&&l(d.valueNode),!0}),c==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(f,a)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var h=i.parent.keyNode.value;r.visit(function(d){return d.type==="property"&&d.keyNode.value===h&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(l),!0})}else i.items.forEach(l)},t.prototype.getValueCompletions=function(r,i,e,n,a,s,o){var f=n,l=void 0,u=void 0;if(e&&(e.type==="string"||e.type==="number"||e.type==="boolean"||e.type==="null")&&(f=e.offset+e.length,u=e,e=e.parent),!e){this.addSchemaValueCompletions(r.schema,"",s,o);return}if(e.type==="property"&&n>(e.colonOffset||0)){var c=e.valueNode;if(c&&n>c.offset+c.length)return;l=e.keyNode.value,e=e.parent}if(e&&(l!==void 0||e.type==="array")){for(var h=this.evaluateSeparatorAfter(a,f),d=i.getMatchingSchemas(r.schema,e.offset,u),m=0,p=d;m<p.length;m++){var g=p[m];if(g.node===e&&!g.inverted&&g.schema){if(e.type==="array"&&g.schema.items)if(Array.isArray(g.schema.items)){var b=this.findItemAtOffset(e,a,n);b<g.schema.items.length&&this.addSchemaValueCompletions(g.schema.items[b],h,s,o)}else this.addSchemaValueCompletions(g.schema.items,h,s,o);if(l!==void 0){var y=!1;if(g.schema.properties){var v=g.schema.properties[l];v&&(y=!0,this.addSchemaValueCompletions(v,h,s,o))}if(g.schema.patternProperties&&!y)for(var O=0,E=Object.keys(g.schema.patternProperties);O<E.length;O++){var I=E[O],A=xe(I);if(A?.test(l)){y=!0;var v=g.schema.patternProperties[I];this.addSchemaValueCompletions(v,h,s,o)}}if(g.schema.additionalProperties&&!y){var v=g.schema.additionalProperties;this.addSchemaValueCompletions(v,h,s,o)}}}}l==="$schema"&&!e.parent&&this.addDollarSchemaCompletions(h,s),o.boolean&&(this.addBooleanValueCompletion(!0,h,s),this.addBooleanValueCompletion(!1,h,s)),o.null&&this.addNullValueCompletion(h,s)}},t.prototype.getContributedValueCompletions=function(r,i,e,n,a,s){if(!i)this.contributions.forEach(function(u){var c=u.collectDefaultCompletions(n.uri,a);c&&s.push(c)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i&&i.type==="property"&&e>(i.colonOffset||0)){var o=i.keyNode.value,f=i.valueNode;if((!f||e<=f.offset+f.length)&&i.parent){var l=Je(i.parent);this.contributions.forEach(function(u){var c=u.collectValueCompletions(n.uri,l,o,a);c&&s.push(c)})}}},t.prototype.addSchemaValueCompletions=function(r,i,e,n){var a=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,e),this.addDefaultValueCompletions(r,i,e),this.collectTypes(r,n),Array.isArray(r.allOf)&&r.allOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}))},t.prototype.addDefaultValueCompletions=function(r,i,e,n){var a=this;n===void 0&&(n=0);var s=!1;if(se(r.default)){for(var o=r.type,f=r.default,l=n;l>0;l--)f=[f],o="array";e.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(f),insertText:this.getInsertTextForValue(f,i),insertTextFormat:z.Snippet,detail:Ut("json.suggest.default","Default value")}),s=!0}Array.isArray(r.examples)&&r.examples.forEach(function(u){for(var c=r.type,h=u,d=n;d>0;d--)h=[h],c="array";e.add({kind:a.getSuggestionKind(c),label:a.getLabelForValue(h),insertText:a.getInsertTextForValue(h,i),insertTextFormat:z.Snippet}),s=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(u){var c=r.type,h=u.body,d=u.label,m,p;if(se(h)){for(var g=r.type,b=n;b>0;b--)h=[h],g="array";m=a.getInsertTextForSnippetValue(h,i),p=a.getFilterTextForSnippetValue(h),d=d||a.getLabelForSnippetValue(h)}else if(typeof u.bodyText=="string"){for(var y="",v="",O="",b=n;b>0;b--)y=y+O+`[
|
|
23
|
-
`,
|
|
24
|
-
`+
|
|
20
|
+
`}return e&&e.eol||`
|
|
21
|
+
`}function ht(e,t){return`\r
|
|
22
|
+
`.indexOf(e.charAt(t))!==-1}var De;(function(e){e.DEFAULT={allowTrailingComma:!1}})(De||(De={}));function an(e,t=[],r=De.DEFAULT){let n=null,i=[],s=[];function o(l){Array.isArray(i)?i.push(l):n!==null&&(i[n]=l)}return ln(e,{onObjectBegin:()=>{let l={};o(l),s.push(i),i=l,n=null},onObjectProperty:l=>{n=l},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let l=[];o(l),s.push(i),i=l,n=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:o,onError:(l,a,u)=>{t.push({error:l,offset:a,length:u})}},r),i[0]}function gt(e){if(!e.parent||!e.parent.children)return[];let t=gt(e.parent);if(e.parent.type==="property"){let r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){let r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function Re(e){switch(e.type){case"array":return e.children.map(Re);case"object":let t=Object.create(null);for(let r of e.children){let n=r.children[1];n&&(t[r.children[0].value]=Re(n))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Pr(e,t,r=!1){return t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function mt(e,t,r=!1){if(Pr(e,t,r)){let n=e.children;if(Array.isArray(n))for(let i=0;i<n.length&&n[i].offset<=t;i++){let s=mt(n[i],t,r);if(s)return s}return e}}function ln(e,t,r=De.DEFAULT){let n=Se(e,!1),i=[];function s(v){return v?()=>v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function o(v){return v?()=>v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function c(v){return v?P=>v(P,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function l(v){return v?P=>v(P,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}let a=o(t.onObjectBegin),u=l(t.onObjectProperty),f=s(t.onObjectEnd),d=o(t.onArrayBegin),h=s(t.onArrayEnd),p=l(t.onLiteralValue),m=c(t.onSeparator),y=s(t.onComment),k=c(t.onError),w=r&&r.disallowComments,g=r&&r.allowTrailingComma;function S(){for(;;){let v=n.scan();switch(n.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:w||x(11);break;case 2:x(12);break;case 6:x(16);break}switch(v){case 12:case 13:w?x(10):y();break;case 16:x(1);break;case 15:case 14:break;default:return v}}}function x(v,P=[],L=[]){if(k(v),P.length+L.length>0){let $=n.getToken();for(;$!==17;){if(P.indexOf($)!==-1){S();break}else if(L.indexOf($)!==-1)break;$=S()}}}function T(v){let P=n.getTokenValue();return v?p(P):(u(P),i.push(P)),S(),!0}function O(){switch(n.getToken()){case 11:let v=n.getTokenValue(),P=Number(v);isNaN(P)&&(x(2),P=0),p(P);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return S(),!0}function I(){return n.getToken()!==10?(x(3,[],[2,5]),!1):(T(!1),n.getToken()===6?(m(":"),S(),N()||x(4,[],[2,5])):x(5,[],[2,5]),i.pop(),!0)}function E(){a(),S();let v=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(v||x(4,[],[]),m(","),S(),n.getToken()===2&&g)break}else v&&x(6,[],[]);I()||x(4,[],[2,5]),v=!0}return f(),n.getToken()!==2?x(7,[2],[]):S(),!0}function j(){d(),S();let v=!0,P=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(P||x(4,[],[]),m(","),S(),n.getToken()===4&&g)break}else P&&x(6,[],[]);v?(i.push(0),v=!1):i[i.length-1]++,N()||x(4,[],[4,5]),P=!0}return h(),v||i.pop(),n.getToken()!==4?x(8,[4],[]):S(),!0}function N(){switch(n.getToken()){case 3:return j();case 1:return E();case 10:return T(!0);default:return O()}}return S(),n.getToken()===17?r.allowEmptyContent?!0:(x(4,[],[]),!1):N()?(n.getToken()!==17&&x(9,[],[]),!0):(x(4,[],[]),!1)}var ee=Se,cn;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(cn||(cn={}));var fn;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(fn||(fn={}));var dn=an;var hn=mt,pn=gt,gn=Re;var un;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(un||(un={}));function mn(e,t,r){return pt(e,t,r)}function ge(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!ge(e[r],t[r]))return!1}else{let i=[];for(n in e)i.push(n);i.sort();let s=[];for(n in t)s.push(n);if(s.sort(),!ge(i,s))return!1;for(r=0;r<i.length;r++)if(!ge(e[i[r]],t[i[r]]))return!1}return!0}function W(e){return typeof e=="number"}function Y(e){return typeof e<"u"}function te(e){return typeof e=="boolean"}function Ue(e){return typeof e=="string"}function oe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function jr(e,t){if(e.length<t.length)return!1;for(let r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function fe(e,t){let r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function me(e){let t="";jr(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function bt(e){let t=0;for(let r=0;r<e.length;r++){t++;let n=e.charCodeAt(r);55296<=n&&n<=56319&&r++}return t}var vt;(function(e){function t(r){return typeof r=="string"}e.is=t})(vt||(vt={}));var xt;(function(e){function t(r){return typeof r=="string"}e.is=t})(xt||(xt={}));var bn;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(bn||(bn={}));var Be;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(Be||(Be={}));var D;(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=Be.MAX_VALUE),i===Number.MAX_VALUE&&(i=Be.MAX_VALUE),{line:n,character:i}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.line)&&b.uinteger(i.character)}e.is=r})(D||(D={}));var _;(function(e){function t(n,i,s,o){if(b.uinteger(n)&&b.uinteger(i)&&b.uinteger(s)&&b.uinteger(o))return{start:D.create(n,i),end:D.create(s,o)};if(D.is(n)&&D.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${s}, ${o}]`)}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&D.is(i.start)&&D.is(i.end)}e.is=r})(_||(_={}));var ue;(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&_.is(i.range)&&(b.string(i.uri)||b.undefined(i.uri))}e.is=r})(ue||(ue={}));var vn;(function(e){function t(n,i,s,o){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&_.is(i.targetRange)&&b.string(i.targetUri)&&_.is(i.targetSelectionRange)&&(_.is(i.originSelectionRange)||b.undefined(i.originSelectionRange))}e.is=r})(vn||(vn={}));var Je;(function(e){function t(n,i,s,o){return{red:n,green:i,blue:s,alpha:o}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&b.numberRange(i.red,0,1)&&b.numberRange(i.green,0,1)&&b.numberRange(i.blue,0,1)&&b.numberRange(i.alpha,0,1)}e.is=r})(Je||(Je={}));var kt;(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&_.is(i.range)&&Je.is(i.color)}e.is=r})(kt||(kt={}));var At;(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.undefined(i.textEdit)||G.is(i))&&(b.undefined(i.additionalTextEdits)||b.typedArray(i.additionalTextEdits,G.is))}e.is=r})(At||(At={}));var ye;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ye||(ye={}));var St;(function(e){function t(n,i,s,o,c,l){let a={startLine:n,endLine:i};return b.defined(s)&&(a.startCharacter=s),b.defined(o)&&(a.endCharacter=o),b.defined(c)&&(a.kind=c),b.defined(l)&&(a.collapsedText=l),a}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.startLine)&&b.uinteger(i.startLine)&&(b.undefined(i.startCharacter)||b.uinteger(i.startCharacter))&&(b.undefined(i.endCharacter)||b.uinteger(i.endCharacter))&&(b.undefined(i.kind)||b.string(i.kind))}e.is=r})(St||(St={}));var wt;(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&ue.is(i.location)&&b.string(i.message)}e.is=r})(wt||(wt={}));var z;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(z||(z={}));var xn;(function(e){e.Unnecessary=1,e.Deprecated=2})(xn||(xn={}));var kn;(function(e){function t(r){let n=r;return b.objectLiteral(n)&&b.string(n.href)}e.is=t})(kn||(kn={}));var ne;(function(e){function t(n,i,s,o,c,l){let a={range:n,message:i};return b.defined(s)&&(a.severity=s),b.defined(o)&&(a.code=o),b.defined(c)&&(a.source=c),b.defined(l)&&(a.relatedInformation=l),a}e.create=t;function r(n){var i;let s=n;return b.defined(s)&&_.is(s.range)&&b.string(s.message)&&(b.number(s.severity)||b.undefined(s.severity))&&(b.integer(s.code)||b.string(s.code)||b.undefined(s.code))&&(b.undefined(s.codeDescription)||b.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(b.string(s.source)||b.undefined(s.source))&&(b.undefined(s.relatedInformation)||b.typedArray(s.relatedInformation,wt.is))}e.is=r})(ne||(ne={}));var be;(function(e){function t(n,i,...s){let o={title:n,command:i};return b.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function r(n){let i=n;return b.defined(i)&&b.string(i.title)&&b.string(i.command)}e.is=r})(be||(be={}));var G;(function(e){function t(s,o){return{range:s,newText:o}}e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){let o=s;return b.objectLiteral(o)&&b.string(o.newText)&&_.is(o.range)}e.is=i})(G||(G={}));var Ot;(function(e){function t(n,i,s){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(b.string(i.description)||i.description===void 0)}e.is=r})(Ot||(Ot={}));var Te;(function(e){function t(r){let n=r;return b.string(n)}e.is=t})(Te||(Te={}));var An;(function(e){function t(s,o,c){return{range:s,newText:o,annotationId:c}}e.replace=t;function r(s,o,c){return{range:{start:s,end:s},newText:o,annotationId:c}}e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}e.del=n;function i(s){let o=s;return G.is(o)&&(Ot.is(o.annotationId)||Te.is(o.annotationId))}e.is=i})(An||(An={}));var Ce;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&It.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Ce||(Ce={}));var Tt;(function(e){function t(n,i,s){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&b.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Te.is(i.annotationId))}e.is=r})(Tt||(Tt={}));var Nt;(function(e){function t(n,i,s,o){let c={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(c.options=s),o!==void 0&&(c.annotationId=o),c}e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&b.string(i.oldUri)&&b.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Te.is(i.annotationId))}e.is=r})(Nt||(Nt={}));var Pt;(function(e){function t(n,i,s){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&b.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||b.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||b.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Te.is(i.annotationId))}e.is=r})(Pt||(Pt={}));var qe;(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>b.string(i.kind)?Tt.is(i)||Nt.is(i)||Pt.is(i):Ce.is(i)))}e.is=t})(qe||(qe={}));var Sn;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)}e.is=r})(Sn||(Sn={}));var Lt;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.integer(i.version)}e.is=r})(Lt||(Lt={}));var It;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&(i.version===null||b.integer(i.version))}e.is=r})(It||(It={}));var wn;(function(e){function t(n,i,s,o){return{uri:n,languageId:i,version:s,text:o}}e.create=t;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.string(i.languageId)&&b.integer(i.version)&&b.string(i.text)}e.is=r})(wn||(wn={}));var le;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}e.is=t})(le||(le={}));var Ne;(function(e){function t(r){let n=r;return b.objectLiteral(r)&&le.is(n.kind)&&b.string(n.value)}e.is=t})(Ne||(Ne={}));var H;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(H||(H={}));var R;(function(e){e.PlainText=1,e.Snippet=2})(R||(R={}));var Et;(function(e){e.Deprecated=1})(Et||(Et={}));var On;(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){let i=n;return i&&b.string(i.newText)&&_.is(i.insert)&&_.is(i.replace)}e.is=r})(On||(On={}));var Tn;(function(e){e.asIs=1,e.adjustIndentation=2})(Tn||(Tn={}));var Nn;(function(e){function t(r){let n=r;return n&&(b.string(n.detail)||n.detail===void 0)&&(b.string(n.description)||n.description===void 0)}e.is=t})(Nn||(Nn={}));var Ee;(function(e){function t(r){return{label:r}}e.create=t})(Ee||(Ee={}));var _t;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(_t||(_t={}));var _e;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){let i=n;return b.string(i)||b.objectLiteral(i)&&b.string(i.language)&&b.string(i.value)}e.is=r})(_e||(_e={}));var jt;(function(e){function t(r){let n=r;return!!n&&b.objectLiteral(n)&&(Ne.is(n.contents)||_e.is(n.contents)||b.typedArray(n.contents,_e.is))&&(r.range===void 0||_.is(r.range))}e.is=t})(jt||(jt={}));var Pn;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(Pn||(Pn={}));var Ln;(function(e){function t(r,n,...i){let s={label:r};return b.defined(n)&&(s.documentation=n),b.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(Ln||(Ln={}));var Vt;(function(e){e.Text=1,e.Read=2,e.Write=3})(Vt||(Vt={}));var Mt;(function(e){function t(r,n){let i={range:r};return b.number(n)&&(i.kind=n),i}e.create=t})(Mt||(Mt={}));var re;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(re||(re={}));var In;(function(e){e.Deprecated=1})(In||(In={}));var Ft;(function(e){function t(r,n,i,s,o){let c={name:r,kind:n,location:{uri:s,range:i}};return o&&(c.containerName=o),c}e.create=t})(Ft||(Ft={}));var En;(function(e){function t(r,n,i,s){return s!==void 0?{name:r,kind:n,location:{uri:i,range:s}}:{name:r,kind:n,location:{uri:i}}}e.create=t})(En||(En={}));var $t;(function(e){function t(n,i,s,o,c,l){let a={name:n,detail:i,kind:s,range:o,selectionRange:c};return l!==void 0&&(a.children=l),a}e.create=t;function r(n){let i=n;return i&&b.string(i.name)&&b.number(i.kind)&&_.is(i.range)&&_.is(i.selectionRange)&&(i.detail===void 0||b.string(i.detail))&&(i.deprecated===void 0||b.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})($t||($t={}));var Dt;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Dt||(Dt={}));var We;(function(e){e.Invoked=1,e.Automatic=2})(We||(We={}));var Rt;(function(e){function t(n,i,s){let o={diagnostics:n};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}e.create=t;function r(n){let i=n;return b.defined(i)&&b.typedArray(i.diagnostics,ne.is)&&(i.only===void 0||b.typedArray(i.only,b.string))&&(i.triggerKind===void 0||i.triggerKind===We.Invoked||i.triggerKind===We.Automatic)}e.is=r})(Rt||(Rt={}));var Ut;(function(e){function t(n,i,s){let o={title:n},c=!0;return typeof i=="string"?(c=!1,o.kind=i):be.is(i)?o.command=i:o.edit=i,c&&s!==void 0&&(o.kind=s),o}e.create=t;function r(n){let i=n;return i&&b.string(i.title)&&(i.diagnostics===void 0||b.typedArray(i.diagnostics,ne.is))&&(i.kind===void 0||b.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||be.is(i.command))&&(i.isPreferred===void 0||b.boolean(i.isPreferred))&&(i.edit===void 0||qe.is(i.edit))}e.is=r})(Ut||(Ut={}));var _n;(function(e){function t(n,i){let s={range:n};return b.defined(i)&&(s.data=i),s}e.create=t;function r(n){let i=n;return b.defined(i)&&_.is(i.range)&&(b.undefined(i.command)||be.is(i.command))}e.is=r})(_n||(_n={}));var jn;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&b.uinteger(i.tabSize)&&b.boolean(i.insertSpaces)}e.is=r})(jn||(jn={}));var Bt;(function(e){function t(n,i,s){return{range:n,target:i,data:s}}e.create=t;function r(n){let i=n;return b.defined(i)&&_.is(i.range)&&(b.undefined(i.target)||b.string(i.target))}e.is=r})(Bt||(Bt={}));var Pe;(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&_.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(Pe||(Pe={}));var Vn;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Vn||(Vn={}));var Mn;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Mn||(Mn={}));var Fn;(function(e){function t(r){let n=r;return b.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=t})(Fn||(Fn={}));var $n;(function(e){function t(n,i){return{range:n,text:i}}e.create=t;function r(n){let i=n;return i!=null&&_.is(i.range)&&b.string(i.text)}e.is=r})($n||($n={}));var Dn;(function(e){function t(n,i,s){return{range:n,variableName:i,caseSensitiveLookup:s}}e.create=t;function r(n){let i=n;return i!=null&&_.is(i.range)&&b.boolean(i.caseSensitiveLookup)&&(b.string(i.variableName)||i.variableName===void 0)}e.is=r})(Dn||(Dn={}));var Rn;(function(e){function t(n,i){return{range:n,expression:i}}e.create=t;function r(n){let i=n;return i!=null&&_.is(i.range)&&(b.string(i.expression)||i.expression===void 0)}e.is=r})(Rn||(Rn={}));var Un;(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}e.create=t;function r(n){let i=n;return b.defined(i)&&_.is(n.stoppedLocation)}e.is=r})(Un||(Un={}));var Jt;(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}e.is=t})(Jt||(Jt={}));var Ct;(function(e){function t(n){return{value:n}}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&(i.tooltip===void 0||b.string(i.tooltip)||Ne.is(i.tooltip))&&(i.location===void 0||ue.is(i.location))&&(i.command===void 0||be.is(i.command))}e.is=r})(Ct||(Ct={}));var Bn;(function(e){function t(n,i,s){let o={position:n,label:i};return s!==void 0&&(o.kind=s),o}e.create=t;function r(n){let i=n;return b.objectLiteral(i)&&D.is(i.position)&&(b.string(i.label)||b.typedArray(i.label,Ct.is))&&(i.kind===void 0||Jt.is(i.kind))&&i.textEdits===void 0||b.typedArray(i.textEdits,G.is)&&(i.tooltip===void 0||b.string(i.tooltip)||Ne.is(i.tooltip))&&(i.paddingLeft===void 0||b.boolean(i.paddingLeft))&&(i.paddingRight===void 0||b.boolean(i.paddingRight))}e.is=r})(Bn||(Bn={}));var Jn;(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t})(Jn||(Jn={}));var Cn;(function(e){function t(r,n,i,s){return{insertText:r,filterText:n,range:i,command:s}}e.create=t})(Cn||(Cn={}));var qn;(function(e){function t(r){return{items:r}}e.create=t})(qn||(qn={}));var Wn;(function(e){e.Invoked=0,e.Automatic=1})(Wn||(Wn={}));var zn;(function(e){function t(r,n){return{range:r,text:n}}e.create=t})(zn||(zn={}));var Hn;(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}e.create=t})(Hn||(Hn={}));var Gn;(function(e){function t(r){let n=r;return b.objectLiteral(n)&&xt.is(n.uri)&&b.string(n.name)}e.is=t})(Gn||(Gn={}));var Xn;(function(e){function t(s,o,c,l){return new qt(s,o,c,l)}e.create=t;function r(s){let o=s;return!!(b.defined(o)&&b.string(o.uri)&&(b.undefined(o.languageId)||b.string(o.languageId))&&b.uinteger(o.lineCount)&&b.func(o.getText)&&b.func(o.positionAt)&&b.func(o.offsetAt))}e.is=r;function n(s,o){let c=s.getText(),l=i(o,(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),a=c.length;for(let u=l.length-1;u>=0;u--){let f=l[u],d=s.offsetAt(f.range.start),h=s.offsetAt(f.range.end);if(h<=a)c=c.substring(0,d)+f.newText+c.substring(h,c.length);else throw new Error("Overlapping edit");a=d}return c}e.applyEdits=n;function i(s,o){if(s.length<=1)return s;let c=s.length/2|0,l=s.slice(0,c),a=s.slice(c);i(l,o),i(a,o);let u=0,f=0,d=0;for(;u<l.length&&f<a.length;)o(l[u],a[f])<=0?s[d++]=l[u++]:s[d++]=a[f++];for(;u<l.length;)s[d++]=l[u++];for(;f<a.length;)s[d++]=a[f++];return s}})(Xn||(Xn={}));var qt=class{constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(t.push(i),n=!1);let s=r.charAt(i);n=s==="\r"||s===`
|
|
23
|
+
`,s==="\r"&&i+1<r.length&&r.charAt(i+1)===`
|
|
24
|
+
`&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return D.create(0,t);for(;n<i;){let o=Math.floor((n+i)/2);r[o]>t?i=o:n=o+1}let s=n-1;return D.create(s,t-r[s])}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)}get lineCount(){return this.getLineOffsets().length}},b;(function(e){let t=Object.prototype.toString;function r(h){return typeof h<"u"}e.defined=r;function n(h){return typeof h>"u"}e.undefined=n;function i(h){return h===!0||h===!1}e.boolean=i;function s(h){return t.call(h)==="[object String]"}e.string=s;function o(h){return t.call(h)==="[object Number]"}e.number=o;function c(h,p,m){return t.call(h)==="[object Number]"&&p<=h&&h<=m}e.numberRange=c;function l(h){return t.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}e.integer=l;function a(h){return t.call(h)==="[object Number]"&&0<=h&&h<=2147483647}e.uinteger=a;function u(h){return t.call(h)==="[object Function]"}e.func=u;function f(h){return h!==null&&typeof h=="object"}e.objectLiteral=f;function d(h,p){return Array.isArray(h)&&h.every(p)}e.typedArray=d})(b||(b={}));var ze=class e{constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(e.isIncremental(n)){let i=Qn(n.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(o,this._content.length);let c=Math.max(i.start.line,0),l=Math.max(i.end.line,0),a=this._lineOffsets,u=Zn(n.text,!1,s);if(l-c===u.length)for(let d=0,h=u.length;d<h;d++)a[d+c+1]=u[d];else u.length<1e4?a.splice(c+1,l-c,...u):this._lineOffsets=a=a.slice(0,c+1).concat(u,a.slice(l+1));let f=n.text.length-(o-s);if(f!==0)for(let d=c+1+u.length,h=a.length;d<h;d++)a[d]=a[d]+f}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zn(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){let o=Math.floor((n+i)/2);r[o]>t?i=o:n=o+1}let s=n-1;return{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},X;(function(e){function t(i,s,o,c){return new ze(i,s,o,c)}e.create=t;function r(i,s,o){if(i instanceof ze)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,s){let o=i.getText(),c=Wt(s.map(Vr),(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),l=0,a=[];for(let u of c){let f=i.offsetAt(u.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&a.push(o.substring(l,f)),u.newText.length&&a.push(u.newText),l=i.offsetAt(u.range.end)}return a.push(o.substr(l)),a.join("")}e.applyEdits=n})(X||(X={}));function Wt(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Wt(n,t),Wt(i,t);let s=0,o=0,c=0;for(;s<n.length&&o<i.length;)t(n[s],i[o])<=0?e[c++]=n[s++]:e[c++]=i[o++];for(;s<n.length;)e[c++]=n[s++];for(;o<i.length;)e[c++]=i[o++];return e}function Zn(e,t,r=0){let n=t?[r]:[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function Qn(e){let t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function Vr(e){let t=Qn(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var M;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"})(M||(M={}));var ie;(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(ie||(ie={}));var He;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[le.Markdown,le.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(He||(He={}));var Mr;function A(...e){let t=e[0],r,n,i;if(typeof t=="string")r=t,n=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){let o=e.slice(1);if(t.length!==o.length+1)throw new Error("expected a string as the first argument to l10n.t");let c=t[0];for(let l=1;l<t.length;l++)c+=`{${l-1}}`+t[l];return A(c,...o)}else n=t.message,r=n,t.comment&&t.comment.length>0&&(r+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};let s=Mr?.[r];return s?typeof s=="string"?Ge(s,i):s.comment?Ge(s.message,i):Ge(n,i):Ge(n,i)}var Fr=/{([^}]+)}/g;function Ge(e,t){return Object.keys(t).length===0?e:e.replace(Fr,(r,n)=>t[n]??r)}var $r={"color-hex":{errorMessage:A("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:A("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:A("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:A("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:A("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:A("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:A("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:A("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},ce=class{constructor(t,r,n=0){this.offset=r,this.length=n,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},zt=class extends ce{constructor(t,r){super(t,r),this.type="null",this.value=null}},Xe=class extends ce{constructor(t,r,n){super(t,n),this.type="boolean",this.value=r}},Ht=class extends ce{constructor(t,r){super(t,r),this.type="array",this.items=[]}get children(){return this.items}},Gt=class extends ce{constructor(t,r){super(t,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},je=class extends ce{constructor(t,r,n){super(t,r,n),this.type="string",this.value=""}},Xt=class extends ce{constructor(t,r,n){super(t,r),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Zt=class extends ce{constructor(t,r){super(t,r),this.type="object",this.properties=[]}get children(){return this.properties}};function Z(e){return te(e)?e?{}:{not:{}}:e}var Yn;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Yn||(Yn={}));var Dr={"http://json-schema.org/draft-03/schema#":ie.v3,"http://json-schema.org/draft-04/schema#":ie.v4,"http://json-schema.org/draft-06/schema#":ie.v6,"http://json-schema.org/draft-07/schema#":ie.v7,"https://json-schema.org/draft/2019-09/schema":ie.v2019_09,"https://json-schema.org/draft/2020-12/schema":ie.v2020_12},Ze=class{constructor(t){this.schemaDraft=t}},Qt=class e{constructor(t=-1,r){this.focusOffset=t,this.exclude=r,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||Yt(t,this.focusOffset))&&t!==this.exclude}newSub(){return new e(-1,this.exclude)}},ve=class{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}};ve.instance=new ve;var q=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(let r of this.problems)r.code===M.EnumValueMismatch&&(r.message=A("Value is not accepted. Valid values: {0}.",this.enumValues.map(n=>JSON.stringify(n)).join(", ")))}}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(r=>this.processedProperties.add(r))}compare(t){let r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}};function er(e,t=[]){return new Qe(e,t,[])}function ae(e){return gn(e)}function Ve(e){return pn(e)}function Yt(e,t,r=!1){return t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var Qe=class{constructor(t,r=[],n=[]){this.root=t,this.syntaxErrors=r,this.comments=n}getNodeFromOffset(t,r=!1){if(this.root)return hn(this.root,t,r)}visit(t){if(this.root){let r=n=>{let i=t(n),s=n.children;if(Array.isArray(s))for(let o=0;o<s.length&&i;o++)i=r(s[o]);return i};r(this.root)}}validate(t,r,n=z.Warning,i){if(this.root&&r){let s=new q;return C(this.root,r,s,ve.instance,new Ze(i??Kn(r))),s.problems.map(o=>{let c=_.create(t.positionAt(o.location.offset),t.positionAt(o.location.offset+o.location.length));return ne.create(c,o.message,o.severity??n,o.code)})}}getMatchingSchemas(t,r=-1,n){if(this.root&&t){let i=new Qt(r,n),s=Kn(t),o=new Ze(s);return C(this.root,t,new q,i,o),i.schemas}return[]}};function Kn(e,t=ie.v2020_12){let r=e.$schema;return r?Dr[r]??t:t}function C(e,t,r,n,i){if(!e||!n.include(e))return;if(e.type==="property")return C(e.valueNode,t,r,n,i);let s=e;switch(o(),s.type){case"object":u(s);break;case"array":a(s);break;case"string":l(s);break;case"number":c(s);break}n.add({node:s,schema:t});function o(){function f(w){return s.type===w||w==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(f)||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||A("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(f(t.type)||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||A('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(let w of t.allOf){let g=new q,S=n.newSub();C(s,Z(w),g,S,i),r.merge(g),n.merge(S)}let d=Z(t.not);if(d){let w=new q,g=n.newSub();C(s,d,w,g,i),w.hasProblems()||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||A("Matches a schema that is not allowed.")});for(let S of g.schemas)S.inverted=!S.inverted,n.add(S)}let h=(w,g)=>{let S=[],x;for(let T of w){let O=Z(T),I=new q,E=n.newSub();if(C(s,O,I,E,i),I.hasProblems()||S.push(O),!x)x={schema:O,validationResult:I,matchingSchemas:E};else if(!g&&!I.hasProblems()&&!x.validationResult.hasProblems())x.matchingSchemas.merge(E),x.validationResult.propertiesMatches+=I.propertiesMatches,x.validationResult.propertiesValueMatches+=I.propertiesValueMatches,x.validationResult.mergeProcessedProperties(I);else{let j=I.compare(x.validationResult);j>0?x={schema:O,validationResult:I,matchingSchemas:E}:j===0&&(x.matchingSchemas.merge(E),x.validationResult.mergeEnumValues(I))}}return S.length>1&&g&&r.problems.push({location:{offset:s.offset,length:1},message:A("Matches multiple schemas when only one must validate.")}),x&&(r.merge(x.validationResult),n.merge(x.matchingSchemas)),S.length};Array.isArray(t.anyOf)&&h(t.anyOf,!1),Array.isArray(t.oneOf)&&h(t.oneOf,!0);let p=w=>{let g=new q,S=n.newSub();C(s,Z(w),g,S,i),r.merge(g),n.merge(S)},m=(w,g,S)=>{let x=Z(w),T=new q,O=n.newSub();C(s,x,T,O,i),n.merge(O),r.mergeProcessedProperties(T),T.hasProblems()?S&&p(S):g&&p(g)},y=Z(t.if);if(y&&m(y,Z(t.then),Z(t.else)),Array.isArray(t.enum)){let w=ae(s),g=!1;for(let S of t.enum)if(ge(w,S)){g=!0;break}r.enumValues=t.enum,r.enumValueMatch=g,g||r.problems.push({location:{offset:s.offset,length:s.length},code:M.EnumValueMismatch,message:t.errorMessage||A("Value is not accepted. Valid values: {0}.",t.enum.map(S=>JSON.stringify(S)).join(", "))})}if(Y(t.const)){let w=ae(s);ge(w,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:s.offset,length:s.length},code:M.EnumValueMismatch,message:t.errorMessage||A("Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}let k=t.deprecationMessage;if(k||t.deprecated){k=k||A("Value is deprecated");let w=s.parent?.type==="property"?s.parent:s;r.problems.push({location:{offset:w.offset,length:w.length},severity:z.Warning,message:k,code:M.Deprecated})}}function c(f){let d=f.value;function h(S){let x=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(S.toString());return x&&{value:Number(x[1]+(x[2]||"")),multiplier:(x[2]?.length||0)-(parseInt(x[3])||0)}}if(W(t.multipleOf)){let S=-1;if(Number.isInteger(t.multipleOf))S=d%t.multipleOf;else{let x=h(t.multipleOf),T=h(d);if(x&&T){let O=10**Math.abs(T.multiplier-x.multiplier);T.multiplier<x.multiplier?T.value*=O:x.value*=O,S=T.value%x.value}}S!==0&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Value is not divisible by {0}.",t.multipleOf)})}function p(S,x){if(W(x))return x;if(te(x)&&x)return S}function m(S,x){if(!te(x)||!x)return S}let y=p(t.minimum,t.exclusiveMinimum);W(y)&&d<=y&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Value is below the exclusive minimum of {0}.",y)});let k=p(t.maximum,t.exclusiveMaximum);W(k)&&d>=k&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Value is above the exclusive maximum of {0}.",k)});let w=m(t.minimum,t.exclusiveMinimum);W(w)&&d<w&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Value is below the minimum of {0}.",w)});let g=m(t.maximum,t.exclusiveMaximum);W(g)&&d>g&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Value is above the maximum of {0}.",g)})}function l(f){if(W(t.minLength)&&bt(f.value)<t.minLength&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("String is shorter than the minimum length of {0}.",t.minLength)}),W(t.maxLength)&&bt(f.value)>t.maxLength&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("String is longer than the maximum length of {0}.",t.maxLength)}),Ue(t.pattern)&&(me(t.pattern)?.test(f.value)||r.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||A('String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":{let h;if(!f.value)h=A("URI expected.");else{let p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);p?!p[2]&&t.format==="uri"&&(h=A("URI with a scheme is expected.")):h=A("URI is expected.")}h&&r.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||A("String is not a URI: {0}",h)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let d=$r[t.format];(!f.value||!d.pattern.exec(f.value))&&r.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||d.errorMessage});default:}}function a(f){let d,h;i.schemaDraft>=ie.v2020_12?(d=t.prefixItems,h=Array.isArray(t.items)?void 0:t.items):(d=Array.isArray(t.items)?t.items:void 0,h=Array.isArray(t.items)?t.additionalItems:t.items);let p=0;if(d!==void 0){let k=Math.min(d.length,f.items.length);for(;p<k;p++){let w=d[p],g=Z(w),S=new q,x=f.items[p];x&&(C(x,g,S,n,i),r.mergePropertyMatch(S)),r.processedProperties.add(String(p))}}if(h!==void 0&&p<f.items.length)if(typeof h=="boolean")for(h===!1&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Array has too many items according to schema. Expected {0} or fewer.",p)});p<f.items.length;p++)r.processedProperties.add(String(p)),r.propertiesValueMatches++;else for(;p<f.items.length;p++){let k=new q;C(f.items[p],h,k,n,i),r.mergePropertyMatch(k),r.processedProperties.add(String(p))}let m=Z(t.contains);if(m){let k=0;for(let w=0;w<f.items.length;w++){let g=f.items[w],S=new q;C(g,m,S,ve.instance,i),S.hasProblems()||(k++,i.schemaDraft>=ie.v2020_12&&r.processedProperties.add(String(w)))}k===0&&!W(t.minContains)&&r.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||A("Array does not contain required item.")}),W(t.minContains)&&k<t.minContains&&r.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||A("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),W(t.maxContains)&&k>t.maxContains&&r.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||A("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let y=t.unevaluatedItems;if(y!==void 0)for(let k=0;k<f.items.length;k++){if(!r.processedProperties.has(String(k)))if(y===!1)r.problems.push({location:{offset:f.offset,length:f.length},message:A("Item does not match any validation rule from the array.")});else{let w=new q;C(f.items[k],t.unevaluatedItems,w,n,i),r.mergePropertyMatch(w)}r.processedProperties.add(String(k)),r.propertiesValueMatches++}if(W(t.minItems)&&f.items.length<t.minItems&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Array has too few items. Expected {0} or more.",t.minItems)}),W(t.maxItems)&&f.items.length>t.maxItems&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let w=function(){for(let g=0;g<k.length-1;g++){let S=k[g];for(let x=g+1;x<k.length;x++)if(ge(S,k[x]))return!0}return!1},k=ae(f);w()&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Array has duplicate items.")})}}function u(f){let d=Object.create(null),h=new Set;for(let g of f.properties){let S=g.keyNode.value;d[S]=g.valueNode,h.add(S)}if(Array.isArray(t.required)){for(let g of t.required)if(!d[g]){let S=f.parent&&f.parent.type==="property"&&f.parent.keyNode,x=S?{offset:S.offset,length:S.length}:{offset:f.offset,length:1};r.problems.push({location:x,message:A('Missing property "{0}".',g)})}}let p=g=>{h.delete(g),r.processedProperties.add(g)};if(t.properties)for(let g of Object.keys(t.properties)){p(g);let S=t.properties[g],x=d[g];if(x)if(te(S))if(S)r.propertiesMatches++,r.propertiesValueMatches++;else{let T=x.parent;r.problems.push({location:{offset:T.keyNode.offset,length:T.keyNode.length},message:t.errorMessage||A("Property {0} is not allowed.",g)})}else{let T=new q;C(x,S,T,n,i),r.mergePropertyMatch(T)}}if(t.patternProperties)for(let g of Object.keys(t.patternProperties)){let S=me(g);if(S){let x=[];for(let T of h)if(S.test(T)){x.push(T);let O=d[T];if(O){let I=t.patternProperties[g];if(te(I))if(I)r.propertiesMatches++,r.propertiesValueMatches++;else{let E=O.parent;r.problems.push({location:{offset:E.keyNode.offset,length:E.keyNode.length},message:t.errorMessage||A("Property {0} is not allowed.",T)})}else{let E=new q;C(O,I,E,n,i),r.mergePropertyMatch(E)}}}x.forEach(p)}}let m=t.additionalProperties;if(m!==void 0)for(let g of h){p(g);let S=d[g];if(S){if(m===!1){let x=S.parent;r.problems.push({location:{offset:x.keyNode.offset,length:x.keyNode.length},message:t.errorMessage||A("Property {0} is not allowed.",g)})}else if(m!==!0){let x=new q;C(S,m,x,n,i),r.mergePropertyMatch(x)}}}let y=t.unevaluatedProperties;if(y!==void 0){let g=[];for(let S of h)if(!r.processedProperties.has(S)){g.push(S);let x=d[S];if(x){if(y===!1){let T=x.parent;r.problems.push({location:{offset:T.keyNode.offset,length:T.keyNode.length},message:t.errorMessage||A("Property {0} is not allowed.",S)})}else if(y!==!0){let T=new q;C(x,y,T,n,i),r.mergePropertyMatch(T)}}}g.forEach(p)}if(W(t.maxProperties)&&f.properties.length>t.maxProperties&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Object has more properties than limit of {0}.",t.maxProperties)}),W(t.minProperties)&&f.properties.length<t.minProperties&&r.problems.push({location:{offset:f.offset,length:f.length},message:A("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let g in t.dependentRequired){let S=d[g],x=t.dependentRequired[g];S&&Array.isArray(x)&&w(g,x)}if(t.dependentSchemas)for(let g in t.dependentSchemas){let S=d[g],x=t.dependentSchemas[g];S&&oe(x)&&w(g,x)}if(t.dependencies)for(let g in t.dependencies)d[g]&&w(g,t.dependencies[g]);let k=Z(t.propertyNames);if(k)for(let g of f.properties){let S=g.keyNode;S&&C(S,k,r,ve.instance,i)}function w(g,S){if(Array.isArray(S))for(let x of S)d[x]?r.propertiesValueMatches++:r.problems.push({location:{offset:f.offset,length:f.length},message:A("Object is missing property {0} required by property {1}.",x,g)});else{let x=Z(S);if(x){let T=new q;C(f,x,T,n,i),r.mergePropertyMatch(T)}}}}}function tr(e,t){let r=[],n=-1,i=e.getText(),s=ee(i,!1),o=t&&t.collectComments?[]:void 0;function c(){for(;;){let O=s.scan();switch(f(),O){case 12:case 13:Array.isArray(o)&&o.push(_.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return O}}}function l(O){return s.getToken()===O?(c(),!0):!1}function a(O,I,E,j,N=z.Error){if(r.length===0||E!==n){let v=_.create(e.positionAt(E),e.positionAt(j));r.push(ne.create(v,O,N,I,e.languageId)),n=E}}function u(O,I,E=void 0,j=[],N=[]){let v=s.getTokenOffset(),P=s.getTokenOffset()+s.getTokenLength();if(v===P&&v>0){for(v--;v>0&&/\s/.test(i.charAt(v));)v--;P=v+1}if(a(O,I,v,P),E&&d(E,!1),j.length+N.length>0){let L=s.getToken();for(;L!==17;){if(j.indexOf(L)!==-1){c();break}else if(N.indexOf(L)!==-1)break;L=c()}}return E}function f(){switch(s.getTokenError()){case 4:return u(A("Invalid unicode sequence in string."),M.InvalidUnicode),!0;case 5:return u(A("Invalid escape character in string."),M.InvalidEscapeCharacter),!0;case 3:return u(A("Unexpected end of number."),M.UnexpectedEndOfNumber),!0;case 1:return u(A("Unexpected end of comment."),M.UnexpectedEndOfComment),!0;case 2:return u(A("Unexpected end of string."),M.UnexpectedEndOfString),!0;case 6:return u(A("Invalid characters in string. Control characters must be escaped."),M.InvalidCharacter),!0}return!1}function d(O,I){return O.length=s.getTokenOffset()+s.getTokenLength()-O.offset,I&&c(),O}function h(O){if(s.getToken()!==3)return;let I=new Ht(O,s.getTokenOffset());c();let E=0,j=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){j||u(A("Value expected"),M.ValueExpected);let v=s.getTokenOffset();if(c(),s.getToken()===4){j&&a(A("Trailing comma"),M.TrailingComma,v,v+1);continue}}else j&&u(A("Expected comma"),M.CommaExpected);let N=S(I);N?I.items.push(N):u(A("Value expected"),M.ValueExpected,void 0,[],[4,5]),j=!0}return s.getToken()!==4?u(A("Expected comma or closing bracket"),M.CommaOrCloseBacketExpected,I):d(I,!0)}let p=new je(void 0,0,0);function m(O,I){let E=new Xt(O,s.getTokenOffset(),p),j=k(E);if(!j)if(s.getToken()===16){u(A("Property keys must be doublequoted"),M.PropertyKeysMustBeDoublequoted);let v=new je(E,s.getTokenOffset(),s.getTokenLength());v.value=s.getTokenValue(),j=v,c()}else return;if(E.keyNode=j,j.value!=="//"){let v=I[j.value];v?(a(A("Duplicate object key"),M.DuplicateKey,E.keyNode.offset,E.keyNode.offset+E.keyNode.length,z.Warning),oe(v)&&a(A("Duplicate object key"),M.DuplicateKey,v.keyNode.offset,v.keyNode.offset+v.keyNode.length,z.Warning),I[j.value]=!0):I[j.value]=E}if(s.getToken()===6)E.colonOffset=s.getTokenOffset(),c();else if(u(A("Colon expected"),M.ColonExpected),s.getToken()===10&&e.positionAt(j.offset+j.length).line<e.positionAt(s.getTokenOffset()).line)return E.length=j.length,E;let N=S(E);return N?(E.valueNode=N,E.length=N.offset+N.length-E.offset,E):u(A("Value expected"),M.ValueExpected,E,[],[2,5])}function y(O){if(s.getToken()!==1)return;let I=new Zt(O,s.getTokenOffset()),E=Object.create(null);c();let j=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){j||u(A("Property expected"),M.PropertyExpected);let v=s.getTokenOffset();if(c(),s.getToken()===2){j&&a(A("Trailing comma"),M.TrailingComma,v,v+1);continue}}else j&&u(A("Expected comma"),M.CommaExpected);let N=m(I,E);N?I.properties.push(N):u(A("Property expected"),M.PropertyExpected,void 0,[],[2,5]),j=!0}return s.getToken()!==2?u(A("Expected comma or closing brace"),M.CommaOrCloseBraceExpected,I):d(I,!0)}function k(O){if(s.getToken()!==10)return;let I=new je(O,s.getTokenOffset());return I.value=s.getTokenValue(),d(I,!0)}function w(O){if(s.getToken()!==11)return;let I=new Gt(O,s.getTokenOffset());if(s.getTokenError()===0){let E=s.getTokenValue();try{let j=JSON.parse(E);if(!W(j))return u(A("Invalid number format."),M.Undefined,I);I.value=j}catch{return u(A("Invalid number format."),M.Undefined,I)}I.isInteger=E.indexOf(".")===-1}return d(I,!0)}function g(O){let I;switch(s.getToken()){case 7:return d(new zt(O,s.getTokenOffset()),!0);case 8:return d(new Xe(O,!0,s.getTokenOffset()),!0);case 9:return d(new Xe(O,!1,s.getTokenOffset()),!0);default:return}}function S(O){return h(O)||y(O)||k(O)||w(O)||g(O)}let x;return c()!==17&&(x=S(x),x?s.getToken()!==17&&u(A("End of file expected."),M.Undefined):u(A("Expected a JSON object, array or literal."),M.Undefined)),new Qe(x,r,o)}function Ke(e,t,r){if(e!==null&&typeof e=="object"){let n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";let i=`[
|
|
25
|
+
`;for(let s=0;s<e.length;s++)i+=n+Ke(e[s],n,r),s<e.length-1&&(i+=","),i+=`
|
|
26
|
+
`;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let s=`{
|
|
27
|
+
`;for(let o=0;o<i.length;o++){let c=i[o];s+=n+JSON.stringify(c)+": "+Ke(e[c],n,r),o<i.length-1&&(s+=","),s+=`
|
|
28
|
+
`}return s+=t+"}",s}}return r(e)}var Rr=[",","}","]"],Ur=[":"],et=class{constructor(t,r=[],n=Promise,i={}){this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}doResolve(t){for(let r=this.contributions.length-1;r>=0;r--){let n=this.contributions[r].resolveCompletion;if(n){let i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,r,n){let i={items:[],isIncomplete:!1},s=t.getText(),o=t.offsetAt(r),c=n.getNodeFromOffset(o,!0);if(this.isInComment(t,c?c.offset:0,o))return Promise.resolve(i);if(c&&o===c.offset+c.length&&o>0){let h=s[o-1];(c.type==="object"&&h==="}"||c.type==="array"&&h==="]")&&(c=c.parent)}let l=this.getCurrentWord(t,o),a;if(c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null"))a=_.create(t.positionAt(c.offset),t.positionAt(c.offset+c.length));else{let h=o-l.length;h>0&&s[h-1]==='"'&&h--,a=_.create(t.positionAt(h),r)}let u=!1,f=new Map,d={add:h=>{let p=h.label,m=f.get(p);if(m)m.documentation||(m.documentation=h.documentation),m.detail||(m.detail=h.detail),m.labelDetails||(m.labelDetails=h.labelDetails);else{if(p=p.replace(/[\n]/g,"\u21B5"),p.length>60){let y=p.substr(0,57).trim()+"...";f.has(y)||(p=y)}h.textEdit=G.replace(a,h.insertText),u&&(h.commitCharacters=h.kind===H.Property?Ur:Rr),h.label=p,f.set(p,h),i.items.push(h)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:h=>{console.error(h)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,n).then(h=>{let p=[],m=!0,y="",k;if(c&&c.type==="string"){let g=c.parent;g&&g.type==="property"&&g.keyNode===c&&(m=!g.valueNode,k=g,y=s.substr(c.offset+1,c.length-2),g&&(c=g.parent))}if(c&&c.type==="object"){if(c.offset===o)return i;c.properties.forEach(T=>{(!k||k!==T)&&f.set(T.keyNode.value,Ee.create("__"))});let S="";m&&(S=this.evaluateSeparatorAfter(t,t.offsetAt(a.end))),h?this.getPropertyCompletions(h,n,c,m,S,d):this.getSchemaLessPropertyCompletions(n,c,y,d);let x=Ve(c);this.contributions.forEach(T=>{let O=T.collectPropertyCompletions(t.uri,x,l,m,S==="",d);O&&p.push(O)}),!h&&l.length>0&&s.charAt(o-l.length-1)!=='"'&&(d.add({kind:H.Property,label:this.getLabelForValue(l),insertText:this.getInsertTextForProperty(l,void 0,!1,S),insertTextFormat:R.Snippet,documentation:""}),d.setAsIncomplete())}let w={};return h?this.getValueCompletions(h,n,c,o,t,d,w):this.getSchemaLessValueCompletions(n,c,o,t,d),this.contributions.length>0&&this.getContributedValueCompletions(n,c,o,t,d,p),this.promiseConstructor.all(p).then(()=>{if(d.getNumberOfProposals()===0){let g=o;c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null")&&(g=c.offset+c.length);let S=this.evaluateSeparatorAfter(t,g);this.addFillerValueCompletions(w,S,d)}return i})})}getPropertyCompletions(t,r,n,i,s,o){r.getMatchingSchemas(t.schema,n.offset).forEach(l=>{if(l.node===n&&!l.inverted){let a=l.schema.properties;a&&Object.keys(a).forEach(f=>{let d=a[f];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let h={kind:H.Property,label:f,insertText:this.getInsertTextForProperty(f,d,i,s),insertTextFormat:R.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.suggestSortText!==void 0&&(h.sortText=d.suggestSortText),h.insertText&&fe(h.insertText,`$1${s}`)&&(h.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(h)}});let u=l.schema.propertyNames;if(typeof u=="object"&&!u.deprecationMessage&&!u.doNotSuggest){let f=(d,h=void 0)=>{let p={kind:H.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:R.Snippet,filterText:this.getFilterTextForValue(d),documentation:h||this.fromMarkup(u.markdownDescription)||u.description||""};u.suggestSortText!==void 0&&(p.sortText=u.suggestSortText),p.insertText&&fe(p.insertText,`$1${s}`)&&(p.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(p)};if(u.enum)for(let d=0;d<u.enum.length;d++){let h;u.markdownEnumDescriptions&&d<u.markdownEnumDescriptions.length?h=this.fromMarkup(u.markdownEnumDescriptions[d]):u.enumDescriptions&&d<u.enumDescriptions.length&&(h=u.enumDescriptions[d]),f(u.enum[d],h)}u.const&&f(u.const)}}})}getSchemaLessPropertyCompletions(t,r,n,i){let s=o=>{o.properties.forEach(c=>{let l=c.keyNode.value;i.add({kind:H.Property,label:l,insertText:this.getInsertTextForValue(l,""),insertTextFormat:R.Snippet,filterText:this.getFilterTextForValue(l),documentation:""})})};if(r.parent)if(r.parent.type==="property"){let o=r.parent.keyNode.value;t.visit(c=>(c.type==="property"&&c!==r.parent&&c.keyNode.value===o&&c.valueNode&&c.valueNode.type==="object"&&s(c.valueNode),!0))}else r.parent.type==="array"&&r.parent.items.forEach(o=>{o.type==="object"&&o!==r&&s(o)});else r.type==="object"&&i.add({kind:H.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:R.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,r,n,i,s){let o=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:R.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:R.Snippet,documentation:""});return}let c=this.evaluateSeparatorAfter(i,o),l=a=>{a.parent&&!Yt(a.parent,n,!0)&&s.add({kind:this.getSuggestionKind(a.type),label:this.getLabelTextForMatchingNode(a,i),insertText:this.getInsertTextForMatchingNode(a,i,c),insertTextFormat:R.Snippet,documentation:""}),a.type==="boolean"&&this.addBooleanValueCompletion(!a.value,c,s)};if(r.type==="property"&&n>(r.colonOffset||0)){let a=r.valueNode;if(a&&(n>a.offset+a.length||a.type==="object"||a.type==="array"))return;let u=r.keyNode.value;t.visit(f=>(f.type==="property"&&f.keyNode.value===u&&f.valueNode&&l(f.valueNode),!0)),u==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(c,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){let a=r.parent.keyNode.value;t.visit(u=>(u.type==="property"&&u.keyNode.value===a&&u.valueNode&&u.valueNode.type==="array"&&u.valueNode.items.forEach(l),!0))}else r.items.forEach(l)}getValueCompletions(t,r,n,i,s,o,c){let l=i,a,u;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(l=n.offset+n.length,u=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",o,c);return}if(n.type==="property"&&i>(n.colonOffset||0)){let f=n.valueNode;if(f&&i>f.offset+f.length)return;a=n.keyNode.value,n=n.parent}if(n&&(a!==void 0||n.type==="array")){let f=this.evaluateSeparatorAfter(s,l),d=r.getMatchingSchemas(t.schema,n.offset,u);for(let h of d)if(h.node===n&&!h.inverted&&h.schema){if(n.type==="array"&&h.schema.items){let p=o;if(h.schema.uniqueItems){let m=new Set;n.children.forEach(y=>{y.type!=="array"&&y.type!=="object"&&m.add(this.getLabelForValue(ae(y)))}),p={...o,add(y){m.has(y.label)||o.add(y)}}}if(Array.isArray(h.schema.items)){let m=this.findItemAtOffset(n,s,i);m<h.schema.items.length&&this.addSchemaValueCompletions(h.schema.items[m],f,p,c)}else this.addSchemaValueCompletions(h.schema.items,f,p,c)}if(a!==void 0){let p=!1;if(h.schema.properties){let m=h.schema.properties[a];m&&(p=!0,this.addSchemaValueCompletions(m,f,o,c))}if(h.schema.patternProperties&&!p){for(let m of Object.keys(h.schema.patternProperties))if(me(m)?.test(a)){p=!0;let k=h.schema.patternProperties[m];this.addSchemaValueCompletions(k,f,o,c)}}if(h.schema.additionalProperties&&!p){let m=h.schema.additionalProperties;this.addSchemaValueCompletions(m,f,o,c)}}}a==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(f,o),c.boolean&&(this.addBooleanValueCompletion(!0,f,o),this.addBooleanValueCompletion(!1,f,o)),c.null&&this.addNullValueCompletion(f,o)}}getContributedValueCompletions(t,r,n,i,s,o){if(!r)this.contributions.forEach(c=>{let l=c.collectDefaultCompletions(i.uri,s);l&&o.push(l)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){let c=r.keyNode.value,l=r.valueNode;if((!l||n<=l.offset+l.length)&&r.parent){let a=Ve(r.parent);this.contributions.forEach(u=>{let f=u.collectValueCompletions(i.uri,a,c,s);f&&o.push(f)})}}}addSchemaValueCompletions(t,r,n,i){typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)))}addDefaultValueCompletions(t,r,n,i=0){let s=!1;if(Y(t.default)){let o=t.type,c=t.default;for(let a=i;a>0;a--)c=[c],o="array";let l={kind:this.getSuggestionKind(o),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,r),insertTextFormat:R.Snippet};this.doesSupportsLabelDetails()?l.labelDetails={description:A("Default value")}:l.detail=A("Default value"),n.add(l),s=!0}Array.isArray(t.examples)&&t.examples.forEach(o=>{let c=t.type,l=o;for(let a=i;a>0;a--)l=[l],c="array";n.add({kind:this.getSuggestionKind(c),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,r),insertTextFormat:R.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(o=>{let c=t.type,l=o.body,a=o.label,u,f;if(Y(l)){let d=t.type;for(let h=i;h>0;h--)l=[l],d="array";u=this.getInsertTextForSnippetValue(l,r),f=this.getFilterTextForSnippetValue(l),a=a||this.getLabelForSnippetValue(l)}else if(typeof o.bodyText=="string"){let d="",h="",p="";for(let m=i;m>0;m--)d=d+p+`[
|
|
29
|
+
`,h=h+`
|
|
30
|
+
`+p+"]",p+=" ",c="array";u=d+p+o.bodyText.split(`
|
|
25
31
|
`).join(`
|
|
26
|
-
`+
|
|
27
|
-
\r\v":{[,]}`.indexOf(
|
|
32
|
+
`+p)+h+r,a=a||u,f=u.replace(/[\n]/g,"")}else return;n.add({kind:this.getSuggestionKind(c),label:a,documentation:this.fromMarkup(o.markdownDescription)||o.description,insertText:u,insertTextFormat:R.Snippet,filterText:f}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)}addEnumValueCompletions(t,r,n){if(Y(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:R.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;i<s;i++){let o=t.enum[i],c=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?c=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(c=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,r),insertTextFormat:R.Snippet,documentation:c})}}collectTypes(t,r){if(Array.isArray(t.enum)||Y(t.const))return;let n=t.type;Array.isArray(n)?n.forEach(i=>r[i]=!0):n&&(r[n]=!0)}addFillerValueCompletions(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:R.Snippet,detail:A("New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:R.Snippet,detail:A("New array"),documentation:""})}addBooleanValueCompletion(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:R.Snippet,documentation:""})}addNullValueCompletion(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:R.Snippet,documentation:""})}addDollarSchemaCompletions(t,r){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),r.add({kind:H.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:R.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,r){let n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)}getInsertTextForSnippetValue(t,r){return Ke(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+r}getInsertTextForGuessedValue(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":let n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)}getSuggestionKind(t){if(Array.isArray(t)){let r=t;t=r.length>0?r[0]:void 0}if(!t)return H.Value;switch(t){case"string":return H.Value;case"object":return H.Module;case"property":return H.Property;default:return H.Value}}getLabelTextForMatchingNode(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:return r.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:let i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,r,n,i){let s=this.getInsertTextForValue(t,"");if(!n)return s;let o=s+": ",c,l=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){let a=r.defaultSnippets[0].body;Y(a)&&(c=this.getInsertTextForSnippetValue(a,""))}l+=r.defaultSnippets.length}if(r.enum&&(!c&&r.enum.length===1&&(c=this.getInsertTextForGuessedValue(r.enum[0],"")),l+=r.enum.length),Y(r.const)&&(c||(c=this.getInsertTextForGuessedValue(r.const,"")),l++),Y(r.default)&&(c||(c=this.getInsertTextForGuessedValue(r.default,"")),l++),Array.isArray(r.examples)&&r.examples.length&&(c||(c=this.getInsertTextForGuessedValue(r.examples[0],"")),l+=r.examples.length),l===0){let a=Array.isArray(r.type)?r.type[0]:r.type;switch(a||(r.properties?a="object":r.items&&(a="array")),a){case"boolean":c="$1";break;case"string":c='"$1"';break;case"object":c="{$1}";break;case"array":c="[$1]";break;case"number":case"integer":c="${1:0}";break;case"null":c="${1:null}";break;default:return s}}}return(!c||l>1)&&(c="$1"),o+c+i}getCurrentWord(t,r){let n=r-1,i=t.getText();for(;n>=0&&`
|
|
33
|
+
\r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)}evaluateSeparatorAfter(t,r){let n=ee(t.getText(),!0);switch(n.setPosition(r),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,r,n){let i=ee(r.getText(),!0),s=t.items;for(let o=s.length-1;o>=0;o--){let c=s[o];if(n>c.offset+c.length)return i.setPosition(c.offset+c.length),i.scan()===5&&n>=i.getTokenOffset()+i.getTokenLength()?o+1:o;if(n>=c.offset)return o}return 0}isInComment(t,r,n){let i=ee(t.getText(),!1);i.setPosition(r);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:le.Markdown,value:t}}doesSupportMarkdown(){if(!Y(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(le.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return Y(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return Y(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}};var tt=class{constructor(t,r=[],n){this.schemaService=t,this.contributions=r,this.promise=n||Promise}doHover(t,r,n){let i=t.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);let o=s;if(s.type==="string"){let u=s.parent;if(u&&u.type==="property"&&u.keyNode===s&&(s=u.valueNode,!s))return this.promise.resolve(null)}let c=_.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length)),l=u=>({contents:u,range:c}),a=Ve(s);for(let u=this.contributions.length-1;u>=0;u--){let d=this.contributions[u].getInfoContribution(t.uri,a);if(d)return d.then(h=>l(h))}return this.schemaService.getSchemaForResource(t.uri,n).then(u=>{if(u&&s){let f=n.getMatchingSchemas(u.schema,s.offset),d,h,p,m;f.every(k=>{if(k.node===s&&!k.inverted&&k.schema&&(d=d||k.schema.title,h=h||k.schema.markdownDescription||Kt(k.schema.description),k.schema.enum)){let w=k.schema.enum.indexOf(ae(s));k.schema.markdownEnumDescriptions?p=k.schema.markdownEnumDescriptions[w]:k.schema.enumDescriptions&&(p=Kt(k.schema.enumDescriptions[w])),p&&(m=k.schema.enum[w],typeof m!="string"&&(m=JSON.stringify(m)))}return!0});let y="";return d&&(y=Kt(d)),h&&(y.length>0&&(y+=`
|
|
28
34
|
|
|
29
|
-
`),
|
|
35
|
+
`),y+=h),p&&(y.length>0&&(y+=`
|
|
30
36
|
|
|
31
|
-
`),
|
|
37
|
+
`),y+=`\`${Br(m)}\`: ${p}`),l([y])}return null})}};function Kt(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
32
38
|
|
|
33
|
-
$3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function wn(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var Tn=he(),jr=function(){function t(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return t.prototype.configure=function(r){r&&(this.validationEnabled=r.validate!==!1,this.commentSeverity=r.allowComments?void 0:Z.Error)},t.prototype.doValidation=function(r,i,e,n){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var s=[],o={},f=function(h){var d=h.range.start.line+" "+h.range.start.character+" "+h.message;o[d]||(o[d]=!0,s.push(h))},l=function(h){var d=e?.trailingCommas?rt(e.trailingCommas):Z.Error,m=e?.comments?rt(e.comments):a.commentSeverity,p=e?.schemaValidation?rt(e.schemaValidation):Z.Warning,g=e?.schemaRequest?rt(e.schemaRequest):Z.Warning;if(h){if(h.errors.length&&i.root&&g){var b=i.root,y=b.type==="object"?b.properties[0]:void 0;if(y&&y.keyNode.value==="$schema"){var v=y.valueNode||y,O=U.create(r.positionAt(v.offset),r.positionAt(v.offset+v.length));f(ae.create(O,h.errors[0],g,W.SchemaResolveError))}else{var O=U.create(r.positionAt(b.offset),r.positionAt(b.offset+1));f(ae.create(O,h.errors[0],g,W.SchemaResolveError))}}else if(p){var E=i.validate(r,h.schema,p);E&&E.forEach(f)}Er(h.schema)&&(m=void 0),Ir(h.schema)&&(d=void 0)}for(var I=0,A=i.syntaxErrors;I<A.length;I++){var P=A[I];if(P.code===W.TrailingComma){if(typeof d!="number")continue;P.severity=d}f(P)}if(typeof m=="number"){var w=Tn("InvalidCommentToken","Comments are not permitted in JSON.");i.comments.forEach(function(C){f(ae.create(C,w,m,W.CommentNotPermitted))})}return s};if(n){var u=n.id||"schemaservice://untitled/"+kn++,c=this.jsonSchemaService.registerExternalSchema(u,[],n);return c.getResolvedSchema().then(function(h){return l(h)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(h){return l(h)})},t.prototype.getLanguageStatus=function(r,i){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(r.uri,i)}},t}();var kn=0;function Er(t){if(t&&typeof t=="object"){if(ie(t.allowComments))return t.allowComments;if(t.allOf)for(var r=0,i=t.allOf;r<i.length;r++){var e=i[r],n=Er(e);if(ie(n))return n}}}function Ir(t){if(t&&typeof t=="object"){if(ie(t.allowTrailingCommas))return t.allowTrailingCommas;var r=t;if(ie(r.allowsTrailingCommas))return r.allowsTrailingCommas;if(t.allOf)for(var i=0,e=t.allOf;i<e.length;i++){var n=e[i],a=Ir(n);if(ie(a))return a}}}function rt(t){switch(t){case"error":return Z.Error;case"warning":return Z.Warning;case"ignore":return}}var Nr=48,On=57,Cn=65,nt=97,Pn=102;function B(t){return t<Nr?0:t<=On?t-Nr:(t<nt&&(t+=nt-Cn),t>=nt&&t<=Pn?t-nt+10:0)}function Mr(t){if(t[0]==="#")switch(t.length){case 4:return{red:B(t.charCodeAt(1))*17/255,green:B(t.charCodeAt(2))*17/255,blue:B(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:B(t.charCodeAt(1))*17/255,green:B(t.charCodeAt(2))*17/255,blue:B(t.charCodeAt(3))*17/255,alpha:B(t.charCodeAt(4))*17/255};case 7:return{red:(B(t.charCodeAt(1))*16+B(t.charCodeAt(2)))/255,green:(B(t.charCodeAt(3))*16+B(t.charCodeAt(4)))/255,blue:(B(t.charCodeAt(5))*16+B(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(B(t.charCodeAt(1))*16+B(t.charCodeAt(2)))/255,green:(B(t.charCodeAt(3))*16+B(t.charCodeAt(4)))/255,blue:(B(t.charCodeAt(5))*16+B(t.charCodeAt(6)))/255,alpha:(B(t.charCodeAt(7))*16+B(t.charCodeAt(8)))/255}}}var Fr=function(){function t(r){this.schemaService=r}return t.prototype.findDocumentSymbols=function(r,i,e){var n=this;e===void 0&&(e={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var s=e.resultLimit||Number.MAX_VALUE,o=r.uri;if((o==="vscode://defaultsettings/keybindings.json"||pe(o.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var f=[],l=0,u=a.items;l<u.length;l++){var c=u[l];if(c.type==="object")for(var h=0,d=c.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var p=Se.create(r.uri,ve(r,c));if(f.push({name:de(m.valueNode),kind:oe.Function,location:p}),s--,s<=0)return e&&e.onResultLimitExceeded&&e.onResultLimitExceeded(o),f}}}return f}for(var g=[{node:a,containerName:""}],b=0,y=!1,v=[],O=function(I,A){I.type==="array"?I.items.forEach(function(P){P&&g.push({node:P,containerName:A})}):I.type==="object"&&I.properties.forEach(function(P){var w=P.valueNode;if(w)if(s>0){s--;var C=Se.create(r.uri,ve(r,P)),F=A?A+"."+P.keyNode.value:P.keyNode.value;v.push({name:n.getKeyLabel(P),kind:n.getSymbolKind(w.type),location:C,containerName:A}),g.push({node:w,containerName:F})}else y=!0})};b<g.length;){var E=g[b++];O(E.node,E.containerName)}return y&&e&&e.onResultLimitExceeded&&e.onResultLimitExceeded(o),v},t.prototype.findDocumentSymbols2=function(r,i,e){var n=this;e===void 0&&(e={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var s=e.resultLimit||Number.MAX_VALUE,o=r.uri;if((o==="vscode://defaultsettings/keybindings.json"||pe(o.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var f=[],l=0,u=a.items;l<u.length;l++){var c=u[l];if(c.type==="object")for(var h=0,d=c.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var p=ve(r,c),g=ve(r,m.keyNode);if(f.push({name:de(m.valueNode),kind:oe.Function,range:p,selectionRange:g}),s--,s<=0)return e&&e.onResultLimitExceeded&&e.onResultLimitExceeded(o),f}}}return f}for(var b=[],y=[{node:a,result:b}],v=0,O=!1,E=function(A,P){A.type==="array"?A.items.forEach(function(w,C){if(w)if(s>0){s--;var F=ve(r,w),N=F,L=String(C),R={name:L,kind:n.getSymbolKind(w.type),range:F,selectionRange:N,children:[]};P.push(R),y.push({result:R.children,node:w})}else O=!0}):A.type==="object"&&A.properties.forEach(function(w){var C=w.valueNode;if(C)if(s>0){s--;var F=ve(r,w),N=ve(r,w.keyNode),L=[],R={name:n.getKeyLabel(w),kind:n.getSymbolKind(C.type),range:F,selectionRange:N,children:L,detail:n.getDetail(C)};P.push(R),y.push({result:L,node:C})}else O=!0})};v<y.length;){var I=y[v++];E(I.node,I.result)}return O&&e&&e.onResultLimitExceeded&&e.onResultLimitExceeded(o),b},t.prototype.getSymbolKind=function(r){switch(r){case"object":return oe.Module;case"string":return oe.String;case"number":return oe.Number;case"array":return oe.Array;case"boolean":return oe.Boolean;default:return oe.Variable}},t.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'.concat(i,'"')},t.prototype.getDetail=function(r){if(r){if(r.type==="boolean"||r.type==="number"||r.type==="null"||r.type==="string")return String(r.value);if(r.type==="array")return r.children.length?void 0:"[]";if(r.type==="object")return r.children.length?void 0:"{}"}},t.prototype.findDocumentColors=function(r,i,e){return this.schemaService.getSchemaForResource(r.uri,i).then(function(n){var a=[];if(n)for(var s=e&&typeof e.resultLimit=="number"?e.resultLimit:Number.MAX_VALUE,o=i.getMatchingSchemas(n.schema),f={},l=0,u=o;l<u.length;l++){var c=u[l];if(!c.inverted&&c.schema&&(c.schema.format==="color"||c.schema.format==="color-hex")&&c.node&&c.node.type==="string"){var h=String(c.node.offset);if(!f[h]){var d=Mr(de(c.node));if(d){var m=ve(r,c.node);a.push({color:d,range:m})}if(f[h]=!0,s--,s<=0)return e&&e.onResultLimitExceeded&&e.onResultLimitExceeded(r.uri),a}}}return a})},t.prototype.getColorPresentations=function(r,i,e,n){var a=[],s=Math.round(e.red*255),o=Math.round(e.green*255),f=Math.round(e.blue*255);function l(c){var h=c.toString(16);return h.length!==2?"0"+h:h}var u;return e.alpha===1?u="#".concat(l(s)).concat(l(o)).concat(l(f)):u="#".concat(l(s)).concat(l(o)).concat(l(f)).concat(l(Math.round(e.alpha*255))),a.push({label:u,textEdit:Y.replace(n,JSON.stringify(u))}),a},t}();function ve(t,r){return U.create(t.positionAt(r.offset),t.positionAt(r.offset+r.length))}var D=he(),ot={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},jn={id:D("schema.json.id","A unique identifier for the schema."),$schema:D("schema.json.$schema","The schema to verify this document against."),title:D("schema.json.title","A descriptive title of the element."),description:D("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:D("schema.json.default","A default value. Used by suggestions."),multipleOf:D("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:D("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:D("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:D("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:D("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:D("schema.json.maxLength","The maximum length of a string."),minLength:D("schema.json.minLength","The minimum length of a string."),pattern:D("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:D("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:D("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:D("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:D("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:D("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:D("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:D("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:D("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:D("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:D("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:D("schema.json.properties","A map of property names to schemas for each property."),patternProperties:D("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:D("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:D("schema.json.enum","The set of literal values that are valid."),type:D("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:D("schema.json.format","Describes the format expected for the value."),allOf:D("schema.json.allOf","An array of schemas, all of which must match."),anyOf:D("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:D("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:D("schema.json.not","A schema which must not match."),$id:D("schema.json.$id","A unique identifier for the schema."),$ref:D("schema.json.$ref","Reference a definition hosted on any location."),$comment:D("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:D("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:D("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:D("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:D("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:D("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:D("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:D("schema.json.contentEncoding","Describes the content encoding of a string property."),if:D("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:D("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:D("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(Lr in ot.schemas){it=ot.schemas[Lr];for(Ne in it.properties)at=it.properties[Ne],typeof at=="boolean"&&(at=it.properties[Ne]={}),Jt=jn[Ne],Jt?at.description=Jt:console.log("".concat(Ne,": localize('schema.json.").concat(Ne,`', "")`))}var it,at,Jt,Ne,Lr;var Vr;Vr=(()=>{"use strict";var t={470:e=>{function n(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,f){for(var l,u="",c=0,h=-1,d=0,m=0;m<=o.length;++m){if(m<o.length)l=o.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(h===m-1||d===1))if(h!==m-1&&d===2){if(u.length<2||c!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var p=u.lastIndexOf("/");if(p!==u.length-1){p===-1?(u="",c=0):c=(u=u.slice(0,p)).length-1-u.lastIndexOf("/"),h=m,d=0;continue}}else if(u.length===2||u.length===1){u="",c=0,h=m,d=0;continue}}f&&(u.length>0?u+="/..":u="..",c=2)}else u.length>0?u+="/"+o.slice(h+1,m):u=o.slice(h+1,m),c=m-h-1;h=m,d=0}else l===46&&d!==-1?++d:d=-1}return u}var s={resolve:function(){for(var o,f="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var c;u>=0?c=arguments[u]:(o===void 0&&(o=process.cwd()),c=o),n(c),c.length!==0&&(f=c+"/"+f,l=c.charCodeAt(0)===47)}return f=a(f,!l),l?f.length>0?"/"+f:"/":f.length>0?f:"."},normalize:function(o){if(n(o),o.length===0)return".";var f=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=a(o,!f)).length!==0||f||(o="."),o.length>0&&l&&(o+="/"),f?"/"+o:o},isAbsolute:function(o){return n(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,f=0;f<arguments.length;++f){var l=arguments[f];n(l),l.length>0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":s.normalize(o)},relative:function(o,f){if(n(o),n(f),o===f||(o=s.resolve(o))===(f=s.resolve(f)))return"";for(var l=1;l<o.length&&o.charCodeAt(l)===47;++l);for(var u=o.length,c=u-l,h=1;h<f.length&&f.charCodeAt(h)===47;++h);for(var d=f.length-h,m=c<d?c:d,p=-1,g=0;g<=m;++g){if(g===m){if(d>m){if(f.charCodeAt(h+g)===47)return f.slice(h+g+1);if(g===0)return f.slice(h+g)}else c>m&&(o.charCodeAt(l+g)===47?p=g:g===0&&(p=0));break}var b=o.charCodeAt(l+g);if(b!==f.charCodeAt(h+g))break;b===47&&(p=g)}var y="";for(g=l+p+1;g<=u;++g)g!==u&&o.charCodeAt(g)!==47||(y.length===0?y+="..":y+="/..");return y.length>0?y+f.slice(h+p):(h+=p,f.charCodeAt(h)===47&&++h,f.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(n(o),o.length===0)return".";for(var f=o.charCodeAt(0),l=f===47,u=-1,c=!0,h=o.length-1;h>=1;--h)if((f=o.charCodeAt(h))===47){if(!c){u=h;break}}else c=!1;return u===-1?l?"/":".":l&&u===1?"//":o.slice(0,u)},basename:function(o,f){if(f!==void 0&&typeof f!="string")throw new TypeError('"ext" argument must be a string');n(o);var l,u=0,c=-1,h=!0;if(f!==void 0&&f.length>0&&f.length<=o.length){if(f.length===o.length&&f===o)return"";var d=f.length-1,m=-1;for(l=o.length-1;l>=0;--l){var p=o.charCodeAt(l);if(p===47){if(!h){u=l+1;break}}else m===-1&&(h=!1,m=l+1),d>=0&&(p===f.charCodeAt(d)?--d==-1&&(c=l):(d=-1,c=m))}return u===c?c=m:c===-1&&(c=o.length),o.slice(u,c)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){u=l+1;break}}else c===-1&&(h=!1,c=l+1);return c===-1?"":o.slice(u,c)},extname:function(o){n(o);for(var f=-1,l=0,u=-1,c=!0,h=0,d=o.length-1;d>=0;--d){var m=o.charCodeAt(d);if(m!==47)u===-1&&(c=!1,u=d+1),m===46?f===-1?f=d:h!==1&&(h=1):f!==-1&&(h=-1);else if(!c){l=d+1;break}}return f===-1||u===-1||h===0||h===1&&f===u-1&&f===l+1?"":o.slice(f,u)},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(f,l){var u=l.dir||l.root,c=l.base||(l.name||"")+(l.ext||"");return u?u===l.root?u+c:u+"/"+c:c}(0,o)},parse:function(o){n(o);var f={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return f;var l,u=o.charCodeAt(0),c=u===47;c?(f.root="/",l=1):l=0;for(var h=-1,d=0,m=-1,p=!0,g=o.length-1,b=0;g>=l;--g)if((u=o.charCodeAt(g))!==47)m===-1&&(p=!1,m=g+1),u===46?h===-1?h=g:b!==1&&(b=1):h!==-1&&(b=-1);else if(!p){d=g+1;break}return h===-1||m===-1||b===0||b===1&&h===m-1&&h===d+1?m!==-1&&(f.base=f.name=d===0&&c?o.slice(1,m):o.slice(d,m)):(d===0&&c?(f.name=o.slice(1,h),f.base=o.slice(1,m)):(f.name=o.slice(d,h),f.base=o.slice(d,m)),f.ext=o.slice(h,m)),d>0?f.dir=o.slice(0,d-1):c&&(f.dir="/"),f},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},447:(e,n,a)=>{var s;if(a.r(n),a.d(n,{URI:()=>y,Utils:()=>L}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;s=o.indexOf("Windows")>=0}var f,l,u=(f=function(T,S){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,j){k.__proto__=j}||function(k,j){for(var V in j)Object.prototype.hasOwnProperty.call(j,V)&&(k[V]=j[V])})(T,S)},function(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function k(){this.constructor=T}f(T,S),T.prototype=S===null?Object.create(S):(k.prototype=S.prototype,new k)}),c=/^\w[\w\d+.-]*$/,h=/^\//,d=/^\/\//;function m(T,S){if(!T.scheme&&S)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(T.authority,'", path: "').concat(T.path,'", query: "').concat(T.query,'", fragment: "').concat(T.fragment,'"}'));if(T.scheme&&!c.test(T.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(T.path){if(T.authority){if(!h.test(T.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(d.test(T.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var p="",g="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,y=function(){function T(S,k,j,V,$,J){J===void 0&&(J=!1),typeof S=="object"?(this.scheme=S.scheme||p,this.authority=S.authority||p,this.path=S.path||p,this.query=S.query||p,this.fragment=S.fragment||p):(this.scheme=function(ue,G){return ue||G?ue:"file"}(S,J),this.authority=k||p,this.path=function(ue,G){switch(ue){case"https":case"http":case"file":G?G[0]!==g&&(G=g+G):G=g}return G}(this.scheme,j||p),this.query=V||p,this.fragment=$||p,m(this,J))}return T.isUri=function(S){return S instanceof T||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"},Object.defineProperty(T.prototype,"fsPath",{get:function(){return P(this,!1)},enumerable:!1,configurable:!0}),T.prototype.with=function(S){if(!S)return this;var k=S.scheme,j=S.authority,V=S.path,$=S.query,J=S.fragment;return k===void 0?k=this.scheme:k===null&&(k=p),j===void 0?j=this.authority:j===null&&(j=p),V===void 0?V=this.path:V===null&&(V=p),$===void 0?$=this.query:$===null&&($=p),J===void 0?J=this.fragment:J===null&&(J=p),k===this.scheme&&j===this.authority&&V===this.path&&$===this.query&&J===this.fragment?this:new O(k,j,V,$,J)},T.parse=function(S,k){k===void 0&&(k=!1);var j=b.exec(S);return j?new O(j[2]||p,N(j[4]||p),N(j[5]||p),N(j[7]||p),N(j[9]||p),k):new O(p,p,p,p,p)},T.file=function(S){var k=p;if(s&&(S=S.replace(/\\/g,g)),S[0]===g&&S[1]===g){var j=S.indexOf(g,2);j===-1?(k=S.substring(2),S=g):(k=S.substring(2,j),S=S.substring(j)||g)}return new O("file",k,S,p,p)},T.from=function(S){var k=new O(S.scheme,S.authority,S.path,S.query,S.fragment);return m(k,!0),k},T.prototype.toString=function(S){return S===void 0&&(S=!1),w(this,S)},T.prototype.toJSON=function(){return this},T.revive=function(S){if(S){if(S instanceof T)return S;var k=new O(S);return k._formatted=S.external,k._fsPath=S._sep===v?S.fsPath:null,k}return S},T}(),v=s?1:void 0,O=function(T){function S(){var k=T!==null&&T.apply(this,arguments)||this;return k._formatted=null,k._fsPath=null,k}return u(S,T),Object.defineProperty(S.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=P(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),S.prototype.toString=function(k){return k===void 0&&(k=!1),k?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},S.prototype.toJSON=function(){var k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=v),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k},S}(y),E=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function I(T,S){for(var k=void 0,j=-1,V=0;V<T.length;V++){var $=T.charCodeAt(V);if($>=97&&$<=122||$>=65&&$<=90||$>=48&&$<=57||$===45||$===46||$===95||$===126||S&&$===47)j!==-1&&(k+=encodeURIComponent(T.substring(j,V)),j=-1),k!==void 0&&(k+=T.charAt(V));else{k===void 0&&(k=T.substr(0,V));var J=E[$];J!==void 0?(j!==-1&&(k+=encodeURIComponent(T.substring(j,V)),j=-1),k+=J):j===-1&&(j=V)}}return j!==-1&&(k+=encodeURIComponent(T.substring(j))),k!==void 0?k:T}function A(T){for(var S=void 0,k=0;k<T.length;k++){var j=T.charCodeAt(k);j===35||j===63?(S===void 0&&(S=T.substr(0,k)),S+=E[j]):S!==void 0&&(S+=T[k])}return S!==void 0?S:T}function P(T,S){var k;return k=T.authority&&T.path.length>1&&T.scheme==="file"?"//".concat(T.authority).concat(T.path):T.path.charCodeAt(0)===47&&(T.path.charCodeAt(1)>=65&&T.path.charCodeAt(1)<=90||T.path.charCodeAt(1)>=97&&T.path.charCodeAt(1)<=122)&&T.path.charCodeAt(2)===58?S?T.path.substr(1):T.path[1].toLowerCase()+T.path.substr(2):T.path,s&&(k=k.replace(/\//g,"\\")),k}function w(T,S){var k=S?A:I,j="",V=T.scheme,$=T.authority,J=T.path,ue=T.query,G=T.fragment;if(V&&(j+=V,j+=":"),($||V==="file")&&(j+=g,j+=g),$){var ne=$.indexOf("@");if(ne!==-1){var ke=$.substr(0,ne);$=$.substr(ne+1),(ne=ke.indexOf(":"))===-1?j+=k(ke,!1):(j+=k(ke.substr(0,ne),!1),j+=":",j+=k(ke.substr(ne+1),!1)),j+="@"}(ne=($=$.toLowerCase()).indexOf(":"))===-1?j+=k($,!1):(j+=k($.substr(0,ne),!1),j+=$.substr(ne))}if(J){if(J.length>=3&&J.charCodeAt(0)===47&&J.charCodeAt(2)===58)(ce=J.charCodeAt(1))>=65&&ce<=90&&(J="/".concat(String.fromCharCode(ce+32),":").concat(J.substr(3)));else if(J.length>=2&&J.charCodeAt(1)===58){var ce;(ce=J.charCodeAt(0))>=65&&ce<=90&&(J="".concat(String.fromCharCode(ce+32),":").concat(J.substr(2)))}j+=k(J,!0)}return ue&&(j+="?",j+=k(ue,!1)),G&&(j+="#",j+=S?G:I(G,!1)),j}function C(T){try{return decodeURIComponent(T)}catch{return T.length>3?T.substr(0,3)+C(T.substr(3)):T}}var F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(T){return T.match(F)?T.replace(F,function(S){return C(S)}):T}var L,R=a(470),H=function(T,S,k){if(k||arguments.length===2)for(var j,V=0,$=S.length;V<$;V++)!j&&V in S||(j||(j=Array.prototype.slice.call(S,0,V)),j[V]=S[V]);return T.concat(j||Array.prototype.slice.call(S))},q=R.posix||R;(function(T){T.joinPath=function(S){for(var k=[],j=1;j<arguments.length;j++)k[j-1]=arguments[j];return S.with({path:q.join.apply(q,H([S.path],k,!1))})},T.resolvePath=function(S){for(var k=[],j=1;j<arguments.length;j++)k[j-1]=arguments[j];var V=S.path||"/";return S.with({path:q.resolve.apply(q,H([V],k,!1))})},T.dirname=function(S){var k=q.dirname(S.path);return k.length===1&&k.charCodeAt(0)===46?S:S.with({path:k})},T.basename=function(S){return q.basename(S.path)},T.extname=function(S){return q.extname(S.path)}})(L||(L={}))}},r={};function i(e){if(r[e])return r[e].exports;var n=r[e]={exports:{}};return t[e](n,n.exports,i),n.exports}return i.d=(e,n)=>{for(var a in n)i.o(n,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(447)})();var{URI:ye,Utils:Pi}=Vr;function Dr(t,r){if(typeof t!="string")throw new TypeError("Expected a string");for(var i=String(t),e="",n=r?!!r.extended:!1,a=r?!!r.globstar:!1,s=!1,o=r&&typeof r.flags=="string"?r.flags:"",f,l=0,u=i.length;l<u;l++)switch(f=i[l],f){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":e+="\\"+f;break;case"?":if(n){e+=".";break}case"[":case"]":if(n){e+=f;break}case"{":if(n){s=!0,e+="(";break}case"}":if(n){s=!1,e+=")";break}case",":if(s){e+="|";break}e+="\\"+f;break;case"*":for(var c=i[l-1],h=1;i[l+1]==="*";)h++,l++;var d=i[l+1];if(!a)e+=".*";else{var m=h>1&&(c==="/"||c===void 0||c==="{"||c===",")&&(d==="/"||d===void 0||d===","||d==="}");m?(d==="/"?l++:c==="/"&&e.endsWith("\\/")&&(e=e.substr(0,e.length-2)),e+="((?:[^/]*(?:/|$))*)"):e+="([^/]*)"}break;default:e+=f}return(!o||!~o.indexOf("g"))&&(e="^"+e+"$"),new RegExp(e,o)}var ge=he(),En="!",In="/",Nn=function(){function t(r,i){this.globWrappers=[];try{for(var e=0,n=r;e<n.length;e++){var a=n[e],s=a[0]!==En;s||(a=a.substring(1)),a.length>0&&(a[0]===In&&(a=a.substring(1)),this.globWrappers.push({regexp:Dr("**/"+a,{extended:!0,globstar:!0}),include:s}))}this.uris=i}catch{this.globWrappers.length=0,this.uris=[]}}return t.prototype.matchesPattern=function(r){for(var i=!1,e=0,n=this.globWrappers;e<n.length;e++){var a=n[e],s=a.regexp,o=a.include;s.test(r)&&(i=o)}return i},t.prototype.getURIs=function(){return this.uris},t}(),Mn=function(){function t(r,i,e){this.service=r,this.uri=i,this.dependencies=new Set,this.anchors=void 0,e&&(this.unresolvedSchema=this.service.promise.resolve(new qe(e)))}return t.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema},t.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r)})),this.resolvedSchema},t.prototype.clearSchema=function(){var r=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,r},t}(),qe=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t}();var $r=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t.prototype.getSection=function(r){var i=this.getSectionRecursive(r,this.schema);if(i)return K(i)},t.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var e=r.shift();if(i.properties&&typeof i.properties[e])return this.getSectionRecursive(r,i.properties[e]);if(i.patternProperties)for(var n=0,a=Object.keys(i.patternProperties);n<a.length;n++){var s=a[n],o=xe(s);if(o?.test(e))return this.getSectionRecursive(r,i.patternProperties[s])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(e.match("[0-9]+")){if(Array.isArray(i.items)){var f=parseInt(e,10);if(!isNaN(f)&&i.items[f])return this.getSectionRecursive(r,i.items[f])}else if(i.items)return this.getSectionRecursive(r,i.items)}}},t}();var Rr=function(){function t(r,i,e){this.contextService=i,this.requestService=r,this.promiseConstructor=e||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return t.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var e=ye.parse(i).scheme;return e!=="schemaservice"&&(!r||r(e))})},Object.defineProperty(t.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(r){var i=this;this.cachedSchemaForResource=void 0;var e=!1;r=be(r);for(var n=[r],a=Object.keys(this.schemasById).map(function(l){return i.schemasById[l]});n.length;)for(var s=n.pop(),o=0;o<a.length;o++){var f=a[o];f&&(f.uri===s||f.dependencies.has(s))&&(f.uri!==s&&n.push(f.uri),f.clearSchema()&&(e=!0),a[o]=void 0)}return e},t.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var e in i){var n=be(e);this.contributionSchemas[n]=this.addSchemaHandle(n,i[e])}}if(Array.isArray(r.schemaAssociations))for(var a=r.schemaAssociations,s=0,o=a;s<o.length;s++){var f=o[s],l=f.uris.map(be),u=this.addFilePatternAssociation(f.pattern,l);this.contributionAssociations.push(u)}},t.prototype.addSchemaHandle=function(r,i){var e=new Mn(this,r,i);return this.schemasById[r]=e,e},t.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},t.prototype.addFilePatternAssociation=function(r,i){var e=new Nn(r,i);return this.filePatternAssociations.push(e),e},t.prototype.registerExternalSchema=function(r,i,e){var n=be(r);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,i&&this.addFilePatternAssociation(i,[n]),e?this.addSchemaHandle(n,e):this.getOrAddSchemaHandle(n)},t.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i=0,e=this.contributionAssociations;i<e.length;i++){var n=e[i];this.filePatternAssociations.push(n)}},t.prototype.getResolvedSchema=function(r){var i=be(r),e=this.schemasById[i];return e?e.getResolvedSchema():this.promise.resolve(void 0)},t.prototype.loadSchema=function(r){if(!this.requestService){var i=ge("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",st(r));return this.promise.resolve(new qe({},[i]))}return this.requestService(r).then(function(e){if(!e){var n=ge("json.schema.nocontent","Unable to load schema from '{0}': No content.",st(r));return new qe({},[n])}var a={},s=[];a=Yt(e,s);var o=s.length?[ge("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",st(r),s[0].offset)]:[];return new qe(a,o)},function(e){var n=e.toString(),a=e.toString().split("Error: ");return a.length>1&&(n=a[1]),pe(n,".")&&(n=n.substr(0,n.length-1)),new qe({},[ge("json.schema.nocontent","Unable to load schema from '{0}': {1}.",st(r),n)])})},t.prototype.resolveSchemaContent=function(r,i){var e=this,n=r.errors.slice(0),a=r.schema;if(a.$schema){var s=be(a.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new $r({},[ge("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));s==="https://json-schema.org/draft/2019-09/schema"?n.push(ge("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported.")):s==="https://json-schema.org/draft/2020-12/schema"&&n.push(ge("json.schema.draft202012.notsupported","Draft 2020-12 schemas are not yet fully supported."))}var o=this.contextService,f=function(p,g){g=decodeURIComponent(g);var b=p;return g[0]==="/"&&(g=g.substring(1)),g.split("/").some(function(y){return y=y.replace(/~1/g,"/").replace(/~0/g,"~"),b=b[y],!b}),b},l=function(p,g,b){return g.anchors||(g.anchors=m(p)),g.anchors.get(b)},u=function(p,g){for(var b in g)g.hasOwnProperty(b)&&!p.hasOwnProperty(b)&&b!=="id"&&b!=="$id"&&(p[b]=g[b])},c=function(p,g,b,y){var v;y===void 0||y.length===0?v=g:y.charAt(0)==="/"?v=f(g,y):v=l(g,b,y),v?u(p,v):n.push(ge("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",y,b.uri))},h=function(p,g,b,y){o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(g)&&(g=o.resolveRelativePath(g,y.uri)),g=be(g);var v=e.getOrAddSchemaHandle(g);return v.getUnresolvedSchema().then(function(O){if(y.dependencies.add(g),O.errors.length){var E=b?g+"#"+b:g;n.push(ge("json.schema.problemloadingref","Problems loading reference '{0}': {1}",E,O.errors[0]))}return c(p,O.schema,v,b),d(p,O.schema,v)})},d=function(p,g,b){var y=[];return e.traverseNodes(p,function(v){for(var O=new Set;v.$ref;){var E=v.$ref,I=E.split("#",2);if(delete v.$ref,I[0].length>0){y.push(h(v,I[0],I[1],b));return}else if(!O.has(E)){var A=I[1];c(v,g,b,A),O.add(E)}}}),e.promise.all(y)},m=function(p){var g=new Map;return e.traverseNodes(p,function(b){var y=b.$id||b.id;if(typeof y=="string"&&y.charAt(0)==="#"){var v=y.substring(1);g.has(v)?n.push(ge("json.schema.duplicateid","Duplicate id declaration: '{0}'",y)):g.set(v,b)}}),g};return d(a,a,i).then(function(p){return new $r(a,n)})},t.prototype.traverseNodes=function(r,i){if(!r||typeof r!="object")return Promise.resolve(null);for(var e=new Set,n=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];for(var c=0,h=l;c<h.length;c++){var d=h[c];typeof d=="object"&&o.push(d)}},a=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];for(var c=0,h=l;c<h.length;c++){var d=h[c];if(typeof d=="object")for(var m in d){var p=m,g=d[p];typeof g=="object"&&o.push(g)}}},s=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];for(var c=0,h=l;c<h.length;c++){var d=h[c];if(Array.isArray(d))for(var m=0,p=d;m<p.length;m++){var g=p[m];typeof g=="object"&&o.push(g)}}},o=[r],f=o.pop();f;)e.has(f)||(e.add(f),i(f),n(f.items,f.additionalItems,f.additionalProperties,f.not,f.contains,f.propertyNames,f.if,f.then,f.else),a(f.definitions,f.properties,f.patternProperties,f.dependencies),s(f.anyOf,f.allOf,f.oneOf,f.items)),f=o.pop()},t.prototype.getSchemaFromProperty=function(r,i){var e,n;if(((e=i.root)===null||e===void 0?void 0:e.type)==="object")for(var a=0,s=i.root.properties;a<s.length;a++){var o=s[a];if(o.keyNode.value==="$schema"&&((n=o.valueNode)===null||n===void 0?void 0:n.type)==="string"){var f=o.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(f)&&(f=this.contextService.resolveRelativePath(f,r)),f}}},t.prototype.getAssociatedSchemas=function(r){for(var i=Object.create(null),e=[],n=Ln(r),a=0,s=this.filePatternAssociations;a<s.length;a++){var o=s[a];if(o.matchesPattern(n))for(var f=0,l=o.getURIs();f<l.length;f++){var u=l[f];i[u]||(e.push(u),i[u]=!0)}}return e},t.prototype.getSchemaURIsForResource=function(r,i){var e=i&&this.getSchemaFromProperty(r,i);return e?[e]:this.getAssociatedSchemas(r)},t.prototype.getSchemaForResource=function(r,i){if(i){var e=this.getSchemaFromProperty(r,i);if(e){var n=be(e);return this.getOrAddSchemaHandle(n).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===r)return this.cachedSchemaForResource.resolvedSchema;var a=this.getAssociatedSchemas(r),s=a.length>0?this.createCombinedSchema(r,a).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:r,resolvedSchema:s},s},t.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var e="schemaservice://combinedSchema/"+encodeURIComponent(r),n={allOf:i.map(function(a){return{$ref:a}})};return this.addSchemaHandle(e,n)},t.prototype.getMatchingSchemas=function(r,i,e){if(e){var n=e.id||"schemaservice://untitled/matchingSchemas/"+Fn++,a=this.addSchemaHandle(n,e);return a.getResolvedSchema().then(function(s){return i.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted})})}return this.getSchemaForResource(r.uri,i).then(function(s){return s?i.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted}):[]})},t}();var Fn=0;function be(t){try{return ye.parse(t).toString(!0)}catch{return t}}function Ln(t){try{return ye.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function st(t){try{var r=ye.parse(t);if(r.scheme==="file")return r.fsPath}catch{}return t}function Ur(t,r){var i=[],e=[],n=[],a=-1,s=le(t.getText(),!1),o=s.scan();function f(C){i.push(C),e.push(n.length)}for(;o!==17;){switch(o){case 1:case 3:{var l=t.positionAt(s.getTokenOffset()).line,u={startLine:l,endLine:l,kind:o===1?"object":"array"};n.push(u);break}case 2:case 4:{var c=o===2?"object":"array";if(n.length>0&&n[n.length-1].kind===c){var u=n.pop(),h=t.positionAt(s.getTokenOffset()).line;u&&h>u.startLine+1&&a!==u.startLine&&(u.endLine=h-1,f(u),a=u.startLine)}break}case 13:{var l=t.positionAt(s.getTokenOffset()).line,d=t.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&l+1<t.lineCount?s.setPosition(t.offsetAt(re.create(l+1,0))):l<d&&(f({startLine:l,endLine:d,kind:Ae.Comment}),a=l);break}case 12:{var m=t.getText().substr(s.getTokenOffset(),s.getTokenLength()),p=m.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(p){var h=t.positionAt(s.getTokenOffset()).line;if(p[1]){var u={startLine:h,endLine:h,kind:Ae.Region};n.push(u)}else{for(var g=n.length-1;g>=0&&n[g].kind!==Ae.Region;)g--;if(g>=0){var u=n[g];n.length=g,h>u.startLine&&a!==u.startLine&&(u.endLine=h,f(u),a=u.startLine)}}}break}}o=s.scan()}var b=r&&r.rangeLimit;if(typeof b!="number"||i.length<=b)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(t.uri);for(var y=[],v=0,O=e;v<O.length;v++){var E=O[v];E<30&&(y[E]=(y[E]||0)+1)}for(var I=0,A=0,g=0;g<y.length;g++){var P=y[g];if(P){if(P+I>b){A=g;break}I+=P}}for(var w=[],g=0;g<i.length;g++){var E=e[g];typeof E=="number"&&(E<A||E===A&&I++<b)&&w.push(i[g])}return w}function Wr(t,r,i){function e(o){for(var f=t.offsetAt(o),l=i.getNodeFromOffset(f,!0),u=[];l;){switch(l.type){case"string":case"object":case"array":var c=l.offset+1,h=l.offset+l.length-1;c<h&&f>=c&&f<=h&&u.push(n(c,h)),u.push(n(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":u.push(n(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var d=s(l.offset+l.length,5);d!==-1&&u.push(n(l.offset,d))}l=l.parent}for(var m=void 0,p=u.length-1;p>=0;p--)m=Ie.create(u[p],m);return m||(m=Ie.create(U.create(o,o))),m}function n(o,f){return U.create(t.positionAt(o),t.positionAt(f))}var a=le(t.getText(),!0);function s(o,f){a.setPosition(o);var l=a.scan();return l===f?a.getTokenOffset()+a.getTokenLength():-1}return r.map(e)}function Jr(t,r){var i=[];return r.visit(function(e){var n;if(e.type==="property"&&e.keyNode.value==="$ref"&&((n=e.valueNode)===null||n===void 0?void 0:n.type)==="string"){var a=e.valueNode.value,s=Dn(r,a);if(s){var o=t.positionAt(s.offset);i.push({target:"".concat(t.uri,"#").concat(o.line+1,",").concat(o.character+1),range:Vn(t,e.valueNode)})}}return!0}),Promise.resolve(i)}function Vn(t,r){return U.create(t.positionAt(r.offset+1),t.positionAt(r.offset+r.length-1))}function Dn(t,r){var i=$n(r);return i?qt(i,t.root):null}function qt(t,r){if(!r)return null;if(t.length===0)return r;var i=t.shift();if(r&&r.type==="object"){var e=r.properties.find(function(s){return s.keyNode.value===i});return e?qt(t,e.valueNode):null}else if(r&&r.type==="array"&&i.match(/^(0|[1-9][0-9]*)$/)){var n=Number.parseInt(i),a=r.items[n];return a?qt(t,a):null}return null}function $n(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(Rn)}function Rn(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function qr(t){var r=t.promiseConstructor||Promise,i=new Rr(t.schemaRequestService,t.workspaceContext,r);i.setSchemaContributions(ot);var e=new Cr(i,t.contributions,r,t.clientCapabilities),n=new Pr(i,t.contributions,r),a=new Fr(i),s=new jr(i,r);return{configure:function(o){i.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(f){i.registerExternalSchema(f.uri,f.fileMatch,f.schema)}),s.configure(o)},resetSchema:function(o){return i.onResourceChange(o)},doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:function(o){return Or(o,{collectComments:!0})},newJSONDocument:function(o,f){return Tr(o,f)},getMatchingSchemas:i.getMatchingSchemas.bind(i),doResolve:e.doResolve.bind(e),doComplete:e.doComplete.bind(e),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:n.doHover.bind(n),getFoldingRanges:Ur,getSelectionRanges:Wr,findDefinition:function(){return Promise.resolve([])},findLinks:Jr,format:function(o,f,l){var u=void 0;if(f){var c=o.offsetAt(f.start),h=o.offsetAt(f.end)-c;u={offset:c,length:h}}var d={tabSize:l?l.tabSize:4,insertSpaces:l?.insertSpaces===!0,insertFinalNewline:l?.insertFinalNewline===!0,eol:`
|
|
34
|
-
`};return rr(o.getText(),u,d).map(function(m){return Y.replace(U.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var zr;typeof fetch<"u"&&(zr=function(t){return fetch(t).then(r=>r.text())});var ft=class{constructor(r,i){this._ctx=r,this._languageSettings=i.languageSettings,this._languageId=i.languageId,this._languageService=qr({workspaceContext:{resolveRelativePath:(e,n)=>{let a=n.substr(0,n.lastIndexOf("/")+1);return qn(a,e)}},schemaRequestService:i.enableSchemaRequest?zr:void 0,clientCapabilities:Ke.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(r){let i=this._getTextDocument(r);if(i){let e=this._languageService.parseJSONDocument(i);return this._languageService.doValidation(i,e,this._languageSettings)}return Promise.resolve([])}async doComplete(r,i){let e=this._getTextDocument(r);if(!e)return null;let n=this._languageService.parseJSONDocument(e);return this._languageService.doComplete(e,i,n)}async doResolve(r){return this._languageService.doResolve(r)}async doHover(r,i){let e=this._getTextDocument(r);if(!e)return null;let n=this._languageService.parseJSONDocument(e);return this._languageService.doHover(e,i,n)}async format(r,i,e){let n=this._getTextDocument(r);if(!n)return[];let a=this._languageService.format(n,i,e);return Promise.resolve(a)}async resetSchema(r){return Promise.resolve(this._languageService.resetSchema(r))}async findDocumentSymbols(r){let i=this._getTextDocument(r);if(!i)return[];let e=this._languageService.parseJSONDocument(i),n=this._languageService.findDocumentSymbols2(i,e);return Promise.resolve(n)}async findDocumentColors(r){let i=this._getTextDocument(r);if(!i)return[];let e=this._languageService.parseJSONDocument(i),n=this._languageService.findDocumentColors(i,e);return Promise.resolve(n)}async getColorPresentations(r,i,e){let n=this._getTextDocument(r);if(!n)return[];let a=this._languageService.parseJSONDocument(n),s=this._languageService.getColorPresentations(n,a,i,e);return Promise.resolve(s)}async getFoldingRanges(r,i){let e=this._getTextDocument(r);if(!e)return[];let n=this._languageService.getFoldingRanges(e,i);return Promise.resolve(n)}async getSelectionRanges(r,i){let e=this._getTextDocument(r);if(!e)return[];let n=this._languageService.parseJSONDocument(e),a=this._languageService.getSelectionRanges(e,i,n);return Promise.resolve(a)}async parseJSONDocument(r){let i=this._getTextDocument(r);if(!i)return null;let e=this._languageService.parseJSONDocument(i);return Promise.resolve(e)}async getMatchingSchemas(r){let i=this._getTextDocument(r);if(!i)return[];let e=this._languageService.parseJSONDocument(i);return Promise.resolve(this._languageService.getMatchingSchemas(i,e))}_getTextDocument(r){let i=this._ctx.getMirrorModels();for(let e of i)if(e.uri.toString()===r)return Ue.create(r,this._languageId,e.version,e.getValue());return null}},Wn=47,zt=46;function Jn(t){return t.charCodeAt(0)===Wn}function qn(t,r){if(Jn(r)){let i=ye.parse(t),e=r.split("/");return i.with({path:Br(e)}).toString()}return zn(t,r)}function Br(t){let r=[];for(let e of t)e.length===0||e.length===1&&e.charCodeAt(0)===zt||(e.length===2&&e.charCodeAt(0)===zt&&e.charCodeAt(1)===zt?r.pop():r.push(e));t.length>1&&t[t.length-1].length===0&&r.push("");let i=r.join("/");return t[0].length===0&&(i="/"+i),i}function zn(t,...r){let i=ye.parse(t),e=i.path.split("/");for(let n of r)e.push(...n.split("/"));return i.with({path:Br(e)}).toString()}function Bn(t,r){return new ft(t,r)}return Yr(_n);})();
|
|
39
|
+
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function Br(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var rt=class{constructor(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:z.Error)}doValidation(t,r,n,i){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],o={},c=a=>{let u=a.range.start.line+" "+a.range.start.character+" "+a.message;o[u]||(o[u]=!0,s.push(a))},l=a=>{let u=n?.trailingCommas?nt(n.trailingCommas):z.Error,f=n?.comments?nt(n.comments):this.commentSeverity,d=n?.schemaValidation?nt(n.schemaValidation):z.Warning,h=n?.schemaRequest?nt(n.schemaRequest):z.Warning;if(a){let p=(m,y)=>{if(r.root&&h){let k=r.root,w=k.type==="object"?k.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){let g=w.valueNode||w,S=_.create(t.positionAt(g.offset),t.positionAt(g.offset+g.length));c(ne.create(S,m,h,y))}else{let g=_.create(t.positionAt(k.offset),t.positionAt(k.offset+1));c(ne.create(g,m,h,y))}}};if(a.errors.length)p(a.errors[0],M.SchemaResolveError);else if(d){for(let y of a.warnings)p(y,M.SchemaUnsupportedFeature);let m=r.validate(t,a.schema,d,n?.schemaDraft);m&&m.forEach(c)}nr(a.schema)&&(f=void 0),rr(a.schema)&&(u=void 0)}for(let p of r.syntaxErrors){if(p.code===M.TrailingComma){if(typeof u!="number")continue;p.severity=u}c(p)}if(typeof f=="number"){let p=A("Comments are not permitted in JSON.");r.comments.forEach(m=>{c(ne.create(m,p,f,M.CommentNotPermitted))})}return s};if(i){let a=i.id||"schemaservice://untitled/"+Jr++;return this.jsonSchemaService.registerExternalSchema({uri:a,schema:i}).getResolvedSchema().then(f=>l(f))}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(a=>l(a))}getLanguageStatus(t,r){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,r)}}},Jr=0;function nr(e){if(e&&typeof e=="object"){if(te(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let r=nr(t);if(te(r))return r}}}function rr(e){if(e&&typeof e=="object"){if(te(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(te(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let r of e.allOf){let n=rr(r);if(te(n))return n}}}function nt(e){switch(e){case"error":return z.Error;case"warning":return z.Warning;case"ignore":return}}function U(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function ir(e){if(e[0]==="#")switch(e.length){case 4:return{red:U(e.charCodeAt(1))*17/255,green:U(e.charCodeAt(2))*17/255,blue:U(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:U(e.charCodeAt(1))*17/255,green:U(e.charCodeAt(2))*17/255,blue:U(e.charCodeAt(3))*17/255,alpha:U(e.charCodeAt(4))*17/255};case 7:return{red:(U(e.charCodeAt(1))*16+U(e.charCodeAt(2)))/255,green:(U(e.charCodeAt(3))*16+U(e.charCodeAt(4)))/255,blue:(U(e.charCodeAt(5))*16+U(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(U(e.charCodeAt(1))*16+U(e.charCodeAt(2)))/255,green:(U(e.charCodeAt(3))*16+U(e.charCodeAt(4)))/255,blue:(U(e.charCodeAt(5))*16+U(e.charCodeAt(6)))/255,alpha:(U(e.charCodeAt(7))*16+U(e.charCodeAt(8)))/255}}}var it=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||fe(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let h of i.items)if(h.type==="object"){for(let p of h.properties)if(p.keyNode.value==="key"&&p.valueNode){let m=ue.create(t.uri,de(t,h));if(d.push({name:sr(p.valueNode),kind:re.Function,location:m}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),d}}return d}let c=[{node:i,containerName:""}],l=0,a=!1,u=[],f=(d,h)=>{d.type==="array"?d.items.forEach(p=>{p&&c.push({node:p,containerName:h})}):d.type==="object"&&d.properties.forEach(p=>{let m=p.valueNode;if(m)if(s>0){s--;let y=ue.create(t.uri,de(t,p)),k=h?h+"."+p.keyNode.value:p.keyNode.value;u.push({name:this.getKeyLabel(p),kind:this.getSymbolKind(m.type),location:y,containerName:h}),c.push({node:m,containerName:k})}else a=!0})};for(;l<c.length;){let d=c[l++];f(d.node,d.containerName)}return a&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}findDocumentSymbols2(t,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||fe(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let h of i.items)if(h.type==="object"){for(let p of h.properties)if(p.keyNode.value==="key"&&p.valueNode){let m=de(t,h),y=de(t,p.keyNode);if(d.push({name:sr(p.valueNode),kind:re.Function,range:m,selectionRange:y}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),d}}return d}let c=[],l=[{node:i,result:c}],a=0,u=!1,f=(d,h)=>{d.type==="array"?d.items.forEach((p,m)=>{if(p)if(s>0){s--;let y=de(t,p),k=y,g={name:String(m),kind:this.getSymbolKind(p.type),range:y,selectionRange:k,children:[]};h.push(g),l.push({result:g.children,node:p})}else u=!0}):d.type==="object"&&d.properties.forEach(p=>{let m=p.valueNode;if(m)if(s>0){s--;let y=de(t,p),k=de(t,p.keyNode),w=[],g={name:this.getKeyLabel(p),kind:this.getSymbolKind(m.type),range:y,selectionRange:k,children:w,detail:this.getDetail(m)};h.push(g),l.push({result:w,node:m})}else u=!0})};for(;a<l.length;){let d=l[a++];f(d.node,d.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),c}getSymbolKind(t){switch(t){case"object":return re.Module;case"string":return re.String;case"number":return re.Number;case"array":return re.Array;case"boolean":return re.Boolean;default:return re.Variable}}getKeyLabel(t){let r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:`"${r}"`}getDetail(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}}findDocumentColors(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(i=>{let s=[];if(i){let o=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,c=r.getMatchingSchemas(i.schema),l={};for(let a of c)if(!a.inverted&&a.schema&&(a.schema.format==="color"||a.schema.format==="color-hex")&&a.node&&a.node.type==="string"){let u=String(a.node.offset);if(!l[u]){let f=ir(ae(a.node));if(f){let d=de(t,a.node);s.push({color:f,range:d})}if(l[u]=!0,o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,r,n,i){let s=[],o=Math.round(n.red*255),c=Math.round(n.green*255),l=Math.round(n.blue*255);function a(f){let d=f.toString(16);return d.length!==2?"0"+d:d}let u;return n.alpha===1?u=`#${a(o)}${a(c)}${a(l)}`:u=`#${a(o)}${a(c)}${a(l)}${a(Math.round(n.alpha*255))}`,s.push({label:u,textEdit:G.replace(i,JSON.stringify(u))}),s}};function de(e,t){return _.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function sr(e){return ae(e)||A("<empty>")}var st={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}}},Cr={id:A("A unique identifier for the schema."),$schema:A("The schema to verify this document against."),title:A("A descriptive title of the element."),description:A("A long description of the element. Used in hover menus and suggestions."),default:A("A default value. Used by suggestions."),multipleOf:A("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:A("The maximum numerical value, inclusive by default."),exclusiveMaximum:A("Makes the maximum property exclusive."),minimum:A("The minimum numerical value, inclusive by default."),exclusiveMinimum:A("Makes the minimum property exclusive."),maxLength:A("The maximum length of a string."),minLength:A("The minimum length of a string."),pattern:A("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:A("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:A("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:A("The maximum number of items that can be inside an array. Inclusive."),minItems:A("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:A("If all of the items in the array must be unique. Defaults to false."),maxProperties:A("The maximum number of properties an object can have. Inclusive."),minProperties:A("The minimum number of properties an object can have. Inclusive."),required:A("An array of strings that lists the names of all properties required on this object."),additionalProperties:A("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:A("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:A("A map of property names to schemas for each property."),patternProperties:A("A map of regular expressions on property names to schemas for matching properties."),dependencies:A("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:A("The set of literal values that are valid."),type:A("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:A("Describes the format expected for the value."),allOf:A("An array of schemas, all of which must match."),anyOf:A("An array of schemas, where at least one must match."),oneOf:A("An array of schemas, exactly one of which must match."),not:A("A schema which must not match."),$id:A("A unique identifier for the schema."),$ref:A("Reference a definition hosted on any location."),$comment:A("Comments from schema authors to readers or maintainers of the schema."),readOnly:A("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:A("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:A('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:A("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:A("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:A("Describes the media type of a string property."),contentEncoding:A("Describes the content encoding of a string property."),if:A('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:A('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:A('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in st.schemas){let t=st.schemas[e];for(let r in t.properties){let n=t.properties[r];typeof n=="boolean"&&(n=t.properties[r]={});let i=Cr[r];i&&(n.description=i)}}var or;(()=>{"use strict";var e={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function o(l,a){for(var u,f="",d=0,h=-1,p=0,m=0;m<=l.length;++m){if(m<l.length)u=l.charCodeAt(m);else{if(u===47)break;u=47}if(u===47){if(!(h===m-1||p===1))if(h!==m-1&&p===2){if(f.length<2||d!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var y=f.lastIndexOf("/");if(y!==f.length-1){y===-1?(f="",d=0):d=(f=f.slice(0,y)).length-1-f.lastIndexOf("/"),h=m,p=0;continue}}else if(f.length===2||f.length===1){f="",d=0,h=m,p=0;continue}}a&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(h+1,m):f=l.slice(h+1,m),d=m-h-1;h=m,p=0}else u===46&&p!==-1?++p:p=-1}return f}var c={resolve:function(){for(var l,a="",u=!1,f=arguments.length-1;f>=-1&&!u;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),s(d),d.length!==0&&(a=d+"/"+a,u=d.charCodeAt(0)===47)}return a=o(a,!u),u?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(l){if(s(l),l.length===0)return".";var a=l.charCodeAt(0)===47,u=l.charCodeAt(l.length-1)===47;return(l=o(l,!a)).length!==0||a||(l="."),l.length>0&&u&&(l+="/"),a?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,a=0;a<arguments.length;++a){var u=arguments[a];s(u),u.length>0&&(l===void 0?l=u:l+="/"+u)}return l===void 0?".":c.normalize(l)},relative:function(l,a){if(s(l),s(a),l===a||(l=c.resolve(l))===(a=c.resolve(a)))return"";for(var u=1;u<l.length&&l.charCodeAt(u)===47;++u);for(var f=l.length,d=f-u,h=1;h<a.length&&a.charCodeAt(h)===47;++h);for(var p=a.length-h,m=d<p?d:p,y=-1,k=0;k<=m;++k){if(k===m){if(p>m){if(a.charCodeAt(h+k)===47)return a.slice(h+k+1);if(k===0)return a.slice(h+k)}else d>m&&(l.charCodeAt(u+k)===47?y=k:k===0&&(y=0));break}var w=l.charCodeAt(u+k);if(w!==a.charCodeAt(h+k))break;w===47&&(y=k)}var g="";for(k=u+y+1;k<=f;++k)k!==f&&l.charCodeAt(k)!==47||(g.length===0?g+="..":g+="/..");return g.length>0?g+a.slice(h+y):(h+=y,a.charCodeAt(h)===47&&++h,a.slice(h))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var a=l.charCodeAt(0),u=a===47,f=-1,d=!0,h=l.length-1;h>=1;--h)if((a=l.charCodeAt(h))===47){if(!d){f=h;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":l.slice(0,f)},basename:function(l,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');s(l);var u,f=0,d=-1,h=!0;if(a!==void 0&&a.length>0&&a.length<=l.length){if(a.length===l.length&&a===l)return"";var p=a.length-1,m=-1;for(u=l.length-1;u>=0;--u){var y=l.charCodeAt(u);if(y===47){if(!h){f=u+1;break}}else m===-1&&(h=!1,m=u+1),p>=0&&(y===a.charCodeAt(p)?--p==-1&&(d=u):(p=-1,d=m))}return f===d?d=m:d===-1&&(d=l.length),l.slice(f,d)}for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!h){f=u+1;break}}else d===-1&&(h=!1,d=u+1);return d===-1?"":l.slice(f,d)},extname:function(l){s(l);for(var a=-1,u=0,f=-1,d=!0,h=0,p=l.length-1;p>=0;--p){var m=l.charCodeAt(p);if(m!==47)f===-1&&(d=!1,f=p+1),m===46?a===-1?a=p:h!==1&&(h=1):a!==-1&&(h=-1);else if(!d){u=p+1;break}}return a===-1||f===-1||h===0||h===1&&a===f-1&&a===u+1?"":l.slice(a,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(a,u){var f=u.dir||u.root,d=u.base||(u.name||"")+(u.ext||"");return f?f===u.root?f+d:f+"/"+d:d}(0,l)},parse:function(l){s(l);var a={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return a;var u,f=l.charCodeAt(0),d=f===47;d?(a.root="/",u=1):u=0;for(var h=-1,p=0,m=-1,y=!0,k=l.length-1,w=0;k>=u;--k)if((f=l.charCodeAt(k))!==47)m===-1&&(y=!1,m=k+1),f===46?h===-1?h=k:w!==1&&(w=1):h!==-1&&(w=-1);else if(!y){p=k+1;break}return h===-1||m===-1||w===0||w===1&&h===m-1&&h===p+1?m!==-1&&(a.base=a.name=p===0&&d?l.slice(1,m):l.slice(p,m)):(p===0&&d?(a.name=l.slice(1,h),a.base=l.slice(1,m)):(a.name=l.slice(p,h),a.base=l.slice(p,m)),a.ext=l.slice(h,m)),p>0?a.dir=l.slice(0,p-1):d&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};c.posix=c,i.exports=c}},t={};function r(i){var s=t[i];if(s!==void 0)return s.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=(i,s)=>{for(var o in s)r.o(s,o)&&!r.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},r.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>j}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,o=/^\//,c=/^\/\//;function l(N,v){if(!N.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${N.authority}", path: "${N.path}", query: "${N.query}", fragment: "${N.fragment}"}`);if(N.scheme&&!s.test(N.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(N.path){if(N.authority){if(!o.test(N.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(c.test(N.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let a="",u="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(v){return v instanceof d||!!v&&typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function"}scheme;authority;path;query;fragment;constructor(v,P,L,$,F,V=!1){typeof v=="object"?(this.scheme=v.scheme||a,this.authority=v.authority||a,this.path=v.path||a,this.query=v.query||a,this.fragment=v.fragment||a):(this.scheme=function(se,K){return se||K?se:"file"}(v,V),this.authority=P||a,this.path=function(se,K){switch(se){case"https":case"http":case"file":K?K[0]!==u&&(K=u+K):K=u}return K}(this.scheme,L||a),this.query=$||a,this.fragment=F||a,l(this,V))}get fsPath(){return w(this,!1)}with(v){if(!v)return this;let{scheme:P,authority:L,path:$,query:F,fragment:V}=v;return P===void 0?P=this.scheme:P===null&&(P=a),L===void 0?L=this.authority:L===null&&(L=a),$===void 0?$=this.path:$===null&&($=a),F===void 0?F=this.query:F===null&&(F=a),V===void 0?V=this.fragment:V===null&&(V=a),P===this.scheme&&L===this.authority&&$===this.path&&F===this.query&&V===this.fragment?this:new p(P,L,$,F,V)}static parse(v,P=!1){let L=f.exec(v);return L?new p(L[2]||a,T(L[4]||a),T(L[5]||a),T(L[7]||a),T(L[9]||a),P):new p(a,a,a,a,a)}static file(v){let P=a;if(i&&(v=v.replace(/\\/g,u)),v[0]===u&&v[1]===u){let L=v.indexOf(u,2);L===-1?(P=v.substring(2),v=u):(P=v.substring(2,L),v=v.substring(L)||u)}return new p("file",P,v,a,a)}static from(v){let P=new p(v.scheme,v.authority,v.path,v.query,v.fragment);return l(P,!0),P}toString(v=!1){return g(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof d)return v;{let P=new p(v);return P._formatted=v.external,P._fsPath=v._sep===h?v.fsPath:null,P}}return v}}let h=i?1:void 0;class p extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(v=!1){return v?g(this,!0):(this._formatted||(this._formatted=g(this,!1)),this._formatted)}toJSON(){let v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=h),this._formatted&&(v.external=this._formatted),this.path&&(v.path=this.path),this.scheme&&(v.scheme=this.scheme),this.authority&&(v.authority=this.authority),this.query&&(v.query=this.query),this.fragment&&(v.fragment=this.fragment),v}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(N,v,P){let L,$=-1;for(let F=0;F<N.length;F++){let V=N.charCodeAt(F);if(V>=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||v&&V===47||P&&V===91||P&&V===93||P&&V===58)$!==-1&&(L+=encodeURIComponent(N.substring($,F)),$=-1),L!==void 0&&(L+=N.charAt(F));else{L===void 0&&(L=N.substr(0,F));let se=m[V];se!==void 0?($!==-1&&(L+=encodeURIComponent(N.substring($,F)),$=-1),L+=se):$===-1&&($=F)}}return $!==-1&&(L+=encodeURIComponent(N.substring($))),L!==void 0?L:N}function k(N){let v;for(let P=0;P<N.length;P++){let L=N.charCodeAt(P);L===35||L===63?(v===void 0&&(v=N.substr(0,P)),v+=m[L]):v!==void 0&&(v+=N[P])}return v!==void 0?v:N}function w(N,v){let P;return P=N.authority&&N.path.length>1&&N.scheme==="file"?`//${N.authority}${N.path}`:N.path.charCodeAt(0)===47&&(N.path.charCodeAt(1)>=65&&N.path.charCodeAt(1)<=90||N.path.charCodeAt(1)>=97&&N.path.charCodeAt(1)<=122)&&N.path.charCodeAt(2)===58?v?N.path.substr(1):N.path[1].toLowerCase()+N.path.substr(2):N.path,i&&(P=P.replace(/\//g,"\\")),P}function g(N,v){let P=v?k:y,L="",{scheme:$,authority:F,path:V,query:se,fragment:K}=N;if($&&(L+=$,L+=":"),(F||$==="file")&&(L+=u,L+=u),F){let J=F.indexOf("@");if(J!==-1){let $e=F.substr(0,J);F=F.substr(J+1),J=$e.lastIndexOf(":"),J===-1?L+=P($e,!1,!1):(L+=P($e.substr(0,J),!1,!1),L+=":",L+=P($e.substr(J+1),!1,!0)),L+="@"}F=F.toLowerCase(),J=F.lastIndexOf(":"),J===-1?L+=P(F,!1,!0):(L+=P(F.substr(0,J),!1,!0),L+=F.substr(J))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58){let J=V.charCodeAt(1);J>=65&&J<=90&&(V=`/${String.fromCharCode(J+32)}:${V.substr(3)}`)}else if(V.length>=2&&V.charCodeAt(1)===58){let J=V.charCodeAt(0);J>=65&&J<=90&&(V=`${String.fromCharCode(J+32)}:${V.substr(2)}`)}L+=P(V,!0,!1)}return se&&(L+="?",L+=P(se,!1,!1)),K&&(L+="#",L+=v?K:y(K,!1,!1)),L}function S(N){try{return decodeURIComponent(N)}catch{return N.length>3?N.substr(0,3)+S(N.substr(3)):N}}let x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(N){return N.match(x)?N.replace(x,v=>S(v)):N}var O=r(470);let I=O.posix||O,E="/";var j;(function(N){N.joinPath=function(v,...P){return v.with({path:I.join(v.path,...P)})},N.resolvePath=function(v,...P){let L=v.path,$=!1;L[0]!==E&&(L=E+L,$=!0);let F=I.resolve(L,...P);return $&&F[0]===E&&!v.authority&&(F=F.substring(1)),v.with({path:F})},N.dirname=function(v){if(v.path.length===0||v.path===E)return v;let P=I.dirname(v.path);return P.length===1&&P.charCodeAt(0)===46&&(P=""),v.with({path:P})},N.basename=function(v){return I.basename(v.path)},N.extname=function(v){return I.extname(v.path)}})(j||(j={}))})(),or=n})();var{URI:he,Utils:qi}=or;function ar(e,t){if(typeof e!="string")throw new TypeError("Expected a string");let r=String(e),n="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,o=!1,c=t&&typeof t.flags=="string"?t.flags:"",l;for(let a=0,u=r.length;a<u;a++)switch(l=r[a],l){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":n+="\\"+l;break;case"?":if(i){n+=".";break}case"[":case"]":if(i){n+=l;break}case"{":if(i){o=!0,n+="(";break}case"}":if(i){o=!1,n+=")";break}case",":if(o){n+="|";break}n+="\\"+l;break;case"*":let f=r[a-1],d=1;for(;r[a+1]==="*";)d++,a++;let h=r[a+1];s?d>1&&(f==="/"||f===void 0||f==="{"||f===",")&&(h==="/"||h===void 0||h===","||h==="}")?(h==="/"?a++:f==="/"&&n.endsWith("\\/")&&(n=n.substr(0,n.length-2)),n+="((?:[^/]*(?:/|$))*)"):n+="([^/]*)":n+=".*";break;default:n+=l}return(!c||!~c.indexOf("g"))&&(n="^"+n+"$"),new RegExp(n,c)}var qr="!",Wr="/",en=class{constructor(t,r,n){this.folderUri=r,this.uris=n,this.globWrappers=[];try{for(let i of t){let s=i[0]!==qr;s||(i=i.substring(1)),i.length>0&&(i[0]===Wr&&(i=i.substring(1)),this.globWrappers.push({regexp:ar("**/"+i,{extended:!0,globstar:!0}),include:s}))}r&&(r=lr(r),r.endsWith("/")||(r=r+"/"),this.folderUri=r)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let r=!1;for(let{regexp:n,include:i}of this.globWrappers)n.test(t)&&(r=i);return r}getURIs(){return this.uris}},tn=class{constructor(t,r,n){this.service=t,this.uri=r,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new xe(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){let t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}},xe=class{constructor(t,r=[]){this.schema=t,this.errors=r}},ot=class{constructor(t,r=[],n=[],i){this.schema=t,this.errors=r,this.warnings=n,this.schemaDraft=i}getSection(t){let r=this.getSectionRecursive(t,this.schema);if(r)return Z(r)}getSectionRecursive(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;let n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties){for(let i of Object.keys(r.patternProperties))if(me(i)?.test(n))return this.getSectionRecursive(t,r.patternProperties[i])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){let i=parseInt(n,10);if(!isNaN(i)&&r.items[i])return this.getSectionRecursive(t,r.items[i])}else if(r.items)return this.getSectionRecursive(t,r.items)}}}},at=class{constructor(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(r=>{let n=he.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let r=!1;t=pe(t);let n=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;n.length;){let s=n.pop();for(let o=0;o<i.length;o++){let c=i[o];c&&(c.uri===s||c.dependencies.has(s))&&(c.uri!==s&&n.push(c.uri),c.clearSchema()&&(r=!0),i[o]=void 0)}}return r}setSchemaContributions(t){if(t.schemas){let r=t.schemas;for(let n in r){let i=pe(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations)){let r=t.schemaAssociations;for(let n of r){let i=n.uris.map(pe),s=this.addFilePatternAssociation(n.pattern,n.folderUri,i);this.contributionAssociations.push(s)}}}addSchemaHandle(t,r){let n=new tn(this,t,r);return this.schemasById[t]=n,n}getOrAddSchemaHandle(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)}addFilePatternAssociation(t,r,n){let i=new en(t,r,n);return this.filePatternAssociations.push(i),i}registerExternalSchema(t){let r=pe(t.uri);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,t.fileMatch&&t.fileMatch.length&&this.addFilePatternAssociation(t.fileMatch,t.folderUri,[r]),t.schema?this.addSchemaHandle(r,t.schema):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(let t of this.contributionAssociations)this.filePatternAssociations.push(t)}getResolvedSchema(t){let r=pe(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(t){if(!this.requestService){let r=A("Unable to load schema from '{0}'. No schema request service available",Me(t));return this.promise.resolve(new xe({},[r]))}return t.startsWith("http://json-schema.org/")&&(t="https"+t.substring(4)),this.requestService(t).then(r=>{if(!r){let o=A("Unable to load schema from '{0}': No content.",Me(t));return new xe({},[o])}let n=[];r.charCodeAt(0)===65279&&(n.push(A("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Me(t))),r=r.trimStart());let i={},s=[];return i=dn(r,s),s.length&&n.push(A("Unable to parse content from '{0}': Parse error at offset {1}.",Me(t),s[0].offset)),new xe(i,n)},r=>{let n=r.toString(),i=r.toString().split("Error: ");return i.length>1&&(n=i[1]),fe(n,".")&&(n=n.substr(0,n.length-1)),new xe({},[A("Unable to load schema from '{0}': {1}.",Me(t),n)])})}resolveSchemaContent(t,r){let n=t.errors.slice(0),i=t.schema,s=i.$schema?pe(i.$schema):void 0;if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new ot({},[A("Draft-03 schemas are not supported.")],[],s));let o=new Set,c=this.contextService,l=(m,y)=>{y=decodeURIComponent(y);let k=m;return y[0]==="/"&&(y=y.substring(1)),y.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),k=k[w],!k)),k},a=(m,y,k)=>(y.anchors||(y.anchors=p(m)),y.anchors.get(k)),u=(m,y)=>{for(let k in y)y.hasOwnProperty(k)&&k!=="id"&&k!=="$id"&&(m[k]=y[k])},f=(m,y,k,w)=>{let g;w===void 0||w.length===0?g=y:w.charAt(0)==="/"?g=l(y,w):g=a(y,k,w),g?u(m,g):n.push(A("$ref '{0}' in '{1}' can not be resolved.",w||"",k.uri))},d=(m,y,k,w)=>{c&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(y)&&(y=c.resolveRelativePath(y,w.uri)),y=pe(y);let g=this.getOrAddSchemaHandle(y);return g.getUnresolvedSchema().then(S=>{if(w.dependencies.add(y),S.errors.length){let x=k?y+"#"+k:y;n.push(A("Problems loading reference '{0}': {1}",x,S.errors[0]))}return f(m,S.schema,g,k),h(m,S.schema,g)})},h=(m,y,k)=>{let w=[];return this.traverseNodes(m,g=>{let S=new Set;for(;g.$ref;){let x=g.$ref,T=x.split("#",2);if(delete g.$ref,T[0].length>0){w.push(d(g,T[0],T[1],k));return}else if(!S.has(x)){let O=T[1];f(g,y,k,O),S.add(x)}}g.$recursiveRef&&o.add("$recursiveRef"),g.$dynamicRef&&o.add("$dynamicRef")}),this.promise.all(w)},p=m=>{let y=new Map;return this.traverseNodes(m,k=>{let w=k.$id||k.id,g=Ue(w)&&w.charAt(0)==="#"?w.substring(1):k.$anchor;g&&(y.has(g)?n.push(A("Duplicate anchor declaration: '{0}'",g)):y.set(g,k)),k.$recursiveAnchor&&o.add("$recursiveAnchor"),k.$dynamicAnchor&&o.add("$dynamicAnchor")}),y};return h(i,i,r).then(m=>{let y=[];return o.size&&y.push(A("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(o.keys()).join(", "))),new ot(i,n,y,s)})}traverseNodes(t,r){if(!t||typeof t!="object")return Promise.resolve(null);let n=new Set,i=(...u)=>{for(let f of u)oe(f)&&l.push(f)},s=(...u)=>{for(let f of u)if(oe(f))for(let d in f){let p=f[d];oe(p)&&l.push(p)}},o=(...u)=>{for(let f of u)if(Array.isArray(f))for(let d of f)oe(d)&&l.push(d)},c=u=>{if(Array.isArray(u))for(let f of u)oe(f)&&l.push(f);else oe(u)&&l.push(u)},l=[t],a=l.pop();for(;a;)n.has(a)||(n.add(a),r(a),i(a.additionalItems,a.additionalProperties,a.not,a.contains,a.propertyNames,a.if,a.then,a.else,a.unevaluatedItems,a.unevaluatedProperties),s(a.definitions,a.$defs,a.properties,a.patternProperties,a.dependencies,a.dependentSchemas),o(a.anyOf,a.allOf,a.oneOf,a.prefixItems),c(a.items)),a=l.pop()}getSchemaFromProperty(t,r){if(r.root?.type==="object"){for(let n of r.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let i=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){let r=Object.create(null),n=[],i=lr(t);for(let s of this.filePatternAssociations)if(s.matchesPattern(i))for(let o of s.getURIs())r[o]||(n.push(o),r[o]=!0);return n}getSchemaURIsForResource(t,r){let n=r&&this.getSchemaFromProperty(t,r);return n?[n]:this.getAssociatedSchemas(t)}getSchemaForResource(t,r){if(r){let s=this.getSchemaFromProperty(t,r);if(s){let o=pe(s);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;let n=this.getAssociatedSchemas(t),i=n.length>0?this.createCombinedSchema(t,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);{let n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(s=>({$ref:s}))};return this.addSchemaHandle(n,i)}}getMatchingSchemas(t,r,n){if(n){let i=n.id||"schemaservice://untitled/matchingSchemas/"+zr++;return this.addSchemaHandle(i,n).getResolvedSchema().then(o=>r.getMatchingSchemas(o.schema).filter(c=>!c.inverted))}return this.getSchemaForResource(t.uri,r).then(i=>i?r.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}},zr=0;function pe(e){try{return he.parse(e).toString(!0)}catch{return e}}function lr(e){try{return he.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Me(e){try{let t=he.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function cr(e,t){let r=[],n=[],i=[],s=-1,o=ee(e.getText(),!1),c=o.scan();function l(p){r.push(p),n.push(i.length)}for(;c!==17;){switch(c){case 1:case 3:{let p=e.positionAt(o.getTokenOffset()).line,m={startLine:p,endLine:p,kind:c===1?"object":"array"};i.push(m);break}case 2:case 4:{let p=c===2?"object":"array";if(i.length>0&&i[i.length-1].kind===p){let m=i.pop(),y=e.positionAt(o.getTokenOffset()).line;m&&y>m.startLine+1&&s!==m.startLine&&(m.endLine=y-1,l(m),s=m.startLine)}break}case 13:{let p=e.positionAt(o.getTokenOffset()).line,m=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&p+1<e.lineCount?o.setPosition(e.offsetAt(D.create(p+1,0))):p<m&&(l({startLine:p,endLine:m,kind:ye.Comment}),s=p);break}case 12:{let m=e.getText().substr(o.getTokenOffset(),o.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(m){let y=e.positionAt(o.getTokenOffset()).line;if(m[1]){let k={startLine:y,endLine:y,kind:ye.Region};i.push(k)}else{let k=i.length-1;for(;k>=0&&i[k].kind!==ye.Region;)k--;if(k>=0){let w=i[k];i.length=k,y>w.startLine&&s!==w.startLine&&(w.endLine=y,l(w),s=w.startLine)}}}break}}c=o.scan()}let a=t&&t.rangeLimit;if(typeof a!="number"||r.length<=a)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let u=[];for(let p of n)p<30&&(u[p]=(u[p]||0)+1);let f=0,d=0;for(let p=0;p<u.length;p++){let m=u[p];if(m){if(m+f>a){d=p;break}f+=m}}let h=[];for(let p=0;p<r.length;p++){let m=n[p];typeof m=="number"&&(m<d||m===d&&f++<a)&&h.push(r[p])}return h}function fr(e,t,r){function n(c){let l=e.offsetAt(c),a=r.getNodeFromOffset(l,!0),u=[];for(;a;){switch(a.type){case"string":case"object":case"array":let d=a.offset+1,h=a.offset+a.length-1;d<h&&l>=d&&l<=h&&u.push(i(d,h)),u.push(i(a.offset,a.offset+a.length));break;case"number":case"boolean":case"null":case"property":u.push(i(a.offset,a.offset+a.length));break}if(a.type==="property"||a.parent&&a.parent.type==="array"){let d=o(a.offset+a.length,5);d!==-1&&u.push(i(a.offset,d))}a=a.parent}let f;for(let d=u.length-1;d>=0;d--)f=Pe.create(u[d],f);return f||(f=Pe.create(_.create(c,c))),f}function i(c,l){return _.create(e.positionAt(c),e.positionAt(l))}let s=ee(e.getText(),!0);function o(c,l){return s.setPosition(c),s.scan()===l?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}function Fe(e,t,r){let n;if(r){let s=e.offsetAt(r.start),o=e.offsetAt(r.end)-s;n={offset:s,length:o}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
|
|
40
|
+
`,keepLines:t?.keepLines===!0};return mn(e.getText(),n,i).map(s=>G.replace(_.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var B;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(B||(B={}));var ke=class{constructor(t,r){this.propertyName=t??"",this.beginningLineNumber=r,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let r=0;t.noKeyName?r=this.childrenProperties.length:r=Gr(this.childrenProperties,t,Hr),r<0&&(r=r*-1-1),this.childrenProperties.splice(r,0,t)}else this.childrenProperties.push(t);return t}};function Hr(e,t){let r=e.propertyName.toLowerCase(),n=t.propertyName.toLowerCase();return r<n?-1:r>n?1:0}function Gr(e,t,r){let n=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(n<i)return 0;if(n>s)return e.length;let o=0,c=e.length-1;for(;o<=c;){let l=c+o>>1,a=r(t,e[l]);if(a>0)o=l+1;else if(a<0)c=l-1;else return l}return-o-1}function dr(e,t){let r={...t,keepLines:!1},n=X.applyEdits(e,Fe(e,r,void 0)),i=X.create("test://test.json","json",0,n),s=Xr(i),o=Zr(i,s),c=Fe(o,r,void 0),l=X.applyEdits(o,c);return[G.replace(_.create(D.create(0,0),e.positionAt(e.getText().length)),l)]}function Xr(e){let t=e.getText(),r=ee(t,!1),n=new ke,i=n,s=n,o=n,c,l=0,a=0,u,f,d=-1,h=-1,p=0,m=0,y=[],k=!1,w=!1;for(;(c=r.scan())!==17;){if(k===!0&&c!==14&&c!==15&&c!==12&&c!==13&&s.endLineNumber===void 0){let g=r.getTokenStartLine();f===2||f===4?o.endLineNumber=g-1:s.endLineNumber=g-1,p=g,k=!1}if(w===!0&&c!==14&&c!==15&&c!==12&&c!==13&&(p=r.getTokenStartLine(),w=!1),r.getTokenStartLine()!==l){for(let g=l;g<r.getTokenStartLine();g++){let S=e.getText(_.create(D.create(g,0),D.create(g+1,0))).length;a=a+S}l=r.getTokenStartLine()}switch(c){case 10:{if(u===void 0||u===1||u===5&&y[y.length-1]===B.Object){let g=new ke(r.getTokenValue(),p);o=s,s=i.addChildProperty(g)}break}case 3:{if(n.beginningLineNumber===void 0&&(n.beginningLineNumber=r.getTokenStartLine()),y[y.length-1]===B.Object)i=s;else if(y[y.length-1]===B.Array){let g=new ke(r.getTokenValue(),p);g.noKeyName=!0,o=s,s=i.addChildProperty(g),i=s}y.push(B.Array),s.type=B.Array,p=r.getTokenStartLine(),p++;break}case 1:{if(n.beginningLineNumber===void 0)n.beginningLineNumber=r.getTokenStartLine();else if(y[y.length-1]===B.Array){let g=new ke(r.getTokenValue(),p);g.noKeyName=!0,o=s,s=i.addChildProperty(g)}s.type=B.Object,y.push(B.Object),i=s,p=r.getTokenStartLine(),p++;break}case 4:{m=r.getTokenStartLine(),y.pop(),s.endLineNumber===void 0&&(u===2||u===4)&&(s.endLineNumber=m-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=h,o=s,s=s?s.parent:void 0,i=s),n.endLineNumber=m,p=m+1;break}case 2:{m=r.getTokenStartLine(),y.pop(),u!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=m-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=h),o=s,s=s?s.parent:void 0,i=s),n.endLineNumber=r.getTokenStartLine(),p=m+1;break}case 5:{m=r.getTokenStartLine(),s.endLineNumber===void 0&&(y[y.length-1]===B.Object||y[y.length-1]===B.Array&&(u===2||u===4))&&(s.endLineNumber=m,s.commaIndex=r.getTokenOffset()-a,s.commaLine=m),(u===2||u===4)&&(o=s,s=s?s.parent:void 0,i=s),p=m+1;break}case 13:{u===5&&d===r.getTokenStartLine()&&(y[y.length-1]===B.Array&&(f===2||f===4)||y[y.length-1]===B.Object)&&(y[y.length-1]===B.Array&&(f===2||f===4)||y[y.length-1]===B.Object)&&(s.endLineNumber=void 0,k=!0),(u===1||u===3)&&d===r.getTokenStartLine()&&(w=!0);break}}c!==14&&c!==13&&c!==12&&c!==15&&(f=u,u=c,d=r.getTokenStartLine(),h=r.getTokenOffset()+r.getTokenLength()-a)}return n}function Zr(e,t){if(t.childrenProperties.length===0)return e;let r=X.create("test://test.json","json",0,e.getText()),n=[];for(ur(n,t,t.beginningLineNumber);n.length>0;){let i=n.shift(),s=i.propertyTreeArray,o=i.beginningLineNumber;for(let c=0;c<s.length;c++){let l=s[c],a=_.create(D.create(l.beginningLineNumber,0),D.create(l.endLineNumber+1,0)),u=e.getText(a),f=X.create("test://test.json","json",0,u);if(l.lastProperty===!0&&c!==s.length-1){let p=l.lineWhereToAddComma-l.beginningLineNumber,m=l.indexWhereToAddComa,y={range:_.create(D.create(p,m),D.create(p,m)),text:","};X.update(f,[y],1)}else if(l.lastProperty===!1&&c===s.length-1){let p=l.commaIndex,y=l.commaLine-l.beginningLineNumber,k={range:_.create(D.create(y,p),D.create(y,p+1)),text:""};X.update(f,[k],1)}let d=l.endLineNumber-l.beginningLineNumber+1,h={range:_.create(D.create(o,0),D.create(o+d,0)),text:f.getText()};X.update(r,[h],1),ur(n,l,o),o=o+d}}return r}function ur(e,t,r){if(t.childrenProperties.length!==0)if(t.type===B.Object){let n=1/0;for(let s of t.childrenProperties)s.beginningLineNumber<n&&(n=s.beginningLineNumber);let i=n-t.beginningLineNumber;r=r+i,e.push(new lt(r,t.childrenProperties))}else t.type===B.Array&&hr(e,t,r)}function hr(e,t,r){for(let n of t.childrenProperties){if(n.type===B.Object){let i=1/0;for(let o of n.childrenProperties)o.beginningLineNumber<i&&(i=o.beginningLineNumber);let s=i-n.beginningLineNumber;e.push(new lt(r+n.beginningLineNumber-t.beginningLineNumber+s,n.childrenProperties))}n.type===B.Array&&hr(e,n,r+n.beginningLineNumber-t.beginningLineNumber)}}var lt=class{constructor(t,r){this.beginningLineNumber=t,this.propertyTreeArray=r}};function pr(e,t){let r=[];return t.visit(n=>{if(n.type==="property"&&n.keyNode.value==="$ref"&&n.valueNode?.type==="string"){let i=n.valueNode.value,s=Yr(t,i);if(s){let o=e.positionAt(s.offset);r.push({target:`${e.uri}#${o.line+1},${o.character+1}`,range:Qr(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function Qr(e,t){return _.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Yr(e,t){let r=Kr(t);return r?nn(r,e.root):null}function nn(e,t){if(!t)return null;if(e.length===0)return t;let r=e.shift();if(t&&t.type==="object"){let n=t.properties.find(i=>i.keyNode.value===r);return n?nn(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){let n=Number.parseInt(r),i=t.items[n];return i?nn(e,i):null}return null}function Kr(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(ei)}function ei(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function gr(e){let t=e.promiseConstructor||Promise,r=new at(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(st);let n=new et(r,e.contributions,t,e.clientCapabilities),i=new tt(r,e.contributions,t),s=new it(r),o=new rt(r,t);return{configure:c=>{r.clearExternalSchemas(),c.schemas?.forEach(r.registerExternalSchema.bind(r)),o.configure(c)},resetSchema:c=>r.onResourceChange(c),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:c=>tr(c,{collectComments:!0}),newJSONDocument:(c,l)=>er(c,l),getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),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:cr,getSelectionRanges:fr,findDefinition:()=>Promise.resolve([]),findLinks:pr,format:(c,l,a)=>Fe(c,a,l),sort:(c,l)=>dr(c,l)}}var mr;typeof fetch<"u"&&(mr=function(e){return fetch(e).then(t=>t.text())});var ct=class{constructor(t,r){this._ctx=t,this._languageSettings=r.languageSettings,this._languageId=r.languageId,this._languageService=gr({workspaceContext:{resolveRelativePath:(n,i)=>{let s=i.substr(0,i.lastIndexOf("/")+1);return ii(s,n)}},schemaRequestService:r.enableSchemaRequest?mr:void 0,clientCapabilities:He.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(t){let r=this._getTextDocument(t);if(r){let n=this._languageService.parseJSONDocument(r);return this._languageService.doValidation(r,n,this._languageSettings)}return Promise.resolve([])}async doComplete(t,r){let n=this._getTextDocument(t);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,r,i)}async doResolve(t){return this._languageService.doResolve(t)}async doHover(t,r){let n=this._getTextDocument(t);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,r,i)}async format(t,r,n){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.format(i,r,n);return Promise.resolve(s)}async resetSchema(t){return Promise.resolve(this._languageService.resetSchema(t))}async findDocumentSymbols(t){let r=this._getTextDocument(t);if(!r)return[];let n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentSymbols2(r,n);return Promise.resolve(i)}async findDocumentColors(t){let r=this._getTextDocument(t);if(!r)return[];let n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentColors(r,n);return Promise.resolve(i)}async getColorPresentations(t,r,n){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.parseJSONDocument(i),o=this._languageService.getColorPresentations(i,s,r,n);return Promise.resolve(o)}async getFoldingRanges(t,r){let n=this._getTextDocument(t);if(!n)return[];let i=this._languageService.getFoldingRanges(n,r);return Promise.resolve(i)}async getSelectionRanges(t,r){let n=this._getTextDocument(t);if(!n)return[];let i=this._languageService.parseJSONDocument(n),s=this._languageService.getSelectionRanges(n,r,i);return Promise.resolve(s)}async parseJSONDocument(t){let r=this._getTextDocument(t);if(!r)return null;let n=this._languageService.parseJSONDocument(r);return Promise.resolve(n)}async getMatchingSchemas(t){let r=this._getTextDocument(t);if(!r)return[];let n=this._languageService.parseJSONDocument(r);return Promise.resolve(this._languageService.getMatchingSchemas(r,n))}_getTextDocument(t){let r=this._ctx.getMirrorModels();for(let n of r)if(n.uri.toString()===t)return X.create(t,this._languageId,n.version,n.getValue());return null}},ni=47,rn=46;function ri(e){return e.charCodeAt(0)===ni}function ii(e,t){if(ri(t)){let r=he.parse(e),n=t.split("/");return r.with({path:yr(n)}).toString()}return si(e,t)}function yr(e){let t=[];for(let n of e)n.length===0||n.length===1&&n.charCodeAt(0)===rn||(n.length===2&&n.charCodeAt(0)===rn&&n.charCodeAt(1)===rn?t.pop():t.push(n));e.length>1&&e[e.length-1].length===0&&t.push("");let r=t.join("/");return e[0].length===0&&(r="/"+r),r}function si(e,...t){let r=he.parse(e),n=r.path.split("/");for(let i of t)n.push(...i.split("/"));return r.with({path:yr(n)}).toString()}function oi(e,t){return new ct(e,t)}return Sr(ai);})();
|
|
35
41
|
return moduleExports;
|
|
36
42
|
});
|