UNPKG

less

Version:
10 lines 156 kB
/** * Less - Leaner CSS v4.3.0 * http://lesscss.org * * Copyright (c) 2009-2025, Alexis Sellier <self@cloudhead.net> * Licensed under the Apache-2.0 License. * * @license Apache-2.0 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).less=t()}(this,(function(){"use strict";function e(e){return e.replace(/^[a-z-]+:\/+?[^/]+/,"").replace(/[?&]livereload=\w+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^.\w-]+/g,"-").replace(/\./g,":")}function t(e,t){if(t)for(var n in t.dataset)if(Object.prototype.hasOwnProperty.call(t.dataset,n))if("env"===n||"dumpLineNumbers"===n||"rootpath"===n||"errorReporting"===n)e[n]=t.dataset[n];else try{e[n]=JSON.parse(t.dataset[n])}catch(e){}}var n=function(t,n,i){var r=i.href||"",s="less:".concat(i.title||e(r)),o=t.getElementById(s),a=!1,l=t.createElement("style");l.setAttribute("type","text/css"),i.media&&l.setAttribute("media",i.media),l.id=s,l.styleSheet||(l.appendChild(t.createTextNode(n)),a=null!==o&&o.childNodes.length>0&&l.childNodes.length>0&&o.firstChild.nodeValue===l.firstChild.nodeValue);var u=t.getElementsByTagName("head")[0];if(null===o||!1===a){var c=i&&i.nextSibling||null;c?c.parentNode.insertBefore(l,c):u.appendChild(l)}if(o&&!1===a&&o.parentNode.removeChild(o),l.styleSheet)try{l.styleSheet.cssText=n}catch(e){throw new Error("Couldn't reassign styleSheet.cssText.")}},i=function(e){var t,n=e.document;return n.currentScript||(t=n.getElementsByTagName("script"))[t.length-1]},r={error:function(e){this._fireEvent("error",e)},warn:function(e){this._fireEvent("warn",e)},info:function(e){this._fireEvent("info",e)},debug:function(e){this._fireEvent("debug",e)},addListener:function(e){this._listeners.push(e)},removeListener:function(e){for(var t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)},_fireEvent:function(e,t){for(var n=0;n<this._listeners.length;n++){var i=this._listeners[n][e];i&&i(t)}},_listeners:[]},s=function(){function e(e,t){this.fileManagers=t||[],e=e||{};for(var n=[],i=n.concat(["encodeBase64","mimeLookup","charsetLookup","getSourceMapGenerator"]),r=0;r<i.length;r++){var s=i[r],o=e[s];o?this[s]=o.bind(e):r<n.length&&this.warn("missing required function in environment - ".concat(s))}}return e.prototype.getFileManager=function(e,t,n,i,s){e||r.warn("getFileManager called with no filename.. Please report this issue. continuing."),void 0===t&&r.warn("getFileManager called with null directory.. Please report this issue. continuing.");var o=this.fileManagers;n.pluginManager&&(o=[].concat(o).concat(n.pluginManager.getFileManagers()));for(var a=o.length-1;a>=0;a--){var l=o[a];if(l[s?"supportsSync":"supports"](e,t,n,i))return l}return null},e.prototype.addFileManager=function(e){this.fileManagers.push(e)},e.prototype.clearFileManagers=function(){this.fileManagers=[]},e}(),o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},a={length:{m:1,cm:.01,mm:.001,in:.0254,px:.0254/96,pt:.0254/72,pc:.0254/72*12},duration:{s:1,ms:.001},angle:{rad:1/(2*Math.PI),deg:1/360,grad:1/400,turn:1}},l={colors:o,unitConversions:a},u=function(){function e(){this.parent=null,this.visibilityBlocks=void 0,this.nodeVisible=void 0,this.rootNode=null,this.parsed=null}return Object.defineProperty(e.prototype,"currentFileInfo",{get:function(){return this.fileInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.getIndex()},enumerable:!1,configurable:!0}),e.prototype.setParent=function(t,n){function i(t){t&&t instanceof e&&(t.parent=n)}Array.isArray(t)?t.forEach(i):i(t)},e.prototype.getIndex=function(){return this._index||this.parent&&this.parent.getIndex()||0},e.prototype.fileInfo=function(){return this._fileInfo||this.parent&&this.parent.fileInfo()||{}},e.prototype.isRulesetLike=function(){return!1},e.prototype.toCSS=function(e){var t=[];return this.genCSS(e,{add:function(e,n,i){t.push(e)},isEmpty:function(){return 0===t.length}}),t.join("")},e.prototype.genCSS=function(e,t){t.add(this.value)},e.prototype.accept=function(e){this.value=e.visit(this.value)},e.prototype.eval=function(){return this},e.prototype._operate=function(e,t,n,i){switch(t){case"+":return n+i;case"-":return n-i;case"*":return n*i;case"/":return n/i}},e.prototype.fround=function(e,t){var n=e&&e.numPrecision;return n?Number((t+2e-16).toFixed(n)):t},e.compare=function(t,n){if(t.compare&&"Quoted"!==n.type&&"Anonymous"!==n.type)return t.compare(n);if(n.compare)return-n.compare(t);if(t.type===n.type){if(t=t.value,n=n.value,!Array.isArray(t))return t===n?0:void 0;if(t.length===n.length){for(var i=0;i<t.length;i++)if(0!==e.compare(t[i],n[i]))return;return 0}}},e.numericCompare=function(e,t){return e<t?-1:e===t?0:e>t?1:void 0},e.prototype.blocksVisibility=function(){return void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks},e.prototype.addVisibilityBlock=function(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1},e.prototype.removeVisibilityBlock=function(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1},e.prototype.ensureVisibility=function(){this.nodeVisible=!0},e.prototype.ensureInvisibility=function(){this.nodeVisible=!1},e.prototype.isVisible=function(){return this.nodeVisible},e.prototype.visibilityInfo=function(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}},e.prototype.copyVisibilityInfo=function(e){e&&(this.visibilityBlocks=e.visibilityBlocks,this.nodeVisible=e.nodeVisible)},e}(),c=function(e,t,n){var i=this;Array.isArray(e)?this.rgb=e:e.length>=6?(this.rgb=[],e.match(/.{2}/g).map((function(e,t){t<3?i.rgb.push(parseInt(e,16)):i.alpha=parseInt(e,16)/255}))):(this.rgb=[],e.split("").map((function(e,t){t<3?i.rgb.push(parseInt(e+e,16)):i.alpha=parseInt(e+e,16)/255}))),this.alpha=this.alpha||("number"==typeof t?t:1),void 0!==n&&(this.value=n)};function h(e,t){return Math.min(Math.max(e,0),t)}function f(e){return"#".concat(e.map((function(e){return((e=h(Math.round(e),255))<16?"0":"")+e.toString(16)})).join(""))}c.prototype=Object.assign(new u,{type:"Color",luma:function(){var e=this.rgb[0]/255,t=this.rgb[1]/255,n=this.rgb[2]/255;return.2126*(e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},genCSS:function(e,t){t.add(this.toCSS(e))},toCSS:function(e,t){var n,i,r,s=e&&e.compress&&!t,o=[];if(i=this.fround(e,this.alpha),this.value)if(0===this.value.indexOf("rgb"))i<1&&(r="rgba");else{if(0!==this.value.indexOf("hsl"))return this.value;r=i<1?"hsla":"hsl"}else i<1&&(r="rgba");switch(r){case"rgba":o=this.rgb.map((function(e){return h(Math.round(e),255)})).concat(h(i,1));break;case"hsla":o.push(h(i,1));case"hsl":n=this.toHSL(),o=[this.fround(e,n.h),"".concat(this.fround(e,100*n.s),"%"),"".concat(this.fround(e,100*n.l),"%")].concat(o)}if(r)return"".concat(r,"(").concat(o.join(",".concat(s?"":" ")),")");if(n=this.toRGB(),s){var a=n.split("");a[1]===a[2]&&a[3]===a[4]&&a[5]===a[6]&&(n="#".concat(a[1]).concat(a[3]).concat(a[5]))}return n},operate:function(e,t,n){for(var i=new Array(3),r=this.alpha*(1-n.alpha)+n.alpha,s=0;s<3;s++)i[s]=this._operate(e,t,this.rgb[s],n.rgb[s]);return new c(i,r)},toRGB:function(){return f(this.rgb)},toHSL:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),l=(o+a)/2,u=o-a;if(o===a)e=t=0;else{switch(t=l>.5?u/(2-o-a):u/(o+a),o){case n:e=(i-r)/u+(i<r?6:0);break;case i:e=(r-n)/u+2;break;case r:e=(n-i)/u+4}e/=6}return{h:360*e,s:t,l:l,a:s}},toHSV:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),l=o,u=o-a;if(t=0===o?0:u/o,o===a)e=0;else{switch(o){case n:e=(i-r)/u+(i<r?6:0);break;case i:e=(r-n)/u+2;break;case r:e=(n-i)/u+4}e/=6}return{h:360*e,s:t,v:l,a:s}},toARGB:function(){return f([255*this.alpha].concat(this.rgb))},compare:function(e){return e.rgb&&e.rgb[0]===this.rgb[0]&&e.rgb[1]===this.rgb[1]&&e.rgb[2]===this.rgb[2]&&e.alpha===this.alpha?0:void 0}}),c.fromKeyword=function(e){var t,n=e.toLowerCase();if(o.hasOwnProperty(n)?t=new c(o[n].slice(1)):"transparent"===n&&(t=new c([0,0,0],0)),t)return t.value=e,t};var p=function(){return(p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var v=function(e){this.value=e};v.prototype=Object.assign(new u,{type:"Paren",genCSS:function(e,t){t.add("("),this.value.genCSS(e,t),t.add(")")},eval:function(e){return new v(this.value.eval(e))}});var d={"":!0," ":!0,"|":!0},m=function(e){" "===e?(this.value=" ",this.emptyOrWhitespace=!0):(this.value=e?e.trim():"",this.emptyOrWhitespace=""===this.value)};m.prototype=Object.assign(new u,{type:"Combinator",genCSS:function(e,t){var n=e.compress||d[this.value]?"":" ";t.add(n+this.value+n)}});var g=function(e,t,n,i,r,s){this.combinator=e instanceof m?e:new m(e),this.value="string"==typeof t?t.trim():t||"",this.isVariable=n,this._index=i,this._fileInfo=r,this.copyVisibilityInfo(s),this.setParent(this.combinator,this)};g.prototype=Object.assign(new u,{type:"Element",accept:function(e){var t=this.value;this.combinator=e.visit(this.combinator),"object"==typeof t&&(this.value=e.visit(t))},eval:function(e){return new g(this.combinator,this.value.eval?this.value.eval(e):this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},clone:function(){return new g(this.combinator,this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},genCSS:function(e,t){t.add(this.toCSS(e),this.fileInfo(),this.getIndex())},toCSS:function(e){e=e||{};var t=this.value,n=e.firstSelector;return t instanceof v&&(e.firstSelector=!0),t=t.toCSS?t.toCSS(e):t,e.firstSelector=n,""===t&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(e)+t}});var y={ALWAYS:0,PARENS_DIVISION:1,PARENS:2},b=0,w=1,x=2;function S(e){return Object.prototype.toString.call(e).slice(8,-1)}function I(e){return"Array"===S(e)}function C(e,t={}){if(I(e))return e.map(e=>C(e,t));if("Object"!==S(n=e)||n.constructor!==Object||Object.getPrototypeOf(n)!==Object.prototype)return e;var n;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce((n,i)=>{if(I(t.props)&&!t.props.includes(i))return n;return function(e,t,n,i,r){const s={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";"enumerable"===s&&(e[t]=n),r&&"nonenumerable"===s&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,i,C(e[i],t),e,t.nonenumerable),n},{})}function k(e,t){for(var n=e+1,i=null,r=-1;--n>=0&&"\n"!==t.charAt(n);)r++;return"number"==typeof e&&(i=(t.slice(0,e).match(/\n/g)||"").length),{line:i,column:r}}function A(e){var t,n=e.length,i=new Array(n);for(t=0;t<n;t++)i[t]=e[t];return i}function _(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function P(e,t){var n=t||{};if(!t._defaults){n={};var i=C(e);n._defaults=i;var r=t?C(t):{};Object.assign(n,i,r)}return n}function E(e,t){if(t&&t._defaults)return t;var n=P(e,t);if(n.strictMath&&(n.math=y.PARENS),n.relativeUrls&&(n.rewriteUrls=x),"string"==typeof n.math)switch(n.math.toLowerCase()){case"always":n.math=y.ALWAYS;break;case"parens-division":n.math=y.PARENS_DIVISION;break;case"strict":case"parens":n.math=y.PARENS;break;default:n.math=y.PARENS}if("string"==typeof n.rewriteUrls)switch(n.rewriteUrls.toLowerCase()){case"off":n.rewriteUrls=b;break;case"local":n.rewriteUrls=w;break;case"all":n.rewriteUrls=x}return n}function R(e,t){void 0===t&&(t=[]);for(var n=0,i=e.length;n<i;n++){var r=e[n];Array.isArray(r)?R(r,t):void 0!==r&&t.push(r)}return t}function M(e){return null==e}var O=Object.freeze({__proto__:null,getLocation:k,copyArray:A,clone:_,defaults:P,copyOptions:E,merge:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},flattenArray:R,isNullOrUndefined:M}),$=/(<anonymous>|Function):(\d+):(\d+)/,V=function(e,t,n){Error.call(this);var i=e.filename||n;if(this.message=e.message,this.stack=e.stack,t&&i){var r=t.contents[i],s=k(e.index,r),o=s.line,a=s.column,l=e.call&&k(e.call,r).line,u=r?r.split("\n"):"";if(this.type=e.type||"Syntax",this.filename=i,this.index=e.index,this.line="number"==typeof o?o+1:null,this.column=a,!this.line&&this.stack){var c=this.stack.match($),h=new Function("a","throw new Error()"),f=0;try{h()}catch(e){var p=e.stack.match($);f=1-parseInt(p[2])}c&&(c[2]&&(this.line=parseInt(c[2])+f),c[3]&&(this.column=parseInt(c[3])))}this.callLine=l+1,this.callExtract=u[l],this.extract=[u[this.line-2],u[this.line-1],u[this.line]]}};if(void 0===Object.create){var F=function(){};F.prototype=Error.prototype,V.prototype=new F}else V.prototype=Object.create(Error.prototype);V.prototype.constructor=V,V.prototype.toString=function(e){var t;e=e||{};var n=(null!==(t=this.type)&&void 0!==t?t:"").toLowerCase().includes("warning"),i=n?this.type:"".concat(this.type,"Error"),r=n?"yellow":"red",s="",o=this.extract||[],a=[],l=function(e){return e};if(e.stylize){var u=typeof e.stylize;if("function"!==u)throw Error("options.stylize should be a function, got a ".concat(u,"!"));l=e.stylize}if(null!==this.line){if(n||"string"!=typeof o[0]||a.push(l("".concat(this.line-1," ").concat(o[0]),"grey")),"string"==typeof o[1]){var c="".concat(this.line," ");o[1]&&(c+=o[1].slice(0,this.column)+l(l(l(o[1].substr(this.column,1),"bold")+o[1].slice(this.column+1),"red"),"inverse")),a.push(c)}n||"string"!=typeof o[2]||a.push(l("".concat(this.line+1," ").concat(o[2]),"grey")),a="".concat(a.join("\n")+l("","reset"),"\n")}return s+=l("".concat(i,": ").concat(this.message),r),this.filename&&(s+=l(" in ",r)+this.filename),this.line&&(s+=l(" on line ".concat(this.line,", column ").concat(this.column+1,":"),"grey")),s+="\n".concat(a),this.callLine&&(s+="".concat(l("from ",r)+(this.filename||""),"/n"),s+="".concat(l(this.callLine,"grey")," ").concat(this.callExtract,"/n")),s};var L={visitDeeper:!0},j=!1;function D(e){return e}var N=function(){function e(e){this._implementation=e,this._visitInCache={},this._visitOutCache={},j||(!function e(t,n){var i,r;for(i in t)switch(typeof(r=t[i])){case"function":r.prototype&&r.prototype.type&&(r.prototype.typeIndex=n++);break;case"object":n=e(r,n)}return n}(He,1),j=!0)}return e.prototype.visit=function(e){if(!e)return e;var t=e.typeIndex;if(!t)return e.value&&e.value.typeIndex&&this.visit(e.value),e;var n,i=this._implementation,r=this._visitInCache[t],s=this._visitOutCache[t],o=L;if(o.visitDeeper=!0,r||(r=i[n="visit".concat(e.type)]||D,s=i["".concat(n,"Out")]||D,this._visitInCache[t]=r,this._visitOutCache[t]=s),r!==D){var a=r.call(i,e,o);e&&i.isReplacing&&(e=a)}if(o.visitDeeper&&e)if(e.length)for(var l=0,u=e.length;l<u;l++)e[l].accept&&e[l].accept(this);else e.accept&&e.accept(this);return s!=D&&s.call(i,e),e},e.prototype.visitArray=function(e,t){if(!e)return e;var n,i=e.length;if(t||!this._implementation.isReplacing){for(n=0;n<i;n++)this.visit(e[n]);return e}var r=[];for(n=0;n<i;n++){var s=this.visit(e[n]);void 0!==s&&(s.splice?s.length&&this.flatten(s,r):r.push(s))}return r},e.prototype.flatten=function(e,t){var n,i,r,s,o,a;for(t||(t=[]),i=0,n=e.length;i<n;i++)if(void 0!==(r=e[i]))if(r.splice)for(o=0,s=r.length;o<s;o++)void 0!==(a=r[o])&&(a.splice?a.length&&this.flatten(a,t):t.push(a));else t.push(r);return t},e}(),B={},U=function(e,t,n){if(e)for(var i=0;i<n.length;i++)Object.prototype.hasOwnProperty.call(e,n[i])&&(t[n[i]]=e[n[i]])},q=["paths","rewriteUrls","rootpath","strictImports","insecure","dumpLineNumbers","compress","syncImport","chunkInput","mime","useFileCache","processImports","pluginManager","quiet"];B.Parse=function(e){U(e,this,q),"string"==typeof this.paths&&(this.paths=[this.paths])};var T=["paths","compress","math","strictUnits","sourceMap","importMultiple","urlArgs","javascriptEnabled","pluginManager","importantScope","rewriteUrls"];function z(e){return!/^(?:[a-z-]+:|\/|#)/i.test(e)}function G(e){return"."===e.charAt(0)}B.Eval=function(e,t){U(e,this,T),"string"==typeof this.paths&&(this.paths=[this.paths]),this.frames=t||[],this.importantScope=this.importantScope||[]},B.Eval.prototype.enterCalc=function(){this.calcStack||(this.calcStack=[]),this.calcStack.push(!0),this.inCalc=!0},B.Eval.prototype.exitCalc=function(){this.calcStack.pop(),this.calcStack.length||(this.inCalc=!1)},B.Eval.prototype.inParenthesis=function(){this.parensStack||(this.parensStack=[]),this.parensStack.push(!0)},B.Eval.prototype.outOfParenthesis=function(){this.parensStack.pop()},B.Eval.prototype.inCalc=!1,B.Eval.prototype.mathOn=!0,B.Eval.prototype.isMathOn=function(e){return!!this.mathOn&&(!!("/"!==e||this.math===y.ALWAYS||this.parensStack&&this.parensStack.length)&&(!(this.math>y.PARENS_DIVISION)||this.parensStack&&this.parensStack.length))},B.Eval.prototype.pathRequiresRewrite=function(e){return(this.rewriteUrls===w?G:z)(e)},B.Eval.prototype.rewritePath=function(e,t){var n;return t=t||"",n=this.normalizePath(t+e),G(e)&&z(t)&&!1===G(n)&&(n="./".concat(n)),n},B.Eval.prototype.normalizePath=function(e){var t,n=e.split("/").reverse();for(e=[];0!==n.length;)switch(t=n.pop()){case".":break;case"..":0===e.length||".."===e[e.length-1]?e.push(t):e.pop();break;default:e.push(t)}return e.join("/")};var W=function(){function e(e){this.imports=[],this.variableImports=[],this._onSequencerEmpty=e,this._currentDepth=0}return e.prototype.addImport=function(e){var t=this,n={callback:e,args:null,isReady:!1};return this.imports.push(n),function(){n.args=Array.prototype.slice.call(arguments,0),n.isReady=!0,t.tryRun()}},e.prototype.addVariableImport=function(e){this.variableImports.push(e)},e.prototype.tryRun=function(){this._currentDepth++;try{for(;;){for(;this.imports.length>0;){var e=this.imports[0];if(!e.isReady)return;this.imports=this.imports.slice(1),e.callback.apply(null,e.args)}if(0===this.variableImports.length)break;var t=this.variableImports[0];this.variableImports=this.variableImports.slice(1),t()}}finally{this._currentDepth--}0===this._currentDepth&&this._onSequencerEmpty&&this._onSequencerEmpty()},e}(),J=function(e,t){this._visitor=new N(this),this._importer=e,this._finish=t,this.context=new B.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new W(this._onSequencerEmpty.bind(this))};J.prototype={isReplacing:!1,run:function(e){try{this._visitor.visit(e)}catch(e){this.error=e}this.isFinished=!0,this._sequencer.tryRun()},_onSequencerEmpty:function(){this.isFinished&&this._finish(this.error)},visitImport:function(e,t){var n=e.options.inline;if(!e.css||n){var i=new B.Eval(this.context,A(this.context.frames)),r=i.frames[0];this.importCount++,e.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,e,i,r)):this.processImportNode(e,i,r)}t.visitDeeper=!1},processImportNode:function(e,t,n){var i,r=e.options.inline;try{i=e.evalForImport(t)}catch(t){t.filename||(t.index=e.getIndex(),t.filename=e.fileInfo().filename),e.css=!0,e.error=t}if(!i||i.css&&!r)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{i.options.multiple&&(t.importMultiple=!0);for(var s=void 0===i.css,o=0;o<n.rules.length;o++)if(n.rules[o]===e){n.rules[o]=i;break}var a=this.onImported.bind(this,i,t),l=this._sequencer.addImport(a);this._importer.push(i.getPath(),s,i.fileInfo(),i.options,l)}},onImported:function(e,t,n,i,r,s){n&&(n.filename||(n.index=e.getIndex(),n.filename=e.fileInfo().filename),this.error=n);var o=this,a=e.options.inline,l=e.options.isPlugin,u=e.options.optional,c=r||s in o.recursionDetector;if(t.importMultiple||(e.skip=!!c||function(){return s in o.onceFileDetectionMap||(o.onceFileDetectionMap[s]=!0,!1)}),!s&&u&&(e.skip=!0),i&&(e.root=i,e.importedFilename=s,!a&&!l&&(t.importMultiple||!c))){o.recursionDetector[s]=!0;var h=this.context;this.context=t;try{this._visitor.visit(i)}catch(n){this.error=n}this.context=h}o.importCount--,o.isFinished&&o._sequencer.tryRun()},visitDeclaration:function(e,t){"DetachedRuleset"===e.value.type?this.context.frames.unshift(e):t.visitDeeper=!1},visitDeclarationOut:function(e){"DetachedRuleset"===e.value.type&&this.context.frames.shift()},visitAtRule:function(e,t){e.value?this.context.frames.unshift(e):e.declarations&&e.declarations.length?e.isRooted?this.context.frames.unshift(e):this.context.frames.unshift(e.declarations[0]):e.rules&&e.rules.length&&this.context.frames.unshift(e)},visitAtRuleOut:function(e){this.context.frames.shift()},visitMixinDefinition:function(e,t){this.context.frames.unshift(e)},visitMixinDefinitionOut:function(e){this.context.frames.shift()},visitRuleset:function(e,t){this.context.frames.unshift(e)},visitRulesetOut:function(e){this.context.frames.shift()},visitMedia:function(e,t){this.context.frames.unshift(e.rules[0])},visitMediaOut:function(e){this.context.frames.shift()}};var H=function(){function e(e){this.visible=e}return e.prototype.run=function(e){this.visit(e)},e.prototype.visitArray=function(e){if(!e)return e;var t,n=e.length;for(t=0;t<n;t++)this.visit(e[t]);return e},e.prototype.visit=function(e){return e?e.constructor===Array?this.visitArray(e):(!e.blocksVisibility||e.blocksVisibility()||(this.visible?e.ensureVisibility():e.ensureInvisibility(),e.accept(this)),e):e},e}(),Q=function(){function e(){this._visitor=new N(this),this.contexts=[],this.allExtendsStack=[[]]}return e.prototype.run=function(e){return(e=this._visitor.visit(e)).allExtends=this.allExtendsStack[0],e},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){if(!e.root){var n,i,r,s,o=[],a=e.rules,l=a?a.length:0;for(n=0;n<l;n++)e.rules[n]instanceof He.Extend&&(o.push(a[n]),e.extendOnEveryPath=!0);var u=e.paths;for(n=0;n<u.length;n++){var c=u[n],h=c[c.length-1].extendList;for((s=h?A(h).concat(o):o)&&(s=s.map((function(e){return e.clone()}))),i=0;i<s.length;i++)this.foundExtends=!0,(r=s[i]).findSelfSelectors(c),r.ruleset=e,0===i&&(r.firstExtendOnThisSelectorPath=!0),this.allExtendsStack[this.allExtendsStack.length-1].push(r)}this.contexts.push(e.selectors)}},e.prototype.visitRulesetOut=function(e){e.root||(this.contexts.length=this.contexts.length-1)},e.prototype.visitMedia=function(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)},e.prototype.visitMediaOut=function(e){this.allExtendsStack.length=this.allExtendsStack.length-1},e.prototype.visitAtRule=function(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)},e.prototype.visitAtRuleOut=function(e){this.allExtendsStack.length=this.allExtendsStack.length-1},e}(),K=function(){function e(){this._visitor=new N(this)}return e.prototype.run=function(e){var t=new Q;if(this.extendIndices={},t.run(e),!t.foundExtends)return e;e.allExtends=e.allExtends.concat(this.doExtendChaining(e.allExtends,e.allExtends)),this.allExtendsStack=[e.allExtends];var n=this._visitor.visit(e);return this.checkExtendsForNonMatched(e.allExtends),n},e.prototype.checkExtendsForNonMatched=function(e){var t=this.extendIndices;e.filter((function(e){return!e.hasFoundMatches&&1==e.parent_ids.length})).forEach((function(e){var n="_unknown_";try{n=e.selector.toCSS({})}catch(e){}t["".concat(e.index," ").concat(n)]||(t["".concat(e.index," ").concat(n)]=!0,r.warn("WARNING: extend '".concat(n,"' has no matches")))}))},e.prototype.doExtendChaining=function(e,t,n){var i,r,s,o,a,l,u,c,h=[],f=this;for(n=n||0,i=0;i<e.length;i++)for(r=0;r<t.length;r++)l=e[i],u=t[r],l.parent_ids.indexOf(u.object_id)>=0||(a=[u.selfSelectors[0]],(s=f.findMatch(l,a)).length&&(l.hasFoundMatches=!0,l.selfSelectors.forEach((function(e){var t=u.visibilityInfo();o=f.extendSelector(s,a,e,l.isVisible()),(c=new He.Extend(u.selector,u.option,0,u.fileInfo(),t)).selfSelectors=o,o[o.length-1].extendList=[c],h.push(c),c.ruleset=u.ruleset,c.parent_ids=c.parent_ids.concat(u.parent_ids,l.parent_ids),u.firstExtendOnThisSelectorPath&&(c.firstExtendOnThisSelectorPath=!0,u.ruleset.paths.push(o))}))));if(h.length){if(this.extendChainCount++,n>100){var p="{unable to calculate}",v="{unable to calculate}";try{p=h[0].selfSelectors[0].toCSS(),v=h[0].selector.toCSS()}catch(e){}throw{message:"extend circular reference detected. One of the circular extends is currently:".concat(p,":extend(").concat(v,")")}}return h.concat(f.doExtendChaining(h,t,n+1))}return h},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitSelector=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){if(!e.root){var n,i,r,s,o=this.allExtendsStack[this.allExtendsStack.length-1],a=[],l=this;for(r=0;r<o.length;r++)for(i=0;i<e.paths.length;i++)if(s=e.paths[i],!e.extendOnEveryPath){var u=s[s.length-1].extendList;u&&u.length||(n=this.findMatch(o[r],s)).length&&(o[r].hasFoundMatches=!0,o[r].selfSelectors.forEach((function(e){var t;t=l.extendSelector(n,s,e,o[r].isVisible()),a.push(t)})))}e.paths=e.paths.concat(a)}},e.prototype.findMatch=function(e,t){var n,i,r,s,o,a,l,u=e.selector.elements,c=[],h=[];for(n=0;n<t.length;n++)for(i=t[n],r=0;r<i.elements.length;r++)for(s=i.elements[r],(e.allowBefore||0===n&&0===r)&&c.push({pathIndex:n,index:r,matched:0,initialCombinator:s.combinator}),a=0;a<c.length;a++)l=c[a],""===(o=s.combinator.value)&&0===r&&(o=" "),!this.isElementValuesEqual(u[l.matched].value,s.value)||l.matched>0&&u[l.matched].combinator.value!==o?l=null:l.matched++,l&&(l.finished=l.matched===u.length,l.finished&&!e.allowAfter&&(r+1<i.elements.length||n+1<t.length)&&(l=null)),l?l.finished&&(l.length=u.length,l.endPathIndex=n,l.endPathElementIndex=r+1,c.length=0,h.push(l)):(c.splice(a,1),a--);return h},e.prototype.isElementValuesEqual=function(e,t){if("string"==typeof e||"string"==typeof t)return e===t;if(e instanceof He.Attribute)return e.op===t.op&&e.key===t.key&&(e.value&&t.value?(e=e.value.value||e.value)===(t=t.value.value||t.value):!e.value&&!t.value);if(e=e.value,t=t.value,e instanceof He.Selector){if(!(t instanceof He.Selector)||e.elements.length!==t.elements.length)return!1;for(var n=0;n<e.elements.length;n++){if(e.elements[n].combinator.value!==t.elements[n].combinator.value&&(0!==n||(e.elements[n].combinator.value||" ")!==(t.elements[n].combinator.value||" ")))return!1;if(!this.isElementValuesEqual(e.elements[n].value,t.elements[n].value))return!1}return!0}return!1},e.prototype.extendSelector=function(e,t,n,i){var r,s,o,a,l,u=0,c=0,h=[];for(r=0;r<e.length;r++)s=t[(a=e[r]).pathIndex],o=new He.Element(a.initialCombinator,n.elements[0].value,n.elements[0].isVariable,n.elements[0].getIndex(),n.elements[0].fileInfo()),a.pathIndex>u&&c>0&&(h[h.length-1].elements=h[h.length-1].elements.concat(t[u].elements.slice(c)),c=0,u++),l=s.elements.slice(c,a.index).concat([o]).concat(n.elements.slice(1)),u===a.pathIndex&&r>0?h[h.length-1].elements=h[h.length-1].elements.concat(l):(h=h.concat(t.slice(u,a.pathIndex))).push(new He.Selector(l)),u=a.endPathIndex,(c=a.endPathElementIndex)>=t[u].elements.length&&(c=0,u++);return u<t.length&&c>0&&(h[h.length-1].elements=h[h.length-1].elements.concat(t[u].elements.slice(c)),u++),h=(h=h.concat(t.slice(u,t.length))).map((function(e){var t=e.createDerived(e.elements);return i?t.ensureVisibility():t.ensureInvisibility(),t}))},e.prototype.visitMedia=function(e,t){var n=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);n=n.concat(this.doExtendChaining(n,e.allExtends)),this.allExtendsStack.push(n)},e.prototype.visitMediaOut=function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t},e.prototype.visitAtRule=function(e,t){var n=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);n=n.concat(this.doExtendChaining(n,e.allExtends)),this.allExtendsStack.push(n)},e.prototype.visitAtRuleOut=function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t},e}(),Z=function(){function e(){this.contexts=[[]],this._visitor=new N(this)}return e.prototype.run=function(e){return this._visitor.visit(e)},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){var n,i=this.contexts[this.contexts.length-1],r=[];this.contexts.push(r),e.root||((n=e.selectors)&&(n=n.filter((function(e){return e.getIsOutput()})),e.selectors=n.length?n:n=null,n&&e.joinSelectors(r,i,n)),n||(e.rules=null),e.paths=r)},e.prototype.visitRulesetOut=function(e){this.contexts.length=this.contexts.length-1},e.prototype.visitMedia=function(e,t){var n=this.contexts[this.contexts.length-1];e.rules[0].root=0===n.length||n[0].multiMedia},e.prototype.visitAtRule=function(e,t){var n=this.contexts[this.contexts.length-1];e.declarations&&e.declarations.length?e.declarations[0].root=0===n.length||n[0].multiMedia:e.rules&&e.rules.length&&(e.rules[0].root=e.isRooted||0===n.length||null)},e}(),X=function(){function e(e){this._visitor=new N(this),this._context=e}return e.prototype.containsSilentNonBlockedChild=function(e){var t;if(!e)return!1;for(var n=0;n<e.length;n++)if((t=e[n]).isSilent&&t.isSilent(this._context)&&!t.blocksVisibility())return!0;return!1},e.prototype.keepOnlyVisibleChilds=function(e){e&&e.rules&&(e.rules=e.rules.filter((function(e){return e.isVisible()})))},e.prototype.isEmpty=function(e){return!e||!e.rules||0===e.rules.length},e.prototype.hasVisibleSelector=function(e){return!(!e||!e.paths)&&e.paths.length>0},e.prototype.resolveVisibility=function(e){if(!e.blocksVisibility()){if(this.isEmpty(e))return;return e}var t=e.rules[0];if(this.keepOnlyVisibleChilds(t),!this.isEmpty(t))return e.ensureVisibility(),e.removeVisibilityBlock(),e},e.prototype.isVisibleRuleset=function(e){return!!e.firstRoot||!this.isEmpty(e)&&!(!e.root&&!this.hasVisibleSelector(e))},e}(),Y=function(e){this._visitor=new N(this),this._context=e,this.utils=new X(e)};Y.prototype={isReplacing:!0,run:function(e){return this._visitor.visit(e)},visitDeclaration:function(e,t){if(!e.blocksVisibility()&&!e.variable)return e},visitMixinDefinition:function(e,t){e.frames=[]},visitExtend:function(e,t){},visitComment:function(e,t){if(!e.blocksVisibility()&&!e.isSilent(this._context))return e},visitMedia:function(e,t){var n=e.rules[0].rules;return e.accept(this._visitor),t.visitDeeper=!1,this.utils.resolveVisibility(e,n)},visitImport:function(e,t){if(!e.blocksVisibility())return e},visitAtRule:function(e,t){return e.rules&&e.rules.length?this.visitAtRuleWithBody(e,t):this.visitAtRuleWithoutBody(e,t)},visitAnonymous:function(e,t){if(!e.blocksVisibility())return e.accept(this._visitor),e},visitAtRuleWithBody:function(e,t){var n=function(e){var t=e.rules;return function(e){var t=e.rules;return 1===t.length&&(!t[0].paths||0===t[0].paths.length)}(e)?t[0].rules:t}(e);return e.accept(this._visitor),t.visitDeeper=!1,this.utils.isEmpty(e)||this._mergeRules(e.rules[0].rules),this.utils.resolveVisibility(e,n)},visitAtRuleWithoutBody:function(e,t){if(!e.blocksVisibility()){if("@charset"===e.name){if(this.charset){if(e.debugInfo){var n=new He.Comment("/* ".concat(e.toCSS(this._context).replace(/\n/g,"")," */\n"));return n.debugInfo=e.debugInfo,this._visitor.visit(n)}return}this.charset=!0}return e}},checkValidNodes:function(e,t){if(e)for(var n=0;n<e.length;n++){var i=e[n];if(t&&i instanceof He.Declaration&&!i.variable)throw{message:"Properties must be inside selector blocks. They cannot be in the root",index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename};if(i instanceof He.Call)throw{message:"Function '".concat(i.name,"' did not return a root node"),index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename};if(i.type&&!i.allowRoot)throw{message:"".concat(i.type," node returned by a function is not valid here"),index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename}}},visitRuleset:function(e,t){var n,i=[];if(this.checkValidNodes(e.rules,e.firstRoot),e.root)e.accept(this._visitor),t.visitDeeper=!1;else{this._compileRulesetPaths(e);for(var r=e.rules,s=r?r.length:0,o=0;o<s;)(n=r[o])&&n.rules?(i.push(this._visitor.visit(n)),r.splice(o,1),s--):o++;s>0?e.accept(this._visitor):e.rules=null,t.visitDeeper=!1}return e.rules&&(this._mergeRules(e.rules),this._removeDuplicateRules(e.rules)),this.utils.isVisibleRuleset(e)&&(e.ensureVisibility(),i.splice(0,0,e)),1===i.length?i[0]:i},_compileRulesetPaths:function(e){e.paths&&(e.paths=e.paths.filter((function(e){var t;for(" "===e[0].elements[0].combinator.value&&(e[0].elements[0].combinator=new He.Combinator("")),t=0;t<e.length;t++)if(e[t].isVisible()&&e[t].getIsOutput())return!0;return!1})))},_removeDuplicateRules:function(e){if(e){var t,n,i,r={};for(i=e.length-1;i>=0;i--)if((n=e[i])instanceof He.Declaration)if(r[n.name]){(t=r[n.name])instanceof He.Declaration&&(t=r[n.name]=[r[n.name].toCSS(this._context)]);var s=n.toCSS(this._context);-1!==t.indexOf(s)?e.splice(i,1):t.push(s)}else r[n.name]=n}},_mergeRules:function(e){if(e){for(var t={},n=[],i=0;i<e.length;i++){var r=e[i];if(r.merge){var s=r.name;t[s]?e.splice(i--,1):n.push(t[s]=[]),t[s].push(r)}}n.forEach((function(e){if(e.length>0){var t=e[0],n=[],i=[new He.Expression(n)];e.forEach((function(e){"+"===e.merge&&n.length>0&&i.push(new He.Expression(n=[])),n.push(e.value),t.important=t.important||e.important})),t.value=new He.Value(i)}}))}}};var ee={Visitor:N,ImportVisitor:J,MarkVisibleSelectorsVisitor:H,ExtendVisitor:K,JoinSelectorVisitor:Z,ToCSSVisitor:Y};var te=function(){var e,t,n,i,r,s,o,a=[],l={};function u(n){for(var i,a,c,h=l.i,f=t,p=l.i-o,v=l.i+s.length-p,d=l.i+=n,m=e;l.i<v;l.i++){if(i=m.charCodeAt(l.i),l.autoCommentAbsorb&&47===i){if("/"===(a=m.charAt(l.i+1))){c={index:l.i,isLineComment:!0};var g=m.indexOf("\n",l.i+2);g<0&&(g=v),l.i=g,c.text=m.substr(c.index,l.i-c.index),l.commentStore.push(c);continue}if("*"===a){var y=m.indexOf("*/",l.i+2);if(y>=0){c={index:l.i,text:m.substr(l.i,y+2-l.i),isLineComment:!1},l.i+=c.text.length-1,l.commentStore.push(c);continue}}break}if(32!==i&&10!==i&&9!==i&&13!==i)break}if(s=s.slice(n+l.i-d+p),o=l.i,!s.length){if(t<r.length-1)return s=r[++t],u(0),!0;l.finished=!0}return h!==l.i||f!==t}return l.save=function(){o=l.i,a.push({current:s,i:l.i,j:t})},l.restore=function(e){(l.i>n||l.i===n&&e&&!i)&&(n=l.i,i=e);var r=a.pop();s=r.current,o=l.i=r.i,t=r.j},l.forget=function(){a.pop()},l.isWhitespace=function(t){var n=l.i+(t||0),i=e.charCodeAt(n);return 32===i||13===i||9===i||10===i},l.$re=function(e){l.i>o&&(s=s.slice(l.i-o),o=l.i);var t=e.exec(s);return t?(u(t[0].length),"string"==typeof t?t:1===t.length?t[0]:t):null},l.$char=function(t){return e.charAt(l.i)!==t?null:(u(1),t)},l.$peekChar=function(t){return e.charAt(l.i)!==t?null:t},l.$str=function(t){for(var n=t.length,i=0;i<n;i++)if(e.charAt(l.i+i)!==t.charAt(i))return null;return u(n),t},l.$quoted=function(t){var n=t||l.i,i=e.charAt(n);if("'"===i||'"'===i){for(var r=e.length,s=n,o=1;o+s<r;o++){switch(e.charAt(o+s)){case"\\":o++;continue;case"\r":case"\n":break;case i:var a=e.substr(s,o+1);return t||0===t?[i,a]:(u(o+1),a)}}return null}},l.$parseUntil=function(t){var n,i="",r=null,s=!1,o=0,a=[],c=[],h=e.length,f=l.i,p=l.i,v=l.i,d=!0;n="string"==typeof t?function(e){return e===t}:function(e){return t.test(e)};do{var m=e.charAt(v);if(0===o&&n(m))(r=e.substr(p,v-p))?c.push(r):c.push(" "),r=c,u(v-f),d=!1;else{if(s){"*"===m&&"/"===e.charAt(v+1)&&(v++,o--,s=!1),v++;continue}switch(m){case"\\":v++,m=e.charAt(v),c.push(e.substr(p,v-p+1)),p=v+1;break;case"/":"*"===e.charAt(v+1)&&(v++,s=!0,o++);break;case"'":case'"':(i=l.$quoted(v))?(c.push(e.substr(p,v-p),i),p=(v+=i[1].length-1)+1):(u(v-f),r=m,d=!1);break;case"{":a.push("}"),o++;break;case"(":a.push(")"),o++;break;case"[":a.push("]"),o++;break;case"}":case")":case"]":var g=a.pop();m===g?o--:(u(v-f),r=g,d=!1)}++v>h&&(d=!1)}}while(d);return r||null},l.autoCommentAbsorb=!0,l.commentStore=[],l.finished=!1,l.peek=function(t){if("string"==typeof t){for(var n=0;n<t.length;n++)if(e.charAt(l.i+n)!==t.charAt(n))return!1;return!0}return t.test(s)},l.peekChar=function(t){return e.charAt(l.i)===t},l.currentChar=function(){return e.charAt(l.i)},l.prevChar=function(){return e.charAt(l.i-1)},l.getInput=function(){return e},l.peekNotNumeric=function(){var t=e.charCodeAt(l.i);return t>57||t<43||47===t||44===t},l.start=function(i,a,c){e=i,l.i=t=o=n=0,r=a?function(e,t){var n,i,r,s,o,a,l,u,c,h=e.length,f=0,p=0,v=[],d=0;function m(t){var n=o-d;n<512&&!t||!n||(v.push(e.slice(d,o+1)),d=o+1)}for(o=0;o<h;o++)if(!((l=e.charCodeAt(o))>=97&&l<=122||l<34))switch(l){case 40:p++,i=o;continue;case 41:if(--p<0)return t("missing opening `(`",o);continue;case 59:p||m();continue;case 123:f++,n=o;continue;case 125:if(--f<0)return t("missing opening `{`",o);f||p||m();continue;case 92:if(o<h-1){o++;continue}return t("unescaped `\\`",o);case 34:case 39:case 96:for(c=0,a=o,o+=1;o<h;o++)if(!((u=e.charCodeAt(o))>96)){if(u==l){c=1;break}if(92==u){if(o==h-1)return t("unescaped `\\`",o);o++}}if(c)continue;return t("unmatched `".concat(String.fromCharCode(l),"`"),a);case 47:if(p||o==h-1)continue;if(47==(u=e.charCodeAt(o+1)))for(o+=2;o<h&&(!((u=e.charCodeAt(o))<=13)||10!=u&&13!=u);o++);else if(42==u){for(r=a=o,o+=2;o<h-1&&(125==(u=e.charCodeAt(o))&&(s=o),42!=u||47!=e.charCodeAt(o+1));o++);if(o==h-1)return t("missing closing `*/`",a);o++}continue;case 42:if(o<h-1&&47==e.charCodeAt(o+1))return t("unmatched `/*`",o);continue}return 0!==f?t(r>n&&s>r?"missing closing `}` or `*/`":"missing closing `}`",n):0!==p?t("missing closing `)`",i):(m(!0),v)}(i,c):[i],s=r[0],u(0)},l.end=function(){var t,r=l.i>=e.length;return l.i<n&&(t=i,l.i=n),{isFinished:r,furthest:l.i,furthestPossibleErrorMessage:t,furthestReachedEnd:l.i>=e.length-1,furthestChar:e[l.i]}},l};var ne=function e(t){return{_data:{},add:function(e,t){e=e.toLowerCase(),this._data.hasOwnProperty(e),this._data[e]=t},addMultiple:function(e){var t=this;Object.keys(e).forEach((function(n){t.add(n,e[n])}))},get:function(e){return this._data[e]||t&&t.get(e)},getLocalFunctions:function(){return this._data},inherit:function(){return e(this)},create:function(t){return e(t)}}}(null),ie={queryInParens:!0},re={queryInParens:!0},se=function(e,t,n,i,r,s){this.value=e,this._index=t,this._fileInfo=n,this.mapLines=i,this.rulesetLike=void 0!==r&&r,this.allowRoot=!0,this.copyVisibilityInfo(s)};se.prototype=Object.assign(new u,{type:"Anonymous",eval:function(){return new se(this.value,this._index,this._fileInfo,this.mapLines,this.rulesetLike,this.visibilityInfo())},compare:function(e){return e.toCSS&&this.toCSS()===e.toCSS()?0:void 0},isRulesetLike:function(){return this.rulesetLike},genCSS:function(e,t){this.nodeVisible=Boolean(this.value),this.nodeVisible&&t.add(this.value,this._fileInfo,this._index,this.mapLines)}});var oe=function e(t,n,i,s){var o;s=s||0;var a=te();function l(e,t){throw new V({index:a.i,filename:i.filename,type:t||"Syntax",message:e},n)}function u(e,s,o){t.quiet||r.warn(new V({index:null!=s?s:a.i,filename:i.filename,type:o?"".concat(o.toUpperCase()," WARNING"):"WARNING",message:e},n).toString())}function c(e,t){var n=e instanceof Function?e.call(o):a.$re(e);if(n)return n;l(t||("string"==typeof e?"expected '".concat(e,"' got '").concat(a.currentChar(),"'"):"unexpected token"))}function h(e,t){if(a.$char(e))return e;l(t||"expected '".concat(e,"' got '").concat(a.currentChar(),"'"))}function f(e){var t=i.filename;return{lineNumber:k(e,a.getInput()).line+1,fileName:t}}return{parserInput:a,imports:n,fileInfo:i,parseNode:function(e,t,r){var l,u=[],c=a;try{c.start(e,!1,(function(e,t){r({message:e,index:t+s})}));for(var h=0,f=void 0;f=t[h];h++)l=o[f](),u.push(l||null);c.end().isFinished?r(null,u):r(!0,null)}catch(e){throw new V({index:e.index+s,message:e.message},n,i.filename)}},parse:function(r,s,u){var c,h,f,p,v=null,d="";if(u&&u.disablePluginRule&&(o.plugin=function(){a.$re(/^@plugin?\s+/)&&l("@plugin statements are not allowed when disablePluginRule is set to true")}),h=u&&u.globalVars?"".concat(e.serializeVars(u.globalVars),"\n"):"",f=u&&u.modifyVars?"\n".concat(e.serializeVars(u.modifyVars)):"",t.pluginManager)for(var m=t.pluginManager.getPreProcessors(),g=0;g<m.length;g++)r=m[g].process(r,{context:t,imports:n,fileInfo:i});(h||u&&u.banner)&&(d=(u&&u.banner?u.banner:"")+h,(p=n.contentsIgnoredChars)[i.filename]=p[i.filename]||0,p[i.filename]+=d.length),r=d+(r=r.replace(/\r\n?/g,"\n")).replace(/^\uFEFF/,"")+f,n.contents[i.filename]=r;try{a.start(r,t.chunkInput,(function(e,t){throw new V({index:t,type:"Parse",message:e,filename:i.filename},n)})),He.Node.prototype.parse=this,c=new He.Ruleset(null,this.parsers.primary()),He.Node.prototype.rootNode=c,c.root=!0,c.firstRoot=!0,c.functionRegistry=ne.inherit()}catch(e){return s(new V(e,n,i.filename))}var y=a.end();if(!y.isFinished){var b=y.furthestPossibleErrorMessage;b||(b="Unrecognised input","}"===y.furthestChar?b+=". Possibly missing opening '{'":")"===y.furthestChar?b+=". Possibly missing opening '('":y.furthestReachedEnd&&(b+=". Possibly missing something")),v=new V({type:"Parse",message:b,index:y.furthest,filename:i.filename},n)}var w=function(e){return(e=v||e||n.error)?(e instanceof V||(e=new V(e,n,i.filename)),s(e)):s(null,c)};if(!1===t.processImports)return w();new ee.ImportVisitor(n,w).run(c)},parsers:o={primary:function(){for(var e,t=this.mixin,n=[];;){for(;e=this.comment();)n.push(e);if(a.finished)break;if(a.peek("}"))break;if(e=this.extendRule())n=n.concat(e);else if(e=t.definition()||this.declaration()||t.call(!1,!1)||this.ruleset()||this.variableCall()||this.entities.call()||this.atrule())n.push(e);else{for(var i=!1;a.$char(";");)i=!0;if(!i)break}}return n},comment:function(){if(a.commentStore.length){var e=a.commentStore.shift();return new He.Comment(e.text,e.isLineComment,e.index+s,i)}},entities:{mixinLookup:function(){return o.mixin.call(!0,!0)},quoted:function(e){var t,n=a.i,r=!1;if(a.save(),a.$char("~"))r=!0;else if(e)return void a.restore();if(t=a.$quoted())return a.forget(),new He.Quoted(t.charAt(0),t.substr(1,t.length-2),r,n+s,i);a.restore()},keyword:function(){var e=a.$char("%")||a.$re(/^\[?(?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\]?/);if(e)return He.Color.fromKeyword(e)||new He.Keyword(e)},call:function(){var e,t,n,r=a.i;if(!a.peek(/^url\(/i))if(a.save(),e=a.$re(/^([\w-]+|%|~|progid:[\w.]+)\(/)){if(e=e[1],(n=this.customFuncCall(e))&&(t=n.parse())&&n.stop)return a.forget(),t;if(t=this.arguments(t),a.$char(")"))return a.forget(),new He.Call(e,t,r+s,i);a.restore("Could not parse call arguments or missing ')'")}else a.forget()},declarationCall:function(){var e,t,n=a.i;if(a.save(),e=a.$re(/^[\w]+\(/)){e=e.substring(0,e.length-1);var r,o=this.ruleProperty();if(o&&(r=this.value()),o&&r&&(t=[new He.Declaration(o,r,null,null,a.i+s,i,!0)]),a.$char(")"))return a.forget(),new He.Call(e,t,n+s,i);a.restore("Could not parse call arguments or missing ')'")}else a.forget()},customFuncCall:function(e){return{alpha:t(o.ieAlpha,!0),boolean:t(n),if:t(n)}[e.toLowerCase()];function t(e,t){return{parse:e,stop:t}}function n(){return[c(o.condition,"expected condition")]}},arguments:function(e){var t,n,i=e||[],r=[];for(a.save();;){if(e)e=!1;else{if(!(n=o.detachedRuleset()||this.assignment()||o.expression()))break;n.value&&1==n.value.length&&(n=n.value[0]),i.push(n)}a.$char(",")||(a.$char(";")||t)&&(t=!0,n=i.length<1?i[0]:new He.Value(i),r.push(n),i=[])}return a.forget(),t?r:i},literal:function(){return this.dimension()||this.color()||this.quoted()||this.unicodeDescriptor()},assignment:function(){var e,t;if(a.save(),e=a.$re(/^\w+(?=\s?=)/i))if(a.$char("=")){if(t=o.entity())return a.forget(),new He.Assignment(e,t);a.restore()}else a.restore();else a.restore()},url:function(){var e,t=a.i;if(a.autoCommentAbsorb=!1,a.$str("url("))return e=this.quoted()||this.variable()||this.property()||a.$re(/^(?:(?:\\[()'"])|[^()'"])+/)||"",a.autoCommentAbsorb=!0,h(")"),new He.URL(void 0!==e.value||e instanceof He.Variable||e instanceof He.Property?e:new He.Anonymous(e,t),t+s,i);a.autoCommentAbsorb=!0},variable:function(){var e,t,n=a.i;if(a.save(),"@"===a.currentChar()&&(t=a.$re(/^@@?[\w-]+/))){if("("===(e=a.currentChar())||"["===e&&!a.prevChar().match(/^\s/)){var r=o.variableCall(t);if(r)return a.forget(),r}return a.forget(),new He.Variable(t,n+s,i)}a.restore()},variableCurly:function(){var e,t=a.i;if("@"===a.currentChar()&&(e=a.$re(/^@\{([\w-]+)\}/)))return new He.Variable("@".concat(e[1]),t+s,i)},property:function(){var e,t=a.i;if("$"===a.currentChar()&&(e=a.$re(/^\$[\w-]+/)))return new He.Property(e,t+s,i)},propertyCurly:function(){var e,t=a.i;if("$"===a.currentChar()&&(e=a.$re(/^\$\{([\w-]+)\}/)))return new He.Property("$".concat(e[1]),t+s,i)},color:function(){var e;if(a.save(),"#"===a.currentChar()&&(e=a.$re(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3,4})([\w.#[])?/))&&!e[2])return a.forget(),new He.Color(e[1],void 0,e[0]);a.restore()},colorKeyword:function(){a.save();var e=a.autoCommentAbsorb;a.autoCommentAbsorb=!1;var t=a.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);if(a.autoCommentAbsorb=e,t){a.restore();var n=He.Color.fromKeyword(t);return n?(a.$str(t),n):void 0}a.forget()},dimension:function(){if(!a.peekNotNumeric()){var e=a.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);return e?new He.Dimension(e[1],e[2]):void 0}},unicodeDescriptor:function(){var e;if(e=a.$re(/^U\+[0-9a-fA-F?]+(-[0-9a-fA-F?]+)?/))return new He.UnicodeDescriptor(e[0])},javascript:function(){var e,t=a.i;a.save();var n=a.$char("~");if(a.$char("`")){if(e=a.$re(/^[^`]*`/))return a.forget(),new He.JavaScript(e.substr(0,e.length-1),Boolean(n),t+s,i);a.restore("invalid javascript definition")}else a.restore()}},variable:function(){var e;if("@"===a.currentChar()&&(e=a.$re(/^(@[\w-]+)\s*:/)))return e[1]},variableCall:function(e){var t,n=a.i,r=!!e,s=e;if(a.save(),s||"@"===a.currentChar()&&(s=a.$re(/^(@[\w-]+)(\(\s*\))?/))){if(!(t=this.mixin.ruleLookups())&&(r&&"()"!==a.$str("()")||"()"!==s[2]))return void a.restore("Missing '[...]' lookup in variable call");r||(s=s[1]);var l=new He.VariableCall(s,n,i);return!r&&o.end()?(a.forget(),l):(a.forget(),new He.NamespaceValue(l,t,n,i))}a.restore()},extend:function(e){var t,n,r,o,h,f=a.i;if(a.$str(e?"&:extend(":":extend(")){do{r=null,t=null;for(var p=!0;!(r=a.$re(/^(!?all)(?=\s*(\)|,))/))&&(n=this.element());)!p&&n.combinator.value&&u("Targeting complex selectors can have unexpected behavior, and this behavior may change in the future.",f),p=!1,t?t.push(n):t=[n];r=r&&r[1],t||l("Missing target selector for :extend()."),h=new He.Extend(new He.Selector(t),r,f+s,i),o?o.push(h):o=[h]}while(a.$char(","));return c(/^\)/),e&&c(/^;/),o}},extendRule:function(){return this.extend(!0)},mixin:{call:function(e,t){var n,r,l,c,f,p=a.currentChar(),v=!1,d=a.i,m=!1;if("."===p||"#"===p){if(a.save(),r=this.elements()){if(f=a.i,a.$char("(")&&(m=a.isWhitespace(-2),l=this.args(!0).args,h(")"),c=!0,m&&u("Whitespace between a mixin name and parenthe