use-monaco
Version:
[](https://npm.im/use-monaco)
20 lines (12 loc) • 732 kB
JavaScript
(()=>{var ha=Object.create,Mt=Object.defineProperty,ua=Object.getPrototypeOf,ma=Object.prototype.hasOwnProperty,fa=Object.getOwnPropertyNames,ga=Object.getOwnPropertyDescriptor,Nr=n=>Mt(n,"__esModule",{value:!0}),_r=(n,e)=>()=>(e||(e={exports:{}},n(e.exports,e)),e.exports),ba=(n,e)=>{Nr(n);for(var t in e)Mt(n,t,{get:e[t],enumerable:!0})},kn=(n,e,t)=>{if(Nr(n),e&&typeof e=="object"||typeof e=="function")for(let r of fa(e))!ma.call(n,r)&&r!=="default"&&Mt(n,r,{get:()=>e[r],enumerable:!(t=ga(e,r))||t.enumerable});return n},je=n=>n&&n.__esModule?n:kn(Mt(n!=null?ha(ua(n)):{},"default",{value:n,enumerable:!0}),n),it=_r(va=>{kn(va,je(require("monaco-editor-core")))}),ia=_r(Rl=>{ba(Rl,{setupMode:()=>zl});var de=je(it());function zl(n){var e=[],t=[],r=new Or(n);e.push(r);var i=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return r.getLanguageServiceWorker.apply(r,a)};function o(){var a=n.languageId,l=n.modeConfiguration;ra(t),l.completionItems&&t.push(de.languages.registerCompletionItemProvider(a,new Ko(i))),l.hovers&&t.push(de.languages.registerHoverProvider(a,new qo(i))),l.documentHighlights&&t.push(de.languages.registerDocumentHighlightProvider(a,new Go(i))),l.definitions&&t.push(de.languages.registerDefinitionProvider(a,new Jo(i))),l.references&&t.push(de.languages.registerReferenceProvider(a,new Xo(i))),l.documentSymbols&&t.push(de.languages.registerDocumentSymbolProvider(a,new Qo(i))),l.rename&&t.push(de.languages.registerRenameProvider(a,new Yo(i))),l.colors&&t.push(de.languages.registerColorProvider(a,new Zo(i))),l.foldingRanges&&t.push(de.languages.registerFoldingRangeProvider(a,new ea(i))),l.diagnostics&&t.push(new Bo(a,i,n)),l.selectionRanges&&t.push(de.languages.registerSelectionRangeProvider(a,new ta(i)))}return o(),e.push(na(t)),na(e)}function na(n){return{dispose:function(){return ra(n)}}}function ra(n){for(;n.length;)n.pop().dispose()}}),Ue=je(it()),Sr=function(){function n(e,t,r){this._onDidChange=new Ue.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(r)}return Object.defineProperty(n.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),n.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},n.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},n}(),kr={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"}},Cr={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},oa=new Sr("css",kr,Cr),aa=new Sr("scss",kr,Cr),sa=new Sr("less",kr,Cr);Ue.languages.css={cssDefaults:oa,lessDefaults:sa,scssDefaults:aa};var Wr=je(it()),ya=2*60*1e3,Or=function(){function n(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return n.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},n.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},n.prototype._checkIfIdle=function(){if(!this._worker)return;var e=Date.now()-this._lastUsedTime;e>ya&&this._stopWorker()},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Wr.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},n.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i;return this._getClient().then(function(o){i=o}).then(function(o){return e._worker.withSyncedResources(t)}).then(function(o){return i})},n}();"use strict";var s;(function(n){n[n.Ident=0]="Ident",n[n.AtKeyword=1]="AtKeyword",n[n.String=2]="String",n[n.BadString=3]="BadString",n[n.UnquotedString=4]="UnquotedString",n[n.Hash=5]="Hash",n[n.Num=6]="Num",n[n.Percentage=7]="Percentage",n[n.Dimension=8]="Dimension",n[n.UnicodeRange=9]="UnicodeRange",n[n.CDO=10]="CDO",n[n.CDC=11]="CDC",n[n.Colon=12]="Colon",n[n.SemiColon=13]="SemiColon",n[n.CurlyL=14]="CurlyL",n[n.CurlyR=15]="CurlyR",n[n.ParenthesisL=16]="ParenthesisL",n[n.ParenthesisR=17]="ParenthesisR",n[n.BracketL=18]="BracketL",n[n.BracketR=19]="BracketR",n[n.Whitespace=20]="Whitespace",n[n.Includes=21]="Includes",n[n.Dashmatch=22]="Dashmatch",n[n.SubstringOperator=23]="SubstringOperator",n[n.PrefixOperator=24]="PrefixOperator",n[n.SuffixOperator=25]="SuffixOperator",n[n.Delim=26]="Delim",n[n.EMS=27]="EMS",n[n.EXS=28]="EXS",n[n.Length=29]="Length",n[n.Angle=30]="Angle",n[n.Time=31]="Time",n[n.Freq=32]="Freq",n[n.Exclamation=33]="Exclamation",n[n.Resolution=34]="Resolution",n[n.Comma=35]="Comma",n[n.Charset=36]="Charset",n[n.EscapedJavaScript=37]="EscapedJavaScript",n[n.BadEscapedJavaScript=38]="BadEscapedJavaScript",n[n.Comment=39]="Comment",n[n.SingleLineComment=40]="SingleLineComment",n[n.EOF=41]="EOF",n[n.CustomToken=42]="CustomToken"})(s||(s={}));var Lr=function(){function n(e){this.source=e,this.len=e.length,this.position=0}return n.prototype.substring=function(e,t){return t===void 0&&(t=this.position),this.source.substring(e,t)},n.prototype.eos=function(){return this.len<=this.position},n.prototype.pos=function(){return this.position},n.prototype.goBackTo=function(e){this.position=e},n.prototype.goBack=function(e){this.position-=e},n.prototype.advance=function(e){this.position+=e},n.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},n.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},n.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},n.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},n.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},n.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},n}(),Cn="a".charCodeAt(0),wa="f".charCodeAt(0),Ur="z".charCodeAt(0),Fn="A".charCodeAt(0),xa="F".charCodeAt(0),Vr="Z".charCodeAt(0),Pt="0".charCodeAt(0),At="9".charCodeAt(0),Sa="~".charCodeAt(0),ka="^".charCodeAt(0),ot="=".charCodeAt(0),Ca="|".charCodeAt(0),Be="-".charCodeAt(0),jr="_".charCodeAt(0),Fa="%".charCodeAt(0),Dn="*".charCodeAt(0),Br="(".charCodeAt(0),Kr=")".charCodeAt(0),Da="<".charCodeAt(0),Ea=">".charCodeAt(0),Ra="@".charCodeAt(0),za="#".charCodeAt(0),Ia="$".charCodeAt(0),En="\\".charCodeAt(0),$r="/".charCodeAt(0),Ke=`
`.charCodeAt(0),$e="\r".charCodeAt(0),at="\f".charCodeAt(0),qr='"'.charCodeAt(0),Gr="'".charCodeAt(0),Rn=" ".charCodeAt(0),zn=" ".charCodeAt(0),Ta=";".charCodeAt(0),Ma=":".charCodeAt(0),Pa="{".charCodeAt(0),Aa="}".charCodeAt(0),Na="[".charCodeAt(0),_a="]".charCodeAt(0),Wa=",".charCodeAt(0),Hr=".".charCodeAt(0),Jr="!".charCodeAt(0),he={};he[Ta]=s.SemiColon;he[Ma]=s.Colon;he[Pa]=s.CurlyL;he[Aa]=s.CurlyR;he[_a]=s.BracketR;he[Na]=s.BracketL;he[Br]=s.ParenthesisL;he[Kr]=s.ParenthesisR;he[Wa]=s.Comma;var K={};K.em=s.EMS;K.ex=s.EXS;K.px=s.Length;K.cm=s.Length;K.mm=s.Length;K.in=s.Length;K.pt=s.Length;K.pc=s.Length;K.deg=s.Angle;K.rad=s.Angle;K.grad=s.Angle;K.ms=s.Time;K.s=s.Time;K.hz=s.Freq;K.khz=s.Freq;K["%"]=s.Percentage;K.fr=s.Percentage;K.dpi=s.Resolution;K.dpcm=s.Resolution;var ye=function(){function n(){this.stream=new Lr(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return n.prototype.setSource=function(e){this.stream=new Lr(e)},n.prototype.finishToken=function(e,t,r){return{offset:e,len:this.stream.pos()-e,type:t,text:r||this.stream.substring(e)}},n.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},n.prototype.pos=function(){return this.stream.pos()},n.prototype.goBackTo=function(e){this.stream.goBackTo(e)},n.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,s.UnquotedString,t.join("")):null},n.prototype.scan=function(){var e=this.trivia();if(e!==null)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,s.EOF):this.scanNext(t)},n.prototype.scanNext=function(e){if(this.stream.advanceIfChars([Da,Jr,Be,Be]))return this.finishToken(e,s.CDO);if(this.stream.advanceIfChars([Be,Be,Ea]))return this.finishToken(e,s.CDC);var t=[];if(this.ident(t))return this.finishToken(e,s.Ident,t.join(""));if(this.stream.advanceIfChar(Ra))if(t=["@"],this._name(t)){var r=t.join("");return r==="@charset"?this.finishToken(e,s.Charset,r):this.finishToken(e,s.AtKeyword,r)}else return this.finishToken(e,s.Delim);if(this.stream.advanceIfChar(za))return t=["#"],this._name(t)?this.finishToken(e,s.Hash,t.join("")):this.finishToken(e,s.Delim);if(this.stream.advanceIfChar(Jr))return this.finishToken(e,s.Exclamation);if(this._number()){var i=this.stream.pos();if(t=[this.stream.substring(e,i)],this.stream.advanceIfChar(Fa))return this.finishToken(e,s.Percentage);if(this.ident(t)){var o=this.stream.substring(i).toLowerCase(),a=K[o];return typeof a!="undefined"?this.finishToken(e,a,t.join("")):this.finishToken(e,s.Dimension,t.join(""))}return this.finishToken(e,s.Num)}t=[];var l=this._string(t);return l!==null?this.finishToken(e,l,t.join("")):(l=he[this.stream.peekChar()],typeof l!="undefined"?(this.stream.advance(1),this.finishToken(e,l)):this.stream.peekChar(0)===Sa&&this.stream.peekChar(1)===ot?(this.stream.advance(2),this.finishToken(e,s.Includes)):this.stream.peekChar(0)===Ca&&this.stream.peekChar(1)===ot?(this.stream.advance(2),this.finishToken(e,s.Dashmatch)):this.stream.peekChar(0)===Dn&&this.stream.peekChar(1)===ot?(this.stream.advance(2),this.finishToken(e,s.SubstringOperator)):this.stream.peekChar(0)===ka&&this.stream.peekChar(1)===ot?(this.stream.advance(2),this.finishToken(e,s.PrefixOperator)):this.stream.peekChar(0)===Ia&&this.stream.peekChar(1)===ot?(this.stream.advance(2),this.finishToken(e,s.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,s.Delim)))},n.prototype.trivia=function(){for(;;){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,s.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,s.Comment)}else return null}},n.prototype.comment=function(){if(this.stream.advanceIfChars([$r,Dn])){var e=!1,t=!1;return this.stream.advanceWhileChar(function(r){return t&&r===$r?(e=!0,!1):(t=r===Dn,!0)}),e&&this.stream.advance(1),!0}return!1},n.prototype._number=function(){var e=0,t;return this.stream.peekChar()===Hr&&(e=1),t=this.stream.peekChar(e),t>=Pt&&t<=At?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=Pt&&r<=At||e===0&&r===Hr}),!0):!1},n.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case $e:case at:case Ke:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===$e&&this.stream.advanceIfChar(Ke)&&e.push(`
`),!0}return!1},n.prototype._escape=function(e,t){var r=this.stream.peekChar();if(r===En){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=Pt&&r<=At||r>=Cn&&r<=wa||r>=Fn&&r<=xa);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var o=parseInt(this.stream.substring(this.stream.pos()-i),16);o&&e.push(String.fromCharCode(o))}catch(a){}return r===Rn||r===zn?this.stream.advance(1):this._newline([]),!0}if(r!==$e&&r!==at&&r!==Ke)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(t)return this._newline(e)}return!1},n.prototype._stringChar=function(e,t){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==En&&r!==$e&&r!==at&&r!==Ke?(this.stream.advance(1),t.push(String.fromCharCode(r)),!0):!1},n.prototype._string=function(e){if(this.stream.peekChar()===Gr||this.stream.peekChar()===qr){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),s.String):s.BadString}return null},n.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==En&&t!==Gr&&t!==qr&&t!==Br&&t!==Kr&&t!==Rn&&t!==zn&&t!==Ke&&t!==at&&t!==$e?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},n.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===Rn||t===zn||t===Ke||t===at||t===$e});return e>0},n.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},n.prototype.ident=function(e){var t=this.stream.pos(),r=this._minus(e);if(r&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1},n.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===jr||t>=Cn&&t<=Ur||t>=Fn&&t<=Vr||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._minus=function(e){var t=this.stream.peekChar();return t===Be?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._identChar=function(e){var t=this.stream.peekChar();return t===jr||t===Be||t>=Cn&&t<=Ur||t>=Fn&&t<=Vr||t>=Pt&&t<=At||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n}();"use strict";function L(n,e){if(n.length<e.length)return!1;for(var t=0;t<e.length;t++)if(n[t]!==e[t])return!1;return!0}function Nt(n,e){var t=n.length-e.length;return t>0?n.lastIndexOf(e)===t:t===0?n===e:!1}function Xr(n,e,t){t===void 0&&(t=4);var r=Math.abs(n.length-e.length);if(r>t)return 0;var i=[],o=[],a,l;for(a=0;a<e.length+1;++a)o.push(0);for(a=0;a<n.length+1;++a)i.push(o);for(a=1;a<n.length+1;++a)for(l=1;l<e.length+1;++l)n[a-1]===e[l-1]?i[a][l]=i[a-1][l-1]+1:i[a][l]=Math.max(i[a-1][l],i[a][l-1]);return i[n.length][e.length]-Math.sqrt(r)}function In(n,e){return e===void 0&&(e=!0),n?n.length<140?n:n.slice(0,140)+(e?"\u2026":""):""}function Yr(n,e){var t=e.exec(n);return t&&t[0].length?n.substr(0,n.length-t[0].length):n}"use strict";var x=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},n(e,t)};return function(e,t){n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),p;(function(n){n[n.Undefined=0]="Undefined",n[n.Identifier=1]="Identifier",n[n.Stylesheet=2]="Stylesheet",n[n.Ruleset=3]="Ruleset",n[n.Selector=4]="Selector",n[n.SimpleSelector=5]="SimpleSelector",n[n.SelectorInterpolation=6]="SelectorInterpolation",n[n.SelectorCombinator=7]="SelectorCombinator",n[n.SelectorCombinatorParent=8]="SelectorCombinatorParent",n[n.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",n[n.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",n[n.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",n[n.Page=12]="Page",n[n.PageBoxMarginBox=13]="PageBoxMarginBox",n[n.ClassSelector=14]="ClassSelector",n[n.IdentifierSelector=15]="IdentifierSelector",n[n.ElementNameSelector=16]="ElementNameSelector",n[n.PseudoSelector=17]="PseudoSelector",n[n.AttributeSelector=18]="AttributeSelector",n[n.Declaration=19]="Declaration",n[n.Declarations=20]="Declarations",n[n.Property=21]="Property",n[n.Expression=22]="Expression",n[n.BinaryExpression=23]="BinaryExpression",n[n.Term=24]="Term",n[n.Operator=25]="Operator",n[n.Value=26]="Value",n[n.StringLiteral=27]="StringLiteral",n[n.URILiteral=28]="URILiteral",n[n.EscapedValue=29]="EscapedValue",n[n.Function=30]="Function",n[n.NumericValue=31]="NumericValue",n[n.HexColorValue=32]="HexColorValue",n[n.MixinDeclaration=33]="MixinDeclaration",n[n.MixinReference=34]="MixinReference",n[n.VariableName=35]="VariableName",n[n.VariableDeclaration=36]="VariableDeclaration",n[n.Prio=37]="Prio",n[n.Interpolation=38]="Interpolation",n[n.NestedProperties=39]="NestedProperties",n[n.ExtendsReference=40]="ExtendsReference",n[n.SelectorPlaceholder=41]="SelectorPlaceholder",n[n.Debug=42]="Debug",n[n.If=43]="If",n[n.Else=44]="Else",n[n.For=45]="For",n[n.Each=46]="Each",n[n.While=47]="While",n[n.MixinContentReference=48]="MixinContentReference",n[n.MixinContentDeclaration=49]="MixinContentDeclaration",n[n.Media=50]="Media",n[n.Keyframe=51]="Keyframe",n[n.FontFace=52]="FontFace",n[n.Import=53]="Import",n[n.Namespace=54]="Namespace",n[n.Invocation=55]="Invocation",n[n.FunctionDeclaration=56]="FunctionDeclaration",n[n.ReturnStatement=57]="ReturnStatement",n[n.MediaQuery=58]="MediaQuery",n[n.FunctionParameter=59]="FunctionParameter",n[n.FunctionArgument=60]="FunctionArgument",n[n.KeyframeSelector=61]="KeyframeSelector",n[n.ViewPort=62]="ViewPort",n[n.Document=63]="Document",n[n.AtApplyRule=64]="AtApplyRule",n[n.CustomPropertyDeclaration=65]="CustomPropertyDeclaration",n[n.CustomPropertySet=66]="CustomPropertySet",n[n.ListEntry=67]="ListEntry",n[n.Supports=68]="Supports",n[n.SupportsCondition=69]="SupportsCondition",n[n.NamespacePrefix=70]="NamespacePrefix",n[n.GridLine=71]="GridLine",n[n.Plugin=72]="Plugin",n[n.UnknownAtRule=73]="UnknownAtRule",n[n.Use=74]="Use",n[n.ModuleConfiguration=75]="ModuleConfiguration",n[n.Forward=76]="Forward",n[n.ForwardVisibility=77]="ForwardVisibility",n[n.Module=78]="Module"})(p||(p={}));var D;(function(n){n[n.Mixin=0]="Mixin",n[n.Rule=1]="Rule",n[n.Variable=2]="Variable",n[n.Function=3]="Function",n[n.Keyframe=4]="Keyframe",n[n.Unknown=5]="Unknown",n[n.Module=6]="Module",n[n.Forward=7]="Forward",n[n.ForwardVisibility=8]="ForwardVisibility"})(D||(D={}));function _t(n,e){var t=null;return!n||e<n.offset||e>n.end?null:(n.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(t?r.length<=t.length&&(t=r):t=r,!0):!1}),t)}function qe(n,e){for(var t=_t(n,e),r=[];t;)r.unshift(t),t=t.parent;return r}function Qr(n){var e=n.findParent(p.Declaration),t=e&&e.getValue();return t&&t.encloses(n)?e:null}var w=function(){function n(e,t,r){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,r&&(this.nodeType=r)}return Object.defineProperty(n.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.nodeType||p.Undefined},set:function(e){this.nodeType=e},enumerable:!0,configurable:!0}),n.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},n.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},n.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},n.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},n.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},n.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,r=this.children;t<r.length;t++){var i=r[t];i.accept(e)}},n.prototype.acceptVisitor=function(e){this.accept(e.visitNode.bind(e))},n.prototype.adoptChild=function(e,t){if(t===void 0&&(t=-1),e.parent&&e.parent.children){var r=e.parent.children.indexOf(e);r>=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),t!==-1?i.splice(t,0,e):i.push(e),e},n.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},n.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},n.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},n.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},n.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},n.prototype.setNode=function(e,t,r){return r===void 0&&(r=-1),t?(t.attachTo(this,r),this[e]=t,!0):!1},n.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},n.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);var t=e.end;(t>this.end||this.length===-1)&&(this.length=t-this.offset)},n.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},n.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},n.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},n.prototype.addChildren=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];this.addChild(i)}},n.prototype.findFirstChildBeforeOffset=function(e){if(this.children){for(var t=null,r=this.children.length-1;r>=0;r--)if(t=this.children[r],t.offset<=e)return t}return null},n.prototype.findChildAtOffset=function(e,t){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?t&&r.findChildAtOffset(e,!0)||r:null},n.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},n.prototype.getParent=function(){for(var e=this.parent;e instanceof Q;)e=e.parent;return e},n.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},n.prototype.findAParent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this;r&&!e.some(function(i){return r.type===i});)r=r.parent;return r},n.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},n.prototype.getData=function(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]},n}(),Q=function(n){x(e,n);function e(t,r){r===void 0&&(r=-1);var i=n.call(this,-1,-1)||this;return i.attachTo(t,r),i.offset=-1,i.length=-1,i}return e}(w),H=function(n){x(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.isCustomProperty=!1,i}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Identifier},enumerable:!0,configurable:!0}),e.prototype.containsInterpolation=function(){return this.hasChildren()},e}(w),Zr=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Stylesheet},enumerable:!0,configurable:!0}),e}(w),st=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Declarations},enumerable:!0,configurable:!0}),e}(w),O=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return e.prototype.getDeclarations=function(){return this.declarations},e.prototype.setDeclarations=function(t){return this.setNode("declarations",t)},e}(w),we=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Ruleset},enumerable:!0,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new Q(this)),this.selectors},e.prototype.isNested=function(){return!!this.parent&&this.parent.findParent(p.Declarations)!==null},e}(O),ue=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Selector},enumerable:!0,configurable:!0}),e}(w),me=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.SimpleSelector},enumerable:!0,configurable:!0}),e}(w),ei=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.AtApplyRule},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(w),lt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return e}(w),ti=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.CustomPropertyDeclaration},enumerable:!0,configurable:!0}),e.prototype.setProperty=function(t){return this.setNode("property",t)},e.prototype.getProperty=function(){return this.property},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e.prototype.setPropertySet=function(t){return this.setNode("propertySet",t)},e.prototype.getPropertySet=function(){return this.propertySet},e}(lt),ni=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.CustomPropertySet},enumerable:!0,configurable:!0}),e}(O),Z=function(n){x(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.property=null,i}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Declaration},enumerable:!0,configurable:!0}),e.prototype.setProperty=function(t){return this.setNode("property",t)},e.prototype.getProperty=function(){return this.property},e.prototype.getFullPropertyName=function(){var t=this.property?this.property.getName():"unknown";if(this.parent instanceof st&&this.parent.getParent()instanceof Tn){var r=this.parent.getParent().getParent();if(r instanceof e)return r.getFullPropertyName()+t}return t},e.prototype.getNonPrefixedPropertyName=function(){var t=this.getFullPropertyName();if(t&&t.charAt(0)==="-"){var r=t.indexOf("-",1);if(r!==-1)return t.substring(r+1)}return t},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e.prototype.setNestedProperties=function(t){return this.setNode("nestedProperties",t)},e.prototype.getNestedProperties=function(){return this.nestedProperties},e}(lt),Ge=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Property},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return Yr(this.getText(),/[_\+]+$/)},e.prototype.isCustomProperty=function(){return!!this.identifier&&this.identifier.isCustomProperty},e}(w),Oa=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Invocation},enumerable:!0,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new Q(this)),this.arguments},e}(w),xe=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Function},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(Oa),Fe=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.FunctionParameter},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setDefaultValue=function(t){return this.setNode("defaultValue",t,0)},e.prototype.getDefaultValue=function(){return this.defaultValue},e}(w),ae=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.FunctionArgument},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(w),ri=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.If},enumerable:!0,configurable:!0}),e.prototype.setExpression=function(t){return this.setNode("expression",t,0)},e.prototype.setElseClause=function(t){return this.setNode("elseClause",t)},e}(O),ii=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.For},enumerable:!0,configurable:!0}),e.prototype.setVariable=function(t){return this.setNode("variable",t,0)},e}(O),oi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Each},enumerable:!0,configurable:!0}),e.prototype.getVariables=function(){return this.variables||(this.variables=new Q(this)),this.variables},e}(O),ai=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.While},enumerable:!0,configurable:!0}),e}(O),si=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Else},enumerable:!0,configurable:!0}),e}(O),Me=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.FunctionDeclaration},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new Q(this)),this.parameters},e}(O),li=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.ViewPort},enumerable:!0,configurable:!0}),e}(O),Wt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.FontFace},enumerable:!0,configurable:!0}),e}(O),Tn=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.NestedProperties},enumerable:!0,configurable:!0}),e}(O),Ot=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Keyframe},enumerable:!0,configurable:!0}),e.prototype.setKeyword=function(t){return this.setNode("keyword",t,0)},e.prototype.getKeyword=function(){return this.keyword},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(O),Mn=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.KeyframeSelector},enumerable:!0,configurable:!0}),e}(O),He=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Import},enumerable:!0,configurable:!0}),e.prototype.setMedialist=function(t){return t?(t.attachTo(this),!0):!1},e}(w),ci=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Use},enumerable:!0,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new Q(this)),this.parameters},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(w),di=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.ModuleConfiguration},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(w),pi=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Forward},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(w),hi=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.ForwardVisibility},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(w),ui=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Namespace},enumerable:!0,configurable:!0}),e}(w),Lt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Media},enumerable:!0,configurable:!0}),e}(O),ct=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Supports},enumerable:!0,configurable:!0}),e}(O),mi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Document},enumerable:!0,configurable:!0}),e}(O),Ut=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return e.prototype.getMediums=function(){return this.mediums||(this.mediums=new Q(this)),this.mediums},e}(w),Vt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.MediaQuery},enumerable:!0,configurable:!0}),e}(w),Pe=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.SupportsCondition},enumerable:!0,configurable:!0}),e}(w),fi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Page},enumerable:!0,configurable:!0}),e}(O),gi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.PageBoxMarginBox},enumerable:!0,configurable:!0}),e}(O),jt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Expression},enumerable:!0,configurable:!0}),e}(w),Bt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.BinaryExpression},enumerable:!0,configurable:!0}),e.prototype.setLeft=function(t){return this.setNode("left",t)},e.prototype.getLeft=function(){return this.left},e.prototype.setRight=function(t){return this.setNode("right",t)},e.prototype.getRight=function(){return this.right},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e}(w),bi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Term},enumerable:!0,configurable:!0}),e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setExpression=function(t){return this.setNode("expression",t)},e.prototype.getExpression=function(){return this.expression},e}(w),vi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.AttributeSelector},enumerable:!0,configurable:!0}),e.prototype.setNamespacePrefix=function(t){return this.setNode("namespacePrefix",t)},e.prototype.getNamespacePrefix=function(){return this.namespacePrefix},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e}(w),Ol=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Operator},enumerable:!0,configurable:!0}),e}(w),dt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.HexColorValue},enumerable:!0,configurable:!0}),e}(w),La=".".charCodeAt(0),Ua="0".charCodeAt(0),Va="9".charCodeAt(0),pt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.NumericValue},enumerable:!0,configurable:!0}),e.prototype.getValue=function(){for(var t=this.getText(),r=0,i,o=0,a=t.length;o<a&&!(i=t.charCodeAt(o),!(Ua<=i&&i<=Va||i===La));o++)r+=1;return{value:t.substring(0,r),unit:r<t.length?t.substring(r):void 0}},e}(w),De=function(n){x(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.variable=null,i.value=null,i.needsSemicolon=!0,i}return Object.defineProperty(e.prototype,"type",{get:function(){return p.VariableDeclaration},enumerable:!0,configurable:!0}),e.prototype.setVariable=function(t){return t?(t.attachTo(this),this.variable=t,!0):!1},e.prototype.getVariable=function(){return this.variable},e.prototype.getName=function(){return this.variable?this.variable.getName():""},e.prototype.setValue=function(t){return t?(t.attachTo(this),this.value=t,!0):!1},e.prototype.getValue=function(){return this.value},e}(lt),ht=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Interpolation},enumerable:!0,configurable:!0}),e}(w),Je=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.VariableName},enumerable:!0,configurable:!0}),e.prototype.getName=function(){return this.getText()},e}(w),Ee=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.ExtendsReference},enumerable:!0,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new Q(this)),this.selectors},e}(w),yi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.MixinContentReference},enumerable:!0,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new Q(this)),this.arguments},e}(w),wi=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.MixinContentReference},enumerable:!0,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new Q(this)),this.parameters},e}(O),Ae=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.MixinReference},enumerable:!0,configurable:!0}),e.prototype.getNamespaces=function(){return this.namespaces||(this.namespaces=new Q(this)),this.namespaces},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getArguments=function(){return this.arguments||(this.arguments=new Q(this)),this.arguments},e.prototype.setContent=function(t){return this.setNode("content",t)},e.prototype.getContent=function(){return this.content},e}(w),Se=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.MixinDeclaration},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new Q(this)),this.parameters},e.prototype.setGuard=function(t){return t&&(t.attachTo(this),this.guard=t),!1},e}(O),Kt=function(n){x(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.UnknownAtRule},enumerable:!0,configurable:!0}),e.prototype.setAtRuleName=function(t){this.atRuleName=t},e.prototype.getAtRuleName=function(){return this.atRuleName},e}(O),xi=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.ListEntry},enumerable:!0,configurable:!0}),e.prototype.setKey=function(t){return this.setNode("key",t,0)},e.prototype.setValue=function(t){return this.setNode("value",t,1)},e}(w),Si=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getConditions=function(){return this.conditions||(this.conditions=new Q(this)),this.conditions},e}(w),ki=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.setVariable=function(t){return this.setNode("variable",t)},e}(w),Pn=function(n){x(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return p.Module},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(w),J;(function(n){n[n.Ignore=1]="Ignore",n[n.Warning=2]="Warning",n[n.Error=4]="Error"})(J||(J={}));var $t=function(){function n(e,t,r,i,o,a){o===void 0&&(o=e.offset),a===void 0&&(a=e.length),this.node=e,this.rule=t,this.level=r,this.message=i||t.message,this.offset=o,this.length=a}return n.prototype.getRule=function(){return this.rule},n.prototype.getLevel=function(){return this.level},n.prototype.getOffset=function(){return this.offset},n.prototype.getLength=function(){return this.length},n.prototype.getNode=function(){return this.node},n.prototype.getMessage=function(){return this.message},n}(),Ci=function(){function n(){this.entries=[]}return n.entries=function(e){var t=new n;return e.acceptVisitor(t),t.entries},n.prototype.visitNode=function(e){return e.isErroneous()&&e.collectIssues(this.entries),!0},n}();function ja(n,e){var t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,function(r,i){var o=i[0];return typeof e[o]!="undefined"?e[o]:r}),t}function Ba(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];return ja(e,t)}function U(n){return Ba}"use strict";var z=U(),I=function(){function n(e,t){this.id=e,this.message=t}return n}(),u={NumberExpected:new I("css-numberexpected",z("expected.number","number expected")),ConditionExpected:new I("css-conditionexpected",z("expected.condt","condition expected")),RuleOrSelectorExpected:new I("css-ruleorselectorexpected",z("expected.ruleorselector","at-rule or selector expected")),DotExpected:new I("css-dotexpected",z("expected.dot","dot expected")),ColonExpected:new I("css-colonexpected",z("expected.colon","colon expected")),SemiColonExpected:new I("css-semicolonexpected",z("expected.semicolon","semi-colon expected")),TermExpected:new I("css-termexpected",z("expected.term","term expected")),ExpressionExpected:new I("css-expressionexpected",z("expected.expression","expression expected")),OperatorExpected:new I("css-operatorexpected",z("expected.operator","operator expected")),IdentifierExpected:new I("css-identifierexpected",z("expected.ident","identifier expected")),PercentageExpected:new I("css-percentageexpected",z("expected.percentage","percentage expected")),URIOrStringExpected:new I("css-uriorstringexpected",z("expected.uriorstring","uri or string expected")),URIExpected:new I("css-uriexpected",z("expected.uri","URI expected")),VariableNameExpected:new I("css-varnameexpected",z("expected.varname","variable name expected")),VariableValueExpected:new I("css-varvalueexpected",z("expected.varvalue","variable value expected")),PropertyValueExpected:new I("css-propertyvalueexpected",z("expected.propvalue","property value expected")),LeftCurlyExpected:new I("css-lcurlyexpected",z("expected.lcurly","{ expected")),RightCurlyExpected:new I("css-rcurlyexpected",z("expected.rcurly","} expected")),LeftSquareBracketExpected:new I("css-rbracketexpected",z("expected.lsquare","[ expected")),RightSquareBracketExpected:new I("css-lbracketexpected",z("expected.rsquare","] expected")),LeftParenthesisExpected:new I("css-lparentexpected",z("expected.lparen","( expected")),RightParenthesisExpected:new I("css-rparentexpected",z("expected.rparent",") expected")),CommaExpected:new I("css-commaexpected",z("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new I("css-pagedirordeclexpected",z("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new I("css-unknownatrule",z("unknown.atrule","at-rule unknown")),UnknownKeyword:new I("css-unknownkeyword",z("unknown.keyword","unknown keyword")),SelectorExpected:new I("css-selectorexpected",z("expected.selector","selector expected")),StringLiteralExpected:new I("css-stringliteralexpected",z("expected.stringliteral","string literal expected")),WhitespaceExpected:new I("css-whitespaceexpected",z("expected.whitespace","whitespace expected")),MediaQueryExpected:new I("css-mediaqueryexpected",z("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new I("css-idorwildcardexpected",z("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new I("css-wildcardexpected",z("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new I("css-idorvarexpected",z("expected.idorvar","identifier or variable expected"))};"use strict";var Fi={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Di(n){switch(n){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F
`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it.
`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it.
`;default:return""}}function fe(n,e){var t;return e?t={kind:"markdown",value:$a(n)}:t={kind:"plaintext",value:Ka(n)},t.value===""?void 0:t}function An(n){return n=n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),n.replace(/</g,"<").replace(/>/g,">")}function Ka(n){if(!n.description||n.description==="")return"";if(typeof n.description!="string")return n.description.value;var e="";n.status&&(e+=Di(n.status)),e+=n.description;var t=Ei(n.browsers);return t&&(e+=`
(`+t+")"),"syntax"in n&&(e+=`
Syntax: `+n.syntax),n.references&&n.references.length>0&&(e+=`
`,e+=n.references.map(function(r){return r.name+": "+r.url}).join(" | ")),e}function $a(n){if(!n.description||n.description==="")return"";var e="";n.status&&(e+=Di(n.status));var t=typeof n.description=="string"?n.description:n.description.value;e+=An(t);var r=Ei(n.browsers);return r&&(e+=`
(`+An(r)+")"),"syntax"in n&&n.syntax&&(e+=`
Syntax: `+An(n.syntax)),n.references&&n.references.length>0&&(e+=`
`,e+=n.references.map(function(i){return"["+i.name+"]("+i.url+")"}).join(" | ")),e}function Ei(n){return n===void 0&&(n=[]),n.length===0?null:n.map(function(e){var t="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],o=r[2];return i in Fi&&(t+=Fi[i]),o&&(t+=" "+o),t}).join(", ")}var qt=U(),Ri=[{func:"rgb($red, $green, $blue)",desc:qt("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:qt("css.builtin.rgba","Creates a Color fro