1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
webpackJsonp([5],{"hs/E":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i,o,u,a,c,s,f,l,d,g,h,p,m,v,_,y,b,w,k,x,I,C,S,M,T,P=monaco.Promise,D=function(){function e(e){var n=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),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(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()},e.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},e.prototype.getLanguageServiceWorker=function(){for(var e,n,t,r,i,o=this,u=[],a=0;a<arguments.length;a++)u[a]=arguments[a];return n=this._getClient().then(function(n){e=n}).then(function(e){return o._worker.withSyncedResources(u)}).then(function(n){return e}),i=new P(function(e,n){t=e,r=n},function(){}),n.then(t,r),i},e}();!function(e){e.create=function(e,n){return{line:e,character:n}},e.is=function(e){var n=e;return F.defined(n)&&F.number(n.line)&&F.number(n.character)}}(r||(r={})),function(e){e.create=function(e,n,t,i){if(F.number(e)&&F.number(n)&&F.number(t)&&F.number(i))return{start:r.create(e,n),end:r.create(t,i)};if(r.is(e)&&r.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+t+", "+i+"]")},e.is=function(e){var n=e;return F.defined(n)&&r.is(n.start)&&r.is(n.end)}}(i||(i={})),function(e){e.create=function(e,n){return{uri:e,range:n}},e.is=function(e){var n=e;return F.defined(n)&&i.is(n.range)&&(F.string(n.uri)||F.undefined(n.uri))}}(o||(o={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(u||(u={})),function(e){e.create=function(e,n,t,r,i){var o={range:e,message:n};return F.defined(t)&&(o.severity=t),F.defined(r)&&(o.code=r),F.defined(i)&&(o.source=i),o},e.is=function(e){var n=e;return F.defined(n)&&i.is(n.range)&&F.string(n.message)&&(F.number(n.severity)||F.undefined(n.severity))&&(F.number(n.code)||F.string(n.code)||F.undefined(n.code))&&(F.string(n.source)||F.undefined(n.source))}}(a||(a={})),function(e){e.create=function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var i={title:e,command:n};return F.defined(t)&&t.length>0&&(i.arguments=t),i},e.is=function(e){var n=e;return F.defined(n)&&F.string(n.title)&&F.string(n.title)}}(c||(c={})),function(e){e.replace=function(e,n){return{range:e,newText:n}},e.insert=function(e,n){return{range:{start:e,end:e},newText:n}},e.del=function(e){return{range:e,newText:""}}}(s||(s={})),function(e){e.create=function(e,n){return{textDocument:e,edits:n}},e.is=function(e){var n=e;return F.defined(n)&&d.is(n.textDocument)&&Array.isArray(n.edits)}}(f||(f={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var n=e;return F.defined(n)&&F.string(n.uri)}}(l||(l={})),function(e){e.create=function(e,n){return{uri:e,version:n}},e.is=function(e){var n=e;return F.defined(n)&&F.string(n.uri)&&F.number(n.version)}}(d||(d={})),function(e){e.create=function(e,n,t,r){return{uri:e,languageId:n,version:t,text:r}},e.is=function(e){var n=e;return F.defined(n)&&F.string(n.uri)&&F.string(n.languageId)&&F.number(n.version)&&F.string(n.text)}}(g||(g={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(h||(h={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=
|