yanzi-monaco-editor
Version:
这是一个基于微软的monaco和vue封装的一个代码编辑器,浏览器可运行。主要功能有:html、javascript、css代码编辑,高亮显示,语法错误提示等,可以帮您的项目很快的拥有一个web端的代码编辑器
1 lines • 435 kB
JavaScript
(("undefined"!==typeof self?self:this)["webpackJsonpyanziMonacoEditor"]=("undefined"!==typeof self?self:this)["webpackJsonpyanziMonacoEditor"]||[]).push([[5],{"0a12":function(e,t,n){"use strict";(function(e){var i;n.d(t,"a",(function(){return r})),i=(()=>{var t={470:t=>{function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,i="",r=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=s,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,a=s,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(a+1,s):i=e.slice(a+1,s),r=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var r={resolve:function(){for(var t,r="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=e.cwd()),s=t),n(s),0!==s.length&&(r=s+"/"+r,a=47===s.charCodeAt(0))}return r=i(r,!a),a?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];n(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=r.resolve(e))===(t=r.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,o=a-i,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var l=t.length-s,c=o<l?o:l,h=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(47===t.charCodeAt(s+d))return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>c&&(47===e.charCodeAt(i+d)?h=d:0===d&&(h=0));break}var u=e.charCodeAt(i+d);if(u!==t.charCodeAt(s+d))break;47===u&&(h=d)}var p="";for(d=i+h+1;d<=a;++d)d!==a&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+h):(s+=h,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,r=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){r=o;break}}else a=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var i,r=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){r=i+1;break}}else-1===l&&(o=!1,l=i+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(a=i):(s=-1,a=l))}return r===a?a=l:-1===a&&(a=e.length),e.slice(r,a)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){r=i+1;break}}else-1===a&&(o=!1,a=i+1);return-1===a?"":e.slice(r,a)},extname:function(e){n(e);for(var t=-1,i=0,r=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===r&&(a=!1,r=s+1),46===l?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){i=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===i+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,r=e.charCodeAt(0),a=47===r;a?(t.root="/",i=1):i=0;for(var o=-1,s=0,l=-1,c=!0,h=e.length-1,d=0;h>=i;--h)if(47!==(r=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===r?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);else if(!c){s=h+1;break}return-1===o||-1===l||0===d||1===d&&o===l-1&&o===s+1?-1!==l&&(t.base=t.name=0===s&&a?e.slice(1,l):e.slice(s,l)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},447:(t,n,i)=>{var r;if(i.r(n),i.d(n,{URI:()=>f,Utils:()=>M}),"object"==typeof e)r="win32"===e.platform;else if("object"==typeof navigator){var a=navigator.userAgent;r=a.indexOf("Windows")>=0}var o,s,l=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=/^\w[\w\d+.-]*$/,h=/^\//,d=/^\/\//,u="",p="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,r,a){void 0===a&&(a=!1),"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,a),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,n||u),this.query=i||u,this.fragment=r||u,function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!h.test(e.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(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,a))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return y(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,a=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===a?a=this.fragment:null===a&&(a=u),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&a===this.fragment?this:new b(t,n,i,r,a)},e.parse=function(e,t){void 0===t&&(t=!1);var n=m.exec(e);return n?new b(n[2]||u,x(n[4]||u),x(n[5]||u),x(n[7]||u),x(n[9]||u),t):new b(u,u,u,u,u)},e.file=function(e){var t=u;if(r&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var n=e.indexOf(p,2);-1===n?(t=e.substring(2),e=p):(t=e.substring(2,n),e=e.substring(n)||p)}return new b("file",t,e,u,u)},e.from=function(e){return new b(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),T(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new b(t);return n._formatted=t.external,n._fsPath=t._sep===g?t.fsPath:null,n}return t},e}(),g=r?1:void 0,b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return l(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),_=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function w(e,t){for(var n=void 0,i=-1,r=0;r<e.length;r++){var a=e.charCodeAt(r);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var o=_[a];void 0!==o?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=o):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function v(e){for(var t=void 0,n=0;n<e.length;n++){var i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=_[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function y(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r&&(n=n.replace(/\//g,"\\")),n}function T(e,t){var n=t?v:w,i="",r=e.scheme,a=e.authority,o=e.path,s=e.query,l=e.fragment;if(r&&(i+=r,i+=":"),(a||"file"===r)&&(i+=p,i+=p),a){var c=a.indexOf("@");if(-1!==c){var h=a.substr(0,c);a=a.substr(c+1),-1===(c=h.indexOf(":"))?i+=n(h,!1):(i+=n(h.substr(0,c),!1),i+=":",i+=n(h.substr(c+1),!1)),i+="@"}-1===(c=(a=a.toLowerCase()).indexOf(":"))?i+=n(a,!1):(i+=n(a.substr(0,c),!1),i+=a.substr(c))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2))(d=o.charCodeAt(1))>=65&&d<=90&&(o="/"+String.fromCharCode(d+32)+":"+o.substr(3));else if(o.length>=2&&58===o.charCodeAt(1)){var d;(d=o.charCodeAt(0))>=65&&d<=90&&(o=String.fromCharCode(d+32)+":"+o.substr(2))}i+=n(o,!0)}return s&&(i+="?",i+=n(s,!1)),l&&(i+="#",i+=t?l:w(l,!1)),i}function k(e){try{return decodeURIComponent(e)}catch(n){return e.length>3?e.substr(0,3)+k(e.substr(3)):e}}var S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(S)?e.replace(S,(function(e){return k(e)})):e}var M,L=i(470),E=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i},A=L.posix||L;!function(e){e.joinPath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.with({path:A.join.apply(A,E([e.path],t))})},e.resolvePath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=e.path||"/";return e.with({path:A.resolve.apply(A,E([i],t))})},e.dirname=function(e){var t=A.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)?e:e.with({path:t})},e.basename=function(e){return A.basename(e.path)},e.extname=function(e){return A.extname(e.path)}}(M||(M={}))}},n={};function i(e){if(n[e])return n[e].exports;var r=n[e]={exports:{}};return t[e](r,r.exports,i),r.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(447)})();const{URI:r,Utils:a}=i}).call(this,n("eef6"))},b789:function(e,t,n){"use strict";n.r(t),n.d(t,"setupMode1",(function(){return rn})),n.d(t,"setupMode",(function(){return an}));var i,r,a,o,s,l,c,h,d,u,p,m,f,g,b,_,w,v,y,T,k,S,x,M,L,E,A=n("60e7"),R=12e4,z=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval((function(){return t._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return t._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 e=Date.now()-this._lastUsedTime;e>R&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=A["editor"].createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._getClient().then((function(t){e=t})).then((function(e){return t._worker.withSyncedResources(n)})).then((function(t){return e}))},e}();function I(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){var i=n[0];return"undefined"!==typeof t[i]?t[i]:e})),n}function C(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return I(t,n)}function H(e){return C}(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(r||(r={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=r.MAX_VALUE),t===Number.MAX_VALUE&&(t=r.MAX_VALUE),{line:e,character:t}}function n(e){var t=e;return me.objectLiteral(t)&&me.uinteger(t.line)&&me.uinteger(t.character)}e.create=t,e.is=n}(a||(a={})),function(e){function t(e,t,n,i){if(me.uinteger(e)&&me.uinteger(t)&&me.uinteger(n)&&me.uinteger(i))return{start:a.create(e,t),end:a.create(n,i)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")}function n(e){var t=e;return me.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}e.create=t,e.is=n}(o||(o={})),function(e){function t(e,t){return{uri:e,range:t}}function n(e){var t=e;return me.defined(t)&&o.is(t.range)&&(me.string(t.uri)||me.undefined(t.uri))}e.create=t,e.is=n}(s||(s={})),function(e){function t(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}}function n(e){var t=e;return me.defined(t)&&o.is(t.targetRange)&&me.string(t.targetUri)&&(o.is(t.targetSelectionRange)||me.undefined(t.targetSelectionRange))&&(o.is(t.originSelectionRange)||me.undefined(t.originSelectionRange))}e.create=t,e.is=n}(l||(l={})),function(e){function t(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}}function n(e){var t=e;return me.numberRange(t.red,0,1)&&me.numberRange(t.green,0,1)&&me.numberRange(t.blue,0,1)&&me.numberRange(t.alpha,0,1)}e.create=t,e.is=n}(c||(c={})),function(e){function t(e,t){return{range:e,color:t}}function n(e){var t=e;return o.is(t.range)&&c.is(t.color)}e.create=t,e.is=n}(h||(h={})),function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}function n(e){var t=e;return me.string(t.label)&&(me.undefined(t.textEdit)||v.is(t))&&(me.undefined(t.additionalTextEdits)||me.typedArray(t.additionalTextEdits,v.is))}e.create=t,e.is=n}(d||(d={})),function(e){e["Comment"]="comment",e["Imports"]="imports",e["Region"]="region"}(u||(u={})),function(e){function t(e,t,n,i,r){var a={startLine:e,endLine:t};return me.defined(n)&&(a.startCharacter=n),me.defined(i)&&(a.endCharacter=i),me.defined(r)&&(a.kind=r),a}function n(e){var t=e;return me.uinteger(t.startLine)&&me.uinteger(t.startLine)&&(me.undefined(t.startCharacter)||me.uinteger(t.startCharacter))&&(me.undefined(t.endCharacter)||me.uinteger(t.endCharacter))&&(me.undefined(t.kind)||me.string(t.kind))}e.create=t,e.is=n}(p||(p={})),function(e){function t(e,t){return{location:e,message:t}}function n(e){var t=e;return me.defined(t)&&s.is(t.location)&&me.string(t.message)}e.create=t,e.is=n}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(f||(f={})),function(e){e.Unnecessary=1,e.Deprecated=2}(g||(g={})),function(e){function t(e){var t=e;return void 0!==t&&null!==t&&me.string(t.href)}e.is=t}(b||(b={})),function(e){function t(e,t,n,i,r,a){var o={range:e,message:t};return me.defined(n)&&(o.severity=n),me.defined(i)&&(o.code=i),me.defined(r)&&(o.source=r),me.defined(a)&&(o.relatedInformation=a),o}function n(e){var t,n=e;return me.defined(n)&&o.is(n.range)&&me.string(n.message)&&(me.number(n.severity)||me.undefined(n.severity))&&(me.integer(n.code)||me.string(n.code)||me.undefined(n.code))&&(me.undefined(n.codeDescription)||me.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(me.string(n.source)||me.undefined(n.source))&&(me.undefined(n.relatedInformation)||me.typedArray(n.relatedInformation,m.is))}e.create=t,e.is=n}(_||(_={})),function(e){function t(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={title:e,command:t};return me.defined(n)&&n.length>0&&(r.arguments=n),r}function n(e){var t=e;return me.defined(t)&&me.string(t.title)&&me.string(t.command)}e.create=t,e.is=n}(w||(w={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function i(e){return{range:e,newText:""}}function r(e){var t=e;return me.objectLiteral(t)&&me.string(t.newText)&&o.is(t.range)}e.replace=t,e.insert=n,e.del=i,e.is=r}(v||(v={})),function(e){function t(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i}function n(e){var t=e;return void 0!==t&&me.objectLiteral(t)&&me.string(t.label)&&(me.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(me.string(t.description)||void 0===t.description)}e.create=t,e.is=n}(y||(y={})),function(e){function t(e){var t=e;return"string"===typeof t}e.is=t}(T||(T={})),function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}function i(e,t){return{range:e,newText:"",annotationId:t}}function r(e){var t=e;return v.is(t)&&(y.is(t.annotationId)||T.is(t.annotationId))}e.replace=t,e.insert=n,e.del=i,e.is=r}(k||(k={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){var t=e;return me.defined(t)&&D.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=n}(S||(S={})),function(e){function t(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){var t=e;return t&&"create"===t.kind&&me.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||me.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||me.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}e.create=t,e.is=n}(x||(x={})),function(e){function t(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r}function n(e){var t=e;return t&&"rename"===t.kind&&me.string(t.oldUri)&&me.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||me.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||me.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}e.create=t,e.is=n}(M||(M={})),function(e){function t(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){var t=e;return t&&"delete"===t.kind&&me.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||me.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||me.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}e.create=t,e.is=n}(L||(L={})),function(e){function t(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return me.string(e.kind)?x.is(e)||M.is(e)||L.is(e):S.is(e)})))}e.is=t}(E||(E={}));var U,W,D,P,O,N,q,j,F,B,G,V,K,J,X,Y,$,Q,Z,ee,te,ne,ie,re,ae,oe,se,le,ce,he,de=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=v.insert(e,t):T.is(n)?(r=n,i=k.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=k.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=v.replace(e,t):T.is(n)?(r=n,i=k.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=k.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=v.del(e):T.is(t)?(i=t,n=k.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=k.del(e,i)),this.edits.push(n),void 0!==i)return i},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),ue=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(T.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ue(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(S.is(e)){var n=new de(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new de(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(D.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){var i=[],r={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(r),n=new de(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");n=this._textEditChanges[e];if(!n){i=[];this._workspaceEdit.changes[e]=i,n=new de(i),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new ue,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,a;if(y.is(t)||T.is(t)?i=t:n=t,void 0===i?r=x.create(e,n):(a=T.is(i)?i:this._changeAnnotations.manage(i),r=x.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),void 0!==a)return a},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,a,o;if(y.is(n)||T.is(n)?r=n:i=n,void 0===r?a=M.create(e,t,i):(o=T.is(r)?r:this._changeAnnotations.manage(r),a=M.create(e,t,i,o)),this._workspaceEdit.documentChanges.push(a),void 0!==o)return o},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,a;if(y.is(t)||T.is(t)?i=t:n=t,void 0===i?r=L.create(e,n):(a=T.is(i)?i:this._changeAnnotations.manage(i),r=L.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),void 0!==a)return a}})();(function(e){function t(e){return{uri:e}}function n(e){var t=e;return me.defined(t)&&me.string(t.uri)}e.create=t,e.is=n})(U||(U={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return me.defined(t)&&me.string(t.uri)&&me.integer(t.version)}e.create=t,e.is=n}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return me.defined(t)&&me.string(t.uri)&&(null===t.version||me.integer(t.version))}e.create=t,e.is=n}(D||(D={})),function(e){function t(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}}function n(e){var t=e;return me.defined(t)&&me.string(t.uri)&&me.string(t.languageId)&&me.integer(t.version)&&me.string(t.text)}e.create=t,e.is=n}(P||(P={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(O||(O={})),function(e){function t(t){var n=t;return n===e.PlainText||n===e.Markdown}e.is=t}(O||(O={})),function(e){function t(e){var t=e;return me.objectLiteral(e)&&O.is(t.kind)&&me.string(t.value)}e.is=t}(N||(N={})),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}(q||(q={})),function(e){e.PlainText=1,e.Snippet=2}(j||(j={})),function(e){e.Deprecated=1}(F||(F={})),function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}function n(e){var t=e;return t&&me.string(t.newText)&&o.is(t.insert)&&o.is(t.replace)}e.create=t,e.is=n}(B||(B={})),function(e){e.asIs=1,e.adjustIndentation=2}(G||(G={})),function(e){function t(e){return{label:e}}e.create=t}(V||(V={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(K||(K={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){var t=e;return me.string(t)||me.objectLiteral(t)&&me.string(t.language)&&me.string(t.value)}e.fromPlainText=t,e.is=n}(J||(J={})),function(e){function t(e){var t=e;return!!t&&me.objectLiteral(t)&&(N.is(t.contents)||J.is(t.contents)||me.typedArray(t.contents,J.is))&&(void 0===e.range||o.is(e.range))}e.is=t}(X||(X={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(Y||(Y={})),function(e){function t(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={label:e};return me.defined(t)&&(r.documentation=t),me.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t}($||($={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){function t(e,t){var n={range:e};return me.number(t)&&(n.kind=t),n}e.create=t}(Z||(Z={})),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}(ee||(ee={})),function(e){e.Deprecated=1}(te||(te={})),function(e){function t(e,t,n,i,r){var a={name:e,kind:t,location:{uri:i,range:n}};return r&&(a.containerName=r),a}e.create=t}(ne||(ne={})),function(e){function t(e,t,n,i,r,a){var o={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==a&&(o.children=a),o}function n(e){var t=e;return t&&me.string(t.name)&&me.number(t.kind)&&o.is(t.range)&&o.is(t.selectionRange)&&(void 0===t.detail||me.string(t.detail))&&(void 0===t.deprecated||me.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=n}(ie||(ie={})),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"}(re||(re={})),function(e){function t(e,t){var n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),n}function n(e){var t=e;return me.defined(t)&&me.typedArray(t.diagnostics,_.is)&&(void 0===t.only||me.typedArray(t.only,me.string))}e.create=t,e.is=n}(ae||(ae={})),function(e){function t(e,t,n){var i={title:e},r=!0;return"string"===typeof t?(r=!1,i.kind=t):w.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i}function n(e){var t=e;return t&&me.string(t.title)&&(void 0===t.diagnostics||me.typedArray(t.diagnostics,_.is))&&(void 0===t.kind||me.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||w.is(t.command))&&(void 0===t.isPreferred||me.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}e.create=t,e.is=n}(oe||(oe={})),function(e){function t(e,t){var n={range:e};return me.defined(t)&&(n.data=t),n}function n(e){var t=e;return me.defined(t)&&o.is(t.range)&&(me.undefined(t.command)||w.is(t.command))}e.create=t,e.is=n}(se||(se={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function n(e){var t=e;return me.defined(t)&&me.uinteger(t.tabSize)&&me.boolean(t.insertSpaces)}e.create=t,e.is=n}(le||(le={})),function(e){function t(e,t,n){return{range:e,target:t,data:n}}function n(e){var t=e;return me.defined(t)&&o.is(t.range)&&(me.undefined(t.target)||me.string(t.target))}e.create=t,e.is=n}(ce||(ce={})),function(e){function t(e,t){return{range:e,parent:t}}function n(t){var n=t;return void 0!==n&&o.is(n.range)&&(void 0===n.parent||e.is(n.parent))}e.create=t,e.is=n}(he||(he={}));var pe;(function(e){function t(e,t,n,i){return new fe(e,t,n,i)}function n(e){var t=e;return!!(me.defined(t)&&me.string(t.uri)&&(me.undefined(t.languageId)||me.string(t.languageId))&&me.uinteger(t.lineCount)&&me.func(t.getText)&&me.func(t.positionAt)&&me.func(t.offsetAt))}function i(e,t){for(var n=e.getText(),i=r(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),a=n.length,o=i.length-1;o>=0;o--){var s=i[o],l=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=a))throw new Error("Overlapping edit");n=n.substring(0,l)+s.newText+n.substring(c,n.length),a=l}return n}function r(e,t){if(e.length<=1)return e;var n=e.length/2|0,i=e.slice(0,n),a=e.slice(n);r(i,t),r(a,t);var o=0,s=0,l=0;while(o<i.length&&s<a.length){var c=t(i[o],a[s]);e[l++]=c<=0?i[o++]:a[s++]}while(o<i.length)e[l++]=i[o++];while(s<a.length)e[l++]=a[s++];return e}e.create=t,e.is=n,e.applyEdits=i})(pe||(pe={}));var me,fe=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i<t.length;i++){n&&(e.push(i),n=!1);var r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return a.create(0,e);while(n<i){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var o=n-1;return a.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();(function(e){var t=Object.prototype.toString;function n(e){return"undefined"!==typeof e}function i(e){return"undefined"===typeof e}function r(e){return!0===e||!1===e}function a(e){return"[object String]"===t.call(e)}function o(e){return"[object Number]"===t.call(e)}function s(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i}function l(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647}function c(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647}function h(e){return"[object Function]"===t.call(e)}function d(e){return null!==e&&"object"===typeof e}function u(e,t){return Array.isArray(e)&&e.every(t)}e.defined=n,e.undefined=i,e.boolean=r,e.string=a,e.number=o,e.numberRange=s,e.integer=l,e.uinteger=c,e.func=h,e.objectLiteral=d,e.typedArray=u})(me||(me={}));var ge,be,_e,we,ve,ye=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(t,n){for(var i=0,r=t;i<r.length;i++){var a=r[i];if(e.isIncremental(a)){var o=Se(a.range),s=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,s)+a.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),h=Math.max(o.end.line,0),d=this._lineOffsets,u=ke(a.text,!1,s);if(h-c===u.length)for(var p=0,m=u.length;p<m;p++)d[p+c+1]=u[p];else u.length<1e4?d.splice.apply(d,[c+1,h-c].concat(u)):this._lineOffsets=d=d.slice(0,c+1).concat(u,d.slice(h+1));var f=a.text.length-(l-s);if(0!==f)for(p=c+1+u.length,m=d.length;p<m;p++)d[p]=d[p]+f}else{if(!e.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}}this._version=n},e.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=ke(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return{line:0,character:e};while(n<i){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var a=n-1;return{line:a,character:e-t[a]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(e){var t=e;return void 0!==t&&null!==t&&"string"===typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"===typeof t.rangeLength)},e.isFull=function(e){var t=e;return void 0!==t&&null!==t&&"string"===typeof t.text&&void 0===t.range&&void 0===t.rangeLength},e}();function Te(e,t){if(e.length<=1)return e;var n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);Te(i,t),Te(r,t);var a=0,o=0,s=0;while(a<i.length&&o<r.length){var l=t(i[a],r[o]);e[s++]=l<=0?i[a++]:r[o++]}while(a<i.length)e[s++]=i[a++];while(o<r.length)e[s++]=r[o++];return e}function ke(e,t,n){void 0===n&&(n=0);for(var i=t?[n]:[],r=0;r<e.length;r++){var a=e.charCodeAt(r);13!==a&&10!==a||(13===a&&r+1<e.length&&10===e.charCodeAt(r+1)&&r++,i.push(n+r+1))}return i}function Se(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function xe(e){var t=Se(e.range);return t!==e.range?{newText:e.newText,range:t}:e}(function(e){function t(e,t,n,i){return new ye(e,t,n,i)}function n(e,t,n){if(e instanceof ye)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function i(e,t){for(var n=e.getText(),i=Te(t.map(xe),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0,a=[],o=0,s=i;o<s.length;o++){var l=s[o],c=e.offsetAt(l.range.start);if(c<r)throw new Error("Overlapping edit");c>r&&a.push(n.substring(r,c)),l.newText.length&&a.push(l.newText),r=e.offsetAt(l.range.end)}return a.push(n.substr(r)),a.join("")}e.create=t,e.update=n,e.applyEdits=i})(ge||(ge={})),function(e){e[e["StartCommentTag"]=0]="StartCommentTag",e[e["Comment"]=1]="Comment",e[e["EndCommentTag"]=2]="EndCommentTag",e[e["StartTagOpen"]=3]="StartTagOpen",e[e["StartTagClose"]=4]="StartTagClose",e[e["StartTagSelfClose"]=5]="StartTagSelfClose",e[e["StartTag"]=6]="StartTag",e[e["EndTagOpen"]=7]="EndTagOpen",e[e["EndTagClose"]=8]="EndTagClose",e[e["EndTag"]=9]="EndTag",e[e["DelimiterAssign"]=10]="DelimiterAssign",e[e["AttributeName"]=11]="AttributeName",e[e["AttributeValue"]=12]="AttributeValue",e[e["StartDoctypeTag"]=13]="StartDoctypeTag",e[e["Doctype"]=14]="Doctype",e[e["EndDoctypeTag"]=15]="EndDoctypeTag",e[e["Content"]=16]="Content",e[e["Whitespace"]=17]="Whitespace",e[e["Unknown"]=18]="Unknown",e[e["Script"]=19]="Script",e[e["Styles"]=20]="Styles",e[e["EOS"]=21]="EOS"}(be||(be={})),function(e){e[e["WithinContent"]=0]="WithinContent",e[e["AfterOpeningStartTag"]=1]="AfterOpeningStartTag",e[e["AfterOpeningEndTag"]=2]="AfterOpeningEndTag",e[e["WithinDoctype"]=3]="WithinDoctype",e[e["WithinTag"]=4]="WithinTag",e[e["WithinEndTag"]=5]="WithinEndTag",e[e["WithinComment"]=6]="WithinComment",e[e["WithinScriptContent"]=7]="WithinScriptContent",e[e["WithinStyleContent"]=8]="WithinStyleContent",e[e["AfterAttributeName"]=9]="AfterAttributeName",e[e["BeforeAttributeValue"]=10]="BeforeAttributeValue"}(_e||(_e={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[O.Markdown,O.PlainText]}},hover:{contentFormat:[O.Markdown,O.PlainText]}}}}(we||(we={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["File"]=1]="File",e[e["Directory"]=2]="Directory",e[e["SymbolicLink"]=64]="SymbolicLink"}(ve||(ve={}));var Me=H(),Le=function(){function e(e,t){this.source=e,this.len=e.length,this.position=t}return e.prototype.eos=function(){return this.len<=this.position},e.prototype.getSource=function(){return this.source},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.goToEnd=function(){this.position=this.source.length},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){var t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},e.prototype.advanceIfRegExp=function(e){var t=this.source.substr(this.position),n=t.match(e);return n?(this.position=this.position+n.index+n[0].length,n[0]):""},e.prototype.advanceUntilRegExp=function(e){var t=this.source.substr(this.position),n=t.match(e);return n?(this.position=this.position+n.index,n[0]):(this.goToEnd(),"")},e.prototype.advanceUntilChar=function(e){while(this.position<this.source.length){if(this.source.charCodeAt(this.position)===e)return!0;this.advance(1)}return!1},e.prototype.advanceUntilChars=function(e){while(this.position+e.length<=this.source.length){for(var t=0;t<e.length&&this.source.charCodeAt(this.position+t)===e[t];t++);if(t===e.length)return!0;this.advance(1)}return this.goToEnd(),!1},e.prototype.skipWhitespace=function(){var e=this.advanceWhileChar((function(e){return e===Oe||e===Ne||e===We||e===Pe||e===De}));return e>0},e.prototype.advanceWhileChar=function(e){var t=this.position;while(this.position<this.len&&e(this.source.charCodeAt(this.position)))this.position++;return this.position-t},e}(),Ee="!".charCodeAt(0),Ae="-".charCodeAt(0),Re="<".charCodeAt(0),ze=">".charCodeAt(0),Ie="/".charCodeAt(0),Ce="=".charCodeAt(0),He='"'.charCodeAt(0),Ue="'".charCodeAt(0),We="\n".charCodeAt(0),De="\r".charCodeAt(0),Pe="\f".charCodeAt(0),Oe=" ".charCodeAt(0),Ne="\t".charCodeAt(0),qe={"text/x-handlebars-template":!0};function je(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=_e.WithinContent),void 0===i&&(i=!1);var r,a,o,s,l,c=new Le(e,t),h=n,d=0,u=be.Unknown;function p(){return c.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase()}function m(){return c.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase()}function f(e,t,n){return u=t,d=e,r=n,t}function g(){var e=c.pos(),t=h,n=b();return n===be.EOS||e!==c.pos()||i&&(n===be.StartTagClose||n===be.EndTagClose)?n:(console.log("Scanner.scan has not advanced at offset "+e+", state before: "+t+" after: "+h),c.advance(1),f(e,be.Unknown))}function b(){var e,t=c.pos();if(c.eos())return f(t,be.EOS);switch(h){case _e.WithinComment:return c.advanceIfChars([Ae,Ae,ze])?(h=_e.WithinContent,f(t,be.EndCommentTag)):(c.advanceUntilChars([Ae,Ae,ze]),f(t,be.Comment));case _e.WithinDoctype:return c.advanceIfChar(ze)?(h=_e.WithinContent,f(t,be.EndDoctypeTag)):(c.advanceUntilChar(ze),f(t,be.Doctype));case _e.WithinContent:if(c.advanceIfChar(Re)){if(!c.eos()&&c.peekChar()===Ee){if(c.advanceIfChars([Ee,Ae,Ae]))return h=_e.WithinComment,f(t,be.StartCommentTag);if(c.advanceIfRegExp(/^!doctype/i))return h=_e.WithinDoctype,f(t,be.StartDoctypeTag)}return c.advanceIfChar(Ie)?(h=_e.AfterOpeningEndTag,f(t,be.EndTagOpen)):(h=_e.AfterOpeningStartTag,f(t,be.StartTagOpen))}return c.advanceUntilChar(Re),f(t,be.Content);case _e.AfterOpeningEndTag:var n=p();return n.length>0?(h=_e.WithinEndTag,f(t,be.EndTag)):c.skipWhitespace()?f(t,be.Whitespace,Me("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(h=_e.WithinEndTag,c.advanceUntilChar(ze),t<c.pos()?f(t,be.Unknown,Me("error.endTagNameExpected","End tag name expected.")):b());case _e.WithinEndTag:if(c.skipWhitespace())return f(t,be.Whitespace);if(c.advanceIfChar(ze))return h=_e.WithinContent,f(t,be.EndTagClose);if(i&&c.peekChar()===Re)return h=_e.WithinContent,f(t,be.EndTagClose,Me("error.closingBracketMissing","Closing bracket missing."));e=Me("error.closingBracketExpected","Closing bracket expected.");break;case _e.AfterOpeningStartTag:return o=p(),l=void 0,s=void 0,o.length>0?(a=!1,h=_e.WithinTag,f(t,be.StartTag)):c.skipWhitespace()?f(t,be.Whitespace,Me("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(h=_e.WithinTag,c.advanceUntilChar(ze),t<c.pos()?f(t,be.Unknown,Me("error.startTagNameExpected","Start tag name expected.")):b());case _e.WithinTag:return c.skipWhitespace()?(a=!0,f(t,be.Whitespace)):a&&(s=m(),s.length>0)?(h=_e.AfterAttributeName,a=!1,f(t,be.AttributeName)):c.advanceIfChars([Ie,ze])?(h=_e.WithinContent,f(t,be.StartTagSelfClose)):c.advanceIfChar(ze)?(h="script"===o?l&&qe[l]?_e.WithinContent:_e.WithinScriptContent:"style"===o?_e.WithinStyleContent:_e.WithinContent,f(t,be.StartTagClose)):i&&c.peekChar()===Re?(h=_e.WithinContent,f(t,be.StartTagClose,Me("error.closingBracketMissing","Closing bracket missing."))):(c.advance(1),f(t,be.Unknown,Me("error.unexpectedCharacterInTag","Unexpected character in tag.")));case _e.AfterAttributeName:return c.skipWhitespace()?(a=!0,f(t,be.Whitespace)):c.advanceIfChar(Ce)?(h=_e.BeforeAttributeValue,f(t,be.DelimiterAssign)):(h=_e.WithinTag,b());case _e.BeforeAttributeValue:if(c.skipWhitespace())return f(t,be.Whitespace);var r=c.advanceIfRegExp(/^[^\s"'`=<>]+/);if(r.length>0)return c.peekChar()===ze&&c.peekChar(-1)===Ie&&(c.goBack(1),r=r.substr(0,r.length-1)),"type"===s&&(l=r),h=_e.WithinTag,a=!1,f(t,be.AttributeValue);var d=c.peekChar();return d===Ue||d===He?(c.advance(1),c.advanceUntilChar(d)&&c.advance(1),"type"===s&&(l=c.getSource().substring(t+1,c.pos()-1)),h=_e.WithinTag,a=!1,f(t,be.AttributeValue)):(h=_e.WithinTag,a=!1,b());case _e.WithinScriptContent:var u=1;while(!c.eos()){var g=c.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);if(0===g.length)return c.goToEnd(),f(t,be.Script);if("\x3c!--"===g)1===u&&(u=2);else if("--\x3e"===g)u=1;else if("/"!==g[1])2===u&&(u=3);else{if(3!==u){c.goBack(g.length);break}u=2}}return h=_e.WithinContent,t<c.pos()?f(t,be.Script):b();case _e.WithinStyleContent:return c.advanceUntilRegExp(/<\/style/i),h=_e.WithinContent,t<c.pos()?f(t,be.Styles):b()}return c.advance(1),h=_e.WithinContent,f(t,be.Unknown,e)}return{scan:g,getTokenType:function(){return u},getTokenOffset:function(){return d},getTokenLength:function(){return c.pos()-d},getTokenEnd:function(){return c.pos()},getTokenText:function(){return c.getSource().substring(d,c.pos())},getScannerState:function(){return h},getTokenError:function(){return r}}}function Fe(e,t){var n=0,i=e.length;if(0===i)return 0;while(n<i){var r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}function Be(e,t,n){var i=0,r=e.length-1;while(i<=r){var a=(i+r)/2|0,o=n(e[a],t);if(o<0)i=a+1;else{if(!(o>0))return a;r=a-1}}return-(i+1)}var Ge=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function Ve(e){return!!e&&Be(Ge,e.toLowerCase(),(function(e,t){return e.localeCompare(t)}))>=0}(function(){function e(e,t,n,i){this.start=e,this.end=t,this.children=n,this.parent=i,this.closed=!1}Object.defineProperty(e.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),e.prototype.isSameTag=function(e){return void 0===this.tag?void 0===e:void 0!==e&&this.tag.length===e.length&&this.tag.toLowerCase()===e},Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),e.prototype.findNodeBefore=function(e){var t=Fe(this.children,(function(t){return e<=t.start}))-1;if(t>=0){var n=this.children[t];if(e>n.start){if(e<n.end)return n.findNodeBefore(e);var i=n.lastChild;return i&&i.end===n.end?n.findNodeBefore(e):n}}return this},e.prototype.findNodeAt=function(e){var t=Fe(this.children,(function(t){return e<=t.start}))-1;if(t>=0){var n=this.children[t];if(e>n.start&&e<=n.end)return n.findNodeAt(e)}return this}})();var Ke={"Aacute;":"Á",Aacute:"Á","aacute;":"á",aacute:"á","Abreve;":"Ă","abreve;":"ă","ac;":"∾","acd;":"∿","acE;":"∾̳","Acirc;":"Â",Acirc:"Â","acirc;":"â",acirc:"â","acute;":"´",acute:"´","Acy;":"А","acy;":"а","AElig;":"Æ",AElig:"Æ","aelig;":"æ",aelig:"æ","af;":"","Afr;":"𝔄","afr;":"𝔞","Agrave;":"À",Agrave:"À","agrave;":"à",agrave:"à","alefsym;":"ℵ","aleph;":"ℵ","Alpha;":"Α","alpha;":"α","Amacr;":"Ā","amacr;":"ā","amalg;":"⨿","AMP;":"&",AMP:"&","amp;":"&",amp:"&","And;":"⩓","and;":"∧","andand;":"⩕","andd;":"⩜","andslope;":"⩘","andv;":"⩚","ang;":"∠","ange;":"⦤","angle;":"∠","angmsd;":"∡","angmsdaa;":"⦨","angmsdab;":"⦩","angmsdac;":"⦪","angmsdad;":"⦫","angmsdae;":"⦬","angmsdaf;":"⦭","angmsdag;":"⦮","angmsdah;":"⦯","angrt;":"∟","angrtvb;":"⊾","angrtvbd;":"⦝","angsph;":"∢","angst;":"Å","angzarr;":"⍼","Aogon;":"Ą","aogon;":"ą","Aopf;":"𝔸","aopf;":"𝕒","ap;":"≈","apacir;":"⩯","apE;":"⩰","ape;":"≊","apid;":"≋","apos;":"'","ApplyFunction;":"","approx;":"≈","approxeq;":"≊","Aring;":"Å",Aring:"Å","aring;":"å",aring:"å","Ascr;":"𝒜","ascr;":"𝒶","Assign;":"≔","ast;":"*","asymp;":"≈","asympeq;":"≍","Atilde;":"Ã",Atilde:"Ã","atilde;":"ã",atilde:"ã","Auml;":"Ä",Auml:"Ä","auml;":"ä",auml:"ä","awconint;":"∳","awint;":"⨑","backcong;":"≌","backepsilon;":"϶","backprime;":"‵","backsim;":"∽","backsimeq;":"⋍","Backslash;":"∖","Barv;":"⫧","barvee;":"⊽","Barwed;":"⌆","barwed;":"⌅","barwedge;":"⌅","bbrk;":"⎵","bbrktbrk;":"⎶","bcong;":"≌","Bcy;":"Б","bcy;":"б","bdquo;":"„","becaus;":"∵","Because;":"∵","because;":"∵","bemptyv;":"⦰","bepsi;":"϶","bernou;":"ℬ","Bernoullis;":"ℬ","Beta;":"Β","beta;":"β","beth;":"ℶ","between;":"≬","Bfr;":"𝔅","bfr;":"𝔟","bigcap;":"⋂","bigcirc;":"◯","bigcup;":"⋃","bigodot;":"⨀","bigoplus;":"⨁","bigotimes;":"⨂","bigsqcup;":"⨆","bigstar;":"★","bigtriangledown;":"▽","bigtriangleup;":"△","biguplus;":"⨄","bigvee;":"⋁","bigwedge;":"⋀","bkarow;":"⤍","blacklozenge;":"⧫","blacksquare;":"▪","blacktriangle;":"▴","blacktriangledown;":"▾","b