(window.webpackJsonp=window.webpackJsonp||[]).push([[196],{R7lK:function(Ur,qe,Pe){"use strict";Pe.r(qe),Pe.d(qe,"setupMode",function(){return Kn});var Je=2*60*1e3,ht=function(){function e(t){var n=this;this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){if(!!this._worker){var t=Date.now()-this._lastUsedTime;t>Je&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var t=this,n=[],r=0;r=48&&C<=57)E=E*16+C-48;else if(C>=65&&C<=70)E=E*16+C-65+10;else if(C>=97&&C<=102)E=E*16+C-97+10;else break;r++,T++}return T=n){p+=e.substring(I,r),c=2;break}var T=e.charCodeAt(r);if(T===34){p+=e.substring(I,r),r++;break}if(T===92){if(p+=e.substring(I,r),r++,r>=n){c=2;break}var E=e.charCodeAt(r++);switch(E){case 34:p+='"';break;case 92:p+="\\";break;case 47:p+="/";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+=` `;break;case 114:p+="\r";break;case 116:p+=" ";break;case 117:var C=h(4,!0);C>=0?p+=String.fromCharCode(C):c=4;break;default:c=5}I=r;continue}if(T>=0&&T<=31)if(Te(T)){p+=e.substring(I,r),c=2;break}else c=6;r++}return p}function w(){if(i="",c=0,a=r,f=l,o=s,r>=n)return a=n,u=17;var p=e.charCodeAt(r);if(le(p)){do r++,i+=String.fromCharCode(p),p=e.charCodeAt(r);while(le(p));return u=15}if(Te(p))return r++,i+=String.fromCharCode(p),p===13&&e.charCodeAt(r)===10&&(r++,i+=` `),l++,s=r,u=14;switch(p){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,i=d(),u=10;case 47:var I=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&p<=15);return p}return{setPosition:g,getPosition:function(){return r},scan:t?y:w,getToken:function(){return u},getTokenValue:function(){return i},getTokenOffset:function(){return a},getTokenLength:function(){return r-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-o},getTokenError:function(){return c}}}function le(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Te(e){return e===10||e===13||e===8232||e===8233}function Ce(e){return e>=48&&e<=57}function gt(e,t,n){var r,i,a,u,l;if(t){for(u=t.offset,l=u+t.length,a=u;a>0&&!Fe(e,a-1);)a--;for(var f=l;fu&&e.substring(j,$)!==A&&b.push({offset:j,length:$-j,content:A})}var p=w();if(p!==17){var I=g.getTokenOffset()+a,T=He(h,r);y(T,a,I)}for(;p!==17;){for(var E=g.getTokenOffset()+g.getTokenLength()+a,C=w(),x="";!o&&(C===12||C===13);){var O=g.getTokenOffset()+a;y(" ",E,O),E=g.getTokenOffset()+g.getTokenLength()+a,x=C===12?d():"",C=w()}if(C===2)p!==1&&(c--,x=d());else if(C===4)p!==3&&(c--,x=d());else{switch(p){case 3:case 1:c++,x=d();break;case 5:case 12:x=d();break;case 13:o?x=d():x=" ";break;case 6:x=" ";break;case 10:if(C===6){x="";break}case 7:case 8:case 9:case 11:case 2:case 4:C===12||C===13?x=" ":C!==5&&C!==17&&(v=!0);break;case 16:v=!0;break}o&&(C===12||C===13)&&(x=d())}var N=g.getTokenOffset()+a;y(x,E,N),p=C}return b}function He(e,t){for(var n="",r=0;rs,n.push("")},onObjectProperty:function(s,o,c){if(t=n.children.length)return;n=n.children[o]}}return n}}function Ge(e){if(!e.parent||!e.parent.children)return[];var t=Ge(e.parent);if(e.parent.type==="property"){var n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){var r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function B(e){switch(e.type){case"array":return e.children.map(B);case"object":for(var t=Object.create(null),n=0,r=e.children;n=e.offset&&t0)for(var j=r.getToken();j!==17;){if(N.indexOf(j)!==-1){b();break}else if(A.indexOf(j)!==-1)break;j=b()}}function p(O){var N=r.getTokenValue();return O?c(N):l(N),b(),!0}function I(){switch(r.getToken()){case 11:var O=0;try{O=JSON.parse(r.getTokenValue()),typeof O!="number"&&(y(2),O=0)}catch(N){y(2)}c(O);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return!1}return b(),!0}function T(){return r.getToken()!==10?(y(3,[],[2,5]),!1):(p(!1),r.getToken()===6?(h(":"),b(),x()||y(4,[],[2,5])):y(5,[],[2,5]),!0)}function E(){u(),b();for(var O=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(O||y(4,[],[]),h(","),b(),r.getToken()===2&&w)break}else O&&y(6,[],[]);T()||y(4,[],[2,5]),O=!0}return f(),r.getToken()!==2?y(7,[2],[]):b(),!0}function C(){s(),b();for(var O=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(O||y(4,[],[]),h(","),b(),r.getToken()===4&&w)break}else O&&y(6,[],[]);x()||y(4,[],[4,5]),O=!0}return o(),r.getToken()!==4?y(8,[4],[]):b(),!0}function x(){switch(r.getToken()){case 3:return C();case 1:return E();case 10:return p(!0);default:return I()}}return b(),r.getToken()===17?n.allowEmptyContent?!0:(y(4,[],[]),!1):x()?(r.getToken()!==17&&y(9,[],[]),!0):(y(4,[],[]),!1)}function Qe(e,t){var n=H(e),r=[],i,a=0,u;do switch(u=n.getPosition(),i=n.scan(),i){case 12:case 13:case 17:a!==u&&r.push(e.substring(a,u)),t!==void 0&&r.push(n.getTokenValue().replace(/[^\r\n]/g,t)),a=n.getPosition();break}while(i!==17);return r.join("")}function ce(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function yt(e,t,n){return Le(e,t,void 0,n)}function Le(e,t,n,r,i){for(var a,u=t.slice(),l=[],f=ze(e,l),s=void 0,o=void 0;u.length>0&&(o=u.pop(),s=Ve(f,u),s===void 0&&n!==void 0);)typeof o=="string"?n=(a={},a[o]=n,a):n=[n];if(s)if(s.type==="object"&&typeof o=="string"&&Array.isArray(s.children)){var c=Ve(s,[o]);if(c!==void 0)if(n===void 0){if(!c.parent)throw new Error("Malformed AST");var h=s.children.indexOf(c.parent),g=void 0,v=c.parent.offset+c.parent.length;if(h>0){var d=s.children[h-1];g=d.offset+d.length}else if(g=s.offset+1,s.children.length>1){var w=s.children[1];v=w.offset}return ve(e,{offset:g,length:v-g,content:""},r)}else return ve(e,{offset:c.offset,length:c.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];var b=JSON.stringify(o)+": "+JSON.stringify(n),y=i?i(s.children.map(function(O){return O.children[0].value})):s.children.length,p=void 0;if(y>0){var d=s.children[y-1];p={offset:d.offset+d.length,length:0,content:","+b}}else s.children.length===0?p={offset:s.offset+1,length:0,content:b}:p={offset:s.offset+1,length:0,content:b+","};return ve(e,p,r)}}else if(s.type==="array"&&typeof o=="number"&&Array.isArray(s.children)){var I=o;if(I===-1){var b=""+JSON.stringify(n),p=void 0;if(s.children.length===0)p={offset:s.offset+1,length:0,content:b};else{var d=s.children[s.children.length-1];p={offset:d.offset+d.length,length:0,content:","+b}}return ve(e,p,r)}else if(n===void 0&&s.children.length>=0){var T=o,E=s.children[T],p=void 0;if(s.children.length===1)p={offset:s.offset+1,length:s.length-2,content:""};else if(s.children.length-1===T){var d=s.children[T-1],C=d.offset+d.length,x=s.offset+s.length;p={offset:C,length:x-2-C,content:""}}else p={offset:E.offset,length:s.children[T+1].offset-E.offset,content:""};return ve(e,p,r)}else throw new Error("Array modification not supported yet")}else throw new Error("Can not add "+(typeof o!="number"?"index":"property")+" to parent of type "+s.type);else{if(n===void 0)throw new Error("Can not delete in empty document");return ve(e,{offset:f?f.offset:0,length:f?f.length:0,content:JSON.stringify(n)},r)}}function ve(e,t,n){var r=je(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Fe(r,i-1);)i--;for(;a=0;l--){var f=u[l];r=je(r,f),i=Math.min(i,f.offset),a=Math.max(a,f.offset+f.length),a+=f.content.length-f.length}var s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function je(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function Xe(e,t){return`\r `.indexOf(e.charAt(t))!==-1}var S=H,k=mt,P=vt,F=ze,z=Ve,W=Ze,D=Ge,Ye=B,Ke=Ee,ie=Qe;function $e(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}function he(e,t,n){return gt(e,t,n)}function ni(e,t,n,r){return Le(e,t,n,r.formattingOptions,r.getInsertionIndex)}function ii(e,t){for(var n=t.length-1;n>=0;n--)e=je(e,t[n]);return e}function _e(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;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0&&(l.arguments=a),l}e.create=t;function n(r){var i=r;return m.defined(i)&&m.string(i.title)&&m.string(i.command)}e.is=n})(De||(De={}));var fe;(function(e){function t(a,u){return{range:a,newText:u}}e.replace=t;function n(a,u){return{range:{start:a,end:a},newText:u}}e.insert=n;function r(a){return{range:a,newText:""}}e.del=r;function i(a){var u=a;return m.objectLiteral(u)&&m.string(u.newText)&&J.is(u.range)}e.is=i})(fe||(fe={}));var et;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return m.defined(i)&&at.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(et||(et={}));var tt;(function(e){function t(r,i){var a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),a}e.create=t;function n(r){var i=r;return i&&i.kind==="create"&&m.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||m.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||m.boolean(i.options.ignoreIfExists)))}e.is=n})(tt||(tt={}));var rt;(function(e){function t(r,i,a){var u={kind:"rename",oldUri:r,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(u.options=a),u}e.create=t;function n(r){var i=r;return i&&i.kind==="rename"&&m.string(i.oldUri)&&m.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||m.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||m.boolean(i.options.ignoreIfExists)))}e.is=n})(rt||(rt={}));var nt;(function(e){function t(r,i){var a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),a}e.create=t;function n(r){var i=r;return i&&i.kind==="delete"&&m.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||m.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||m.boolean(i.options.ignoreIfNotExists)))}e.is=n})(nt||(nt={}));var St;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return m.string(i.kind)?tt.is(i)||rt.is(i)||nt.is(i):et.is(i)}))}e.is=t})(St||(St={}));var it=function(){function e(t){this.edits=t}return e.prototype.insert=function(t,n){this.edits.push(fe.insert(t,n))},e.prototype.replace=function(t,n){this.edits.push(fe.replace(t,n))},e.prototype.delete=function(t){this.edits.push(fe.del(t))},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),ai=function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t&&(this._workspaceEdit=t,t.documentChanges?t.documentChanges.forEach(function(r){if(et.is(r)){var i=new it(r.edits);n._textEditChanges[r.textDocument.uri]=i}}):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new it(t.changes[r]);n._textEditChanges[r]=i}))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(t){if(at.is(t)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n=t,r=this._textEditChanges[n.uri];if(!r){var i=[],a={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(a),r=new it(i),this._textEditChanges[n.uri]=r}return r}else{if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new it(i),this._textEditChanges[t]=r}return r}},e.prototype.createFile=function(t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(tt.create(t,n))},e.prototype.renameFile=function(t,n,r){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(rt.create(t,n,r))},e.prototype.deleteFile=function(t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(nt.create(t,n))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}(),Jt;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return m.defined(i)&&m.string(i.uri)}e.is=n})(Jt||(Jt={}));var at;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return m.defined(i)&&m.string(i.uri)&&(i.version===null||m.number(i.version))}e.is=n})(at||(at={}));var Ht;(function(e){function t(r,i,a,u){return{uri:r,languageId:i,version:a,text:u}}e.create=t;function n(r){var i=r;return m.defined(i)&&m.string(i.uri)&&m.string(i.languageId)&&m.number(i.version)&&m.string(i.text)}e.is=n})(Ht||(Ht={}));var de;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(de||(de={})),function(e){function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t}(de||(de={}));var wt;(function(e){function t(n){var r=n;return m.objectLiteral(n)&&de.is(r.kind)&&m.string(r.value)}e.is=t})(wt||(wt={}));var V;(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})(V||(V={}));var X;(function(e){e.PlainText=1,e.Snippet=2})(X||(X={}));var zt;(function(e){e.Deprecated=1})(zt||(zt={}));var At;(function(e){function t(n){return{label:n}}e.create=t})(At||(At={}));var Gt;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Gt||(Gt={}));var ot;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return m.string(i)||m.objectLiteral(i)&&m.string(i.language)&&m.string(i.value)}e.is=n})(ot||(ot={}));var Zt;(function(e){function t(n){var r=n;return!!r&&m.objectLiteral(r)&&(wt.is(r.contents)||ot.is(r.contents)||m.typedArray(r.contents,ot.is))&&(n.range===void 0||J.is(n.range))}e.is=t})(Zt||(Zt={}));var Qt;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Qt||(Qt={}));var Xt;(function(e){function t(n,r){for(var i=[],a=2;a=0;o--){var c=f[o],h=a.offsetAt(c.range.start),g=a.offsetAt(c.range.end);if(g<=s)l=l.substring(0,h)+c.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");s=h}return l}e.applyEdits=r;function i(a,u){if(a.length<=1)return a;var l=a.length/2|0,f=a.slice(0,l),s=a.slice(l);i(f,u),i(s,u);for(var o=0,c=0,h=0;o0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return se.create(0,t);for(;rt?i=a:r=a+1}var u=r-1;return se.create(u,t-n[u])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1t?i=a:r=a+1}var u=r-1;return{line:u,character:t-n[u]}},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1=0;s--){var o=l[s],c=i.offsetAt(o.range.start),h=i.offsetAt(o.range.end);if(h<=f)u=u.substring(0,c)+o.newText+u.substring(h,u.length);else throw new Error("Overlapping edit");f=c}return u}e.applyEdits=r})(cr||(cr={}));function Tt(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Tt(r,t),Tt(i,t);for(var a=0,u=0,l=0;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function qr(e){var t=gr(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var U;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(U||(U={}));var pr;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[de.Markdown,de.PlainText],commitCharactersSupport:!0}}}}})(pr||(pr={}));function Jr(e,t){var n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,function(r,i){var a=i[0];return typeof t[a]!="undefined"?t[a]:r}),n}function Hr(e,t){for(var n=[],r=2;r()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Ie=function(){function e(t,n,r){this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),Gr=function(e){xe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="null",i.value=null,i}return t}(Ie),dr=function(e){xe(t,e);function t(n,r,i){var a=e.call(this,n,i)||this;return a.type="boolean",a.value=r,a}return t}(Ie),Zr=function(e){xe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(Ie),Qr=function(e){xe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Ie),mr=function(e){xe(t,e);function t(n,r,i){var a=e.call(this,n,r,i)||this;return a.type="string",a.value="",a}return t}(Ie),Xr=function(e){xe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="property",i.colonOffset=-1,i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(Ie),Yr=function(e){xe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(Ie);function K(e){return ue(e)?e?{}:{not:{}}:e}var vr;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(vr||(vr={}));var Kr=function(){function e(t,n){t===void 0&&(t=-1),n===void 0&&(n=null),this.focusOffset=t,this.exclude=n,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){var n;(n=this.schemas).push.apply(n,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||yr(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Ct=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),ee=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var n=0,r=t;n=e.offset&&t0?G={schema:Ae,validationResult:oe,matchingSchemas:me}:Be===0&&(G.matchingSchemas.merge(me),G.validationResult.mergeEnumValues(oe))}}return Z.length>1&&R&&n.problems.push({location:{offset:e.offset,length:1},severity:_.Warning,message:M("oneOfWarning","Matches multiple schemas when only one must validate.")}),G!==null&&(n.merge(G.validationResult),n.propertiesMatches+=G.validationResult.propertiesMatches,n.propertiesValueMatches+=G.validationResult.propertiesValueMatches,r.merge(G.matchingSchemas)),Z.length};Array.isArray(t.anyOf)&&p(t.anyOf,!1),Array.isArray(t.oneOf)&&p(t.oneOf,!0);var I=function($){var R=new ee,Z=r.newSub();Y(e,K($),R,Z),n.merge(R),n.propertiesMatches+=R.propertiesMatches,n.propertiesValueMatches+=R.propertiesValueMatches,r.merge(Z)},T=function($,R,Z){var G=K($),te=new ee,ae=r.newSub();Y(e,G,te,ae),r.merge(ae),te.hasProblems()?Z&&I(Z):R&&I(R)},E=K(t.if);if(E&&T(E,K(t.then),K(t.else)),Array.isArray(t.enum)){for(var C=be(e),x=!1,O=0,N=t.enum;O=b&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",b)});var y=d(o.minimum,o.exclusiveMinimum);ne(y)&&gp&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("maximumWarning","Value is above the maximum of {0}.",p)})}function u(s,o,c,h){if(ne(o.minLength)&&s.value.lengtho.maxLength&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("maxLengthWarning","String is longer than the maximum length of {0}.",o.maxLength)}),Rr(o.pattern)){var g=new RegExp(o.pattern);g.test(s.value)||c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:o.patternErrorMessage||o.errorMessage||M("patternWarning",'String does not match the pattern of "{0}".',o.pattern)})}if(o.format)switch(o.format){case"uri":case"uri-reference":{var v=void 0;if(!s.value)v=M("uriEmpty","URI expected.");else{var d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(s.value);d?!d[2]&&o.format==="uri"&&(v=M("uriSchemeMissing","URI with a scheme is expected.")):v=M("uriMissing","URI is expected.")}v&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:o.patternErrorMessage||o.errorMessage||M("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var w=zr[o.format];(!s.value||!w.pattern.exec(s.value))&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:o.patternErrorMessage||o.errorMessage||w.errorMessage});default:}}function l(s,o,c,h){if(Array.isArray(o.items)){for(var g=o.items,v=0;v=g.length&&c.propertiesValueMatches++}if(s.items.length>g.length)if(typeof o.additionalItems=="object")for(var p=g.length;po.maxItems&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("maxItemsWarning","Array has too many items. Expected {0} or fewer.",o.maxItems)}),o.uniqueItems===!0){var O=be(s),N=O.some(function(A,j){return j!==O.lastIndexOf(A)});N&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("uniqueItemsWarning","Array has duplicate items.")})}}function f(s,o,c,h){for(var g=Object.create(null),v=[],d=0,w=s.properties;d=0;)v.splice(Wt,1),Wt=v.indexOf(Dr)};if(o.properties)for(var O=0,N=Object.keys(o.properties);O0)for(var me=0,Be=v;meo.maxProperties&&c.problems.push({location:{offset:s.offset,length:s.length},severity:_.Warning,message:M("MaxPropWarning","Object has more properties than limit of {0}.",o.maxProperties)}),ne(o.minProperties)&&s.properties.length0){for(A--;A>0&&/\s/.test(i.charAt(A));)A--;j=A+1}if(s(E,C,A,j),x&&h(x,!1),O.length+N.length>0)for(var $=a.getToken();$!==17;){if(O.indexOf($)!==-1){l();break}else if(N.indexOf($)!==-1)break;$=l()}return x}function c(){switch(a.getTokenError()){case 4:return o(M("InvalidUnicode","Invalid unicode sequence in string."),U.InvalidUnicode),!0;case 5:return o(M("InvalidEscapeCharacter","Invalid escape character in string."),U.InvalidEscapeCharacter),!0;case 3:return o(M("UnexpectedEndOfNumber","Unexpected end of number."),U.UnexpectedEndOfNumber),!0;case 1:return o(M("UnexpectedEndOfComment","Unexpected end of comment."),U.UnexpectedEndOfComment),!0;case 2:return o(M("UnexpectedEndOfString","Unexpected end of string."),U.UnexpectedEndOfString),!0;case 6:return o(M("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),U.InvalidCharacter),!0}return!1}function h(E,C){return E.length=a.getTokenOffset()+a.getTokenLength()-E.offset,C&&l(),E}function g(E){if(a.getToken()!==3)return null;var C=new Zr(E,a.getTokenOffset());l();for(var x=0,O=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){O||o(M("ValueExpected","Value expected"),U.ValueExpected);var N=a.getTokenOffset();if(l(),a.getToken()===4){O&&s(M("TrailingComma","Trailing comma"),U.TrailingComma,N,N+1);continue}}else O&&o(M("ExpectedComma","Expected comma"),U.CommaExpected);var A=p(C,x++);A?C.items.push(A):o(M("PropertyExpected","Value expected"),U.ValueExpected,null,[],[4,5]),O=!0}return a.getToken()!==4?o(M("ExpectedCloseBracket","Expected comma or closing bracket"),U.CommaOrCloseBacketExpected,C):h(C,!0)}function v(E,C){var x=new Xr(E,a.getTokenOffset()),O=w(x);if(!O)if(a.getToken()===16){o(M("DoubleQuotesExpected","Property keys must be doublequoted"),U.Undefined);var N=new mr(x,a.getTokenOffset(),a.getTokenLength());N.value=a.getTokenValue(),O=N,l()}else return null;x.keyNode=O;var A=C[O.value];if(A?(s(M("DuplicateKeyWarning","Duplicate object key"),U.DuplicateKey,x.keyNode.offset,x.keyNode.offset+x.keyNode.length,_.Warning),typeof A=="object"&&s(M("DuplicateKeyWarning","Duplicate object key"),U.DuplicateKey,A.keyNode.offset,A.keyNode.offset+A.keyNode.length,_.Warning),C[O.value]=!0):C[O.value]=x,a.getToken()===6)x.colonOffset=a.getTokenOffset(),l();else if(o(M("ColonExpected","Colon expected"),U.ColonExpected),a.getToken()===10&&e.positionAt(O.offset+O.length).line0?e.lastIndexOf(t)===n:n===0?e===t:!1}function nn(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function ui(e,t){for(var n="";t>0;)(t&1)==1&&(n+=e),e+=e,t=t>>>1;return n}var xt=Ne(),an=[",","}","]"],on=[":"],sn=function(){function e(t,n,r,i){n===void 0&&(n=[]),r===void 0&&(r=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i,this.templateVarIdCounter=0}return e.prototype.doResolve=function(t){for(var n=this.contributions.length-1;n>=0;n--)if(this.contributions[n].resolveCompletion){var r=this.contributions[n].resolveCompletion(t);if(r)return r}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,n,r){var i=this,a={items:[],isIncomplete:!1},u=t.getText(),l=t.offsetAt(n),f=r.getNodeFromOffset(l,!0);if(this.isInComment(t,f?f.offset:0,l))return Promise.resolve(a);if(f&&l===f.offset+f.length&&l>0){var s=u[l-1];(f.type==="object"&&s==="}"||f.type==="array"&&s==="]")&&(f=f.parent)}var o=this.getCurrentWord(t,l),c=null;if(f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null"))c=J.create(t.positionAt(f.offset),t.positionAt(f.offset+f.length));else{var h=l-o.length;h>0&&u[h-1]==='"'&&h--,c=J.create(t.positionAt(h),n)}var g=!1,v={},d={add:function(b){var y=b.label,p=v[y];if(p)p.documentation||(p.documentation=b.documentation);else{if(y=y.replace(/[\n]/g,"\u21B5"),y.length>60){var I=y.substr(0,57).trim()+"...";v[I]||(y=I)}c&&(b.textEdit=fe.replace(c,b.insertText)),g&&(b.commitCharacters=b.kind===V.Property?on:an),b.label=y,v[y]=b,a.items.push(b)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(b){console.error(b)},log:function(b){console.log(b)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,r).then(function(w){var b=[],y=!0,p="",I=null;if(f&&f.type==="string"){var T=f.parent;T&&T.type==="property"&&T.keyNode===f&&(y=!T.valueNode,I=T,p=u.substr(f.offset+1,f.length-2),T&&(f=T.parent))}if(f&&f.type==="object"){if(f.offset===l)return a;var E=f.properties;E.forEach(function(N){(!I||I!==N)&&(v[N.keyNode.value]=At.create("__"))});var C="";y&&(C=i.evaluateSeparatorAfter(t,t.offsetAt(c.end))),w?i.getPropertyCompletions(w,r,f,y,C,d):i.getSchemaLessPropertyCompletions(r,f,p,d);var x=Ot(f);i.contributions.forEach(function(N){var A=N.collectPropertyCompletions(t.uri,x,o,y,C==="",d);A&&b.push(A)}),!w&&o.length>0&&u.charAt(l-o.length-1)!=='"'&&(d.add({kind:V.Property,label:i.getLabelForValue(o),insertText:i.getInsertTextForProperty(o,null,!1,C),insertTextFormat:X.Snippet,documentation:""}),d.setAsIncomplete())}var O={};return w?i.getValueCompletions(w,r,f,l,t,d,O):i.getSchemaLessValueCompletions(r,f,l,t,d),i.contributions.length>0&&i.getContributedValueCompletions(r,f,l,t,d,b),i.promiseConstructor.all(b).then(function(){if(d.getNumberOfProposals()===0){var N=l;f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null")&&(N=f.offset+f.length);var A=i.evaluateSeparatorAfter(t,N);i.addFillerValueCompletions(O,A,d)}return a})})},e.prototype.getPropertyCompletions=function(t,n,r,i,a,u){var l=this,f=n.getMatchingSchemas(t.schema,r.offset);f.forEach(function(s){if(s.node===r&&!s.inverted){var o=s.schema.properties;o&&Object.keys(o).forEach(function(c){var h=o[c];if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){var g={kind:V.Property,label:c,insertText:l.getInsertTextForProperty(c,h,i,a),insertTextFormat:X.Snippet,filterText:l.getFilterTextForValue(c),documentation:l.fromMarkup(h.markdownDescription)||h.description||""};ut(g.insertText,"$1"+a)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),u.add(g)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(t,n,r,i){var a=this,u=function(s){s.properties.forEach(function(o){var c=o.keyNode.value;i.add({kind:V.Property,label:c,insertText:a.getInsertTextForValue(c,""),insertTextFormat:X.Snippet,filterText:a.getFilterTextForValue(c),documentation:""})})};if(n.parent)if(n.parent.type==="property"){var l=n.parent.keyNode.value;t.visit(function(f){return f.type==="property"&&f!==n.parent&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="object"&&u(f.valueNode),!0})}else n.parent.type==="array"&&n.parent.items.forEach(function(f){f.type==="object"&&f!==n&&u(f)});else n.type==="object"&&i.add({kind:V.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:X.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,n,r,i,a){var u=this,l=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(l=n.offset+n.length,n=n.parent),!n){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:X.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:X.Snippet,documentation:""});return}var f=this.evaluateSeparatorAfter(i,l),s=function(v){yr(v.parent,r,!0)||a.add({kind:u.getSuggestionKind(v.type),label:u.getLabelTextForMatchingNode(v,i),insertText:u.getInsertTextForMatchingNode(v,i,f),insertTextFormat:X.Snippet,documentation:""}),v.type==="boolean"&&u.addBooleanValueCompletion(!v.value,f,a)};if(n.type==="property"&&r>n.colonOffset){var o=n.valueNode;if(o&&(r>o.offset+o.length||o.type==="object"||o.type==="array"))return;var c=n.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===c&&g.valueNode&&s(g.valueNode),!0}),c==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(f,a)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){var h=n.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(s),!0})}else n.items.forEach(s)},e.prototype.getValueCompletions=function(t,n,r,i,a,u,l){var f=this,s=i,o=null,c=null;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(s=r.offset+r.length,c=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",u,l);return}if(r.type==="property"&&i>r.colonOffset){var h=r.valueNode;if(h&&i>h.offset+h.length)return;o=r.keyNode.value,r=r.parent}if(r&&(o!==null||r.type==="array")){var g=this.evaluateSeparatorAfter(a,s),v=n.getMatchingSchemas(t.schema,r.offset,c);v.forEach(function(d){if(d.node===r&&!d.inverted&&d.schema){if(r.type==="array"&&d.schema.items)if(Array.isArray(d.schema.items)){var w=f.findItemAtOffset(r,a,i);wn.colonOffset){var l=n.keyNode.value,f=n.valueNode;if(!f||r<=f.offset+f.length){var s=Ot(n.parent);this.contributions.forEach(function(o){var c=o.collectValueCompletions(i.uri,s,l,a);c&&u.push(c)})}}},e.prototype.addSchemaValueCompletions=function(t,n,r,i){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(u){return a.addSchemaValueCompletions(u,n,r,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(u){return a.addSchemaValueCompletions(u,n,r,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(u){return a.addSchemaValueCompletions(u,n,r,i)}))},e.prototype.addDefaultValueCompletions=function(t,n,r,i){var a=this;i===void 0&&(i=0);var u=!1;if(ge(t.default)){for(var l=t.type,f=t.default,s=i;s>0;s--)f=[f],l="array";r.add({kind:this.getSuggestionKind(l),label:this.getLabelForValue(f),insertText:this.getInsertTextForValue(f,n),insertTextFormat:X.Snippet,detail:xt("json.suggest.default","Default value")}),u=!0}Array.isArray(t.examples)&&t.examples.forEach(function(o){for(var c=t.type,h=o,g=i;g>0;g--)h=[h],c="array";r.add({kind:a.getSuggestionKind(c),label:a.getLabelForValue(h),insertText:a.getInsertTextForValue(h,n),insertTextFormat:X.Snippet}),u=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(o){var c=t.type,h=o.body,g=o.label,v,d;if(ge(h)){for(var w=t.type,b=i;b>0;b--)h=[h],w="array";v=a.getInsertTextForSnippetValue(h,n),d=a.getFilterTextForSnippetValue(h),g=g||a.getLabelForSnippetValue(h)}else if(typeof o.bodyText=="string"){for(var y="",p="",I="",b=i;b>0;b--)y=y+I+`[ `,p=p+` `+I+"]",I+=" ",c="array";v=y+I+o.bodyText.split(` `).join(` `+I)+p+n,g=g||v,d=v.replace(/[\n]/g,"")}r.add({kind:a.getSuggestionKind(c),label:g,documentation:a.fromMarkup(o.markdownDescription)||o.description,insertText:v,insertTextFormat:X.Snippet,filterText:d}),u=!0}),!u&&typeof t.items=="object"&&!Array.isArray(t.items)&&this.addDefaultValueCompletions(t.items,n,r,i+1)},e.prototype.addEnumValueCompletions=function(t,n,r){if(ge(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:X.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,a=t.enum.length;i0?n[0]:null}if(!t)return V.Value;switch(t){case"string":return V.Value;case"object":return V.Module;case"property":return V.Property;default:return V.Value}},e.prototype.getLabelTextForMatchingNode=function(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:var r=n.getText().substr(t.offset,t.length);return r}},e.prototype.getInsertTextForMatchingNode=function(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,n,r,i){var a=this.getInsertTextForValue(t,"");if(!r)return a;var u=a+": ",l,f=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){var s=n.defaultSnippets[0].body;ge(s)&&(l=this.getInsertTextForSnippetValue(s,""))}f+=n.defaultSnippets.length}if(n.enum&&(!l&&n.enum.length===1&&(l=this.getInsertTextForGuessedValue(n.enum[0],"")),f+=n.enum.length),ge(n.default)&&(l||(l=this.getInsertTextForGuessedValue(n.default,"")),f++),Array.isArray(n.examples)&&n.examples.length&&(l||(l=this.getInsertTextForGuessedValue(n.examples[0],"")),f+=n.examples.length),f===0){var o=Array.isArray(n.type)?n.type[0]:n.type;switch(o||(n.properties?o="object":n.items&&(o="array")),o){case"boolean":l="$1";break;case"string":l='"$1"';break;case"object":l="{$1}";break;case"array":l="[$1]";break;case"number":case"integer":l="${1:0}";break;case"null":l="${1:null}";break;default:return a}}}return(!l||f>1)&&(l="$1"),u+l+i},e.prototype.getCurrentWord=function(t,n){for(var r=n-1,i=t.getText();r>=0&&` \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)},e.prototype.evaluateSeparatorAfter=function(t,n){var r=S(t.getText(),!0);r.setPosition(n);var i=r.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,n,r){for(var i=S(n.getText(),!0),a=t.items,u=a.length-1;u>=0;u--){var l=a[u];if(r>l.offset+l.length){i.setPosition(l.offset+l.length);var f=i.scan();return f===5&&r>=i.getTokenOffset()+i.getTokenLength()?u+1:u}else if(r>=l.offset)return u}return 0},e.prototype.isInComment=function(t,n,r){var i=S(t.getText(),!1);i.setPosition(n);for(var a=i.scan();a!==17&&i.getTokenOffset()+i.getTokenLength()a.offset+1&&i=0;c--){var h=this.contributions[c],g=h.getInfoContribution(t.uri,o);if(g)return g.then(function(v){return s(v)})}return this.schemaService.getSchemaForResource(t.uri,r).then(function(v){if(v){var d=r.getMatchingSchemas(v.schema,a.offset),w=null,b=null,y=null,p=null;d.every(function(T){if(T.node===a&&!T.inverted&&T.schema&&(w=w||T.schema.title,b=b||T.schema.markdownDescription||It(T.schema.description),T.schema.enum)){var E=T.schema.enum.indexOf(be(a));T.schema.markdownEnumDescriptions?y=T.schema.markdownEnumDescriptions[E]:T.schema.enumDescriptions&&(y=It(T.schema.enumDescriptions[E])),y&&(p=T.schema.enum[E],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});var I="";return w&&(I=It(w)),b&&(I.length>0&&(I+=` `),I+=b),y&&(I.length>0&&(I+=` `),I+="`"+fn(p)+"`: "+y),s([I])}return null})},e}();function It(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function fn(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Pt=Pe("xiP/"),ke=Ne(),ln=function(){function e(t){try{this.patternRegExp=new RegExp(nn(t)+"$")}catch(n){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(t){this.schemas.push(t)},e.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},e.prototype.getSchemas=function(){return this.schemas},e}(),cn=function(){function e(t,n,r){this.service=t,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Me(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return t.service.resolveSchemaContent(n,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Me=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e}(),kr=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e.prototype.getSection=function(t){return K(this.getSectionRecursive(t,this.schema))},e.prototype.getSectionRecursive=function(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;var r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(var i=0,a=Object.keys(n.patternProperties);i0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this,r=!1;t=this.normalizeId(t);for(var i=[t],a=Object.keys(this.schemasById).map(function(s){return n.schemasById[s]});i.length;)for(var u=i.pop(),l=0;l1&&(i=a[1]),ut(i,".")&&(i=i.substr(0,i.length-1)),new Me({},[ke("json.schema.nocontent","Unable to load schema from '{0}': {1}.",ft(t),i)])})},e.prototype.resolveSchemaContent=function(t,n,r){var i=this,a=t.errors.slice(0),u=t.schema;if(u.$schema){var l=this.normalizeId(u.$schema);if(l==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new kr({},[ke("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));l==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push(ke("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var f=this.contextService,s=function(v,d){if(!d)return v;var w=v;return d[0]==="/"&&(d=d.substr(1)),d.split("/").some(function(b){return w=w[b],!w}),w},o=function(v,d,w,b){var y=s(d,b);if(y)for(var p in y)y.hasOwnProperty(p)&&!v.hasOwnProperty(p)&&(v[p]=y[p]);else a.push(ke("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",b,w))},c=function(v,d,w,b,y){f&&!/^\w+:\/\/.*/.test(d)&&(d=f.resolveRelativePath(d,b)),d=i.normalizeId(d);var p=i.getOrAddSchemaHandle(d);return p.getUnresolvedSchema().then(function(I){if(y[d]=!0,I.errors.length){var T=w?d+"#"+w:d;a.push(ke("json.schema.problemloadingref","Problems loading reference '{0}': {1}",T,I.errors[0]))}return o(v,I.schema,d,w),h(v,I.schema,d,p.dependencies)})},h=function(v,d,w,b){if(!v||typeof v!="object")return Promise.resolve(null);for(var y=[v],p=[],I=[],T=function(){for(var A=[],j=0;j0){I.push(c(A,R[0],R[1],w,b));return}else j.indexOf($)===-1&&(o(A,d,w,R[1]),j.push($))}T(A.items,A.additionalProperties,A.not,A.contains,A.propertyNames,A.if,A.then,A.else),E(A.definitions,A.properties,A.patternProperties,A.dependencies),C(A.anyOf,A.allOf,A.oneOf,A.items)};y.length;){var O=y.pop();p.indexOf(O)>=0||(p.push(O),x(O))}return i.promise.all(I)};return h(u,u,n,r).then(function(g){return new kr(u,a)})},e.prototype.getSchemaForResource=function(t,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(v){return v.keyNode.value==="$schema"&&v.valueNode&&v.valueNode.type==="string"});if(r.length>0){var i=be(r[0].valueNode);if(i&&rn(i,".")&&this.contextService&&(i=this.contextService.resolveRelativePath(i,t)),i){var a=this.normalizeId(i);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}for(var u=Object.create(null),l=[],f=0,s=this.filePatternAssociations;f0?this.createCombinedSchema(t,l).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(function(a){return{$ref:a}})};return this.addSchemaHandle(r,i)},e}();function ft(e){try{var t=Pt.a.parse(e);if(t.scheme==="file")return t.fsPath}catch(n){}return e}var gn=Ne(),pn=function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:_.Error)},e.prototype.doValidation=function(t,n,r,i){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var u=[],l={},f=function(h){var g=h.range.start.line+" "+h.range.start.character+" "+h.message;l[g]||(l[g]=!0,u.push(h))},s=function(h){var g=r?Ar(r.trailingCommas):_.Error,v=r?Ar(r.comments):a.commentSeverity;if(h){if(h.errors.length&&n.root){var d=n.root,w=d.type==="object"?d.properties[0]:null;if(w&&w.keyNode.value==="$schema"){var b=w.valueNode||w,y=J.create(t.positionAt(b.offset),t.positionAt(b.offset+b.length));f(pe.create(y,h.errors[0],_.Warning,U.SchemaResolveError))}else{var y=J.create(t.positionAt(d.offset),t.positionAt(d.offset+1));f(pe.create(y,h.errors[0],_.Warning,U.SchemaResolveError))}}else{var p=n.validate(t,h.schema);p&&p.forEach(f)}Sr(h.schema)&&(v=void 0),wr(h.schema)&&(g=void 0)}for(var I=0,T=n.syntaxErrors;I=lt&&e<=yn?e-lt+10:0)}function bn(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}return null}function fi(e,t,n,r){return r===void 0&&(r=1),{red:e/255,green:t/255,blue:n/255,alpha:r}}var kn=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var a=n.root;if(!a)return null;var u=r.resultLimit,l=t.uri;if((l==="vscode://defaultsettings/keybindings.json"||ut(l.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var f=[],s=0,o=a.items;s0){u--;var A=We.create(t.uri,Se(t,O)),j=x?x+"."+O.keyNode.value:O.keyNode.value;p.push({name:i.getKeyLabel(O),kind:i.getSymbolKind(N.type),location:A,containerName:x}),w.push({node:N,containerName:j})}else y=!0})};b0){u--;var j=Se(t,N),$=j,R=String(A),Z={name:R,kind:i.getSymbolKind(N.type),range:j,selectionRange:$,children:[]};O.push(Z),y.push({result:Z.children,node:N})}else I=!0}):x.type==="object"&&x.properties.forEach(function(N){var A=N.valueNode;if(A)if(u>0){u--;var j=Se(t,N),$=Se(t,N.keyNode),R={name:i.getKeyLabel(N),kind:i.getSymbolKind(A.type),range:j,selectionRange:$,children:[]};O.push(R),y.push({result:R.children,node:A})}else I=!0})};p0&&i[i.length-1].kind===c){var o=i.pop(),h=e.positionAt(u.getTokenOffset()).line;o&&h>o.startLine+1&&a!==o.startLine&&(o.endLine=h-1,f(o),a=o.startLine)}break}case 13:{var s=e.positionAt(u.getTokenOffset()).line,g=e.positionAt(u.getTokenOffset()+u.getTokenLength()).line;u.getTokenError()===1&&s+1=0&&i[w].kind!==ye.Region;)w--;if(w>=0){var o=i[w];i.length=w,h>o.startLine&&a!==o.startLine&&(o.endLine=h,f(o),a=o.startLine)}}}break}}l=u.scan()}var b=t&&t.rangeLimit;if(typeof b!="number"||n.length<=b)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var y=[],p=0,I=r;pb){C=w;break}E+=x}}for(var O=[],w=0;w=c&&f<=h&&o.push(i(c,h)),o.push(i(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":o.push(i(s.offset,s.offset+s.length));break}if(s.type==="property"||s.parent&&s.parent.type==="array"){var g=u(s.offset+s.length,5);g!==-1&&o.push(i(s.offset,g))}s=s.parent}for(var v=void 0,d=o.length-1;d>=0;d--)v=st.create(o[d],v);return v||(v=st.create(J.create(l,l))),v}function i(l,f){return J.create(e.positionAt(l),e.positionAt(f))}var a=S(e.getText(),!0);function u(l,f){a.setPosition(l);var s=a.scan();return s===f?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function li(e){var t=e.promiseConstructor||Promise,n=new hn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(jt);var r=new sn(n,e.contributions,t,e.clientCapabilities),i=new un(n,e.contributions,t),a=new kn(n),u=new pn(n,t);return{configure:function(f){n.clearExternalSchemas(),f.schemas&&f.schemas.forEach(function(s){n.registerExternalSchema(s.uri,s.fileMatch,s.schema)}),u.configure(f)},resetSchema:function(f){return n.onResourceChange(f)},doValidation:u.doValidation.bind(u),parseJSONDocument:function(f){return tn(f,{collectComments:!0})},newJSONDocument:function(f,s){return en(f,s)},doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findColorSymbols:function(f,s){return a.findDocumentColors(f,s).then(function(o){return o.map(function(c){return c.range})})},findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:i.doHover.bind(i),getFoldingRanges:An,getSelectionRanges:Tn,format:function(f,s,o){var c=void 0;if(s){var h=f.offsetAt(s.start),g=f.offsetAt(s.end)-h;c={offset:h,length:g}}var v={tabSize:o?o.tabSize:4,insertSpaces:o?o.insertSpaces:!0,eol:` `};return he(f.getText(),c,v).map(function(d){return fe.replace(J.create(f.positionAt(d.offset),f.positionAt(d.offset+d.length)),d.content)})}}}var Cn=monaco.Uri,Or=monaco.Range,On=function(){function e(t,n,r){var i=this;this._languageId=t,this._worker=n,this._disposables=[],this._listener=Object.create(null);var a=function(f){var s=f.getModeId();if(s===i._languageId){var o;i._listener[f.uri.toString()]=f.onDidChangeContent(function(){clearTimeout(o),o=setTimeout(function(){return i._doValidate(f.uri,s)},500)}),i._doValidate(f.uri,s)}},u=function(f){monaco.editor.setModelMarkers(f,i._languageId,[]);var s=f.uri.toString(),o=i._listener[s];o&&(o.dispose(),delete i._listener[s])};this._disposables.push(monaco.editor.onDidCreateModel(a)),this._disposables.push(monaco.editor.onWillDisposeModel(function(l){u(l),i._resetSchema(l.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(l){u(l.model),a(l.model),i._resetSchema(l.model.uri)})),this._disposables.push(r.onDidChange(function(l){monaco.editor.getModels().forEach(function(f){f.getModeId()===i._languageId&&(u(f),a(f))})})),this._disposables.push({dispose:function(){monaco.editor.getModels().forEach(u);for(var f in i._listener)i._listener[f].dispose()}}),monaco.editor.getModels().forEach(a)}return e.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(t){this._worker().then(function(n){n.resetSchema(t.toString())})},e.prototype._doValidate=function(t,n){this._worker(t).then(function(r){return r.doValidation(t.toString()).then(function(i){var a=i.map(function(l){return xn(t,l)}),u=monaco.editor.getModel(t);u&&u.getModeId()===n&&monaco.editor.setModelMarkers(u,n,a)})}).then(void 0,function(r){console.error(r)})},e}();function En(e){switch(e){case _.Error:return monaco.MarkerSeverity.Error;case _.Warning:return monaco.MarkerSeverity.Warning;case _.Information:return monaco.MarkerSeverity.Info;case _.Hint:return monaco.MarkerSeverity.Hint;default:return monaco.MarkerSeverity.Info}}function xn(e,t){var n=typeof t.code=="number"?String(t.code):t.code;return{severity:En(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source}}function Ft(e){if(!!e)return{character:e.column-1,line:e.lineNumber-1}}function Er(e){if(!!e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function we(e){if(!!e)return new Or(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function In(e){var t=monaco.languages.CompletionItemKind;switch(e){case V.Text:return t.Text;case V.Method:return t.Method;case V.Function:return t.Function;case V.Constructor:return t.Constructor;case V.Field:return t.Field;case V.Variable:return t.Variable;case V.Class:return t.Class;case V.Interface:return t.Interface;case V.Module:return t.Module;case V.Property:return t.Property;case V.Unit:return t.Unit;case V.Value:return t.Value;case V.Enum:return t.Enum;case V.Keyword:return t.Keyword;case V.Snippet:return t.Snippet;case V.Color:return t.Color;case V.File:return t.File;case V.Reference:return t.Reference}return t.Property}function ci(e){var t=monaco.languages.CompletionItemKind;switch(e){case t.Text:return V.Text;case t.Method:return V.Method;case t.Function:return V.Function;case t.Constructor:return V.Constructor;case t.Field:return V.Field;case t.Variable:return V.Variable;case t.Class:return V.Class;case t.Interface:return V.Interface;case t.Module:return V.Module;case t.Property:return V.Property;case t.Unit:return V.Unit;case t.Value:return V.Value;case t.Enum:return V.Enum;case t.Keyword:return V.Keyword;case t.Snippet:return V.Snippet;case t.Color:return V.Color;case t.File:return V.File;case t.Reference:return V.Reference}return V.Property}function Re(e){if(!!e)return{range:we(e.range),text:e.newText}}var Pn=function(){function e(t){this._worker=t}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),e.prototype.provideCompletionItems=function(t,n,r,i){var a=t.uri;return this._worker(a).then(function(u){return u.doComplete(a.toString(),Ft(n))}).then(function(u){if(!!u){var l=t.getWordUntilPosition(n),f=new Or(n.lineNumber,l.startColumn,n.lineNumber,l.endColumn),s=u.items.map(function(o){var c={label:o.label,insertText:o.insertText||o.label,sortText:o.sortText,filterText:o.filterText,documentation:o.documentation,detail:o.detail,range:f,kind:In(o.kind)};return o.textEdit&&(c.range=we(o.textEdit.range),c.insertText=o.textEdit.newText),o.additionalTextEdits&&(c.additionalTextEdits=o.additionalTextEdits.map(Re)),o.insertTextFormat===X.Snippet&&(c.insertTextRules=monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),c});return{isIncomplete:u.isIncomplete,suggestions:s}}})},e}();function jn(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function xr(e){return typeof e=="string"?{value:e}:jn(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function Nn(e){if(!!e)return Array.isArray(e)?e.map(xr):[xr(e)]}var Mn=function(){function e(t){this._worker=t}return e.prototype.provideHover=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.doHover(i.toString(),Ft(n))}).then(function(a){if(!!a)return{range:we(a.range),contents:Nn(a.contents)}})},e}();function hi(e){return{uri:Cn.parse(e.uri),range:we(e.range)}}function Fn(e){var t=monaco.languages.SymbolKind;switch(e){case q.File:return t.Array;case q.Module:return t.Module;case q.Namespace:return t.Namespace;case q.Package:return t.Package;case q.Class:return t.Class;case q.Method:return t.Method;case q.Property:return t.Property;case q.Field:return t.Field;case q.Constructor:return t.Constructor;case q.Enum:return t.Enum;case q.Interface:return t.Interface;case q.Function:return t.Function;case q.Variable:return t.Variable;case q.Constant:return t.Constant;case q.String:return t.String;case q.Number:return t.Number;case q.Boolean:return t.Boolean;case q.Array:return t.Array}return t.Function}var Vn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentSymbols=function(t,n){var r=t.uri;return this._worker(r).then(function(i){return i.findDocumentSymbols(r.toString())}).then(function(i){if(!!i)return i.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:Fn(a.kind),range:we(a.location.range),selectionRange:we(a.location.range),tags:[]}})})},e}();function Ir(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Ln=function(){function e(t){this._worker=t}return e.prototype.provideDocumentFormattingEdits=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.format(i.toString(),null,Ir(n)).then(function(u){if(!(!u||u.length===0))return u.map(Re)})})},e}(),$n=function(){function e(t){this._worker=t}return e.prototype.provideDocumentRangeFormattingEdits=function(t,n,r,i){var a=t.uri;return this._worker(a).then(function(u){return u.format(a.toString(),Er(n),Ir(r)).then(function(l){if(!(!l||l.length===0))return l.map(Re)})})},e}(),_n=function(){function e(t){this._worker=t}return e.prototype.provideDocumentColors=function(t,n){var r=t.uri;return this._worker(r).then(function(i){return i.findDocumentColors(r.toString())}).then(function(i){if(!!i)return i.map(function(a){return{color:a.color,range:we(a.range)}})})},e.prototype.provideColorPresentations=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getColorPresentations(i.toString(),n.color,Er(n.range))}).then(function(a){if(!!a)return a.map(function(u){var l={label:u.label};return u.textEdit&&(l.textEdit=Re(u.textEdit)),u.additionalTextEdits&&(l.additionalTextEdits=u.additionalTextEdits.map(Re)),l})})},e}(),Wn=function(){function e(t){this._worker=t}return e.prototype.provideFoldingRanges=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getFoldingRanges(i.toString(),n)}).then(function(a){if(!!a)return a.map(function(u){var l={start:u.startLine+1,end:u.endLine+1};return typeof u.kind!="undefined"&&(l.kind=Dn(u.kind)),l})})},e}();function Dn(e){switch(e){case ye.Comment:return monaco.languages.FoldingRangeKind.Comment;case ye.Imports:return monaco.languages.FoldingRangeKind.Imports;case ye.Region:return monaco.languages.FoldingRangeKind.Region}}var Un=function(){function e(t){this._worker=t}return e.prototype.provideSelectionRanges=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getSelectionRanges(i.toString(),n.map(Ft))}).then(function(a){if(!!a)return a.map(function(u){for(var l=[];u;)l.push({range:we(u.range)}),u=u.parent;return l})})},e}();function Rn(e){return{getInitialState:function(){return new Nr(null,null,!1)},tokenize:function(n,r,i,a){return Yn(e,n,r,i,a)}}}var Pr="delimiter.bracket.json",jr="delimiter.array.json",Bn="delimiter.colon.json",qn="delimiter.comma.json",Jn="keyword.json",Hn="keyword.json",zn="string.value.json",Gn="number.json",Zn="string.key.json",Qn="comment.block.json",Xn="comment.line.json",Nr=function(){function e(t,n,r){this._state=t,this.scanError=n,this.lastWasColon=r}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(t){return t===this?!0:!t||!(t instanceof e)?!1:this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(t){this._state=t},e}();function Yn(e,t,n,r,i){r===void 0&&(r=0);var a=0,u=!1;switch(n.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2;break}var l=S(t),f,s,o=n.lastWasColon;for(s={tokens:[],endState:n.clone()};;){var c=r+l.getPosition(),h="";if(f=l.scan(),f===17)break;if(c===r+l.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(l.getPosition(),3));switch(u&&(c-=a),u=a>0,f){case 1:h=Pr,o=!1;break;case 2:h=Pr,o=!1;break;case 3:h=jr,o=!1;break;case 4:h=jr,o=!1;break;case 6:h=Bn,o=!0;break;case 5:h=qn,o=!1;break;case 8:case 9:h=Jn,o=!1;break;case 7:h=Hn,o=!1;break;case 10:h=o?zn:Zn,o=!1;break;case 11:h=Gn,o=!1;break}if(e)switch(f){case 12:h=Xn;break;case 13:h=Qn;break}s.endState=new Nr(n.getStateData(),l.getTokenError(),o),s.tokens.push({startIndex:c,scopes:h})}return s}function Kn(e){var t=[],n=[],r=new ht(e);t.push(r);var i=function(){for(var f=[],s=0;s=0}function Ce(S){return 55296<=S&&S<=56319}function gt(S){return 56320<=S&&S<=57343}function He(S){return S>=97&&S<=102}function pt(S){return S>=97&&S<=122}function dt(S){return S>=65&&S<=90}function Fe(S){return pt(S)||dt(S)}var Oe=/^\w[\w\d+.-]*$/,mt=/^\//,vt=/^\/\//;function ze(S,k){if(!S.scheme&&k)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+S.authority+'", path: "'+S.path+'", query: "'+S.query+'", fragment: "'+S.fragment+'"}');if(S.scheme&&!Oe.test(S.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(S.path){if(S.authority){if(!mt.test(S.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(vt.test(S.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ve(S,k){return!S&&!k?"file":S}function Ge(S,k){switch(S){case"https":case"http":case"file":k?k[0]!==re&&(k=re+k):k=re;break}return k}var B="",re="/",Ze=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Ee=function(){function S(k,P,F,z,W,D){D===void 0&&(D=!1),typeof k=="object"?(this.scheme=k.scheme||B,this.authority=k.authority||B,this.path=k.path||B,this.query=k.query||B,this.fragment=k.fragment||B):(this.scheme=Ve(k,D),this.authority=P||B,this.path=Ge(this.scheme,F||B),this.query=z||B,this.fragment=W||B,ze(this,D))}return S.isUri=function(k){return k instanceof S?!0:k?typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="function"&&typeof k.with=="function"&&typeof k.toString=="function":!1},Object.defineProperty(S.prototype,"fsPath",{get:function(){return je(this)},enumerable:!0,configurable:!0}),S.prototype.with=function(k){if(!k)return this;var P=k.scheme,F=k.authority,z=k.path,W=k.query,D=k.fragment;return P===void 0?P=this.scheme:P===null&&(P=B),F===void 0?F=this.authority:F===null&&(F=B),z===void 0?z=this.path:z===null&&(z=B),W===void 0?W=this.query:W===null&&(W=B),D===void 0?D=this.fragment:D===null&&(D=B),P===this.scheme&&F===this.authority&&z===this.path&&W===this.query&&D===this.fragment?this:new ce(P,F,z,W,D)},S.parse=function(k,P){P===void 0&&(P=!1);var F=Ze.exec(k);return F?new ce(F[2]||B,decodeURIComponent(F[4]||B),decodeURIComponent(F[5]||B),decodeURIComponent(F[7]||B),decodeURIComponent(F[9]||B),P):new ce(B,B,B,B,B)},S.file=function(k){var P=B;if(le&&(k=k.replace(/\\/g,re)),k[0]===re&&k[1]===re){var F=k.indexOf(re,2);F===-1?(P=k.substring(2),k=re):(P=k.substring(2,F),k=k.substring(F)||re)}return new ce("file",P,k,B,B)},S.from=function(k){return new ce(k.scheme,k.authority,k.path,k.query,k.fragment)},S.prototype.toString=function(k){return k===void 0&&(k=!1),Xe(this,k)},S.prototype.toJSON=function(){return this},S.revive=function(k){if(k){if(k instanceof S)return k;var P=new ce(k);return P._formatted=k.external,P._fsPath=k._sep===Qe?k.fsPath:null,P}else return k},S}(),Qe=le?1:void 0,ce=function(S){ht(k,S);function k(){var P=S!==null&&S.apply(this,arguments)||this;return P._formatted=null,P._fsPath=null,P}return Object.defineProperty(k.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=je(this)),this._fsPath},enumerable:!0,configurable:!0}),k.prototype.toString=function(P){return P===void 0&&(P=!1),P?Xe(this,!0):(this._formatted||(this._formatted=Xe(this,!1)),this._formatted)},k.prototype.toJSON=function(){var P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=Qe),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P},k}(Ee),yt=(H={},H[58]="%3A",H[47]="%2F",H[63]="%3F",H[35]="%23",H[91]="%5B",H[93]="%5D",H[64]="%40",H[33]="%21",H[36]="%24",H[38]="%26",H[39]="%27",H[40]="%28",H[41]="%29",H[42]="%2A",H[43]="%2B",H[44]="%2C",H[59]="%3B",H[61]="%3D",H[32]="%20",H);function Le(S,k){for(var P=void 0,F=-1,z=0;z=97&&W<=122||W>=65&&W<=90||W>=48&&W<=57||W===45||W===46||W===95||W===126||k&&W===47)F!==-1&&(P+=encodeURIComponent(S.substring(F,z)),F=-1),P!==void 0&&(P+=S.charAt(z));else{P===void 0&&(P=S.substr(0,z));var D=yt[W];D!==void 0?(F!==-1&&(P+=encodeURIComponent(S.substring(F,z)),F=-1),P+=D):F===-1&&(F=z)}}return F!==-1&&(P+=encodeURIComponent(S.substring(F))),P!==void 0?P:S}function ve(S){for(var k=void 0,P=0;P1&&S.scheme==="file"?k="//"+S.authority+S.path:S.path.charCodeAt(0)===47&&(S.path.charCodeAt(1)>=65&&S.path.charCodeAt(1)<=90||S.path.charCodeAt(1)>=97&&S.path.charCodeAt(1)<=122)&&S.path.charCodeAt(2)===58?k=S.path[1].toLowerCase()+S.path.substr(2):k=S.path,le&&(k=k.replace(/\//g,"\\")),k}function Xe(S,k){var P=k?ve:Le,F="",z=S.scheme,W=S.authority,D=S.path,Ye=S.query,Ke=S.fragment;if(z&&(F+=z,F+=":"),(W||z==="file")&&(F+=re,F+=re),W){var ie=W.indexOf("@");if(ie!==-1){var $e=W.substr(0,ie);W=W.substr(ie+1),ie=$e.indexOf(":"),ie===-1?F+=P($e,!1):(F+=P($e.substr(0,ie),!1),F+=":",F+=P($e.substr(ie+1),!1)),F+="@"}W=W.toLowerCase(),ie=W.indexOf(":"),ie===-1?F+=P(W,!1):(F+=P(W.substr(0,ie),!1),F+=W.substr(ie))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58){var he=D.charCodeAt(1);he>=65&&he<=90&&(D="/"+String.fromCharCode(he+32)+":"+D.substr(3))}else if(D.length>=2&&D.charCodeAt(1)===58){var he=D.charCodeAt(0);he>=65&&he<=90&&(D=String.fromCharCode(he+32)+":"+D.substr(2))}F+=P(D,!0)}return Ye&&(F+="?",F+=P(Ye,!1)),Ke&&(F+="#",F+=k?Ke:Le(Ke,!1)),F}}).call(this,Pe("Q2Ig"))}}]);