-
Notifications
You must be signed in to change notification settings - Fork 29
/
4.js
executable file
·1 lines (1 loc) · 19.3 KB
/
4.js
1
webpackJsonp([4],{1143:function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.setupMode=function(a){var b=new d.a(a),c=function(a){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];return b.getLanguageServiceWorker.apply(b,[a].concat(c))},f=a.languageId;monaco.languages.registerCompletionItemProvider(f,new e.a(c)),monaco.languages.registerHoverProvider(f,new e.g(c)),monaco.languages.registerDocumentHighlightProvider(f,new e.e(c)),monaco.languages.registerDefinitionProvider(f,new e.b(c)),monaco.languages.registerReferenceProvider(f,new e.h(c)),monaco.languages.registerDocumentSymbolProvider(f,new e.f(c)),monaco.languages.registerRenameProvider(f,new e.i(c)),monaco.languages.registerColorProvider(f,new e.d(c)),new e.c(f,c,a)};var d=c(1364),e=c(1365)},1364:function(a,b,c){"use strict";function d(a){var b,d,c=new e(function(a,c){b=a,d=c},function(){});return a.then(b,d),c}c.d(b,"a",function(){return f});var e=monaco.Promise,f=function(){function a(a){var b=this;this._defaults=a,this._worker=null,this._idleCheckInterval=setInterval(function(){return b._checkIfIdle()},30000),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return b._stopWorker()})}return a.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},a.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},a.prototype._checkIfIdle=function(){if(this._worker){var a=Date.now()-this._lastUsedTime;a>120000&&this._stopWorker()}},a.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},a.prototype.getLanguageServiceWorker=function(){for(var a=this,b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];var e;return d(this._getClient().then(function(a){e=a}).then(function(){return a._worker.withSyncedResources(b)}).then(function(){return e}))},a}()},1365:function(a,b,c){"use strict";function d(a){return a===s.b.Error?monaco.MarkerSeverity.Error:a===s.b.Warning?monaco.MarkerSeverity.Warning:a===s.b.Information?monaco.MarkerSeverity.Info:a===s.b.Hint?monaco.MarkerSeverity.Hint:monaco.MarkerSeverity.Info}function e(a,b){var c="number"==typeof b.code?b.code+"":b.code;return{severity:d(b.severity),startLineNumber:b.range.start.line+1,startColumn:b.range.start.character+1,endLineNumber:b.range.end.line+1,endColumn:b.range.end.character+1,message:b.message,code:c,source:b.source}}function f(a){return a?{character:a.column-1,line:a.lineNumber-1}:void 0}function g(a){return a?{start:{line:a.startLineNumber-1,character:a.startColumn-1},end:{line:a.endLineNumber-1,character:a.endColumn-1}}:void 0}function h(a){return a?new monaco.Range(a.start.line+1,a.start.character+1,a.end.line+1,a.end.character+1):void 0}function i(a){var b=monaco.languages.CompletionItemKind;return a===s.a.Text?b.Text:a===s.a.Method?b.Method:a===s.a.Function?b.Function:a===s.a.Constructor?b.Constructor:a===s.a.Field?b.Field:a===s.a.Variable?b.Variable:a===s.a.Class?b.Class:a===s.a.Interface?b.Interface:a===s.a.Module?b.Module:a===s.a.Property?b.Property:a===s.a.Unit?b.Unit:a===s.a.Value?b.Value:a===s.a.Enum?b.Enum:a===s.a.Keyword?b.Keyword:a===s.a.Snippet?b.Snippet:a===s.a.Color?b.Color:a===s.a.File?b.File:a===s.a.Reference?b.Reference:b.Property}function j(a){return a?{range:h(a.range),text:a.newText}:void 0}function k(a){return a&&"object"==typeof a&&"string"==typeof a.kind}function l(a){return"string"==typeof a?{value:a}:k(a)?"plaintext"===a.kind?{value:a.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:a.value}:{value:"```"+a.language+"\n"+a.value+"\n```\n"}}function m(a){return a?Array.isArray(a)?a.map(l):[l(a)]:void 0}function n(a){return a===s.c.Read?monaco.languages.DocumentHighlightKind.Read:a===s.c.Write?monaco.languages.DocumentHighlightKind.Write:a===s.c.Text?monaco.languages.DocumentHighlightKind.Text:monaco.languages.DocumentHighlightKind.Text}function o(a){return{uri:t.parse(a.uri),range:h(a.range)}}function p(a){if(a&&a.changes){var b=[];for(var c in a.changes){for(var d,e=[],f=0,g=a.changes[c];f<g.length;f++)d=g[f],e.push({range:h(d.range),text:d.newText});b.push({resource:t.parse(c),edits:e})}return{edits:b}}}function q(a){var b=monaco.languages.SymbolKind;return a===s.e.File?b.Array:a===s.e.Module?b.Module:a===s.e.Namespace?b.Namespace:a===s.e.Package?b.Package:a===s.e.Class?b.Class:a===s.e.Method?b.Method:a===s.e.Property?b.Property:a===s.e.Field?b.Field:a===s.e.Constructor?b.Constructor:a===s.e.Enum?b.Enum:a===s.e.Interface?b.Interface:a===s.e.Function?b.Function:a===s.e.Variable?b.Variable:a===s.e.Constant?b.Constant:a===s.e.String?b.String:a===s.e.Number?b.Number:a===s.e.Boolean?b.Boolean:a===s.e.Array?b.Array:b.Function}function r(a,b){return a.onCancellationRequested(function(){return b.cancel()}),b}c.d(b,"c",function(){return u}),c.d(b,"a",function(){return v}),c.d(b,"g",function(){return w}),c.d(b,"e",function(){return x}),c.d(b,"b",function(){return y}),c.d(b,"h",function(){return z}),c.d(b,"i",function(){return A}),c.d(b,"f",function(){return B}),c.d(b,"d",function(){return C});var s=c(1366),t=monaco.Uri,u=function(){function a(a,b,c){var d=this;this._languageId=a,this._worker=b,this._disposables=[],this._listener=Object.create(null);var e=function(a){var b=a.getModeId();if(b===d._languageId){var c;d._listener[a.uri.toString()]=a.onDidChangeContent(function(){clearTimeout(c),c=setTimeout(function(){return d._doValidate(a.uri,b)},500)}),d._doValidate(a.uri,b)}},f=function(a){monaco.editor.setModelMarkers(a,d._languageId,[]);var b=a.uri.toString(),c=d._listener[b];c&&(c.dispose(),delete d._listener[b])};this._disposables.push(monaco.editor.onDidCreateModel(e)),this._disposables.push(monaco.editor.onWillDisposeModel(f)),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(a){f(a.model),e(a.model)})),c.onDidChange(function(){monaco.editor.getModels().forEach(function(a){a.getModeId()===d._languageId&&(f(a),e(a))})}),this._disposables.push({dispose:function(){for(var a in d._listener)d._listener[a].dispose()}}),monaco.editor.getModels().forEach(e)}return a.prototype.dispose=function(){this._disposables.forEach(function(a){return a&&a.dispose()}),this._disposables=[]},a.prototype._doValidate=function(a,b){this._worker(a).then(function(b){return b.doValidation(a.toString())}).then(function(c){var d=c.map(function(b){return e(a,b)}),f=monaco.editor.getModel(a);f.getModeId()===b&&monaco.editor.setModelMarkers(f,b,d)}).done(void 0,function(a){console.error(a)})},a}(),v=function(){function a(a){this._worker=a}return Object.defineProperty(a.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),a.prototype.provideCompletionItems=function(a,b,c){var d=a.getWordUntilPosition(b),e=a.uri;return r(c,this._worker(e).then(function(a){return a.doComplete(e.toString(),f(b))}).then(function(a){if(a){var b=a.items.map(function(a){var b={label:a.label,insertText:a.insertText,sortText:a.sortText,filterText:a.filterText,documentation:a.documentation,detail:a.detail,kind:i(a.kind)};return a.textEdit&&(b.range=h(a.textEdit.range),b.insertText=a.textEdit.newText),a.additionalTextEdits&&(b.additionalTextEdits=a.additionalTextEdits.map(j)),a.insertTextFormat===s.d.Snippet&&(b.insertText={value:b.insertText}),b});return{isIncomplete:a.isIncomplete,items:b}}}))},a}(),w=function(){function a(a){this._worker=a}return a.prototype.provideHover=function(a,b,c){var d=a.uri;return r(c,this._worker(d).then(function(a){return a.doHover(d.toString(),f(b))}).then(function(a){return a?{range:h(a.range),contents:m(a.contents)}:void 0}))},a}(),x=function(){function a(a){this._worker=a}return a.prototype.provideDocumentHighlights=function(a,b,c){var d=a.uri;return r(c,this._worker(d).then(function(a){return a.findDocumentHighlights(d.toString(),f(b))}).then(function(a){return a?a.map(function(a){return{range:h(a.range),kind:n(a.kind)}}):void 0}))},a}(),y=function(){function a(a){this._worker=a}return a.prototype.provideDefinition=function(a,b,c){var d=a.uri;return r(c,this._worker(d).then(function(a){return a.findDefinition(d.toString(),f(b))}).then(function(a){return a?[o(a)]:void 0}))},a}(),z=function(){function a(a){this._worker=a}return a.prototype.provideReferences=function(a,b,c,d){var e=a.uri;return r(d,this._worker(e).then(function(a){return a.findReferences(e.toString(),f(b))}).then(function(a){return a?a.map(o):void 0}))},a}(),A=function(){function a(a){this._worker=a}return a.prototype.provideRenameEdits=function(a,b,c,d){var e=a.uri;return r(d,this._worker(e).then(function(a){return a.doRename(e.toString(),f(b),c)}).then(function(a){return p(a)}))},a}(),B=function(){function a(a){this._worker=a}return a.prototype.provideDocumentSymbols=function(a,b){var c=a.uri;return r(b,this._worker(c).then(function(a){return a.findDocumentSymbols(c.toString())}).then(function(a){return a?a.map(function(a){return{name:a.name,containerName:a.containerName,kind:q(a.kind),location:o(a.location)}}):void 0}))},a}(),C=function(){function a(a){this._worker=a}return a.prototype.provideDocumentColors=function(a,b){var c=a.uri;return r(b,this._worker(c).then(function(a){return a.findDocumentColors(c.toString())}).then(function(a){return a?a.map(function(a){return{color:a.color,range:h(a.range)}}):void 0}))},a.prototype.provideColorPresentations=function(a,b,c){var d=a.uri;return r(c,this._worker(d).then(function(a){return a.getColorPresentations(d.toString(),b.color,g(b.range))}).then(function(a){return a?a.map(function(a){var b={label:a.label};return a.textEdit&&(b.textEdit=j(a.textEdit)),a.additionalTextEdits&&(b.additionalTextEdits=a.additionalTextEdits.map(j)),b}):void 0}))},a}()},1366:function(a,b,c){"use strict";c.d(b,"b",function(){return g}),c.d(b,"a",function(){return r}),c.d(b,"d",function(){return s}),c.d(b,"c",function(){return y}),c.d(b,"e",function(){return A});var d;(function(a){a.create=function(a,b){return{line:a,character:b}},a.is=function(a){var b=a;return I.defined(b)&&I.number(b.line)&&I.number(b.character)}})(d||(d={}));var e;(function(a){a.create=function(a,b,c,e){if(I.number(a)&&I.number(b)&&I.number(c)&&I.number(e))return{start:d.create(a,b),end:d.create(c,e)};if(d.is(a)&&d.is(b))return{start:a,end:b};throw new Error("Range#create called with invalid arguments["+a+", "+b+", "+c+", "+e+"]")},a.is=function(a){var b=a;return I.defined(b)&&d.is(b.start)&&d.is(b.end)}})(e||(e={}));var f;(function(a){a.create=function(a,b){return{uri:a,range:b}},a.is=function(a){var b=a;return I.defined(b)&&e.is(b.range)&&(I.string(b.uri)||I.undefined(b.uri))}})(f||(f={}));var g;(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(g||(g={}));var h;(function(a){a.create=function(a,b,c,d,e){var f={range:a,message:b};return I.defined(c)&&(f.severity=c),I.defined(d)&&(f.code=d),I.defined(e)&&(f.source=e),f},a.is=function(a){var b=a;return I.defined(b)&&e.is(b.range)&&I.string(b.message)&&(I.number(b.severity)||I.undefined(b.severity))&&(I.number(b.code)||I.string(b.code)||I.undefined(b.code))&&(I.string(b.source)||I.undefined(b.source))}})(h||(h={}));var i;(function(a){a.create=function(a,b){for(var c=[],d=2;d<arguments.length;d++)c[d-2]=arguments[d];var e={title:a,command:b};return I.defined(c)&&0<c.length&&(e.arguments=c),e},a.is=function(a){var b=a;return I.defined(b)&&I.string(b.title)&&I.string(b.title)}})(i||(i={}));var j;(function(a){a.replace=function(a,b){return{range:a,newText:b}},a.insert=function(a,b){return{range:{start:a,end:a},newText:b}},a.del=function(a){return{range:a,newText:""}}})(j||(j={}));var k;(function(a){a.create=function(a,b){return{textDocument:a,edits:b}},a.is=function(a){var b=a;return I.defined(b)&&o.is(b.textDocument)&&Array.isArray(b.edits)}})(k||(k={}));var l,m=function(){function a(a){this.edits=a}return a.prototype.insert=function(a,b){this.edits.push(j.insert(a,b))},a.prototype.replace=function(a,b){this.edits.push(j.replace(a,b))},a.prototype.delete=function(a){this.edits.push(j.del(a))},a.prototype.add=function(a){this.edits.push(a)},a.prototype.all=function(){return this.edits},a.prototype.clear=function(){this.edits.splice(0,this.edits.length)},a}(),n=function(){function a(a){var b=this;this._textEditChanges=Object.create(null),a&&(this._workspaceEdit=a,a.documentChanges?a.documentChanges.forEach(function(a){var c=new m(a.edits);b._textEditChanges[a.textDocument.uri]=c}):a.changes&&Object.keys(a.changes).forEach(function(c){var d=new m(a.changes[c]);b._textEditChanges[c]=d}))}return Object.defineProperty(a.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),a.prototype.getTextEditChange=function(a){if(o.is(a)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for versioned document changes.");var b=a,c=this._textEditChanges[b.uri];if(!c){var d=[];this._workspaceEdit.documentChanges.push({textDocument:b,edits:d}),c=new m(d),this._textEditChanges[b.uri]=c}return c}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 c=this._textEditChanges[a];if(!c){var d=[];this._workspaceEdit.changes[a]=d,c=new m(d),this._textEditChanges[a]=c}return c},a}();(function(a){a.create=function(a){return{uri:a}},a.is=function(a){var b=a;return I.defined(b)&&I.string(b.uri)}})(l||(l={}));var o;(function(a){a.create=function(a,b){return{uri:a,version:b}},a.is=function(a){var b=a;return I.defined(b)&&I.string(b.uri)&&I.number(b.version)}})(o||(o={}));var p;(function(a){a.create=function(a,b,c,d){return{uri:a,languageId:b,version:c,text:d}},a.is=function(a){var b=a;return I.defined(b)&&I.string(b.uri)&&I.string(b.languageId)&&I.number(b.version)&&I.string(b.text)}})(p||(p={}));var q;(function(a){a.PlainText="plaintext",a.Markdown="markdown"})(q||(q={}));var r;(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(r||(r={}));var s;(function(a){a.PlainText=1,a.Snippet=2})(s||(s={}));var t;(function(a){a.create=function(a){return{label:a}}})(t||(t={}));var u;(function(a){a.create=function(a,b){return{items:a?a:[],isIncomplete:!!b}}})(u||(u={}));var v;(function(a){a.fromPlainText=function(a){return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}})(v||(v={}));var w;(function(a){a.create=function(a,b){return b?{label:a,documentation:b}:{label:a}}})(w||(w={}));var x;(function(a){a.create=function(a,b){for(var c=[],d=2;d<arguments.length;d++)c[d-2]=arguments[d];var e={label:a};return I.defined(b)&&(e.documentation=b),e.parameters=I.defined(c)?c:[],e}})(x||(x={}));var y;(function(a){a.Text=1,a.Read=2,a.Write=3})(y||(y={}));var z;(function(a){a.create=function(a,b){var c={range:a};return I.number(b)&&(c.kind=b),c}})(z||(z={}));var A;(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(A||(A={}));var B;(function(a){a.create=function(a,b,c,d,e){var f={name:a,kind:b,location:{uri:d,range:c}};return e&&(f.containerName=e),f}})(B||(B={}));var C;(function(a){a.create=function(a){return{diagnostics:a}},a.is=function(a){var b=a;return I.defined(b)&&I.typedArray(b.diagnostics,h.is)}})(C||(C={}));var D;(function(a){a.create=function(a,b){var c={range:a};return I.defined(b)&&(c.data=b),c},a.is=function(a){var b=a;return I.defined(b)&&e.is(b.range)&&(I.undefined(b.command)||i.is(b.command))}})(D||(D={}));var E;(function(a){a.create=function(a,b){return{tabSize:a,insertSpaces:b}},a.is=function(a){var b=a;return I.defined(b)&&I.number(b.tabSize)&&I.boolean(b.insertSpaces)}})(E||(E={}));var F=function(){return function(){}}();(function(a){a.create=function(a,b){return{range:a,target:b}},a.is=function(a){var b=a;return I.defined(b)&&e.is(b.range)&&(I.undefined(b.target)||I.string(b.target))}})(F||(F={}));var G;(function(a){function b(a,c){if(1>=a.length)return a;var d=0|a.length/2,e=a.slice(0,d),f=a.slice(d);b(e,c),b(f,c);for(var g=0,h=0,j=0;g<e.length&&h<f.length;){var i=c(e[g],f[h]);a[j++]=0>=i?e[g++]:f[h++]}for(;g<e.length;)a[j++]=e[g++];for(;h<f.length;)a[j++]=f[h++];return a}a.create=function(a,b,c,d){return new J(a,b,c,d)},a.is=function(a){var b=a;return I.defined(b)&&I.string(b.uri)&&(I.undefined(b.languageId)||I.string(b.languageId))&&I.number(b.lineCount)&&I.func(b.getText)&&I.func(b.positionAt)&&I.func(b.offsetAt)},a.applyEdits=function(a,c){for(var d=a.getText(),f=b(c,function(c,a){var b=c.range.start.line-a.range.start.line;return 0==b?c.range.start.character-a.range.start.character:0}),g=d.length,h=f.length-1;0<=h;h--){var i=f[h],e=a.offsetAt(i.range.start),j=a.offsetAt(i.range.end);if(j<=g)d=d.substring(0,e)+i.newText+d.substring(j,d.length);else throw new Error("Ovelapping edit");g=e}return d}})(G||(G={}));var H;(function(a){a.Manual=1,a.AfterDelay=2,a.FocusOut=3})(H||(H={}));var I,J=function(){function a(a,b,c,d){this._uri=a,this._languageId=b,this._version=c,this._content=d,this._lineOffsets=null}var b=Math.max,c=Math.min;return Object.defineProperty(a.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),a.prototype.getText=function(a){if(a){var b=this.offsetAt(a.start),c=this.offsetAt(a.end);return this._content.substring(b,c)}return this._content},a.prototype.update=function(a,b){this._content=a.text,this._version=b,this._lineOffsets=null},a.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var a=[],b=this._content,c=!0,d=0;d<b.length;d++){c&&(a.push(d),c=!1);var e=b.charAt(d);c="\r"===e||"\n"===e,"\r"===e&&d+1<b.length&&"\n"===b.charAt(d+1)&&d++}c&&0<b.length&&a.push(b.length),this._lineOffsets=a}return this._lineOffsets},a.prototype.positionAt=function(a){a=b(c(a,this._content.length),0);var e=this.getLineOffsets(),f=0,g=e.length;if(0===g)return d.create(0,a);for(;f<g;){var h=Math.floor((f+g)/2);e[h]>a?g=h:f=h+1}var i=f-1;return d.create(i,a-e[i])},a.prototype.offsetAt=function(a){var d=this.getLineOffsets();if(a.line>=d.length)return this._content.length;if(0>a.line)return 0;var e=d[a.line],f=a.line+1<d.length?d[a.line+1]:this._content.length;return b(c(e+a.character,f),e)},Object.defineProperty(a.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),a}();(function(a){var b=Object.prototype.toString;a.defined=function(a){return"undefined"!=typeof a},a.undefined=void 0,a.boolean=function(a){return!0===a||!1===a},a.string=function(a){return"[object String]"===b.call(a)},a.number=function(a){return"[object Number]"===b.call(a)},a.func=function(a){return"[object Function]"===b.call(a)},a.typedArray=function(a,b){return Array.isArray(a)&&a.every(b)}})(I||(I={}))}});