PageSourceSearch

https://www.freecodecamp.org/6181-8e9192fb765d8983c613.js

js freecodecamp.org collected 2026-09-24 07:57:40 UTC 296,807 bytes, 3 lines download raw bytes

vendor: 2,463 bytes, lines 1-2
1/*! For license information please see 6181-8e9192fb765d8983c613.js.LICENSE.txt */
2!function(){var e,t,r={27762:function(e,t){"use strict";t.byteLength=function(e){var t=a(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,s=a(e),o=s[0],c=s[1],h=new n(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),l=0,u=c>0?o-4:o;for(r=0;r<u;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],h[l++]=t>>16&255,h[l++]=t>>8&255,h[l++]=255&t;2===c&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,h[l++]=255&t);1===c&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,h[l++]=t>>8&255,h[l++]=255&t);return h},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,s=[],o=16383,a=0,c=i-n;a<c;a+=o)s.push(h(e,a,a+o>c?c:a+o));1===n?(t=e[i-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function h(e,t,r){for(var i,n=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(c(i));return n.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},36287:function(e,t){t.read=function(e,t,r,i,n){var s,o,a=8*n-i-1,c=(1<<a)-1,h=c>>1,l=-7,u=r?n-1:0,p=r?-1:1,d=e[t+u];for(u+=p,s=d&(1<<-l)-1,d>>=-l,l+=a;l>0;s=256*s+e[t+u],u+=p,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+e[t+u],u+=p,l-=8);if(0===s)s=1-h;else{if(s===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),s-=h}return(d?-1:1)*o*Math.pow(2,s-i)},t.write=function(e,t,r,i,n,s){var o,a,c,h=8*s-n-1,l=(1<<h)-1,u=l>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(o++,c/=2),o+u>=l?(a=0,o=l):o+u>=1?(a=(t*c-1)*Math.pow(2,n),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;e[r+d]=255&a,d+=f,a/=256,n-=8);for(o=o<<n|a,h+=n;h>0;e[r+d]=255&o,d+=f,o/=256,h-=8);e[r+d-f]|=128*g}},53808:function(e,t,r){"use strict";var i,n=r(86668);
2!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"}(i||(i={}));class s{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceWhileChar(e){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}const o="a".charCodeAt(0),a="f".charCodeAt(0),c="z".charCodeAt(0),h="A".charCodeAt(0),l="F".charCodeAt(0),u="Z".charCodeAt(0),p="0".charCodeAt(0),d="9".charCodeAt(0),f="~".charCodeAt(0),g="^".charCodeAt(0),m="=".charCodeAt(0),_="|".charCodeAt(0),y="-".charCodeAt(0),b="_".charCodeAt(0),x="%".charCodeAt(0),C="*".charCodeAt(0),k="(".charCodeAt(0),v=")".charCodeAt(0),w="<".charCodeAt(0),S=">".charCodeAt(0),P="@".charCodeAt(0),E="#".charCodeAt(0),I="$".charCodeAt(0),R="\\".charCodeAt(0),A="/".charCodeAt(0),T="\n".charCodeAt(0),D="\r".charCodeAt(0),$="\f".charCodeAt(0),L='"'.charCodeAt(0),M="'".charCodeAt(0),F=" ".charCodeAt(0),N="\t".charCodeAt(0),O=";".charCodeAt(0),V=":".charCodeAt(0),B="{".charCodeAt(0),U="}".charCodeAt(0),W="[".charCodeAt(0),K="]".charCodeAt(0),j=",".charCodeAt(0),z=".".charCodeAt(0),q="!".charCodeAt(0),H="?".charCodeAt(0),Q="+".charCodeAt(0),G={};G[O]=i.SemiColon,G[V]=i.Colon,G[B]=i.CurlyL,G[U]=i.CurlyR,G[K]=i.BracketR,G[W]=i.BracketL,G[k]=i.ParenthesisL,G[v]=i.ParenthesisR,G[j]=i.Comma;const J={};J.em=i.EMS,J.ex=i.EXS,J.px=i.Length,J.cm=i.Length,J.mm=i.Length,J.in=i.Length,J.pt=i.Length,J.pc=i.Length,J.deg=i.Angle,J.rad=i.Angle,J.grad=i.Angle,J.ms=i.Time,J.s=i.Time,J.hz=i.Freq,J.khz=i.Freq,J["%"]=i.Percentage,J.fr=i.Percentage,J.dpi=i.Resolution,J.dpcm=i.Resolution,J.cqw=i.ContainerQueryLength,J.cqh=i.ContainerQueryLength,J.cqi=i.ContainerQueryLength,J.cqb=i.ContainerQueryLength,J.cqmin=i.ContainerQueryLength,J.cqmax=i.ContainerQueryLength;class X{constructor(){this.stream=new s(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new s(e)}finishToken(e,t,r){return{offset:e,len:this.stream.pos()-e,type:t,text:r||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){const e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,i.UnquotedString,t.join("")):null}scan(){const e=this.trivia();if(null!==e)return e;const t=this.stream.pos();return this.stream.eos()?this.finishToken(t,i.EOF):this.scanNext(t)}tryScanUnicode(){const e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,i.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([w,q,y,y]))return this.finishToken(e,i.CDO);if(this.stream.advanceIfChars([y,y,S]))return this.finishToken(e,i.CDC);let t=[];if(this.ident(t))return this.finishToken(e,i.Ident,t.join(""));if(this.stream.advanceIfChar(P)){if(t=["@"],this._name(t)){const r=t.join("");return"@charset"===r?this.finishToken(e,i.Charset,r):this.finishToken(e,i.AtKeyword,r)}return this.finishToken(e,i.Delim)}if(this.stream.advanceIfChar(E))return t=["#"],this._name(t)?this.finishToken(e,i.Hash,t.join("")):this.finishToken(e,i.Delim);
2if(this.stream.advanceIfChar(q))return this.finishToken(e,i.Exclamation);if(this._number()){const r=this.stream.pos();if(t=[this.stream.substring(e,r)],this.stream.advanceIfChar(x))return this.finishToken(e,i.Percentage);if(this.ident(t)){const n=this.stream.substring(r).toLowerCase(),s=J[n];return void 0!==s?this.finishToken(e,s,t.join("")):this.finishToken(e,i.Dimension,t.join(""))}return this.finishToken(e,i.Num)}t=[];let r=this._string(t);return null!==r?this.finishToken(e,r,t.join("")):(r=G[this.stream.peekChar()],void 0!==r?(this.stream.advance(1),this.finishToken(e,r)):this.stream.peekChar(0)===f&&this.stream.peekChar(1)===m?(this.stream.advance(2),this.finishToken(e,i.Includes)):this.stream.peekChar(0)===_&&this.stream.peekChar(1)===m?(this.stream.advance(2),this.finishToken(e,i.Dashmatch)):this.stream.peekChar(0)===C&&this.stream.peekChar(1)===m?(this.stream.advance(2),this.finishToken(e,i.SubstringOperator)):this.stream.peekChar(0)===g&&this.stream.peekChar(1)===m?(this.stream.advance(2),this.finishToken(e,i.PrefixOperator)):this.stream.peekChar(0)===I&&this.stream.peekChar(1)===m?(this.stream.advance(2),this.finishToken(e,i.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,i.Delim)))}trivia(){for(;;){const e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,i.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,i.Comment)}}}comment(){if(this.stream.advanceIfChars([A,C])){let e=!1,t=!1;return this.stream.advanceWhileChar(r=>t&&r===A?(e=!0,!1):(t=r===C,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e,t=0;return this.stream.peekChar()===z&&(t=1),e=this.stream.peekChar(t),e>=p&&e<=d&&(this.stream.advance(t+1),this.stream.advanceWhileChar(e=>e>=p&&e<=d||0===t&&e===z),!0)}_newline(e){const t=this.stream.peekChar();switch(t){case D:case $:case T:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===D&&this.stream.advanceIfChar(T)&&e.push("\n"),!0}return!1}_escape(e,t){let r=this.stream.peekChar();if(r===R){this.stream.advance(1),r=this.stream.peekChar();let n=0;for(;n<6&&(r>=p&&r<=d||r>=o&&r<=a||r>=h&&r<=l);)this.stream.advance(1),r=this.stream.peekChar(),n++;if(n>0){try{const t=parseInt(this.stream.substring(this.stream.pos()-n),16);t&&e.push(String.fromCharCode(t))}catch(i){}return r===F||r===N?this.stream.advance(1):this._newline([]),!0}if(r!==D&&r!==$&&r!==T)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const r=this.stream.peekChar();return 0!==r&&r!==e&&r!==R&&r!==D&&r!==$&&r!==T&&(this.stream.advance(1),t.push(String.fromCharCode(r)),!0)}_string(e){if(this.stream.peekChar()===M||this.stream.peekChar()===L){const 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)),i.String):i.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return 0!==t&&t!==R&&t!==M&&t!==L&&t!==k&&t!==v&&t!==F&&t!==N&&t!==T&&t!==$&&t!==D&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(e=>e===F||e===N||e===T||e===$||e===D)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||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}_identFirstChar(e){const t=this.stream.peekChar();return(t===b||t>=o&&t<=c||t>=h&&t<=u||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_minus(e){const t=this.stream.peekChar();return t===y&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){const t=this.stream.peekChar();return(t===b||t===y||t>=o&&t<=c||t>=h&&t<=u||t>=p&&t<=d||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unicodeRange(){if(this.stream.advanceIfChar(Q)){const e=e=>e>=p&&e<=d||e>=o&&e<=a||e>=h&&e<=l,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(e=>
2e===H);if(t>=1&&t<=6){if(!this.stream.advanceIfChar(y))return!0;{const t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}}}return!1}}function Y(e,t){if(e.length<t.length)return!1;for(let r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function Z(e,t){let r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:0===r&&e===t}function ee(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function te(e,t){let r="";for(;t>0;)1&~t||(r+=e),e+=e,t>>>=1;return r}var re,ie;function ne(e,t){let r=null;return!e||t<e.offset||t>e.end?null:(e.accept(e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(r?e.length<=r.length&&(r=e):r=e,!0)),r)}function se(e,t){let r=ne(e,t);const i=[];for(;r;)i.unshift(r),r=r.parent;return i}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container"}(re||(re={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"}(ie||(ie={}));class oe{get end(){return this.offset+this.length}constructor(e=-1,t=-1,r){this.parent=null,this.offset=e,this.length=t,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||re.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),-1!==t?r.splice(t,0,e):r.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some(e=>e.isErroneous(!0))}setNode(e,t,r=-1){return!!t&&(t.attachTo(this,r),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);const t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(const t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let r=this.children.length-1;r>=0;r--)if(t=this.children[r],t.offset<=e)return t}return null}findChildAtOffset(e,t){const r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?t&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof ae;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(e=>t.type===e);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class ae extends oe{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class ce extends oe{constructor(e,t){super(e,t)}get type(){return re.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}
2class he extends oe{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return re.Identifier}containsInterpolation(){return this.hasChildren()}}class le extends oe{constructor(e,t){super(e,t)}get type(){return re.Stylesheet}}class ue extends oe{constructor(e,t){super(e,t)}get type(){return re.Declarations}}class pe extends oe{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class de extends pe{constructor(e,t){super(e,t)}get type(){return re.Ruleset}getSelectors(){return this.selectors||(this.selectors=new ae(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(re.Declarations)}}class fe extends oe{constructor(e,t){super(e,t)}get type(){return re.Selector}}class ge extends oe{constructor(e,t){super(e,t)}get type(){return re.SimpleSelector}}class me extends oe{constructor(e,t){super(e,t)}}class _e extends pe{constructor(e,t){super(e,t)}get type(){return re.CustomPropertySet}}class ye extends me{constructor(e,t){super(e,t),this.property=null}get type(){return re.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof ue&&this.parent.getParent()instanceof $e){const t=this.parent.getParent().getParent();if(t instanceof ye)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class be extends ye{constructor(e,t){super(e,t)}get type(){return re.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class xe extends oe{constructor(e,t){super(e,t)}get type(){return re.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){const r=t.exec(e);return r&&r[0].length?e.substr(0,e.length-r[0].length):e}(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class Ce extends oe{constructor(e,t){super(e,t)}get type(){return re.Invocation}getArguments(){return this.arguments||(this.arguments=new ae(this)),this.arguments}}class ke extends Ce{constructor(e,t){super(e,t)}get type(){return re.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class ve extends oe{constructor(e,t){super(e,t)}get type(){return re.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class we extends oe{constructor(e,t){super(e,t)}get type(){return re.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Se extends pe{constructor(e,t){super(e,t)}get type(){return re.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class Pe extends pe{constructor(e,t){super(e,t)}get type(){return re.For}setVariable(e){return this.setNode("variable",e,0)}}class Ee extends pe{constructor(e,t){super(e,t)}get type(){return re.Each}getVariables(){return this.variables||(this.variables=new ae(this)),this.variables}}class Ie extends pe{constructor(e,t){super(e,t)}get type(){return re.While}}class Re extends pe{constructor(e,t){super(e,t)}get type(){return re.Else}}class Ae extends pe{constructor(e,t){super(e,t)}get type(){return re.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new ae(this)),this.parameters}}class Te extends pe{constructor(e,t){super(e,t)}get type(){return re.ViewPort}}class De extends pe{constructor(e,t){super(e,t)}get type(){return re.FontFace}}class $e extends pe{constructor(e,t){super(e,t)}get type(){return re.NestedProperties}}class Le extends pe{constructor(e,t){super(e,t)}get type(){return re.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class Me extends pe{constructor(e,t){super(e,t)}get type(){return re.KeyframeSelector}}class Fe extends oe{constructor(e,t){super(e,t)}get type(){return re.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}}
2class Ne extends oe{get type(){return re.Use}getParameters(){return this.parameters||(this.parameters=new ae(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Oe extends oe{get type(){return re.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Ve extends oe{get type(){return re.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new ae(this)),this.members}getParameters(){return this.parameters||(this.parameters=new ae(this)),this.parameters}}class Be extends oe{get type(){return re.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Ue extends oe{constructor(e,t){super(e,t)}get type(){return re.Namespace}}class We extends pe{constructor(e,t){super(e,t)}get type(){return re.Media}}class Ke extends pe{constructor(e,t){super(e,t)}get type(){return re.Supports}}class je extends pe{constructor(e,t){super(e,t)}get type(){return re.Layer}
2setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class ze extends pe{constructor(e,t){super(e,t)}get type(){return re.PropertyAtRule}setName(e){return!!e&&(e.attachTo(this),this.name=e,!0)}getName(){return this.name}}class qe extends pe{constructor(e,t){super(e,t)}get type(){return re.Document}}class He extends pe{constructor(e,t){super(e,t)}get type(){return re.Container}}class Qe extends oe{constructor(e,t){super(e,t)}}class Ge extends oe{constructor(e,t){super(e,t)}get type(){return re.MediaQuery}}class Je extends oe{constructor(e,t){super(e,t)}get type(){return re.MediaCondition}}class Xe extends oe{constructor(e,t){super(e,t)}get type(){return re.MediaFeature}}class Ye extends oe{constructor(e,t){super(e,t)}get type(){return re.SupportsCondition}}class Ze extends pe{constructor(e,t){super(e,t)}get type(){return re.Page}}class et extends pe{constructor(e,t){super(e,t)}get type(){return re.PageBoxMarginBox}}class tt extends oe{constructor(e,t){super(e,t)}get type(){return re.Expression}}class rt extends oe{constructor(e,t){super(e,t)}get type(){return re.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class it extends oe{constructor(e,t){super(e,t)}get type(){return re.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class nt extends oe{constructor(e,t){super(e,t)}get type(){return re.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class st extends oe{constructor(e,t){super(e,t)}get type(){return re.HexColorValue}}class ot extends oe{constructor(e,t){super(e,t)}get type(){return re.RatioValue}}const at=".".charCodeAt(0),ct="0".charCodeAt(0),ht="9".charCodeAt(0);class lt extends oe{constructor(e,t){super(e,t)}get type(){return re.NumericValue}getValue(){const e=this.getText();let t,r=0;for(let i=0,n=e.length;i<n&&(t=e.charCodeAt(i),ct<=t&&t<=ht||t===at);i++)r+=1;return{value:e.substring(0,r),unit:r<e.length?e.substring(r):void 0}}}class ut extends me{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return re.VariableDeclaration}setVariable(e){return!!e&&(e.attachTo(this),this.variable=e,!0)}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():""}setValue(e){return!!e&&(e.attachTo(this),this.value=e,!0)}getValue(){return this.value}}class pt extends oe{constructor(e,t){super(e,t)}get type(){return re.Interpolation}}class dt extends oe{constructor(e,t){super(e,t)}get type(){return re.VariableName}getName(){return this.getText()}}class ft extends oe{constructor(e,t){super(e,t)}get type(){return re.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new ae(this)),this.selectors}}class gt extends oe{constructor(e,t){super(e,t)}get type(){return re.MixinContentReference}getArguments(){return this.arguments||(this.arguments=new ae(this)),this.arguments}}class mt extends pe{constructor(e,t){super(e,t)}get type(){return re.MixinContentDeclaration}getParameters(){return this.parameters||(this.parameters=new ae(this)),this.parameters}}class _t extends oe{constructor(e,t){super(e,t)}get type(){return re.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new ae(this)),this.namespaces}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getArguments(){return this.arguments||(this.arguments=new ae(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class yt extends pe{constructor(e,t){super(e,t)}get type(){return re.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new ae(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}class bt extends pe{constructor(e,t){super(e,t)}get type(){return re.UnknownAtRule}setAtRuleName(e){this.atRuleName=e}getAtRuleName(){return this.atRuleName}}
2class xt extends oe{get type(){return re.ListEntry}setKey(e){return this.setNode("key",e,0)}setValue(e){return this.setNode("value",e,1)}}class Ct extends oe{getConditions(){return this.conditions||(this.conditions=new ae(this)),this.conditions}}class kt extends oe{setVariable(e){return this.setNode("variable",e)}}class vt extends oe{get type(){return re.Module}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}var wt;!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(wt||(wt={}));class St{constructor(e,t,r,i,n=e.offset,s=e.length){this.node=e,this.rule=t,this.level=r,this.message=i||t.message,this.offset=n,this.length=s}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}}class Pt{static entries(e){const t=new Pt;return e.acceptVisitor(t),t.entries}constructor(){this.entries=[]}visitNode(e){return e.isErroneous()&&e.collectIssues(this.entries),!0}}function Et(...e){const t=e[0];let r,i,n;if("string"==typeof t)r=t,i=t,e.splice(0,1),n=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const r=e.slice(1);if(t.length!==r.length+1)throw new Error("expected a string as the first argument to l10n.t");let i=t[0];for(let e=1;e<t.length;e++)i+=`{${e-1}}`+t[e];return Et(i,...r)}i=t.message,r=i,t.comment&&t.comment.length>0&&(r+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),n=t.args??{}}return function(e,t){if(0===Object.keys(t).length)return e;return e.replace(It,(e,r)=>t[r]??e)}(i,n)}var It=/{([^}]+)}/g;class Rt{constructor(e,t){this.id=e,this.message=t}}const At={NumberExpected:new Rt("css-numberexpected",Et("number expected")),ConditionExpected:new Rt("css-conditionexpected",Et("condition expected")),RuleOrSelectorExpected:new Rt("css-ruleorselectorexpected",Et("at-rule or selector expected")),DotExpected:new Rt("css-dotexpected",Et("dot expected")),ColonExpected:new Rt("css-colonexpected",Et("colon expected")),SemiColonExpected:new Rt("css-semicolonexpected",Et("semi-colon expected")),TermExpected:new Rt("css-termexpected",Et("term expected")),ExpressionExpected:new Rt("css-expressionexpected",Et("expression expected")),OperatorExpected:new Rt("css-operatorexpected",Et("operator expected")),IdentifierExpected:new Rt("css-identifierexpected",Et("identifier expected")),PercentageExpected:new Rt("css-percentageexpected",Et("percentage expected")),URIOrStringExpected:new Rt("css-uriorstringexpected",Et("uri or string expected")),URIExpected:new Rt("css-uriexpected",Et("URI expected")),VariableNameExpected:new Rt("css-varnameexpected",Et("variable name expected")),VariableValueExpected:new Rt("css-varvalueexpected",Et("variable value expected")),PropertyValueExpected:new Rt("css-propertyvalueexpected",Et("property value expected")),LeftCurlyExpected:new Rt("css-lcurlyexpected",Et("{ expected")),RightCurlyExpected:new Rt("css-rcurlyexpected",Et("} expected")),LeftSquareBracketExpected:new Rt("css-rbracketexpected",Et("[ expected")),RightSquareBracketExpected:new Rt("css-lbracketexpected",Et("] expected")),LeftParenthesisExpected:new Rt("css-lparentexpected",Et("( expected")),RightParenthesisExpected:new Rt("css-rparentexpected",Et(") expected")),CommaExpected:new Rt("css-commaexpected",Et("comma expected")),PageDirectiveOrDeclarationExpected:new Rt("css-pagedirordeclexpected",Et("page directive or declaraton expected")),UnknownAtRule:new Rt("css-unknownatrule",Et("at-rule unknown")),UnknownKeyword:new Rt("css-unknownkeyword",Et("unknown keyword")),SelectorExpected:new Rt("css-selectorexpected",Et("selector expected")),StringLiteralExpected:new Rt("css-stringliteralexpected",Et("string literal expected")),WhitespaceExpected:new Rt("css-whitespaceexpected",Et("whitespace expected")),MediaQueryExpected:new Rt("css-mediaqueryexpected",Et("media query expected")),IdentifierOrWildcardExpected:new Rt("css-idorwildcardexpected",Et("identifier or wildcard expected")),WildcardExpected:new Rt("css-wildcardexpected",Et("wildcard expected")),IdentifierOrVariableExpected:new Rt("css-idorvarexpected",Et("identifier or variable expected"))};var Tt,Dt,$t,Lt,Mt,Ft,Nt,Ot,Vt,Bt,Ut,Wt,Kt,jt,zt,qt,Ht,Qt,Gt,Jt,Xt,Yt,Zt,er,tr,rr,ir,nr,sr,or,ar,cr,hr,lr,ur,pr,dr,fr,gr,mr,_r,yr,br,xr,Cr,kr,vr,wr,Sr,Pr,Er,Ir,Rr,Ar,Tr,Dr,$r,Lr,Mr,Fr,Nr,Or,Vr,Br,Ur,Wr,Kr,jr,zr,qr,Hr,Qr,Gr,Jr,Xr,Yr,Zr,ei,ti,ri,ii,ni,si;!function(e){e.is=function(e){return"string"==typeof e}}(Tt||(Tt={})),function(e){e.is=function(e){return"string"==typeof e}}(Dt||(Dt={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}($t||($t={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(Lt||(Lt={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=Lt.MAX_VALUE),t===Number.MAX_VALUE&&(t=Lt.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return ri.objectLiteral(t)&&ri.uinteger(t.line)&&ri.uinteger(t.character)}}(Mt||(Mt={})),function(e){e.create=function(e,t,r,i){if(ri.uinteger(e)&&ri.uinteger(t)&&ri.uinteger(r)&&ri.uinteger(i))return{start:Mt.create(e,t),end:Mt.create(r,i)};if(Mt.is(e)&&Mt.is(t))return{start:e,end:t};
2throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${i}]`)},e.is=function(e){let t=e;return ri.objectLiteral(t)&&Mt.is(t.start)&&Mt.is(t.end)}}(Ft||(Ft={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return ri.objectLiteral(t)&&Ft.is(t.range)&&(ri.string(t.uri)||ri.undefined(t.uri))}}(Nt||(Nt={})),function(e){e.create=function(e,t,r,i){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:i}},e.is=function(e){let t=e;return ri.objectLiteral(t)&&Ft.is(t.targetRange)&&ri.string(t.targetUri)&&Ft.is(t.targetSelectionRange)&&(Ft.is(t.originSelectionRange)||ri.undefined(t.originSelectionRange))}}(Ot||(Ot={})),function(e){e.create=function(e,t,r,i){return{red:e,green:t,blue:r,alpha:i}},e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.numberRange(t.red,0,1)&&ri.numberRange(t.green,0,1)&&ri.numberRange(t.blue,0,1)&&ri.numberRange(t.alpha,0,1)}}(Vt||(Vt={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return ri.objectLiteral(t)&&Ft.is(t.range)&&Vt.is(t.color)}}(Bt||(Bt={})),function(e){e.create=function(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}},e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.string(t.label)&&(ri.undefined(t.textEdit)||Jt.is(t))&&(ri.undefined(t.additionalTextEdits)||ri.typedArray(t.additionalTextEdits,Jt.is))}}(Ut||(Ut={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(Wt||(Wt={})),function(e){e.create=function(e,t,r,i,n,s){const o={startLine:e,endLine:t};return ri.defined(r)&&(o.startCharacter=r),ri.defined(i)&&(o.endCharacter=i),ri.defined(n)&&(o.kind=n),ri.defined(s)&&(o.collapsedText=s),o},e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.uinteger(t.startLine)&&ri.uinteger(t.startLine)&&(ri.undefined(t.startCharacter)||ri.uinteger(t.startCharacter))&&(ri.undefined(t.endCharacter)||ri.uinteger(t.endCharacter))&&(ri.undefined(t.kind)||ri.str
2ing(t.kind))}}(Kt||(Kt={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return ri.defined(t)&&Nt.is(t.location)&&ri.string(t.message)}}(jt||(jt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(zt||(zt={})),function(e){e.Unnecessary=1,e.Deprecated=2}(qt||(qt={})),function(e){e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.string(t.href)}}(Ht||(Ht={})),function(e){e.create=function(e,t,r,i,n,s){let o={range:e,message:t};return ri.defined(r)&&(o.severity=r),ri.defined(i)&&(o.code=i),ri.defined(n)&&(o.source=n),ri.defined(s)&&(o.relatedInformation=s),o},e.is=function(e){var t;let r=e;return ri.defined(r)&&Ft.is(r.range)&&ri.string(r.message)&&(ri.number(r.severity)||ri.undefined(r.severity))&&(ri.integer(r.code)||ri.string(r.code)||ri.undefined(r.code))&&(ri.undefined(r.codeDescription)||ri.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(ri.string(r.source)||ri.undefined(r.source))&&(ri.undefined(r.relatedInformation)||ri.typedArray(r.relatedInformation,jt.is))}}(Qt||(Qt={})),function(e){e.create=function(e,t,...r){let i={title:e,command:t};return ri.defined(r)&&r.length>0&&(i.arguments=r),i},e.is=function(e){let t=e;return ri.defined(t)&&ri.string(t.title)&&ri.string(t.command)}}(Gt||(Gt={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.string(t.newText)&&Ft.is(t.range)}}(Jt||(Jt={})),function(e){e.create=function(e,t,r){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==r&&(i.description=r),i},e.is=function(e){const t=e;return ri.objectLiteral(t)&&ri.string(t.label)&&(ri.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ri.string(t.description)||void 0===t.description)}}(Xt||(Xt={})),function(e){e.is=function(e){const t=e;return ri.string(t)}}(Yt||(Yt={})),function(e){e.replace=function(e,t,r){return{range:e,newText:t,annotationId:r}},e.insert=function(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Jt.is(t)&&(Xt.is(t.annotationId)||Yt.is(t.annotationId))}}(Zt||(Zt={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return ri.defined(t)&&ar.is(t.textDocument)&&Array.isArray(t.edits)}}(er||(er={})),function(e){e.create=function(e,t,r){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&ri.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ri.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ri.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Yt.is(t.annotationId))}}(tr||(tr={})),function(e){e.create=function(e,t,r,i){let n={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(n.options=r),void 0!==i&&(n.annotationId=i),n},e.is=function(e){let t=e;return t&&"rename"===t.kind&&ri.string(t.oldUri)&&ri.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ri.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ri.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Yt.is(t.annotationId))}}(rr||(rr={})),function(e){e.create=function(e,t,r){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&ri.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ri.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ri.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Yt.is(t.annotationId))}}(ir||(ir={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>ri.string(e.kind)?tr.is(e)||rr.is(e)||ir.is(e):er.is(e)))}}(nr||(nr={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;
2return ri.defined(t)&&ri.string(t.uri)}}(sr||(sr={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return ri.defined(t)&&ri.string(t.uri)&&ri.integer(t.version)}}(or||(or={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return ri.defined(t)&&ri.string(t.uri)&&(null===t.version||ri.integer(t.version))}}(ar||(ar={})),function(e){e.create=function(e,t,r,i){return{uri:e,languageId:t,version:r,text:i}},e.is=function(e){let t=e;return ri.defined(t)&&ri.string(t.uri)&&ri.string(t.languageId)&&ri.integer(t.version)&&ri.string(t.text)}}(cr||(cr={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const r=t;return r===e.PlainText||r===e.Markdown}}(hr||(hr={})),function(e){e.is=function(e){const t=e;return ri.objectLiteral(e)&&hr.is(t.kind)&&ri.string(t.value)}}(lr||(lr={})),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}(ur||(ur={})),function(e){e.PlainText=1,e.Snippet=2}(pr||(pr={})),function(e){e.Deprecated=1}(dr||(dr={})),function(e){e.create=function(e,t,r){return{newText:e,insert:t,replace:r}},e.is=function(e){const t=e;return t&&ri.string(t.newText)&&Ft.is(t.insert)&&Ft.is(t.replace)}}(fr||(fr={})),function(e){e.asIs=1,e.adjustIndentation=2}(gr||(gr={})),function(e){e.is=function(e){const t=e;return t&&(ri.string(t.detail)||void 0===t.detail)&&(ri.string(t.description)||void 0===t.description)}}(mr||(mr={})),function(e){e.create=function(e){return{label:e}}}(_r||(_r={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(yr||(yr={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return ri.string(t)||ri.objectLiteral(t)&&ri.string(t.language)&&ri.string(t.value)}}(br||(br={})),function(e){e.is=function(e){let t=e;return!!t&&ri.objectLiteral(t)&&(lr.is(t.contents)||br.is(t.contents)||ri.typedArray(t.contents,br.is))&&(void 0===e.range||Ft.is(e.range))}}(xr||(xr={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Cr||(Cr={})),function(e){e.create=function(e,t,...r){let i={label:e};return ri.defined(t)&&(i.documentation=t),ri.defined(r)?i.parameters=r:i.parameters=[],i}}(kr||(kr={})),function(e){e.Text=1,e.Read=2,e.Write=3}(vr||(vr={})),function(e){e.create=function(e,t){let r={range:e};return ri.number(t)&&(r.kind=t),r}}(wr||(wr={})),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}(Sr||(Sr={})),function(e){e.Deprecated=1}(Pr||(Pr={})),function(e){e.create=function(e,t,r,i,n){let s={name:e,kind:t,location:{uri:i,range:r}};return n&&(s.containerName=n),s}}(Er||(Er={})),function(e){e.create=function(e,t,r,i){return void 0!==i?{name:e,kind:t,location:{uri:r,range:i}}:{name:e,kind:t,location:{uri:r}}}}(Ir||(Ir={})),function(e){e.create=function(e,t,r,i,n,s){let o={name:e,detail:t,kind:r,range:i,selectionRange:n};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&ri.string(t.name)&&ri.number(t.kind)&&Ft.is(t.range)&&Ft.is(t.selectionRange)&&(void 0===t.detail||ri.string(t.detail))&&(void 0===t.deprecated||ri.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Rr||(Rr={})),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"}(Ar||(Ar={})),function(e){e.Invoked=1,e.Automatic=2}(Tr||(Tr={})),function(e){e.create=function(e,t,r){let i={diagnostics:e};return null!=t&&(i.only=t),null!=r&&(i.triggerKind=r),i},e.is=function(e){let t=e;return ri.defined(t)&&ri.typedArray(t.diagnostics,Qt.is)&&(void 0===t.only||ri.typedArray(t.only,ri.string))&&(void 0===t.triggerKind||t.triggerKind===Tr.Invoked||t.triggerKind===Tr.Automatic)}}(Dr||(Dr={})),function(e){e.create=function(e,t,r){let i={title:e},n=!0;return"string"==typeof t?(n=!1,i.kind=t):Gt.is(t)?i.command=t:i.edit=t,n&&void 0!==r&&(i.kind=r),i},e.is=function(e){let t=e;return t&&ri.string(t.title)&&(void 0===t.diagnostics||ri.typedArray(t.diagnostics,Qt.is))&&(void 0===t.kind||ri.str
2ing(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Gt.is(t.command))&&(void 0===t.isPreferred||ri.boolean(t.isPreferred))&&(void 0===t.edit||nr.is(t.edit))}}($r||($r={})),function(e){e.create=function(e,t){let r={range:e};return ri.defined(t)&&(r.data=t),r},e.is=function(e){let t=e;return ri.defined(t)&&Ft.is(t.range)&&(ri.undefined(t.command)||Gt.is(t.command))}}(Lr||(Lr={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return ri.defined(t)&&ri.uinteger(t.tabSize)&&ri.boolean(t.insertSpaces)}}(Mr||(Mr={})),function(e){e.create=function(e,t,r){return{range:e,target:t,data:r}},e.is=function(e){let t=e;return ri.defined(t)&&Ft.is(t.range)&&(ri.undefined(t.target)||ri.string(t.target))}}(Fr||(Fr={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let r=t;return ri.objectLiteral(r)&&Ft.is(r.range)&&(void 0===r.parent||e.is(r.parent))}}(Nr||(Nr={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Or||(Or={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Vr||(Vr={})),function(e){e.is=function(e){const t=e;return ri.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Br||(Br={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&Ft.is(t.range)&&ri.string(t.text)}}(Ur||(Ur={})),function(e){e.create=function(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}},e.is=function(e){const t=e;return null!=t&&Ft.is(t.range)&&ri.boolean(t.caseSensitiveLookup)&&(ri.string(t.variableName)||void 0===t.variableName)}}(Wr||(Wr={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&Ft.is(t.range)&&(ri.string(t.expression)||void 0===t.expression)}}(Kr||(Kr={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return ri.defined(t)&&Ft.is(e.stoppedLocation)}}(jr||(jr={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(zr||(zr={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return ri.objectLiteral(t)&&(void 0===t.tooltip||ri.string(t.tooltip)||lr.is(t.tooltip))&&(void 0===t.location||Nt.is(t.location))&&(void 0===t.command||Gt.is(t.command))}}(qr||(qr={})),function(e){e.create=function(e,t,r){const i={position:e,label:t};return void 0!==r&&(i.kind=r),i},e.is=function(e){const t=e;return ri.objectLiteral(t)&&Mt.is(t.position)&&(ri.string(t.label)||ri.typedArray(t.label,qr.is))&&(void 0===t.kind||zr.is(t.kind))&&void 0===t.textEdits||ri.typedArray(t.textEdits,Jt.is)&&(void 0===t.tooltip||ri.string(t.tooltip)||lr.is(t.tooltip))&&(void 0===t.paddingLeft||ri.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ri.boolean(t.paddingRight))}}(Hr||(Hr={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Qr||(Qr={})),function(e){e.create=function(e,t,r,i){return{insertText:e,filterText:t,range:r,command:i}}}(Gr||(Gr={})),function(e){e.create=function(e){return{items:e}}}(Jr||(Jr={})),function(e){e.Invoked=0,e.Automatic=1}(Xr||(Xr={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Yr||(Yr={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Zr||(Zr={})),function(e){e.is=function(e){const t=e;
2return ri.objectLiteral(t)&&Dt.is(t.uri)&&ri.string(t.name)}}(ei||(ei={})),function(e){function t(e,r){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);t(n,r),t(s,r);let o=0,a=0,c=0;for(;o<n.length&&a<s.length;){let t=r(n[o],s[a]);e[c++]=t<=0?n[o++]:s[a++]}for(;o<n.length;)e[c++]=n[o++];for(;a<s.length;)e[c++]=s[a++];return e}e.create=function(e,t,r,i){return new oi(e,t,r,i)},e.is=function(e){let t=e;return!!(ri.defined(t)&&ri.string(t.uri)&&(ri.undefined(t.languageId)||ri.string(t.languageId))&&ri.uinteger(t.lineCount)&&ri.func(t.getText)&&ri.func(t.positionAt)&&ri.func(t.offsetAt))},e.applyEdits=function(e,r){let i=e.getText(),n=t(r,(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),s=i.length;for(let t=n.length-1;t>=0;t--){let r=n[t],o=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,o)+r.newText+i.substring(a,i.length),s=o}return i}}(ti||(ti={}));class oi{constructor(e,t,r,i
2){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,r=!0;for(let i=0;i<t.length;i++){r&&(e.push(i),r=!1);let n=t.charAt(i);r="\r"===n||"\n"===n,"\r"===n&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(0===i)return Mt.create(0,e);for(;r<i;){let n=Math.floor((r+i)/2);t[n]>e?i=n:r=n+1}let n=r-1;return Mt.create(n,e-t[n])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,r,i){return"[object Number]"===t.call(e)&&r<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(ri||(ri={}));
2class ai{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(ai.isIncremental(r)){const e=li(r.range),t=this.offsetAt(e.start),i=this.offsetAt(e.end);this._content=this._content.substring(0,t)+r.text+this._content.substring(i,this._content.length);const n=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=hi(r.text,!1,t);if(s-n===a.length)for(let r=0,h=a.length;r<h;r++)o[r+n+1]=a[r];else a.length<1e4?o.splice(n+1,s-n,...a):this._lineOffsets=o=o.slice(0,n+1).concat(a,o.slice(s+1));const c=r.text.length-(i-t);if(0!==c)for(let r=n+1+a.length,h=o.length;r<h;r++)o[r]=o[r]+c}else{if(!ai.isFull(r))throw new Error("Unknown change event received");this._content=r.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=hi(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(0===i)return{line:0,character:e};for(;r<i;){let n=Math.floor((r+i)/2);t[n]>e?i=n:r=n+1}let n=r-1;return{line:n,character:e-t[n]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function ci(e,t){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),n=e.slice(r);ci(i,t),ci(n,t);let s=0,o=0,a=0;for(;s<i.length&&o<n.length;){let r=t(i[s],n[o]);e[a++]=r<=0?i[s++]:n[o++]}for(;s<i.length;)e[a++]=i[s++];for(;o<n.length;)e[a++]=n[o++];return e}function hi(e,t,r=0){const i=t?[r]:[];for(let n=0;n<e.length;n++){let t=e.charCodeAt(n);13!==t&&10!==t||(13===t&&n+1<e.length&&10===e.charCodeAt(n+1)&&n++,i.push(r+n+1))}return i}function li(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function ui(e){const t=li(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,i){return new ai(e,t,r,i)},e.update=function(e,t,r){if(e instanceof ai)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let r=e.getText(),i=ci(t.map(ui),(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),n=0;const s=[];for(const o of i){let t=e.offsetAt(o.range.start);if(t<n)throw new Error("Overlapping edit");t>n&&s.push(r.substring(n,t)),o.newText.length&&s.push(o.newText),n=e.offsetAt(o.range.end)}return s.push(r.substr(n)),s.join("")}}(ii||(ii={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[hr.Markdown,hr.PlainText]}},hover:{contentFormat:[hr.Markdown,hr.PlainText]}}}}(ni||(ni={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(si||(si={}));const pi=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,di=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:Et("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:Et("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:Et("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:Et("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:Et("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:Et("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:Et("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:Et("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:Et("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Et("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:Et("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Et("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:Et("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Et("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:Et("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Et("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:Et("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:Et("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Et("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Et("Mix two colors together in a polar color space.")}],fi=/^(rgb|rgba|hsl|hsla|hwb)$/i,gi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
2almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},mi=new RegExp(`^(${Object.keys(gi).join("|")})$`,"i"),_i={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},yi=new RegExp(`^(${Object.keys(_i).join("|")})$`,"i");function bi(e,t){const r=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(t=100);const e=parseFloat(r[1])/t;if(e>=0&&e<=1)return e}throw new Error}function xi(e){const t=e.getText(),r=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(r)switch(r[2]){case"deg":return parseFloat(t)%360;case"rad":return 180*parseFloat(t)/Math.PI%360;case"grad":return.9*parseFloat(t)%360;case"turn":return 360*parseFloat(t)%360;default:if(void 0===r[2])return parseFloat(t)%360}throw new Error}function Ci(e){return pi.test(e)||mi.test(e)||yi.test(e)}function ki(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function vi(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*ki(e.charCodeAt(1))/255,green:17*ki(e.charCodeAt(2))/255,blue:17*ki(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*ki(e.charCodeAt(1))/255,green:17*ki(e.charCodeAt(2))/255,blue:17*ki(e.charCodeAt(3))/255,alpha:17*ki(e.charCodeAt(4))/255};case 7:return{red:(16*ki(e.charCodeAt(1))+ki(e.charCodeAt(2)))/255,green:(16*ki(e.charCodeAt(3))+ki(e.charCodeAt(4)))/255,blue:(16*ki(e.charCodeAt(5))+ki(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*ki(e.charCodeAt(1))+ki(e.charCodeAt(2)))/255,green:(16*ki(e.charCodeAt(3))+ki(e.charCodeAt(4)))/255,blue:(16*ki(e.charCodeAt(5))+ki(e.charCodeAt(6)))/255,alpha:(16*ki(e.charCodeAt(7))+ki(e.charCodeAt(8)))/255}}return null}function wi(e,t,r,i=1){if(0===t)return{red:r,green:r,blue:r,alpha:i};{const n=(e,t,r)=>{for(;r<0;)r+=6;for(;r>=6;)r-=6;return r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e},s=r<=.5?r*(t+1):r+t-r*t,o=2*r-s;return{red:n(o,s,(e/=60)+2),green:n(o,s,e),blue:n(o,s,e-2),alpha:i}}}function Si(e){const t=e.red,r=e.green,i=e.blue,n=e.alpha,s=Math.max(t,r,i),o=Math.min(t,r,i);let a=0,c=0;const h=(o+s)/2,l=s-o;if(l>0){switch(c=Math.min(h<=.5?l/(2*h):l/(2-2*h),1),s){case t:a=(r-i)/l+(r<i?6:0);break;case r:a=(i-t)/l+2;break;case i:a=(t-r)/l+4}a*=60,a=Math.round(a)}return{h:a,s:c,l:h,a:n}}function Pi(e){if(e.type===re.HexColorValue){return vi(e.getText())}if(e.type===re.Function){const r=e,i=r.getName();let n=r.getArguments().getChildren();if(1===n.length){const e=n[0].getChildren();if(1===e.length&&e[0].type===re.Expression&&(n=e[0].getChildren(),3===n.length)){const e=n[2];if(e instanceof rt){const t=e.getLeft(),r=e.getRight(),i=e.getOperator();t&&r&&i&&i.matches("/")&&(n=[n[0],n[1],t,r])}}}if(!i||n.length<3||n.length>4)return null;try{const e=4===n.length?bi(n[3],1):1;if("rgb"===i||"rgba"===i)return{red:bi(n[0],255),green:bi(n[1],255),blue:bi(n[2],255),alpha:e};if("hsl"===i||"hsla"===i){const t=xi(n[0]),r=bi(n[1],100);return wi(t,r,bi(n[2],100),e)}if("hwb"===i){const t=xi(n[0]),r=bi(n[1],100);return function(e,t,r,i=1){if(t+r>=1){const e=t/(t+r);return{red:e,green:e,blue:e,alpha:i}}const n=wi(e,1,.5,i);let s=n.red;s*=1-t-r,s+=t;let o=n.green;o*=1-t-r,o+=t;let a=n.blue;return a*=1-t-r,a+=t,{red:s,green:o,blue:a,alpha:i}}(t,r,bi(n[2],100),e)}}catch(t){return null}}else if(e.type===re.Identifier){if(e.parent&&e.parent.type!==re.Term)return null;const t=e.parent;if(t&&t.parent&&t.parent.type===re.BinaryExpression){const e=t.parent;if(e.parent&&e.parent.type===re.ListEntry&&e.parent.key===e)return null}const r=e.getText().toLowerCase();if("none"===r)return null;const i=gi[r];if(i)return vi(i)}return null}const Ei={bottom:"Computes to ‘100%’ for the vertical position if one or tw
2o values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},Ii={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Ri={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Ai=["medium","thick","thin"],Ti={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Di={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},$i={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Li={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Mi={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward 
2in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Fi={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2  of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Ni={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Oi={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Vi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Bi=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Ui=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Wi(e){return Object.keys(e).map(t=>e[t])}function Ki(e){return void 0!==e}class ji{constructor(e=new X){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:i.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return i.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return i.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return i.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return-1!==e.indexOf(this.token.type)}peekRegExp(e,t){return e===this.token.type&&t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return!!e&&(this.prevToken=e,this.token=this.scanner.scan(),!0)}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const t=this.mark(),r=e();return r||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(i.AtKeyword===this.token.type)for(const t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0;return!1}accept(e){return e===this.token.type&&(this.consumeToken(),!0)}acceptIdent(e){return!!this.peekIdent(e)&&(this.consumeToken(),!0)}acceptKeyword(e){return!!this.peekKeyword(e)&&(this.consumeToken(),!0)}acceptDelim(e){return!!this.peekDelim(e)&&(this.consumeToken(),!0)}acceptRegexp(e){return!!e.test(this.token.text)&&(this.consumeToken(),!0)}_parseRegexp(e){let t=this.createNode(re.Identifier);do{}while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;){if(e&&-1!==e.indexOf(this.token.type))return this.consumeToken(),!0;if(t&&-1!==t.indexOf(this.token.type))return!0;
2if(this.token.type===i.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new oe(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,r,i){if(!(e instanceof ae)&&(t&&this.markError(e,t,r,i),this.prevToken)){const t=this.prevToken.offset+this.prevToken.len;e.length=t>e.offset?t-e.offset:0}return e}markError(e,t,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new St(e,t,wt.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){const t=e.version,r=e.getText();return this.internalParse(r,this._parseStylesheet,(i,n)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(i,n)})}internalParse(e,t,r){this.scanner.setSource(e),this.token=this.scanner.scan();const i=t.bind(this)();return i&&(i.textProvider=r||((t,r)=>e.substr(t,r))),i}_parseStylesheet(){const e=this.create(le);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let r=!1;do{r=!1;const n=this._parseStylesheetStatement();for(n&&(e.addChild(n),r=!0,t=!1,this.peek(i.EOF)||!this._needsSemicolonAfter(n)||this.accept(i.SemiColon)||this.markError(e,At.SemiColonExpected));this.accept(i.SemiColon)||this.accept(i.CDO)||this.accept(i.CDC);)r=!0,t=!1}while(r);if(this.peek(i.EOF))break;t||(this.peek(i.AtKeyword)?this.markError(e,At.UnknownAtRule):this.markError(e,At.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(i.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(i.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const t=this.mark();if(this._parseSelector(e)){for(;this.accept(i.Comma)&&this._parseSelector(e););if(this.accept(i.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){const t=this.create(de),r=t.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(i.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(t,At.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(i.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(i.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case re.Keyframe:case re.ViewPort:case re.Media:case re.Ruleset:case re.Namespace:case re.If:case re.For:case re.Each:case re.While:case re.MixinDeclaration:case re.FunctionDeclaration:case re.MixinContentDeclaration:return!1;case re.ExtendsReference:case re.MixinContentReference:case re.ReturnStatement:case re.MediaQuery:case re.Debug:case re.Import:case re.AtApplyRule:case re.CustomPropertyDeclaration:return!0;case re.VariableDeclaration:return e.needsSemicolon;case re.MixinReference:return!e.getContent();case re.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const t=this.create(ue);if(!this.accept(i.CurlyL))return null;let r=e();for(;t.addChild(r)&&!this.peek(i.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(i.SemiColon))return this.finish(t,At.SemiColonExpected,[i.SemiColon,i.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===i.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(i.SemiColon););r=e()}return this.accept(i.CurlyR)?this.finish(t):this.finish(t,At.RightCurlyExpected,[i.CurlyR,i.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,At.LeftCurlyExpected,[i.CurlyR,i.SemiColon])}_parseSelector(e){const t=this.create(fe);let r=!1;for(e&&(r=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)r=!0,t.addChild(this._parseCombinator());return r?this.finish(t):null}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const r=this.create(ye);return r.setProperty(this._parseProperty())?this.accept(i.Colon)?(this.prevToken&&
2(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(i.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,At.PropertyValueExpected)):this.finish(r,At.ColonExpected,[i.Colon],e||[i.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(i.Ident,/^--/))return null;const t=this.create(be);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(i.Colon))return this.finish(t,At.ColonExpected,[i.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const r=this.mark();if(this.peek(i.CurlyL)){const e=this.create(_e),n=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(n)&&!n.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(i.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(r)}const n=this._parseExpr();return n&&!n.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],i.SemiColon,i.EOF))?(t.setValue(n),this.peek(i.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(r),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),Ki(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,At.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[i.CurlyR]){const t=this.create(oe),r=()=>0===s&&0===o&&0===a,n=()=>-1!==e.indexOf(this.token.type);let s=0,o=0,a=0;e:for(;;){switch(this.token.type){case i.SemiColon:case i.Exclamation:if(r())break e;break;case i.CurlyL:s++;break;case i.CurlyR:if(s--,s<0){if(n()&&0===o&&0===a)break e;return this.finish(t,At.LeftCurlyExpected)}break;case i.ParenthesisL:o++;break;case i.ParenthesisR:if(o--,o<0){if(n()&&0===a&&0===s)break e;return this.finish(t,At.LeftParenthesisExpected)}break;case i.BracketL:a++;break;case i.BracketR:if(a--,a<0)return this.finish(t,At.LeftSquareBracketExpected);break;case i.BadString:break e;case i.EOF:let e=At.RightCurlyExpected;return a>0?e=At.RightSquareBracketExpected:o>0&&(e=At.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){const t=this.mark();return this._parseProperty()&&this.accept(i.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){const e=this.create(xe),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(i.Charset))return null;const e=this.create(oe);return this.consumeToken(),this.accept(i.String)?this.accept(i.SemiColon)?this.finish(e):this.finish(e,At.SemiColonExpected):this.finish(e,At.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Fe);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?this._completeParseImport(e):this.finish(e,At.URIOrStringExpected)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(i.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,At.IdentifierExpected,[i.SemiColon]);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[i.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(i.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(i.ParenthesisR))?this.finish(e,At.RightParenthesisExpected,[i.ParenthesisR],[]):(this.peek(i.SemiColon)||this.peek(i.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Ue);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(i.SemiColon)?this.finish(e):this.finish(e,At.SemiColonExpected):this.finish(e,At.URIExpected,[i.SemiColon])}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(De);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}
2_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(Te);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(i.AtKeyword,this.keyframeRegex))return null;const e=this.create(Le),t=this.create(oe);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,At.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,At.IdentifierExpected,[i.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([ie.Keyframe])}_parseKeyframeSelector(){const e=this.create(Me);let t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(i.Percentage)&&(t=!0),!t)return null;for(;this.accept(i.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(i.Percentage)&&(t=!0),!t)return this.finish(e,At.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Me),t=this.mark();let r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(i.Percentage)&&(r=!0),!r)return null;for(;this.accept(i.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(i.Percentage)&&(r=!0),!r)return this.restoreAtMark(t),null;return this.peek(i.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(ze);return this.consumeToken(),this.peekRegExp(i.Ident,/^--/)&&e.setName(this._parseIdent([ie.Property]))?this._parseBody(e,this._parseDeclaration.bind(this)):this.finish(e,At.IdentifierExpected)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(je);this.consumeToken();const r=this._parseLayerNameList();return r&&t.setNames(r),r&&1!==r.getChildren().length||!this.peek(i.CurlyL)?this.accept(i.SemiColon)?this.finish(t):this.finish(t,At.SemiColonExpected):this._parseBody(t,this._parseLayerDeclaration.bind(this,e))}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(re.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(i.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,At.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(re.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,At.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(Ke);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(Ye);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(i.Ident,/^(and|or)$/i)){const t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(Ye);
2if(this.accept(i.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([i.ParenthesisR]))||this._parseSupportsCondition()?this.accept(i.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,At.RightParenthesisExpected,[i.ParenthesisR],[]):this.finish(e,At.ConditionExpected);if(this.peek(i.Ident)){const t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(i.ParenthesisL)){let t=1;for(;this.token.type!==i.EOF&&0!==t;)this.token.type===i.ParenthesisL?t++:this.token.type===i.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,At.LeftParenthesisExpected,[],[i.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const t=this.create(We);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,At.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(Qe);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,At.MediaQueryExpected);for(;this.accept(i.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,At.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(Ge),t=this.mark();if(this.acceptIdent("not"),this.peek(i.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),t=this.create(ot);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,At.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(Je);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[],[i.CurlyL]);if(this.peek(i.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[],[i.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[i.ParenthesisR],t=this.create(Xe);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(i.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,At.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,At.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,At.TermExpected,[],e)}}else{if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,At.IdentifierExpected,[],e);if(!this._parseMediaFeatureRangeOperator())return this.finish(t,At.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,At.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,At.TermExpected,[],e)}return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(oe);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(Ze);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(i.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,At.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(i.AtKeyword))return null;const e=this.create(et);return this.acceptOneKeyword(Ui)||this.markError(e,At.UnknownAtRule,[],[i.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(i.Ident)&&!this.peek(i.Colon))return null;const e=this.create(oe);return e.addChild(this._parseIdent()),this.accept(i.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,At.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(qe);return this.consumeToken(),this.resync([],[i.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement
2(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const t=this.create(He);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(oe);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(oe);if(this.accept(i.ParenthesisL)){if(this.peekIdent("not")||this.peek(i.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[],[i.CurlyL])}else{if(!this.acceptIdent("style"))return this.finish(e,At.LeftParenthesisExpected,[],[i.CurlyL]);if(this.hasWhitespace()||!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[],[i.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[],[i.CurlyL])}return this.finish(e)}_parseStyleQuery(){const e=this.create(oe);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(i.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([i.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(oe);return this.accept(i.ParenthesisL)?(e.addChild(this._parseStyleQuery()),this.accept(i.ParenthesisR)?this.finish(e):this.finish(e,At.RightParenthesisExpected,[],[i.CurlyL])):this.finish(e,At.LeftParenthesisExpected,[],[i.CurlyL])}_parseUnknownAtRule(){if(!this.peek(i.AtKeyword))return null;const e=this.create(bt);e.addChild(this._parseUnknownAtRuleName());const t=()=>0===n&&0===s&&0===o;let r=0,n=0,s=0,o=0;e:for(;;){switch(this.token.type){case i.SemiColon:if(t())break e;break;case i.EOF:return n>0?this.finish(e,At.RightCurlyExpected):o>0?this.finish(e,At.RightSquareBracketExpected):s>0?this.finish(e,At.RightParenthesisExpected):this.finish(e);case i.CurlyL:r++,n++;break;case i.CurlyR:if(n--,r>0&&0===n){if(this.consumeToken(),o>0)return this.finish(e,At.RightSquareBracketExpected);if(s>0)return this.finish(e,At.RightParenthesisExpected);break e}if(n<0){if(0===s&&0===o)break e;return this.finish(e,At.LeftCurlyExpected)}break;case i.ParenthesisL:s++;break;case i.ParenthesisR:if(s--,s<0)return this.finish(e,At.LeftParenthesisExpected);break;case i.BracketL:o++;break;case i.BracketR:if(o--,o<0)return this.finish(e,At.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(oe);return this.accept(i.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(i.Dashmatch)||this.peek(i.Includes)||this.peek(i.SubstringOperator)||this.peek(i.PrefixOperator)||this.peek(i.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(re.Operator);return this.consumeToken(),this.finish(e)}return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(oe);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(oe);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=re.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=re.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){const e=this.create(oe);return this.consumeToken(),e.type=re.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){const e=this.create(oe);return this.consumeToken(),e.type=re.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){const e=this.create(oe);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=re.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){const e=this.create(ge);let t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(re.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(i.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(re.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,At.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(re.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,At.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),t=this.createNode(re.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)}_parseNamespacePrefix(){const e=this.mark(),t=this.createNode(re.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(i.BracketL))return null;const e=this.create(nt);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(i.BracketR)?this.finish(e):this.finish(e,At.RightSquareBracketExpected)):this.finish(e,At.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(i.ParenthesisL)){const t=()=>{const e=this.create(oe);
2if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(i.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(i.ParenthesisR)?this.finish(e):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,At.SelectorExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(i.Colon))return null;const e=this.mark(),t=this.createNode(re.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(i.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,At.IdentifierExpected):this.finish(t))}_tryParsePrio(){const e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(i.Exclamation))return null;const e=this.createNode(re.Prio);return this.accept(i.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const t=this.create(tt);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(i.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(ce);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(i.BracketL))return null;const e=this.createNode(re.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(i.BracketR)?this.finish(e):this.finish(e,At.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let r=this.create(rt);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(t||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,At.TermExpected);r=this.finish(r);const i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(it);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(i.ParenthesisL))return null;const e=this.create(oe);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(i.ParenthesisR)?this.finish(e):this.finish(e,At.RightParenthesisExpected)}_parseNumeric(){if(this.peek(i.Num)||this.peek(i.Percentage)||this.peek(i.Resolution)||this.peek(i.Length)||this.peek(i.EMS)||this.peek(i.EXS)||this.peek(i.Angle)||this.peek(i.Time)||this.peek(i.Dimension)||this.peek(i.ContainerQueryLength)||this.peek(i.Freq)){const e=this.create(lt);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(i.String)&&!this.peek(i.BadString))return null;const e=this.createNode(re.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(i.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),t=this.createNode(re.URILiteral);return this.accept(i.Ident),this.hasWhitespace()||!this.peek(i.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(i.ParenthesisR)?this.finish(t):this.finish(t,At.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(oe);return this.accept(i.String)||this.accept(i.BadString)||this.acceptUnquotedString()?this.finish(e):null}_parseIdent(e){if(!this.peek(i.Ident))return null;const t=this.create(he);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(i.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(ke);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(i.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,At.ExpressionExpected);return this.accept(i.ParenthesisR)?this.finish(t):this.finish(t,At.RightParenthesisExpected)}
2_parseFunctionIdentifier(){if(!this.peek(i.Ident))return null;const e=this.create(he);if(e.referenceTypes=[ie.Function],this.acceptIdent("progid")){if(this.accept(i.Colon))for(;this.accept(i.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(we);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(i.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(st);return this.consumeToken(),this.finish(e)}return null}}function zi(e,t){return-1!==e.indexOf(t)}function qi(...e){const t=[];for(const r of e)for(const e of r)zi(t,e)||t.push(e);return t}class Hi{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const r=e+t,i=function(e,t){let r=0,i=e.length;if(0===i)return 0;for(;r<i;){let n=Math.floor((r+i)/2);t(e[n])?i=n:r=n+1}return r}(this.children,e=>e.offset>r);if(0===i)return this;const n=this.children[i-1];return n.offset<=e&&n.offset+n.length>=e+t?n.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let r=0;r<this.symbols.length;r++){const i=this.symbols[r];if(i.name===e&&i.type===t)return i}return null}getSymbols(){return this.symbols}}class Qi extends Hi{constructor(){super(0,Number.MAX_VALUE)}}
2class Gi{constructor(e,t,r,i){this.name=e,this.value=t,this.node=r,this.type=i}}class Ji{constructor(e){this.scope=e}addSymbol(e,t,r,i){if(-1!==e.offset){const n=this.scope.findScope(e.offset,e.length);n&&n.addSymbol(new Gi(t,r,e,i))}}addScope(e){if(-1!==e.offset){const t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){const r=new Hi(e.offset,e.length);return t.addChild(r),r}return t}return null}addSymbolToChildScope(e,t,r,i,n){if(e&&-1!==e.offset){const s=this.addScope(e);s&&s.addSymbol(new Gi(r,i,t,n))}}visitNode(e){switch(e.type){case re.Keyframe:return this.addSymbol(e,e.getName(),void 0,ie.Keyframe),!0;case re.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case re.VariableDeclaration:return this.visitVariableDeclarationNode(e);case re.Ruleset:return this.visitRuleSet(e);case re.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,ie.Mixin),!0;case re.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,ie.Function),!0;case re.FunctionParameter:return this.visitFunctionParameterNode(e);case re.Declarations:return this.addScope(e),!0;case re.For:const t=e,r=t.getDeclarations();return r&&t.variable&&this.addSymbolToChildScope(r,t.variable,t.variable.getName(),void 0,ie.Variable),!0;case re.Each:{const t=e,r=t.getDeclarations();if(r){const e=t.getVariables().getChildren();for(const t of e)this.addSymbolToChildScope(r,t,t.getName(),void 0,ie.Variable)}return!0}}return!0}visitRuleSet(e){const t=this.scope.findScope(e.offset,e.length);if(t)for(const r of e.getSelectors().getChildren())r instanceof fe&&1===r.getChildren().length&&t.addSymbol(new Gi(r.getChild(0).getText(),void 0,r,ie.Rule));return!0}visitVariableDeclarationNode(e){const t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,ie.Variable),!0}visitFunctionParameterNode(e){const t=e.getParent().getDeclarations();if(t){const r=e.getDefaultValue(),i=r?r.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),i,ie.Variable)}return!0}visitCustomPropertyDeclarationNode(e){const t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,ie.Variable),!0}addCSSVariable(e,t,r,i){-1!==e.offset&&this.scope.addSymbol(new Gi(t,r,e,i))}}class Xi{constructor(e){this.global=new Qi,e.acceptVisitor(new Ji(this.global))}findSymbolsAtOffset(e,t){let r=this.global.findScope(e,0);const i=[],n={};for(;r;){const e=r.getSymbols();for(let r=0;r<e.length;r++){const s=e[r];s.type!==t||n[s.name]||(i.push(s),n[s.name]=!0)}r=r.parent}return i}internalFindSymbol(e,t){let r=e;if(e.parent instanceof ve&&e.parent.getParent()instanceof pe&&(r=e.parent.getParent().getDeclarations()),e.parent instanceof we&&e.parent.getParent()instanceof ke){const t=e.parent.getParent().getIdentifier();if(t){const e=this.internalFindSymbol(t,[ie.Function]);e&&(r=e.node.getDeclarations())}}if(!r)return null;const i=e.getText();let n=this.global.findScope(r.offset,r.length);for(;n;){for(let e=0;e<t.length;e++){const r=t[e],s=n.getSymbol(i,r);if(s)return s}n=n.parent}return null}evaluateReferenceTypes(e){if(e instanceof he){const t=e.referenceTypes;if(t)return t;{if(e.isCustomProperty)return[ie.Variable];const t=function(e){const t=e.findParent(re.Declaration),r=t&&t.getValue();return r&&r.encloses(e)?t:null}(e);if(t){const r=t.getNonPrefixedPropertyName();if(("animation"===r||"animation-name"===r)&&t.getValue()&&t.getValue().offset===e.offset)return[ie.Keyframe]}}}else if(e instanceof dt)return[ie.Variable];return e.findAParent(re.Selector,re.ExtendsReference)?[ie.Rule]:null}findSymbolFromNode(e){if(!e)return null;for(;e.type===re.Interpolation;)e=e.getParent();const t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null}matchesSymbol(e,t){if(!e)return!1;for(;e.type===re.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;const r=this.evaluateReferenceTypes(e);if(!r||-1===r.indexOf(t.type))return!1;return this.internalFindSymbol(e,r)===t}findSymbol(e,t,r){let i=this.global.findScope(r);for(;i;){const r=i.getSymbol(e,t);if(r)return r;i=i.parent}return null}}const Yi={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Zi(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"🚨️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"🚨️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function en(e,t,r){let i;if(i=t?{kind:"markdown",value:nn(e,r)}:{kind:"plaintext",value:rn(e,r)},""!==i.value)return i}function tn(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rn(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let r="";if(!1!==t?.documentation){e.status&&(r+=Zi(e.status)),r+=e.description;const t=sn(e.browsers);t&&(r+="\n("+t+")"),"syntax"in e&&(r+=`\n\nSyntax: ${e.syntax}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(r.length>0&&(r+="\n\n"),r+=e.references.map(e=>`${e.name}: ${e.url}`).join(" | ")),r}function nn(e,t){if(!e.description||""===e.description)return"";let r="";if(!1!==t?.documentation){e.status&&(r+=Zi(e.status)),"string"==typeof e.description?r+=tn(e.description):r+=e.description.kind===hr.Markdown?e.description.value:tn(e.description.value);const t=sn(e.browsers);t&&(r+="\n\n("+tn(t)+")"),"syntax"in e&&e.syntax&&(r+=`\n\nSyntax: ${tn(e.syntax)}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(r.length>0&&(r+="\n\n"),r+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | ")),r}function sn(e=[]){return 0===e.length?null:e.map(e=>{let t="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],n=r[2];return i in Yi&&(t+=Yi[i]),n&&(t+=" "+n),t}).join(", ")}var on,an=r(72290);(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,i="",n=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(i.length<2||2!==n||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",n=0):n=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),s=a,o=0;continue}}else if(2===i.length||1===i.length){i="",n=0,s=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",n=2)}else i.length>0?i+="/"+e.slice(s+1,a):i=e.slice(s+1,a),n=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=an.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,n=47===o.charCo
2deAt(0))}return i=r(i,!n),n?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!i)).length||i||(e="."),e.length>0&&n&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=i.resolve(e))===(r=i.resolve(r)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var s=e.length,o=s-n,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var c=r.length-a,h=o<c?o:c,l=-1,u=0;u<=h;++u){if(u===h){if(c>h){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else o>h&&(47===e.charCodeAt(n+u)?l=u:0===u&&(l=0));break}var p=e.charCodeAt(n+u);if(p!==r.charCodeAt(a+u))break;47===p&&(l=u)}var d="";for(u=n+l+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+l):(a+=l,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),i=47===r,n=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!s){n=o;break}}else s=!1;return-1===n?i?"/":".":i&&1===n?"//":e.slice(0,n)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var i,n=0,s=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,c=-1;for(i=e.length-1;i>=0;--i){var h=e.charCodeAt(i);if(47===h){if(!o){n=i+1;break}}else-1===c&&(o=!1,c=i+1),a>=0&&(h===r.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=c))}return n===s?s=c:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname:function(e){t(e);for(var r=-1,i=0,n=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===n&&(s=!1,n=a+1),46===c?-1===r?r=a:1!==o&&(o=1):-1!==r&&(o=-1);else if(!s){i=a+1;break}}return-1===r||-1===n||0===o||1===o&&r===n-1&&r===i+1?"":e.slice(r,n)},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 r=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+i:r+"/"+i:i}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var i,n=e.charCodeAt(0),s=47===n;s?(r.root="/",i=1):i=0;for(var o=-1,a=0,c=-1,h=!0,l=e.length-1,u=0;l>=i;--l)if(47!==(n=e.charCodeAt(l)))-1===c&&(h=!1,c=l+1),46===n?-1===o?o=l:1!==u&&(u=1):-1!==o&&(u=-1);else if(!h){a=l+1;break}return-1===o||-1===c||0===u||1===u&&o===c-1&&o===a+1?-1!==c&&(r.base=r.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(r.name=e.slice(1,o),r.base=e.slice(1,c)):(r.name=e.slice(a,o),r.base=e.slice(a,c)),r.ext=e.slice(o,c)),a>0?r.dir=e.slice(0,a-1):s&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{let e;if(r.r(i),r.d(i,{URI:()=>l,Utils:()=>w}),"object"==typeof an)e="win32"===an.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,n=/^\//,s=/^\/\//;function o(e,r){if(!e.scheme&&r)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!n.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(s.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 ("//")')}const a="",c="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,i,n,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,r||a),this.query=i||a,this.fragment=n||a,o(this,s))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:r,path:i,query:n,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===r?r=this.authority:null===r&&(r=a),void 0===i?i=this.path:null===i&&(i=a),void 0===n?n=this.query:null===n&&(n=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&s===this.fragment?this:new p(t,r,i,n,s)}static parse(e,t=!1){const r=h.exec(e);return r?new p(r[2]||a,x(r[4]||a),x(r[5]||a),x(r[7]||a),x(r[9]||a),t):new p(a,a,a,a,a)}static file(t){let r=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(r=t.substring(2),t=c):(r=t.substring(2,e),t=t.substring(e)||c)}return new p("file",r,t,a,a)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===u?e.fsPath:null,t}}return e}}const u=e?1:void 0;class p extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=m(this)),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),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}}
2const d={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,r){let i,n=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||r&&91===o||r&&93===o||r&&58===o)-1!==n&&(i+=encodeURIComponent(e.substring(n,s)),n=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=d[o];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,s)),n=-1),i+=t):-1===n&&(n=s)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function g(e){let t;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);35===i||63===i?(void 0===t&&(t=e.substr(0,r)),t+=d[i]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}function m(t,r){let i;return i=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function _(e,t){const r=t?g:f;let i="",{scheme:n,authority:s,path:o,query:a,fragment:h}=e;if(n&&(i+=n,i+=":"),(s||"file"===n)&&(i+=c,i+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=r(t,!1,!1):(i+=r(t.substr(0,e),!1,!1),i+=":",i+=r(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=r(s,!1,!0):(i+=r(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=r(o,!0,!1)}return a&&(i+="?",i+=r(a,!1,!1)),h&&(i+="#",i+=t?h:f(h,!1,!1)),i}function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(b)?e.replace(b,e=>y(e)):e}var C=r(470);const k=C.posix||C,v="/";var w;!function(e){e.joinPath=function(e,...t){return e.with({path:k.join(e.path,...t)})},e.resolvePath=function(e,...t){let r=e.path,i=!1;r[0]!==v&&(r=v+r,i=!0);let n=k.resolve(r,...t);return i&&n[0]===v&&!e.authority&&(n=n.substring(1)),e.with({path:n})},e.dirname=function(e){if(0===e.path.length||e.path===v)return e;let t=k.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return k.basename(e.path)},e.extname=function(e){return k.extname(e.path)}}(w||(w={}))})(),on=i})();const{URI:cn,Utils:hn}=on;function ln(e){return hn.dirname(cn.parse(e)).toString(!0)}function un(e,...t){return hn.joinPath(cn.parse(e),...t).toString(!0)}class pn{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const r={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const n=i.uriValue,s=fn(n);if("."===s||".."===s)r.isIncomplete=!0;else{const s=await this.providePathSuggestions(n,i.position,i.range,e,t);for(let e of s)r.items.push(e)}}for(const i of this.importCompletions){const n=i.pathValue,s=fn(n);if("."===s||".."===s)r.isIncomplete=!0;else{let s=await this.providePathSuggestions(n,i.position,i.range,e,t);"scss"===e.languageId&&s.forEach(e=>{Y(e.label,"_")&&Z(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of s)r.items.push(e)}}return r}async providePathSuggestions(e,t,r,i,n){const s=fn(e),o=Y(e,"'")||Y(e,'"'),a=o?s.slice(0,t.character-(r.start.character+1)):s.slice(0,t.character-r.start.character),c=i.uri,h=function(e,t,r){let i;const n=e.lastIndexOf("/");if(-1===n)i=r;else{const e=t.slice(n+1),s=_n(r.end,-e.length),o=e.indexOf(" ");let a;a=-1!==o?_n(s,o):r.end,i=Ft.create(s,a)}return i}(a,s,o?function(e,t,r){const i=_n(e.start,t),n=_n(e.end,r);return Ft.create(i,n)}(r,1,-1):r),l=a.substring(0,a.lastIndexOf("/")+1);let u=n.resolveReference(l||".",c);if(u)try{const e=[],t=await this.readDirectory(u);for(const[r,i]of t)r.charCodeAt(0)===dn||i!==si.Directory&&un(u,r)===c||e.push(gn(r,
2i===si.Directory,h));return e}catch(p){}return[]}}const dn=".".charCodeAt(0);function fn(e){return Y(e,"'")||Y(e,'"')?e.slice(1,-1):e}function gn(e,t,r){return t?{label:mn(e+="/"),kind:ur.Folder,textEdit:Jt.replace(r,mn(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:mn(e),kind:ur.File,textEdit:Jt.replace(r,mn(e))}}function mn(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function _n(e,t){return Mt.create(e.line,e.character+t)}const yn=pr.Snippet,bn={title:"Suggest",command:"editor.action.triggerSuggest"};var xn,Cn;!function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"}(xn||(xn={}));class kn{constructor(e=null,t,r){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Xi(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,r,i,n=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,r,n);const s=new pn(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[s].concat(o);const a=this.doComplete(e,t,r,n);try{const t=await s.computeCompletions(e,i);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=o}}
2doComplete(e,t,r,i){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let r=t-1;const i=e.getText();for(;r>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(i.charAt(r));)r--;return i.substring(r+1,t)}(e,this.offset),this.defaultReplaceRange=Ft.create(Mt.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=se(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const r=this.nodePath[t];if(r instanceof xe)this.getCompletionsForDeclarationProperty(r.getParent(),e);else if(r instanceof tt)r.parent instanceof pt?this.getVariableProposals(null,e):this.getCompletionsForExpression(r,e);else if(r instanceof ge){const t=r.findAParent(re.ExtendsReference,re.Ruleset);if(t)if(t.type===re.ExtendsReference)this.getCompletionsForExtendsReference(t,r,e);else{const r=t;this.getCompletionsForSelector(r,r&&r.isNested(),e)}}else if(r instanceof we)this.getCompletionsForFunctionArgument(r,r.getParent(),e);else if(r instanceof ue)this.getCompletionsForDeclarations(r,e);else if(r instanceof ut)this.getCompletionsForVariableDeclaration(r,e);else if(r instanceof de)this.getCompletionsForRuleSet(r,e);else if(r instanceof pt)this.getCompletionsForInterpolation(r,e);else if(r instanceof Ae)this.getCompletionsForFunctionDeclaration(r,e);else if(r instanceof _t)this.getCompletionsForMixinReference(r,e);else if(r instanceof ke)this.getCompletionsForFunctionArgument(null,r,e);else if(r instanceof Ke)this.getCompletionsForSupports(r,e);else if(r instanceof Ye)this.getCompletionsForSupportsCondition(r,e);else if(r instanceof ft)this.getCompletionsForExtendsReference(r,null,e);else if(r.type===re.URILiteral)this.getCompletionForUriLiteralValue(r,e);else if(null===r.parent)this.getCompletionForTopLevel(e);else{if(r.type!==re.StringLiteral||!this.isImportPathParent(r.parent.type))continue;this.getCompletionForImportPath(r,e)}if(e.items.length>0||this.offset>r.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===re.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const r=this.nodePath[t];if(-1!==e.indexOf(r.type))return r}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(n=>{let s,o,a=!1;e?(s=this.getCompletionRange(e.getProperty()),o=n.name,Ki(e.colonPosition)||(o+=": ",a=!0)):(s=this.getCompletionRange(null),o=n.name+": ",a=!0),!e&&i&&(o+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(s.end)&&(o+="$0;");const c={label:n.name,documentation:en(n,this.doesSupportMarkdown()),tags:vn(n)?[dr.Deprecated]:[],textEdit:Jt.replace(s,o),insertTextFormat:pr.Snippet,kind:ur.Property};n.restrictions||(a=!1),r&&a&&(c.command=bn);const h=(255-("number"==typeof n.relevance?Math.min(Math.max(n.relevance,0),99):50)).toString(16),l=Y(n.name,"-")?xn.VendorPrefixed:xn.Normal;c.sortText=l+"_"+h,t.items.push(c)}
2),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){const r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r);let n=e.getValue()||null;for(;n&&n.hasChildren();)n=n.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(n)})}),i){if(i.restrictions)for(const e of i.restrictions)switch(e){case"color":this.getColorProposals(i,n,t);break;case"position":this.getPositionProposals(i,n,t);break;case"repeat":this.getRepeatStyleProposals(i,n,t);break;case"line-style":this.getLineStyleProposals(i,n,t);break;case"line-width":this.getLineWidthProposals(i,n,t);break;case"geometry-box":this.getGeometryBoxProposals(i,n,t);break;case"box":this.getBoxProposals(i,n,t);break;case"image":this.getImageProposals(i,n,t);break;case"timing-function":this.getTimingFunctionProposals(i,n,t);break;case"shape":this.getBasicShapeProposals(i,n,t)}this.getValueEnumProposals(i,n,t),this.getCSSWideKeywordProposals(i,n,t),this.getUnitProposals(i,n,t)}else{const r=function(e,t){const r=t.getFullPropertyName(),i=new wn;function n(e){return(e instanceof he||e instanceof lt||e instanceof st)&&i.add(e.getText()),!0}function s(e){const t=e.getFullPropertyName();return r===t}function o(e){if(e instanceof ye&&e!==t&&s(e)){const t=e.getValue();t&&t.accept(n)}return!0}return e.accept(o),i}(this.styleSheet,e);for(const e of r.getEntries())t.items.push({label:e,textEdit:Jt.replace(this.getCompletionRange(n),e),kind:ur.Value})}return this.getVariableProposals(n,t),this.getTermProposals(i,n,t),t}getValueEnumProposals(e,t,r){if(e.values)for(const i of e.values){let n,s=i.name;if(Z(s,")")){const e=s.lastIndexOf("(");-1!==e&&(s=s.substring(0,e+1)+"$1"+s.substring(e+1),n=yn)}let o=xn.Enums;Y(i.name,"-")&&(o+=xn.VendorPrefixed);const a={label:i.name,documentation:en(i,this.doesSupportMarkdown()),tags:vn(e)?[dr.Deprecated]:[],textEdit:Jt.replace(this.getCompletionRange(t),s),sortText:o,kind:ur.Value,insertTextFormat:n};r.items.push(a)}return r}getCSSWideKeywordProposals(e,t,r){for(const i in $i)r.items.push({label:i,documentation:$i[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});for(const i in Li){const e=Sn(i);r.items.push({label:i,documentation:Li[i],textEdit:Jt.replace(this.getCompletionRange(t),e),kind:ur.Function,insertTextFormat:yn,command:Y(i,"var")?bn:void 0})}return r}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ie.Variable);for(const i of r){const r=Y(i.name,"--")?`var(${i.name})`:i.name,n={label:i.name,documentation:i.value?ee(i.value):i.value,textEdit:Jt.replace(this.getCompletionRange(e),r),kind:ur.Variable,sortText:xn.Variable};if("string"==typeof n.documentation&&Ci(n.documentation)&&(n.kind=ur.Color),i.node.type===re.FunctionParameter){const e=i.node.getParent();e.type===re.MixinDeclaration&&(n.detail=Et("argument from '{0}'",e.getName()))}t.items.push(n)}return t}getVariableProposalsForCSSVarFunction(e){const t=new wn;this.styleSheet.acceptVisitor(new En(t,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ie.Variable);for(const i of r){if(Y(i.name,"--")){const t={label:i.name,documentation:i.value?ee(i.value):i.value,textEdit:Jt.replace(this.getCompletionRange(null),i.name),kind:ur.Variable};"string"==typeof t.documentation&&Ci(t.documentation)&&(t.kind=ur.Color),e.items.push(t)}t.remove(i.name)}for(const i of t.getEntries())if(Y(i,"--")){const t={label:i,textEdit:Jt.replace(this.getCompletionRange(null),i),kind:ur.Variable};e.items.push(t)}return e}getUnitProposals(e,t,r){let i="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(i=e[0],r.isIncomplete=i.length===this.currentWord.length)}else 0===this.currentWord.length&&(r.isIncomplete=!0);if(t&&t.parent&&t.parent.type===re.Term&&(t=t.getParent()),e.restrictions)for(const n of e.restrictions){const e=Oi[n];if(e)for(const n of e){const e=i+n;r.items.push({label:e,textEdit:Jt.replace(this.getCompletionRange(t),e),kind:ur.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===t.line)return Ft.create(r,t)}return this.defaultReplaceRange}getColorProposals(e,t,r){for(const n in gi)r.items.push({label:n,documentation:gi[n],textEdit:Jt.replace(this.getCompletionRange(t),n),kind:ur.Color});for(const n in _i)r.items.push({label:n,documentation:_i[n],textEdit:Jt.replace(this.getCompletionRange(t),n),kind:ur.Value});const i=new wn;
2this.styleSheet.acceptVisitor(new Pn(i,this.offset));for(const n of i.getEntries())r.items.push({label:n,textEdit:Jt.replace(this.getCompletionRange(t),n),kind:ur.Color});for(const n of di)r.items.push({label:n.label,detail:n.func,documentation:n.desc,textEdit:Jt.replace(this.getCompletionRange(t),n.insertText),insertTextFormat:yn,kind:ur.Function});return r}getPositionProposals(e,t,r){for(const i in Ei)r.items.push({label:i,documentation:Ei[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getRepeatStyleProposals(e,t,r){for(const i in Ii)r.items.push({label:i,documentation:Ii[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getLineStyleProposals(e,t,r){for(const i in Ri)r.items.push({label:i,documentation:Ri[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getLineWidthProposals(e,t,r){for(const i of Ai)r.items.push({label:i,textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getGeometryBoxProposals(e,t,r){for(const i in Di)r.items.push({label:i,documentation:Di[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getBoxProposals(e,t,r){for(const i in Ti)r.items.push({label:i,documentation:Ti[i],textEdit:Jt.replace(this.getCompletionRange(t),i),kind:ur.Value});return r}getImageProposals(e,t,r){for(const i in Mi){const e=Sn(i);r.items.push({label:i,documentation:Mi[i],textEdit:Jt.replace(this.getCompletionRange(t),e),kind:ur.Function,insertTextFormat:i!==e?yn:void 0})}return r}getTimingFunctionProposals(e,t,r){for(const i in Fi){const e=Sn(i);r.items.push({label:i,documentation:Fi[i],textEdit:Jt.replace(this.getCompletionRange(t),e),kind:ur.Function,insertTextFormat:i!==e?yn:void 0})}return r}getBasicShapeProposals(e,t,r){for(const i in Ni){const e=Sn(i);r.items.push({label:i,documentation:Ni[i],textEdit:Jt.replace(this.getCompletionRange(t),e),kind:ur.Function,insertTextFormat:i!==e?yn:void 0})}return r}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof de?this.getCompletionsForRuleSet(t,e):t instanceof Ke?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:Jt.replace(this.getCompletionRange(null),t.name),documentation:en(t,this.doesSupportMarkdown()),tags:vn(t)?[dr.Deprecated]:[],kind:ur.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const r=e.getDeclarations();if(r&&r.endsWith("}")&&this.offset>=r.end)return this.getCompletionForTopLevel(t);return!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,r){const i=this.findInNodePath(re.PseudoSelector,re.IdentifierSelector,re.ClassSelector,re.ElementNameSelector);!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=Ft.create(Mt.create(this.position.line,this.position.character-this.currentWord.length),this.position));this.cssDataManager.getPseudoClasses().forEach(e=>{const t=Sn(e.name),n={label:e.name,textEdit:Jt.replace(this.getCompletionRange(i),t),documentation:en(e,this.doesSupportMarkdown()),tags:vn(e)?[dr.Deprecated]:[],kind:ur.Function,insertTextFormat:e.name!==t?yn:void 0};Y(e.name,":-")&&(n.sortText=xn.VendorPrefixed),r.items.push(n)});if(this.cssDataManager.getPseudoElements().forEach(e=>{const t=Sn(e.name),n={label:e.name,textEdit:Jt.replace(this.getCompletionRange(i),t),documentation:en(e,this.doesSupportMarkdown()),tags:vn(e)?[dr.Deprecated]:[],kind:ur.Function,insertTextFormat:e.name!==t?yn:void 0};Y(e.name,"::-")&&(n.sortText=xn.VendorPrefixed),r.items.push(n)}),!t){for(const e of Vi)r.items.push({label:e,textEdit:Jt.replace(this.getCompletionRange(i),e),kind:ur.Keyword});for(const e of Bi)r.items.push({label:e,textEdit:Jt.replace(this.getCompletionRange(i),e),kind:ur.Keyword})}const n={};n[this.currentWord]=!0;const s=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===re.SimpleSelector&&e.length>0){const t=s.substr(e.offset,e.length);return"."!==t.charAt(0)||n[t]||(n[t]=!0,r.items.push({label:t,textEdit:Jt.replace(this.getCompletionRange(i),t),kind:ur.Keyword})),!1}return!0}),e&&e.isNested()){const t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,t);if(r instanceof me){const e=r;if(!Ki(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(Ki(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof ye)return this.getCompletionsForDeclarationValue(e,t)}else r instanceof ft?this.getCompletionsForExtendsReference(r,null,t):(this.currentWord&&"@"===this.currentWord[0]||r instanceof de)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&Ki(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const r=e.getParent();if(r instanceof we)return this.getCompletionsForFunctionArgument(r,r.getParent(),t),t;const i=e.findParent(re.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;const n=e.findChildAtOffset(this.offset,!0);return n?n instanceof lt||n instanceof he?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)}getCompletionsForFunctionArgument(e,t,r){const i=t.getIdentifier();return i&&i.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(r)),r}getCompletionsForFunctionDeclaration(e,t){const r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset<r.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,ie.Mixin);for(const n of r)n.node instanceof yt&&t.items.push(this.makeTermProposal(n,n.node.getParameters(),null));const i=e.getIdentifier()||null;
2return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),t}getTermProposals(e,t,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,ie.Function);for(const n of i)n.node instanceof Ae&&r.items.push(this.makeTermProposal(n,n.node.getParameters(),t));return r}makeTermProposal(e,t,r){e.node;const i=t.getChildren().map(e=>e instanceof ve?e.getName():e.getText()),n=e.name+"("+i.map((e,t)=>"${"+(t+1)+":"+e+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:Jt.replace(this.getCompletionRange(r),n),insertTextFormat:yn,kind:ur.Function,sortText:xn.Term}}getCompletionsForSupportsCondition(e,t){const r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof ye)return!Ki(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,t):this.getCompletionsForDeclarationValue(r,t);if(r instanceof Ye)return this.getCompletionsForSupportsCondition(r,t)}return Ki(e.lParent)&&this.offset>e.lParent&&(!Ki(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const r=e.getDeclarations();if(!r||this.offset<=r.offset){const r=e.findFirstChildBeforeOffset(this.offset);return r instanceof Ye?this.getCompletionsForSupportsCondition(r,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,r){return r}getCompletionForUriLiteralValue(e,t){let r,i,n;if(e.hasChildren()){const t=e.getChild(0);r=t.getText(),i=this.position,n=this.getCompletionRange(t)}else{r="",i=this.position;const t=this.textDocument.positionAt(e.offset+4);n=Ft.create(t,t)}
2return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:r,position:i,range:n})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){const r=this.textDocument.getText();return e>=0&&e<r.length&&r.charAt(e)===t}doesSupportMarkdown(){if(!Ki(this.supportsMarkdown)){if(!Ki(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(hr.Markdown)}return this.supportsMarkdown}}function vn(e){return!(!e.status||"nonstandard"!==e.status&&"obsolete"!==e.status)}class wn{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}}function Sn(e){return e.replace(/\(\)$/,"($1)")}class Pn{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof st||e instanceof ke&&function(e){const t=e.getName();return!!t&&fi.test(t)}(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class En{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof he&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class In{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes)for(const t of this.attributes)if(t.name===e)return t.value;return null}addChild(e){e instanceof In&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const t=this.attributes[this.attributes.length-1];t.value=t.value+e}}prepend(e){if(this.attributes){const t=this.attributes[0];t.value=e+t.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Rn);)e=e.parent;return e}removeChild(e){if(this.children){const t=this.children.indexOf(e);if(-1!==t)return this.children.splice(t,1),!0}return!1}addAttr(e,t){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e)return void(r.value+=" "+t);this.attributes.push({name:e,value:t})}clone(e=!0){const t=new In;if(this.attributes){t.attributes=[];for(const e of this.attributes)t.addAttr(e.name,e.value)}if(e&&this.children){t.children=[];for(let e=0;e<this.children.length;e++)t.addChild(this.children[e].clone())}return t}cloneWithParent(){const e=this.clone(!1);if(this.parent&&!(this.parent instanceof Rn)){this.parent.cloneWithParent().addChild(e)}return e}}class Rn extends In{}class An extends In{constructor(e){super(),this.addAttr("name",e)}}class Tn{constructor(e){this.quote=e,this.result=[]}print(e,t){let r;
2return this.result=[],e instanceof Rn?e.children&&this.doPrint(e.children,0):this.doPrint([e],0),r=t?`${t.text}\n … `+this.result.join("\n"):this.result.join("\n"),[{language:"html",value:r}]}doPrint(e,t){for(const r of e)this.doPrintElement(r,t),r.children&&this.doPrint(r.children,t+1)}writeLine(e,t){const r=new Array(e+1).join("  ");this.result.push(r+t)}doPrintElement(e,t){const r=e.findAttribute("name");if(e instanceof An||"…"===r)return void this.writeLine(t,r);const i=["<"];if(r?i.push(r):i.push("element"),e.attributes)for(const n of e.attributes)if("name"!==n.name){i.push(" "),i.push(n.name);const e=n.value;e&&(i.push("="),i.push(Cn.ensure(e,this.quote)))}i.push(">"),this.writeLine(t,i.join(""))}}!function(e){function t(e){const t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,r){return r+t(e)+r},e.remove=t}(Cn||(Cn={}));class Dn{constructor(){this.id=0,this.attr=0,this.tag=0}}function $n(e,t){let r=new In;for(const i of e.getChildren())switch(i.type){case re.SelectorCombinator:if(t){const e=i.getText().split("&");if(1===e.length){r.addAttr("name",e[0]);break}if(r=t.cloneWithParent(),e[0]){r.findRoot().prepend(e[0])}for(let i=1;i<e.length;i++){if(i>1){const e=t.cloneWithParent();r.addChild(e.findRoot()),r=e}r.append(e[i])}}break;case re.SelectorPlaceholder:if(i.matches("@at-root"))return r;case re.ElementNameSelector:const e=i.getText();r.addAttr("name","*"===e?"element":Ln(e));break;case re.ClassSelector:r.addAttr("class",Ln(i.getText().substring(1)));break;case re.IdentifierSelector:r.addAttr("id",Ln(i.getText().substring(1)));break;case re.MixinDeclaration:r.addAttr("class",i.getName());break;case re.PseudoSelector:r.addAttr(Ln(i.getText()),"");break;case re.AttributeSelector:const n=i,s=n.getIdentifier();if(s){const e=n.getValue(),t=n.getOperator();let i;if(e&&t)switch(Ln(t.getText())){case"|=":i=`${Cn.remove(Ln(e.getText()))}-…`;break;case"^=":i=`${Cn.remove(Ln(e.getText()))}…`;break;case"$=":i=`…${Cn.remove(Ln(e.getText()))}`;break;case"~=":i=` … ${Cn.remove(Ln(e.getText()))} … `;break;case"*=":i=`…${Cn.remove(Ln(e.getText()))}…`;break;default:i=Cn.remove(Ln(e.getText()))}r.addAttr(Ln(s.getText()),i)}}return r}function Ln(e){const t=new X;t.setSource(e);const r=t.scanUnquotedString();return r?r.text:e}class Mn{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const r=function(e){if(e.matches("@at-root"))return null;const t=new Rn,r=[],i=e.getParent();if(i instanceof de){let e=i.getParent();for(;e&&!Nn(e);){if(e instanceof de){if(e.getSelectors().matches("@at-root"))break;r.push(e)}e=e.getParent()}}const n=new Fn(t);for(let s=r.length-1;s>=0;s--){const e=r[s].getSelectors().getChild(0);e&&n.processSelector(e)}return n.processSelector(e),t}(e);if(r){const i=new Tn('"').print(r,t);return i.push(this.selectorToSpecificityMarkedString(e)),i}return[]}simpleSelectorToMarkedString(e){const t=$n(e),r=new Tn('"').print(t);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])}selectorToSpecificityMarkedString(e){const t=e=>{const t=new Dn;let i=new Dn;for(const n of e)for(const e of n.getChildren()){const t=r(e);t.id>i.id?i=t:t.id<i.id||(t.attr>i.attr?i=t:t.attr<i.attr||t.tag>i.tag&&(i=t))}return t.id+=i.id,t.attr+=i.attr,t.tag+=i.tag,t},r=e=>{const i=new Dn;e:for(const n of e.getChildren()){switch(n.type){case re.IdentifierSelector:i.id++;break;case re.ClassSelector:case re.AttributeSelector:i.attr++;break;case re.ElementNameSelector:if(n.matches("*"))break;i.tag++;break;case re.PseudoSelector:const e=n.getText(),r=n.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&r.length>0){i.tag++;let e=t(r);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}i.tag++;continue e}if(e.match(/^:where/i))continue e;if(e.match(/^:(?:not|has|is)/i)&&r.length>0){let e=t(r);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}if(e.match(/^:(?:host|host-context)/i)&&r.length>0){i.attr++;let e=t(r);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&r.length>0){if(i.attr++,3===r.length&&23===r[1].type){let e=t(r[2].getChildren());i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}const e=new ji,n=r[1].getText();e.scanner.setSource(n);const s=e.scanner.scan(),o=e.scanner.scan();if("n"===s.text||"-n"===s.text&&"of"===o.text){const r=[],s=n.slice(o.offset+2).split(",");for(const t of s){const i=e.internalParse(t,e._parseSelector);i&&r.push(i)}let a=t(r);i.id+=a.id,i.attr+=a.attr,i.tag+=a.tag;continue e}continue e}i.attr++;continue e}if(n.getChildren().length>0){const e=r(n);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag}}return i},i=r(e);return`[${Et("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class Fn{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Rn)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===re.SelectorCombinator)){const e=this.element.findRoot();e.parent instanceof Rn&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(const r of e.getChildren()){if(r instanceof ge){if(this.prev instanceof ge){const e=new An("…");this.element.addChild(e),this.element=e}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new An("⋮"));const e=$n(r,t),i=e.findRoot();this.element.addChild(i),this.element=e}(r instanceof ge||r.type===re.SelectorCombinatorParent||r.type===re.SelectorCombinatorShadowPiercingDescendant||r.type===re.SelectorCombinatorSibling||r.type===re.SelectorCombinatorAllSiblings)&&(this.prev=r)}}}function Nn(e){switch(e.type){case re.MixinDeclaration:case re.Stylesheet:return!0}return!1}class On{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Mn(t)}configure(e){this.defaultSettings=e}doHover(e,t,r,i=this.defaultSettings){function n(t){return Ft.create(e.positionAt(t.offset),e.positionAt(t.end
2))}const s=se(r,e.offsetAt(t));let o,a=null;for(let c=0;c<s.length;c++){const e=s[c];if(e instanceof We){const t=/@media[^\{]+/g,r=e.getText().match(t);o={isMedia:!0,text:r?.[0]}}if(e instanceof fe){a={contents:this.selectorPrinting.selectorToMarkedString(e,o),range:n(e)};break}if(e instanceof ge){Y(e.getText(),"@")||(a={contents:this.selectorPrinting.simpleSelectorToMarkedString(e),range:n(e)});break}if(e instanceof ye){const t=e.getFullPropertyName(),r=this.cssDataManager.getProperty(t);if(r){const t=en(r,this.doesSupportMarkdown(),i);a=t?{contents:t,range:n(e)}:null}continue}if(e instanceof bt){const t=e.getText(),r=this.cssDataManager.getAtDirective(t);if(r){const t=en(r,this.doesSupportMarkdown(),i);a=t?{contents:t,range:n(e)}:null}continue}if(e instanceof oe&&e.type===re.PseudoSelector){const t=e.getText(),r="::"===t.slice(0,2)?this.cssDataManager.getPseudoElement(t):this.cssDataManager.getPseudoClass(t);if(r){const t=en(r,this.doesSupportMarkdown(),i);a=t?{contents:t,range:n(e)}:null}continue}}return a&&(a.contents=this.convertContents(a.contents)),a}convertContents(e){return this.doesSupportMarkdown()||"string"==typeof e?e:"kind"in e?{kind:"plaintext",value:e.value}:Array.isArray(e)?e.map(e=>"string"==typeof e?e:e.value):e.value}doesSupportMarkdown(){if(!Ki(this.supportsMarkdown)){if(!Ki(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&-1!==e.contentFormat.indexOf(hr.Markdown)}return this.supportsMarkdown}}const Vn=/^\w+:\/\//,Bn=/^data:/;class Un{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,r){const i=new Xi(r),n=ne(r,e.offsetAt(t));if(!n)return null;const s=i.findSymbolFromNode(n);return s?{uri:e.uri,range:Wn(s.node,e)}:null}findReferences(e,t,r){return this.findDocumentHighlights(e,t,r).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,r){let i=ne(r,e.offsetAt(t));if(i&&i.type!==re.Stylesheet&&i.type!==re.Declarations)return i.type===re.Identifier&&i.parent&&i.parent.type===re.ClassSelector&&(i=i.parent),i}findDocumentHighlights(e,t,r){const i=[],n=this.getHighlightNode(e,t,r);if(!n)return i;const s=new Xi(r),o=s.findSymbolFromNode(n),a=n.getText();return r.accept(t=>{if(o){if(s.matchesSymbol(t,o))return i.push({kind:jn(t),range:Wn(t,e)}),!1}else n&&n.type===t.type&&t.matches(a)&&i.push({kind:jn(t),range:Wn(t,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===re.Import}findDocumentLinks(e,t,r){const i=this.findUnresolvedLinks(e,t),n=[];for(let s of i){const t=s.link,i=t.target;if(!i||Bn.test(i));else if(Vn.test(i))n.push(t);else{const s=r.resolveReference(i,e.uri);s&&(t.target=s),n.push(t)}}return n}async findDocumentLinks2(e,t,r){const i=this.findUnresolvedLinks(e,t),n=[];for(let s of i){const t=s.link,i=t.target;if(!i||Bn.test(i));else if(Vn.test(i))n.push(t);else{const o=await this.resolveReference(i,e.uri,r,s.isRawLink);void 0!==o&&(t.target=o,n.push(t))}}return n}findUnresolvedLinks(e,t){const r=[],i=t=>{let i=t.getText();const n=Wn(t,e);if(n.start.line===n.end.line&&n.start.character===n.end.character)return;(Y(i,"'")||Y(i,'"'))&&(i=i.slice(1,-1));const s=!!t.parent&&this.isRawStringDocumentLinkNode(t.parent);r.push({link:{target:i,range:n},isRawLink:s})};return t.accept(e=>{if(e.type===re.URILiteral){const t=e.getChild(0);return t&&i(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){const t=e.getText();return(Y(t,"'")||Y(t,'"'))&&i(e),!1}return!0}),r}findSymbolInformations(e,t){const r=[];return this.collectDocumentSymbols(e,t,(t,i,n)=>{const s=n instanceof oe?Wn(n,e):n,o={name:t||Et("<undefined>"),kind:i,location:Nt.create(e.uri,s)};r.push(o)}),r}findDocumentSymbols(e,t){const r=[],i=[];return this.collectDocumentSymbols(e,t,(t,n,s,o,a)=>{const c=s instanceof oe?Wn(s,e):s;let h=o instanceof oe?Wn(o,e):o;h&&Kn(c,h)||(h=Ft.create(c.start,c.start));const l={name:t||Et("<undefined>"),kind:n,range:c,selectionRange:h};let u=i.pop();for(;u&&!Kn(u[1],c);)u=i.pop();if(u){const e=u[0];e.children||(e.children=[]),e.children.push(l),i.push(u)}else r.push(l);a&&i.push([l,Wn(a,e)])}),r}collectDocumentSymbols(e,t,r){t.accept(t=>{if(t instanceof de){for(const i of t.getSelectors().getChildren())if(i instanceof fe){const n=Ft.create(e.positionAt(i.offset),e.positionAt(t.end
2));r(i.getText(),Sr.Class,n,i,t.getDeclarations())}}else if(t instanceof ut)r(t.getName(),Sr.Variable,t,t.getVariable(),void 0);else if(t instanceof yt)r(t.getName(),Sr.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Ae)r(t.getName(),Sr.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Le){const e=Et("@keyframes {0}",t.getName());r(e,Sr.Class,t,t.getIdentifier(),t.getDeclarations())}else if(t instanceof De){const e=Et("@font-face");r(e,Sr.Class,t,void 0,t.getDeclarations())}else if(t instanceof We){const e=t.getChild(0);if(e instanceof Qe){const i="@media "+e.getText();r(i,Sr.Module,t,e,t.getDeclarations())}}return!0})}findDocumentColors(e,t){const r=[];return t.accept(t=>{const i=function(e,t){const r=Pi(e);if(r){return{color:r,range:Wn(e,t)}}return null}(t,e);return i&&r.push(i),!0}),r}getColorPresentations(e,t,r,i){const n=[],s=Math.round(255*r.red),o=Math.round(255*r.green),a=Math.round(255*r.blue);let c;c=1===r.alpha?`rgb(${s}, ${o}, ${a})`:`rgba(${s}, ${o}, ${a}, ${r.alpha})`,n.push({label:c,textEdit:Jt.replace(i,c)}),c=1===r.alpha?`#${zn(s)}${zn(o)}${zn(a)}`:`#${zn(s)}${zn(o)}${zn(a)}${zn(Math.round(255*r.alpha))}`,n.push({label:c,textEdit:Jt.replace(i,c)});const h=Si(r);c=1===h.a?`hsl(${h.h}, ${Math.round(100*h.s)}%, ${Math.round(100*h.l)}%)`:`hsla(${h.h}, ${Math.round(100*h.s)}%, ${Math.round(100*h.l)}%, ${h.a})`,n.push({label:c,textEdit:Jt.replace(i,c)});const l=function(e){const t=Si(e),r=Math.min(e.red,e.green,e.blue),i=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:r,b:i,a:t.a}}(r);return c=1===l.a?`hwb(${l.h} ${Math.round(100*l.w)}% ${Math.round(100*l.b)}%)`:`hwb(${l.h} ${Math.round(100*l.w)}% ${Math.round(100*l.b)}% / ${l.a})`,n.push({label:c,textEdit:Jt.replace(i,c)}),n}prepareRename(e,t,r){const i=this.getHighlightNode(e,t,r);if(i)return Ft.create(e.positionAt(i.offset),e.positionAt(i.end))}
2doRename(e,t,r,i){const n=this.findDocumentHighlights(e,t,i).map(e=>Jt.replace(e.range,r));return{changes:{[e.uri]:n}}}async resolveModuleReference(e,t,r){if(Y(t,"file://")){const i=function(e){const t=e.indexOf("/");if(-1===t)return"";if("@"===e[0]){const r=e.indexOf("/",t+1);return-1===r?e:e.substring(0,r)}return e.substring(0,t)}(e);if(i&&"."!==i&&".."!==i){const n=r.resolveReference("/",t),s=ln(t),o=await this.resolvePathToModule(i,s,n);if(o){return un(o,e.substring(i.length+1))}}}}async mapReference(e,t){return e}async resolveReference(e,t,r,i=!1,n=this.defaultSettings){if("~"===e[0]&&"/"!==e[1]&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,r),i);const s=await this.mapReference(r.resolveReference(e,t),i);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;const n=await this.mapReference(await this.resolveModuleReference(e,t,r),i);if(n)return n}if(s&&!await this.fileExists(s)){const s=r.resolveReference("/",t);if(n&&s){if(e in n)return this.mapReference(un(s,n[e]),i);const t=e.indexOf("/"),r=`${e.substring(0,t)}/`;if(r in n){let t=un(s,n[r].slice(0,-1));return this.mapReference(t=un(t,e.substring(r.length-1)),i)}}}return s}async resolvePathToModule(e,t,r){const i=un(t,"node_modules",e,"package.json");return await this.fileExists(i)?ln(i):r&&t.startsWith(r)&&t.length!==r.length?this.resolvePathToModule(e,ln(t),r):void 0}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return t.type!==si.Unknown||-1!==t.size}catch(t){return!1}}}function Wn(e,t){return Ft.create(t.positionAt(e.offset),t.positionAt(e.end))}function Kn(e,t){const r=t.start.line,i=t.end.line,n=e.start.line,s=e.end.line;return!(r<n||i<n)&&(!(r>s||i>s)&&(!(r===n&&t.start.character<e.start.character)&&!(i===s&&t.end.character>e.end.character)))}function jn(e){if(e.type===re.Selector)return vr.Write;if(e instanceof he&&e.parent&&e.parent instanceof xe&&e.isCustomProperty)return vr.Write;if(e.parent)switch(e.parent.type){case re.FunctionDeclaration:case re.MixinDeclaration:case re.Keyframe:case re.VariableDeclaration:case re.FunctionParameter:return vr.Write}return vr.Read}function zn(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}const qn=wt.Warning,Hn=wt.Error,Qn=wt.Ignore;class Gn{constructor(e,t,r){this.id=e,this.message=t,this.defaultValue=r}}const Jn={AllVendorPrefixes:new Gn("compatibleVendorPrefixes",Et("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Qn),IncludeStandardPropertyWhenUsingVendorPrefix:new Gn("vendorPrefix",Et("When using a vendor-specific prefix also include the standard property"),qn),DuplicateDeclarations:new Gn("duplicateProperties",Et("Do not use duplicate style definitions"),Qn),EmptyRuleSet:new Gn("emptyRules",Et("Do not use empty rulesets"),qn),ImportStatemement:new Gn("importStatement",Et("Import statements do not load in parallel"),Qn),BewareOfBoxModelSize:new Gn("boxModel",Et("Do not use width or height when using padding or border"),Qn),UniversalSelector:new Gn("universalSelector",Et("The universal selector (*) is known to be slow"),Qn),ZeroWithUnit:new Gn("zeroUnits",Et("No unit for zero needed"),Qn),RequiredPropertiesForFontFace:new Gn("fontFaceProperties",Et("@font-face rule must define 'src' and 'font-family' properties"),qn),HexColorLength:new Gn("hexColorLength",Et("Hex colors must consist of three, four, six or eight hex numbers"),Hn),ArgsInColorFunction:new Gn("argumentsInColorFunction",Et("Invalid number of parameters"),Hn),UnknownProperty:new Gn("unknownProperties",Et("Unknown property."),qn),UnknownAtRules:new Gn("unknownAtRules",Et("Unknown at-rule."),qn),IEStarHack:new Gn("ieHack",Et("IE hacks are only necessary when supporting IE7 and older"),Qn),UnknownVendorSpecificProperty:new Gn("unknownVendorSpecificProperties",Et("Unknown vendor specific property."),Qn),PropertyIgnoredDueToDisplay:new Gn("propertyIgnoredDueToDisplay",Et("Property is ignored due to the display."),qn),AvoidImportant:new Gn("important",Et("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Qn),AvoidFloat:new Gn("float",Et("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Qn),AvoidIdSelector:new Gn("idSelector",Et("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Qn)},Xn={ValidProperties:new class{constructor(e,t,r){this.id=e,this.message=t,this.defaultValue=r}}("validProperties",Et("A list of properties that are not validated against the `unknownProperties` rule."),[])};class Yn{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=function(e){switch(e){case"ignore":return wt.Ignore;case"warning":return wt.Warning;case"error":return wt.Error}return null}(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}}class Zn{constructor(e){this.cssDataManager=e}
2doCodeActions(e,t,r,i){return this.doCodeActions2(e,t,r,i).map(t=>{const r=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return Gt.create(t.title,"_css.applyCodeAction",e.uri,e.version,r&&r.edits)})}doCodeActions2(e,t,r,i){const n=[];if(r.diagnostics)for(const s of r.diagnostics)this.appendFixesForMarker(e,i,s,n);return n}getFixesForUnknownProperty(e,t,r,i){const n=t.getName(),s=[];this.cssDataManager.getProperties().forEach(e=>{const t=function(e,t,r=4){let i=Math.abs(e.length-t.length);if(i>r)return 0;let n,s,o=[],a=[];for(n=0;n<t.length+1;++n)a.push(0);for(n=0;n<e.length+1;++n)o.push(a);for(n=1;n<e.length+1;++n)for(s=1;s<t.length+1;++s)e[n-1]===t[s-1]?o[n][s]=o[n-1][s-1]+1:o[n][s]=Math.max(o[n-1][s],o[n][s-1]);return o[e.length][t.length]-Math.sqrt(i)}(n,e.name);t>=n.length/2&&s.push({property:e.name,score:t})}),s.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let o=3;for(const a of s){const t=a.property,n=Et("Rename to '{0}'",t),s=Jt.replace(r.range,t),c=or.create(e.uri,e.version),h={documentChanges:[er.create(c,[s])]},l=$r.create(n,h,Ar.QuickFix);if(l.diagnostics=[r],i.push(l),--o<=0)return}}appendFixesForMarker(e,t,r,i){if(r.code!==Jn.UnknownProperty.id)return;const n=e.offsetAt(r.range.start),s=e.offsetAt(r.range.end),o=se(t,n);for(let a=o.length-1;a>=0;a--){const t=o[a];if(t instanceof ye){const o=t.getProperty();if(o&&o.offset===n&&o.end===s)return void this.getFixesForUnknownProperty(e,o,r,i)}}}}class es{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function ts(e,t,r,i){const n=e[t];n.value=r,r&&(zi(n.properties,i)||n.properties.push(i))}function rs(e,t,r,i){"top"===t||"right"===t||"bottom"===t||"left"===t?ts(e,t,r,i):function(e,t,r){ts(e,"top",t,r),ts(e,"right",t,r),ts(e,"bottom",t,r),ts(e,"left",t,r)}(e,r,i)}function is(e,t,r){switch(t.length){case 1:rs(e,void 0,t[0],r);break;case 2:rs(e,"top",t[0],r),rs(e,"bottom",t[0],r),rs(e,"right",t[1],r),rs(e,"left",t[1],r);break;case 3:rs(e,"top",t[0],r),rs(e,"right",t[1],r),rs(e,"left",t[1],r),rs(e,"bottom",t[2],r);break;case 4:rs(e,"top",t[0],r),rs(e,"right",t[1],r),rs(e,"bottom",t[2],r),rs(e,"left",t[3],r)}}function ns(e,t){for(let r of t)if(e.matches(r))return!0;return!1}function ss(e,t=!0){return(!t||!ns(e,["initial","unset"]))&&0!==parseFloat(e.getText())}function os(e,t=!0){return e.map(e=>ss(e,t))}function as(e,t=!0){return!ns(e,["none","hidden"])&&(!t||!ns(e,["initial","unset"]))}function cs(e,t=!0){return e.map(e=>as(e,t))}function hs(e){const t=e.getChildren();if(1===t.length){const e=t[0];return ss(e)&&as(e)}for(const r of t){const e=r;if(!ss(e,!1)||!as(e,!1))return!1}return!0}class ls{constructor(){this.data={}}add(e,t,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),r&&i.nodes.push(r)}}class us{static entries(e,t,r,i,n){const s=new us(t,r,i);return e.acceptVisitor(s),s.completeValidations(),s.getEntries(n)}constructor(e,t,r){this.cssDataManager=r,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new ls,this.validProperties={};const i=t.getSetting(Xn.ValidProperties);Array.isArray(i)&&i.forEach(e=>{if("string"==typeof e){const t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}})}isValidPropertyDeclaration(e){const t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){const r=[];for(const i of e)i.fullPropertyName===t&&r.push(i);return r}fetchWithValue(e,t,r){const i=[];for(const n of e)if(n.fullPropertyName===t){const e=n.node.getValue();e&&this.findValueInExpression(e,r)&&i.push(n)}return i}findValueInExpression(e,t){let r=!1;return e.accept(e=>(e.type===re.Identifier&&e.matches(t)&&(r=!0),!r)),r}getEntries(e=wt.Warning|wt.Error){return this.warnings.filter(t=>0!==(t.getLevel()&e))}addEntry(e,t,r){const i=new St(e,t,this.settings.getRule(t),r);this.warnings.push(i)}getMissingNames(e,t){const r=e.slice(0);for(let n=0;n<t.length;n++){const e=r.indexOf(t[n]);-1!==e&&(r[e]=null)}let i=null;for(let n=0;n<r.length;n++){const e=r[n];e&&(i=null===i?Et("'{0}'",e):Et("{0}, '{1}'",i,e))}return i}visitNode(e){switch(e.type){case re.UnknownAtRule:return this.visitUnknownAtRule(e);case re.Keyframe:return this.visitKeyframe(e);case re.FontFace:return this.visitFontFace(e);case re.Ruleset:return this.visitRuleSet(e);case re.SimpleSelector:return this.visitSimpleSelector(e);case re.Function:return this.visitFunction(e);case re.NumericValue:return this.visitNumericValue(e);case re.Import:return this.visitImport(e);case re.HexColorValue:return this.visitHexColorValue(e);case re.Prio:return this.visitPrio(e);case re.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){const t=e.getChild(0);if(!t)return!1;return!this.cssDataManager.getAtDirective(t.getText())&&(this.addEntry(t,Jn.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){const t=e.getKeyword();if(!t)return!1;const r=t.getText();return this.keyframes.add(e.getName(),r,"@keyframes"!==r?t:null),!0}validateKeyframes(){const e=["@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"];for(const t in this.keyframes.data){const r=this.keyframes.data[t].names,i=-1===r.indexOf("@keyframes");if(!i&&1===r.length)continue;const n=this.getMissingNames(e,r);if(n||i)for(const e of this.keyframes.data[t].nodes){if(i){const t=Et("Always define standard rule '@keyframes' when defining keyframes.");this.addEntry(e,Jn.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(n){const t=Et("Always include all vendor specific rules: Missing: {0}",n);this.addEntry(e,Jn.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){const t=this.documentText.charAt(e.offset);return 1===e.length&&"*"===t&&this.addEntry(e,Jn.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,Jn.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,Jn.ImportStatemement),!0}visitRuleSet(e){const t=e.getDeclarations();if(!t)return!1;t.hasChildren()||this.addEntry(e.getSelectors(),Jn.EmptyRuleSet);const r=[];for(const o of t.getChildren())o instanceof ye&&r.push(new es(o)
2);const i=function(e){const t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const r of e){const e=r.node.value;if(void 0!==e)switch(r.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":t.width=r;break;case"height":t.height=r;break;default:const i=r.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:rs(t,i[1],hs(e),r);break;case"width":rs(t,i[1],ss(e,!1),r);break;case"style":rs(t,i[1],as(e,!0),r)}break;case"width":is(t,os(e.getChildren(),!1),r);break;case"style":is(t,cs(e.getChildren(),!0),r)}break;case"padding":1===i.length?is(t,os(e.getChildren(),!0),r):rs(t,i[1],ss(e,!0),r)}}}return t}(r);if(i.width){let e=[];if(i.right.value&&(e=qi(e,i.right.properties)),i.left.value&&(e=qi(e,i.left.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,Jn.BewareOfBoxModelSize);this.addEntry(i.width.node,Jn.BewareOfBoxModelSize)}}if(i.height){let e=[];
2if(i.top.value&&(e=qi(e,i.top.properties)),i.bottom.value&&(e=qi(e,i.bottom.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,Jn.BewareOfBoxModelSize);this.addEntry(i.height.node,Jn.BewareOfBoxModelSize)}}let n=this.fetchWithValue(r,"display","inline-block");if(n.length>0){const e=this.fetch(r,"float");for(let t=0;t<e.length;t++){const r=e[t].node,i=r.getValue();i&&!i.matches("none")&&this.addEntry(r,Jn.PropertyIgnoredDueToDisplay,Et("inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"))}}if(n=this.fetchWithValue(r,"display","block"),n.length>0){const e=this.fetch(r,"vertical-align");for(let t=0;t<e.length;t++)this.addEntry(e[t].node,Jn.PropertyIgnoredDueToDisplay,Et("Property is ignored due to the display. With 'display: block', vertical-align should not be used."))}const s=this.fetch(r,"float");for(let o=0;o<s.length;o++){const e=s[o];this.isValidPropertyDeclaration(e)||this.addEntry(e.node,Jn.AvoidFloat)}for(let o=0;o<r.length;o++){const e=r[o];if("background"!==e.fullPropertyName&&!this.validProperties[e.fullPropertyName]){const t=e.node.getValue();if(t&&"-"!==this.documentText.charAt(t.offset)){const t=this.fetch(r,e.fullPropertyName);if(t.length>1)for(let r=0;r<t.length;r++){const i=t[r].node.getValue();i&&"-"!==this.documentText.charAt(i.offset)&&t[r]!==e&&this.addEntry(e.node,Jn.DuplicateDeclarations)}}}}if(!e.getSelectors().matches(":export")){const t=new ls;let i=!1;for(const e of r){const r=e.node;if(this.isCSSDeclaration(r)){let i=e.fullPropertyName;const n=i.charAt(0);if("-"===n){if("-"!==i.charAt(1)){this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(r.getProperty(),Jn.UnknownVendorSpecificProperty);const e=r.getNonPrefixedPropertyName();t.add(e,i,r.getProperty())}}else{const e=i;"*"!==n&&"_"!==n||(this.addEntry(r.getProperty(),Jn.IEStarHack),i=i.substr(1)),this.cssDataManager.isKnownProperty(e)||this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(r.getProperty(),Jn.UnknownProperty,Et("Unknown property: '{0}'",r.getFullPropertyName())),t.add(i,i,null)}}else i=!0}if(!i)for(const r in t.data){const i=t.data[r],n=i.names,s=this.cssDataManager.isStandardProperty(r)&&-1===n.indexOf(r);if(!s&&1===n.length)continue;const o=new Set(s?i.nodes:[]);if(s){const t=this.getContextualVendorSpecificPseudoElements(e);for(const e of i.nodes){const i=e.getName(),n=i.substring(0,i.length-r.length);t.some(e=>e.startsWith(n))&&o.delete(e)}}const a=[];for(let e=0,t=us.prefixes.length;e<t;e++){const t=us.prefixes[e];this.cssDataManager.isStandardProperty(t+r)&&a.push(t+r)}const c=this.getMissingNames(a,n);if(c||s)for(const e of i.nodes){if(s&&o.has(e)){const t=Et("Also define the standard property '{0}' for compatibility",r);this.addEntry(e,Jn.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(c){const t=Et("Always include all vendor specific properties: Missing: {0}",c);this.addEntry(e,Jn.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){function t(e,r){for(const i of r.getChildren()){if(i.type===re.PseudoSelector){const t=i.getChildren()[0]?.getText();t&&e.add(t)}t(e,i)}}const r=new Set;return function e(r,i){if(i.type===re.Ruleset)for(const n of i.getSelectors().getChildren())t(r,n);return i.parent?e(r,i.parent):void 0}(r,e),Array.from(r)}visitPrio(e){return this.addEntry(e,Jn.AvoidImportant),!0}visitNumericValue(e){const t=e.findParent(re.Function);if(t&&"calc"===t.getName())return!0;const r=e.findParent(re.Declaration);if(r){if(r.getValue()){const t=e.getValue();if(!t.unit||-1===Oi.length.indexOf(t.unit.toLowerCase()))return!0;0===parseFloat(t.value)&&t.unit&&!this.validProperties[r.getFullPropertyName()]&&this.addEntry(e,Jn.ZeroWithUnit)}}return!0}visitFontFace(e){const t=e.getDeclarations();if(!t)return!1;let r=!1,i=!1,n=!1;for(const s of t.getChildren())if(this.isCSSDeclaration(s)){const e=s.getProperty().getName().toLowerCase();"src"===e&&(r=!0),"font-family"===e&&(i=!0)}else n=!0;return n||r&&i||this.addEntry(e,Jn.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof ye){if(!e.getValue())return!1;const t=e.getProperty();if(!t)return!1;const r=t.getIdentifier();return!(!r||r.containsInterpolation())}return!1}visitHexColorValue(e){const t=e.length;return 9!==t&&7!==t&&5!==t&&4!==t&&this.addEntry(e,Jn.HexColorLength),!1}visitFunction(e){const t=e.getName().toLowerCase();let r=-1,i=0;switch(t){case"rgb(":case"hsl(":r=3;break;case"rgba(":case"hsla(":r=4}return-1!==r&&(e.getArguments().accept(e=>
2!(e instanceof rt)||(i+=1,!1)),i!==r&&this.addEntry(e,Jn.ArgsInColorFunction)),!0}}us.prefixes=["-ms-","-moz-","-o-","-webkit-"];class ps{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,r=this.settings){if(r&&!1===r.validate)return[];const i=[];i.push.apply(i,Pt.entries(t)),i.push.apply(i,us.entries(t,e,new Yn(r&&r.lint),this.cssDataManager));const n=[];for(const s in Jn)n.push(Jn[s].id);return i.filter(e=>e.getLevel()!==wt.Ignore).map(function(t){const r=Ft.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),i=e.languageId;return{code:t.getRule().id,source:i,message:t.getMessage(),severity:t.getLevel()===wt.Warning?zt.Warning:zt.Error,range:r}})}}const ds="/".charCodeAt(0),fs="\n".charCodeAt(0),gs="\r".charCodeAt(0),ms="\f".charCodeAt(0),_s="$".charCodeAt(0),ys="#".charCodeAt(0),bs="{".charCodeAt(0),xs="=".charCodeAt(0),Cs="!".charCodeAt(0),ks="<".charCodeAt(0),vs=">".charCodeAt(0),ws=".".charCodeAt(0);let Ss=i.CustomToken;const Ps=Ss++,Es=Ss++;Ss++;const Is=Ss++,Rs=Ss++,As=Ss++,Ts=Ss++,Ds=Ss++;Ss++;class $s extends X{scanNext(e){if(this.stream.advanceIfChar(_s)){const t=["$"];if(this.ident(t))return this.finishToken(e,Ps,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([ys,bs])?this.finishToken(e,Es):this.stream.advanceIfChars([xs,xs])?this.finishToken(e,Is):this.stream.advanceIfChars([Cs,xs])?this.finishToken(e,Rs):this.stream.advanceIfChar(ks)?this.stream.advanceIfChar(xs)?this.finishToken(e,Ts):this.finishToken(e,i.Delim):this.stream.advanceIfChar(vs)?this.stream.advanceIfChar(xs)?this.finishToken(e,As):this.finishToken(e,i.Delim):this.stream.advanceIfChars([ws,ws,ws])?this.finishToken(e,Ds):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([ds,ds]))&&(this.stream.advanceWhileChar(e=>{switch(e){case fs:case gs:case ms:return!1;default:return!0}}),!0)}}class Ls{constructor(e,t){this.id=e,this.message=t}}const Ms={FromExpected:new Ls("scss-fromexpected",Et("'from' expected")),ThroughOrToExpected:new Ls("scss-throughexpected",Et("'through' or 'to' expected")),InExpected:new Ls("scss-fromexpected",Et("'in' expected"))};class Fs extends ji{constructor(){super(new $s)}_parseStylesheetStatement(e=!1){return this.peek(i.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Fe);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,At.URIOrStringExpected);for(;this.accept(i.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,At.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Ps))return null;const t=this.create(ut);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(i.Colon))return this.finish(t,At.ColonExpected);
2if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,At.VariableValueExpected,[],e);for(;this.peek(i.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(i.Ident,/^(default|global)$/))return this.finish(t,At.UnknownKeyword);this.consumeToken()}return this.peek(i.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Ts)||this.accept(As)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Ps))return null;const e=this.create(dt);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(vt);return t.setIdentifier(this._parseIdent([ie.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,At.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(i.Ident)&&!this.peek(Es)&&!this.peekDelim("-"))return null;const t=this.create(he);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(i.Ident,/^--/);let r=!1;const n=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(i.Ident)||t.addChild(n())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Es)){const e=this.create(pt);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseNestingSelector()?this.accept(i.CurlyR)?this.finish(e):this.finish(e,At.RightCurlyExpected):this.accept(i.CurlyR)?this.finish(e):this.finish(e,At.ExpressionExpected)}return null}_parseOperator(){if(this.peek(Is)||this.peek(Rs)||this.peek(As)||this.peek(Ts)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(re.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(oe);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(i.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const r=this.create(ye);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(i.Colon))return this.finish(r,At.ColonExpected,[i.Colon],e||[i.SemiColon]);
2this.prevToken&&(r.colonPosition=this.prevToken.offset);let n=!1;if(r.setValue(this._parseExpr())&&(n=!0,r.addChild(this._parsePrio())),this.peek(i.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!n)return this.finish(r,At.PropertyValueExpected);return this.peek(i.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){const e=this.create($e);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(ft);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,At.SelectorExpected);for(;this.accept(i.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(i.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,At.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(re.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(i.Num)||this.accept(i.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(re.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){const e=this.createNode(re.SelectorPlaceholder);if(this.consumeToken(),this.accept(i.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,At.IdentifierExpected);if(!this.accept(i.Colon))return this.finish(e,At.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,At.IdentifierExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[i.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(i.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(re.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(i.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement
2(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const t=this.create(Se);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,At.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(i.CurlyL)){const r=this.create(Re);this._parseBody(r,e),t.setElseClause(r)}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(Pe);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,At.ExpressionExpected,[i.CurlyR]):this.finish(t,Ms.ThroughOrToExpected,[i.CurlyR]):this.finish(t,At.ExpressionExpected,[i.CurlyR]):this.finish(t,Ms.FromExpected,[i.CurlyR]):this.finish(t,At.VariableNameExpected,[i.CurlyR])}
2_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(Ee);this.consumeToken();const r=t.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(t,At.VariableNameExpected,[i.CurlyR]);for(;this.accept(i.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(t,At.VariableNameExpected,[i.CurlyR]);return this.finish(r),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,At.ExpressionExpected,[i.CurlyR]):this.finish(t,Ms.InExpected,[i.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(Ie);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,At.ExpressionExpected,[i.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(Ae);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ie.Function])))return this.finish(e,At.IdentifierExpected,[i.CurlyR]);if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[i.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,At.VariableNameExpected);return this.accept(i.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,At.RightParenthesisExpected,[i.CurlyR])}
2_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(re.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,At.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(yt);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([ie.Mixin])))return this.finish(e,At.IdentifierExpected,[i.CurlyR]);if(this.accept(i.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,At.VariableNameExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[i.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(ve);return e.setIdentifier(this._parseVariable())?(this.accept(Ds),this.accept(i.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,At.VariableValueExpected,[],[i.Comma,i.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(gt);if(this.consumeToken(),this.accept(i.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,At.ExpressionExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(_t);this.consumeToken();const t=this._parseIdent([ie.Mixin]);if(!e.setIdentifier(t))return this.finish(e,At.IdentifierExpected,[i.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const r=this._parseIdent([ie.Mixin]);if(!r)return this.finish(e,At.IdentifierExpected,[i.CurlyR]);const n=this.create(vt);t.referenceTypes=[ie.Module],n.setIdentifier(t),e.setIdentifier(r),e.addChild(n)}if(this.accept(i.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,At.ExpressionExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(i.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(mt);if(this.acceptIdent("using")){if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[i.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,At.VariableNameExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[i.CurlyL])}return this.peek(i.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(we),t=this.mark(),r=this._parseVariable();if(r)if(this.accept(i.Colon))e.setIdentifier(r);else{if(this.accept(Ds))return e.setValue(r),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Ds),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(i.ParenthesisR)){this.restoreAtMark(e);const t=this.create(oe);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(i.ParenthesisL))return null;const e=this.create(oe);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(i.Comma);return this.accept(i.ParenthesisR)?this.finish(e):this.finish(e,At.RightParenthesisExpected)}_parseListElement(){const e=this.create(xt),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(i.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,At.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(Ne);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,At.StringLiteralExpected);if(!this.peek(i.SemiColon)&&!this.peek(i.EOF)){if(!this.peekRegExp(i.Ident,/as|with/))return this.finish(e,At.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([ie.Module]))&&!this.acceptDelim("*"))return this.finish(e,At.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[i.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,At.VariableNameExpected);for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,At.VariableNameExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected)}}return this.accept(i.SemiColon)||this.accept(i.EOF)?this.finish(e):this.finish(e,At.SemiColonExpected)}_parseModuleConfigDeclaration(){const e=this.create(Oe);return e.setIdentifier(this._parseVariable())?this.accept(i.Colon)&&e.setValue(this._parseExpr(!0))?!this.accept(i.Exclamation)||!this.hasWhitespace()&&this.acceptIdent("default")?this.finish(e):this.finish(e,At.UnknownKeyword):this.finish(e,At.VariableValueExpected,[],[i.Comma,i.ParenthesisR]):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Ve);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,At.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([ie.Forward]);if(!e.setIdentifier(t))return this.finish(e,At.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,At.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected,[i.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,At.VariableNameExpected);for(;this.accept(i.Comma)&&!this.peek(i.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,At.VariableNameExpected);if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,At.IdentifierOrVariableExpected);return this.accept(i.SemiColon)||this.accept(i.EOF)?this.finish(e):this.finish(e,At.SemiColonExpected)}_parseForwardVisibility(){const e=this.create(Be);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(i.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}const Ns=Et("Sass documentation");class Os extends kn{constructor(e,t){super("$",e,t),Vs(Os.scssModuleLoaders),Vs(Os.scssModuleBuiltIns)}isImportPathParent(e){return e===re.Forward||e===re.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){const r=e.getParent().type;if(r===re.Forward||r===re.Use)for(let i of Os.scssModuleBuiltIns){const r={label:i.label,documentation:i.documentation,textEdit:Jt.replace(this.getCompletionRange(e),`'${i.label}'`),kind:ur.Module};t.items.push(r)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,r)=>"\\"+r+": ${"+e+++":"+(Os.variableDefaults[r]||"")+"}"}createFunctionProposals(e,t,r,i){for(const n of e){const e=n.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),s={label:n.func.substr(0,n.func.indexOf("(")),detail:n.func,documentation:n.desc,textEdit:Jt.replace(this.getCompletionRange(t),e),insertTextFormat:pr.Snippet,kind:ur.Function};r&&(s.sortText="z"),i.items.push(s)}return i}getCompletionsForSelector(e,t,r){return this.createFunctionProposals(Os.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,t,r)}getTermProposals(e,t,r){let i=Os.builtInFuncs;return e&&(i=i.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(i,t,!0,r),super.getTermProposals(e,t,r)}getColorProposals(e,t,r){return this.createFunctionProposals(Os.colorProposals,t,!1,r),super.getColorProposals(e,t,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,ie.Rule);for(const n of i){const e={label:n.name,textEdit:Jt.replace(this.getCompletionRange(t),n.name),kind:ur.Function};r.items.push(e)}return r}getCompletionForAtDirectives(e){return e.items.push(...Os.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...Os.scssModuleLoaders),e}}
2function Vs(e){e.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const t="string"==typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | "),e.documentation=t}})}Os.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},Os.colorProposals=[{func:"red($color)",desc:Et("Gets the red component of a color.")},{func:"green($color)",desc:Et("Gets the green component of a color.")},{func:"blue($color)",desc:Et("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:Et("Mixes two colors together.")},{func:"hue($color)",desc:Et("Gets the hue component of a color.")},{func:"saturation($color)",desc:Et("Gets the saturation component of a color.")},{func:"lightness($color)",desc:Et("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:Et("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:Et("Makes a color lighter.")},{func:"darken($color, $amount)",desc:Et("Makes a color darker.")},{func:"saturate($color, $amount)",desc:Et("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:Et("Makes a color less saturated.")},{func:"grayscale($color)",desc:Et("Converts a color to grayscale.")},{func:"complement($color)",desc:Et("Returns the complement of a color.")},{func:"invert($color)",desc:Et("Returns the inverse of a color.")},{func:"alpha($color)",desc:Et("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:Et("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:Et("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:Et("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:Et("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:Et("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Et("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:Et("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Et("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:Et("Converts a color into the format understood by IE filters.")}],Os.selectorFuncs=[{func:"selector-nest($selectors…)",desc:Et("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:Et("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:Et("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:Et("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:Et("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:Et("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:Et("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:Et("Parses a selector into the format returned by &.")}],Os.builtInFuncs=[{func:"unquote($string)",desc:Et("Removes quotes from a string.")},{func:"quote($string)",desc:Et("Adds quotes to a string.")},{func:"str-length($string)",desc:Et("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:Et("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:Et("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:Et("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:Et("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:Et("Converts a string to lower case.")},{func:"percentage($number)",desc:Et("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:Et("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:Et("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:Et("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:Et("Returns the absolute value of a number.")},{func:"min($numbers)",desc:Et("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:Et("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:Et("Returns a random number.")},{func:"length($list)",desc:Et("Returns the length of a list.")},{func:"nth($list, $n)",desc:Et("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:Et("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:Et("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:Et("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:Et("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:Et("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:Et("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:Et("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:Et("Merges two maps together into a 
2new map.")},{func:"map-remove($map, $keys)",desc:Et("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:Et("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:Et("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:Et("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:Et("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:Et("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:Et("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:Et("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:Et("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:Et("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:Et("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:Et("Returns the type of a value.")},{func:"unit($number)",desc:Et("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:Et("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:Et("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:Et("Dynamically calls a Sass function.")}],Os.scssAtDirectives=[{label:"@extend",documentation:Et("Inherits the styles of another selector."),kind:ur.Keyword},{label:"@at-root",documentation:Et("Causes one or more rules to be emitted at the root of the document."),kind:ur.Keyword},{label:"@debug",documentation:Et("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:ur.Keyword},{label:"@warn",documentation:Et("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:ur.Keyword},{label:"@error",documentation:Et("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:ur.Keyword},{label:"@if",documentation:Et("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@for",documentation:Et("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@each",documentation:Et("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n\t$0\n}",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@while",documentation:Et("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n\t$0\n}",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@mixin",documentation:Et("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@include",documentation:Et("Includes the styles defined by another mixin into the current rule."),kind:ur.Keyword},{label:"@function",documentation:Et("Defines complex operations that can be re-used throughout stylesheets."),kind:ur.Keyword}],Os.scssModuleLoaders=[{label:"@use",documentation:Et("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:Ns,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:pr.Snippet,kind:ur.Keyword},{label:"@forward",documentation:Et("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this 
2stylesheet is loaded with the @use rule."),references:[{name:Ns,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:pr.Snippet,kind:ur.Keyword}],Os.scssModuleBuiltIns=[{label:"sass:math",documentation:Et("Provides functions that operate on numbers."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:Et("Makes it easy to combine, search, or split apart strings."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:Et("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:Et("Lets you access and modify values in lists."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:Et("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:Et("Provides access to Sass’s powerful selector engine."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:Et("Exposes the details of Sass’s inner workings."),references:[{name:Ns,url:"https://sass-lang.com/documentation/modules/meta"}]}];const Bs="/".charCodeAt(0),Us="\n".charCodeAt(0),Ws="\r".charCodeAt(0),Ks="\f".charCodeAt(0),js="`".charCodeAt(0),zs=".".charCodeAt(0);let qs=i.CustomToken;const Hs=qs++;class Qs extends X{scanNext(e){const t=this.escapedJavaScript();return null!==t?this.finishToken(e,t):this.stream.advanceIfChars([zs,zs,zs])?this.finishToken(e,Hs):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([Bs,Bs]))&&(this.stream.advanceWhileChar(e=>{switch(e){case Us:case Ws:case Ks:return!1;default:return!0}}),!0)}escapedJavaScript(){return this.stream.peekChar()===js?(this.stream.advance(1),this.stream.advanceWhileChar(e=>e!==js),this.stream.advanceIfChar(js)?i.EscapedJavaScript:i.BadEscapedJavaScript):null}}class Gs extends ji{constructor(){super(new Qs)}_parseStylesheetStatement(e=!1){return this.peek(i.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(Fe);if(this.consumeToken(),this.accept(i.ParenthesisL)){if(!this.accept(i.Ident))return this.finish(e,At.IdentifierExpected,[i.SemiColon]);do{if(!this.accept(i.Comma))break}while(this.accept(i.Ident));if(!this.accept(i.ParenthesisR))return this.finish(e,At.RightParenthesisExpected,[i.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(i.SemiColon)||this.peek(i.EOF)||e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e)):this.finish(e,At.URIOrStringExpected,[i.SemiColon])}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(re.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(i.SemiColon)?this.finish(e):this.finish(e,At.SemiColonExpected):this.finish(e,At.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const e=this.create(Ge);return e.addChild(this._parseVariable())?this.finish(e):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const t=this.create(ut),r=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(i.Colon))return this.restoreAtMark(r),null;
2if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,At.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(i.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(i.ParenthesisL))return this.restoreAtMark(e),null;{let t=this.create(yt);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(i.Comma)||this.accept(i.SemiColon))&&!this.peek(i.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,At.IdentifierExpected,[],[i.ParenthesisR]);if(!this.accept(i.ParenthesisR))return this.restoreAtMark(e),null}}if(!this.peek(i.CurlyL))return null;const t=this.create(pe);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(i.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){const e=this.create(oe),t=this.mark();return this.accept(i.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(i.BracketR)||this.accept(i.BracketR))?e:(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(i.AtKeyword))return null;const n=this.create(dt),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return(this.accept(i.AtKeyword)||this.accept(i.Ident))&&(t||!this.peek(i.BracketL)||this._addLookupChildren(n))?n:(this.restoreAtMark(s),null)}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(i.EscapedJavaScript)||this.peek(i.BadEscapedJavaScript)){const e=this.createNode(re.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(re.EscapedValue);return this.consumeToken(),this.accept(i.String)||this.accept(i.EscapedJavaScript)?this.finish(e):this.finish(e,At.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(re.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){const e=this.createNode(re.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){const e=this.createNode(re.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(i.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([ie.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(fe);let r=!1;for(e&&(r=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){r=!0;const e=this.mark();if(t.addChild(this._parseGuard())&&this.peek(i.CurlyL))break;this.restoreAtMark(e),t.addChild(this._parseCombinator())}return r?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(re.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(i.Num)||this.accept(i.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(re.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;const r=this.mark(),i=this.create(he);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let n=!1;return n=e?i.isCustomProperty?i.addChild(this._parseIdent()):i.addChild(this._parseRegexp(t)):i.isCustomProperty?this._acceptInterpolatedIdent(i):this._acceptInterpolatedIdent(i,t),n?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(i.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let r=!1;const n=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()},s=t?()=>this.acceptRegexp(t):()=>this.accept(i.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(n)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const t=this.createNode(re.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(i.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(i.CurlyR)?this.finish(t):this.finish(t,At.RightCurlyExpected):this.finish(t,At.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(yt);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(i.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(i.Comma)||this.accept(i.SemiColon))&&!this.peek(i.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,At.IdentifierExpected,[],[i.ParenthesisR]);return this.accept(i.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(i.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(he),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(i.Hash))return null;e=this.create(he),this.consumeToken()}return e.referenceTypes=[ie.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(i.Colon))return null;const e=this.mark(),t=this.create(ft);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),t=this.create(ft);return this.consumeToken(),!this.hasWhitespace()&&this.accept(i.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)}_completeExtends(e){if(!this.accept(i.ParenthesisL))return this.finish(e,At.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,At.SelectorExpected);for(;this.accept(i.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,At.SelectorExpected);return this.accept(i.ParenthesisR)?this.finish(e):this.finish(e,At.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(i.AtKeyword))return null;const e=this.mark(),t=this.create(_t);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(i.ParenthesisL)?this.accept(i.ParenthesisR)?this.finish(t):this.finish(t,At.RightParenthesisExpected):(this.restoreAtMark(e),null)}_tryParseMixinReference(e=!0){const t=this.mark(),r=this.create(_t);let n=this._parseMixinDeclarationIdentifier();for(;n;){this.acceptDelim(">");const e=this._parseMixinDeclarationIdentifier();if(!e)break;r.getNamespaces().addChild(n),n=e}if(!r.setIdentifier(n))return this.restoreAtMark(t),null;let s=!1;if(this.accept(i.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(i.Comma)||this.accept(i.SemiColon))&&!this.peek(i.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,At.ExpressionExpected);if(!this.accept(i.ParenthesisR))return this.finish(r,At.RightParenthesisExpected);n.referenceTypes=[ie.Mixin]}else n.referenceTypes=[ie.Mixin,ie.Rule];return this.peek(i.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),s||this.peek(i.SemiColon)||this.peek(i.CurlyR)||this.peek(i.EOF)?this.finish(r):(this.restoreAtMark(t),null)}_parseMixinArgument(){const e=this.create(we),t=this.mark(),r=this._parseVariable();return r&&(this.accept(i.Colon)?e.setIdentifier(r):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){const e=this.create(ve);if(this.peekKeyword("@rest")){const t=this.create(oe);return this.consumeToken(),this.accept(Hs)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,At.DotExpected,[],[i.Comma,i.ParenthesisR])}if(this.peek(Hs)){const t=this.create(oe);return this.consumeToken(),e.setIdentifier(this.finish(t)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(i.Colon),t=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||t?this.finish(e):null}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(Ct);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,At.ConditionExpected);for(;this.acceptIdent("and")||this.accept(i.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,At.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(kt);return e.isNegated=this.acceptIdent("not"),this.accept(i.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(i.ParenthesisR)?this.finish(e):this.finish(e,At.RightParenthesisExpected)):e.isNegated?this.finish(e,At.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(ke);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(i.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(i.Comma)||this.accept(i.SemiColon))&&!this.peek(i.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,At.ExpressionExpected);return this.accept(i.ParenthesisR)?this.finish(t):this.finish(t,At.RightParenthesisExpected)}
2_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(he);return e.referenceTypes=[ie.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(i.ParenthesisR)){this.restoreAtMark(e);const t=this.create(oe);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}}class Js extends kn{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,r,i){for(const n of e){const e={label:n.name,detail:n.example,documentation:n.description,textEdit:Jt.replace(this.getCompletionRange(t),n.name+"($0)"),insertTextFormat:pr.Snippet,kind:ur.Function};r&&(e.sortText="z"),i.items.push(e)}return i}getTermProposals(e,t,r){let i=Js.builtInProposals;return e&&(i=i.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(i,t,!0,r),super.getTermProposals(e,t,r)}getColorProposals(e,t,r){return this.createFunctionProposals(Js.colorProposals,t,!1,r),super.getColorProposals(e,t,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}}function Xs(e,t){const r=function(e){function t(t){return e.positionAt(t.offset).line}function r(t){return e.positionAt(t.offset+t.len).line}function n(){switch(e.languageId){case"scss":return new $s;case"less":return new Qs;default:return new X}}function s(e,i){const n=t(e),s=r(e);return n!==s?{startLine:n,endLine:s,kind:i}:null}const o=[],a=[],c=n();c.ignoreComment=!1,c.setSource(e.getText());let h=c.scan(),l=null;for(;h.type!==i.EOF;){switch(h.type){case i.CurlyL:case Es:a.push({line:t(h),type:"brace",isStart:!0});break;case i.CurlyR:if(0!==a.length){const e=Ys(a,"brace");if(!e)break;let t=r(h);"brace"===e.type&&(l&&r(l)!==t&&t--,e.line!==t&&o.push({startLine:e.line,endLine:t,kind:void 0}))}break;case i.Comment:{const i=e=>"#region"===e?{line:t(h),type:"comment",isStart:!0}:{line:r(h),type:"comment",isStart:!1},n=t=>{const r=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(r)return i(r[1]);if("scss"===e.languageId||"less"===e.languageId){const e=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(e)return i(e[1])}return null},c=n(h);if(c)if(c.isStart)a.push(c);else{const e=Ys(a,"comment");
2if(!e)break;"comment"===e.type&&e.line!==c.line&&o.push({startLine:e.line,endLine:c.line,kind:"region"})}else{const e=s(h,"comment");e&&o.push(e)}break}}l=h,h=c.scan()}return o}(e);return function(e,t){const r=t&&t.rangeLimit||Number.MAX_VALUE,i=e.sort((e,t)=>{let r=e.startLine-t.startLine;return 0===r&&(r=e.endLine-t.endLine),r}),n=[];let s=-1;return i.forEach(e=>{e.startLine<s&&s<e.endLine||(n.push(e),s=e.endLine)}),n.length<r?n:n.slice(0,r)}(r,t)}function Ys(e,t){if(0===e.length)return null;for(let r=e.length-1;r>=0;r--)if(e[r].type===t&&e[r].isStart)return e.splice(r,1)[0];return null}var Zs;Js.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Et("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Et('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Et("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Et("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Et("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Et("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Et("URL encodes a string")},{name:"e",example:"e(@string);",description:Et("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Et("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Et("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Et("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Et("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Et("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Et("absolute value of a number"),example:"abs(number);"},{name:"acos",description:Et("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Et("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Et("rounds up to an integer")},{name:"cos",description:Et("cosine function"),example:"cos(number);"},{name:"floor",description:Et("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Et("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Et("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Et("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Et("sine function"),example:"sin(number);"},{name:"tan",description:Et("tangent function"),example:"tan(number);"},{name:"atan",description:Et("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Et("returns pi"),example:"pi();"},{name:"pow",description:Et("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Et("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Et("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Et("returns the lowest of one or more values"),example:"max(@x, @y);"}],Js.colorProposals=[{name:"argb",example:"argb(@color);",description:Et("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Et("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Et("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Et("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Et("creates a color")},{name:"hue",example:"hue(@color);",description:Et("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Et("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Et("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Et("returns the `hue` channel of `@color` in the HSV space")}
2,{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Et("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Et("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Et("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Et("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Et("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Et("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Et("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Et("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Et("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Et("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Et("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Et("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Et("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Et("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Et("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Et("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Et("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Et("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],function(){var e=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function r(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function i(e,i){this.__indent_cache=new r(e,i),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)}
2,t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},r.prototype.get_indent_size=function(e,t){var r=this.__base_string_length;return t=t||0,e<0&&(r=0),r+=e*this.__indent_size,r+=t},r.prototype.get_indent_string=function(e,t){var r=this.__base_string;return t=t||0,e<0&&(e=0,r=""),t+=e*this.__indent_size,this.__ensure_cache(t),r+=this.__cache[t]},r.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var e=this.__cache.length,t=0,r="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,r=new Array(t+1).join(this.__indent_string)),e&&(r+=new Array(e+1).join(" ")),this.__cache.push(r)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},i.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join("\n");return"\n"!==e&&(r=r.replace(/[\n]/g,e)),r},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(e,r){for(var i=this.__lines.length-2;i>=0;){var n=this.__lines[i];if(n.is_empty())break;if(0!==n.item(0).indexOf(e)&&n.item(-1)!==r){this.__lines.splice(i+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=i},,,,function(e){function t(e,t){this.raw_options=r(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","
2none","angular","django","erb","handlebars","php","smarty"],["auto"])}function r(e,t){var r,n={};for(r in e=i(e))r!==t&&(n[r]=e[r]);if(t&&e[t])for(r in e[t])n[r]=e[t][r];return n}function i(e){var t,r={};for(t in e){r[t.replace(/-/g,"_")]=e[t]}return r}t.prototype._get_array=function(e,t){var r=this.raw_options[e],i=t||[];return"object"==typeof r?null!==r&&"function"==typeof r.concat&&(i=r.concat()):"string"==typeof r&&(i=r.split(/[^a-zA-Z0-9_\/\-]+/)),i},t.prototype._get_boolean=function(e,t){var r=this.raw_options[e];return void 0===r?!!t:!!r},t.prototype._get_characters=function(e,t){var r=this.raw_options[e],i=t||"";return"string"==typeof r&&(i=r.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},t.prototype._get_number=function(e,t){var r=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(r,10);return isNaN(i)&&(i=t),i},t.prototype._get_selection=function(e,t,r){var i=this._get_selection_list(e,t,r);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},t.prototype._get_selection_list=function(e,t,r){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(r=r||[t[0]],!this._is_valid_selection(r,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,r);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},e.exports.Options=t,e.exports.normalizeOpts=i,e.exports.mergeOpts=r},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function r(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},r.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},r.prototype.__match=function(e,r){e.lastIndex=r;var i=e.exec(this.__input);return!i||t&&e.sticky||i.index!==r&&(i=null),i},r.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},r.prototype.testChar=function(e,t){var r=this.peek(t);return e.lastIndex=0,null!==r&&e.test(r)},r.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},r.prototype.read=function(e,t,r){var i,n="";return e&&(i=this.match(e))&&(n+=i[0]),!t||!i&&e||(n+=this.readUntil(t,r)),n},r.prototype.readUntil=function(e,t){var r,i=this.__position;e.lastIndex=this.__position;var n=e.exec(this.__input);return n?(i=n.index,t&&(i+=n[0].length)):i=this.__input_length,r=this.__input.substring(this.__position,i),this.__position=i,r},r.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},r.prototype.get_regexp=function(e,r){var i=null,n="g";return r&&t&&(n="y"),"string"==typeof e&&""!==e?i=new RegExp(e,n):e&&(i=new RegExp(e.source,n)),i},r.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(e){var t=this.__position,r=this.readUntilAfter(e);return this.__position=t,r},r.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=r},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(e);r;)t[r[1]]=r[2],r=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,r){var i=r(16).Beautifier,n=r(17).Options;e.exports=function(e,t){return new i(e,t).beautify()},e.exports.defaultOptions=function(){return new n}},function(e,t,r){var i=r(17).Options,n=r(2).Output,s=r(8).InputScanner,o=new(0,r(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,h=/\s/,l=/(?:\s|\n)+/g,u=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(e,t){this._source_text=e||"",this._options=new i(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=h.test(this._input.peek()),r=0;h.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===r||r<this._options.max_preserve_newlines)&&(r++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,r=this._input.peek(t);r;){if("{"===r)return!0;
2if("("===r)e+=1;else if(")"===r){if(0===e)return!1;e-=1}else if(";"===r||"}"===r)return!1;t++,r=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&a.test(e||"")&&(t=e.match(a)[0]));var r=(e=e.replace(c,"\n")).match(/^[\t ]*/)[0];this._output=new n(this._options,r),this._input=new s(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,d,f=0,g=!1,m=!1,_=!1,y=!1,b=!1,x=this._ch,C=!1;i=""!==this._input.read(l),d=x,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),x=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var k=this._input.read(u),v=o.get_directives(k);v&&"start"===v.ignore&&(k+=o.readIgnored(this._input)),this.print_string(k),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(i),this.print_string(this._ch);var w=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);w.match(/[ :]$/)&&(w=this.eatString(": ").replace(/\s+$/,""),this.print_string(w),this._output.space_before_token=!0),0===f&&-1!==w.indexOf(":")&&(m=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===f&&-1!==S.indexOf(":")?(m=!0,this.indent()):S in this.NESTED_AT_RULE?(this._nestedLevel+=1,S in this.CONDITIONAL_GROUP_RULE&&(_=!0)):0!==f||m||(y=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)m&&(m=!1,this.outdent()),y=!1,_?(_=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===d?this._output.space_before_token=!1:","!==d&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===d&&this._output.trim(!0),m&&(this.outdent(),m=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var P=0;P<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;P++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[P])){C=!0;break}!g&&!_||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||y||0!==f?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var E='"'===d||"'"===d;this.preserveSingleSpace(E||i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)C=!1,0===f?(m&&(this.outdent(),m=!1),y=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),f++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),f&&(f--,this.outdent()));else{var I=!1;this._input.lookBack("with")&&(I=!0),this.preserveSingleSpace(i||I),this.print_string(this._ch),m&&"$"===d&&this._options.selector_separator_newline?(this._output.add_new_line(),b=!0):(this.eatWhitespace(),f++,this.indent())}else if(")"===this._ch)f&&(f--,this.outdent()),b&&";"===this._input.peek()&&this._options.selector_separator_newline&&(b=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||m&&!b||0!==f||y?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||m||0!==f)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(i),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),h.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var R='"'===d||"'"===d;this.preserveSingleSpace(R||i),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&C&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&h.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=d},function(e,t,r){var i=r(6).Options;function n(e){i.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var n=0;n<r.length;n++)"expand"!==r[n]?this.brace_style="collapse":this.brace_style=r[n]}n.prototype=new i,e.exports.Options=n}],t={};var r=function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}(15);Zs=r}();var eo=Zs;function to(e,t,r){let i=e.getText(),n=!0,s=0,o=!1;const a=r.tabSize||4;if(t){let a=e.offsetAt(t.start),c=a;for(;c>0&&ao(i,c-1);)c--;0===c||oo(i,c-1)?a=c:c<a&&(a=c+1);let h=e.offsetAt(t.end),l=h;for(;l<i.length&&ao(i,l);)l++;if((l===i.length||oo(i,l))&&(h=l),t=Ft.create(e.positionAt(a),e.positionAt(h)
2),o=function(e,t){for(;t>=0;){const r=e.charCodeAt(t);if(r===io)return!0;if(r===no)return!1;t--}return!1}(i,a),n=h===i.length,i=i.substring(a,h),0!==a){const i=e.offsetAt(Mt.create(t.start.line,0));s=function(e,t,r){let i=t,n=0;const s=r.tabSize||4;for(;i<e.length;){const t=e.charAt(i);if(" "===t)n++;else{if("\t"!==t)break;n+=s}i++}return Math.floor(n/s)}(e.getText(),i,r)}o&&(i=`{\n${ro(i)}`)}else t=Ft.create(Mt.create(0,0),e.positionAt(i.length));const c={indent_size:a,indent_char:r.insertSpaces?" ":"\t",end_with_newline:n&&so(r,"insertFinalNewline",!1),selector_separator_newline:so(r,"newlineBetweenSelectors",!0),newline_between_rules:so(r,"newlineBetweenRules",!0),space_around_selector_separator:so(r,"spaceAroundSelectorSeparator",!1),brace_style:so(r,"braceStyle","collapse"),indent_empty_lines:so(r,"indentEmptyLines",!1),max_preserve_newlines:so(r,"maxPreserveNewLines",void 0),preserve_newlines:so(r,"preserveNewLines",!0),wrap_line_length:so(r,"wrapLineLength",void 0),eol:"\n"};let h=eo(i,c);if(o&&(h=ro(h.substring(2))),s>0){const e=r.insertSpaces?te(" ",a*s):te("\t",s);h=h.split("\n").join("\n"+e),0===t.start.character&&(h=e+h)}return[{range:t,newText:h}]}function ro(e){return e.replace(/^\s+/,"")}const io="{".charCodeAt(0),no="}".charCodeAt(0);function so(e,t,r){if(e&&e.hasOwnProperty(t)){const r=e[t];if(null!==r)return r}return r}function oo(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function ao(e,t){return-1!==" \t".indexOf(e.charAt(t))}var co=r(33245);class ho{constructor(e){this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.addData(e)}provideProperties(){return this._properties}provideAtDirectives(){return this._atDirectives}providePseudoClasses(){return this._pseudoClasses}providePseudoElements(){return this._pseudoElements}addData(e){if(Array.isArray(e.properties))for(const t of e.properties)lo(t)&&this._properties.push(t);if(Array.isArray(e.atDirectives))for(const t of e.atDirectives)uo(t)&&this._atDirectives.push(t);if(Array.isArray(e.pseudoClasses))for(const t of e.pseudoClasses)po(t)&&this._pseudoClasses.push(t);if(Array.isArray(e.pseudoElements))for(const t of e.pseudoElements)fo(t)&&this._pseudoElements.push(t)}}function lo(e){return"string"==typeof e.name}function uo(e){return"string"==typeof e.name}function po(e){return"string"==typeof e.name}function fo(e){return"string"==typeof e.name}class go{constructor(e){this.dataProviders=[],this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.setDataProviders(!1!==e?.useDefaultDataProvider,e?.customDataProviders||[])}setDataProviders(e,t){this.dataProviders=[],e&&this.dataProviders.push(new ho(co.U)),this.dataProviders.push(...t),this.collectData()}collectData(){this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this.dataProviders.forEach(e=>{e.provideProperties().forEach(e=>{this._propertySet[e.name]||(this._propertySet[e.name]=e)}),e.provideAtDirectives().forEach(e=>{this._atDirectiveSet[e.name]||(this._atDirectiveSet[e.name]=e)}),e.providePseudoClasses().forEach(e=>{this._pseudoClassSet[e.name]||(this._pseudoClassSet[e.name]=e)}),e.providePseudoElements().forEach(e=>{this._pseudoElementSet[e.name]||(this._pseudoElementSet[e.name]=e)})}),this._properties=Wi(this._propertySet),this._atDirectives=Wi(this._atDirectiveSet),this._pseudoClasses=Wi(this._pseudoClassSet),this._pseudoElements=Wi(this._pseudoElementSet)}getProperty(e){return this._propertySet[e]}getAtDirective(e){return this._atDirectiveSet[e]}getPseudoClass(e){return this._pseudoClassSet[e]}getPseudoElement(e){return this._pseudoElementSet[e]}getProperties(){return this._properties}getAtDirectives(){return this._atDirectives}getPseudoClasses(){return this._pseudoClasses}getPseudoElements(){return this._pseudoElements}isKnownProperty(e){return e.toLowerCase()in this._propertySet}isStandardProperty(e){return this.isKnownProperty(e)&&(!this._propertySet[e.toLowerCase()].status||"standard"===this._propertySet[e.toLowerCase()].status)}}function mo(e,t,r){return t.map(function(t){const i=function(t){const i=e.offsetAt(t);let n=r.findChildAtOffset(i,!0);if(!n)return[];const s=[];for(;n;)n.parent&&n.offset===n.parent.offset&&n.end===n.parent.end||(n.type===re.Declarations&&i>n.offset&&i<n.end&&s.push([n.offset+1,n.end-1]),s.push([n.offset,n.end])),n=n.parent;return s}(t);let n;for(let r=i.length-1;r>=0;r--)n=Nr.create(Ft.create(e.positionAt(i[r][0]),e.positionAt(i[r][1])),n);return n||(n=Nr.create(Ft.create(t,t))),n})}class _o extends Un{constructor(e){super(e,!0)}isRawStringDocumentLinkNode(e){return super.isRawStringDocumentLinkNode(e)||e.type===re.Use||e.type===re.Forward}async mapReference(e,t){if(this.fileSystemProvider&&e&&t){const t=function(e){if(e.endsWith(".css"))return[e];if(e.endsWith("/"))return[e+"index.scss",e+"_index.scss"];
2const t=cn.parse(e.replace(/\.scss$/,"")),r=hn.basename(t),i=hn.dirname(t);if(r.startsWith("_"))return[hn.joinPath(i,r+".scss").toString(!0)];return[hn.joinPath(i,r+".scss").toString(!0),hn.joinPath(i,"_"+r+".scss").toString(!0),e+"/index.scss",e+"/_index.scss",hn.joinPath(i,r+".css").toString(!0)]}(e);for(const e of t)if(await this.fileExists(e))return e}return e}async resolveReference(e,t,r,i=!1){if(!Y(e,"sass:"))return super.resolveReference(e,t,r,i)}}function yo(e){return new ho(e)}function bo(e,t,r,i,n,s,o){return{configure:e=>{s.configure(e),t.configure(e?.completion),r.configure(e?.hover),i.configure(e?.importAliases)},setDataProviders:o.setDataProviders.bind(o),doValidation:s.doValidation.bind(s),parseStylesheet:e.parseStylesheet.bind(e),doComplete:t.doComplete.bind(t),doComplete2:t.doComplete2.bind(t),setCompletionParticipants:t.setCompletionParticipants.bind(t),doHover:r.doHover.bind(r),format:to,findDefinition:i.findDefinition.bind(i),findReferences:i.findReferences.bind(i),findDocumentHighlights:i.findDocumentHighlights.bind(i),findDocumentLinks:i.findDocumentLinks.bind(i),findDocumentLinks2:i.findDocumentLinks2.bind(i),findDocumentSymbols:i.findSymbolInformations.bind(i),findDocumentSymbols2:i.findDocumentSymbols.bind(i),doCodeActions:n.doCodeActions.bind(n),doCodeActions2:n.doCodeActions2.bind(n),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),prepareRename:i.prepareRename.bind(i),doRename:i.doRename.bind(i),getFoldingRanges:Xs,getSelectionRanges:mo}}const xo={};class Co{constructor(e,t){this._ctx=e,this._languageSettings=t.options,this._languageId=t.languageId;const r=t.options.data,i=r?.useDefaultDataProvider,n=[];if(r?.dataProviders)for(const o in r.dataProviders)n.push(yo(r.dataProviders[o]));const s={customDataProviders:n,useDefaultDataProvider:i};switch(this._languageId){case"css":this._languageService=function(e=xo){const t=new go(e);return bo(new ji,new kn(null,e,t),new On(e&&e.clientCapabilities,t),new Un(e&&e.fileSystemProvider,!1),new Zn(t),new ps(t),t)}(s);break;case"less":this._languageService=function(e=xo){const t=new go(e);return bo(new Gs,new Js(e,t),new On(e&&e.clientCapabilities,t),new Un(e&&e.fileSystemProvider,!0),new Zn(t),new ps(t),t)}(s);break;case"scss":this._languageService=function(e=xo){const t=new go(e);return bo(new Fs,new Os(e,t),new On(e&&e.clientCapabilities,t),new _o(e&&e.fileSystemProvider),new Zn(t),new ps(t),t)}(s);break;default:throw new Error("Invalid language id: "+this._languageId)}this._languageService.configure(this._languageSettings)}async doValidation(e){const t=this._getTextDocument(e);if(t){const e=this._languageService.parseStylesheet(t),r=this._languageService.doValidation(t,e);return Promise.resolve(r)}return Promise.resolve([])}async doComplete(e,t){const r=this._getTextDocument(e);if(!r)return null;const i=this._languageService.parseStylesheet(r),n=this._languageService.doComplete(r,t,i);return Promise.resolve(n)}async doHover(e,t){const r=this._getTextDocument(e);if(!r)return null;const i=this._languageService.parseStylesheet(r),n=this._languageService.doHover(r,t,i);return Promise.resolve(n)}async findDefinition(e,t){const r=this._getTextDocument(e);if(!r)return null;const i=this._languageService.parseStylesheet(r),n=this._languageService.findDefinition(r,t,i);return Promise.resolve(n)}async findReferences(e,t){const r=this._getTextDocument(e);if(!r)return[];const i=this._languageService.parseStylesheet(r),n=this._languageService.findReferences(r,t,i);return Promise.resolve(n)}async findDocumentHighlights(e,t){const r=this._getTextDocument(e);if(!r)return[];const i=this._languageService.parseStylesheet(r),n=this._languageService.findDocumentHighlights(r,t,i);return Promise.resolve(n)}async findDocumentSymbols(e){const t=this._getTextDocument(e);if(!t)return[];const r=this._languageService.parseStylesheet(t),i=this._languageService.findDocumentSymbols(t,r);return Promise.resolve(i)}async doCodeActions(e,t,r){const i=this._getTextDocument(e);if(!i)return[];const n=this._languageService.parseStylesheet(i),s=this._languageService.doCodeActions(i,t,r,n);return Promise.resolve(s)}async findDocumentColors(e){const t=this._getTextDocument(e);
2if(!t)return[];const r=this._languageService.parseStylesheet(t),i=this._languageService.findDocumentColors(t,r);return Promise.resolve(i)}async getColorPresentations(e,t,r){const i=this._getTextDocument(e);if(!i)return[];const n=this._languageService.parseStylesheet(i),s=this._languageService.getColorPresentations(i,n,t,r);return Promise.resolve(s)}async getFoldingRanges(e,t){const r=this._getTextDocument(e);if(!r)return[];const i=this._languageService.getFoldingRanges(r,t);return Promise.resolve(i)}async getSelectionRanges(e,t){const r=this._getTextDocument(e);if(!r)return[];const i=this._languageService.parseStylesheet(r),n=this._languageService.getSelectionRanges(r,t,i);return Promise.resolve(n)}async doRename(e,t,r){const i=this._getTextDocument(e);if(!i)return null;const n=this._languageService.parseStylesheet(i),s=this._languageService.doRename(i,t,r,n);return Promise.resolve(s)}async format(e,t,r){const i=this._getTextDocument(e);if(!i)return[];const n={...this._languageSettings.format,...r},s=this._languageService.format(i,t,n);return Promise.resolve(s)}_getTextDocument(e){const t=this._ctx.getMirrorModels();for(const r of t)if(r.uri.toString()===e)return ii.create(e,this._languageId,r.version,r.getValue());return null}}self.onmessage=()=>{(0,n.n)((e,t)=>new Co(e,t))}},62266:function(e,t,r){"use strict";const i=r(27762),n=r(36287),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return h(e,t,r)}function h(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let i=a(r);const n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return c.from(i,t,r);const n=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?a(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,c.prototype),i}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return i?-1:q(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function _(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function y(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}
vendor: 5,400 bytes, line 2
2else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,i,n){let s,o=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,r/=2}function h(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){let i=-1;for(s=r;s<a;s++)if(h(e,s)===h(t,-1===i?0:s-i)){if(-1===i&&(i=s),s-i+1===c)return i*o}else-1!==i&&(s-=s-i),i=-1}else for(r+c>a&&(r=a-c),s=r;s>=0;s--){let r=!0;for(let i=0;i<c;i++)if(h(e,s+i)!==h(t,i)){r=!1;break}if(r)return s}return-1}function x(e,t,r,i){r=Number(r)||0;const n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;const s=t.length;let o;for(i>s/2&&(i=s/2),o=0;o<i;++o){const i=parseInt(t.substr(2*o,2),16);if(J(i))return o;e[r+o]=i}return o}function C(e,t,r,i){return Q(q(t,e.length-r),e,r,i)}function k(e,t,r,i){return Q(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function v(e,t,r,i){return Q(H(t),e,r,i)}function w(e,t,r,i){return Q(function(e,t){let r,i,n;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),i=r>>8,n=r%256,s.push(n),s.push(i);return s}(t,e.length-r),e,r,i)}function S(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const i=[];let n=t;for(;n<r;){const t=e[n];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(n+o<=r){let r,i,a,c;switch(o){case 1:t<128&&(s=t);break;case 2:r=e[n+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[n+1],i=e[n+2],128==(192&r)&&128==(192&i)&&(c=(15&t)<<12|(63&r)<<6|63&i,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[n+1],i=e[n+2],a=e[n+3],128==(192&r)&&128==(192&i)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),n+=o}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=E));return r}(i)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return h(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return u(e)},c.allocUnsafeSlow=function(e){return u(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,s=Math.min(r,i);n<s;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const i=c.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(G(t,Uint8Array))n+t.length>i.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,n)}n+=t.length}return i},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)_(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):m.apply(this,arguments)}
vendor: 11,944 bytes, line 2
2,c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,i,n){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(n>>>=0)-(i>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(s,o),h=this.slice(i,n),l=e.slice(t,r);for(let c=0;c<a;++c)if(h[c]!==l[c]){s=h[c],o=l[c];break}return s<o?-1:o<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},c.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function I(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function R(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function A(e,t,r){const i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let s=t;s<r;++s)n+=X[e[s]];return n}function T(e,t,r){const i=e.slice(t,r);let n="";for(let s=0;s<i.length-1;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,r,i,n,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function L(e,t,r,i,n){W(t,i,n,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function M(e,t,r,i,n){W(t,i,n,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function F(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,i,s){return t=+t,r>>>=0,s||F(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function O(e,t,r,i,s){return t=+t,r>>>=0,s||F(e,0,r,8),n.write(e,t,r,i,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,c.prototype),i},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let i=this[e],n=1,s=0;for(;++s<t&&(n*=256);)i+=this[e+s]*n;return i},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Y(function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||j(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(n)<<BigInt(32))}),c.prototype.readBigUInt64BE=Y(function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||j(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)}),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let i=this[e],n=1,s=0;for(;++s<t&&(n*=256);)i+=this[e+s]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let i=t,n=1,s=this[e+--i];for(;i>0&&(n*=256);)s+=this[e+--i]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Y(function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||j(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=Y(function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||j(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){$(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,s=0;for(this[t]=255&e;++s<r&&(n*=256);)this[t+s]=e/n&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){$(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,s=1;for(this[t+n]=255&e;--n>=0&&(s*=256);)this[t+n]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Y(function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Y(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);$(this,e,t,r,i-1,-i)}let n=0,s=1,o=0;for(this[t]=255&e;++n<r&&(s*=256);)e<0&&0===o&&0!==this[t+n-1]&&(o=1),this[t+n]=(e/s|0)-o&255;return t+r},c.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);$(this,e,t,r,i-1,-i)}let n=r-1,s=1,o=0;for(this[t+n]=255&e;--n>=0&&(s*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/s|0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Y(function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Y(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,i){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);const n=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),n},c.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;
vendor: 2,112 bytes, line 2
2else{const s=c.isBuffer(e)?e:c.from(e,i),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=s[n%o]}return this};const V={};function B(e,t,r){V[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",r=e.length;const i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,i,n,s){if(e>r||e<t){const i="bigint"==typeof t?"n":"";let n;throw n=s>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(s+1)}${i}`:`>= -(2${i} ** ${8*(s+1)-1}${i}) and < 2 ** ${8*(s+1)-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new V.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||j(t,e.length-(r+1))}(i,n,s)}function K(e,t){if("number"!=typeof e)throw new V.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,r){if(Math.floor(e)!==e)throw K(e,r),new V.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=U(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=U(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);const z=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const i=e.length;let n=null;const s=[];for(let o=0;o<i;++o){if(r=e.charCodeAt(o),r>
255295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},72290:function(e){var t,r,i=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(e){t=n}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var a,c=[],h=!1,l=-1;function u(){h&&a&&(h=!1,a.length?c=a.concat(c):l=-1,c.length&&p())}function p(){if(!h){var e=o(u);h=!0;for(var t=c.length;t;){for(a=c,c=[];++l<t;)a&&a[l].run();l=-1,t=c.length}a=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||h||o(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={exports:{}};return r[e](s,s.exports,n),s.exports}n.m=r,n.x=function(){var e=n.O(void 0,[7522,6229],function(){return n(53808)});return e=n.O(e)},e=[],n.O=function(t,r,i,s){if(!r){var o=1/0;for(l=0;l<e.length;l++){r=e[l][0],i=e[l][1],s=e[l][2];for(var a=!0,c=0;c<r.length;c++)(!1&s||o>=s)&&Object.keys(n.O).every(function(e){return n.O[e](r[c])})?r.splice(c--,1):(a=!1,s<o&&(o=s));if(a){e.splice(l--,1);var h=i();void 0!==h&&(t=h)}}return t}s=s||0;for(var l=e.length;l>0&&e[l-1][2]>s;l--)e[l]=e[l-1];e[l]=[r,i,s]},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce(function(t,r){return n.f[r](e,t),t},[]))},n.u=function(e){return{6229:"c3efd597d4b6f314d33441cbf6bc7cada6bb6f50",7522:"db20cdce"}[e]+"-"+{6229:"0bcf333476efb68860ab",7522:"9a26fe2dcad458ee46fc"}[e]+".js"},n.miniCssF=function(e){},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",function(){var e={6181:1};n.f.i=function(t,r){e[t]||importScripts(n.p+n.u(t))};var t=self.webpackChunk_freecodecamp_client=self.webpackChunk_freecodecamp_client||[],r=t.push.bind(t);t.push=function(t){var i=t[0],s=t[1],o=t[2];for(var a in s)n.o(s,a)&&(n.m[a]=s[a]);for(o&&o(n);i.length;)e[i.pop()]=1;r(t)}}(),t=n.x,n.x=function(){return Promise.all([n.e(7522),n.e(6229)]).then(t)};n.x()}();
3//# sourceMappingURL=6181-8e9192fb765d8983c613.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.