var StylusRenderer=function(){"use strict";function assertPath(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function normalizeStringPosix(e,t){for(var n,i="",r=0,a=-1,o=0,h=0;h<=e.length;++h){if(h<e.length)n=e.charCodeAt(h);else{if(47===n)break;n=47}if(47===n){if(a===h-1||1===o);else if(a!==h-1&&2===o){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=h,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,a=h,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(a+1,h):i=e.slice(a+1,h),r=h-a-1;a=h,o=0}else 46===n&&-1!==o?++o:o=-1}return i}function _format(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}var e={resolve:function resolve(){for(var e,t="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var r;i>=0?r=arguments[i]:(void 0===e&&(e=process.cwd()),r=e),assertPath(r),0!==r.length&&(t=r+"/"+t,n=47===r.charCodeAt(0))}return t=normalizeStringPosix(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function normalize(e){if(assertPath(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=normalizeStringPosix(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function isAbsolute(e){return assertPath(e),e.length>0&&47===e.charCodeAt(0)},join:function join(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];assertPath(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":e.normalize(t)},relative:function relative(t,n){if(assertPath(t),assertPath(n),t===n)return"";if((t=e.resolve(t))===(n=e.resolve(n)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var r=t.length,a=r-i,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var h=n.length-o,l=a<h?a:h,c=-1,u=0;u<=l;++u){if(u===l){if(h>l){if(47===n.charCodeAt(o+u))return n.slice(o+u+1);if(0===u)return n.slice(o+u)}else a>l&&(47===t.charCodeAt(i+u)?c=u:0===u&&(c=0));break}var f=t.charCodeAt(i+u);if(f!==n.charCodeAt(o+u))break;47===f&&(c=u)}var m="";for(u=i+c+1;u<=r;++u)u!==r&&47!==t.charCodeAt(u)||(0===m.length?m+="..":m+="/..");return m.length>0?m+n.slice(o+c):(o+=c,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function _makeLong(e){return e},dirname:function dirname(e){if(assertPath(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,r=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!r){i=a;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function basename(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath(e);var n,i=0,r=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,h=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===h&&(a=!1,h=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=h))}return i===r?r=h:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===r&&(a=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname:function extname(e){assertPath(e);for(var t=-1,n=0,i=-1,r=!0,a=0,o=e.length-1;o>=0;--o){var h=e.charCodeAt(o);if(47!==h)-1===i&&(r=!1,i=o+1),46===h?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function format(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return _format("/",e)},parse:function parse(e){assertPath(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),r=47===i;r?(t.root="/",n=1):n=0;for(var a=-1,o=0,h=-1,l=!0,c=e.length-1,u=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===h&&(l=!1,h=c+1),46===i?-1===a?a=c:1!==u&&(u=1):-1!==a&&(u=-1);else if(!l){o=c+1;break}return-1===a||-1===h||0===u||1===u&&a===h-1&&a===o+1?-1!==h&&(t.base=t.name=0===o&&r?e.slice(1,h):e.slice(o,h)):(0===o&&r?(t.name=e.slice(1,a),t.base=e.slice(1,h)):(t.name=e.slice(o,a),t.base=e.slice(o,h)),t.ext=e.slice(a,h)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};let t;
/*!
   * Stylus - Token
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */e.posix=e,t=class Token{constructor(e,t){this.type=e,this.val=t}inspect(){var e=" "+nodeUtil.inspect(this.val);return"[Token:"+this.lineno+":"+this.column+" [32m"+this.type+"[0m[33m"+(this.val?e:"")+"[0m]"}toString(){return(void 0===this.val?this.type:this.val).toString()}};const noop$2=()=>noop$2
/*!
   * Stylus - Visitor
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */;var n=class Visitor{constructor(e){this.root=e}visit(e,t){var n="visit"+e.constructor.name;return this[n]?this[n](e):e}},i=["em","ex","ch","rem","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cm","mm","in","pt","pc","px","deg","grad","rad","turn","s","ms","Hz","kHz","dpi","dpcm","dppx","x","%","fr"],r=class Stack extends Array{constructor(){super(),Array.apply(this,arguments)}push(e){return e.stack=this,e.parent=this.currentFrame,[].push.apply(this,arguments)}get currentFrame(){return this[this.length-1]}getBlockFrame(e){for(var t=0;t<this.length;++t)if(e==this[t].block)return this[t]}lookup(e){var t,n=this.currentFrame.block;do{var i=this.getBlockFrame(n);if(i&&(t=i.lookup(e)))return t}while(n=n.parent)}inspect(){return this.reverse().map((function(e){return e.inspect()})).join("\n")}toString(){for(var e,t,n=[],i=this.length;i--;)if(e=this[i].block.node)switch(t="("+e.filename+":"+(e.lineno+1)+":"+e.column+")",e.nodeName){case"function":n.push("    at "+e.name+"() "+t);break;case"group":n.push('    at "'+e.nodes[0].val+'" '+t)}return n.join("\n")}},a=class Scope{constructor(){this.locals={}}add(e){this.locals[e.name]=e.val}lookup(e){return this.locals.hasOwnProperty(e)?this.locals[e]:void 0}inspect(){var e=Object.keys(this.locals).map((function(e){return"@"+e}));return"[Scope"+(e.length?" "+e.join(", "):"")+"]"}},o=class Frame{constructor(e){this._scope=!1===e.scope?null:new a,this.block=e}get scope(){return this._scope||this.parent.scope}lookup(e){return this.scope.lookup(e)}inspect(){return"[Frame "+(!1===this.block.scope?"scope-less":this.scope.inspect())+"]"}};
/*!
   * Stylus - units
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */const _export_sync_=e=>"functions/index.styl"===e?[e]:[];function notImplemented(){throw new Error("Not implemented")}const _export_statSync_=e=>"functions/index.styl"===e?{mtime:0}:notImplemented(),_export_readFileSync_=e=>"functions/index.styl"===e?"called-from = ()\n\nvendors = moz webkit o ms official\n\n// stringify the given arg\n\n-string(arg)\n  type(arg) + ' ' + arg\n\n// require a color\n\nrequire-color(color)\n  unless color is a 'color'\n    error('RGB or HSL value expected, got a ' + -string(color))\n\n// require a unit\n\nrequire-unit(n)\n  unless n is a 'unit'\n    error('unit expected, got a ' + -string(n))\n\n// require a string\n\nrequire-string(str)\n  unless str is a 'string' or str is a 'ident'\n    error('string expected, got a ' + -string(str))\n\n// Math functions\n\nabs(n) { math(n, 'abs') }\nmin(a, b) { a < b ? a : b }\nmax(a, b) { a > b ? a : b }\n\n// Trigonometrics\nPI = -math-prop('PI')\n\nradians-to-degrees(angle)\n  angle * (180 / PI)\n\ndegrees-to-radians(angle)\n  angle * (PI / 180)\n\nsin(n)\n  n = unit(n) == 'deg' ? degrees-to-radians(unit(n, '')) : unit(n, '')\n  round(math(n, 'sin'), 9)\n\ncos(n)\n  n = unit(n) == 'deg' ? degrees-to-radians(unit(n, '')) : unit(n, '')\n  round(math(n, 'cos'), 9)\n\n// Rounding Math functions\n\nceil(n, precision = 0)\n  multiplier = 10 ** precision\n  math(n * multiplier, 'ceil') / multiplier\n\nfloor(n, precision = 0)\n  multiplier = 10 ** precision\n  math(n * multiplier, 'floor') / multiplier\n\nround(n, precision = 0)\n  multiplier = 10 ** precision\n  math(n * multiplier, 'round') / multiplier\n\n// return the sum of the given numbers\n\nsum(nums)\n  sum = 0\n  sum += n for n in nums\n\n// return the average of the given numbers\n\navg(nums)\n  sum(nums) / length(nums)\n\n// return a unitless number, or pass through\n\nremove-unit(n)\n  if typeof(n) is \"unit\"\n    unit(n, \"\")\n  else\n    n\n\n// convert a percent to a decimal, or pass through\n\npercent-to-decimal(n)\n  if unit(n) is \"%\"\n    remove-unit(n) / 100\n  else\n    n\n\n// check if n is an odd number\n\nodd(n)\n  1 == n % 2\n\n// check if n is an even number\n\neven(n)\n  0 == n % 2\n\n// check if color is light\n\nlight(color)\n  lightness(color) >= 50%\n\n// check if color is dark\n\ndark(color)\n  lightness(color) < 50%\n\n// desaturate color by amount\n\ndesaturate(color, amount)\n  adjust(color, 'saturation', - amount)\n\n// saturate color by amount\n\nsaturate(color = '', amount = 100%)\n  if color is a 'color'\n    adjust(color, 'saturation', amount)\n  else\n    unquote( \"saturate(\" + color + \")\" )\n\n// darken by the given amount\n\ndarken(color, amount)\n  adjust(color, 'lightness', - amount)\n\n// lighten by the given amount\n\nlighten(color, amount)\n  adjust(color, 'lightness', amount)\n\n// decrease opacity by amount\n\nfade-out(color, amount)\n  color - rgba(black, percent-to-decimal(amount))\n\n// increase opacity by amount\n\nfade-in(color, amount)\n  color + rgba(black, percent-to-decimal(amount))\n\n// spin hue by a given amount\n\nspin(color, amount)\n  color + unit(amount, deg)\n\n// mix two colors by a given amount\n\nmix(color1, color2, weight = 50%)\n  unless weight in 0..100\n    error(\"Weight must be between 0% and 100%\")\n\n  if length(color1) == 2\n    weight = color1[0]\n    color1 = color1[1]\n\n  else if length(color2) == 2\n    weight = 100 - color2[0]\n    color2 = color2[1]\n\n  require-color(color1)\n  require-color(color2)\n\n  p = unit(weight / 100, '')\n  w = p * 2 - 1\n\n  a = alpha(color1) - alpha(color2)\n\n  w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2\n  w2 = 1 - w1\n\n  channels = (red(color1) red(color2)) (green(color1) green(color2)) (blue(color1) blue(color2))\n  rgb = ()\n\n  for pair in channels\n    push(rgb, floor(pair[0] * w1 + pair[1] * w2))\n\n  a1 = alpha(color1) * p\n  a2 = alpha(color2) * (1 - p)\n  alpha = a1 + a2\n\n  rgba(rgb[0], rgb[1], rgb[2], alpha)\n\n// invert colors, leave alpha intact\n\ninvert(color = '')\n  if color is a 'color'\n    rgba(#fff - color, alpha(color))\n  else\n    unquote( \"invert(\" + color + \")\" )\n\n// give complement of the given color\n\ncomplement( color )\n  spin( color, 180 )\n\n// give grayscale of the given color\n\ngrayscale( color = '' )\n  if color is a 'color'\n    desaturate( color, 100% )\n  else\n    unquote( \"grayscale(\" + color + \")\" )\n\n// mix the given color with white\n\ntint( color, percent )\n  mix( white, color, percent )\n\n// mix the given color with black\n\nshade( color, percent )\n  mix( black, color, percent )\n\n// return the last value in the given expr\n\nlast(expr)\n  expr[length(expr) - 1]\n\n// return keys in the given pairs or object\n\nkeys(pairs)\n  ret = ()\n  if type(pairs) == 'object'\n    for key in pairs\n      push(ret, key)\n  else\n    for pair in pairs\n      push(ret, pair[0]);\n  ret\n\n// return values in the given pairs or object\n\nvalues(pairs)\n  ret = ()\n  if type(pairs) == 'object'\n    for key, val in pairs\n      push(ret, val)\n  else\n    for pair in pairs\n      push(ret, pair[1]);\n  ret\n\n// join values with the given delimiter\n\njoin(delim, vals...)\n  buf = ''\n  vals = vals[0] if length(vals) == 1\n  for val, i in vals\n    buf += i ? delim + val : val\n\n// add a CSS rule to the containing block\n\n// - This definition allows add-property to be used as a mixin\n// - It has the same effect as interpolation but allows users\n//   to opt for a functional style\n\nadd-property-function = add-property\nadd-property(name, expr)\n  if mixin\n    {name} expr\n  else\n    add-property-function(name, expr)\n\nprefix-classes(prefix)\n  -prefix-classes(prefix, block)\n\n// Caching mixin, use inside your functions to enable caching by extending.\n\n$stylus_mixin_cache = {}\ncache()\n  $key = (current-media() or 'no-media') + '__' + called-from[0] + '__' + arguments\n  if $key in $stylus_mixin_cache\n    @extend {\"$cache_placeholder_for_\" + $stylus_mixin_cache[$key]}\n  else if 'cache' in called-from\n    {block}\n  else\n    $id = length($stylus_mixin_cache)\n\n    &,\n    /$cache_placeholder_for_{$id}\n      $stylus_mixin_cache[$key] = $id\n      {block}\n\n// Percentage function to convert a number, e.g. \".45\", into a percentage, e.g. \"45%\"\n\npercentage(num)\n  return unit(num * 100, '%')\n\n// Returns the position of a `value` within a `list`\n\nindex(list, value)\n  for val, i in list\n    return i if val == value\n":notImplemented();
/*!
   * Stylus - Selector Parser
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */
var h=[">","+","~"],l=class SelectorParser{constructor(e,t,n){this.str=e,this.stack=t||[],this.parts=n||[],this.pos=0,this.level=2,this.nested=!0,this.ignore=!1}skip(e){this.str=this.str.substr(e),this.pos+=e}skipSpaces(){for(;" "==this.str[0];)this.skip(1)}advance(){return this.root()||this.relative()||this.initial()||this.escaped()||this.parent()||this.partial()||this.char()}root(){this.pos||"/"!=this.str[0]||"deep"==this.str.slice(1,5)||(this.nested=!1,this.skip(1))}relative(e){if((!this.pos||e)&&"../"==this.str.slice(0,3)){for(this.nested=!1,this.skip(3);this.relative(!0);)this.level++;if(!this.raw){var t=this.stack[this.stack.length-this.level];if(t)return t;this.ignore=!0}}}initial(){if(!this.pos&&"~"==this.str[0]&&"/"==this.str[1])return this.nested=!1,this.skip(2),this.stack[0]}escaped(){if("\\"==this.str[0]){var e=this.str[1];if("&"==e||"^"==e)return this.skip(2),e}}parent(){if("&"==this.str[0]){if(this.nested=!1,!this.pos&&(!this.stack.length||this.raw)){for(var e=0;" "==this.str[++e];);if(~h.indexOf(this.str[e]))return void this.skip(e+1)}if(this.skip(1),!this.raw)return this.stack[this.stack.length-1]}}partial(){if("^"==this.str[0]&&"["==this.str[1]){this.skip(2),this.skipSpaces();var e=this.range();if(this.skipSpaces(),"]"!=this.str[0])return"^[";if(this.nested=!1,this.skip(1),e)return e;this.ignore=!0}}number(){var e=0,t="";for("-"==this.str[e]&&(t+=this.str[e++]);this.str.charCodeAt(e)>=48&&this.str.charCodeAt(e)<=57;)t+=this.str[e++];if(t)return this.skip(e),Number(t)}range(){var e,t=this.number();if(".."==this.str.slice(0,2)){this.skip(2);var n=this.number(),i=this.parts.length;if(t<0&&(t=i+t-1),n<0&&(n=i+n-1),t>n){var r=t;t=n,n=r}n<i-1&&(e=this.parts.slice(t,n+1).map((function(e){var t=new SelectorParser(e,this.stack,this.parts);return t.raw=!0,t.parse()}),this).map((function(e){return(e.nested?" ":"")+e.val})).join("").trim())}else e=this.stack[t<0?this.stack.length+t-1:t];if(e)return e;this.ignore=!0}char(){var e=this.str[0];return this.skip(1),e}parse(){for(var e="";this.str.length;)if(e+=this.advance()||"",this.ignore){e="";break}return{val:e.trimRight(),nested:this.nested}}};let c,u,f,m,d,v,g,k;var w=e.basename;e.relative;var b=e.join;e.isAbsolute;const _export_lookup_=function(e,t,n){for(var i,r=t.length;r--;)try{if(n==(i=b(t[r],e)))continue;return _export_statSync_(i),i}catch(e){}};c=function(e,t,n){for(var i,r,a=t.length;a--;)if(n!=(i=b(t[a],e))&&(r=_export_sync_(i)).length)return r.sort()};const _export_lookupIndex_=function(e,t,n){var i=c(b(e,"index.styl"),t,n);return i||(i=c(b(e,w(e).replace(/\.styl/i,"")+".styl"),t,n)),i},_export_formatException_=function(e,t){var n=t.lineno,i=t.column,r=t.filename,a=t.input,o=(o=t.context||8)/2,h=("\n"+a).split("\n"),l=Math.max(n-o,1),c=Math.min(h.length,n+o),u=c.toString().length;o=h.slice(l,c).map((function(e,t){var r=t+l;return"   "+Array(u-r.toString().length+1).join(" ")+r+"| "+e+(r==n?"\n"+Array(r.toString().length+5+i).join("-")+"^":"")})).join("\n");return e.message=r+":"+n+":"+i+"\n"+o+"\n\n"+e.message+"\n"+(e.stylusStack?e.stylusStack+"\n":""),e.fromStylus&&(e.stack="Error: "+e.message),e},_export_assertType_=function(e,t,n){if(u(e,n),e.nodeName!=t){var i=e.nodeName;throw new Error("TypeError: "+("expected "+(n?'"'+n+'" to be a ':"")+t+", but got "+i+":"+e))}},_export_assertString_=function(e,t){switch(u(e,t),e.nodeName){case"string":case"ident":case"literal":return;default:var n=e.nodeName;throw new Error("TypeError: "+("expected string, ident or literal, but got "+n+":"+e))}},_export_assertColor_=function(e,t){switch(u(e,t),e.nodeName){case"rgba":case"hsla":return;default:var n=e.nodeName;throw new Error("TypeError: "+("expected rgba or hsla, but got "+n+":"+e))}};u=function(e,t){if(!e){if(t)throw new Error('"'+t+'" argument required');throw new Error("argument missing")}},f=function(e){return e.preserve||"arguments"!=e.nodeName&&"expression"!=e.nodeName||1!=e.nodes.length||"arguments"!=e.nodes[0].nodeName&&"expression"!=e.nodes[0].nodeName?e:f(e.nodes[0])},m=function(e,t){switch(typeof e){case"function":return e;case"string":return new ue.String(e);case"boolean":return new ue.Boolean(e);case"number":return new ue.Unit(e);default:return null==e?ue.null:Array.isArray(e)?d(e,t):e.nodeName?e:v(e,t)}},d=function(e,t){var n=new ue.Expression;return e.forEach((function(e){n.push(m(e,t))})),n},v=function(e,t){var n,i=t?new ue.Object:new ue.Expression;for(var r in e)n=m(e[r],t),r=new ue.Ident(r),t?i.set(r,n):i.push(d([r,n]));return i};const _export_params_=function(e){return e.toString().match(/\(([^)]*)\)/)[1].split(/ *, */)};g=function(e,t,n){for(var i in t)if(n&&e[i]){var r=f(e[i]).first,a=f(t[i]).first;"object"==r.nodeName&&"object"==a.nodeName?e[i].first.vals=g(r.vals,a.vals,n):e[i]=t[i]}else e[i]=t[i];return e},k=function(e){for(var t={},n=[],i=0,r=e.length;i<r;++i)e[i]in t||(t[e[i]]=!0,n.push(e[i]));return n};const _export_compileSelectors_=function(e,t){var n=[],i=l,r=this&&this.indent||"",a=[];function parse(e,t){var n=[e.val],r=new i(n[0],a,n).parse().val,a=[];if(t.length)for(var o=0,h=t.length;o<h;++o){n.push(t[o]),a.push(r);var l=new i(t[o],a,n).parse();l.nested?r+=" "+l.val:r=l.val}return r.trim()}return function compile(e,i){i?e[i].forEach((function(o){!t&&o.isPlaceholder||(o.inherits?(a.unshift(o.val),compile(e,i-1),a.shift()):n.push(r+parse(o,a)))})):e[0].forEach((function(e){if(t||!e.isPlaceholder){var i=parse(e,a);i&&n.push(r+i)}}))}(e,e.length-1),k(n)},_export_parseString_=function(e){var t,n=ye;try{t=new n(e).list()}catch(n){t=new ue.Literal(e)}return t};let y,x,S;function adjust$1(e,t,n){_export_assertColor_(e,"color"),_export_assertString_(t,"prop"),_export_assertType_(n,"unit","amount");var i=e.hsla.clone();if(!(t={hue:"h",saturation:"s",lightness:"l"}[t.string]))throw new Error("invalid adjustment property");var r=n.val;return"%"==n.type&&(r="l"==t&&r>0?(100-i[t])*r/100:i[t]*(r/100)),i[t]+=r,i.rgba}function rgba(e,t,n,i){switch(arguments.length){case 1:return _export_assertColor_(e),e.rgba;case 2:_export_assertColor_(e);var r=e.rgba;return _export_assertType_(t,"unit","alpha"),"%"==(i=t.clone()).type&&(i.val/=100),new ue.RGBA(r.r,r.g,r.b,i.val);default:_export_assertType_(e,"unit","red"),_export_assertType_(t,"unit","green"),_export_assertType_(n,"unit","blue"),_export_assertType_(i,"unit","alpha");var a="%"==e.type?Math.round(2.55*e.val):e.val,o="%"==t.type?Math.round(2.55*t.val):t.val,h="%"==n.type?Math.round(2.55*n.val):n.val;return(i=i.clone())&&"%"==i.type&&(i.val/=100),new ue.RGBA(a,o,h,i.val)}}function alpha(e,t){return e=e.rgba,t?rgba(new ue.Unit(e.r),new ue.Unit(e.g),new ue.Unit(e.b),t):new ue.Unit(e.a,"")}function basename(t,n){return _export_assertString_(t,"path"),e.basename(t.val,n&&n.val)}function blend(e,t){return _export_assertColor_(e),e=e.rgba,t=t||new ue.RGBA(255,255,255,1),_export_assertColor_(t),t=t.rgba,new ue.RGBA(e.r*e.a+t.r*(1-e.a),e.g*e.a+t.g*(1-e.a),e.b*e.a+t.b*(1-e.a),e.a+t.a-e.a*t.a)}function blue(e,t){return e=e.rgba,t?rgba(new ue.Unit(e.r),new ue.Unit(e.g),t,new ue.Unit(e.a)):new ue.Unit(e.b,"")}(y=function addProperty(e,t){_export_assertType_(e,"expression","name"),e=f(e).first,_export_assertString_(e,"name"),_export_assertType_(t,"expression","expr");var n=new ue.Property([e],t),i=this.closestBlock,r=i.nodes.length,a=i.nodes.slice(0,i.index),o=i.nodes.slice(i.index++,r);return a.push(n),i.nodes=a.concat(o),n}).raw=!0,adjust$1.params=["color","prop","amount"],rgba.params=["red","green","blue","alpha"],alpha.params=["color","value"],(x=function(e,t,n){u(e,"number"),u(t,"base"),e=f(e).nodes[0].val,t=f(t).nodes[0].val,n=n&&f(n).nodes[0].val||2;for(var i=Number(e).toString(t);i.length<n;)i="0"+i;return new ue.Literal(i)}).raw=!0,basename.params=["p","ext"],blend.params=["top","bottom"],blue.params=["color","value"],(S=function clone(e){return u(e,"expr"),e.clone()}).raw=!0;var N={red:"r",green:"g",blue:"b",alpha:"a",hue:"h",saturation:"s",lightness:"l"},E={hue:"deg",saturation:"%",lightness:"%"},A={red:"rgba",blue:"rgba",green:"rgba",alpha:"rgba",hue:"hsla",saturation:"hsla",lightness:"hsla"};function component(e,t){_export_assertColor_(e,"color"),_export_assertString_(t,"name");t=t.string;var n=E[t],i=A[t];if(!(t=N[t]))throw new Error('invalid color component "'+t+'"');return new ue.Unit(e[i][t],n)}function luminosity(e){function processChannel(e){return.03928>(e/=255)?e/12.92:Math.pow((e+.055)/1.055,2.4)}return _export_assertColor_(e),e=e.rgba,new ue.Unit(.2126*processChannel(e.r)+.7152*processChannel(e.g)+.0722*processChannel(e.b))}function contrast(e,t){if("rgba"!=e.nodeName&&"hsla"!=e.nodeName)return new ue.Literal("contrast("+(e.isNull?"":e.toString())+")");var n=new ue.Object;function contrast(e,t){1>e.a&&(e=blend(e,t));var n=luminosity(t).val+.05,i=luminosity(e).val+.05,r=n/i;return i>n&&(r=1/r),Math.round(10*r)/10}if(e=e.rgba,t=t||new ue.RGBA(255,255,255,1),_export_assertColor_(t),1<=(t=t.rgba).a){var i=new ue.Unit(contrast(e,t));n.set("ratio",i),n.set("error",new ue.Unit(0)),n.set("min",i),n.set("max",i)}else{var r=contrast(e,blend(t,new ue.RGBA(0,0,0,1))),a=contrast(e,blend(t,new ue.RGBA(255,255,255,1))),o=Math.max(r,a);function processChannel(e,n){return Math.min(Math.max(0,(e-n*t.a)/(1-t.a)),255)}var h=new ue.RGBA(processChannel(e.r,t.r),processChannel(e.g,t.g),processChannel(e.b,t.b),1),l=contrast(e,blend(t,h));n.set("ratio",new ue.Unit(Math.round(50*(l+o))/100)),n.set("error",new ue.Unit(Math.round(50*(o-l))/100)),n.set("min",new ue.Unit(l)),n.set("max",new ue.Unit(o))}return n}function convert$1(e){return _export_assertString_(e,"str"),_export_parseString_(e.string)}component.params=["color","name"],luminosity.params=["color"],contrast.params=["top","bottom"],convert$1.params=["str"];function define(e,t,n){_export_assertType_(e,"string","name"),t=f(t);var i=this.currentScope;n&&n.toBoolean().isTrue&&(i=this.global.scope);var r=new ue.Ident(e.val,t);return i.add(r),ue.null}function dirname$2(t){return _export_assertString_(t,"path"),e.dirname(t.val).replace(/\\/g,"/")}function error(e){_export_assertType_(e,"string","msg");var t=new Error(e.val);throw t.fromStylus=!0,t}function extname$1(t){return _export_assertString_(t,"path"),e.extname(t.val)}function green(e,t){return e=e.rgba,t?rgba(new ue.Unit(e.r),t,new ue.Unit(e.b),new ue.Unit(e.a)):new ue.Unit(e.g,"")}function hsla(e,t,n,i){switch(arguments.length){case 1:return _export_assertColor_(e),e.hsla;case 2:_export_assertColor_(e);var r=e.hsla;return _export_assertType_(t,"unit","alpha"),"%"==(i=t.clone()).type&&(i.val/=100),new ue.HSLA(r.h,r.s,r.l,i.val);default:return _export_assertType_(e,"unit","hue"),_export_assertType_(t,"unit","saturation"),_export_assertType_(n,"unit","lightness"),_export_assertType_(i,"unit","alpha"),(i=i.clone())&&"%"==i.type&&(i.val/=100),new ue.HSLA(e.val,t.val,n.val,i.val)}}function hsl(e,t,n){return 1==arguments.length?(_export_assertColor_(e,"color"),e.hsla):hsla(e,t,n,new ue.Unit(1))}function hue(e,t){if(t){var n=e.hsla;return hsla(t,new ue.Unit(n.s),new ue.Unit(n.l),new ue.Unit(n.a))}return component(e,new ue.String("hue"))}define.params=["name","expr","global"],dirname$2.params=["p"],error.params=["msg"],extname$1.params=["p"],green.params=["color","value"],hsla.params=["hue","saturation","lightness","alpha"],hsl.params=["hue","saturation","lightness"],hue.params=["color","value"];const noop$1=()=>noop$1;function json(e,t,n){_export_assertString_(e,"path"),e=e.string;var i=_export_lookup_(e,this.options.paths,this.options.filename),r=t&&"object"==t.nodeName&&t;if(!i){if(r&&r.get("optional").toBoolean().isTrue)return ue.null;throw new Error("failed to locate .json file "+e)}var a=JSON.parse(_export_readFileSync_(i));if(r)return function convert(e,t){var n=new ue.Object,i=t.get("leave-strings").toBoolean();for(var r in e){var a=e[r];"object"==typeof a?n.set(r,convert(a,t)):("string"==(a=m(a)).nodeName&&i.isFalse&&(a=_export_parseString_(a.string)),n.set(r,a))}return n}(a,r);oldJson.call(this,a,t,n)}function oldJson(e,t,n){n?(_export_assertString_(n,"namePrefix"),n=n.val):n="";var i=(t=t?t.toBoolean():new ue.Boolean(t)).isTrue?this.currentScope:this.global.scope;return void function convert(e,t){for(var r in t=t?t+"-":"",e){var a=e[r],o=t+r;"object"==typeof a?convert(a,o):("string"==(a=m(a)).nodeName&&(a=_export_parseString_(a.string)),i.add({name:n+o,val:a}))}}(e)}let _,L;function lightness(e,t){if(t){var n=e.hsla;return hsla(new ue.Unit(n.h),new ue.Unit(n.s),t,new ue.Unit(n.a))}return component(e,new ue.String("lightness"))}function lookup(e){_export_assertType_(e,"string","name");var t=this.lookup(e.val);return t?this.visit(t):ue.null}json.params=["path","local","namePrefix"],(_=function length(e){if(e){if(e.nodes){var t=f(e).nodes;return 1==t.length&&"object"==t[0].nodeName?t[0].length:1==t.length&&"string"==t[0].nodeName?t[0].val.length:t.length}return 1}return 0}).raw=!0,lightness.params=["color","value"],(L=function listSeparator(e){return e=f(e),new ue.String(e.isList?",":" ")}).raw=!0,lookup.params=["name"];function match(e,t,n){_export_assertType_(e,"string","pattern"),_export_assertString_(t,"val");var i=new RegExp(e.val,validateFlags(n)?n.string:"");return t.string.match(i)}function validateFlags(e){return!!(e=e&&e.string)&&e.split("").every((function(e){return~"igm".indexOf(e)}))}function math$1(e,t){return _export_assertType_(e,"unit","n"),_export_assertString_(t,"fn"),new ue.Unit(Math[t.string](e.val),e.type)}let B,O,C,j,P,I;function operate(e,t,n){return _export_assertType_(e,"string","op"),u(t,"left"),u(n,"right"),t.operate(e.val,n)}function range(e,t,n){if(_export_assertType_(e,"unit","start"),_export_assertType_(t,"unit","stop"),n){if(_export_assertType_(n,"unit","step"),0==n.val)throw new Error('ArgumentError: "step" argument must not be zero')}else n=new ue.Unit(1);for(var i=new ue.Expression,r=e.val;r<=t.val;r+=n.val)i.push(new ue.Unit(r,e.type));return i}function red(e,t){return e=e.rgba,t?rgba(t,new ue.Unit(e.g),new ue.Unit(e.b),new ue.Unit(e.a)):new ue.Unit(e.r,"")}function remove(e,t){return _export_assertType_(e,"object","object"),_export_assertString_(t,"key"),delete e.vals[t.string],e}function replace(e,t,n){_export_assertString_(e,"pattern"),_export_assertString_(t,"replacement"),_export_assertString_(n,"val"),e=new RegExp(e.string,"g");var i=n.string.replace(e,t.string);return n instanceof ue.Ident?new ue.Ident(i):new ue.String(i)}function rgb(e,t,n){if(1===arguments.length){_export_assertColor_(e);var i=e.rgba;return new ue.RGBA(i.r,i.g,i.b,1)}return rgba(e,t,n,new ue.Unit(1))}match.params=["pattern","val","flags"],math$1.params=["n","fn"],(B=function merge(e){u(e,"dest"),e=f(e).first,_export_assertType_(e,"object","dest");for(var t=f(arguments[arguments.length-1]).first,n=!0===t.val,i=1,r=arguments.length-n;i<r;++i)g(e.vals,f(arguments[i]).first.vals,n);return e}).raw=!0,operate.params=["op","left","right"],(O=function oppositePosition(e){var t=[];return f(e).nodes.forEach((function(e,n){_export_assertString_(e,"position "+n),e=function(){switch(e.string){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";case"center":return"center";default:throw new Error("invalid position "+e)}}(),t.push(new ue.Literal(e))})),t}).raw=!0,(C=function p(){return[].slice.call(arguments).forEach((function(e){(e=f(e)).nodes.length&&console.log("[90minspect:[0m %s",e.toString().replace(/^\(|\)$/g,""))})),ue.null}).raw=!0,(j=function pathjoin(){var t=[].slice.call(arguments).map((function(e){return e.first.string}));return e.join.apply(null,t).replace(/\\/g,"/")}).raw=!0,(P=function pop(e){return(e=f(e)).nodes.pop()}).raw=!0,(I=function(e){e=f(e);for(var t=1,n=arguments.length;t<n;++t)e.nodes.push(f(arguments[t]).clone());return e.nodes.length}).raw=!0,range.params=["start","stop","step"],red.params=["color","value"],remove.params=["object","key"],replace.params=["pattern","replacement","val"],rgb.params=["red","green","blue"];var U=function convertAngle(e,t){return e*{rad:1,deg:180/Math.PI,turn:.5/Math.PI,grad:200/Math.PI}[t]},R=function atan(e,t){t=void 0!==t?t:"deg";var n=Math.pow(10,9),i=Math.asin(e),r=U(i,t);return r=Math.round(r*n)/n,new ue.Unit(r,t)},M=class Compiler extends n{constructor(e,t){super(e),t=t||{},this.compress=t.compress,this.firebug=t.firebug,this.linenos=t.linenos,this.spaces=t["indent spaces"]||2,this.indents=1,this.stack=[]}compile(){return this.visit(this.root)}out(e,t){return e}get indent(){return this.compress?"":new Array(this.indents).join(Array(this.spaces+1).join(" "))}needBrackets(e){return 1==this.indents||"atrule"!=e.nodeName||e.hasOnlyProperties}visitRoot(e){this.buf="";for(var t=0,n=e.nodes.length;t<n;++t){var i=e.nodes[t];(this.linenos||this.firebug)&&this.debugInfo(i);var r=this.visit(i);r&&(this.buf+=this.out(r+"\n",i))}return this.buf}visitBlock(e){var t,n,i,r=this.compress?"":"\n";if(e.hasProperties&&!e.lacksRenderedSelectors){if(n=this.needBrackets(e.node),this.compress)for(var a=e.nodes.length-1;a>=0;--a)if("property"===e.nodes[a].nodeName){i=a;break}n&&(this.buf+=this.out(this.compress?"{":" {\n"),++this.indents);a=0;for(var o=e.nodes.length;a<o;++a)switch(this.last=i===a,(t=e.nodes[a]).nodeName){case"null":case"expression":case"function":case"group":case"block":case"unit":case"media":case"keyframes":case"atrule":case"supports":continue;case!this.compress&&t.inline&&"comment":this.buf=this.buf.slice(0,-1),this.buf+=this.out(" "+this.visit(t)+"\n",t);break;case"property":var h=this.visit(t)+r;this.buf+=this.compress?h:this.out(h,t);break;default:this.buf+=this.out(this.visit(t)+r,t)}n&&(--this.indents,this.buf+=this.out(this.indent+"}"+r))}for(a=0,o=e.nodes.length;a<o;++a)switch((t=e.nodes[a]).nodeName){case"group":case"block":case"keyframes":(this.linenos||this.firebug)&&this.debugInfo(t),this.visit(t);break;case"media":case"import":case"atrule":case"supports":this.visit(t);break;case"comment":t.suppress||(this.buf+=this.out(this.indent+this.visit(t)+"\n",t));break;case"charset":case"literal":case"namespace":this.buf+=this.out(this.visit(t)+"\n",t)}}visitKeyframes(e){if(e.frames){var t="official"==e.prefix?"":"-"+e.prefix+"-";this.buf+=this.out("@"+t+"keyframes "+this.visit(e.val)+(this.compress?"{":" {\n"),e),this.keyframe=!0,++this.indents,this.visit(e.block),--this.indents,this.keyframe=!1,this.buf+=this.out("}"+(this.compress?"":"\n"))}}visitMedia(e){var t=e.val;e.hasOutput&&t.nodes.length&&(this.buf+=this.out("@media ",e),this.visit(t),this.buf+=this.out(this.compress?"{":" {\n"),++this.indents,this.visit(e.block),--this.indents,this.buf+=this.out("}"+(this.compress?"":"\n")))}visitQueryList(e){for(var t=0,n=e.nodes.length;t<n;++t)this.visit(e.nodes[t]),n-1!=t&&(this.buf+=this.out(","+(this.compress?"":" ")))}visitQuery(e){var t=e.nodes.length;e.predicate&&(this.buf+=this.out(e.predicate+" ")),e.type&&(this.buf+=this.out(e.type+(t?" and ":"")));for(var n=0;n<t;++n)this.buf+=this.out(this.visit(e.nodes[n])),t-1!=n&&(this.buf+=this.out(" and "))}visitFeature(e){return e.expr?e.expr.isEmpty?"("+e.name+")":"("+e.name+":"+(this.compress?"":" ")+this.visit(e.expr)+")":e.name}visitImport(e){this.buf+=this.out("@import "+this.visit(e.path)+";\n",e)}visitAtrule(e){var t=this.compress?"":"\n";this.buf+=this.out(this.indent+"@"+e.type,e),e.val&&(this.buf+=this.out(" "+e.val.trim())),e.block?e.block.isEmpty?this.buf+=this.out((this.compress?"":" ")+"{}"+t):e.hasOnlyProperties?this.visit(e.block):(this.buf+=this.out(this.compress?"{":" {\n"),++this.indents,this.visit(e.block),--this.indents,this.buf+=this.out(this.indent+"}"+t)):this.buf+=this.out(";"+t)}visitSupports(e){e.hasOutput&&(this.buf+=this.out(this.indent+"@supports ",e),this.isCondition=!0,this.buf+=this.out(this.visit(e.condition)),this.isCondition=!1,this.buf+=this.out(this.compress?"{":" {\n"),++this.indents,this.visit(e.block),--this.indents,this.buf+=this.out(this.indent+"}"+(this.compress?"":"\n")))}visitComment(e){return this.compress&&e.suppress?"":e.str}visitFunction(e){return e.name}visitCharset(e){return"@charset "+this.visit(e.val)+";"}visitNamespace(e){return"@namespace "+(e.prefix?this.visit(e.prefix)+" ":"")+this.visit(e.val)+";"}visitLiteral(e){var t=e.val;return e.css&&(t=t.replace(/^  /gm,"")),t}visitBoolean(e){return e.toString()}visitRGBA(e){return e.toString()}visitHSLA(e){return e.rgba.toString()}visitUnit(e){var t=e.type||"",n=e.val,i=n!=(0|n);if(this.compress){if(!["%","s","ms","deg","fr"].includes(t)&&0==n)return"0";if(i&&n<1&&n>-1)return n.toString().replace("0.",".")+t}return(i?parseFloat(n.toFixed(15)):n).toString()+t}visitGroup(e){var t=this.keyframe?[]:this.stack,n=this.compress?",":",\n";if(t.push(e.nodes),e.block.hasProperties){var i=_export_compileSelectors_.call(this,t),r=i.length;if(r){this.keyframe&&(n=this.compress?",":", ");for(var a=0;a<r;++a){var o=i[a],h=a==r-1;this.keyframe&&(o=a?o.trim():o),this.buf+=this.out(o+(h?"":n),e.nodes[a])}}else e.block.lacksRenderedSelectors=!0}this.visit(e.block),t.pop()}visitIdent(e){return e.name}visitString(e){return this.isURL?e.val:e.toString()}visitNull(e){return""}visitCall(e){this.isURL="url"==e.name;var t=e.args.nodes.map((function(e){return this.visit(e)}),this).join(this.compress?",":", ");return this.isURL&&(t='"'+t+'"'),this.isURL=!1,e.name+"("+t+")"}visitExpression(e){var t=[],n=this,i=e.nodes.length,r=e.nodes.map((function(e){return n.visit(e)}));return r.forEach((function(a,o){var h=o==i-1;if(t.push(a),"/"!=r[o+1]&&"/"!=a&&!h){var l=n.isURL||n.isCondition&&(")"==r[o+1]||"("==a)?"":" ";t.push(e.isList?n.compress?",":", ":l)}})),t.join("")}get visitArguments(){return this.visitExpression}visitProperty(e){var t=this.visit(e.expr).trim(),n=e.name||e.segments.join(""),i=[];return"@apply"===n?(i.push(this.out(this.indent),this.out(n+" ",e),this.out(t,e.expr),this.out(this.compress&&this.last?"":";")),i.join("")):(i.push(this.out(this.indent),this.out(n+(this.compress?":":": "),e),this.out(t,e.expr),this.out(this.compress&&this.last?"":";")),i.join(""))}debugInfo(e){var t="stdin"==e.filename?"stdin":notImplemented(e.filename),n=(e.nodes&&e.nodes.length?e.nodes[0].lineno:e.lineno)||1;this.linenos&&(this.buf+="\n/* line "+n+" : "+t+" */\n"),this.firebug&&(t="file\\:\\/\\/"+t.replace(/([.:/\\])/g,(function(e){return"\\"+("\\"===e?"/":e)})),n="\\00003"+n,this.buf+="\n@media -stylus-debug-info{filename{font-family:"+t+"}line{font-family:"+n+"}}\n")}};let F;function saturation(e,t){if(t){var n=e.hsla;return hsla(new ue.Unit(n.h),t,new ue.Unit(n.l),new ue.Unit(n.a))}return component(e,new ue.String("saturation"))}(F=function s(e){e=f(e).nodes[0],_export_assertString_(e);var t=this,n=e.string,i=arguments,r=1;return n=n.replace(/%(s|d)/g,(function(e,n){var a=i[r++]||ue.null;switch(n){case"s":return new M(a,t&&t.options).compile();case"d":if("unit"!=(a=f(a).first).nodeName)throw new Error("%d requires a unit");return a.val}})),new ue.Literal(n)}).raw=!0,saturation.params=["color","value"];var G=class Normalizer extends n{constructor(e,t){super(e),t=t||{},this.hoist=t["hoist atrules"],this.stack=[],this.map={},this.imports=[]}normalize(){var e=this.visit(this.root);return this.hoist&&(this.imports.length&&(e.nodes=this.imports.concat(e.nodes)),this.charset&&(e.nodes=[this.charset].concat(e.nodes))),e}bubble(e){var t=[],n=[],i=this;if(function filterProps(e){e.nodes.forEach((function(e){switch((e=i.visit(e)).nodeName){case"property":t.push(e);break;case"block":filterProps(e);break;default:n.push(e)}}))}(e.block),t.length){var r=new ue.Selector([new ue.Literal("&")]);r.lineno=e.lineno,r.column=e.column,r.filename=e.filename,r.val="&",(a=new ue.Group).lineno=e.lineno,a.column=e.column,a.filename=e.filename;var a,o=new ue.Block(e.block,a);o.lineno=e.lineno,o.column=e.column,o.filename=e.filename,t.forEach((function(e){o.push(e)})),a.push(r),a.block=o,e.block.nodes=[],e.block.push(a),n.forEach((function(t){e.block.push(t)})),(a=this.closestGroup(e.block))&&(e.group=a.clone()),e.bubbled=!0}}closestGroup(e){for(var t,n=e.parent;n&&(t=n.node);){if("group"==t.nodeName)return t;n=t.block&&t.block.parent}}visitRoot(e){for(var t,n=new ue.Root,i=0;i<e.nodes.length;++i)switch((t=e.nodes[i]).nodeName){case"null":case"expression":case"function":case"unit":case"atblock":continue;default:this.rootIndex=i,n.push(this.visit(t))}return n}visitProperty(e){return this.visit(e.expr),e}visitExpression(e){return e.nodes=e.nodes.map((function(t){if("block"==t.nodeName){var n=new ue.Literal("block");return n.lineno=e.lineno,n.column=e.column,n}return t})),e}visitBlock(e){var t;if(e.hasProperties)for(var n=0,i=e.nodes.length;n<i;++n)switch((t=e.nodes[n]).nodeName){case"null":case"expression":case"function":case"group":case"unit":case"atblock":continue;default:e.nodes[n]=this.visit(t)}for(n=0,i=e.nodes.length;n<i;++n)t=e.nodes[n],e.nodes[n]=this.visit(t);return e}visitGroup(e){var t,n=this.stack,i=this.map;e.nodes.forEach((function(n,i){if(~n.val.indexOf(","))if(~n.val.indexOf("\\,"))n.val=n.val.replace(/\\,/g,",");else{t=n.val.split(",");for(var r,a,o="/"==n.val.charAt(0),h=0,l=t.length;h<l;++h)r=t[h].trim(),o&&h>0&&!~r.indexOf("&")&&(r="/"+r),(a=new ue.Selector([new ue.Literal(r)])).val=r,a.block=e.block,e.nodes[i++]=a}})),n.push(e.nodes);var r=_export_compileSelectors_(n,!0);return r.forEach((function(t){i[t]=i[t]||[],i[t].push(e)})),this.extend(e,r),n.pop(),e}visitFunction(){return ue.null}visitMedia(e){var t,n=[],i=this.closestGroup(e.block);return function mergeQueries(t){t.nodes.forEach((function(i,r){switch(i.nodeName){case"media":i.val=e.val.merge(i.val),n.push(i),t.nodes[r]=ue.null;break;case"block":mergeQueries(i);break;default:i.block&&i.block.nodes&&mergeQueries(i.block)}}))}(e.block),this.bubble(e),n.length&&n.forEach((function(e){i?i.block.push(e):this.root.nodes.splice(++this.rootIndex,0,e),e=this.visit(e),t=e.block.parent,!e.bubbled||i&&"group"!=t.node.nodeName||(e.group.block=e.block.nodes[0].block,e.block.nodes[0]=e.group)}),this),e}visitSupports(e){return this.bubble(e),e}visitAtrule(e){return e.block&&(e.block=this.visit(e.block)),e}visitKeyframes(e){var t=e.block.nodes.filter((function(e){return e.block&&e.block.hasProperties}));return e.frames=t.length,e}visitImport(e){return this.imports.push(e),this.hoist?ue.null:e}visitCharset(e){return this.charset=e,this.hoist?ue.null:e}extend(e,t){var n=this.map,i=this,r=this.closestGroup(e.block);e.extends.forEach((function(e){var a=n[e.selector];if(!a){if(e.optional)return;if(!(a=i._checkForPrefixedGroups(e.selector))){var o=new Error('Failed to @extend "'+e.selector+'"');throw o.lineno=e.lineno,o.column=e.column,o}}t.forEach((function(e){var n=new ue.Selector;n.val=e,n.inherits=!1,a.forEach((function(e){r&&r==e||i.extend(e,t),e.push(n)}))}))})),e.block=this.visit(e.block)}_checkForPrefixedGroups(e){for(var t=[],n=this.map,i=null,r=0;r<this.stack.length;r++){var a=this.stack[r][0];if(t.push(a.val),i=n[t.join(" ")+" "+e])break}return i}};function selectorExists(e){if(_export_assertString_(e,"selector"),!this.__selectorsMap__){var t=new G(this.root.clone());t.visit(t.root),this.__selectorsMap__=t.map}return e.string in this.__selectorsMap__}let q;function pushToStack(e,t){e.forEach((function(e){e=e.first,_export_assertString_(e,"selector"),t.push(parse$1(e.string))}))}function parse$1(e){var t,n=new ye(e);return n.state.push("selector-parts"),(t=n.selector()).forEach((function(e){e.val=e.segments.map((function(e){return e.toString()})).join("")})),t}selectorExists.params=["sel"],(q=function selector(){var e=this.selectorStack,t=[].slice.call(arguments);if(1==t.length){var n=f(t[0]),i=n.nodes.length;if(1==i){_export_assertString_(n.first,"selector");var r=l,a=n.first.string,o=new r(a).parse().val;if(o==a)return a;e.push(parse$1(a))}else i>1&&(n.isList?pushToStack(n.nodes,e):e.push(parse$1(n.nodes.map((function(e){return _export_assertString_(e,"selector"),e.string})).join(" "))))}else t.length>1&&pushToStack(t,e);return e.length?_export_compileSelectors_(e).join(","):"&"}).raw=!0;let T,$;function split(e,t){_export_assertString_(e,"delimiter"),_export_assertString_(t,"val");for(var n=t.string.split(e.string),i=new ue.Expression,r=t instanceof ue.Ident?ue.Ident:ue.String,a=0,o=n.length;a<o;++a)i.nodes.push(new r(n[a]));return i}function substr(e,t,n){_export_assertString_(e,"val"),_export_assertType_(t,"unit","start"),n=n&&n.val;var i=e.string.substr(t.val,n);return e instanceof ue.Ident?new ue.Ident(i):new ue.String(i)}function tan(e){_export_assertType_(e,"unit","angle");var t=e.val;"deg"===e.type&&(t*=Math.PI/180);var n=Math.pow(10,9),i=Math.round(Math.sin(t)*n)/n,r=Math.round(Math.cos(t)*n)/n,a=Math.round(n*i/r)/n;return new ue.Unit(a,"")}(T=function(e){return(e=f(e)).nodes.shift()}).raw=!0,split.params=["delim","val"],substr.params=["val","start","length"],($=function slice(e,t,n){if(t=t&&t.nodes[0].val,n=n&&n.nodes[0].val,(e=f(e).nodes).length>1)return m(e.slice(t,n),!0);var i=e[0].string.slice(t,n);return e[0]instanceof ue.Ident?new ue.Ident(i):new ue.String(i)}).raw=!0,tan.params=["angle"];function transparentify(e,t,n){_export_assertColor_(e),e=e.rgba,t=t||new ue.RGBA(255,255,255,1),n||!t||t.rgba||(n=t,t=new ue.RGBA(255,255,255,1)),_export_assertColor_(t),t=t.rgba;var i=["r","g","b"].map((function(n){return(e[n]-t[n])/((0<e[n]-t[n]?255:0)-t[n])})).sort((function(e,t){return t-e}))[0];function processChannel(n){return 0==i?t[n]:t[n]+(e[n]-t[n])/i}return n&&(_export_assertType_(n,"unit","alpha"),"%"==n.type?i=n.val/100:n.type||(i=n=n.val)),i=Math.max(Math.min(i,1),0),new ue.RGBA(processChannel("r"),processChannel("g"),processChannel("b"),Math.round(100*i)/100)}function type(e){return u(e,"expression"),e.nodeName}function unit(e,t){return _export_assertType_(e,"unit","unit"),t?(_export_assertString_(t,"type"),new ue.Unit(e.val,t.string)):e.type||""}function unquote(e){return _export_assertString_(e,"string"),new ue.Literal(e.string)}let J;function use(){}function warn(e){return _export_assertType_(e,"string","msg"),console.warn("Warning: %s",e.val),ue.null}function math(e){return new ue.Unit(Math[e.string])}function prefixClasses(e,t){_export_assertString_(e,"prefix"),_export_assertType_(t,"block","block");var n=this.prefix;return this.options.prefix=this.prefix=e.string,t=this.visit(t),this.options.prefix=this.prefix=n,t}transparentify.params=["top","bottom","alpha"],type.params=["node"],unit.params=["unit","type"],unquote.params=["string"],(J=function(e){e=f(e);for(var t=1,n=arguments.length;t<n;++t)e.nodes.unshift(f(arguments[t]));return e.nodes.length}).raw=!0,use.params=["plugin","options"],warn.params=["msg"],math.params=["prop"],prefixClasses.params=["prefix","block"];const z={};z["add-property"]=y,z.adjust=adjust$1,z.alpha=alpha,z["base-convert"]=x,z.basename=basename,z.blend=blend,z.blue=blue,z.clone=S,z.component=component,z.contrast=contrast,z.convert=convert$1,z["current-media"]=function currentMedia(){var e=this;return new ue.String(function lookForMedia(t){if("media"==t.nodeName)return t.val=e.visit(t.val),t.toString();if(t.block.parent.node)return lookForMedia(t.block.parent.node)}(this.closestBlock.node)||"")},z.define=define,z.dirname=dirname$2,z.error=error,z.extname=extname$1,z.green=green,z.hsl=hsl,z.hsla=hsla,z.hue=hue,z["image-size"]=noop$1,z.json=json,z.length=_,z.lightness=lightness,z["list-separator"]=L,z.lookup=lookup,z.luminosity=luminosity,z.match=match,z.math=math$1,z.merge=z.extend=B,z.operate=operate,z["opposite-position"]=O,z.p=C,z.pathjoin=j,z.pop=P,z.push=z.append=I,z.range=range,z.red=red,z.remove=remove,z.replace=replace,z.rgb=rgb,z.atan=function atan(e,t){t=void 0!==t?t:"deg";var n=Math.atan(e),i=Math.pow(10,9),r=U(n,t);return r=Math.round(r*i)/i,new ue.Unit(r,t)},z.asin=R,z.acos=function acos(e,t){t=void 0!==t?t:"deg";var n=U(Math.PI/2,t)-R(e,t).val,i=Math.pow(10,9);return n=Math.round(n*i)/i,new ue.Unit(n,t)},z.rgba=rgba,z.s=F,z.saturation=saturation,z["selector-exists"]=selectorExists,z.selector=q,z.selectors=function selectors(){var e=this.selectorStack,t=new ue.Expression(!0);if(e.length)for(var n=0;n<e.length;n++){var i,r=e[n];if(r.length>1)t.push(new ue.String(r.map((function(e){return((i=new l(e.val).parse().nested)&&n?"& ":"")+e.val})).join(",")));else{var a=r[0].val;i=new l(a).parse().nested,t.push(new ue.String((i&&n?"& ":"")+a))}}else t.push(new ue.String("&"));return t},z.shift=T,z.split=split,z.substr=substr,z.slice=$,z.tan=tan,z.trace=function trace(){return console.log(this.stack),ue.null},z.transparentify=transparentify,z.type=z.typeof=z["type-of"]=type,z.unit=unit,z.unquote=unquote,z.unshift=z.prepend=J,z.use=use,z.warn=warn,z["-math-prop"]=math,z["-prefix-classes"]=prefixClasses;
/*!
   * Stylus - colors
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */
var H={aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],transparent:[0,0,0,0],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1],rebeccapurple:[102,51,153,1]};function parse(e){return new URL(e)}let Q={};var W=e.extname,K={".gif":"image/gif",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".svg":"image/svg+xml",".webp":"image/webp",".ttf":"application/x-font-ttf",".eot":"application/vnd.ms-fontobject",".woff":"application/font-woff",".woff2":"application/font-woff2"},D="base64",V="charset=utf-8";Q=function(e){var t=(e=e||{}).paths||[],n=null!=e.limit?e.limit:3e4,i=e.mimes||K;function fn(e,r){var a=new M(e),o=D;a.isURL=!0,e=parse(e=e.nodes.map((function(e){return a.visit(e)})).join(""));var h,l,c=W(e.pathname||""),u=i[c],f=e.hash||"",m=new ue.Literal('url("'+e.href+'")'),d=t.concat(this.paths);if(!u)return m;if(e.protocol)return m;var v=_export_lookup_(e.pathname,d);return v?(h=_export_readFileSync_(v),!1!==n&&h.length>n?m:(r&&"utf8"==r.first.val.toLowerCase()?(o=V,l=h.toString().replace(/\s+/g," ").replace(/[{}\|\\\^~\[\]`"<>#%]/g,(function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()})).trim()):l=h.toString(o)+f,new ue.Literal('url("data:'+u+";"+o+","+l+'")'))):(_e.emit("file not found","File "+m+" could not be found, literal url retained!"),m)}return fn.raw=!0,fn},Q.mimes=K;var Z=e.dirname,Y=noop$2();function importFile(e,t,n){var i,r=this.importStack,a=ye;if(e.once){if(this.requireHistory[t])return ue.null;if(this.requireHistory[t]=!0,n&&!this.includeCSS)return e}if(~r.indexOf(t))throw new Error("import loop has been found");var o=_export_readFileSync_(t);if(!o.trim())return ue.null;if(e.path=t,e.dirname=Z(t),i=_export_statSync_(t),e.mtime=i.mtime,this.paths.push(e.dirname),this.options._imports&&this.options._imports.push(e.clone()),r.push(t),ue.filename=t,n&&((n=new ue.Literal(o.replace(/\r\n?/g,"\n"))).lineno=n.column=1,!this.resolveURL))return n;var h=new ue.Block,l=new a(o,g({root:h},this.options));try{h=l.parse()}catch(e){var c=l.lexer.lineno,u=l.lexer.column;if(n&&this.includeCSS&&this.resolveURL)return this.warn("ParseError: "+t+":"+c+":"+u+". This file included as-is"),n;throw e.filename=t,e.lineno=c,e.column=u,e.input=o,e}(h=h.clone(this.currentBlock)).parent=this.currentBlock,h.scope=!1;var f=this.visit(h);return r.pop(),this.resolveURL&&!this.resolveURL.nocheck||this.paths.pop(),f}var X=class Evaluator extends n{constructor(e,t){super(e),t=t||{};var n=this.functions=t.functions||{};this.stack=new r,this.imports=t.imports||[],this.globals=t.globals||{},this.paths=t.paths||[],this.prefix=t.prefix||"",this.filename=t.filename,this.includeCSS=t["include css"],this.resolveURL=n.url&&"resolver"==n.url.name&&n.url.options,this.paths.push(Z(t.filename||".")),this.stack.push(this.global=new o(e)),this.warnings=t.warn,this.options=t,this.calling=[],this.importStack=[],this.requireHistory={},this.return=0}visit(e){try{return super.visit(e)}catch(t){if(t.filename)throw t;t.lineno=e.lineno,t.column=e.column,t.filename=e.filename,t.stylusStack=this.stack.toString();try{t.input=_export_readFileSync_(t.filename)}catch(e){}throw t}}setup(){var e=this.root,t=[];this.populateGlobalScope(),this.imports.forEach((function(e){var n=new ue.Expression;n.push(new ue.String(e)),t.push(new ue.Import(n))}),this),e.nodes=t.concat(e.nodes)}populateGlobalScope(){var e=this.global.scope;Object.keys(H).forEach((function(t){var n=H[t],i=new ue.RGBA(n[0],n[1],n[2],n[3]),r=new ue.Ident(t,i);i.name=t,e.add(r)})),e.add(new ue.Ident("embedurl",new ue.Function("embedurl",Q({limit:!1}))));var t=this.globals;Object.keys(t).forEach((function(n){var i=t[n];i.nodeName||(i=new ue.Literal(i)),e.add(new ue.Ident(n,i))}))}evaluate(){return Y("eval %s",this.filename),this.setup(),this.visit(this.root)}visitGroup(e){return e.nodes=e.nodes.map((function(e){return e.val=this.interpolate(e),Y("ruleset %s",e.val),e}),this),e.block=this.visit(e.block),e}visitReturn(e){throw e.expr=this.visit(e.expr),e}visitMedia(e){return e.block=this.visit(e.block),e.val=this.visit(e.val),e}visitQueryList(e){var t,n;if(e.nodes.forEach(this.visit,this),1==e.nodes.length&&(n=e.nodes[0],t=this.lookup(n.type))){if(!(t=t.first.string))return e;var i=new ye(t,this.options);e=this.visit(i.queries())}return e}visitQuery(e){return e.predicate=this.visit(e.predicate),e.type=this.visit(e.type),e.nodes.forEach(this.visit,this),e}visitFeature(e){return e.name=this.interpolate(e),e.expr&&(this.return++,e.expr=this.visit(e.expr),this.return--),e}visitObject(e){for(var t in e.vals)e.vals[t]=this.visit(e.vals[t]);return e}visitMember(e){var t=e.left,n=e.right,i=this.visit(t).first;if("object"!=i.nodeName)throw new Error(t.toString()+" has no property ."+n);return e.val&&(this.return++,i.set(n.name,this.visit(e.val)),this.return--),i.get(n.name)}visitKeyframes(e){var t;return e.fabricated?e:(e.val=this.interpolate(e).trim(),(t=this.lookup(e.val))&&(e.val=t.first.string||t.first.name),e.block=this.visit(e.block),"official"!=e.prefix?e:(this.vendors.forEach((function(t){if("ms"!=t){var n=e.clone();n.val=e.val,n.prefix=t,n.block=e.block,n.fabricated=!0,this.currentBlock.push(n)}}),this),ue.null))}visitFunction(e){var t=this.stack.currentFrame.scope.lookup(e.name);return t&&this.warn("local "+t.nodeName+' "'+e.name+'" previously defined in this scope'),this.functions[e.name]&&this.warn('user-defined function "'+e.name+'" is already defined'),z[e.name]&&this.warn('built-in function "'+e.name+'" is already defined'),e}visitEach(e){this.return++;var t,n,i=f(this.visit(e.expr)),r=i.nodes.length,a=new ue.Ident(e.val),o=new ue.Ident(e.key||"__index__"),h=this.currentScope,l=this.currentBlock,c=[],u=this;function visitBody(n,i){h.add(i),h.add(n),t=u.visit(e.block.clone()),c=c.concat(t.nodes)}if(this.return--,e.block.scope=!1,1==r&&"object"==i.nodes[0].nodeName)for(var m in(n=i.nodes[0]).vals)a.val=new ue.String(m),o.val=n.get(m),visitBody(o,a);else for(var d=0;d<r;++d)a.val=i.nodes[d],o.val=new ue.Unit(d),visitBody(o,a);return this.mixin(c,l),c[c.length-1]||ue.null}visitCall(e){var t,n,i=this.lookup(e.name);if(this.ignoreColors="url"==e.name,i&&"expression"==i.nodeName&&(i=i.nodes[0]),i&&"function"!=i.nodeName&&(i=this.lookupFunction(e.name)),!i||"function"!=i.nodeName)return"calc"==this.unvendorize(e.name)?(t=e.args.nodes&&e.args.nodes[0])&&(n=new ue.Literal(e.name+t)):n=this.literalCall(e),this.ignoreColors=!1,n;if(this.calling.push(e.name),this.calling.length>200)throw new RangeError("Maximum stylus call stack size exceeded");"expression"==i.nodeName&&(i=i.first),this.return++;var r=this.visit(e.args);for(var a in r.map)r.map[a]=this.visit(r.map[a].clone());return this.return--,i.fn?n=this.invokeBuiltin(i.fn,r):"function"==i.nodeName&&(e.block&&(e.block=this.visit(e.block)),n=this.invokeFunction(i,r,e.block)),this.calling.pop(),this.ignoreColors=!1,n}visitIdent(e){var t;if(e.property)return(t=this.lookupProperty(e.name))?this.visit(t.expr.clone()):ue.null;if(e.val.isNull){var n=this.lookup(e.name);return n&&e.mixin&&this.mixinNode(n),n?this.visit(n):e}return this.return++,e.val=this.visit(e.val),this.return--,this.currentScope.add(e),e.val}visitBinOp(e){if("is defined"==e.op)return this.isDefined(e.left);this.return++;var t=e.op,n=this.visit(e.left),i="||"==t||"&&"==t?e.right:this.visit(e.right),r=e.val?this.visit(e.val):null;this.return--;try{return this.visit(n.operate(t,i,r))}catch(e){if("CoercionError"==e.name)switch(t){case"==":return ue.false;case"!=":return ue.true}throw e}}visitUnaryOp(e){var t=e.op,n=this.visit(e.expr);switch("!"!=t&&(n=n.first.clone(),_export_assertType_(n,"unit")),t){case"-":n.val=-n.val;break;case"+":n.val=+n.val;break;case"~":n.val=~n.val;break;case"!":return n.toBoolean().negate()}return n}visitTernary(e){return this.visit(e.cond).toBoolean().isTrue?this.visit(e.trueExpr):this.visit(e.falseExpr)}visitExpression(e){for(var t=0,n=e.nodes.length;t<n;++t)e.nodes[t]=this.visit(e.nodes[t]);return this.castable(e)&&(e=this.cast(e)),e}get visitArguments(){return this.visitExpression}visitProperty(e){var t=this.interpolate(e),n=this.lookup(t),i=n&&"function"==n.first.nodeName,r=~this.calling.indexOf(t),a=this.property;if(!i||r||e.literal)return this.return++,e.name=t,e.literal=!0,this.property=e,e.expr=this.visit(e.expr),this.property=a,this.return--,e;var o=ue.Arguments.fromExpression(f(e.expr.clone()));e.name=t,this.property=e,this.return++,this.property.expr=this.visit(e.expr),this.return--;var h=this.visit(new ue.Call(t,o));return this.property=a,h}visitRoot(e){if(e!=this.root)return e.constructor=ue.Block,this.visit(e);for(var t=0;t<e.nodes.length;++t)e.index=t,e.nodes[t]=this.visit(e.nodes[t]);return e}visitBlock(e){for(this.stack.push(new o(e)),e.index=0;e.index<e.nodes.length;++e.index)try{e.nodes[e.index]=this.visit(e.nodes[e.index])}catch(t){if("return"==t.nodeName){if(this.return)throw this.stack.pop(),t;e.nodes[e.index]=t;break}throw t}return this.stack.pop(),e}visitAtblock(e){return e.block=this.visit(e.block),e}visitAtrule(e){return e.val=this.interpolate(e),e.block&&(e.block=this.visit(e.block)),e}visitSupports(e){var t,n=e.condition;return this.return++,e.condition=this.visit(n),this.return--,t=n.first,1==n.nodes.length&&"string"==t.nodeName&&(e.condition=t.string),e.block=this.visit(e.block),e}visitIf(e){var t,n=this.currentBlock,i=e.negate;this.return++;var r=this.visit(e.cond).first.toBoolean();if(this.return--,e.block.scope=e.block.hasMedia,i)r.isFalse&&(t=this.visit(e.block));else if(r.isTrue)t=this.visit(e.block);else if(e.elses.length)for(var a,o=e.elses,h=o.length,l=0;l<h;++l)if(o[l].cond){if(o[l].block.scope=o[l].block.hasMedia,this.return++,a=this.visit(o[l].cond).first.toBoolean(),this.return--,a.isTrue){t=this.visit(o[l].block);break}}else o[l].scope=o[l].hasMedia,t=this.visit(o[l]);return t&&!e.postfix&&n.node&&~["group","atrule","media","supports","keyframes"].indexOf(n.node.nodeName)?(this.mixin(t.nodes,n),ue.null):t||ue.null}visitExtend(e){var t=this.currentBlock;return"group"!=t.node.nodeName&&(t=this.closestGroup),e.selectors.forEach((function(e){t.node.extends.push({selector:this.interpolate(e.clone()).trim(),optional:e.optional,lineno:e.lineno,column:e.column})}),this),ue.null}visitImport(e){this.return++;var t,n,i=this.visit(e.path).first,r=e.once?"require":"import";if(this.return--,"url"==i.name){if(e.once)throw new Error("You cannot @require a url");return e}if(!i.string)throw new Error("@"+r+" string expected");var a=i=i.string;if(/(?:url\s*\(\s*)?['"]?(?:#|(?:https?:)?\/\/)/i.test(i)){if(e.once)throw new Error("You cannot @require a url");return e}if(/\.css(?:"|$)/.test(i)&&(n=!0,!e.once&&!this.includeCSS))return e;if(n||/\.styl$/i.test(i)||(i+=".styl"),(t=c(i,this.paths,this.filename))||(t=_export_lookupIndex_(a,this.paths,this.filename)),!t)throw new Error("failed to locate @"+r+" file "+i);for(var o=new ue.Block,h=0,l=t.length;h<l;++h)o.push(importFile.call(this,e,t[h],n));return o}invokeFunction(e,t,n){var i=new ue.Block(e.block.parent),r=e.block.clone(i),a=this.stack.currentFrame.block;this.stack.push(new o(i));var h=this.currentScope;"arguments"!=t.nodeName&&((c=new ue.Expression).push(t),t=ue.Arguments.fromExpression(c));if(h.add(new ue.Ident("arguments",t)),h.add(new ue.Ident("mixin",this.return?ue.false:new ue.String(a.nodeName))),this.property){var l=this.propertyExpression(this.property,e.name);h.add(new ue.Ident("current-property",l))}else h.add(new ue.Ident("current-property",ue.null));for(var c=new ue.Expression,u=this.calling.length-1;u--;)c.push(new ue.Literal(this.calling[u]));h.add(new ue.Ident("called-from",c));u=0;var f=t.nodes.length;return e.params.nodes.forEach((function(n){if(n.rest){for(n.val=new ue.Expression;u<f;++u)n.val.push(t.nodes[u]);n.val.preserve=!0,n.val.isList=t.isList}else{var i=t.map[n.name]||t.nodes[u++];if(n=n.clone(),i?i.isEmpty?t.nodes[u-1]=this.visit(n):n.val=i:t.push(n.val),n.val.isNull)throw new Error('argument "'+n+'" required for '+e)}h.add(n)}),this),n&&h.add(new ue.Ident("block",n,!0)),this.invoke(r,!0,e.filename)}invokeBuiltin(e,t){e.raw?t=t.nodes:(e.params||(e.params=_export_params_(e)),t=e.params.reduce((function(e,n){var i=t.map[n]||t.nodes.shift();if(i){var r=(i=f(i)).nodes.length;if(r>1)for(var a=0;a<r;++a)e.push(f(i.nodes[a].first));else e.push(i.first)}return e}),[]));var n=m(e.apply(this,t)),i=new ue.Expression;return i.push(n),n=i,this.invoke(n)}invoke(e,t,n){var i;return n&&this.paths.push(Z(n)),this.return?(i=this.eval(e.nodes),t&&this.stack.pop()):(e=this.visit(e),t&&this.stack.pop(),this.mixin(e.nodes,this.currentBlock),i=ue.null),n&&this.paths.pop(),i}mixin(e,t){if(e.length){var n=t.nodes.length,i=t.nodes.slice(0,t.index),r=t.nodes.slice(t.index+1,n);this._mixin(e,i,t),t.index=0,t.nodes=i.concat(r)}}_mixin(e,t,n){for(var i,r=e.length,a=0;a<r;++a)switch((i=e[a]).nodeName){case"return":return;case"block":this._mixin(i.nodes,t,n);break;case"media":var o=i.block.parent.node;o&&"call"!=o.nodeName&&(i.block.parent=n);case"property":var h=i.expr;i.literal&&"block"==h.first.name&&((h=f(h)).nodes[0]=new ue.Literal("block"));default:t.push(i)}}mixinNode(e){switch((e=this.visit(e.first)).nodeName){case"object":return this.mixinObject(e),ue.null;case"block":case"atblock":return this.mixin(e.nodes,this.currentBlock),ue.null}}mixinObject(e){var t,n=ye,i=this.root,r="$block "+e.toBlock(),a=new n(r,g({root:t},this.options));try{t=a.parse()}catch(e){throw e.filename=this.filename,e.lineno=a.lexer.lineno,e.column=a.lexer.column,e.input=r,e}t.parent=i,t.scope=!1;for(var o=this.visit(t).first.nodes,h=0,l=o.length;h<l;++h)if(o[h].block){this.mixin(o[h].block.nodes,this.currentBlock);break}}eval(e){if(!e)return ue.null;var t=e.length,n=ue.null;try{for(var i=0;i<t;++i)switch((n=e[i]).nodeName){case"if":if("block"!=n.block.nodeName){n=this.visit(n);break}case"each":case"block":(n=this.visit(n)).nodes&&(n=this.eval(n.nodes));break;default:n=this.visit(n)}}catch(e){if("return"==e.nodeName)return e.expr;throw e}return n}literalCall(e){return e.args=this.visit(e.args),e}lookupProperty(e){for(var t,n,i,r=this.stack.length,a=this.currentBlock.index,o=r;r--;)if((n=this.stack[r].block).node)switch(n.node.nodeName){case"group":case"function":case"if":case"each":case"atrule":case"media":case"atblock":case"call":if(t=n.nodes,r+1==o){for(;a--;)if(this.property!=t[a]&&e==this.interpolate(t[a]))return t[a].clone()}else for(i=t.length;i--;)if("property"==t[i].nodeName&&this.property!=t[i]&&e==this.interpolate(t[i]))return t[i].clone()}return t.null}get closestBlock(){for(var e,t=this.stack.length;t--;)if((e=this.stack[t].block).node)switch(e.node.nodeName){case"group":case"keyframes":case"atrule":case"atblock":case"media":case"call":return e}}get closestGroup(){for(var e,t=this.stack.length;t--;)if((e=this.stack[t].block).node&&"group"==e.node.nodeName)return e}get selectorStack(){for(var e,t=[],n=0,i=this.stack.length;n<i;++n)(e=this.stack[n].block).node&&"group"==e.node.nodeName&&(e.node.nodes.forEach((function(e){e.val||(e.val=this.interpolate(e))}),this),t.push(e.node.nodes));return t}lookup(e){var t;if(!this.ignoreColors||!(e in H))return(t=this.stack.lookup(e))?f(t):this.lookupFunction(e)}interpolate(e){var t=this,n="selector"==e.nodeName;function toString(e){switch(e.nodeName){case"function":case"ident":return e.name;case"literal":case"string":return!t.prefix||e.prefixed||e.val.nodeName||(e.val=e.val.replace(/\.(?=[\w-])|^\.$/g,"."+t.prefix),e.prefixed=!0),e.val;case"unit":return"%"==e.type?e.val+"%":e.val;case"member":return toString(t.visit(e));case"expression":if(t.calling&&~t.calling.indexOf("selector")&&t._selector)return t._selector;t.return++;var i=toString(t.visit(e).first);return t.return--,n&&(t._selector=i),i}}return e.segments?e.segments.map(toString).join(""):toString(e)}lookupFunction(e){var t=this.functions[e]||z[e];if(t)return new ue.Function(e,t)}isDefined(e){if("ident"==e.nodeName)return new ue.Boolean(this.lookup(e.name));throw new Error('invalid "is defined" check on non-variable '+e)}propertyExpression(e,t){var n=new ue.Expression,i=e.expr.clone();return n.push(new ue.String(e.name)),function replace(e){return"call"==e.nodeName&&t==e.name?new ue.Literal("__CALL__"):(e.nodes&&(e.nodes=e.nodes.map(replace)),e)}(i),n.push(i),n}cast(e){return new ue.Unit(e.first.val,e.nodes[1].name)}castable(e){return 2==e.nodes.length&&"unit"==e.first.nodeName&&~i.indexOf(e.nodes[1].name)}warn(e){this.warnings&&console.warn("[33mWarning:[0m "+e)}get currentBlock(){return this.stack.currentFrame.block}get vendors(){return this.lookup("vendors").nodes.map((function(e){return e.string}))}unvendorize(e){for(var t=0,n=this.vendors.length;t<n;t++)if("official"!=this.vendors[t]){var i="-"+this.vendors[t]+"-";if(~e.indexOf(i))return e.replace(i,"")}return e}get currentScope(){return this.stack.currentFrame.scope}get currentFrame(){return this.stack.currentFrame}};class CoercionError extends Error{constructor(e){super(),this.name="CoercionError",this.message=e,Error.captureStackTrace&&Error.captureStackTrace(this,CoercionError)}}var ee=class Node{constructor(){this.lineno=ue.lineno||1,this.column=ue.column||1,this.filename=ue.filename}get first(){return this}get hash(){return this.val}get nodeName(){return this.constructor.name.toLowerCase()}clone(){return this}toJSON(){return{lineno:this.lineno,column:this.column,filename:this.filename}}eval(){return new X(this).evaluate()}toBoolean(){return ue.true}toExpression(){if("expression"==this.nodeName)return this;var e=new ue.Expression;return e.push(this),e}shouldCoerce(e){switch(e){case"is a":case"in":case"||":case"&&":return!1;default:return!0}}operate(e,t){switch(e){case"is a":if("string"==t.first.nodeName)return new ue.Boolean(this.nodeName==t.val);throw new Error('"is a" expects a string, got '+t.toString());case"==":return new ue.Boolean(this.hash==t.hash);case"!=":return new ue.Boolean(this.hash!=t.hash);case">=":return new ue.Boolean(this.hash>=t.hash);case"<=":return new ue.Boolean(this.hash<=t.hash);case">":return new ue.Boolean(this.hash>t.hash);case"<":return new ue.Boolean(this.hash<t.hash);case"||":return this.toBoolean().isTrue?this:t;case"in":var n=f(t).nodes,i=n&&n.length,r=this.hash;if(!n)throw new Error('"in" given invalid right-hand operand, expecting an expression');if(1==i&&"object"==n[0].nodeName)return new ue.Boolean(n[0].has(this.hash));for(var a=0;a<i;++a)if(r==n[a].hash)return ue.true;return ue.false;case"&&":var o=this.toBoolean(),h=t.toBoolean();return o.isTrue&&h.isTrue?t:o.isFalse?this:t;default:if("[]"==e)var l="cannot perform "+this+"["+t+"]";else l="cannot perform "+this+" "+e+" "+t;throw new Error(l)}}coerce(e){if(e.nodeName==this.nodeName)return e;throw new CoercionError("cannot coerce "+e+" to "+this.nodeName)}},te={mm:{val:1,label:"mm"},cm:{val:10,label:"mm"},in:{val:25.4,label:"mm"},pt:{val:25.4/72,label:"mm"},ms:{val:1,label:"ms"},s:{val:1e3,label:"ms"},Hz:{val:1,label:"Hz"},kHz:{val:1e3,label:"Hz"}},se=z.s;let ie,re;function clampDegrees(e){return(e%=360)>=0?e:360+e}function clampPercentage(e){return Math.max(0,Math.min(e,100))}ie=class HSLA extends ee{constructor(e,t,n,i){var r;super(),this.h=clampDegrees(e),this.s=clampPercentage(t),this.l=clampPercentage(n),this.a=(r=i,Math.max(0,Math.min(r,1))),this.hsla=this}toString(){return"hsla("+this.h+","+this.s.toFixed(0)+"%,"+this.l.toFixed(0)+"%,"+this.a+")"}clone(e){var t=new HSLA(this.h,this.s,this.l,this.a);return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"HSLA",h:this.h,s:this.s,l:this.l,a:this.a,lineno:this.lineno,column:this.column,filename:this.filename}}get rgba(){return ue.RGBA.fromHSLA(this)}get hash(){return this.rgba.toString()}add(e,t,n){return new HSLA(this.h+e,this.s+t,this.l+n,this.a)}sub(e,t,n){return this.add(-e,-t,-n)}operate(e,t){switch(e){case"==":case"!=":case"<=":case">=":case"<":case">":case"is a":case"||":case"&&":return this.rgba.operate(e,t);default:return this.rgba.operate(e,t).hsla}}adjustLightness(e){return this.l=clampPercentage(this.l+this.l*(e/100)),this}adjustHue(e){return this.h=clampDegrees(this.h+e),this}static fromRGBA(e){var t,n,i=e.r/255,r=e.g/255,a=e.b/255,o=e.a,h=Math.min(i,r,a),l=Math.max(i,r,a),c=(l+h)/2,u=l-h;switch(l){case h:t=0;break;case i:t=60*(r-a)/u;break;case r:t=60*(a-i)/u+120;break;case a:t=60*(i-r)/u+240}return n=l==h?0:c<.5?u/(2*c):u/(2-2*c),new HSLA(t%=360,n*=100,c*=100,o)}};var ae=z.adjust;function clamp(e){return Math.max(0,Math.min(e.toFixed(0),255))}re=class RGBA extends ee{constructor(e,t,n,i){var r;super(),this.r=clamp(e),this.g=clamp(t),this.b=clamp(n),this.a=(r=i,Math.max(0,Math.min(r,1))),this.name="",this.rgba=this}static withoutClamping(e,t,n,i){var r=new RGBA(0,0,0,0);return r.r=e,r.g=t,r.b=n,r.a=i,r}clone(){var e=new RGBA(this.r,this.g,this.b,this.a);return e.raw=this.raw,e.name=this.name,e.lineno=this.lineno,e.column=this.column,e.filename=this.filename,e}toJSON(){return{__type:"RGBA",r:this.r,g:this.g,b:this.b,a:this.a,raw:this.raw,name:this.name,lineno:this.lineno,column:this.column,filename:this.filename}}toBoolean(){return ue.true}get hsla(){return ie.fromRGBA(this)}get hash(){return this.toString()}add(e,t,n,i){return new RGBA(this.r+e,this.g+t,this.b+n,this.a+i)}sub(e,t,n,i){return new RGBA(this.r-e,this.g-t,this.b-n,1==i?this.a:this.a-i)}multiply(e){return new RGBA(this.r*e,this.g*e,this.b*e,this.a)}divide(e){return new RGBA(this.r/e,this.g/e,this.b/e,this.a)}operate(e,t){switch("in"!=e&&(t=t.first),e){case"is a":if("string"==t.nodeName&&"color"==t.string)return ue.true;break;case"+":switch(t.nodeName){case"unit":var n=t.val;switch(t.type){case"%":return ae(this,new ue.String("lightness"),t);case"deg":return this.hsla.adjustHue(n).rgba;default:return this.add(n,n,n,0)}case"rgba":return this.add(t.r,t.g,t.b,t.a);case"hsla":return this.hsla.add(t.h,t.s,t.l)}break;case"-":switch(t.nodeName){case"unit":n=t.val;switch(t.type){case"%":return ae(this,new ue.String("lightness"),new ue.Unit(-n,"%"));case"deg":return this.hsla.adjustHue(-n).rgba;default:return this.sub(n,n,n,0)}case"rgba":return this.sub(t.r,t.g,t.b,t.a);case"hsla":return this.hsla.sub(t.h,t.s,t.l)}break;case"*":if("unit"===t.nodeName)return this.multiply(t.val);break;case"/":if("unit"===t.nodeName)return this.divide(t.val)}return super.operate(e,t)}toString(){function pad(e){return e<16?"0"+e.toString(16):e.toString(16)}if("transparent"==this.name)return this.name;if(1==this.a){var e=pad(this.r),t=pad(this.g),n=pad(this.b);return e[0]==e[1]&&t[0]==t[1]&&n[0]==n[1]?"#"+e[0]+t[0]+n[0]:"#"+e+t+n}return"rgba("+this.r+","+this.g+","+this.b+","+ +this.a.toFixed(3)+")"}static fromHSLA(e){var t=e.h/360,n=e.s/100,i=e.l/100,r=e.a,a=i<=.5?i*(n+1):i+n-i*n,o=2*i-a,h=255*hue(t+1/3),l=255*hue(t),c=255*hue(t-1/3);function hue(e){return e<0&&++e,e>1&&--e,6*e<1?o+(a-o)*e*6:2*e<1?a:3*e<2?o+(a-o)*(2/3-e)*6:o}return new RGBA(h,l,c,r)}};var oe=class Atrule extends ee{constructor(e){super(),this.type=e}get hasOnlyProperties(){if(!this.block)return!1;for(var e=this.block.nodes,t=0,n=e.length;t<n;++t)switch(e[t].nodeName,e[t].nodeName){case"property":case"expression":case"comment":continue;default:return!1}return!0}clone(e){var t=new Atrule(this.type);return this.block&&(t.block=this.block.clone(e,t)),t.segments=this.segments.map((function(n){return n.clone(e,t)})),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){var e={__type:"Atrule",type:this.type,segments:this.segments,lineno:this.lineno,column:this.column,filename:this.filename};return this.block&&(e.block=this.block),e}toString(){return"@"+this.type}get hasOutput(){return!!this.block&&hasOutput(this.block)}};function hasOutput(e){var t=e.nodes;return!t.every((function(e){return"group"==e.nodeName&&e.hasOnlyPlaceholders}))&&t.some((function(e){switch(e.nodeName){case"property":case"literal":case"import":return!0;case"block":return hasOutput(e);default:if(e.block)return hasOutput(e.block)}}))}var he={}.constructor,le=class Expression extends ee{constructor(e){super(),this.nodes=[],this.isList=e}get isEmpty(){return!this.nodes.length}get first(){return this.nodes[0]?this.nodes[0].first:ue.null}get hash(){return this.nodes.map((function(e){return e.hash})).join("::")}clone(e){var t=new this.constructor(this.isList);return t.preserve=this.preserve,t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t.nodes=this.nodes.map((function(n){return n.clone(e,t)})),t}push(e){this.nodes.push(e)}operate(e,t,n){switch(e){case"[]=":var i=this,r=f(t).nodes;n=f(n);return r.forEach((function(e){if(u=i.nodes.length,"unit"==e.nodeName){for(var t=e.val<0?u+e.val:e.val,r=t;t-- >u;)i.nodes[t]=ue.null;i.nodes[r]=n}else e.string&&(a=i.nodes[0])&&"object"==a.nodeName&&a.set(e.string,n.clone())})),n;case"[]":var a,o=new ue.Expression,h=f(this).nodes;return(r=f(t).nodes).forEach((function(e){"unit"==e.nodeName?a=h[e.val<0?h.length+e.val:e.val]:"object"==h[0].nodeName&&(a=h[0].get(e.string)),a&&o.push(a)})),o.isEmpty?ue.null:f(o);case"||":return this.toBoolean().isTrue?this:t;case"in":return super.operate(e,t);case"!=":return this.operate("==",t,n).negate();case"==":var l,c,u=this.nodes.length;t=t.toExpression();if(u!=t.nodes.length)return ue.false;for(var m=0;m<u;++m)if(l=this.nodes[m],c=t.nodes[m],!l.operate(e,c).isTrue)return ue.false;return ue.true;default:return this.first.operate(e,t,n)}}toBoolean(){return this.nodes.length>1?ue.true:this.first.toBoolean()}toString(){return"("+this.nodes.map((function(e){return e.toString()})).join(this.isList?", ":" ")+")"}toJSON(){return{__type:"Expression",isList:this.isList,preserve:this.preserve,lineno:this.lineno,column:this.column,filename:this.filename,nodes:this.nodes}}},ce=le;const ue={
/*!
   * Stylus - nodes
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */
lineno:null,column:null,filename:null};ue.Node=ee,ue.Root=class Root extends ee{constructor(){super(),this.nodes=[]}push(e){this.nodes.push(e)}unshift(e){this.nodes.unshift(e)}clone(){var e=new Root;return e.lineno=this.lineno,e.column=this.column,e.filename=this.filename,this.nodes.forEach((function(t){e.push(t.clone(e,e))})),e}toString(){return"[Root]"}toJSON(){return{__type:"Root",nodes:this.nodes,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Null=class Null extends ee{toString(){return"null"}inspect(){return"null"}toBoolean(){return ue.false}get isNull(){return!0}get hash(){return null}toJSON(){return{__type:"Null",lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Each=class Each extends ee{constructor(e,t,n,i){super(),this.val=e,this.key=t,this.expr=n,this.block=i}clone(e){var t=new Each(this.val,this.key);return t.expr=this.expr.clone(e,t),t.block=this.block.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Each",val:this.val,key:this.key,expr:this.expr,block:this.block,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.If=class If extends ee{constructor(e,t){super(),this.cond=e,this.elses=[],t&&t.nodeName?this.block=t:this.negate=t}clone(e){var t=new If;return t.cond=this.cond.clone(e,t),t.block=this.block.clone(e,t),t.elses=this.elses.map((function(n){return n.clone(e,t)})),t.negate=this.negate,t.postfix=this.postfix,t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"If",cond:this.cond,block:this.block,elses:this.elses,negate:this.negate,postfix:this.postfix,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Call=class Call extends ee{constructor(e,t){super(),this.name=e,this.args=t}clone(e){var t=new Call(this.name);return t.args=this.args.clone(e,t),this.block&&(t.block=this.block.clone(e,t)),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toString(){var e=this.args.nodes.map((function(e){var t=e.toString();return t.slice(1,t.length-1)})).join(", ");return this.name+"("+e+")"}toJSON(){var e={__type:"Call",name:this.name,args:this.args,lineno:this.lineno,column:this.column,filename:this.filename};return this.block&&(e.block=this.block),e}},ue.UnaryOp=class UnaryOp extends ee{constructor(e,t){super(),this.op=e,this.expr=t}clone(e){var t=new UnaryOp(this.op);return t.expr=this.expr.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"UnaryOp",op:this.op,expr:this.expr,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.BinOp=class BinOp extends ee{constructor(e,t,n){super(),this.op=e,this.left=t,this.right=n}clone(e){var t=new BinOp(this.op);return t.left=this.left.clone(e,t),t.right=this.right&&this.right.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,this.val&&(t.val=this.val.clone(e,t)),t}toString(){return this.left.toString()+" "+this.op+" "+this.right.toString()}toJSON(){var e={__type:"BinOp",left:this.left,right:this.right,op:this.op,lineno:this.lineno,column:this.column,filename:this.filename};return this.val&&(e.val=this.val),e}},ue.Ternary=class Ternary extends ee{constructor(e,t,n){super(),this.cond=e,this.trueExpr=t,this.falseExpr=n}clone(e){var t=new Ternary;return t.cond=this.cond.clone(e,t),t.trueExpr=this.trueExpr.clone(e,t),t.falseExpr=this.falseExpr.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Ternary",cond:this.cond,trueExpr:this.trueExpr,falseExpr:this.falseExpr,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Block=class Block extends ee{constructor(e,t){super(),this.nodes=[],this.parent=e,this.node=t,this.scope=!0}get hasProperties(){for(var e=0,t=this.nodes.length;e<t;++e)if("property"==this.nodes[e].nodeName)return!0}get hasMedia(){for(var e=0,t=this.nodes.length;e<t;++e){if("media"==this.nodes[e].nodeName)return!0}return!1}get isEmpty(){return!this.nodes.length||this.nodes.every((function(e){return"comment"==e.nodeName}))}clone(e,t){e=e||this.parent;var n=new Block(e,t||this.node);return n.lineno=this.lineno,n.column=this.column,n.filename=this.filename,n.scope=this.scope,this.nodes.forEach((function(e){n.push(e.clone(n,n))})),n}push(e){this.nodes.push(e)}toJSON(){return{__type:"Block",scope:this.scope,lineno:this.lineno,column:this.column,filename:this.filename,nodes:this.nodes}}},ue.Unit=class Unit extends ee{constructor(e,t){super(),this.val=e,this.type=t}toBoolean(){return new ue.Boolean(!!this.type||this.val)}toString(){return this.val+(this.type||"")}clone(){var e=new Unit(this.val,this.type);return e.lineno=this.lineno,e.column=this.column,e.filename=this.filename,e}toJSON(){return{__type:"Unit",val:this.val,type:this.type,lineno:this.lineno,column:this.column,filename:this.filename}}operate(e,t){var n=this.type||t.first.type;if("rgba"==t.nodeName||"hsla"==t.nodeName)return t.operate(e,this);if(this.shouldCoerce(e))switch(t=t.first,t="%"==this.type||"-"!=e&&"+"!=e||"%"!=t.type?this.coerce(t):new Unit(this.val*(t.val/100),"%"),e){case"-":return new Unit(this.val-t.val,n);case"+":return n=n||"%"==t.type&&t.type,new Unit(this.val+t.val,n);case"/":return new Unit(this.val/t.val,n);case"*":return new Unit(this.val*t.val,n);case"%":return new Unit(this.val%t.val,n);case"**":return new Unit(Math.pow(this.val,t.val),n);case"..":case"...":var i=this.val,r=t.val,a=new ue.Expression,o=".."==e;if(i<r)do{a.push(new ue.Unit(i))}while(o?++i<=r:++i<r);else do{a.push(new ue.Unit(i))}while(o?--i>=r:--i>r);return a}return super.operate(e,t)}coerce(e){if("unit"==e.nodeName){var t=this,n=e,i=te[t.type],r=te[n.type];if(i&&r&&i.label==r.label){var a=n.val*(r.val/i.val);return new ue.Unit(a,t.type)}return new ue.Unit(n.val,t.type)}if("string"==e.nodeName){if("%"==e.val)return new ue.Unit(0,"%");var o=parseFloat(e.val);return isNaN(o)&&super.coerce(e),new ue.Unit(o)}return super.coerce(e)}},ue.String=class String extends ee{constructor(e,t){super(),this.val=e,this.string=e,this.prefixed=!1,this.quote="string"!=typeof t?"'":t}toString(){return this.quote+this.val+this.quote}clone(){var e=new String(this.val,this.quote);return e.lineno=this.lineno,e.column=this.column,e.filename=this.filename,e}toJSON(){return{__type:"String",val:this.val,quote:this.quote,lineno:this.lineno,column:this.column,filename:this.filename}}toBoolean(){return new ue.Boolean(this.val.length)}coerce(e){switch(e.nodeName){case"string":return e;case"expression":return new String(e.nodes.map((function(e){return this.coerce(e).val}),this).join(" "));default:return new String(e.toString())}}operate(e,t){switch(e){case"%":(i=new ue.Expression).push(this);var n="expression"==t.nodeName?f(t).nodes:[t];return se.apply(null,[i].concat(n));case"+":var i;return(i=new ue.Expression).push(new String(this.val+this.coerce(t).val)),i;default:return super.operate(e,t)}}},ue.HSLA=ie,ue.RGBA=re,ue.Ident=class Ident extends ee{constructor(e,t,n){super(),this.name=e,this.string=e,this.val=t||ue.null,this.mixin=!!n}get isEmpty(){return null==this.val}get hash(){return this.name}clone(e){var t=new Ident(this.name);return t.val=this.val.clone(e,t),t.mixin=this.mixin,t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t.property=this.property,t.rest=this.rest,t}toJSON(){return{__type:"Ident",name:this.name,val:this.val,mixin:this.mixin,property:this.property,rest:this.rest,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){return this.name}coerce(e){switch(e.nodeName){case"ident":case"string":case"literal":return new Ident(e.string);case"unit":return new Ident(e.toString());default:return super.coerce(e)}}operate(e,t){var n=t.first;switch(e){case"-":if("unit"==n.nodeName){var i=new ue.Expression;return(n=n.clone()).val=-n.val,i.push(this),i.push(n),i}case"+":return new ue.Ident(this.string+this.coerce(n).string)}return super.operate(e,t)}},ue.Group=class Group extends ee{constructor(){super(),this.nodes=[],this.extends=[]}push(e){this.nodes.push(e)}get block(){return this.nodes[0].block}set block(e){for(var t=0,n=this.nodes.length;t<n;++t)this.nodes[t].block=e}get hasOnlyPlaceholders(){return this.nodes.every((function(e){return e.isPlaceholder}))}clone(e){var t=new Group;return t.lineno=this.lineno,t.column=this.column,this.nodes.forEach((function(n){t.push(n.clone(e,t))})),t.filename=this.filename,t.block=this.block.clone(e,t),t}toJSON(){return{__type:"Group",nodes:this.nodes,block:this.block,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Literal=class Literal extends ee{constructor(e){super(),this.val=e,this.string=e,this.prefixed=!1}get hash(){return this.val}toString(){return this.val.toString()}coerce(e){switch(e.nodeName){case"ident":case"string":case"literal":return new Literal(e.string);default:return super.coerce(e)}}operate(e,t){var n=t.first;return"+"===e?new ue.Literal(this.string+this.coerce(n).string):super.operate(e,t)}toJSON(){return{__type:"Literal",val:this.val,string:this.string,prefixed:this.prefixed,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Boolean=class Boolean extends ee{constructor(e){if(super(),!this.nodeName)return new Boolean(e);this.val=!!e}toBoolean(){return this}get isTrue(){return this.val}get isFalse(){return!this.val}negate(){return new Boolean(!this.val)}inspect(){return"[Boolean "+this.val+"]"}toString(){return this.val?"true":"false"}toJSON(){return{__type:"Boolean",val:this.val}}},ue.Return=class Return extends ee{constructor(e){super(),this.expr=e||ue.null}clone(e){var t=new Return;return t.expr=this.expr.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Return",expr:this.expr,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Media=class Media extends oe{constructor(e){super("media"),this.val=e}clone(e){var t=new Media;return t.val=this.val.clone(e,t),t.block=this.block.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Media",val:this.val,block:this.block,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){return"@media "+this.val}},ue.QueryList=class QueryList extends ee{constructor(){super(),this.nodes=[]}clone(e){var t=new QueryList;t.lineno=this.lineno,t.column=this.column,t.filename=this.filename;for(var n=0;n<this.nodes.length;++n)t.push(this.nodes[n].clone(e,t));return t}push(e){this.nodes.push(e)}merge(e){var t,n=new QueryList;return this.nodes.forEach((function(i){for(var r=0,a=e.nodes.length;r<a;++r)(t=i.merge(e.nodes[r]))&&n.push(t)})),n}toString(){return"("+this.nodes.map((function(e){return e.toString()})).join(", ")+")"}toJSON(){return{__type:"QueryList",nodes:this.nodes,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Query=class Query extends ee{constructor(){super(),this.nodes=[],this.type="",this.predicate=""}clone(e){var t=new Query;t.predicate=this.predicate,t.type=this.type;for(var n=0,i=this.nodes.length;n<i;++n)t.push(this.nodes[n].clone(e,t));return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}push(e){this.nodes.push(e)}get resolvedType(){if(this.type)return this.type.nodeName?this.type.string:this.type}get resolvedPredicate(){if(this.predicate)return this.predicate.nodeName?this.predicate.string:this.predicate}merge(e){var t,n,i=new Query,r=this.resolvedPredicate,a=e.resolvedPredicate,o=this.resolvedType,h=e.resolvedType;if(o=o||h,h=h||o,"not"==r^"not"==a){if(o==h)return;t="not"==r?h:o,n="not"==r?a:r}else if("not"==r&&"not"==a){if(o!=h)return;t=o,n="not"}else{if(o!=h)return;t=o,n=r||a}return i.predicate=n,i.type=t,i.nodes=this.nodes.concat(e.nodes),i}toString(){var e=this.predicate?this.predicate+" ":"",t=this.type||"",n=e+t;return this.nodes.length&&(n+=(t&&" and ")+this.nodes.map((function(e){return e.toString()})).join(" and ")),n}toJSON(){return{__type:"Query",predicate:this.predicate,type:this.type,nodes:this.nodes,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Feature=class Feature extends ee{constructor(e){super(),this.segments=e,this.expr=null}clone(e){var t=new Feature;return t.segments=this.segments.map((function(n){return n.clone(e,t)})),this.expr&&(t.expr=this.expr.clone(e,t)),this.name&&(t.name=this.name),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toString(){return this.expr?"("+this.segments.join("")+": "+this.expr.toString()+")":this.segments.join("")}toJSON(){var e={__type:"Feature",segments:this.segments,lineno:this.lineno,column:this.column,filename:this.filename};return this.expr&&(e.expr=this.expr),this.name&&(e.name=this.name),e}},ue.Params=class Params extends ee{constructor(){super(),this.nodes=[]}get length(){return this.nodes.length}push(e){this.nodes.push(e)}clone(e){var t=new Params;return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,this.nodes.forEach((function(n){t.push(n.clone(e,t))})),t}toJSON(){return{__type:"Params",nodes:this.nodes,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Comment=class Comment extends ee{constructor(e,t,n){super(),this.str=e,this.suppress=t,this.inline=n}toJSON(){return{__type:"Comment",str:this.str,suppress:this.suppress,inline:this.inline,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){return this.str}},ue.Keyframes=class Keyframes extends oe{constructor(e,t){super("keyframes"),this.segments=e,this.prefix=t||"official"}clone(e){var t=new Keyframes;return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t.segments=this.segments.map((function(n){return n.clone(e,t)})),t.prefix=this.prefix,t.block=this.block.clone(e,t),t}toJSON(){return{__type:"Keyframes",segments:this.segments,prefix:this.prefix,block:this.block,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){return"@keyframes "+this.segments.join("")}},ue.Member=class Member extends ee{constructor(e,t){super(),this.left=e,this.right=t}clone(e){var t=new Member;return t.left=this.left.clone(e,t),t.right=this.right.clone(e,t),this.val&&(t.val=this.val.clone(e,t)),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){var e={__type:"Member",left:this.left,right:this.right,lineno:this.lineno,column:this.column,filename:this.filename};return this.val&&(e.val=this.val),e}toString(){return this.left.toString()+"."+this.right.toString()}},ue.Charset=class Charset extends ee{constructor(e){super(),this.val=e}toString(){return"@charset "+this.val}toJSON(){return{__type:"Charset",val:this.val,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Namespace=class Namespace extends ee{constructor(e,t){super(),this.val=e,this.prefix=t}toString(){return"@namespace "+(this.prefix?this.prefix+" ":"")+this.val}toJSON(){return{__type:"Namespace",val:this.val,prefix:this.prefix,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Import=class Import extends ee{constructor(e,t){super(),this.path=e,this.once=t||!1}clone(e){var t=new Import;return t.path=this.path.nodeName?this.path.clone(e,t):this.path,t.once=this.once,t.mtime=this.mtime,t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Import",path:this.path,once:this.once,mtime:this.mtime,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Extend=class Extend extends ee{constructor(e){super(),this.selectors=e}clone(){return new Extend(this.selectors)}toString(){return"@extend "+this.selectors.join(", ")}toJSON(){return{__type:"Extend",selectors:this.selectors,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Object=class Object extends ee{constructor(){super(),this.vals={},this.keys={}}setValue(e,t){return this.vals[e]=t,this}get set(){return this.setValue}setKey(e,t){return this.keys[e]=t,this}get length(){return he.keys(this.vals).length}get(e){return this.vals[e]||ue.null}has(e){return e in this.vals}operate(e,t){switch(e){case".":case"[]":return this.get(t.hash);case"==":var n,i,r=this.vals;if("object"!=t.nodeName||this.length!=t.length)return ue.false;for(var a in r)if(n=r[a],i=t.vals[a],n.operate(e,i).isFalse)return ue.false;return ue.true;case"!=":return this.operate("==",t).negate();default:return super.operate(e,t)}}toBoolean(){return new ue.Boolean(this.length)}toBlock(){var e,t,n="{";for(e in this.vals)if("object"==(t=this.get(e)).first.nodeName)n+=e+" "+t.first.toBlock();else if("@charset"===e)n+=e+" "+t.first.toString()+";";else n+=e+":"+toString(t)+";";return n+="}";function toString(e){return e.nodes?e.nodes.map(toString).join(e.isList?",":" "):"literal"==e.nodeName&&","==e.val?"\\,":e.toString()}}clone(e){var t,n=new Object;for(t in n.lineno=this.lineno,n.column=this.column,n.filename=this.filename,this.vals)n.vals[t]=this.vals[t].clone(e,n);for(t in this.keys)n.keys[t]=this.keys[t].clone(e,n);return n}toJSON(){return{__type:"Object",vals:this.vals,keys:this.keys,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){var e={};for(var t in this.vals)e[t]=this.vals[t].toString();return JSON.stringify(e)}},ue.Function=class Function extends ee{constructor(e,t,n){super(),this.name=e,this.params=t,this.block=n,"function"==typeof t&&(this.fn=t)}get arity(){return this.params.length}get hash(){return"function "+this.name}clone(e){if(this.fn)var t=new Function(this.name,this.fn);else(t=new Function(this.name)).params=this.params.clone(e,t),t.block=this.block.clone(e,t);return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toString(){return this.fn?this.name+"("+this.fn.toString().match(/^function *\w*\((.*?)\)/).slice(1).join(", ")+")":this.name+"("+this.params.nodes.join(", ")+")"}toJSON(){var e={__type:"Function",name:this.name,lineno:this.lineno,column:this.column,filename:this.filename};return this.fn?e.fn=this.fn:(e.params=this.params,e.block=this.block),e}},ue.Property=class Property extends ee{constructor(e,t){super(),this.segments=e,this.expr=t}clone(e){var t=new Property(this.segments);return t.name=this.name,this.literal&&(t.literal=this.literal),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t.segments=this.segments.map((function(n){return n.clone(e,t)})),this.expr&&(t.expr=this.expr.clone(e,t)),t}toJSON(){var e={__type:"Property",segments:this.segments,name:this.name,lineno:this.lineno,column:this.column,filename:this.filename};return this.expr&&(e.expr=this.expr),this.literal&&(e.literal=this.literal),e}toString(){return"property("+this.segments.join("")+", "+this.expr+")"}operate(e,t,n){return this.expr.operate(e,t,n)}},ue.Selector=class Selector extends ee{constructor(e){super(),this.inherits=!0,this.segments=e,this.optional=!1}toString(){return this.segments.join("")+(this.optional?" !optional":"")}get isPlaceholder(){return this.val&&~this.val.substr(0,2).indexOf("$")}clone(e){var t=new Selector;return t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t.inherits=this.inherits,t.val=this.val,t.segments=this.segments.map((function(n){return n.clone(e,t)})),t.optional=this.optional,t}toJSON(){return{__type:"Selector",inherits:this.inherits,segments:this.segments,optional:this.optional,val:this.val,lineno:this.lineno,column:this.column,filename:this.filename}}},ue.Expression=le,ue.Arguments=class Arguments extends ce{constructor(){super(),this.map={}}static fromExpression(e){var t=new Arguments,n=e.nodes.length;t.lineno=e.lineno,t.column=e.column,t.isList=e.isList;for(var i=0;i<n;++i)t.push(e.nodes[i]);return t}clone(e){var t=super.clone(e);for(var n in t.map={},this.map)t.map[n]=this.map[n].clone(e,t);return t.isList=this.isList,t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Arguments",map:this.map,isList:this.isList,preserve:this.preserve,lineno:this.lineno,column:this.column,filename:this.filename,nodes:this.nodes}}},ue.Atblock=class Atblock extends ee{constructor(){super()}get nodes(){return this.block.nodes}clone(e){var t=new Atblock;return t.block=this.block.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toString(){return"@block"}toJSON(){return{__type:"Atblock",block:this.block,lineno:this.lineno,column:this.column,fileno:this.fileno}}},ue.Atrule=oe,ue.Supports=class Supports extends oe{constructor(e){super("supports"),this.condition=e}clone(e){var t=new Supports;return t.condition=this.condition.clone(e,t),t.block=this.block.clone(e,t),t.lineno=this.lineno,t.column=this.column,t.filename=this.filename,t}toJSON(){return{__type:"Supports",condition:this.condition,block:this.block,lineno:this.lineno,column:this.column,filename:this.filename}}toString(){return"@supports "+this.condition}},ue.true=new ue.Boolean(!0),ue.false=new ue.Boolean(!1),ue.null=new ue.Null;
/*!
   * Stylus - errors
   * Copyright (c) Automattic <developer.wordpress.com>
   * MIT Licensed
   */
class ParseError extends Error{constructor(e){super(),this.name="ParseError",this.message=e,Error.captureStackTrace&&Error.captureStackTrace(this,ParseError)}}class SyntaxError extends Error{constructor(e){super(),this.name="SyntaxError",this.message=e,Error.captureStackTrace&&Error.captureStackTrace(this,ParseError)}}let pe;var fe={and:"&&",or:"||",is:"==",isnt:"!=","is not":"!=",":=":"?="};pe=class Lexer{constructor(e,t){function comment(e,t,n,i){var r=i.lastIndexOf("/*",n)>i.lastIndexOf("*/",n),a=i.lastIndexOf("//",n),o=i.lastIndexOf("\n",n),h=0,l=0;if(~a&&a>o)for(;o!=n;){if("'"==i[o]&&(l?l--:l++),'"'==i[o]&&(h?h--:h++),"/"==i[o]&&"/"==i[o+1]){r=!l&&!h;break}++o}return r?e:","===t&&/^[,\t\n]+$/.test(e)?e.replace(/\n/,"\r"):t+"\r"}this.stash=[],this.indentStack=[],this.indentRe=null,this.lineno=1,this.column=1,"\ufeff"==e.charAt(0)&&(e=e.slice(1)),this.str=e.replace(/\s+$/,"\n").replace(/\r\n?/g,"\n").replace(/\\ *\n/g,"\r").replace(/([,(:](?!\/\/[^ ])) *(?:\/\/[^\n]*|\/\*.*?\*\/)?\n\s*/g,comment).replace(/\s*\n[ \t]*([,)])/g,comment)}inspect(){for(var e,t=this.str,n=[];"eos"!=(e=this.next()).type;)n.push(e.inspect());return this.str=t,n.concat(e.inspect()).join("\n")}lookahead(e){for(var t=e-this.stash.length;t-- >0;)this.stash.push(this.advance());return this.stash[--e]}skip(e){var t=e[0];e=t?t.length:e,this.str=this.str.substr(e),t?this.move(t):this.column+=e}move(e){var t=e.match(/\n/g),n=e.lastIndexOf("\n");t&&(this.lineno+=t.length),this.column=~n?e.length-n:this.column+e.length}next(){var e=this.stashed()||this.advance();return this.prev=e,e}isPartOfSelector(){var e=this.stash[this.stash.length-1]||this.prev;switch(e&&e.type){case"color":return 2==e.val.raw.length;case".":case"[":return!0}return!1}advance(){var e=this.column,t=this.lineno,n=this.eos()||this.null()||this.sep()||this.keyword()||this.urlchars()||this.comment()||this.newline()||this.escaped()||this.important()||this.literal()||this.anonFunc()||this.atrule()||this.function()||this.brace()||this.paren()||this.color()||this.string()||this.unit()||this.namedop()||this.boolean()||this.unicode()||this.ident()||this.op()||function(){var n=this.eol();return n&&(e=n.column,t=n.lineno),n}.call(this)||this.space()||this.selector();return n.lineno=t,n.column=e,n}peek(){return this.lookahead(1)}stashed(){return this.stash.shift()}eos(){if(!this.str.length)return this.indentStack.length?(this.indentStack.shift(),new t("outdent")):new t("eos")}urlchars(){var e;if(this.isURL)return(e=/^[\/:@.;?&=*!,<>#%0-9]+/.exec(this.str))?(this.skip(e),new t("literal",new ue.Literal(e[0]))):void 0}sep(){var e;if(e=/^;[ \t]*/.exec(this.str))return this.skip(e),new t(";")}eol(){if("\r"==this.str[0]){for(++this.lineno,this.skip(1),this.column=1;this.space(););return this.advance()}}space(){var e;if(e=/^([ \t]+)/.exec(this.str))return this.skip(e),new t("space")}escaped(){var e;if(e=/^\\(.)[ \t]*/.exec(this.str)){var n=e[1];return this.skip(e),new t("ident",new ue.Literal(n))}}literal(){var e;if(e=/^@css[ \t]*\{/.exec(this.str)){this.skip(e);for(var n,i,r=1,a="";n=this.str[0];){switch(this.str=this.str.substr(1),n){case"{":++r;break;case"}":--r;break;case"\n":case"\r":++this.lineno}if(a+=n,!r)break}return a=a.replace(/\s*}$/,""),(i=new ue.Literal(a)).css=!0,new t("literal",i)}}important(){var e;if(e=/^!important[ \t]*/.exec(this.str))return this.skip(e),new t("ident",new ue.Literal("!important"))}brace(){var e;if(e=/^([{}])/.exec(this.str)){this.skip(1);var n=e[1];return new t(n,n)}}paren(){var e;if(e=/^([()])([ \t]*)/.exec(this.str)){var n=e[1];this.skip(e),")"==n&&(this.isURL=!1);var i=new t(n,n);return i.space=e[2],i}}null(){var e;if(e=/^(null)\b[ \t]*/.exec(this.str))return this.skip(e),this.isPartOfSelector()?new t("ident",new ue.Ident(e[0])):new t("null",ue.null)}keyword(){var e;if(e=/^(return|if|else|unless|for|in)\b(?!-)[ \t]*/.exec(this.str)){var n=e[1];return this.skip(e),this.isPartOfSelector()?new t("ident",new ue.Ident(e[0])):new t(n,n)}}namedop(){var e,n;if(e=/^(not|and|or|is a|is defined|isnt|is not|is)(?!-)\b([ \t]*)/.exec(this.str)){var i=e[1];return this.skip(e),(n=this.isPartOfSelector()?new t("ident",new ue.Ident(e[0])):new t(i=fe[i]||i,i)).space=e[2],n}}op(){var e;if(e=/^([.]{1,3}|&&|\|\||[!<>=?:]=|\*\*|[-+*\/%]=?|[,=?:!~<>&\[\]])([ \t]*)/.exec(this.str)){var n=e[1];this.skip(e);var i=new t(n=fe[n]||n,n);return i.space=e[2],this.isURL=!1,i}}anonFunc(){var e;if("@"==this.str[0]&&"("==this.str[1])return this.skip(2),(e=new t("function",new ue.Ident("anonymous"))).anonymous=!0,e}atrule(){var e;if(e=/^@(?!apply)(?:-(\w+)-)?([a-zA-Z0-9-_]+)[ \t]*/.exec(this.str)){this.skip(e);var n=e[1],i=e[2];switch(i){case"require":case"import":case"charset":case"namespace":case"media":case"scope":case"supports":return new t(i);case"document":return new t("-moz-document");case"block":return new t("atblock");case"extend":case"extends":return new t("extend");case"keyframes":return new t(i,n);default:return new t("atrule",n?"-"+n+"-"+i:i)}}}comment(){if("/"==this.str[0]&&"/"==this.str[1])return-1==(e=this.str.indexOf("\n"))&&(e=this.str.length),this.skip(e),this.advance();if("/"==this.str[0]&&"*"==this.str[1]){var e;-1==(e=this.str.indexOf("*/"))&&(e=this.str.length);var n=this.str.substr(0,e+2),i=n.split(/\n|\r/).length-1,r=!0,a=!1;return this.lineno+=i,this.skip(e+2),"!"==n[2]&&(n=n.replace("*!","*"),r=!1),this.prev&&";"==this.prev.type&&(a=!0),new t("comment",new ue.Comment(n,r,a))}}boolean(){var e;if(e=/^(true|false)\b([ \t]*)/.exec(this.str)){var n=new ue.Boolean("true"==e[1]);this.skip(e);var i=new t("boolean",n);return i.space=e[2],i}}unicode(){var e;if(e=/^u\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?/i.exec(this.str))return this.skip(e),new t("literal",new ue.Literal(e[0]))}function(){var e;if(e=/^(-*[_a-zA-Z$][-\w\d$]*)\(([ \t]*)/.exec(this.str)){var n=e[1];this.skip(e),this.isURL="url"==n;var i=new t("function",new ue.Ident(n));return i.space=e[2],i}}ident(){var e;if(e=/^-*([_a-zA-Z$]|@apply)[-\w\d$]*/.exec(this.str))return this.skip(e),new t("ident",new ue.Ident(e[0]))}newline(){var e,n;if(this.indentRe?e=this.indentRe.exec(this.str):((e=(n=/^\n([\t]*)[ \t]*/).exec(this.str))&&!e[1].length&&(e=(n=/^\n([ \t]*)/).exec(this.str)),e&&e[1].length&&(this.indentRe=n)),e){var i,r=e[1].length;if(this.skip(e)," "===this.str[0]||"\t"===this.str[0])throw new SyntaxError("Invalid indentation. You can use tabs or spaces to indent, but not both.");if("\n"==this.str[0])return this.advance();if(this.indentStack.length&&r<this.indentStack[0]){for(;this.indentStack.length&&this.indentStack[0]>r;)this.stash.push(new t("outdent")),this.indentStack.shift();i=this.stash.pop()}else r&&r!=this.indentStack[0]?(this.indentStack.unshift(r),i=new t("indent")):i=new t("newline");return i}}unit(){var e;if(e=/^(-)?(\d+\.\d+|\d+|\.\d+)(%|[a-zA-Z]+)?[ \t]*/.exec(this.str)){this.skip(e);var n=parseFloat(e[2]);"-"==e[1]&&(n=-n);var i=new ue.Unit(n,e[3]);return i.raw=e[0],new t("unit",i)}}string(){var e;if(e=/^("[^"]*"|'[^']*')[ \t]*/.exec(this.str)){var n=e[1],i=e[0][0];return this.skip(e),n=n.slice(1,-1).replace(/\\n/g,"\n"),new t("string",new ue.String(n,i))}}color(){return this.rrggbbaa()||this.rrggbb()||this.rgba()||this.rgb()||this.nn()||this.n()}n(){var e;if(e=/^#([a-fA-F0-9]{1})[ \t]*/.exec(this.str)){this.skip(e);var n=parseInt(e[1]+e[1],16),i=new ue.RGBA(n,n,n,1);return i.raw=e[0],new t("color",i)}}nn(){var e;if(e=/^#([a-fA-F0-9]{2})[ \t]*/.exec(this.str)){this.skip(e);var n=parseInt(e[1],16),i=new ue.RGBA(n,n,n,1);return i.raw=e[0],new t("color",i)}}rgb(){var e;if(e=/^#([a-fA-F0-9]{3})[ \t]*/.exec(this.str)){this.skip(e);var n=e[1],i=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),a=parseInt(n[2]+n[2],16),o=new ue.RGBA(i,r,a,1);return o.raw=e[0],new t("color",o)}}rgba(){var e;if(e=/^#([a-fA-F0-9]{4})[ \t]*/.exec(this.str)){this.skip(e);var n=e[1],i=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),a=parseInt(n[2]+n[2],16),o=parseInt(n[3]+n[3],16),h=new ue.RGBA(i,r,a,o/255);return h.raw=e[0],new t("color",h)}}rrggbb(){var e;if(e=/^#([a-fA-F0-9]{6})[ \t]*/.exec(this.str)){this.skip(e);var n=e[1],i=parseInt(n.substr(0,2),16),r=parseInt(n.substr(2,2),16),a=parseInt(n.substr(4,2),16),o=new ue.RGBA(i,r,a,1);return o.raw=e[0],new t("color",o)}}rrggbbaa(){var e;if(e=/^#([a-fA-F0-9]{8})[ \t]*/.exec(this.str)){this.skip(e);var n=e[1],i=parseInt(n.substr(0,2),16),r=parseInt(n.substr(2,2),16),a=parseInt(n.substr(4,2),16),o=parseInt(n.substr(6,2),16),h=new ue.RGBA(i,r,a,o/255);return h.raw=e[0],new t("color",h)}}selector(){var e;if(e=/^\^|.*?(?=\/\/(?![^\[]*\])|[,\n{])/.exec(this.str)){var n=e[0];return this.skip(e),new t("selector",n)}}};var me=65407===new Uint16Array(new Uint8Array([127,255]).buffer)[0];function align(e,t){var n=t-1;return e+n&~n}function hexify(e){for(var t="",n=8;n--;)t+=(e>>>(n<<2)&15).toString(16);return t}function parity(e,t,n){return e^t^n}function majority(e,t,n){return e&t^e&n^t&n}function rotateLeft(e,t){return e<<t|e>>>32-t}var de=new Uint32Array(80);function sha1(e){if(!(e instanceof Uint8Array))throw new TypeError("Input data must be a Uint8Array.");var t,n=new ArrayBuffer(align(e.byteLength+9,64)),i=new Uint32Array(n),r=new Uint8Array(n);if(r.set(e),r[e.byteLength]=128,me)for(var a=0,o=i.length;a<o;++a)i[a]=(t=i[a])>>24&255|t>>8&65280|t<<8&16711680|t<<24&4278190080;var h=8*e.byteLength;i[i.length-2]=h/Math.pow(2,32),i[i.length-1]=h;for(var l,c=1732584193,u=4023233417,f=2562383102,m=271733878,d=3285377520,v=void 0,g=void 0,k=void 0,w=void 0,b=void 0,y=void 0,x=void 0,S=0,N=i.length;S<N;S+=16){for(v=0;v<16;++v)de[v]=i[S+v];for(v=16;v<80;++v)de[v]=rotateLeft(de[v-3]^de[v-8]^de[v-14]^de[v-16],1);for(g=c,k=u,w=f,b=m,y=d,v=0;v<20;++v)x=rotateLeft(g,5)+((l=k)&w^~l&b)+y+1518500249+de[v]|0,y=b,b=w,w=rotateLeft(k,30),k=g,g=x;for(v=20;v<40;++v)x=rotateLeft(g,5)+parity(k,w,b)+y+1859775393+de[v]|0,y=b,b=w,w=rotateLeft(k,30),k=g,g=x;for(v=40;v<60;++v)x=rotateLeft(g,5)+majority(k,w,b)+y+2400959708+de[v]|0,y=b,b=w,w=rotateLeft(k,30),k=g,g=x;for(v=60;v<80;++v)x=rotateLeft(g,5)+parity(k,w,b)+y+3395469782+de[v]|0,y=b,b=w,w=rotateLeft(k,30),k=g,g=x;c=c+g|0,u=u+k|0,f=f+w|0,m=m+b|0,d=d+y|0}return""+hexify(c)+hexify(u)+hexify(f)+hexify(m)+hexify(d)}function createHash(){let e="";return{update:function update(t){e+=t},digest:function digest(){return sha1((new TextEncoder).encode(e))}}}var ve=class MemoryCache{constructor(e){e=e||{},this.limit=e["cache limit"]||256,this._cache={},this.length=0,this.head=this.tail=null}set(e,t){var n,i=t.clone();i.filename=ue.filename,i.lineno=ue.lineno,i.column=ue.column,n={key:e,value:i},this._cache[e]=n,this.tail?(this.tail.next=n,n.prev=this.tail):this.head=n,this.tail=n,this.length++==this.limit&&this.purge()}get(e){var t=this._cache[e],n=t.value.clone();return t==this.tail||(t.next&&(t==this.head&&(this.head=t.next),t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t.next=null,t.prev=this.tail,this.tail&&(this.tail.next=t),this.tail=t),n}has(e){return!!this._cache[e]}key(e,t){var n=createHash();return n.update(e+t.prefix),n.digest("hex")}purge(){var e=this.head;this.head.next&&(this.head=this.head.next,this.head.prev=null),this._cache[e.key]=e.prev=e.next=null,this.length--}},ge=class NullCache{set(e,t){}get(e){}has(e){return!1}key(e,t){return""}},getCache=function(e,t){if("function"==typeof e)return new e(t);var n;if("memory"===e)n=ve;else n=ge;return new n(t)},ke={lexer:noop$2(),selector:noop$2()},we=["ident","string","selector","function","comment","boolean","space","color","unit","for","in","[","]","(",")","+","-","*","*=","<",">","=",":","&","&&","~","{","}",".","..","/"],be=["is","has","where","not","dir","lang","any-link","link","visited","local-link","target","scope","hover","active","focus","drop","current","past","future","enabled","disabled","read-only","read-write","placeholder-shown","checked","indeterminate","valid","invalid","in-range","out-of-range","required","optional","user-error","root","empty","blank","nth-child","nth-last-child","first-child","last-child","only-child","nth-of-type","nth-last-of-type","first-of-type","last-of-type","only-of-type","nth-match","nth-last-match","nth-column","nth-last-column","first-line","first-letter","before","after","selection"],ye=class Parser{constructor(e,t){var n=this;t=t||{},Parser.cache=Parser.cache||Parser.getCache(t),this.hash=Parser.cache.key(e,t),this.lexer={},Parser.cache.has(this.hash)||(this.lexer=new pe(e,t)),this.prefix=t.prefix||"",this.root=t.root||new ue.Root,this.state=["root"],this.stash=[],this.parens=0,this.css=0,this.state.pop=function(){n.prevState=[].pop.call(this)}}static getCache(e){return!1===e.cache?getCache(!1):getCache(e.cache||"memory",e)}currentState(){return this.state[this.state.length-1]}previousState(){return this.state[this.state.length-2]}parse(){var e=this.parent=this.root;if(Parser.cache.has(this.hash))"block"==(e=Parser.cache.get(this.hash)).nodeName&&(e.constructor=ue.Root);else{for(;"eos"!=this.peek().type&&(this.skipWhitespace(),"eos"!=this.peek().type);){var t=this.statement();this.accept(";"),t||this.error("unexpected token {peek}, not allowed at the root level"),e.push(t)}Parser.cache.set(this.hash,e)}return e}error(e){var t=this.peek().type,n=null==this.peek().val?"":" "+this.peek().toString();throw n.trim()==t.trim()&&(n=""),new ParseError(e.replace("{peek}",'"'+t+n+'"'))}accept(e){if(e==this.peek().type)return this.next()}expect(e){return e!=this.peek().type&&this.error('expected "'+e+'", got {peek}'),this.next()}next(){var e=this.stash.length?this.stash.pop():this.lexer.next(),t=e.lineno,n=e.column||1;return e.val&&e.val.nodeName&&(e.val.lineno=t,e.val.column=n),ue.lineno=t,ue.column=n,ke.lexer("%s %s",e.type,e.val||""),e}peek(){return this.lexer.peek()}lookahead(e){return this.lexer.lookahead(e)}isSelectorToken(e){var t=this.lookahead(e).type;switch(t){case"for":return this.bracketed;case"[":return this.bracketed=!0,!0;case"]":return this.bracketed=!1,!0;default:return~we.indexOf(t)}}isPseudoSelector(e){var t=this.lookahead(e).val;return t&&~be.indexOf(t.name)}lineContains(e){for(var t,n=1;t=this.lookahead(n++);){if(~["indent","outdent","newline","eos"].indexOf(t.type))return;if(e==t.type)return!0}}selectorToken(){if(this.isSelectorToken(1)){if("{"==this.peek().type){if(!this.lineContains("}"))return;for(var e,t=0;e=this.lookahead(++t);){if("}"==e.type){if(2==t||3==t&&"space"==this.lookahead(t-1).type)return;break}if(":"==e.type)return}}return this.next()}}skip(e){for(;~e.indexOf(this.peek().type);)this.next()}skipWhitespace(){this.skip(["space","indent","outdent","newline"])}skipNewlines(){for(;"newline"==this.peek().type;)this.next()}skipSpaces(){for(;"space"==this.peek().type;)this.next()}skipSpacesAndComments(){for(;"space"==this.peek().type||"comment"==this.peek().type;)this.next()}looksLikeFunctionDefinition(e){return"indent"==this.lookahead(e).type||"{"==this.lookahead(e).type}looksLikeSelector(e){var t,n,i=1;if(e&&":"==this.lookahead(i+1).type&&(this.lookahead(i+1).space||"indent"==this.lookahead(i+2).type))return!1;for(;"ident"==this.lookahead(i).type&&("newline"==this.lookahead(i+1).type||","==this.lookahead(i+1).type);)i+=2;for(;this.isSelectorToken(i)||","==this.lookahead(i).type;){if("selector"==this.lookahead(i).type)return!0;if("&"==this.lookahead(i+1).type)return!0;if(i>1&&"ident"===this.lookahead(i-1).type&&"."===this.lookahead(i).type&&"ident"===this.lookahead(i+1).type){for(;t=this.lookahead(i+2);){if(-1!==["indent","outdent","{",";","eos","selector","media","if","atrule",")","}","unit","[","for","function"].indexOf(t.type)){if("["!==t.type){if(this.isPseudoSelector(i+2))return!0;if(")"===t.type&&this.lookahead(i+3)&&"}"===this.lookahead(i+3).type)break;return-1===["outdent",";","eos","media","if","atrule",")","}","unit","for","function"].indexOf(t.type)}for(;(t=this.lookahead(i+3))&&"]"!==t.type;){if(~[".","unit"].indexOf(t.type))return!1;i+=1}}i+=1}return!0}if("."==this.lookahead(i).type&&"ident"==this.lookahead(i+1).type)return!0;if("*"==this.lookahead(i).type&&"newline"==this.lookahead(i+1).type)return!0;if(":"==this.lookahead(i).type&&":"==this.lookahead(i+1).type)return!0;if("color"==this.lookahead(i).type&&"newline"==this.lookahead(i-1).type)return!0;if(this.looksLikeAttributeSelector(i))return!0;if(("="==this.lookahead(i).type||"function"==this.lookahead(i).type)&&"{"==this.lookahead(i+1).type)return!1;if(":"==this.lookahead(i).type&&!this.isPseudoSelector(i+1)&&this.lineContains("."))return!1;if("{"==this.lookahead(i).type?n=!0:"}"==this.lookahead(i).type&&(n=!1),n&&":"==this.lookahead(i).type)return!0;if("space"==this.lookahead(i).type&&"{"==this.lookahead(i+1).type)return!0;if(":"==this.lookahead(i++).type&&!this.lookahead(i-1).space&&this.isPseudoSelector(i))return!0;if("space"==this.lookahead(i).type&&"newline"==this.lookahead(i+1).type&&"{"==this.lookahead(i+2).type)return!0;if(","==this.lookahead(i).type&&"newline"==this.lookahead(i+1).type)return!0}if(","==this.lookahead(i).type&&"newline"==this.lookahead(i+1).type)return!0;if("{"==this.lookahead(i).type&&"newline"==this.lookahead(i+1).type)return!0;if(this.css&&(";"==this.lookahead(i).type||"}"==this.lookahead(i-1).type))return!1;for(;!~["indent","outdent","newline","for","if",";","}","eos"].indexOf(this.lookahead(i).type);)++i;return"indent"==this.lookahead(i).type||void 0}looksLikeAttributeSelector(e){var t=this.lookahead(e).type;return!("="!=t||!this.bracketed)||("ident"==t||"string"==t)&&"]"==this.lookahead(e+1).type&&("newline"==this.lookahead(e+2).type||this.isSelectorToken(e+2))&&!this.lineContains(":")&&!this.lineContains("=")}looksLikeKeyframe(){var e,t=2;switch(this.lookahead(t).type){case"{":case"indent":case",":return!0;case"newline":for(;"unit"==this.lookahead(++t).type||"newline"==this.lookahead(t).type;);return"indent"==(e=this.lookahead(t).type)||"{"==e}}stateAllowsSelector(){switch(this.currentState()){case"root":case"atblock":case"selector":case"conditional":case"function":case"atrule":case"for":return!0}}assignAtblock(e){try{e.push(this.atblock(e))}catch(e){this.error("invalid right-hand side operand in assignment, got {peek}")}}statement(){var e,t,n=this.stmt(),i=this.prevState;switch(this.allowPostfix&&(this.allowPostfix=!1,i="expression"),i){case"assignment":case"expression":case"function arguments":for(;t=this.accept("if")||this.accept("unless")||this.accept("for");)switch(t.type){case"if":case"unless":(n=new ue.If(this.expression(),n)).postfix=!0,n.negate="unless"==t.type,this.accept(";");break;case"for":var r,a=this.id().name;this.accept(",")&&(r=this.id().name),this.expect("in");var o=new ue.Each(a,r,this.expression());(e=new ue.Block(this.parent,o)).push(n),o.block=e,n=o}}return n}stmt(){var e,t=this.peek();switch(t.type){case"keyframes":return this.keyframes();case"-moz-document":return this.mozdocument();case"comment":case"selector":case"literal":case"charset":case"namespace":case"import":case"require":case"extend":case"media":case"atrule":case"ident":case"scope":case"supports":case"unless":case"function":case"for":case"if":return this[t.type]();case"return":return this.return();case"{":return this.property();default:if(this.stateAllowsSelector())switch(t.type){case"color":case"~":case">":case"<":case":":case"&":case"&&":case"[":case".":case"/":return(e=this.selector()).column=t.column,e.lineno=t.lineno,e;case"..":if("/"==this.lookahead(2).type)return this.selector();case"+":return"function"==this.lookahead(2).type?this.functionCall():this.selector();case"*":return this.property();case"unit":if(this.looksLikeKeyframe())return(e=this.selector()).column=t.column,e.lineno=t.lineno,e;case"-":if("{"==this.lookahead(2).type)return this.property()}var n=this.expression();return n.isEmpty&&this.error("unexpected {peek}"),n}}block(e,t){var n,i,r,a=this.parent=new ue.Block(this.parent,e);for(!1===t&&(a.scope=!1),this.accept("newline"),this.accept("{")?(this.css++,n="}",this.skipWhitespace()):(n="outdent",this.expect("indent"));n!=this.peek().type;){if(this.css){if(this.accept("newline")||this.accept("indent"))continue;i=this.statement(),this.accept(";"),this.skipWhitespace()}else{if(this.accept("newline"))continue;if(r=this.lookahead(2).type,"indent"==this.peek().type&&~["outdent","newline","comment"].indexOf(r)){this.skip(["indent","outdent"]);continue}if("eos"==this.peek().type)return a;i=this.statement(),this.accept(";")}i||this.error("unexpected token {peek} in block"),a.push(i)}return this.css?(this.skipWhitespace(),this.expect("}"),this.skipSpaces(),this.css--):this.expect("outdent"),this.parent=a.parent,a}comment(){var e=this.next().val;return this.skipSpaces(),e}for(){this.expect("for");var e,t=this.id().name;this.accept(",")&&(e=this.id().name),this.expect("in"),this.state.push("for"),this.cond=!0;var n=new ue.Each(t,e,this.expression());return this.cond=!1,n.block=this.block(n,!1),this.state.pop(),n}return(){this.expect("return");var e=this.expression();return e.isEmpty?new ue.Return:new ue.Return(e)}unless(){this.expect("unless"),this.state.push("conditional"),this.cond=!0;var e=new ue.If(this.expression(),!0);return this.cond=!1,e.block=this.block(e,!1),this.state.pop(),e}if(){var e=this.expect("if");this.state.push("conditional"),this.cond=!0;var t,n,i,r=new ue.If(this.expression());for(r.column=e.column,this.cond=!1,r.block=this.block(r,!1),this.skip(["newline","comment"]);this.accept("else");){if(!(e=this.accept("if"))){r.elses.push(this.block(r,!1));break}this.cond=!0,t=this.expression(),this.cond=!1,n=this.block(r,!1),(i=new ue.If(t,n)).column=e.column,r.elses.push(i),this.skip(["newline","comment"])}return this.state.pop(),r}atblock(e){return e||this.expect("atblock"),e=new ue.Atblock,this.state.push("atblock"),e.block=this.block(e,!1),this.state.pop(),e}atrule(){var e,t=this.expect("atrule").val,n=new ue.Atrule(t);return this.skipSpacesAndComments(),n.segments=this.selectorParts(),this.skipSpacesAndComments(),("indent"==(e=this.peek().type)||"{"==e||"newline"==e&&"{"==this.lookahead(2).type)&&(this.state.push("atrule"),n.block=this.block(n),this.state.pop()),n}scope(){this.expect("scope");var e=this.selectorParts().map((function(e){return e.val})).join("");return this.selectorScope=e.trim(),ue.null}supports(){this.expect("supports");var e=new ue.Supports(this.supportsCondition());return this.state.push("atrule"),e.block=this.block(e),this.state.pop(),e}supportsCondition(){var e=this.supportsNegation()||this.supportsOp();return e||(this.cond=!0,e=this.expression(),this.cond=!1),e}supportsNegation(){if(this.accept("not")){var e=new ue.Expression;return e.push(new ue.Literal("not")),e.push(this.supportsFeature()),e}}supportsOp(){var e,t,n=this.supportsFeature();if(n){for((t=new ue.Expression).push(n);e=this.accept("&&")||this.accept("||");)t.push(new ue.Literal("&&"==e.val?"and":"or")),t.push(this.supportsFeature());return t}}supportsFeature(){if(this.skipSpacesAndComments(),"("==this.peek().type){var e=this.lookahead(2).type;if("ident"==e||"{"==e)return this.feature();this.expect("(");var t=new ue.Expression;return t.push(new ue.Literal("(")),t.push(this.supportsCondition()),this.expect(")"),t.push(new ue.Literal(")")),this.skipSpacesAndComments(),t}}extend(){var e,t,n,i=this.expect("extend"),r=[];do{(n=this.selectorParts()).length&&(e=new ue.Selector(n),r.push(e),"!"===this.peek().type&&"ident"===(i=this.lookahead(2)).type&&"optional"===i.val.name&&(this.skip(["!","ident"]),e.optional=!0))}while(this.accept(","));return(t=new ue.Extend(r)).lineno=i.lineno,t.column=i.column,t}media(){this.expect("media"),this.state.push("atrule");var e=new ue.Media(this.queries());return e.block=this.block(e),this.state.pop(),e}queries(){var e=new ue.QueryList,t=["comment","newline","space"];do{this.skip(t),e.push(this.query()),this.skip(t)}while(this.accept(","));return e}query(){var e,t,n,i=new ue.Query;if("ident"==this.peek().type&&("."==this.lookahead(2).type||"["==this.lookahead(2).type))return this.cond=!0,e=this.expression(),this.cond=!1,i.push(new ue.Feature(e.nodes)),i;if((t=this.accept("ident")||this.accept("not"))&&(t=new ue.Literal(t.val.string||t.val),this.skipSpacesAndComments(),(n=this.accept("ident"))?(i.type=n.val,i.predicate=t):i.type=t,this.skipSpacesAndComments(),!this.accept("&&")))return i;do{i.push(this.feature())}while(this.accept("&&"));return i}feature(){this.skipSpacesAndComments(),this.expect("("),this.skipSpacesAndComments();var e=new ue.Feature(this.interpolate());return this.skipSpacesAndComments(),this.accept(":"),this.skipSpacesAndComments(),this.inProperty=!0,e.expr=this.list(),this.inProperty=!1,this.skipSpacesAndComments(),this.expect(")"),this.skipSpacesAndComments(),e}mozdocument(){this.expect("-moz-document");var e=new ue.Atrule("-moz-document"),t=[];do{this.skipSpacesAndComments(),t.push(this.functionCall()),this.skipSpacesAndComments()}while(this.accept(","));return e.segments=[new ue.Literal(t.join(", "))],this.state.push("atrule"),e.block=this.block(e,!1),this.state.pop(),e}import(){return this.expect("import"),this.allowPostfix=!0,new ue.Import(this.expression(),!1)}require(){return this.expect("require"),this.allowPostfix=!0,new ue.Import(this.expression(),!0)}charset(){this.expect("charset");var e=this.expect("string").val;return this.allowPostfix=!0,new ue.Charset(e)}namespace(){var e,t;return this.expect("namespace"),this.skipSpacesAndComments(),(t=this.accept("ident"))&&(t=t.val),this.skipSpacesAndComments(),e=this.accept("string")||this.url(),this.allowPostfix=!0,new ue.Namespace(e,t)}keyframes(){var e,t=this.expect("keyframes");return this.skipSpacesAndComments(),(e=new ue.Keyframes(this.selectorParts(),t.val)).column=t.column,this.skipSpacesAndComments(),this.state.push("atrule"),e.block=this.block(e),this.state.pop(),e}literal(){return this.expect("literal").val}id(){var e=this.expect("ident");return this.accept("space"),e.val}ident(){for(var e=2,t=this.lookahead(e).type;"space"==t;)t=this.lookahead(++e).type;switch(t){case"=":case"?=":case"-=":case"+=":case"*=":case"/=":case"%=":return this.assignment();case".":if("space"==this.lookahead(e-1).type)return this.selector();if(this._ident==this.peek())return this.id();for(;"="!=this.lookahead(++e).type&&!~["[",",","newline","indent","eos"].indexOf(this.lookahead(e).type););if("="==this.lookahead(e).type)return this._ident=this.peek(),this.expression();if(this.looksLikeSelector()&&this.stateAllowsSelector())return this.selector();case"[":if(this._ident==this.peek())return this.id();for(;"]"!=this.lookahead(e++).type&&"selector"!=this.lookahead(e).type&&"eos"!=this.lookahead(e).type;);if("="==this.lookahead(e).type)return this._ident=this.peek(),this.expression();if(this.looksLikeSelector()&&this.stateAllowsSelector())return this.selector();case"-":case"+":case"/":case"*":case"%":case"**":case"&&":case"||":case">":case"<":case">=":case"<=":case"!=":case"==":case"?":case"in":case"is a":case"is defined":if(this._ident==this.peek())return this.id();switch(this._ident=this.peek(),this.currentState()){case"for":case"selector":return this.property();case"root":case"atblock":case"atrule":return"["==t?this.subscript():this.selector();case"function":case"conditional":return this.looksLikeSelector()?this.selector():this.expression();default:return this.operand?this.id():this.expression()}default:switch(this.currentState()){case"root":return this.selector();case"for":case"selector":case"function":case"conditional":case"atblock":case"atrule":return this.property();default:var n=this.id();return"interpolation"==this.previousState()&&(n.mixin=!0),n}}}interpolate(){var e,t=[];for(this.accept("*")&&t.push(new ue.Literal("*"));;)if(this.accept("{"))this.state.push("interpolation"),t.push(this.expression()),this.expect("}"),this.state.pop();else if(e=this.accept("-"))t.push(new ue.Literal("-"));else{if(!(e=this.accept("ident")))break;t.push(e.val)}return t.length||this.expect("ident"),t}property(){if(this.looksLikeSelector(!0))return this.selector();var e=this.interpolate(),t=new ue.Property(e),n=t;return this.accept("space"),this.accept(":")&&this.accept("space"),this.state.push("property"),this.inProperty=!0,t.expr=this.list(),t.expr.isEmpty&&(n=e[0]),this.inProperty=!1,this.allowPostfix=!0,this.state.pop(),this.accept(";"),n}selector(){var e,t,n=new ue.Group,i=this.selectorScope,r="root"==this.currentState();do{this.accept("newline"),e=this.selectorParts(),r&&i&&e.unshift(new ue.Literal(i+" ")),e.length&&((t=new ue.Selector(e)).lineno=e[0].lineno,t.column=e[0].column,n.push(t))}while(this.accept(",")||this.accept("newline"));return"selector-parts"==this.currentState()?n.nodes:(this.state.push("selector"),n.block=this.block(n),this.state.pop(),n)}selectorParts(){for(var e,t=[];e=this.selectorToken();)switch(e.type){case"{":this.skipSpaces();var n=this.expression();this.skipSpaces(),this.expect("}"),t.push(n);break;case this.prefix&&".":var i=new ue.Literal(e.val+this.prefix);i.prefixed=!0,t.push(i);break;case"comment":break;case"color":case"unit":t.push(new ue.Literal(e.val.raw));break;case"space":t.push(new ue.Literal(" "));break;case"function":t.push(new ue.Literal(e.val.name+"("));break;case"ident":t.push(new ue.Literal(e.val.name||e.val.string));break;default:t.push(new ue.Literal(e.val)),e.space&&t.push(new ue.Literal(" "))}return t}assignment(){var e,t,n=this.id(),i=n.name;if(e=this.accept("=")||this.accept("?=")||this.accept("+=")||this.accept("-=")||this.accept("*=")||this.accept("/=")||this.accept("%=")){this.state.push("assignment");var r=this.list();switch(r.isEmpty&&this.assignAtblock(r),(t=new ue.Ident(i,r)).lineno=n.lineno,t.column=n.column,this.state.pop(),e.type){case"?=":var a=new ue.BinOp("is defined",t),o=new ue.Expression;o.push(new ue.Ident(i)),t=new ue.Ternary(a,o,t);break;case"+=":case"-=":case"*=":case"/=":case"%=":t.val=new ue.BinOp(e.type[0],new ue.Ident(i),r)}}return t}function(){var e,t=1,n=2;e:for(;e=this.lookahead(n++);)switch(e.type){case"function":case"(":++t;break;case")":if(!--t)break e;break;case"eos":this.error('failed to find closing paren ")"')}return"expression"===this.currentState()?this.functionCall():this.looksLikeFunctionDefinition(n)?this.functionDefinition():this.expression()}url(){this.expect("function"),this.state.push("function arguments");var e=this.args();return this.expect(")"),this.state.pop(),new ue.Call("url",e)}functionCall(){var e=this.accept("+");if("url"==this.peek().val.name)return this.url();var t=this.expect("function").val,n=t.name;this.state.push("function arguments"),this.parens++;var i=this.args();this.expect(")"),this.parens--,this.state.pop();var r=new ue.Call(n,i);return r.column=t.column,r.lineno=t.lineno,e&&(this.state.push("function"),r.block=this.block(r),this.state.pop()),r}functionDefinition(){var e=this.expect("function"),t=e.val.name;this.state.push("function params"),this.skipWhitespace();var n=this.params();this.skipWhitespace(),this.expect(")"),this.state.pop(),this.state.push("function");var i=new ue.Function(t,n);return i.column=e.column,i.lineno=e.lineno,i.block=this.block(i),this.state.pop(),new ue.Ident(t,i)}params(){for(var e,t,n=new ue.Params;e=this.accept("ident");)this.accept("space"),n.push(t=e.val),this.accept("...")?t.rest=!0:this.accept("=")&&(t.val=this.expression()),this.skipWhitespace(),this.accept(","),this.skipWhitespace();return n}args(){var e,t=new ue.Arguments;do{"ident"==this.peek().type&&":"==this.lookahead(2).type?(e=this.next().val.string,this.expect(":"),t.map[e]=this.expression()):t.push(this.expression())}while(this.accept(","));return t}list(){for(var e=this.expression();this.accept(",");)if(e.isList)t.push(this.expression());else{var t=new ue.Expression(!0);t.push(e),t.push(this.expression()),e=t}return e}expression(){var e,t=new ue.Expression;for(this.state.push("expression");e=this.negation();)e||this.error("unexpected token {peek} in expression"),t.push(e);return this.state.pop(),t.nodes.length&&(t.lineno=t.nodes[0].lineno,t.column=t.nodes[0].column),t}negation(){return this.accept("not")?new ue.UnaryOp("!",this.negation()):this.ternary()}ternary(){var e=this.logical();if(this.accept("?")){var t=this.expression();this.expect(":");var n=this.expression();e=new ue.Ternary(e,t,n)}return e}logical(){for(var e,t=this.typecheck();e=this.accept("&&")||this.accept("||");)t=new ue.BinOp(e.type,t,this.typecheck());return t}typecheck(){for(var e,t=this.equality();e=this.accept("is a");)this.operand=!0,t||this.error('illegal unary "'+e+'", missing left-hand operand'),t=new ue.BinOp(e.type,t,this.equality()),this.operand=!1;return t}equality(){for(var e,t=this.in();e=this.accept("==")||this.accept("!=");)this.operand=!0,t||this.error('illegal unary "'+e+'", missing left-hand operand'),t=new ue.BinOp(e.type,t,this.in()),this.operand=!1;return t}in(){for(var e=this.relational();this.accept("in");)this.operand=!0,e||this.error('illegal unary "in", missing left-hand operand'),e=new ue.BinOp("in",e,this.relational()),this.operand=!1;return e}relational(){for(var e,t=this.range();e=this.accept(">=")||this.accept("<=")||this.accept("<")||this.accept(">");)this.operand=!0,t||this.error('illegal unary "'+e+'", missing left-hand operand'),t=new ue.BinOp(e.type,t,this.range()),this.operand=!1;return t}range(){var e,t=this.additive();return(e=this.accept("...")||this.accept(".."))&&(this.operand=!0,t||this.error('illegal unary "'+e+'", missing left-hand operand'),t=new ue.BinOp(e.val,t,this.additive()),this.operand=!1),t}additive(){for(var e,t=this.multiplicative();e=this.accept("+")||this.accept("-");)this.operand=!0,t=new ue.BinOp(e.type,t,this.multiplicative()),this.operand=!1;return t}multiplicative(){for(var e,n=this.defined();e=this.accept("**")||this.accept("*")||this.accept("/")||this.accept("%");){if(this.operand=!0,"/"==e&&this.inProperty&&!this.parens)return this.stash.push(new t("literal",new ue.Literal("/"))),this.operand=!1,n;n||this.error('illegal unary "'+e+'", missing left-hand operand'),n=new ue.BinOp(e.type,n,this.defined()),this.operand=!1}return n}defined(){var e=this.unary();return this.accept("is defined")&&(e||this.error('illegal unary "is defined", missing left-hand operand'),e=new ue.BinOp("is defined",e)),e}unary(){var e,t;return(e=this.accept("!")||this.accept("~")||this.accept("+")||this.accept("-"))?(this.operand=!0,(t=this.unary())||this.error('illegal unary "'+e+'"'),t=new ue.UnaryOp(e.type,t),this.operand=!1,t):this.subscript()}subscript(){for(var e=this.member();this.accept("[");)e=new ue.BinOp("[]",e,this.expression()),this.expect("]");return this.accept("=")&&(e.op+="=",e.val=this.list(),e.val.isEmpty&&this.assignAtblock(e.val)),e}member(){var e=this.primary();if(e){for(;this.accept(".");){var t=new ue.Ident(this.expect("ident").val.string);e=new ue.Member(e,t)}this.skipSpaces(),this.accept("=")&&(e.val=this.list(),e.val.isEmpty&&this.assignAtblock(e.val))}return e}object(){var e,t,n,i,r=new ue.Object;for(this.expect("{"),this.skipWhitespace();!this.accept("}");)this.accept("comment")||this.accept("newline")||(n||this.accept(","),(e=this.accept("ident")||this.accept("string"))||this.error('expected "ident" or "string", got {peek}'),i=e.val.hash,this.skipSpacesAndComments(),this.expect(":"),t=this.expression(),r.setValue(i,t),r.setKey(i,e.val),n=this.accept(","),this.skipWhitespace());return r}primary(){var e;if(this.skipSpaces(),this.accept("(")){++this.parens;var t=this.expression(),n=this.expect(")");return--this.parens,this.accept("%")&&t.push(new ue.Ident("%")),e=this.peek(),!n.space&&"ident"==e.type&&~i.indexOf(e.val.string)&&(t.push(new ue.Ident(e.val.string)),this.next()),t}switch((e=this.peek()).type){case"null":case"unit":case"color":case"string":case"literal":case"boolean":case"comment":return this.next().val;case!this.cond&&"{":return this.object();case"atblock":return this.atblock();case"atrule":var r=new ue.Ident(this.next().val);return r.property=!0,r;case"ident":return this.ident();case"function":return e.anonymous?this.functionDefinition():this.functionCall()}}};const xe={exports:{}};!function(e){void 0!==xe&&(xe.exports=e);var t={on:function on(e,t){return getListeners(this,e).push(t),this},once:function once(e,t){var n=this;return wrap.originalListener=t,getListeners(n,e).push(wrap),n;function wrap(){off.call(n,e,wrap),t.apply(this,arguments)}},off:off,emit:function emit(e,t){var n=this,i=getListeners(n,e,!0);if(!i)return!1;var r=arguments.length;if(1===r)i.forEach(zeroarg);else if(2===r)i.forEach(onearg);else{var a=Array.prototype.slice.call(arguments,1);i.forEach(moreargs)}return!!i.length;function zeroarg(e){e.call(n)}function onearg(e){e.call(n,t)}function moreargs(e){e.apply(n,a)}}};function mixin(e){for(var n in t)e[n]=t[n];return e}function off(e,t){var n,i=this;if(arguments.length){if(t){if(n=getListeners(i,e,!0)){if(!(n=n.filter(ne)).length)return off.call(i,e);i.listeners[e]=n}}else if((n=i.listeners)&&(delete n[e],!Object.keys(n).length))return off.call(i)}else delete i.listeners;return i;function ne(e){return e!==t&&e.originalListener!==t}}function getListeners(e,t,n){if(!n||e.listeners){var i=e.listeners||(e.listeners={});return i[t]||(i[t]=[])}}mixin(e.prototype),e.mixin=mixin}((
/**
   * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
   *
   * @copyright Yusuke Kawasaki
   * @license MIT
   * @constructor
   * @see https://github.com/kawanet/event-lite
   * @see http://kawanet.github.io/event-lite/EventLite.html
   * @example
   * var EventLite = require("event-lite");
   *
   * function MyClass() {...}             // your class
   *
   * EventLite.mixin(MyClass.prototype);  // import event methods
   *
   * var obj = new MyClass();
   * obj.on("foo", function() {...});     // add event listener
   * obj.once("bar", function() {...});   // add one-time event listener
   * obj.emit("foo");                     // dispatch event
   * obj.emit("bar");                     // dispatch another event
   * obj.off("foo");                      // remove event listener
   */
function EventLite(){if(!(this instanceof EventLite))return new EventLite}));var Se=xe.exports;const Ne=class{constructor(){this.events=new Se}on(...e){return this.events.on(...e)}off(...e){return this.events.off(...e)}once(...e){return this.events.once(...e)}emit(...e){return this.events.emit(...e)}listeners(e){return this.events.listeners&&this.events.listeners[e]||[]}},noop=()=>noop;var Ee=e.dirname,Ae=class DepsResolver extends n{constructor(e,t){super(e),this.filename=t.filename,this.paths=t.paths||[],this.paths.push(Ee(t.filename||".")),this.options=t,this.functions={},this.deps=[]}visit(e){switch(e.nodeName){case"root":case"block":case"expression":this.visitRoot(e);break;case"group":case"media":case"atblock":case"atrule":case"keyframes":case"each":case"supports":this.visit(e.block);break;default:super.visit(e)}}visitRoot(e){for(var t=0,n=e.nodes.length;t<n;++t)this.visit(e.nodes[t])}visitIdent(e){this.visit(e.val)}visitIf(e){this.visit(e.block),this.visit(e.cond);for(var t=0,n=e.elses.length;t<n;++t)this.visit(e.elses[t])}visitFunction(e){this.functions[e.name]=e.block}visitCall(e){e.name in this.functions&&this.visit(this.functions[e.name]),e.block&&this.visit(e.block)}visitImport(e){if("url"!==e.path.first.name){var t,n,i,r=!e.path.first.val.isNull&&e.path.first.val||e.path.first.name;if(r&&((t=/\.css(?:"|$)/.test(r))||/\.styl$/i.test(r)||(i=r,r+=".styl"),!(n=c(r,this.paths,this.filename))&&i&&(n=_export_lookupIndex_(i,this.paths,this.filename)),n&&(this.deps=this.deps.concat(n),!t)))for(var a=0,o=n.length;a<o;++a){var h=n[a],l=Ee(h),u=_export_readFileSync_(h),f=new ue.Block,m=new ye(u,g({root:f},this.options));~this.paths.indexOf(l)||this.paths.push(l);try{f=m.parse()}catch(e){throw e.filename=h,e.lineno=m.lexer.lineno,e.column=m.lexer.column,e.input=u,e}this.visit(f)}}}resolve(){return this.visit(this.root),k(this.deps)}},_e=new Ne,Le=e.join;return class Renderer extends Ne{constructor(e,t){super(),(t=t||{}).globals=t.globals||{},t.functions=t.functions||{},t.use=t.use||[],t.use=Array.isArray(t.use)?t.use:[t.use],t.imports=[Le("/","functions/index.styl")].concat(t.imports||[]),t.paths=t.paths||[],t.filename=t.filename||"stylus",t.Evaluator=t.Evaluator||X,this.options=t,this.str=e,this.events=_e}render(e){for(var t=this.parser=new ye(this.str,this.options),n=0,i=this.options.use.length;n<i;n++)this.use(this.options.use[n]);try{ue.filename=this.options.filename;var r=t.parse();this.evaluator=new this.options.Evaluator(r,this.options),this.nodes=ue,this.evaluator.renderer=this,r=this.evaluator.evaluate(),r=new G(r,this.options).normalize();var a=this.options.sourcemap?new noop(r,this.options):new M(r,this.options),o=a.compile();this.options.sourcemap&&(this.sourcemap=a.map.toJSON())}catch(n){var h={};if(h.input=n.input||this.str,h.filename=n.filename||this.options.filename,h.lineno=n.lineno||t.lexer.lineno,h.column=n.column||t.lexer.column,!e)throw _export_formatException_(n,h);return e(_export_formatException_(n,h))}var l=this.listeners("end");e&&l.push(e);for(n=0,i=l.length;n<i;n++){var c=l[n](null,o);c&&(o=c)}if(!e)return o}deps(e){var t=g({cache:!1},this.options);e&&(t.filename=e);var n=Ae,i=new ye(this.str,t);try{return ue.filename=t.filename,new n(i.parse(),t).resolve()}catch(e){var r={};throw r.input=e.input||this.str,r.filename=e.filename||t.filename,r.lineno=e.lineno||i.lexer.lineno,r.column=e.column||i.lexer.column,_export_formatException_(e,r)}}set(e,t){return this.options[e]=t,this}get(e){return this.options[e]}include(e){return this.options.paths.push(e),this}use(e){return e.call(this,this),this}define(e,t,n){return(t=m(t,n)).nodeName?(this.options.globals[e]=t,this):(this.options.functions[e]=t,null!=n&&(t.raw=n),this)}import(e){return this.options.imports.push(e),this}}}();
