import{e as fe,R as ji,l as q,a as Oe,U as Wi}from"./index-DFpXF1Cy.js";var dn=2*60*1e3,mn=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(this._worker){var e=Date.now()-this._lastUsedTime;e>dn&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=fe.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;ithis.source.length)return!1;for(var t=0;t=Ye&&t<=et?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(i){return i>=Ye&&i<=et||e===0&&i===wr}),!0):!1},r.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case Pe:case Ve:case _e:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Pe&&this.stream.advanceIfChar(_e)&&e.push(` `),!0}return!1},r.prototype._escape=function(e,t){var i=this.stream.peekChar();if(i===Rt){this.stream.advance(1),i=this.stream.peekChar();for(var n=0;n<6&&(i>=Ye&&i<=et||i>=Pt&&i<=gn||i>=St&&i<=vn);)this.stream.advance(1),i=this.stream.peekChar(),n++;if(n>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-n),16);s&&e.push(String.fromCharCode(s))}catch{}return i===At||i===It?this.stream.advance(1):this._newline([]),!0}if(i!==Pe&&i!==Ve&&i!==_e)return this.stream.advance(1),e.push(String.fromCharCode(i)),!0;if(t)return this._newline(e)}return!1},r.prototype._stringChar=function(e,t){var i=this.stream.peekChar();return i!==0&&i!==e&&i!==Rt&&i!==Pe&&i!==Ve&&i!==_e?(this.stream.advance(1),t.push(String.fromCharCode(i)),!0):!1},r.prototype._string=function(e){if(this.stream.peekChar()===kr||this.stream.peekChar()===xr){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),u.String):u.BadString}return null},r.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==Rt&&t!==kr&&t!==xr&&t!==Ui&&t!==Ti&&t!==At&&t!==It&&t!==_e&&t!==Ve&&t!==Pe?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},r.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===At||t===It||t===_e||t===Ve||t===Pe});return e>0},r.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},r.prototype.ident=function(e){var t=this.stream.pos(),i=this._minus(e);if(i){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},r.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===br||t>=Pt&&t<=vr||t>=St&&t<=yr||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._minus=function(e){var t=this.stream.peekChar();return t===we?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._identChar=function(e){var t=this.stream.peekChar();return t===br||t===we||t>=Pt&&t<=vr||t>=St&&t<=yr||t>=Ye&&t<=et||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r}();function Q(r,e){if(r.length0?r.lastIndexOf(e)===t:t===0?r===e:!1}function Pr(r,e){return e===void 0&&(e=!0),r?r.length<140?r:r.slice(0,140)+(e?"…":""):""}function On(r,e){var t=e.exec(r);return t&&t[0].length?r.substr(0,r.length-t[0].length):r}var S=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),f;(function(r){r[r.Undefined=0]="Undefined",r[r.Identifier=1]="Identifier",r[r.Stylesheet=2]="Stylesheet",r[r.Ruleset=3]="Ruleset",r[r.Selector=4]="Selector",r[r.SimpleSelector=5]="SimpleSelector",r[r.SelectorInterpolation=6]="SelectorInterpolation",r[r.SelectorCombinator=7]="SelectorCombinator",r[r.SelectorCombinatorParent=8]="SelectorCombinatorParent",r[r.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",r[r.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",r[r.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",r[r.Page=12]="Page",r[r.PageBoxMarginBox=13]="PageBoxMarginBox",r[r.ClassSelector=14]="ClassSelector",r[r.IdentifierSelector=15]="IdentifierSelector",r[r.ElementNameSelector=16]="ElementNameSelector",r[r.PseudoSelector=17]="PseudoSelector",r[r.AttributeSelector=18]="AttributeSelector",r[r.Declaration=19]="Declaration",r[r.Declarations=20]="Declarations",r[r.Property=21]="Property",r[r.Expression=22]="Expression",r[r.BinaryExpression=23]="BinaryExpression",r[r.Term=24]="Term",r[r.Operator=25]="Operator",r[r.Value=26]="Value",r[r.StringLiteral=27]="StringLiteral",r[r.URILiteral=28]="URILiteral",r[r.EscapedValue=29]="EscapedValue",r[r.Function=30]="Function",r[r.NumericValue=31]="NumericValue",r[r.HexColorValue=32]="HexColorValue",r[r.RatioValue=33]="RatioValue",r[r.MixinDeclaration=34]="MixinDeclaration",r[r.MixinReference=35]="MixinReference",r[r.VariableName=36]="VariableName",r[r.VariableDeclaration=37]="VariableDeclaration",r[r.Prio=38]="Prio",r[r.Interpolation=39]="Interpolation",r[r.NestedProperties=40]="NestedProperties",r[r.ExtendsReference=41]="ExtendsReference",r[r.SelectorPlaceholder=42]="SelectorPlaceholder",r[r.Debug=43]="Debug",r[r.If=44]="If",r[r.Else=45]="Else",r[r.For=46]="For",r[r.Each=47]="Each",r[r.While=48]="While",r[r.MixinContentReference=49]="MixinContentReference",r[r.MixinContentDeclaration=50]="MixinContentDeclaration",r[r.Media=51]="Media",r[r.Keyframe=52]="Keyframe",r[r.FontFace=53]="FontFace",r[r.Import=54]="Import",r[r.Namespace=55]="Namespace",r[r.Invocation=56]="Invocation",r[r.FunctionDeclaration=57]="FunctionDeclaration",r[r.ReturnStatement=58]="ReturnStatement",r[r.MediaQuery=59]="MediaQuery",r[r.MediaCondition=60]="MediaCondition",r[r.MediaFeature=61]="MediaFeature",r[r.FunctionParameter=62]="FunctionParameter",r[r.FunctionArgument=63]="FunctionArgument",r[r.KeyframeSelector=64]="KeyframeSelector",r[r.ViewPort=65]="ViewPort",r[r.Document=66]="Document",r[r.AtApplyRule=67]="AtApplyRule",r[r.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",r[r.CustomPropertySet=69]="CustomPropertySet",r[r.ListEntry=70]="ListEntry",r[r.Supports=71]="Supports",r[r.SupportsCondition=72]="SupportsCondition",r[r.NamespacePrefix=73]="NamespacePrefix",r[r.GridLine=74]="GridLine",r[r.Plugin=75]="Plugin",r[r.UnknownAtRule=76]="UnknownAtRule",r[r.Use=77]="Use",r[r.ModuleConfiguration=78]="ModuleConfiguration",r[r.Forward=79]="Forward",r[r.ForwardVisibility=80]="ForwardVisibility",r[r.Module=81]="Module"})(f||(f={}));var D;(function(r){r[r.Mixin=0]="Mixin",r[r.Rule=1]="Rule",r[r.Variable=2]="Variable",r[r.Function=3]="Function",r[r.Keyframe=4]="Keyframe",r[r.Unknown=5]="Unknown",r[r.Module=6]="Module",r[r.Forward=7]="Forward",r[r.ForwardVisibility=8]="ForwardVisibility"})(D||(D={}));function Wt(r,e){var t=null;return!r||er.end?null:(r.accept(function(i){return i.offset===-1&&i.length===-1?!0:i.offset<=e&&i.end>=e?(t?i.length<=t.length&&(t=i):t=i,!0):!1}),t)}function Ln(r,e){for(var t=Wt(r,e),i=[];t;)i.unshift(t),t=t.parent;return i}function Vn(r){var e=r.findParent(f.Declaration),t=e&&e.getValue();return t&&t.encloses(r)?e:null}var E=function(){function r(e,t,i){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,i&&(this.nodeType=i)}return Object.defineProperty(r.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this.nodeType||f.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),r.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},r.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},r.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},r.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},r.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},r.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,i=this.children;t=0&&e.parent.children.splice(i,1)}e.parent=this;var n=this.children;return n||(n=this.children=[]),t!==-1?n.splice(t,0,e):n.push(e),e},r.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},r.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},r.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},r.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},r.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},r.prototype.setNode=function(e,t,i){return i===void 0&&(i=-1),t?(t.attachTo(this,i),this[e]=t,!0):!1},r.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},r.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=t-this.offset)},r.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},r.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},r.prototype.getChild=function(e){return this.children&&e=0;i--)if(t=this.children[i],t.offset<=e)return t}return null},r.prototype.findChildAtOffset=function(e,t){var i=this.findFirstChildBeforeOffset(e);return i&&i.end>=e?t&&i.findChildAtOffset(e,!0)||i:null},r.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},r.prototype.getParent=function(){for(var e=this.parent;e instanceof X;)e=e.parent;return e},r.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},r.prototype.findAParent=function(){for(var e=[],t=0;t/g,">")}function bs(r,e){if(!r.description||r.description==="")return"";if(typeof r.description!="string")return r.description.value;var t="";{r.status&&(t+=Zi(r.status)),t+=r.description;var i=Yi(r.browsers);i&&(t+=` (`+i+")"),"syntax"in r&&(t+=` Syntax: `+r.syntax)}return r.references&&r.references.length>0&&(t.length>0&&(t+=` `),t+=r.references.map(function(n){return n.name+": "+n.url}).join(" | ")),t}function Cs(r,e){if(!r.description||r.description==="")return"";var t="";{r.status&&(t+=Zi(r.status));var i=typeof r.description=="string"?r.description:r.description.value;t+=Dt(i);var n=Yi(r.browsers);n&&(t+=` (`+Dt(n)+")"),"syntax"in r&&r.syntax&&(t+=` Syntax: `+Dt(r.syntax))}return r.references&&r.references.length>0&&(t.length>0&&(t+=` `),t+=r.references.map(function(s){return"["+s.name+"]("+s.url+")"}).join(" | ")),t}function Yi(r){return r===void 0&&(r=[]),r.length===0?null:r.map(function(e){var t="",i=e.match(/([A-Z]+)(\d+)?/),n=i[1],s=i[2];return n in Rr&&(t+=Rr[n]),s&&(t+=" "+s),t}).join(", ")}var tt=ge(),xs=[{func:"rgb($red, $green, $blue)",desc:tt("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:tt("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:tt("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:tt("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],ft={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",salmon:"#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"},Ar={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."};function Se(r,e){var t=r.getText(),i=t.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(i){i[2]&&(e=100);var n=parseFloat(i[1])/e;if(n>=0&&n<=1)return n}throw new Error}function ks(r){var e=r.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);if(t)return parseFloat(e)%360;throw new Error}function ws(r){var e=r.getName();return e?/^(rgb|rgba|hsl|hsla)$/gi.test(e):!1}var Ir=48,_s=57,Ps=65,rt=97,Ss=102;function K(r){return r=rt&&r<=Ss?r-rt+10:0)}function Dr(r){if(r[0]!=="#")return null;switch(r.length){case 4:return{red:K(r.charCodeAt(1))*17/255,green:K(r.charCodeAt(2))*17/255,blue:K(r.charCodeAt(3))*17/255,alpha:1};case 5:return{red:K(r.charCodeAt(1))*17/255,green:K(r.charCodeAt(2))*17/255,blue:K(r.charCodeAt(3))*17/255,alpha:K(r.charCodeAt(4))*17/255};case 7:return{red:(K(r.charCodeAt(1))*16+K(r.charCodeAt(2)))/255,green:(K(r.charCodeAt(3))*16+K(r.charCodeAt(4)))/255,blue:(K(r.charCodeAt(5))*16+K(r.charCodeAt(6)))/255,alpha:1};case 9:return{red:(K(r.charCodeAt(1))*16+K(r.charCodeAt(2)))/255,green:(K(r.charCodeAt(3))*16+K(r.charCodeAt(4)))/255,blue:(K(r.charCodeAt(5))*16+K(r.charCodeAt(6)))/255,alpha:(K(r.charCodeAt(7))*16+K(r.charCodeAt(8)))/255}}return null}function Es(r,e,t,i){if(i===void 0&&(i=1),r=r/60,e===0)return{red:t,green:t,blue:t,alpha:i};var n=function(o,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=t<=.5?t*(e+1):t+e-t*e,a=t*2-s;return{red:n(a,s,r+2),green:n(a,s,r),blue:n(a,s,r-2),alpha:i}}function Rs(r){var e=r.red,t=r.green,i=r.blue,n=r.alpha,s=Math.max(e,t,i),a=Math.min(e,t,i),o=0,l=0,c=(a+s)/2,h=s-a;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:o=(t-i)/h+(t4)return null;try{var s=n.length===4?Se(n[3],1):1;if(i==="rgb"||i==="rgba")return{red:Se(n[0],255),green:Se(n[1],255),blue:Se(n[2],255),alpha:s};if(i==="hsl"||i==="hsla"){var a=ks(n[0]),o=Se(n[1],100),l=Se(n[2],100);return Es(a,o,l,s)}}catch{return null}}else if(r.type===f.Identifier){if(r.parent&&r.parent.type!==f.Term)return null;var c=r.parent;if(c&&c.parent&&c.parent.type===f.BinaryExpression){var h=c.parent;if(h.parent&&h.parent.type===f.ListEntry&&h.parent.key===h)return null}var p=r.getText().toLowerCase();if(p==="none")return null;var y=ft[p];if(y)return Dr(y)}return null}var Fr={bottom:"Computes to ‘100%’ for the vertical position if one or two 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."},Mr={"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."},Or={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."},Is=["medium","thick","thin"],Lr={"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."},Vr={"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."},$r={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."},Br={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},jr={"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 in 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."},Wr={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."},Ur={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Ds={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Fs=["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"],Ms=["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"],Os=["@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 ae(r){return typeof r<"u"}var Tr=function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;ie.offset?s-e.offset:0}return e},r.prototype.markError=function(e,t,i,n){this.token!==this.lastErrorToken&&(e.addIssue(new gs(e,t,Me.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(i||n)&&this.resync(i,n)},r.prototype.parseStylesheet=function(e){var t=e.version,i=e.getText(),n=function(s,a){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return i.substr(s,a)};return this.internalParse(i,this._parseStylesheet,n)},r.prototype.internalParse=function(e,t,i){this.scanner.setSource(e),this.token=this.scanner.scan();var n=t.bind(this)();return n&&(i?n.textProvider=i:n.textProvider=function(s,a){return e.substr(s,a)}),n},r.prototype._parseStylesheet=function(){for(var e=this.create($n);e.addChild(this._parseStylesheetStart()););var t=!1;do{var i=!1;do{i=!1;var n=this._parseStylesheetStatement();for(n&&(e.addChild(n),i=!0,t=!1,!this.peek(u.EOF)&&this._needsSemicolonAfter(n)&&!this.accept(u.SemiColon)&&this.markError(e,d.SemiColonExpected));this.accept(u.SemiColon)||this.accept(u.CDO)||this.accept(u.CDC);)i=!0,t=!1}while(i);if(this.peek(u.EOF))break;t||(this.peek(u.AtKeyword)?this.markError(e,d.UnknownAtRule):this.markError(e,d.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(u.EOF));return this.finish(e)},r.prototype._parseStylesheetStart=function(){return this._parseCharset()},r.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(u.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},r.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},r.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(u.Comma)&&this._parseSelector(e););if(this.accept(u.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},r.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var t=this.create(ut),i=t.getSelectors();if(!i.addChild(this._parseSelector(e)))return null;for(;this.accept(u.Comma);)if(!i.addChild(this._parseSelector(e)))return this.finish(t,d.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},r.prototype._parseRuleSetDeclaration=function(){return this.peek(u.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},r.prototype._needsSemicolonAfter=function(e){switch(e.type){case f.Keyframe:case f.ViewPort:case f.Media:case f.Ruleset:case f.Namespace:case f.If:case f.For:case f.Each:case f.While:case f.MixinDeclaration:case f.FunctionDeclaration:case f.MixinContentDeclaration:return!1;case f.ExtendsReference:case f.MixinContentReference:case f.ReturnStatement:case f.MediaQuery:case f.Debug:case f.Import:case f.AtApplyRule:case f.CustomPropertyDeclaration:return!0;case f.VariableDeclaration:return e.needsSemicolon;case f.MixinReference:return!e.getContent();case f.Declaration:return!e.getNestedProperties()}return!1},r.prototype._parseDeclarations=function(e){var t=this.create(ir);if(!this.accept(u.CurlyL))return null;for(var i=e();t.addChild(i)&&!this.peek(u.CurlyR);){if(this._needsSemicolonAfter(i)&&!this.accept(u.SemiColon))return this.finish(t,d.SemiColonExpected,[u.SemiColon,u.CurlyR]);for(i&&this.prevToken&&this.prevToken.type===u.SemiColon&&(i.semicolonPosition=this.prevToken.offset);this.accept(u.SemiColon););i=e()}return this.accept(u.CurlyR)?this.finish(t):this.finish(t,d.RightCurlyExpected,[u.CurlyR,u.SemiColon])},r.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,d.LeftCurlyExpected,[u.CurlyR,u.SemiColon])},r.prototype._parseSelector=function(e){var t=this.create(bt),i=!1;for(e&&(i=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)i=!0,t.addChild(this._parseCombinator());return i?this.finish(t):null},r.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var i=this.create(De);return i.setProperty(this._parseProperty())?this.accept(u.Colon)?(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseExpr())?(i.addChild(this._parsePrio()),this.peek(u.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)):this.finish(i,d.PropertyValueExpected)):this.finish(i,d.ColonExpected,[u.Colon],e||[u.SemiColon]):null},r.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(u.Ident,/^--/))return null;var t=this.create(jn);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(u.Colon))return this.finish(t,d.ColonExpected,[u.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);var i=this.mark();if(this.peek(u.CurlyL)){var n=this.create(Bn),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(n.setDeclarations(s)&&!s.isErroneous(!0)&&(n.addChild(this._parsePrio()),this.peek(u.SemiColon)))return this.finish(n),t.setPropertySet(n),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(i)}var a=this._parseExpr();return a&&!a.isErroneous(!0)&&(this._parsePrio(),this.peekOne.apply(this,Tr(Tr([],e||[],!1),[u.SemiColon,u.EOF],!1)))?(t.setValue(a),this.peek(u.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(i),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),ae(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,d.PropertyValueExpected):this.finish(t))},r.prototype._parseCustomPropertyValue=function(e){var t=this;e===void 0&&(e=[u.CurlyR]);var i=this.create(E),n=function(){return a===0&&o===0&&l===0},s=function(){return e.indexOf(t.token.type)!==-1},a=0,o=0,l=0;e:for(;;){switch(this.token.type){case u.SemiColon:if(n())break e;break;case u.Exclamation:if(n())break e;break;case u.CurlyL:a++;break;case u.CurlyR:if(a--,a<0){if(s()&&o===0&&l===0)break e;return this.finish(i,d.LeftCurlyExpected)}break;case u.ParenthesisL:o++;break;case u.ParenthesisR:if(o--,o<0){if(s()&&l===0&&a===0)break e;return this.finish(i,d.LeftParenthesisExpected)}break;case u.BracketL:l++;break;case u.BracketR:if(l--,l<0)return this.finish(i,d.LeftSquareBracketExpected);break;case u.BadString:break e;case u.EOF:var c=d.RightCurlyExpected;return l>0?c=d.RightSquareBracketExpected:o>0&&(c=d.RightParenthesisExpected),this.finish(i,c)}this.consumeToken()}return this.finish(i)},r.prototype._tryToParseDeclaration=function(e){var t=this.mark();return this._parseProperty()&&this.accept(u.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)},r.prototype._parseProperty=function(){var e=this.create(sr),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},r.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},r.prototype._parseCharset=function(){if(!this.peek(u.Charset))return null;var e=this.create(E);return this.consumeToken(),this.accept(u.String)?this.accept(u.SemiColon)?this.finish(e):this.finish(e,d.SemiColonExpected):this.finish(e,d.IdentifierExpected)},r.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(ar);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,d.URIOrStringExpected):(!this.peek(u.SemiColon)&&!this.peek(u.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},r.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Xn);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,d.URIExpected,[u.SemiColon]):this.accept(u.SemiColon)?this.finish(e):this.finish(e,d.SemiColonExpected)},r.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(qi);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Nn);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseKeyframe=function(){if(!this.peekRegExp(u.AtKeyword,this.keyframeRegex))return null;var e=this.create(Hi),t=this.create(E);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,d.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,d.IdentifierExpected,[u.CurlyR])},r.prototype._parseKeyframeIdent=function(){return this._parseIdent([D.Keyframe])},r.prototype._parseKeyframeSelector=function(){var e=this.create(Sr);if(!e.addChild(this._parseIdent())&&!this.accept(u.Percentage))return null;for(;this.accept(u.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(u.Percentage))return this.finish(e,d.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._tryParseKeyframeSelector=function(){var e=this.create(Sr),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(u.Percentage))return null;for(;this.accept(u.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(u.Percentage))return this.restoreAtMark(t),null;return this.peek(u.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},r.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(Ut);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},r.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseSupportsCondition=function(){var e=this.create(We);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(u.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},r.prototype._parseSupportsConditionInParens=function(){var e=this.create(We);if(this.accept(u.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([u.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,d.ConditionExpected):this.accept(u.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,d.RightParenthesisExpected,[u.ParenthesisR],[]);if(this.peek(u.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(u.ParenthesisL)){for(var i=1;this.token.type!==u.EOF&&i!==0;)this.token.type===u.ParenthesisL?i++:this.token.type===u.ParenthesisR&&i--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,d.LeftParenthesisExpected,[],[u.ParenthesisL])},r.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(Gi);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,d.MediaQueryExpected)},r.prototype._parseMediaQueryList=function(){var e=this.create(Qi);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,d.MediaQueryExpected);for(;this.accept(u.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,d.MediaQueryExpected);return this.finish(e)},r.prototype._parseMediaQuery=function(){var e=this.create(Ji),t=this.mark();if(this.acceptIdent("not"),this.peek(u.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)},r.prototype._parseRatio=function(){var e=this.mark(),t=this.create(as);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,d.NumberExpected):(this.restoreAtMark(e),null):null},r.prototype._parseMediaCondition=function(){var e=this.create(Yn);this.acceptIdent("not");for(var t=!0;t;){if(!this.accept(u.ParenthesisL))return this.finish(e,d.LeftParenthesisExpected,[],[u.CurlyL]);if(this.peek(u.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(u.ParenthesisR))return this.finish(e,d.RightParenthesisExpected,[],[u.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)},r.prototype._parseMediaFeature=function(){var e=this,t=[u.ParenthesisR],i=this.create(es),n=function(){return e.acceptDelim("<")||e.acceptDelim(">")?(e.hasWhitespace()||e.acceptDelim("="),!0):!!e.acceptDelim("=")};if(i.addChild(this._parseMediaFeatureName())){if(this.accept(u.Colon)){if(!i.addChild(this._parseMediaFeatureValue()))return this.finish(i,d.TermExpected,[],t)}else if(n()){if(!i.addChild(this._parseMediaFeatureValue()))return this.finish(i,d.TermExpected,[],t);if(n()&&!i.addChild(this._parseMediaFeatureValue()))return this.finish(i,d.TermExpected,[],t)}}else if(i.addChild(this._parseMediaFeatureValue())){if(!n())return this.finish(i,d.OperatorExpected,[],t);if(!i.addChild(this._parseMediaFeatureName()))return this.finish(i,d.IdentifierExpected,[],t);if(n()&&!i.addChild(this._parseMediaFeatureValue()))return this.finish(i,d.TermExpected,[],t)}else return this.finish(i,d.IdentifierExpected,[],t);return this.finish(i)},r.prototype._parseMediaFeatureName=function(){return this._parseIdent()},r.prototype._parseMediaFeatureValue=function(){return this._parseRatio()||this._parseTermExpression()},r.prototype._parseMedium=function(){var e=this.create(E);return e.addChild(this._parseIdent())?this.finish(e):null},r.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},r.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(ts);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(u.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,d.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},r.prototype._parsePageMarginBox=function(){if(!this.peek(u.AtKeyword))return null;var e=this.create(rs);return this.acceptOneKeyword(Os)||this.markError(e,d.UnknownAtRule,[],[u.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parsePageSelector=function(){if(!this.peek(u.Ident)&&!this.peek(u.Colon))return null;var e=this.create(E);return e.addChild(this._parseIdent()),this.accept(u.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,d.IdentifierExpected):this.finish(e)},r.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Zn);return this.consumeToken(),this.resync([],[u.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},r.prototype._parseUnknownAtRule=function(){if(!this.peek(u.AtKeyword))return null;var e=this.create(fs);e.addChild(this._parseUnknownAtRuleName());var t=function(){return n===0&&s===0&&a===0},i=0,n=0,s=0,a=0;e:for(;;){switch(this.token.type){case u.SemiColon:if(t())break e;break;case u.EOF:return n>0?this.finish(e,d.RightCurlyExpected):a>0?this.finish(e,d.RightSquareBracketExpected):s>0?this.finish(e,d.RightParenthesisExpected):this.finish(e);case u.CurlyL:i++,n++;break;case u.CurlyR:if(n--,i>0&&n===0){if(this.consumeToken(),a>0)return this.finish(e,d.RightSquareBracketExpected);if(s>0)return this.finish(e,d.RightParenthesisExpected);break e}if(n<0){if(s===0&&a===0)break e;return this.finish(e,d.LeftCurlyExpected)}break;case u.ParenthesisL:s++;break;case u.ParenthesisR:if(s--,s<0)return this.finish(e,d.LeftParenthesisExpected);break;case u.BracketL:a++;break;case u.BracketR:if(a--,a<0)return this.finish(e,d.LeftSquareBracketExpected);break}this.consumeToken()}return e},r.prototype._parseUnknownAtRuleName=function(){var e=this.create(E);return this.accept(u.AtKeyword)?this.finish(e):e},r.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(u.Dashmatch)||this.peek(u.Includes)||this.peek(u.SubstringOperator)||this.peek(u.PrefixOperator)||this.peek(u.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(f.Operator);return this.consumeToken(),this.finish(e)}else return null},r.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(E);return this.consumeToken(),this.finish(e)},r.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(E);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=f.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=f.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(E);return this.consumeToken(),e.type=f.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(E);return this.consumeToken(),e.type=f.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(E);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=f.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},r.prototype._parseSimpleSelector=function(){var e=this.create(zi),t=0;for(e.addChild(this._parseElementName())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},r.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},r.prototype._parseSelectorIdent=function(){return this._parseIdent()},r.prototype._parseHash=function(){if(!this.peek(u.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(f.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,d.IdentifierExpected)}else this.consumeToken();return this.finish(e)},r.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(f.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,d.IdentifierExpected):this.finish(e)},r.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(f.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)},r.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(f.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},r.prototype._parseAttrib=function(){if(!this.peek(u.BracketL))return null;var e=this.create(ss);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(u.BracketR)?this.finish(e):this.finish(e,d.RightSquareBracketExpected)):this.finish(e,d.IdentifierExpected)},r.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(u.ParenthesisL)){var i=function(){var n=e.create(E);if(!n.addChild(e._parseSelector(!1)))return null;for(;e.accept(u.Comma)&&n.addChild(e._parseSelector(!1)););return e.peek(u.ParenthesisR)?e.finish(n):null};if(t.addChild(this.try(i)||this._parseBinaryExpr()),!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected)}return this.finish(t)}return null},r.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(u.Colon))return null;var e=this.mark(),t=this.createNode(f.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(u.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,d.IdentifierExpected):this.finish(t))},r.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},r.prototype._parsePrio=function(){if(!this.peek(u.Exclamation))return null;var e=this.createNode(f.Prio);return this.accept(u.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},r.prototype._parseExpr=function(e){e===void 0&&(e=!1);var t=this.create(Xi);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(u.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},r.prototype._parseNamedLine=function(){if(!this.peek(u.BracketL))return null;var e=this.createNode(f.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(u.BracketR)?this.finish(e):this.finish(e,d.RightSquareBracketExpected)},r.prototype._parseBinaryExpr=function(e,t){var i=this.create(is);if(!i.setLeft(e||this._parseTerm()))return null;if(!i.setOperator(t||this._parseOperator()))return this.finish(i);if(!i.setRight(this._parseTerm()))return this.finish(i,d.TermExpected);i=this.finish(i);var n=this._parseOperator();return n&&(i=this._parseBinaryExpr(i,n)),this.finish(i)},r.prototype._parseTerm=function(){var e=this.create(ns);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},r.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},r.prototype._parseOperation=function(){if(!this.peek(u.ParenthesisL))return null;var e=this.create(E);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(u.ParenthesisR)?this.finish(e):this.finish(e,d.RightParenthesisExpected)},r.prototype._parseNumeric=function(){if(this.peek(u.Num)||this.peek(u.Percentage)||this.peek(u.Resolution)||this.peek(u.Length)||this.peek(u.EMS)||this.peek(u.EXS)||this.peek(u.Angle)||this.peek(u.Time)||this.peek(u.Dimension)||this.peek(u.Freq)){var e=this.create(ur);return this.consumeToken(),this.finish(e)}return null},r.prototype._parseStringLiteral=function(){if(!this.peek(u.String)&&!this.peek(u.BadString))return null;var e=this.createNode(f.StringLiteral);return this.consumeToken(),this.finish(e)},r.prototype._parseURILiteral=function(){if(!this.peekRegExp(u.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(f.URILiteral);return this.accept(u.Ident),this.hasWhitespace()||!this.peek(u.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(u.ParenthesisR)?this.finish(t):this.finish(t,d.RightParenthesisExpected))},r.prototype._parseURLArgument=function(){var e=this.create(E);return!this.accept(u.String)&&!this.accept(u.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},r.prototype._parseIdent=function(e){if(!this.peek(u.Ident))return null;var t=this.create(ie);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(u.Ident,/^--/),this.consumeToken(),this.finish(t)},r.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Je);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(u.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,d.ExpressionExpected);return this.accept(u.ParenthesisR)?this.finish(t):this.finish(t,d.RightParenthesisExpected)},r.prototype._parseFunctionIdentifier=function(){if(!this.peek(u.Ident))return null;var e=this.create(ie);if(e.referenceTypes=[D.Function],this.acceptIdent("progid")){if(this.accept(u.Colon))for(;this.accept(u.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},r.prototype._parseFunctionArgument=function(){var e=this.create(Fe);return e.setValue(this._parseExpr(!0))?this.finish(e):null},r.prototype._parseHexColor=function(){if(this.peekRegExp(u.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(or);return this.consumeToken(),this.finish(e)}else return null},r}();function Ls(r,e){var t=0,i=r.length;if(i===0)return 0;for(;te+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},r.prototype.findInScope=function(e,t){t===void 0&&(t=0);var i=e+t,n=Ls(this.children,function(a){return a.offset>i});if(n===0)return this;var s=this.children[n-1];return s.offset<=e&&s.offset+s.length>=e+t?s.findInScope(e,t):this},r.prototype.addSymbol=function(e){this.symbols.push(e)},r.prototype.getSymbol=function(e,t){for(var i=0;i0&&(o.arguments=s),o}r.create=e;function t(i){var n=i;return m.defined(n)&&m.string(n.title)&&m.string(n.command)}r.is=t})(qe||(qe={}));var I;(function(r){function e(s,a){return{range:s,newText:a}}r.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var a=s;return m.objectLiteral(a)&&m.string(a.newText)&&W.is(a.range)}r.is=n})(I||(I={}));var Ie;(function(r){function e(i,n,s){var a={label:i};return n!==void 0&&(a.needsConfirmation=n),s!==void 0&&(a.description=s),a}r.create=e;function t(i){var n=i;return n!==void 0&&m.objectLiteral(n)&&m.string(n.label)&&(m.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(m.string(n.description)||n.description===void 0)}r.is=t})(Ie||(Ie={}));var Y;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(Y||(Y={}));var me;(function(r){function e(s,a,o){return{range:s,newText:a,annotationId:o}}r.replace=e;function t(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}r.insert=t;function i(s,a){return{range:s,newText:"",annotationId:a}}r.del=i;function n(s){var a=s;return I.is(a)&&(Ie.is(a.annotationId)||Y.is(a.annotationId))}r.is=n})(me||(me={}));var mt;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return m.defined(n)&>.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(mt||(mt={}));var Ne;(function(r){function e(i,n,s){var a={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&m.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||m.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||m.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Y.is(n.annotationId))}r.is=t})(Ne||(Ne={}));var He;(function(r){function e(i,n,s,a){var o={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&m.string(n.oldUri)&&m.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||m.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||m.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Y.is(n.annotationId))}r.is=t})(He||(He={}));var Ge;(function(r){function e(i,n,s){var a={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&m.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||m.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||m.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Y.is(n.annotationId))}r.is=t})(Ge||(Ge={}));var Nt;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return m.string(n.kind)?Ne.is(n)||He.is(n)||Ge.is(n):mt.is(n)}))}r.is=e})(Nt||(Nt={}));var nt=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=I.insert(e,t):Y.is(i)?(s=i,n=me.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=me.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=I.replace(e,t):Y.is(i)?(s=i,n=me.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=me.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=I.del(e):Y.is(t)?(n=t,i=me.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=me.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),Jr=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(Y.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Jr(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(mt.is(i)){var n=new nt(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new nt(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(gt.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new nt(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new nt(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Jr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ie.is(t)||Y.is(t)?n=t:i=t;var s,a;if(n===void 0?s=Ne.create(e,i):(a=Y.is(n)?n:this._changeAnnotations.manage(n),s=Ne.create(e,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Ie.is(i)||Y.is(i)?s=i:n=i;var a,o;if(s===void 0?a=He.create(e,t,n):(o=Y.is(s)?s:this._changeAnnotations.manage(s),a=He.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ie.is(t)||Y.is(t)?n=t:i=t;var s,a;if(n===void 0?s=Ge.create(e,i):(a=Y.is(n)?n:this._changeAnnotations.manage(n),s=Ge.create(e,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},r})();var Xr;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return m.defined(n)&&m.string(n.uri)}r.is=t})(Xr||(Xr={}));var Zr;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return m.defined(n)&&m.string(n.uri)&&m.integer(n.version)}r.is=t})(Zr||(Zr={}));var gt;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return m.defined(n)&&m.string(n.uri)&&(n.version===null||m.integer(n.version))}r.is=t})(gt||(gt={}));var Yr;(function(r){function e(i,n,s,a){return{uri:i,languageId:n,version:s,text:a}}r.create=e;function t(i){var n=i;return m.defined(n)&&m.string(n.uri)&&m.string(n.languageId)&&m.integer(n.version)&&m.string(n.text)}r.is=t})(Yr||(Yr={}));var ue;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(ue||(ue={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(ue||(ue={}));var Ht;(function(r){function e(t){var i=t;return m.objectLiteral(t)&&ue.is(i.kind)&&m.string(i.value)}r.is=e})(Ht||(Ht={}));var _;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(_||(_={}));var te;(function(r){r.PlainText=1,r.Snippet=2})(te||(te={}));var Ce;(function(r){r.Deprecated=1})(Ce||(Ce={}));var ei;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&m.string(n.newText)&&W.is(n.insert)&&W.is(n.replace)}r.is=t})(ei||(ei={}));var ti;(function(r){r.asIs=1,r.adjustIndentation=2})(ti||(ti={}));var ri;(function(r){function e(t){return{label:t}}r.create=e})(ri||(ri={}));var ii;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(ii||(ii={}));var vt;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return m.string(n)||m.objectLiteral(n)&&m.string(n.language)&&m.string(n.value)}r.is=t})(vt||(vt={}));var ni;(function(r){function e(t){var i=t;return!!i&&m.objectLiteral(i)&&(Ht.is(i.contents)||vt.is(i.contents)||m.typedArray(i.contents,vt.is))&&(t.range===void 0||W.is(t.range))}r.is=e})(ni||(ni={}));var si;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(si||(si={}));var ai;(function(r){function e(t,i){for(var n=[],s=2;s=0;h--){var p=l[h],y=s.offsetAt(p.range.start),g=s.offsetAt(p.range.end);if(g<=c)o=o.substring(0,y)+p.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");c=y}return o}r.applyEdits=i;function n(s,a){if(s.length<=1)return s;var o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);n(l,a),n(c,a);for(var h=0,p=0,y=0;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return re.create(0,e);for(;ie?n=s:i=s+1}var a=i-1;return re.create(a,e-t[a])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1"u"}r.undefined=i;function n(g){return g===!0||g===!1}r.boolean=n;function s(g){return e.call(g)==="[object String]"}r.string=s;function a(g){return e.call(g)==="[object Number]"}r.number=a;function o(g,b,R){return e.call(g)==="[object Number]"&&b<=g&&g<=R}r.numberRange=o;function l(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}r.integer=l;function c(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}r.uinteger=c;function h(g){return e.call(g)==="[object Function]"}r.func=h;function p(g){return g!==null&&typeof g=="object"}r.objectLiteral=p;function y(g,b){return Array.isArray(g)&&g.every(b)}r.typedArray=y})(m||(m={}));var Ws=function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;ie?n=s:i=s+1}var a=i-1;return{line:a,character:e-t[a]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1l&&c.push(a.substring(l,g)),y.newText.length&&c.push(y.newText),l=n.offsetAt(y.range.end)}return c.push(a.substr(l)),c.join("")}r.applyEdits=i})(Ci||(Ci={}));function Gt(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);Gt(i,e),Gt(n,e);for(var s=0,a=0,o=0;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function Us(r){var e=rn(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var ki;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ue.Markdown,ue.PlainText]}},hover:{contentFormat:[ue.Markdown,ue.PlainText]}}}})(ki||(ki={}));var Qe;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(Qe||(Qe={}));var nn;nn=(()=>{var r={470:i=>{function n(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,l){for(var c,h="",p=0,y=-1,g=0,b=0;b<=o.length;++b){if(b2){var R=h.lastIndexOf("/");if(R!==h.length-1){R===-1?(h="",p=0):p=(h=h.slice(0,R)).length-1-h.lastIndexOf("/"),y=b,g=0;continue}}else if(h.length===2||h.length===1){h="",p=0,y=b,g=0;continue}}l&&(h.length>0?h+="/..":h="..",p=2)}else h.length>0?h+="/"+o.slice(y+1,b):h=o.slice(y+1,b),p=b-y-1;y=b,g=0}else c===46&&g!==-1?++g:g=-1}return h}var a={resolve:function(){for(var o,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var p;h>=0?p=arguments[h]:(o===void 0&&(o=process.cwd()),p=o),n(p),p.length!==0&&(l=p+"/"+l,c=p.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(o){if(n(o),o.length===0)return".";var l=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return(o=s(o,!l)).length!==0||l||(o="."),o.length>0&&c&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return n(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":a.normalize(o)},relative:function(o,l){if(n(o),n(l),o===l||(o=a.resolve(o))===(l=a.resolve(l)))return"";for(var c=1;cb){if(l.charCodeAt(y+P)===47)return l.slice(y+P+1);if(P===0)return l.slice(y+P)}else p>b&&(o.charCodeAt(c+P)===47?R=P:P===0&&(R=0));break}var M=o.charCodeAt(c+P);if(M!==l.charCodeAt(y+P))break;M===47&&(R=P)}var B="";for(P=c+R+1;P<=h;++P)P!==h&&o.charCodeAt(P)!==47||(B.length===0?B+="..":B+="/..");return B.length>0?B+l.slice(y+R):(y+=R,l.charCodeAt(y)===47&&++y,l.slice(y))},_makeLong:function(o){return o},dirname:function(o){if(n(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,h=-1,p=!0,y=o.length-1;y>=1;--y)if((l=o.charCodeAt(y))===47){if(!p){h=y;break}}else p=!1;return h===-1?c?"/":".":c&&h===1?"//":o.slice(0,h)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(o);var c,h=0,p=-1,y=!0;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var g=l.length-1,b=-1;for(c=o.length-1;c>=0;--c){var R=o.charCodeAt(c);if(R===47){if(!y){h=c+1;break}}else b===-1&&(y=!1,b=c+1),g>=0&&(R===l.charCodeAt(g)?--g==-1&&(p=c):(g=-1,p=b))}return h===p?p=b:p===-1&&(p=o.length),o.slice(h,p)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!y){h=c+1;break}}else p===-1&&(y=!1,p=c+1);return p===-1?"":o.slice(h,p)},extname:function(o){n(o);for(var l=-1,c=0,h=-1,p=!0,y=0,g=o.length-1;g>=0;--g){var b=o.charCodeAt(g);if(b!==47)h===-1&&(p=!1,h=g+1),b===46?l===-1?l=g:y!==1&&(y=1):l!==-1&&(y=-1);else if(!p){c=g+1;break}}return l===-1||h===-1||y===0||y===1&&l===h-1&&l===c+1?"":o.slice(l,h)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(l,c){var h=c.dir||c.root,p=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+p:h+"/"+p:p}(0,o)},parse:function(o){n(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c,h=o.charCodeAt(0),p=h===47;p?(l.root="/",c=1):c=0;for(var y=-1,g=0,b=-1,R=!0,P=o.length-1,M=0;P>=c;--P)if((h=o.charCodeAt(P))!==47)b===-1&&(R=!1,b=P+1),h===46?y===-1?y=P:M!==1&&(M=1):y!==-1&&(M=-1);else if(!R){g=P+1;break}return y===-1||b===-1||M===0||M===1&&y===b-1&&y===g+1?b!==-1&&(l.base=l.name=g===0&&p?o.slice(1,b):o.slice(g,b)):(g===0&&p?(l.name=o.slice(1,y),l.base=o.slice(1,b)):(l.name=o.slice(g,y),l.base=o.slice(g,b)),l.ext=o.slice(y,b)),g>0?l.dir=o.slice(0,g-1):p&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,i.exports=a},447:(i,n,s)=>{var a;if(s.r(n),s.d(n,{URI:()=>M,Utils:()=>_t}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var l,c,h=(l=function(k,v){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var $ in w)Object.prototype.hasOwnProperty.call(w,$)&&(x[$]=w[$])})(k,v)},function(k,v){function x(){this.constructor=k}l(k,v),k.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}),p=/^\w[\w\d+.-]*$/,y=/^\//,g=/^\/\//,b="",R="/",P=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,M=function(){function k(v,x,w,$,F,V){V===void 0&&(V=!1),typeof v=="object"?(this.scheme=v.scheme||b,this.authority=v.authority||b,this.path=v.path||b,this.query=v.query||b,this.fragment=v.fragment||b):(this.scheme=function(T,ee){return T||ee?T:"file"}(v,V),this.authority=x||b,this.path=function(T,ee){switch(T){case"https":case"http":case"file":ee?ee[0]!==R&&(ee=R+ee):ee=R}return ee}(this.scheme,w||b),this.query=$||b,this.fragment=F||b,function(T,ee){if(!T.scheme&&ee)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+T.authority+'", path: "'+T.path+'", query: "'+T.query+'", fragment: "'+T.fragment+'"}');if(T.scheme&&!p.test(T.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(T.path){if(T.authority){if(!y.test(T.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(g.test(T.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,V))}return k.isUri=function(v){return v instanceof k||!!v&&typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="function"&&typeof v.with=="function"&&typeof v.toString=="function"},Object.defineProperty(k.prototype,"fsPath",{get:function(){return hr(this)},enumerable:!1,configurable:!0}),k.prototype.with=function(v){if(!v)return this;var x=v.scheme,w=v.authority,$=v.path,F=v.query,V=v.fragment;return x===void 0?x=this.scheme:x===null&&(x=b),w===void 0?w=this.authority:w===null&&(w=b),$===void 0?$=this.path:$===null&&($=b),F===void 0?F=this.query:F===null&&(F=b),V===void 0?V=this.fragment:V===null&&(V=b),x===this.scheme&&w===this.authority&&$===this.path&&F===this.query&&V===this.fragment?this:new H(x,w,$,F,V)},k.parse=function(v,x){x===void 0&&(x=!1);var w=P.exec(v);return w?new H(w[2]||b,Xe(w[4]||b),Xe(w[5]||b),Xe(w[7]||b),Xe(w[9]||b),x):new H(b,b,b,b,b)},k.file=function(v){var x=b;if(a&&(v=v.replace(/\\/g,R)),v[0]===R&&v[1]===R){var w=v.indexOf(R,2);w===-1?(x=v.substring(2),v=R):(x=v.substring(2,w),v=v.substring(w)||R)}return new H("file",x,v,b,b)},k.from=function(v){return new H(v.scheme,v.authority,v.path,v.query,v.fragment)},k.prototype.toString=function(v){return v===void 0&&(v=!1),wt(this,v)},k.prototype.toJSON=function(){return this},k.revive=function(v){if(v){if(v instanceof k)return v;var x=new H(v);return x._formatted=v.external,x._fsPath=v._sep===B?v.fsPath:null,x}return v},k}(),B=a?1:void 0,H=function(k){function v(){var x=k!==null&&k.apply(this,arguments)||this;return x._formatted=null,x._fsPath=null,x}return h(v,k),Object.defineProperty(v.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=hr(this)),this._fsPath},enumerable:!1,configurable:!0}),v.prototype.toString=function(x){return x===void 0&&(x=!1),x?wt(this,!0):(this._formatted||(this._formatted=wt(this,!1)),this._formatted)},v.prototype.toJSON=function(){var x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=B),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x},v}(M),Z=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function J(k,v){for(var x=void 0,w=-1,$=0;$=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||v&&F===47)w!==-1&&(x+=encodeURIComponent(k.substring(w,$)),w=-1),x!==void 0&&(x+=k.charAt($));else{x===void 0&&(x=k.substr(0,$));var V=Z[F];V!==void 0?(w!==-1&&(x+=encodeURIComponent(k.substring(w,$)),w=-1),x+=V):w===-1&&(w=$)}}return w!==-1&&(x+=encodeURIComponent(k.substring(w))),x!==void 0?x:k}function kt(k){for(var v=void 0,x=0;x1&&k.scheme==="file"?"//"+k.authority+k.path:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?k.path[1].toLowerCase()+k.path.substr(2):k.path,a&&(x=x.replace(/\//g,"\\")),x}function wt(k,v){var x=v?kt:J,w="",$=k.scheme,F=k.authority,V=k.path,T=k.query,ee=k.fragment;if($&&(w+=$,w+=":"),(F||$==="file")&&(w+=R,w+=R),F){var le=F.indexOf("@");if(le!==-1){var Ze=F.substr(0,le);F=F.substr(le+1),(le=Ze.indexOf(":"))===-1?w+=x(Ze,!1):(w+=x(Ze.substr(0,le),!1),w+=":",w+=x(Ze.substr(le+1),!1)),w+="@"}(le=(F=F.toLowerCase()).indexOf(":"))===-1?w+=x(F,!1):(w+=x(F.substr(0,le),!1),w+=F.substr(le))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58)(ke=V.charCodeAt(1))>=65&&ke<=90&&(V="/"+String.fromCharCode(ke+32)+":"+V.substr(3));else if(V.length>=2&&V.charCodeAt(1)===58){var ke;(ke=V.charCodeAt(0))>=65&&ke<=90&&(V=String.fromCharCode(ke+32)+":"+V.substr(2))}w+=x(V,!0)}return T&&(w+="?",w+=x(T,!1)),ee&&(w+="#",w+=v?ee:J(ee,!1)),w}function fr(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+fr(k.substr(3)):k}}var pr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Xe(k){return k.match(pr)?k.replace(pr,function(v){return fr(v)}):k}var _t,dr=s(470),mr=function(){for(var k=0,v=0,x=arguments.length;v{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();const{URI:lr,Utils:Qt}=nn;var Ts=function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=0;a--){var o=this.nodePath[a];if(o instanceof sr)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof Xi)o.parent instanceof Tt?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof zi){var l=o.findAParent(f.ExtendsReference,f.Ruleset);if(l)if(l.type===f.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Fe)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof ir)this.getCompletionsForDeclarations(o,s);else if(o instanceof xt)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof ut)this.getCompletionsForRuleSet(o,s);else if(o instanceof Tt)this.getCompletionsForInterpolation(o,s);else if(o instanceof lt)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof ht)this.getCompletionsForMixinReference(o,s);else if(o instanceof Je)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof Ut)this.getCompletionsForSupports(o,s);else if(o instanceof We)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof Te)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===f.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===f.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},r.prototype.isImportPathParent=function(e){return e===f.Import},r.prototype.finalize=function(e){return e},r.prototype.findInNodePath=function(){for(var e=[],t=0;t=0;i--){var n=this.nodePath[i];if(e.indexOf(n.type)!==-1)return n}return null},r.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},r.prototype.getPropertyProposals=function(e,t){var i=this,n=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,a=this.cssDataManager.getProperties();return a.forEach(function(o){var l,c,h=!1;e?(l=i.getCompletionRange(e.getProperty()),c=o.name,ae(e.colonPosition)||(c+=": ",h=!0)):(l=i.getCompletionRange(null),c=o.name+": ",h=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&i.offset>=i.textDocument.offsetAt(l.end)&&(c+="$0;");var p={label:o.name,documentation:$e(o,i.doesSupportMarkdown()),tags:Be(o)?[Ce.Deprecated]:[],textEdit:I.replace(l,c),insertTextFormat:te.Snippet,kind:_.Property};o.restrictions||(h=!1),n&&h&&(p.command=Pi);var y=typeof o.relevance=="number"?Math.min(Math.max(o.relevance,0),99):50,g=(255-y).toString(16),b=Q(o.name,"-")?oe.VendorPrefixed:oe.Normal;p.sortText=b+"_"+g,t.items.push(p)}),this.completionParticipants.forEach(function(o){o.onCssProperty&&o.onCssProperty({propertyName:i.currentWord,range:i.defaultReplaceRange})}),t},Object.defineProperty(r.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),r.prototype.getCompletionsForDeclarationValue=function(e,t){for(var i=this,n=e.getFullPropertyName(),s=this.cssDataManager.getProperty(n),a=e.getValue()||null;a&&a.hasChildren();)a=a.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(b){b.onCssPropertyValue&&b.onCssPropertyValue({propertyName:n,propertyValue:i.currentWord,range:i.getCompletionRange(a)})}),s){if(s.restrictions)for(var o=0,l=s.restrictions;o=e.offset+2&&this.getVariableProposals(null,t),t},r.prototype.getVariableProposals=function(e,t){for(var i=this.getSymbolContext().findSymbolsAtOffset(this.offset,D.Variable),n=0,s=i;n0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(n=s[0],i.isIncomplete=n.length===this.currentWord.length)}else this.currentWord.length===0&&(i.isIncomplete=!0);if(t&&t.parent&&t.parent.type===f.Term&&(t=t.getParent()),e.restrictions)for(var a=0,o=e.restrictions;a=i.end;if(n)return this.getCompletionForTopLevel(t);var s=!i||this.offset<=i.offset;return s?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},r.prototype.getCompletionsForSelector=function(e,t,i){var n=this,s=this.findInNodePath(f.PseudoSelector,f.IdentifierSelector,f.ClassSelector,f.ElementNameSelector);!s&&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=W.create(re.create(this.position.line,this.position.character-this.currentWord.length),this.position));var a=this.cssDataManager.getPseudoClasses();a.forEach(function(P){var M=Ee(P.name),B={label:P.name,textEdit:I.replace(n.getCompletionRange(s),M),documentation:$e(P,n.doesSupportMarkdown()),tags:Be(P)?[Ce.Deprecated]:[],kind:_.Function,insertTextFormat:P.name!==M?he:void 0};Q(P.name,":-")&&(B.sortText=oe.VendorPrefixed),i.items.push(B)});var o=this.cssDataManager.getPseudoElements();if(o.forEach(function(P){var M=Ee(P.name),B={label:P.name,textEdit:I.replace(n.getCompletionRange(s),M),documentation:$e(P,n.doesSupportMarkdown()),tags:Be(P)?[Ce.Deprecated]:[],kind:_.Function,insertTextFormat:P.name!==M?he:void 0};Q(P.name,"::-")&&(B.sortText=oe.VendorPrefixed),i.items.push(B)}),!t){for(var l=0,c=Fs;l0){var M=b.substr(P.offset,P.length);return M.charAt(0)==="."&&!g[M]&&(g[M]=!0,i.items.push({label:M,textEdit:I.replace(n.getCompletionRange(s),M),kind:_.Keyword})),!1}return!0}),e&&e.isNested()){var R=e.getSelectors().findFirstChildBeforeOffset(this.offset);R&&e.getSelectors().getChildren().indexOf(R)===0&&this.getPropertyProposals(null,i)}return i},r.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var i=e.findFirstChildBeforeOffset(this.offset);if(!i)return this.getCompletionsForDeclarationProperty(null,t);if(i instanceof nr){var n=i;if(!ae(n.colonPosition)||this.offset<=n.colonPosition)return this.getCompletionsForDeclarationProperty(n,t);if(ae(n.semicolonPosition)&&n.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),t),t},r.prototype.getCompletionsForExpression=function(e,t){var i=e.getParent();if(i instanceof Fe)return this.getCompletionsForFunctionArgument(i,i.getParent(),t),t;var n=e.findParent(f.Declaration);if(!n)return this.getTermProposals(void 0,null,t),t;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof ur||s instanceof ie?this.getCompletionsForDeclarationValue(n,t):t:this.getCompletionsForDeclarationValue(n,t)},r.prototype.getCompletionsForFunctionArgument=function(e,t,i){var n=t.getIdentifier();return n&&n.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(i),i},r.prototype.getCompletionsForFunctionDeclaration=function(e,t){var i=e.getDeclarations();return i&&this.offset>i.offset&&this.offsete.lParent&&(!ae(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},r.prototype.getCompletionsForSupports=function(e,t){var i=e.getDeclarations(),n=!i||this.offset<=i.offset;if(n){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof We?this.getCompletionsForSupportsCondition(s,t):t}return this.getCompletionForTopLevel(t)},r.prototype.getCompletionsForExtendsReference=function(e,t,i){return i},r.prototype.getCompletionForUriLiteralValue=function(e,t){var i,n,s;if(e.hasChildren()){var o=e.getChild(0);i=o.getText(),n=this.position,s=this.getCompletionRange(o)}else{i="",n=this.position;var a=this.textDocument.positionAt(e.offset+4);s=W.create(a,a)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:i,position:n,range:s})}),t},r.prototype.getCompletionForImportPath=function(e,t){var i=this;return this.completionParticipants.forEach(function(n){n.onCssImportPath&&n.onCssImportPath({pathValue:e.getText(),position:i.position,range:i.getCompletionRange(e)})}),t},r.prototype.hasCharacterAtPosition=function(e,t){var i=this.textDocument.getText();return e>=0&&e=0&&` \r":{[()]},*>+`.indexOf(i.charAt(t))===-1;)t--;return i.substring(t+1,e)}function Si(r){return r.toLowerCase()in ft||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)}var an=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),on=function(){function r(){this.parent=null,this.children=null,this.attributes=null}return r.prototype.findAttribute=function(e){if(this.attributes)for(var t=0,i=this.attributes;t0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(f.Operator);return this.consumeToken(),this.finish(t)}return r.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(E);return this.consumeToken(),this.finish(t)}return r.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(u.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)||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(t){var i=this._tryParseCustomPropertyDeclaration(t);if(i)return i;var n=this.create(De);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(u.Colon))return this.finish(n,d.ColonExpected,[u.Colon],t||[u.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var s=!1;if(n.setValue(this._parseExpr())&&(s=!0,n.addChild(this._parsePrio())),this.peek(u.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(n,d.PropertyValueExpected);return this.peek(u.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)},e.prototype._parseNestedProperties=function(){var t=this.create(Ni);return this._parseBody(t,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var t=this.create(Te);if(this.consumeToken(),!t.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(t,d.SelectorExpected);for(;this.accept(u.Comma);)t.getSelectors().addChild(this._parseSimpleSelector());return this.accept(u.Exclamation)&&!this.acceptIdent("optional")?this.finish(t,d.UnknownKeyword):this.finish(t)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(f.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(u.Num)||this.accept(u.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var t=this.createNode(f.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(t)}else if(this.peekKeyword("@at-root")){var t=this.createNode(f.SelectorPlaceholder);return this.consumeToken(),this.finish(t)}return null},e.prototype._parseElementName=function(){var t=this.mark(),i=r.prototype._parseElementName.call(this);return i&&!this.hasWhitespace()&&this.peek(u.ParenthesisL)?(this.restoreAtMark(t),null):i},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||r.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var t=this.createNode(f.Debug);return this.consumeToken(),t.addChild(this._parseExpr()),this.finish(t)},e.prototype._parseControlStatement=function(t){return t===void 0&&(t=this._parseRuleSetDeclaration.bind(this)),this.peek(u.AtKeyword)?this._parseIfStatement(t)||this._parseForStatement(t)||this._parseEachStatement(t)||this._parseWhileStatement(t):null},e.prototype._parseIfStatement=function(t){return this.peekKeyword("@if")?this._internalParseIfStatement(t):null},e.prototype._internalParseIfStatement=function(t){var i=this.create(Un);if(this.consumeToken(),!i.setExpression(this._parseExpr(!0)))return this.finish(i,d.ExpressionExpected);if(this._parseBody(i,t),this.acceptKeyword("@else")){if(this.peekIdent("if"))i.setElseClause(this._internalParseIfStatement(t));else if(this.peek(u.CurlyL)){var n=this.create(qn);this._parseBody(n,t),i.setElseClause(n)}}return this.finish(i)},e.prototype._parseForStatement=function(t){if(!this.peekKeyword("@for"))return null;var i=this.create(Tn);return this.consumeToken(),i.setVariable(this._parseVariable())?this.acceptIdent("from")?i.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(i,$t.ThroughOrToExpected,[u.CurlyR]):i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,d.ExpressionExpected,[u.CurlyR]):this.finish(i,d.ExpressionExpected,[u.CurlyR]):this.finish(i,$t.FromExpected,[u.CurlyR]):this.finish(i,d.VariableNameExpected,[u.CurlyR])},e.prototype._parseEachStatement=function(t){if(!this.peekKeyword("@each"))return null;var i=this.create(Kn);this.consumeToken();var n=i.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(i,d.VariableNameExpected,[u.CurlyR]);for(;this.accept(u.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(i,d.VariableNameExpected,[u.CurlyR]);return this.finish(n),this.acceptIdent("in")?i.addChild(this._parseExpr())?this._parseBody(i,t):this.finish(i,d.ExpressionExpected,[u.CurlyR]):this.finish(i,$t.InExpected,[u.CurlyR])},e.prototype._parseWhileStatement=function(t){if(!this.peekKeyword("@while"))return null;var i=this.create(zn);return this.consumeToken(),i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,d.ExpressionExpected,[u.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var t=this.create(lt);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([D.Function])))return this.finish(t,d.IdentifierExpected,[u.CurlyR]);if(!this.accept(u.ParenthesisL))return this.finish(t,d.LeftParenthesisExpected,[u.CurlyR]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,d.VariableNameExpected)}return this.accept(u.ParenthesisR)?this._parseBody(t,this._parseFunctionBodyDeclaration.bind(this)):this.finish(t,d.RightParenthesisExpected,[u.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var t=this.createNode(f.ReturnStatement);return this.consumeToken(),t.addChild(this._parseExpr())?this.finish(t):this.finish(t,d.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var t=this.create(Ke);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([D.Mixin])))return this.finish(t,d.IdentifierExpected,[u.CurlyR]);if(this.accept(u.ParenthesisL)){if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,d.VariableNameExpected)}if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected,[u.CurlyR])}return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var t=this.create(Ct);return t.setIdentifier(this._parseVariable())?(this.accept(ct),this.accept(u.Colon)&&!t.setDefaultValue(this._parseExpr(!0))?this.finish(t,d.VariableValueExpected,[],[u.Comma,u.ParenthesisR]):this.finish(t)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var t=this.create(ls);if(this.consumeToken(),this.accept(u.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,d.ExpressionExpected)}if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected)}return this.finish(t)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var t=this.create(ht);this.consumeToken();var i=this._parseIdent([D.Mixin]);if(!t.setIdentifier(i))return this.finish(t,d.IdentifierExpected,[u.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([D.Mixin]);if(!n)return this.finish(t,d.IdentifierExpected,[u.CurlyR]);var s=this.create(Er);i.referenceTypes=[D.Module],s.setIdentifier(i),t.setIdentifier(n),t.addChild(s)}if(this.accept(u.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,d.ExpressionExpected)}if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(u.CurlyL))&&t.setContent(this._parseMixinContentDeclaration()),this.finish(t)},e.prototype._parseMixinContentDeclaration=function(){var t=this.create(hs);if(this.acceptIdent("using")){if(!this.accept(u.ParenthesisL))return this.finish(t,d.LeftParenthesisExpected,[u.CurlyL]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,d.VariableNameExpected)}if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected,[u.CurlyL])}return this.peek(u.CurlyL)&&this._parseBody(t,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(t)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var t=this.create(Fe),i=this.mark(),n=this._parseVariable();if(n)if(this.accept(u.Colon))t.setIdentifier(n);else{if(this.accept(ct))return t.setValue(n),this.finish(t);this.restoreAtMark(i)}return t.setValue(this._parseExpr(!0))?(this.accept(ct),t.addChild(this._parsePrio()),this.finish(t)):t.setValue(this._tryParsePrio())?this.finish(t):null},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(u.ParenthesisR)){this.restoreAtMark(t);var n=this.create(E);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e.prototype._parseOperation=function(){if(!this.peek(u.ParenthesisL))return null;var t=this.create(E);for(this.consumeToken();t.addChild(this._parseListElement());)this.accept(u.Comma);return this.accept(u.ParenthesisR)?this.finish(t):this.finish(t,d.RightParenthesisExpected)},e.prototype._parseListElement=function(){var t=this.create(ps),i=this._parseBinaryExpr();if(!i)return null;if(this.accept(u.Colon)){if(t.setKey(i),!t.setValue(this._parseBinaryExpr()))return this.finish(t,d.ExpressionExpected)}else t.setValue(i);return this.finish(t)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var t=this.create(Hn);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,d.StringLiteralExpected);if(!this.peek(u.SemiColon)&&!this.peek(u.EOF)){if(!this.peekRegExp(u.Ident,/as|with/))return this.finish(t,d.UnknownKeyword);if(this.acceptIdent("as")&&!t.setIdentifier(this._parseIdent([D.Module]))&&!this.acceptDelim("*"))return this.finish(t,d.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(u.ParenthesisL))return this.finish(t,d.LeftParenthesisExpected,[u.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,d.VariableNameExpected);for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,d.VariableNameExpected);if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected)}}return!this.accept(u.SemiColon)&&!this.accept(u.EOF)?this.finish(t,d.SemiColonExpected):this.finish(t)},e.prototype._parseModuleConfigDeclaration=function(){var t=this.create(Gn);return t.setIdentifier(this._parseVariable())?!this.accept(u.Colon)||!t.setValue(this._parseExpr(!0))?this.finish(t,d.VariableValueExpected,[],[u.Comma,u.ParenthesisR]):this.accept(u.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(t,d.UnknownKeyword):this.finish(t):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var t=this.create(Qn);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,d.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(u.ParenthesisL))return this.finish(t,d.LeftParenthesisExpected,[u.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,d.VariableNameExpected);for(;this.accept(u.Comma)&&!this.peek(u.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,d.VariableNameExpected);if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected)}if(!this.peek(u.SemiColon)&&!this.peek(u.EOF)){if(!this.peekRegExp(u.Ident,/as|hide|show/))return this.finish(t,d.UnknownKeyword);if(this.acceptIdent("as")){var i=this._parseIdent([D.Forward]);if(!t.setIdentifier(i))return this.finish(t,d.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(t,d.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!t.addChild(this._parseForwardVisibility()))return this.finish(t,d.IdentifierOrVariableExpected)}return!this.accept(u.SemiColon)&&!this.accept(u.EOF)?this.finish(t,d.SemiColonExpected):this.finish(t)},e.prototype._parseForwardVisibility=function(){var t=this.create(Jn);for(t.setIdentifier(this._parseIdent());t.addChild(this._parseVariable()||this._parseIdent());)this.accept(u.Comma);return t.getChildren().length>1?t:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||r.prototype._parseSupportsCondition.call(this)},e})(en);var va=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),C=ge();(function(r){va(e,r);function e(t,i){var n=r.call(this,"$",t,i)||this;return Li(e.scssModuleLoaders),Li(e.scssModuleBuiltIns),n}return e.prototype.isImportPathParent=function(t){return t===f.Forward||t===f.Use||r.prototype.isImportPathParent.call(this,t)},e.prototype.getCompletionForImportPath=function(t,i){var n=t.getParent().type;if(n===f.Forward||n===f.Use)for(var s=0,a=e.scssModuleBuiltIns;s0){var t=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+=` `,t.value+=e.references.map(function(i){return"["+i.name+"]("+i.url+")"}).join(" | "),e.documentation=t}})}var ya=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Vi=47,ba=10,Ca=13,xa=12,Bt=96,jt=46,ka=u.CustomToken,er=ka++,wa=function(r){ya(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scanNext=function(t){var i=this.escapedJavaScript();return i!==null?this.finishToken(t,i):this.stream.advanceIfChars([jt,jt,jt])?this.finishToken(t,er):r.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return r.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([Vi,Vi])?(this.stream.advanceWhileChar(function(t){switch(t){case ba:case Ca:case xa:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var t=this.stream.peekChar();return t===Bt?(this.stream.advance(1),this.stream.advanceWhileChar(function(i){return i!==Bt}),this.stream.advanceIfChar(Bt)?u.EscapedJavaScript:u.BadEscapedJavaScript):null},e}(rr),_a=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){_a(e,r);function e(){return r.call(this,new wa)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(u.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||r.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var t=this.create(ar);if(this.consumeToken(),this.accept(u.ParenthesisL)){if(!this.accept(u.Ident))return this.finish(t,d.IdentifierExpected,[u.SemiColon]);do if(!this.accept(u.Comma))break;while(this.accept(u.Ident));if(!this.accept(u.ParenthesisR))return this.finish(t,d.RightParenthesisExpected,[u.SemiColon])}return!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral())?this.finish(t,d.URIOrStringExpected,[u.SemiColon]):(!this.peek(u.SemiColon)&&!this.peek(u.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var t=this.createNode(f.Plugin);return this.consumeToken(),t.addChild(this._parseStringLiteral())?this.accept(u.SemiColon)?this.finish(t):this.finish(t,d.SemiColonExpected):this.finish(t,d.StringLiteralExpected)},e.prototype._parseMediaQuery=function(){var t=r.prototype._parseMediaQuery.call(this);if(!t){var i=this.create(Ji);return i.addChild(this._parseVariable())?this.finish(i):null}return t},e.prototype._parseMediaDeclaration=function(t){return t===void 0&&(t=!1),this._tryParseRuleset(t)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(t)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(t){t===void 0&&(t=[]);var i=this.create(xt),n=this.mark();if(!i.setVariable(this._parseVariable(!0)))return null;if(this.accept(u.Colon)){if(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseDetachedRuleSet()))i.needsSemicolon=!1;else if(!i.setValue(this._parseExpr()))return this.finish(i,d.VariableValueExpected,[],t);i.addChild(this._parsePrio())}else return this.restoreAtMark(n),null;return this.peek(u.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseDetachedRuleSet=function(){var t=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(u.ParenthesisL)){var i=this.create(Ke);if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(u.Comma)||this.accept(u.SemiColon))&&!this.peek(u.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,d.IdentifierExpected,[],[u.ParenthesisR]);if(!this.accept(u.ParenthesisR))return this.restoreAtMark(t),null}else return this.restoreAtMark(t),null;if(!this.peek(u.CurlyL))return null;var n=this.create(U);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(t){if(!t.addChild(this._parseLookupValue()))return!1;for(var i=!1;this.peek(u.BracketL)&&(i=!0),!!t.addChild(this._parseLookupValue());)i=!1;return!i},e.prototype._parseLookupValue=function(){var t=this.create(E),i=this.mark();return this.accept(u.BracketL)?(t.addChild(this._parseVariable(!1,!0))||t.addChild(this._parsePropertyIdentifier()))&&this.accept(u.BracketR)||this.accept(u.BracketR)?t:(this.restoreAtMark(i),null):(this.restoreAtMark(i),null)},e.prototype._parseVariable=function(t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=!t&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(u.AtKeyword))return null;for(var s=this.create(cr),a=this.mark();this.acceptDelim("@")||!t&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(a),null;return!this.accept(u.AtKeyword)&&!this.accept(u.Ident)?(this.restoreAtMark(a),null):!i&&this.peek(u.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(a),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||r.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(u.EscapedJavaScript)||this.peek(u.BadEscapedJavaScript)){var t=this.createNode(f.EscapedValue);return this.consumeToken(),this.finish(t)}if(this.peekDelim("~")){var t=this.createNode(f.EscapedValue);return this.consumeToken(),this.accept(u.String)||this.accept(u.EscapedJavaScript)?this.finish(t):this.finish(t,d.TermExpected)}return null},e.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||r.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var t=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("="),t}else if(this.peekDelim("=")){var t=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("<"),t}else if(this.peekDelim("<")){var t=this.createNode(f.Operator);return this.consumeToken(),this.acceptDelim("="),t}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(u.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([D.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||r.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(t){var i=this.create(bt),n=!1;for(t&&(n=i.addChild(this._parseCombinator()));i.addChild(this._parseSimpleSelector());){n=!0;var s=this.mark();if(i.addChild(this._parseGuard())&&this.peek(u.CurlyL))break;this.restoreAtMark(s),i.addChild(this._parseCombinator())}return n?this.finish(i):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(f.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(u.Num)||this.accept(u.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var t=this.createNode(f.SelectorInterpolation),i=this._acceptInterpolatedIdent(t);return i?this.finish(t):null},e.prototype._parsePropertyIdentifier=function(t){t===void 0&&(t=!1);var i=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,i))return null;var n=this.mark(),s=this.create(ie);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var a=!1;return t?s.isCustomProperty?a=s.addChild(this._parseIdent()):a=s.addChild(this._parseRegexp(i)):s.isCustomProperty?a=this._acceptInterpolatedIdent(s):a=this._acceptInterpolatedIdent(s,i),a?(!t&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(n),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(u.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(t,i){for(var n=this,s=!1,a=function(){var l=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(l),null):n._parseInterpolation()},o=i?function(){return n.acceptRegexp(i)}:function(){return n.accept(u.Ident)};(o()||t.addChild(this._parseInterpolation()||this.try(a)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var t=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var i=this.createNode(f.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(u.CurlyL)?(this.restoreAtMark(t),null):i.addChild(this._parseIdent())?this.accept(u.CurlyR)?this.finish(i):this.finish(i,d.RightCurlyExpected):this.finish(i,d.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var t=this.mark(),i=this.create(Ke);if(!i.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(u.ParenthesisL))return this.restoreAtMark(t),null;if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(u.Comma)||this.accept(u.SemiColon))&&!this.peek(u.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,d.IdentifierExpected,[],[u.ParenthesisR]);return this.accept(u.ParenthesisR)?(i.setGuard(this._parseGuard()),this.peek(u.CurlyL)?this._parseBody(i,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(t),null)):(this.restoreAtMark(t),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var t;if(this.peekDelim("#")||this.peekDelim(".")){if(t=this.create(ie),this.consumeToken(),this.hasWhitespace()||!t.addChild(this._parseIdent()))return null}else if(this.peek(u.Hash))t=this.create(ie),this.consumeToken();else return null;return t.referenceTypes=[D.Mixin],this.finish(t)},e.prototype._parsePseudo=function(){if(!this.peek(u.Colon))return null;var t=this.mark(),i=this.create(Te);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(i):(this.restoreAtMark(t),r.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var t=this.mark(),i=this.create(Te);return this.consumeToken(),this.hasWhitespace()||!this.accept(u.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(t),null):this._completeExtends(i)},e.prototype._completeExtends=function(t){if(!this.accept(u.ParenthesisL))return this.finish(t,d.LeftParenthesisExpected);var i=t.getSelectors();if(!i.addChild(this._parseSelector(!0)))return this.finish(t,d.SelectorExpected);for(;this.accept(u.Comma);)if(!i.addChild(this._parseSelector(!0)))return this.finish(t,d.SelectorExpected);return this.accept(u.ParenthesisR)?this.finish(t):this.finish(t,d.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(u.AtKeyword))return null;var t=this.mark(),i=this.create(ht);return i.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(u.ParenthesisL))?(this.restoreAtMark(t),null):this.accept(u.ParenthesisR)?this.finish(i):this.finish(i,d.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(t){t===void 0&&(t=!0);for(var i=this.mark(),n=this.create(ht),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var a=this._parseMixinDeclarationIdentifier();if(a)n.getNamespaces().addChild(s),s=a;else break}if(!n.setIdentifier(s))return this.restoreAtMark(i),null;var o=!1;if(this.accept(u.ParenthesisL)){if(o=!0,n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(u.Comma)||this.accept(u.SemiColon))&&!this.peek(u.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,d.ExpressionExpected)}if(!this.accept(u.ParenthesisR))return this.finish(n,d.RightParenthesisExpected);s.referenceTypes=[D.Mixin]}else s.referenceTypes=[D.Mixin,D.Rule];return this.peek(u.BracketL)?t||this._addLookupChildren(n):n.addChild(this._parsePrio()),!o&&!this.peek(u.SemiColon)&&!this.peek(u.CurlyR)&&!this.peek(u.EOF)?(this.restoreAtMark(i),null):this.finish(n)},e.prototype._parseMixinArgument=function(){var t=this.create(Fe),i=this.mark(),n=this._parseVariable();return n&&(this.accept(u.Colon)?t.setIdentifier(n):this.restoreAtMark(i)),t.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(t):(this.restoreAtMark(i),null)},e.prototype._parseMixinParameter=function(){var t=this.create(Ct);if(this.peekKeyword("@rest")){var i=this.create(E);return this.consumeToken(),this.accept(er)?(t.setIdentifier(this.finish(i)),this.finish(t)):this.finish(t,d.DotExpected,[],[u.Comma,u.ParenthesisR])}if(this.peek(er)){var n=this.create(E);return this.consumeToken(),t.setIdentifier(this.finish(n)),this.finish(t)}var s=!1;return t.setIdentifier(this._parseVariable())&&(this.accept(u.Colon),s=!0),!t.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(t)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var t=this.create(ds);if(this.consumeToken(),t.isNegated=this.acceptIdent("not"),!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,d.ConditionExpected);for(;this.acceptIdent("and")||this.accept(u.Comma);)if(!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,d.ConditionExpected);return this.finish(t)},e.prototype._parseGuardCondition=function(){if(!this.peek(u.ParenthesisL))return null;var t=this.create(ms);return this.consumeToken(),t.addChild(this._parseExpr()),this.accept(u.ParenthesisR)?this.finish(t):this.finish(t,d.RightParenthesisExpected)},e.prototype._parseFunction=function(){var t=this.mark(),i=this.create(Je);if(!i.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(u.ParenthesisL))return this.restoreAtMark(t),null;if(i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(u.Comma)||this.accept(u.SemiColon))&&!this.peek(u.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,d.ExpressionExpected)}return this.accept(u.ParenthesisR)?this.finish(i):this.finish(i,d.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(ie);return t.referenceTypes=[D.Function],this.consumeToken(),this.finish(t)}return r.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(u.ParenthesisR)){this.restoreAtMark(t);var n=this.create(E);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e})(en);var Pa=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),A=ge();(function(r){Pa(e,r);function e(t,i){return r.call(this,"@",t,i)||this}return e.prototype.createFunctionProposals=function(t,i,n,s){for(var a=0,o=t;a 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:A("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:A("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:A("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:A("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:A("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:A("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:A("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:A("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:A("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:A("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:A("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:A("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:A("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:A("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:A("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:A("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:A("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:A("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:A("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:A("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:A("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:A("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:A("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:A("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:A("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:A("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:A("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:A("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:A("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:A("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:A("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:A("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:A("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:A("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:A("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:A("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:A("less.builtin.contrast","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);"}],e})(sn);var Sa=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ea=function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(h){try{c(i.next(h))}catch(p){a(p)}}function l(h){try{c(i.throw(h))}catch(p){a(p)}}function c(h){h.done?s(h.value):n(h.value).then(o,l)}c((i=i.apply(r,e||[])).next())})},Ra=function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]