var less=function(){"use strict";var e=function(){function e(e,t){return null!=t&&e instanceof t}var t,i,n;try{t=Map}catch(e){t=function(){}}try{i=Set}catch(e){i=function(){}}try{n=Promise}catch(e){n=function(){}}function r(s,a,l,u,h){"object"==typeof a&&(l=a.depth,u=a.prototype,h=a.includeNonEnumerable,a=a.circular);var c=[],f=[],p="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function s(l,v){if(null===l)return null;if(0===v)return l;var d,m;if("object"!=typeof l)return l;if(e(l,t))d=new t;else if(e(l,i))d=new i;else if(e(l,n))d=new n(function(e,t){l.then(function(t){e(s(t,v-1))},function(e){t(s(e,v-1))})});else if(r.__isArray(l))d=[];else if(r.__isRegExp(l))d=new RegExp(l.source,o(l)),l.lastIndex&&(d.lastIndex=l.lastIndex);else if(r.__isDate(l))d=new Date(l.getTime());else{if(p&&Buffer.isBuffer(l))return d=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(d),d;e(l,Error)?d=Object.create(l):void 0===u?(m=Object.getPrototypeOf(l),d=Object.create(m)):(d=Object.create(u),m=u)}if(a){var g=c.indexOf(l);if(-1!=g)return f[g];c.push(l),f.push(d)}for(var y in e(l,t)&&l.forEach(function(e,t){var i=s(t,v-1),n=s(e,v-1);d.set(i,n)}),e(l,i)&&l.forEach(function(e){var t=s(e,v-1);d.add(t)}),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),b&&null==b.set||(d[y]=s(l[y],v-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(l);for(y=0;y=0&&"\n"!==t.charAt(i);)r++;return"number"==typeof e&&(n=(t.slice(0,e).match(/\n/g)||"").length),{line:n,column:r}},copyArray:function(e){var t,i=e.length,n=new Array(i);for(t=0;tt?1:void 0},s.prototype.blocksVisibility=function(){return null==this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks},s.prototype.addVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1},s.prototype.removeVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1},s.prototype.ensureVisibility=function(){this.nodeVisible=!0},s.prototype.ensureInvisibility=function(){this.nodeVisible=!1},s.prototype.isVisible=function(){return this.nodeVisible},s.prototype.visibilityInfo=function(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}},s.prototype.copyVisibilityInfo=function(e){e&&(this.visibilityBlocks=e.visibilityBlocks,this.nodeVisible=e.nodeVisible)};var o=function(e,t,i,n,r,s){this.value=e,this._index=t,this._fileInfo=i,this.mapLines=n,this.rulesetLike=void 0!==r&&r,this.allowRoot=!0,this.copyVisibilityInfo(s)};o.prototype=new s,o.prototype.type="Anonymous",o.prototype.eval=function(){return new o(this.value,this._index,this._fileInfo,this.mapLines,this.rulesetLike,this.visibilityInfo())},o.prototype.compare=function(e){return e.toCSS&&this.toCSS()===e.toCSS()?0:void 0},o.prototype.isRulesetLike=function(){return this.rulesetLike},o.prototype.genCSS=function(e,t){this.nodeVisible=Boolean(this.value),this.nodeVisible&&t.add(this.value,this._fileInfo,this._index,this.mapLines)};var a=function(e){this.value=e};a.prototype=new s,a.prototype.type="Paren",a.prototype.genCSS=function(e,t){t.add("("),this.value.genCSS(e,t),t.add(")")},a.prototype.eval=function(e){return new a(this.value.eval(e))};var l=function(e,t,i){var n="";if(e.dumpLineNumbers&&!e.compress)switch(e.dumpLineNumbers){case"comments":n=l.asComment(t);break;case"mediaquery":n=l.asMediaQuery(t);break;case"all":n=l.asComment(t)+(i||"")+l.asMediaQuery(t)}return n};l.asComment=function(e){return"/* line "+e.debugInfo.lineNumber+", "+e.debugInfo.fileName+" */\n"},l.asMediaQuery=function(e){var t=e.debugInfo.fileName;return/^[a-z]+:\/\//i.test(t)||(t="file://"+t),"@media -sass-debug-info{filename{font-family:"+t.replace(/([.:\/\\])/g,function(e){return"\\"==e&&(e="/"),"\\"+e})+"}line{font-family:\\00003"+e.debugInfo.lineNumber+"}}\n"};var u=function(e,t,i,n){this.value=e,this.isLineComment=t,this._index=i,this._fileInfo=n,this.allowRoot=!0};(u.prototype=new s).type="Comment",u.prototype.genCSS=function(e,t){this.debugInfo&&t.add(l(e,this),this.fileInfo(),this.getIndex()),t.add(this.value)},u.prototype.isSilent=function(e){var t=e.compress&&"!"!==this.value[2];return this.isLineComment||t};var h={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:.0025,turn:1}},c=function(e,t,i){this.numerator=e?n.copyArray(e).sort():[],this.denominator=t?n.copyArray(t).sort():[],i?this.backupUnit=i:e&&e.length&&(this.backupUnit=e[0])};(c.prototype=new s).type="Unit",c.prototype.clone=function(){return new c(n.copyArray(this.numerator),n.copyArray(this.denominator),this.backupUnit)},c.prototype.genCSS=function(e,t){var i=e&&e.strictUnits;1===this.numerator.length?t.add(this.numerator[0]):!i&&this.backupUnit?t.add(this.backupUnit):!i&&this.denominator.length&&t.add(this.denominator[0])},c.prototype.toString=function(){var e,t=this.numerator.join("*");for(e=0;e0)for(t=0;t=6?(this.rgb=[],e.match(/.{2}/g).map(function(e,t){t<3?n.rgb.push(parseInt(e,16)):n.alpha=parseInt(e,16)/255})):(this.rgb=[],e.split("").map(function(e,t){t<3?n.rgb.push(parseInt(e+e,16)):n.alpha=parseInt(e+e,16)/255})),this.alpha=this.alpha||("number"==typeof t?t:1),void 0!==i&&(this.value=i)};function v(e,t){return Math.min(Math.max(e,0),t)}function d(e){return"#"+e.map(function(e){return((e=v(Math.round(e),255))<16?"0":"")+e.toString(16)}).join("")}p.prototype=new s,p.prototype.type="Color",p.prototype.luma=function(){var e=this.rgb[0]/255,t=this.rgb[1]/255,i=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*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},p.prototype.genCSS=function(e,t){t.add(this.toCSS(e))},p.prototype.toCSS=function(e,t){var i,n,r,s=e&&e.compress&&!t,o=[];if(n=this.fround(e,this.alpha),this.value)if(0===this.value.indexOf("rgb"))n<1&&(r="rgba");else{if(0!==this.value.indexOf("hsl"))return this.value;r=n<1?"hsla":"hsl"}else n<1&&(r="rgba");switch(r){case"rgba":o=this.rgb.map(function(e){return v(Math.round(e),255)}).concat(v(n,1));break;case"hsla":o.push(v(n,1));case"hsl":i=this.toHSL(),o=[this.fround(e,i.h),this.fround(e,100*i.s)+"%",this.fround(e,100*i.l)+"%"].concat(o)}if(r)return r+"("+o.join(","+(s?"":" "))+")";if(i=this.toRGB(),s){var a=i.split("");a[1]===a[2]&&a[3]===a[4]&&a[5]===a[6]&&(i="#"+a[1]+a[3]+a[5])}return i},p.prototype.operate=function(e,t,i){for(var n=new Array(3),r=this.alpha*(1-i.alpha)+i.alpha,s=0;s<3;s++)n[s]=this._operate(e,t,this.rgb[s],i.rgb[s]);return new p(n,r)},p.prototype.toRGB=function(){return d(this.rgb)},p.prototype.toHSL=function(){var e,t,i=this.rgb[0]/255,n=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(i,n,r),a=Math.min(i,n,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 i:e=(n-r)/u+(n-1e-6&&(n=i.toFixed(20).replace(/0+$/,"")),e&&e.compress){if(0===i&&this.unit.isLength())return void t.add(n);i>0&&i<1&&(n=n.substr(1))}t.add(n),this.unit.genCSS(e,t)},m.prototype.operate=function(e,t,i){var n=this._operate(e,t,this.value,i.value),r=this.unit.clone();if("+"===t||"-"===t)if(0===r.numerator.length&&0===r.denominator.length)r=i.unit.clone(),this.unit.backupUnit&&(r.backupUnit=this.unit.backupUnit);else if(0===i.unit.numerator.length&&0===r.denominator.length);else{if(i=i.convertTo(this.unit.usedUnits()),e.strictUnits&&i.unit.toString()!==r.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+r.toString()+"' and '"+i.unit.toString()+"'.");n=this._operate(e,t,this.value,i.value)}else"*"===t?(r.numerator=r.numerator.concat(i.unit.numerator).sort(),r.denominator=r.denominator.concat(i.unit.denominator).sort(),r.cancel()):"/"===t&&(r.numerator=r.numerator.concat(i.unit.denominator).sort(),r.denominator=r.denominator.concat(i.unit.numerator).sort(),r.cancel());return new m(n,r)},m.prototype.compare=function(e){var t,i;if(e instanceof m){if(this.unit.isEmpty()||e.unit.isEmpty())t=this,i=e;else if(t=this.unify(),i=e.unify(),0!==t.unit.compare(i.unit))return;return s.numericCompare(t.value,i.value)}},m.prototype.unify=function(){return this.convertTo({length:"px",duration:"s",angle:"rad"})},m.prototype.convertTo=function(e){var t,i,n,r,s,o=this.value,a=this.unit.clone(),l={};if("string"==typeof e){for(t in h)h[t].hasOwnProperty(e)&&((l={})[t]=e);e=l}for(i in s=function(e,t){return n.hasOwnProperty(e)?(t?o/=n[e]/n[r]:o*=n[e]/n[r],r):e},e)e.hasOwnProperty(i)&&(r=e[i],n=h[i],a.map(s));return a.cancel(),new m(o,a)};var g=function(e,t){if(this.value=e,this.noSpacing=t,!e)throw new Error("Expression requires an array parameter")};(g.prototype=new s).type="Expression",g.prototype.accept=function(e){this.value=e.visitArray(this.value)},g.prototype.eval=function(e){var t,i=e.isMathOn(),n=this.parens&&(3!==e.math||!this.parensInOp),r=!1;return n&&e.inParenthesis(),this.value.length>1?t=new g(this.value.map(function(t){return t.eval?t.eval(e):t}),this.noSpacing):1===this.value.length?(!this.value[0].parens||this.value[0].parensInOp||e.inCalc||(r=!0),t=this.value[0].eval(e)):t=this,n&&e.outOfParenthesis(),!this.parens||!this.parensInOp||i||r||t instanceof m||(t=new a(t)),t},g.prototype.genCSS=function(e,t){for(var i=0;i1?e-1:e)<1?r+(s-r)*e*6:2*e<1?s:3*e<2?r+(s-r)*(2/3-e)*6:r}e=V(e)%360/360,t=P(V(t)),i=P(V(i)),n=P(V(n)),r=2*i-(s=i<=.5?i*(t+1):i+t-i*t);var a=[255*o(e+1/3),255*o(e),255*o(e-1/3)];return n=V(n),new p(a,n,"hsla")}catch(e){}},hsv:function(e,t,i){return M.hsva(e,t,i,1)},hsva:function(e,t,i,n){var r,s;e=V(e)%360/360*360,t=V(t),i=V(i),n=V(n);var o=[i,i*(1-t),i*(1-(s=e/60-(r=Math.floor(e/60%6)))*t),i*(1-(1-s)*t)],a=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return M.rgba(255*o[a[r][0]],255*o[a[r][1]],255*o[a[r][2]],n)},hue:function(e){return new m(e.toHSL().h)},saturation:function(e){return new m(100*e.toHSL().s,"%")},lightness:function(e){return new m(100*e.toHSL().l,"%")},hsvhue:function(e){return new m(e.toHSV().h)},hsvsaturation:function(e){return new m(100*e.toHSV().s,"%")},hsvvalue:function(e){return new m(100*e.toHSV().v,"%")},red:function(e){return new m(e.rgb[0])},green:function(e){return new m(e.rgb[1])},blue:function(e){return new m(e.rgb[2])},alpha:function(e){return new m(e.toHSL().a)},luma:function(e){return new m(e.luma()*e.alpha*100,"%")},luminance:function(e){var t=.2126*e.rgb[0]/255+.7152*e.rgb[1]/255+.0722*e.rgb[2]/255;return new m(t*e.alpha*100,"%")},saturate:function(e,t,i){if(!e.rgb)return null;var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.s+=n.s*t.value/100:n.s+=t.value/100,n.s=P(n.s),R(e,n)},desaturate:function(e,t,i){var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.s-=n.s*t.value/100:n.s-=t.value/100,n.s=P(n.s),R(e,n)},lighten:function(e,t,i){var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.l+=n.l*t.value/100:n.l+=t.value/100,n.l=P(n.l),R(e,n)},darken:function(e,t,i){var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.l-=n.l*t.value/100:n.l-=t.value/100,n.l=P(n.l),R(e,n)},fadein:function(e,t,i){var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.a+=n.a*t.value/100:n.a+=t.value/100,n.a=P(n.a),R(e,n)},fadeout:function(e,t,i){var n=e.toHSL();return void 0!==i&&"relative"===i.value?n.a-=n.a*t.value/100:n.a-=t.value/100,n.a=P(n.a),R(e,n)},fade:function(e,t){var i=e.toHSL();return i.a=t.value/100,i.a=P(i.a),R(e,i)},spin:function(e,t){var i=e.toHSL(),n=(i.h+t.value)%360;return i.h=n<0?360+n:n,R(e,i)},mix:function(e,t,i){e.toHSL&&t.toHSL||(console.log(t.type),console.dir(t)),i||(i=new m(50));var n=i.value/100,r=2*n-1,s=e.toHSL().a-t.toHSL().a,o=((r*s==-1?r:(r+s)/(1+r*s))+1)/2,a=1-o,l=[e.rgb[0]*o+t.rgb[0]*a,e.rgb[1]*o+t.rgb[1]*a,e.rgb[2]*o+t.rgb[2]*a],u=e.alpha*n+t.alpha*(1-n);return new p(l,u)},greyscale:function(e){return M.desaturate(e,new m(100))},contrast:function(e,t,i,n){if(!e.rgb)return null;if(void 0===i&&(i=M.rgba(255,255,255,1)),void 0===t&&(t=M.rgba(0,0,0,1)),t.luma()>i.luma()){var r=i;i=t,t=r}return n=void 0===n?.43:V(n),e.luma().5&&(n=1,i=e>.25?Math.sqrt(e):((16*e-12)*e+4)*e),e-(1-2*t)*n*(i-e)},hardlight:function(e,t){return O.overlay(t,e)},difference:function(e,t){return Math.abs(e-t)},exclusion:function(e,t){return e+t-2*e*t},average:function(e,t){return(e+t)/2},negation:function(e,t){return 1-Math.abs(e+t-1)}};for(var F in O)O.hasOwnProperty(F)&&($[F]=$.bind(null,O[F]));A.addMultiple($);var L=function(e){" "===e?(this.value=" ",this.emptyOrWhitespace=!0):(this.value=e?e.trim():"",this.emptyOrWhitespace=""===this.value)};(L.prototype=new s).type="Combinator";var D={"":!0," ":!0,"|":!0};L.prototype.genCSS=function(e,t){var i=e.compress||D[this.value]?"":" ";t.add(i+this.value+i)};var B=function(e,t,i,n,r,s){this.combinator=e instanceof L?e:new L(e),this.value="string"==typeof t?t.trim():t||"",this.isVariable=i,this._index=n,this._fileInfo=r,this.copyVisibilityInfo(s),this.setParent(this.combinator,this)};B.prototype=new s,B.prototype.type="Element",B.prototype.accept=function(e){var t=this.value;this.combinator=e.visit(this.combinator),"object"==typeof t&&(this.value=e.visit(t))},B.prototype.eval=function(e){return new B(this.combinator,this.value.eval?this.value.eval(e):this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},B.prototype.clone=function(){return new B(this.combinator,this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},B.prototype.genCSS=function(e,t){t.add(this.toCSS(e),this.fileInfo(),this.getIndex())},B.prototype.toCSS=function(e){e=e||{};var t=this.value,i=e.firstSelector;return t instanceof a&&(e.firstSelector=!0),t=t.toCSS?t.toCSS(e):t,e.firstSelector=i,""===t&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(e)+t};var U=function(e,t,i){Error.call(this);var r=e.filename||i;if(this.message=e.message,this.stack=e.stack,t&&r){var s=t.contents[r],o=n.getLocation(e.index,s),a=o.line,l=o.column,u=e.call&&n.getLocation(e.call,s).line,h=s?s.split("\n"):"";if(this.type=e.type||"Syntax",this.filename=r,this.index=e.index,this.line="number"==typeof a?a+1:null,this.column=l,!this.line&&this.stack){var c=this.stack.match(/(|Function):(\d+):(\d+)/);c&&(c[2]&&(this.line=parseInt(c[2])-2),c[3]&&(this.column=parseInt(c[3])))}this.callLine=u+1,this.callExtract=h[u],this.extract=[h[this.line-2],h[this.line-1],h[this.line]]}};if(void 0===Object.create){var j=function(){};j.prototype=Error.prototype,U.prototype=new j}else U.prototype=Object.create(Error.prototype);U.prototype.constructor=U,U.prototype.toString=function(e){e=e||{};var t="",i=this.extract||[],n=[],r=function(e){return e};if(e.stylize){var s=typeof e.stylize;if("function"!==s)throw Error("options.stylize should be a function, got a "+s+"!");r=e.stylize}if(null!==this.line){if("string"==typeof i[0]&&n.push(r(this.line-1+" "+i[0],"grey")),"string"==typeof i[1]){var o=this.line+" ";i[1]&&(o+=i[1].slice(0,this.column)+r(r(r(i[1].substr(this.column,1),"bold")+i[1].slice(this.column+1),"red"),"inverse")),n.push(o)}"string"==typeof i[2]&&n.push(r(this.line+1+" "+i[2],"grey")),n=n.join("\n")+r("","reset")+"\n"}return t+=r(this.type+"Error: "+this.message,"red"),this.filename&&(t+=r(" in ","red")+this.filename),this.line&&(t+=r(" on line "+this.line+", column "+(this.column+1)+":","grey")),t+="\n"+n,this.callLine&&(t+=r("from ","red")+(this.filename||"")+"/n",t+=r(this.callLine,"grey")+" "+this.callExtract+"/n"),t};var N=function(e,t,i,n,r,s){this.extendList=t,this.condition=i,this.evaldCondition=!i,this._index=n,this._fileInfo=r,this.elements=this.getElements(e),this.mixinElements_=void 0,this.copyVisibilityInfo(s),this.setParent(this.elements,this)};N.prototype=new s,N.prototype.type="Selector",N.prototype.accept=function(e){this.elements&&(this.elements=e.visitArray(this.elements)),this.extendList&&(this.extendList=e.visitArray(this.extendList)),this.condition&&(this.condition=e.visit(this.condition))},N.prototype.createDerived=function(e,t,i){e=this.getElements(e);var n=new N(e,t||this.extendList,null,this.getIndex(),this.fileInfo(),this.visibilityInfo());return n.evaldCondition=null!=i?i:this.evaldCondition,n.mediaEmpty=this.mediaEmpty,n},N.prototype.getElements=function(e){return e?("string"==typeof e&&this.parse.parseNode(e,["selector"],this._index,this._fileInfo,function(t,i){if(t)throw new U({index:t.index,message:t.message},this.parse.imports,this._fileInfo.filename);e=i[0].elements}),e):[new B("","&",!1,this._index,this._fileInfo)]},N.prototype.createEmptySelectors=function(){var e=new B("","&",!1,this._index,this._fileInfo),t=[new N([e],null,null,this._index,this._fileInfo)];return t[0].mediaEmpty=!0,t},N.prototype.match=function(e){var t,i,n=this.elements,r=n.length;if(0===(t=(e=e.mixinElements()).length)||r1)||this.parensStack&&this.parensStack.length)},q.Eval.prototype.pathRequiresRewrite=function(e){return(1===this.rewriteUrls?W:G)(e)},q.Eval.prototype.rewritePath=function(e,t){var i;return t=t||"",i=this.normalizePath(t+e),W(e)&&G(t)&&!1===W(i)&&(i="./"+i),i},q.Eval.prototype.normalizePath=function(e){var t,i=e.split("/").reverse();for(e=[];0!==i.length;)switch(t=i.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 J=function(e,t,i,n){this.selectors=e,this.rules=t,this._lookups={},this._variables=null,this._properties=null,this.strictImports=i,this.copyVisibilityInfo(n),this.allowRoot=!0,this.setParent(this.selectors,this),this.setParent(this.rules,this)};(J.prototype=new s).type="Ruleset",J.prototype.isRuleset=!0,J.prototype.isRulesetLike=function(){return!0},J.prototype.accept=function(e){this.paths?this.paths=e.visitArray(this.paths,!0):this.selectors&&(this.selectors=e.visitArray(this.selectors)),this.rules&&this.rules.length&&(this.rules=e.visitArray(this.rules))},J.prototype.eval=function(e){var t,i,r,o,a,l=!1;if(this.selectors&&(i=this.selectors.length)){for(t=new Array(i),E.error({type:"Syntax",message:"it is currently only allowed in parametric mixin guards,"}),o=0;o0;e--){var t=this.rules[e-1];if(t instanceof I)return this.parseValue(t)}},J.prototype.parseValue=function(e){var t=this;function i(e){return e.value instanceof o&&!e.parsed?("string"==typeof e.value.value?this.parse.parseNode(e.value.value,["value","important"],e.value.getIndex(),e.fileInfo(),function(t,i){t&&(e.parsed=!0),i&&(e.value=i[0],e.important=i[1]||"",e.parsed=!0)}):e.parsed=!0,e):e}if(Array.isArray(e)){var n=[];return e.forEach(function(e){n.push(i.call(t,e))}),n}return i.call(t,e)},J.prototype.rulesets=function(){if(!this.rules)return[];var e,t,i=[],n=this.rules;for(e=0;t=n[e];e++)t.isRuleset&&i.push(t);return i},J.prototype.prependRule=function(e){var t=this.rules;t?t.unshift(e):this.rules=[e],this.setParent(e,this)},J.prototype.find=function(e,t,i){t=t||this;var n,r,s=[],o=e.toCSS();return o in this._lookups?this._lookups[o]:(this.rulesets().forEach(function(o){if(o!==t)for(var a=0;an){if(!i||i(o)){r=o.find(new N(e.elements.slice(n)),t,i);for(var l=0;l0&&t.add(h),e.firstSelector=!0,o[0].genCSS(e,t),e.firstSelector=!1,n=1;n0?(o=(s=n.copyArray(e)).pop(),a=r.createDerived(n.copyArray(o.elements))):a=r.createDerived([]),t.length>0){var l=i.combinator,u=t[0].elements[0];l.emptyOrWhitespace&&!u.combinator.emptyOrWhitespace&&(l=u.combinator),a.elements.push(new B(l,u.value,i.isVariable,i._index,i._fileInfo)),a.elements=a.elements.concat(t[0].elements.slice(1))}if(0!==a.elements.length&&s.push(a),t.length>1){var h=t.slice(1);h=h.map(function(e){return e.createDerived(e.elements,[])}),s=s.concat(h)}return s}function l(e,t,i,n,r){var s;for(s=0;s0?n[n.length-1]=n[n.length-1].createDerived(n[n.length-1].elements.concat(e)):n.push(new N(e));else t.push([new N(e)])}function h(e,t){var i=t.createDerived(t.elements,t.extendList,t.evaldCondition);return i.copyVisibilityInfo(e),i}var c,f;if(!function e(t,i,n){var h,c,f,p,v,d,m,g,y,b,w,x,S=!1;for(p=[],v=[[]],h=0;g=n.elements[h];h++)if("&"!==g.value){var I=(x=void 0,(w=g).value instanceof a&&(x=w.value.value)instanceof N?x:null);if(null!=I){u(p,v);var C,k=[],_=[];for(C=e(k,i,I),S=S||C,f=0;f0&&m[0].elements.push(new B(g.combinator,"",g.isVariable,g._index,g._fileInfo)),d.push(m);else for(f=0;f0&&(t.push(v[h]),b=v[h][y-1],v[h][y-1]=b.createDerived(b.elements,n.extendList));return S}(f=[],t,i))if(t.length>0)for(f=[],c=0;c{var n,u;r+=1,e instanceof I?(n="string"==typeof e.name?e.name:e.name[0].value,u=e.value):(n=new m(r),u=e),i=t.rules.slice(0),o&&i.push(new I(o,u,!1,!1,this.index,this.currentFileInfo)),l&&i.push(new I(l,new m(r),!1,!1,this.index,this.currentFileInfo)),a&&i.push(new I(a,n,!1,!1,this.index,this.currentFileInfo)),s.push(new J([new N([new B("","&")])],i,t.strictImports,t.visibilityInfo()))}),new J([new N([new B("","&")])],s,t.strictImports,t.visibilityInfo()).eval(this.context)}});var K=function(){};K._math=function(e,t,i){if(!(i instanceof m))throw{type:"Argument",message:"argument must be a number"};return null==t?t=i.unit:i=i.unify(),new m(e(parseFloat(i.value)),t)};var Z={ceil:null,floor:null,sqrt:null,abs:null,tan:"",sin:"",cos:"",atan:"rad",asin:"rad",acos:"rad"};for(var X in Z)Z.hasOwnProperty(X)&&(Z[X]=K._math.bind(null,Math[X],Z[X]));Z.round=function(e,t){var i=void 0===t?0:t.value;return K._math(function(e){return e.toFixed(i)},null,e)},A.addMultiple(Z);var Y=function(e,t){switch((t=Array.prototype.slice.call(t)).length){case 0:throw{type:"Argument",message:"one or more arguments required"}}var i,n,r,s,a,l,u,h,c=[],f={};for(i=0;ia.value)&&(c[n]=r);else{if(void 0!==u&&l!==u)throw{type:"Argument",message:"incompatible types"};f[l]=c.length,c.push(r)}else Array.isArray(t[i].value)&&Array.prototype.push.apply(t,Array.prototype.slice.call(t[i].value));return 1==c.length?c[0]:(t=c.map(function(e){return e.toCSS(this.context)}).join(this.context.compress?",":", "),new o((e?"min":"max")+"("+t+")"))};A.addMultiple({min:function(){return Y(!0,arguments)},max:function(){return Y(!1,arguments)},convert:function(e,t){return e.convertTo(t.value)},pi:function(){return new m(Math.PI)},mod:function(e,t){return new m(e.value%t.value,e.unit)},pow:function(e,t){if("number"==typeof e&&"number"==typeof t)e=new m(e),t=new m(t);else if(!(e instanceof m&&t instanceof m))throw{type:"Argument",message:"arguments must be numbers"};return new m(Math.pow(e.value,t.value),e.unit)},percentage:function(e){return K._math(function(e){return 100*e},"%",e)}});var ee=function(){};(ee.prototype=new s).evaluateJavaScript=function(e,t){var i,n=this,r={};if(!t.javascriptEnabled)throw{message:"Inline JavaScript is not enabled. Is it set in your options?",filename:this.fileInfo().filename,index:this.getIndex()};e=e.replace(/@\{([\w-]+)\}/g,function(e,i){return n.jsify(new w("@"+i,n.getIndex(),n.fileInfo()).eval(t))});try{e=new Function("return ("+e+")")}catch(t){throw{message:"JavaScript evaluation error: "+t.message+" from `"+e+"`",filename:this.fileInfo().filename,index:this.getIndex()}}var s=t.frames[0].variables();for(var o in s)s.hasOwnProperty(o)&&(r[o.slice(1)]={value:s[o].value,toJS:function(){return this.value.eval(t).toCSS()}});try{i=e.call(r)}catch(e){throw{message:"JavaScript evaluation error: '"+e.name+": "+e.message.replace(/["]/g,"'")+"'",filename:this.fileInfo().filename,index:this.getIndex()}}return i},ee.prototype.jsify=function(e){return Array.isArray(e.value)&&e.value.length>1?"["+e.value.map(function(e){return e.toCSS()}).join(", ")+"]":e.toCSS()};var te=function(e,t,i,n){this.escaped=t,this.expression=e,this._index=i,this._fileInfo=n};(te.prototype=new ee).type="JavaScript",te.prototype.eval=function(e){var t=this.evaluateJavaScript(this.expression,e),i=typeof t;return"number"!==i||isNaN(t)?"string"===i?new k('"'+t+'"',t,this.escaped,this._index):Array.isArray(t)?new o(t.join(", ")):new o(t):new m(t)},A.addMultiple({e:function(e){return new o(e instanceof te?e.evaluated:e.value)},escape:function(e){return new o(encodeURI(e.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},replace:function(e,t,i,n){var r=e.value;return i="Quoted"===i.type?i.value:i.toCSS(),r=r.replace(new RegExp(t.value,n?n.value:""),i),new k(e.quote||"",r,e.escaped)},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),i=e.value,n=0;n1){var i=new N([],null,null,this.getIndex(),this.fileInfo()).createEmptySelectors();(t=new J(i,e.mediaBlocks)).multiMedia=!0,t.copyVisibilityInfo(this.visibilityInfo()),this.setParent(t,this)}return delete e.mediaBlocks,delete e.mediaPath,t},le.prototype.evalNested=function(e){var t,i,n=e.mediaPath.concat([this]);for(t=0;t0;t--)e.splice(t,0,new o("and"));return new g(e)})),this.setParent(this.features,this),new J([],[])},le.prototype.permute=function(e){if(0===e.length)return[];if(1===e.length)return e[0];for(var t=[],i=this.permute(e.slice(1)),n=0;nthis.params.length)return!1}i=Math.min(s,this.arity);for(var o=0;o0){for(h=!0,a=0;a0)f=C;else if(f=I,p[I]+p[C]>1)throw{type:"Runtime",message:"Ambiguous use of `default()` found when matching for `"+this.format(m)+"`",index:this.getIndex(),filename:this.fileInfo().filename};for(a=0;a="===e||"=<"===e||"<="===e;case 1:return">"===e||">="===e;default:return!1}}}(this.op,this.lvalue.eval(e),this.rvalue.eval(e));return this.negate?!t:t};var ve=function(e){this.value=e};(ve.prototype=new s).type="UnicodeDescriptor";var de=function(e){this.value=e};(de.prototype=new s).type="Negative",de.prototype.genCSS=function(e,t){t.add("-"),this.value.genCSS(e,t)},de.prototype.eval=function(e){return e.isMathOn()?new ne("*",[new m(-1),this.value]).eval(e):new de(this.value.eval(e))};var me=function e(t,i,n,r,s){switch(this.selector=t,this.option=i,this.object_id=e.next_id++,this.parent_ids=[this.object_id],this._index=n,this._fileInfo=r,this.copyVisibilityInfo(s),this.allowRoot=!0,i){case"all":this.allowBefore=!0,this.allowAfter=!0;break;default:this.allowBefore=!1,this.allowAfter=!1}this.setParent(this.selector,this)};me.next_id=0,(me.prototype=new s).type="Extend",me.prototype.accept=function(e){this.selector=e.visit(this.selector)},me.prototype.eval=function(e){return new me(this.selector.eval(e),this.option,this.getIndex(),this.fileInfo(),this.visibilityInfo())},me.prototype.clone=function(e){return new me(this.selector,this.option,this.getIndex(),this.fileInfo(),this.visibilityInfo())},me.prototype.findSelfSelectors=function(e){var t,i,n=[];for(t=0;t0&&i.length&&""===i[0].combinator.value&&(i[0].combinator.value=" "),n=n.concat(e[t].elements);this.selfSelectors=[new N(n)],this.selfSelectors[0].copyVisibilityInfo(this.visibilityInfo())};var ge=function(e,t,i){this.variable=e,this._index=t,this._fileInfo=i,this.allowRoot=!0};(ge.prototype=new s).type="VariableCall",ge.prototype.eval=function(e){var t,i=new w(this.variable,this.getIndex(),this.fileInfo()).eval(e),n=new U({message:"Could not evaluate variable call "+this.variable});if(!i.ruleset){if(Array.isArray(i))t=i;else{if(!Array.isArray(i.value))throw n;t=i.value}i=new ie(new J("",t))}if(i.ruleset)return i.callEval(e);throw n};var ye=function(e,t,i,n,r){this.value=e,this.lookups=t,this.important=i,this._index=n,this._fileInfo=r};(ye.prototype=new s).type="NamespaceValue",ye.prototype.eval=function(e){var t,i,n=this.value.eval(e);for(t=0;t0;){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()};var ke=function(e,t){this._visitor=new Ie(this),this._importer=e,this._finish=t,this.context=new q.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new Ce(this._onSequencerEmpty.bind(this))};ke.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 i=e.options.inline;if(!e.css||i){var r=new q.Eval(this.context,n.copyArray(this.context.frames)),s=r.frames[0];this.importCount++,e.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,e,r,s)):this.processImportNode(e,r,s)}t.visitDeeper=!1},processImportNode:function(e,t,i){var n,r=e.options.inline;try{n=e.evalForImport(t)}catch(t){t.filename||(t.index=e.getIndex(),t.filename=e.fileInfo().filename),e.css=!0,e.error=t}if(!n||n.css&&!r)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{n.options.multiple&&(t.importMultiple=!0);for(var s=void 0===n.css,o=0;o=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()),(h=new be.Extend(u.selector,u.option,0,u.fileInfo(),t)).selfSelectors=o,o[o.length-1].extendList=[h],c.push(h),h.ruleset=u.ruleset,h.parent_ids=h.parent_ids.concat(u.parent_ids,l.parent_ids),u.firstExtendOnThisSelectorPath&&(h.firstExtendOnThisSelectorPath=!0,u.ruleset.paths.push(o))})));if(c.length){if(this.extendChainCount++,i>100){var p="{unable to calculate}",v="{unable to calculate}";try{p=c[0].selfSelectors[0].toCSS(),v=c[0].selector.toCSS()}catch(e){}throw{message:"extend circular reference detected. One of the circular extends is currently:"+p+":extend("+v+")"}}return c.concat(f.doExtendChaining(c,t,i+1))}return c},visitDeclaration:function(e,t){t.visitDeeper=!1},visitMixinDefinition:function(e,t){t.visitDeeper=!1},visitSelector:function(e,t){t.visitDeeper=!1},visitRuleset:function(e,t){if(!e.root){var i,n,r,s,o=this.allExtendsStack[this.allExtendsStack.length-1],a=[],l=this;for(r=0;r0&&u[l.matched].combinator.value!==o?l=null:l.matched++,l&&(l.finished=l.matched===u.length,l.finished&&!e.allowAfter&&(r+1u&&h>0&&(c[c.length-1].elements=c[c.length-1].elements.concat(t[u].elements.slice(h)),h=0,u++),l=s.elements.slice(h,a.index).concat([o]).concat(i.elements.slice(1)),u===a.pathIndex&&r>0?c[c.length-1].elements=c[c.length-1].elements.concat(l):(c=c.concat(t.slice(u,a.pathIndex))).push(new be.Selector(l)),u=a.endPathIndex,(h=a.endPathElementIndex)>=t[u].elements.length&&(h=0,u++);return u0&&(c[c.length-1].elements=c[c.length-1].elements.concat(t[u].elements.slice(h)),u++),(c=c.concat(t.slice(u,t.length))).map(function(e){var t=e.createDerived(e.elements);return n?t.ensureVisibility():t.ensureInvisibility(),t})},visitMedia:function(e,t){var i=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);i=i.concat(this.doExtendChaining(i,e.allExtends)),this.allExtendsStack.push(i)},visitMediaOut:function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t},visitAtRule:function(e,t){var i=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);i=i.concat(this.doExtendChaining(i,e.allExtends)),this.allExtendsStack.push(i)},visitAtRuleOut:function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t}};var Ee=function(){this.contexts=[[]],this._visitor=new Ie(this)};Ee.prototype={run:function(e){return this._visitor.visit(e)},visitDeclaration:function(e,t){t.visitDeeper=!1},visitMixinDefinition:function(e,t){t.visitDeeper=!1},visitRuleset:function(e,t){var i,n=this.contexts[this.contexts.length-1],r=[];this.contexts.push(r),e.root||((i=e.selectors)&&(i=i.filter(function(e){return e.getIsOutput()}),e.selectors=i.length?i:i=null,i&&e.joinSelectors(r,n,i)),i||(e.rules=null),e.paths=r)},visitRulesetOut:function(e){this.contexts.length=this.contexts.length-1},visitMedia:function(e,t){var i=this.contexts[this.contexts.length-1];e.rules[0].root=0===i.length||i[0].multiMedia},visitAtRule:function(e,t){var i=this.contexts[this.contexts.length-1];e.rules&&e.rules.length&&(e.rules[0].root=e.isRooted||0===i.length||null)}};var Pe=function(e){this._visitor=new Ie(this),this._context=e};Pe.prototype={containsSilentNonBlockedChild:function(e){var t;if(!e)return!1;for(var i=0;i0},resolveVisibility:function(e,t){if(!e.blocksVisibility()){if(this.isEmpty(e)&&!this.containsSilentNonBlockedChild(t))return;return e}var i=e.rules[0];if(this.keepOnlyVisibleChilds(i),!this.isEmpty(i))return e.ensureVisibility(),e.removeVisibilityBlock(),e},isVisibleRuleset:function(e){return!!e.firstRoot||!this.isEmpty(e)&&!(!e.root&&!this.hasVisibleSelector(e))}};var Re=function(e){this._visitor=new Ie(this),this._context=e,this.utils=new Pe(e)};Re.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 i=e.rules[0].rules;return e.accept(this._visitor),t.visitDeeper=!1,this.utils.resolveVisibility(e,i)},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 i=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,i)},visitAtRuleWithoutBody:function(e,t){if(!e.blocksVisibility()){if("@charset"===e.name){if(this.charset){if(e.debugInfo){var i=new be.Comment("/* "+e.toCSS(this._context).replace(/\n/g,"")+" */\n");return i.debugInfo=e.debugInfo,this._visitor.visit(i)}return}this.charset=!0}return e}},checkValidNodes:function(e,t){if(e)for(var i=0;i0?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(),n.splice(0,0,e)),1===n.length?n[0]:n},_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 be.Combinator("")),t=0;t=0;n--)if((i=e[n])instanceof be.Declaration)if(r[i.name]){(t=r[i.name])instanceof be.Declaration&&(t=r[i.name]=[r[i.name].toCSS(this._context)]);var s=i.toCSS(this._context);-1!==t.indexOf(s)?e.splice(n,1):t.push(s)}else r[i.name]=i}},_mergeRules:function(e){if(e){for(var t={},i=[],n=0;n0){var t=e[0],i=[],n=[new be.Expression(i)];e.forEach(function(e){"+"===e.merge&&i.length>0&&n.push(new be.Expression(i=[])),i.push(e.value),t.important=t.important||e.important}),t.value=new be.Value(n)}})}}};var Ve={Visitor:Ie,ImportVisitor:ke,MarkVisibleSelectorsVisitor:_e,ExtendVisitor:Me,JoinSelectorVisitor:Ee,ToCSSVisitor:Re};function $e(e,t){var i,n=(t=t||{}).variables,r=new q.Eval(t);"object"!=typeof n||Array.isArray(n)||(n=Object.keys(n).map(function(e){var t=n[e];return t instanceof be.Value||(t instanceof be.Expression||(t=new be.Expression([t])),t=new be.Value([t])),new be.Declaration("@"+e,t,!1,null,0)}),r.frames=[new be.Ruleset(null,n)]);var s,o,a=[new Ve.JoinSelectorVisitor,new Ve.MarkVisibleSelectorsVisitor(!0),new Ve.ExtendVisitor,new Ve.ToCSSVisitor({compress:Boolean(t.compress)})],l=[];if(t.pluginManager){o=t.pluginManager.visitor();for(var u=0;u<2;u++)for(o.first();s=o.get();)s.isPreEvalVisitor?0!==u&&-1!==l.indexOf(s)||(l.push(s),s.run(e)):0!==u&&-1!==a.indexOf(s)||(s.isPreVisitor?a.unshift(s):a.push(s))}for(i=e.eval(r),u=0;u=0){d={index:l.i,text:x.substr(l.i,I+2-l.i),isLineComment:!1},l.i+=d.text.length-1,l.commentStore.push(d);continue}}break}if(n!==u&&n!==c&&n!==h&&n!==f)break}if(s=s.slice(i+l.i-w+y),o=l.i,!s.length){if(ti||l.i===i&&e&&!n)&&(i=l.i,n=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 i=l.i+(t||0),n=e.charCodeAt(i);return n===u||n===f||n===h||n===c},l.$re=function(e){l.i>o&&(s=s.slice(l.i-o),o=l.i);var t=e.exec(s);return t?(v(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:(v(1),t)},l.$str=function(t){for(var i=t.length,n=0;nh&&(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 i=0;i57||t<43||t===p||44===t},l.start=function(n,a,u){e=n,l.i=t=o=i=0,r=a?function(e,t){var i,n,r,s,o,a,l,u,h,c=e.length,f=0,p=0,v=[],d=0;function m(t){var i=o-d;i<512&&!t||!i||(v.push(e.slice(d,o+1)),d=o+1)}for(o=0;o=97&&l<=122||l<34))switch(l){case 40:p++,n=o;continue;case 41:if(--p<0)return t("missing opening `(`",o);continue;case 59:p||m();continue;case 123:f++,i=o;continue;case 125:if(--f<0)return t("missing opening `{`",o);f||p||m();continue;case 92:if(o96)){if(u==l){h=1;break}if(92==u){if(o==c-1)return t("unescaped `\\`",o);o++}}if(h)continue;return t("unmatched `"+String.fromCharCode(l)+"`",a);case 47:if(p||o==c-1)continue;if(47==(u=e.charCodeAt(o+1)))for(o+=2;oi&&s>r?"missing closing `}` or `*/`":"missing closing `}`",i):0!==p?t("missing closing `)`",n):(m(!0),v)}(n,u):[n],s=r[0],v(0)},l.end=function(){var t,r=l.i>=e.length;return l.i=e.length-1,furthestChar:e[l.i]}},l}();function a(e,t){throw new U({index:o.i,filename:r.filename,type:t||"Syntax",message:e},i)}function l(e,t){var i=e instanceof Function?e.call(s):o.$re(e);if(i)return i;a(t||("string"==typeof e?"expected '"+e+"' got '"+o.currentChar()+"'":"unexpected token"))}function u(e,t){if(o.$char(e))return e;a(t||"expected '"+e+"' got '"+o.currentChar()+"'")}function h(e){var t=r.filename;return{lineNumber:n.getLocation(e,o.getInput()).line+1,fileName:t}}return{parserInput:o,imports:i,fileInfo:r,parseNode:function(e,t,n,r,a){var l,u=[],h=o;try{h.start(e,!1,function(e,t){a({message:e,index:t+n})});for(var c,f,p=0;c=t[p];p++)f=h.i,(l=s[c]())?(l._index=f+n,l._fileInfo=r,u.push(l)):u.push(null);h.end().isFinished?a(null,u):a(!0,null)}catch(e){throw new U({index:e.index+n,message:e.message},i,r.filename)}},parse:function(n,s,a){var l,u,h,c,f=null,p="";if(u=a&&a.globalVars?e.serializeVars(a.globalVars)+"\n":"",h=a&&a.modifyVars?"\n"+e.serializeVars(a.modifyVars):"",t.pluginManager)for(var v=t.pluginManager.getPreProcessors(),d=0;d");return e},args:function(e){var t,i,n,r,l,u,h,c=s.entities,f={args:null,variadic:!1},p=[],v=[],d=[],m=!0;for(o.save();;){if(e)u=s.detachedRuleset()||s.expression();else{if(o.commentStore.length=0,o.$str("...")){f.variadic=!0,o.$char(";")&&!t&&(t=!0),(t?v:d).push({variadic:!0});break}u=c.variable()||c.property()||c.literal()||c.keyword()||this.call(!0)}if(!u||!m)break;r=null,u.throwAwayComments&&u.throwAwayComments(),l=u;var g=null;if(e?u.value&&1==u.value.length&&(g=u.value[0]):g=u,g&&(g instanceof be.Variable||g instanceof be.Property))if(o.$char(":")){if(p.length>0&&(t&&a("Cannot mix ; and , as delimiter types"),i=!0),!(l=s.detachedRuleset()||s.expression())){if(!e)return o.restore(),f.args=[],f;a("could not understand value for named argument")}r=n=g.name}else if(o.$str("...")){if(!e){f.variadic=!0,o.$char(";")&&!t&&(t=!0),(t?v:d).push({name:u.name,variadic:!0});break}h=!0}else e||(n=r=g.name,l=null);l&&p.push(l),d.push({name:r,value:l,expand:h}),o.$char(",")?m=!0:((m=";"===o.$char(";"))||t)&&(i&&a("Cannot mix ; and , as delimiter types"),t=!0,p.length>1&&(l=new be.Value(p)),v.push({name:n,value:l,expand:h}),n=null,p=[],i=!1)}return o.forget(),f.args=t?v:d,f},definition:function(){var e,t,i,n,r=[],a=!1;if(!("."!==o.currentChar()&&"#"!==o.currentChar()||o.peek(/^[^{]*\}/)))if(o.save(),t=o.$re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/)){e=t[1];var u=this.args(!1);if(r=u.args,a=u.variadic,!o.$char(")"))return void o.restore("Missing closing ')'");if(o.commentStore.length=0,o.$str("when")&&(n=l(s.conditions,"expected condition")),i=s.block())return o.forget(),new be.mixin.Definition(e,r,i,n,a);o.restore()}else o.forget()},ruleLookups:function(){var e,t=[];if("["===o.currentChar()){for(;;){if(o.save(),!(e=this.lookupValue())&&""!==e){o.restore();break}t.push(e),o.forget()}return t.length>0?t:void 0}},lookupValue:function(){if(o.save(),o.$char("[")){var e=o.$re(/^(?:[@$]{0,2})[_a-zA-Z0-9-]*/);if(o.$char("]"))return e||""===e?(o.forget(),e):void o.restore();o.restore()}else o.restore()}},entity:function(){var e=this.entities;return this.comment()||e.literal()||e.variable()||e.url()||e.property()||e.call()||e.keyword()||this.mixin.call(!0)||e.javascript()},end:function(){return o.$char(";")||o.peek("}")},ieAlpha:function(){var e;if(o.$re(/^opacity=/i))return(e=o.$re(/^\d+/))||(e="@{"+(e=l(s.entities.variable,"Could not parse alpha")).name.slice(1)+"}"),u(")"),new be.Quoted("","alpha(opacity="+e+")")},element:function(){var e,t,i,n=o.i;if(t=this.combinator(),(e=o.$re(/^(?:\d+\.\d+|\d+)%/)||o.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||o.$char("*")||o.$char("&")||this.attribute()||o.$re(/^\([^&()@]+\)/)||o.$re(/^[\.#:](?=@)/)||this.entities.variableCurly())||(o.save(),o.$char("(")?(i=this.selector(!1))&&o.$char(")")?(e=new be.Paren(i),o.forget()):o.restore("Missing closing ')'"):o.forget()),e)return new be.Element(t,e,e instanceof be.Variable,n,r)},combinator:function(){var e=o.currentChar();if("/"===e){o.save();var t=o.$re(/^\/[a-z]+\//i);if(t)return o.forget(),new be.Combinator(t);o.restore()}if(">"===e||"+"===e||"~"===e||"|"===e||"^"===e){for(o.i++,"^"===e&&"^"===o.currentChar()&&(e="^^",o.i++);o.isWhitespace();)o.i++;return new be.Combinator(e)}return o.isWhitespace(-1)?new be.Combinator(" "):new be.Combinator(null)},selector:function(e){var t,i,n,s,u,h,c,f=o.i;for(e=!1!==e;(e&&(i=this.extend())||e&&(h=o.$str("when"))||(s=this.element()))&&(h?c=l(this.conditions,"expected condition"):c?a("CSS guard can only be used at the end of selector"):i?u=u?u.concat(i):i:(u&&a("Extend can only be used at the end of selector"),n=o.currentChar(),t?t.push(s):t=[s],s=null),"{"!==n&&"}"!==n&&";"!==n&&","!==n&&")"!==n););if(t)return new be.Selector(t,u,c,f,r);u&&a("Extend must be used to extend a selector, it cannot be used on its own")},selectors:function(){for(var e,t;(e=this.selector())&&(t?t.push(e):t=[e],o.commentStore.length=0,e.condition&&t.length>1&&a("Guards are only currently allowed on a single selector."),o.$char(","));)e.condition&&a("Guards are only currently allowed on a single selector."),o.commentStore.length=0;return t},attribute:function(){if(o.$char("[")){var e,t,i,n=this.entities;return(e=n.variableCurly())||(e=l(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/)),(i=o.$re(/^[|~*$^]?=/))&&(t=n.quoted()||o.$re(/^[0-9]+%/)||o.$re(/^[\w-]+/)||n.variableCurly()),u("]"),new be.Attribute(e,i,t)}},block:function(){var e;if(o.$char("{")&&(e=this.primary())&&o.$char("}"))return e},blockRuleset:function(){var e=this.block();return e&&(e=new be.Ruleset(null,e)),e},detachedRuleset:function(){var e,t,i;if(o.save(),!o.$re(/^[.#]\(/)||(t=(e=this.mixin.args(!1)).args,i=e.variadic,o.$char(")"))){var n=this.blockRuleset();if(n)return o.forget(),t?new be.mixin.Definition(null,t,n,null,i):new be.DetachedRuleset(n);o.restore()}else o.restore()},ruleset:function(){var e,i,n;if(o.save(),t.dumpLineNumbers&&(n=h(o.i)),(e=this.selectors())&&(i=this.block())){o.forget();var r=new be.Ruleset(e,i,t.strictImports);return t.dumpLineNumbers&&(r.debugInfo=n),r}o.restore()},declaration:function(){var e,t,i,n,s,a,l=o.i,u=o.currentChar();if("."!==u&&"#"!==u&&"&"!==u&&":"!==u)if(o.save(),e=this.variable()||this.ruleProperty()){if((a="string"==typeof e)&&(t=this.detachedRuleset())&&(i=!0),o.commentStore.length=0,!t){if(s=!a&&e.length>1&&e.pop().value,t=e[0].value&&"--"===e[0].value.slice(0,2)?this.permissiveValue():this.anonymousValue())return o.forget(),new be.Declaration(e,t,!1,s,l,r);t||(t=this.value()),t?n=this.important():a&&(t=this.permissiveValue())}if(t&&(this.end()||i))return o.forget(),new be.Declaration(e,t,n,s,l,r);o.restore()}else o.restore()},anonymousValue:function(){var e=o.i,t=o.$re(/^([^.#@\$+\/'"*`(;{}-]*);/);if(t)return new be.Anonymous(t[1],e)},permissiveValue:function(e){var t,i,n,s,l=e||";",u=o.i,h=[];function c(){var e=o.currentChar();return"string"==typeof l?e===l:l.test(e)}if(!c()){s=[];do{(i=this.comment())?s.push(i):(i=this.entity())&&s.push(i)}while(i);if(n=c(),s.length>0){if(s=new be.Expression(s),n)return s;h.push(s)," "===o.prevChar()&&h.push(new be.Anonymous(" ",u))}if(o.save(),s=o.$parseUntil(l)){if("string"==typeof s&&a("Expected '"+s+"'","Parse"),1===s.length&&" "===s[0])return o.forget(),new be.Anonymous("",u);var f;for(t=0;t0)return new be.Expression(n)},mediaFeatures:function(){var e,t=this.entities,i=[];do{if(e=this.mediaFeature()){if(i.push(e),!o.$char(","))break}else if((e=t.variable()||t.mixinLookup())&&(i.push(e),!o.$char(",")))break}while(e);return i.length>0?i:null},media:function(){var e,i,n,s,l=o.i;if(t.dumpLineNumbers&&(s=h(l)),o.save(),o.$str("@media"))return e=this.mediaFeatures(),(i=this.block())||a("media definitions require block statements after any features"),o.forget(),n=new be.Media(i,e,l,r),t.dumpLineNumbers&&(n.debugInfo=s),n;o.restore()},plugin:function(){var e,t,i,n=o.i;if(o.$re(/^@plugin?\s+/)){if(i=(t=this.pluginArgs())?{pluginArgs:t,isPlugin:!0}:{isPlugin:!0},e=this.entities.quoted()||this.entities.url())return o.$char(";")||(o.i=n,a("missing semi-colon on @plugin")),new be.Import(e,null,i,n,r);o.i=n,a("malformed @plugin statement")}},pluginArgs:function(){if(o.save(),!o.$char("("))return o.restore(),null;var e=o.$re(/^\s*([^\);]+)\)\s*/);return e[1]?(o.forget(),e[1].trim()):(o.restore(),null)},atrule:function(){var e,i,n,s,l,u,c,f=o.i,p=!0,v=!0;if("@"===o.currentChar()){if(i=this.import()||this.plugin()||this.media())return i;if(o.save(),e=o.$re(/^@[a-z-]+/)){switch(s=e,"-"==e.charAt(1)&&e.indexOf("-",2)>0&&(s="@"+e.slice(e.indexOf("-",2)+1)),s){case"@charset":l=!0,p=!1;break;case"@namespace":u=!0,p=!1;break;case"@keyframes":case"@counter-style":l=!0;break;case"@document":case"@supports":c=!0,v=!1;break;default:c=!0}if(o.commentStore.length=0,l?(i=this.entity())||a("expected "+e+" identifier"):u?(i=this.expression())||a("expected "+e+" expression"):c&&(i=this.permissiveValue(/^[{;]/),p="{"===o.currentChar(),i?i.value||(i=null):p||";"===o.currentChar()||a(e+" rule is missing block or ending semi-colon")),p&&(n=this.blockRuleset()),n||!p&&i&&o.$char(";"))return o.forget(),new be.AtRule(e,i,n,f,r,t.dumpLineNumbers?h(f):null,v);o.restore("at-rule options not recognised")}}},value:function(){var e,t=[],i=o.i;do{if((e=this.expression())&&(t.push(e),!o.$char(",")))break}while(e);if(t.length>0)return new be.Value(t,i)},important:function(){if("!"===o.currentChar())return o.$re(/^! *important/)},sub:function(){var e,t;if(o.save(),o.$char("("))return(e=this.addition())&&o.$char(")")?(o.forget(),(t=new be.Expression([e])).parens=!0,t):void o.restore("Expected ')'");o.restore()},multiplication:function(){var e,t,i,n,r;if(e=this.operand()){for(r=o.isWhitespace(-1);!o.peek(/^\/[*\/]/);){if(o.save(),!(i=o.$char("/")||o.$char("*")||o.$str("./"))){o.forget();break}if(!(t=this.operand())){o.restore();break}o.forget(),e.parensInOp=!0,t.parensInOp=!0,n=new be.Operation(i,[n||e,t],r),r=o.isWhitespace(-1)}return n||e}},addition:function(){var e,t,i,n,r;if(e=this.multiplication()){for(r=o.isWhitespace(-1);(i=o.$re(/^[-+]\s+/)||!r&&(o.$char("+")||o.$char("-")))&&(t=this.multiplication());)e.parensInOp=!0,t.parensInOp=!0,n=new be.Operation(i,[n||e,t],r),r=o.isWhitespace(-1);return n||e}},conditions:function(){var e,t,i,n=o.i;if(e=this.condition(!0)){for(;o.peek(/^,\s*(not\s*)?\(/)&&o.$char(",")&&(t=this.condition(!0));)i=new be.Condition("or",i||e,t,n);return i||e}},condition:function(e){var t,i,n;if(t=this.conditionAnd(e)){if(i=o.$str("or")){if(!(n=this.condition(e)))return;t=new be.Condition(i,t,n)}return t}},conditionAnd:function(e){var t,i,n,r;if(t=(r=this.negatedCondition(e)||this.parenthesisCondition(e))||e?r:this.atomicCondition(e)){if(i=o.$str("and")){if(!(n=this.conditionAnd(e)))return;t=new be.Condition(i,t,n)}return t}},negatedCondition:function(e){if(o.$str("not")){var t=this.parenthesisCondition(e);return t&&(t.negate=!t.negate),t}},parenthesisCondition:function(e){var t;if(o.save(),o.$str("(")){if(t=function(t){var i;if(o.save(),i=t.condition(e)){if(o.$char(")"))return o.forget(),i;o.restore()}else o.restore()}(this))return o.forget(),t;if(t=this.atomicCondition(e)){if(o.$char(")"))return o.forget(),t;o.restore("expected ')' got '"+o.currentChar()+"'")}else o.restore()}else o.restore()},atomicCondition:function(e){var t,i,n,r,s=this.entities,l=o.i;function u(){return this.addition()||s.keyword()||s.quoted()||s.mixinLookup()}if(t=(u=u.bind(this))())return o.$char(">")?r=o.$char("=")?">=":">":o.$char("<")?r=o.$char("=")?"<=":"<":o.$char("=")&&(r=o.$char(">")?"=>":o.$char("<")?"=<":"="),r?(i=u())?n=new be.Condition(r,t,i,l,!1):a("expected expression"):n=new be.Condition("=",t,new be.Keyword("true"),l,!1),n},operand:function(){var e,t=this.entities;o.peek(/^-[@\$\(]/)&&(e=o.$char("-"));var i=this.sub()||t.dimension()||t.color()||t.variable()||t.property()||t.call()||t.quoted(!0)||t.colorKeyword()||t.mixinLookup();return e&&(i.parensInOp=!0,i=new be.Negative(i)),i},expression:function(){var e,t,i=[],n=o.i;do{(e=this.comment())?i.push(e):(e=this.addition()||this.entity())&&(i.push(e),o.peek(/^\/[\/*]/)||(t=o.$char("/"))&&i.push(new be.Anonymous(t,n)))}while(e);if(i.length>0)return new be.Expression(i)},property:function(){var e=o.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);if(e)return e[1]},ruleProperty:function(){var e,t,i=[],n=[];o.save();var s=o.$re(/^([_a-zA-Z0-9-]+)\s*:/);if(s)return i=[new be.Keyword(s[1])],o.forget(),i;function a(e){var t=o.i,r=o.$re(e);if(r)return n.push(t),i.push(r[1])}for(a(/^(\*?)/);a(/^((?:[\w-]+)|(?:[@\$]\{[\w-]+\}))/););if(i.length>1&&a(/^((?:\+_|\+)?)\s*:/)){for(o.forget(),""===i[0]&&(i.shift(),n.shift()),t=0;t=t);i++);this.preProcessors.splice(i,0,{preProcessor:e,priority:t})},Be.prototype.addPostProcessor=function(e,t){var i;for(i=0;i=t);i++);this.postProcessors.splice(i,0,{postProcessor:e,priority:t})},Be.prototype.addFileManager=function(e){this.fileManagers.push(e)},Be.prototype.getPreProcessors=function(){for(var e=[],t=0;t=0;a--){var l=o[a];if(l[s?"supportsSync":"supports"](e,t,i,n))return l}return null},je.prototype.addFileManager=function(e){this.fileManagers.push(e)},je.prototype.clearFileManagers=function(){this.fileManagers=[]};var Ne=function(){};Ne.prototype.getPath=function(e){var t=e.lastIndexOf("?");return t>0&&(e=e.slice(0,t)),(t=e.lastIndexOf("/"))<0&&(t=e.lastIndexOf("\\")),t<0?"":e.slice(0,t+1)},Ne.prototype.tryAppendExtension=function(e,t){return/(\.[a-z]*$)|([\?;].*)$/.test(e)?e:e+t},Ne.prototype.tryAppendLessExtension=function(e){return this.tryAppendExtension(e,".less")},Ne.prototype.supportsSync=function(){return!1},Ne.prototype.alwaysMakePathsAbsolute=function(){return!1},Ne.prototype.isPathAbsolute=function(e){return/^(?:[a-z-]+:|\/|\\|#)/i.test(e)},Ne.prototype.join=function(e,t){return e?e+t:t},Ne.prototype.pathDiff=function(e,t){var i,n,r,s,o=this.extractUrlParts(e),a=this.extractUrlParts(t),l="";if(o.hostPart!==a.hostPart)return"";for(n=Math.max(a.directories.length,o.directories.length),i=0;iparseInt(t[i])?-1:1;return 0},qe.prototype.versionToString=function(e){for(var t="",i=0;i=32768&&!1!==this.context.ieCompat?(a.warn("Skipped data-uri embedding of "+u+" because its size ("+w.length+" characters) exceeds IE8-safe 32768 characters!"),o(this,r||n)):new i(new t('"'+w+'"',w,!1,this.index,this.currentFileInfo),this.index,this.currentFileInfo)})}(e),h=m,c=p,f=g,v=k,d=_,A.add("svg-gradient",function(e){var t,i,n,r,s,o,a,l,u="linear",p='x="0" y="0" width="1" height="1"',m={compress:!1},g=e.toCSS(m);function y(){throw{type:"Argument",message:"svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position] or direction, color list"}}switch(2==arguments.length?(arguments[1].value.length<2&&y(),t=arguments[1].value):arguments.length<3?y():t=Array.prototype.slice.call(arguments,1),g){case"to bottom":i='x1="0%" y1="0%" x2="0%" y2="100%"';break;case"to right":i='x1="0%" y1="0%" x2="100%" y2="0%"';break;case"to bottom right":i='x1="0%" y1="0%" x2="100%" y2="100%"';break;case"to top right":i='x1="0%" y1="100%" x2="100%" y2="0%"';break;case"ellipse":case"ellipse at center":u="radial",i='cx="50%" cy="50%" r="75%"',p='x="-50" y="-50" width="101" height="101"';break;default:throw{type:"Argument",message:"svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'"}}for(n='<'+u+'Gradient id="g" '+i+">",r=0;r";return n+="',n=encodeURIComponent(n),new d(new v("'"+(n="data:image/svg+xml,"+n)+"'",n,!1,this.index,this.currentFileInfo),this.index,this.currentFileInfo)}),b),contexts:q,SourceMapOutput:i=function(e){var t=function(t){this._css=[],this._rootNode=t.rootNode,this._contentsMap=t.contentsMap,this._contentsIgnoredCharsMap=t.contentsIgnoredCharsMap,t.sourceMapFilename&&(this._sourceMapFilename=t.sourceMapFilename.replace(/\\/g,"/")),this._outputFilename=t.outputFilename,this.sourceMapURL=t.sourceMapURL,t.sourceMapBasepath&&(this._sourceMapBasepath=t.sourceMapBasepath.replace(/\\/g,"/")),t.sourceMapRootpath?(this._sourceMapRootpath=t.sourceMapRootpath.replace(/\\/g,"/"),"/"!==this._sourceMapRootpath.charAt(this._sourceMapRootpath.length-1)&&(this._sourceMapRootpath+="/")):this._sourceMapRootpath="",this._outputSourceFiles=t.outputSourceFiles,this._sourceMapGeneratorConstructor=e.getSourceMapGenerator(),this._lineNumber=0,this._column=0};return t.prototype.removeBasepath=function(e){return this._sourceMapBasepath&&0===e.indexOf(this._sourceMapBasepath)&&("\\"!==(e=e.substring(this._sourceMapBasepath.length)).charAt(0)&&"/"!==e.charAt(0)||(e=e.substring(1))),e},t.prototype.normalizeFilename=function(e){return e=e.replace(/\\/g,"/"),e=this.removeBasepath(e),(this._sourceMapRootpath||"")+e},t.prototype.add=function(e,t,i,n){if(e){var r,s,o,a,l;if(t&&t.filename){var u=this._contentsMap[t.filename];this._contentsIgnoredCharsMap[t.filename]&&((i-=this._contentsIgnoredCharsMap[t.filename])<0&&(i=0),u=u.slice(this._contentsIgnoredCharsMap[t.filename])),a=(s=(u=u.substring(0,i)).split("\n"))[s.length-1]}if(o=(r=e.split("\n"))[r.length-1],t&&t.filename)if(n)for(l=0;l0){var n,r=JSON.stringify(this._sourceMapGenerator.toJSON());this.sourceMapURL?n=this.sourceMapURL:this._sourceMapFilename&&(n=this._sourceMapFilename),this.sourceMapURL=n,this.sourceMap=r}return this._css.join("")},t}(e),SourceMapBuilder:s=function(e,t){var i=function(e){this.options=e};return i.prototype.toCSS=function(t,i,n){var r=new e({contentsIgnoredCharsMap:n.contentsIgnoredChars,rootNode:t,contentsMap:n.contents,sourceMapFilename:this.options.sourceMapFilename,sourceMapURL:this.options.sourceMapURL,outputFilename:this.options.sourceMapOutputFilename,sourceMapBasepath:this.options.sourceMapBasepath,sourceMapRootpath:this.options.sourceMapRootpath,outputSourceFiles:this.options.outputSourceFiles,sourceMapGenerator:this.options.sourceMapGenerator,sourceMapFileInline:this.options.sourceMapFileInline}),s=r.toCSS(i);return this.sourceMap=r.sourceMap,this.sourceMapURL=r.sourceMapURL,this.options.sourceMapInputFilename&&(this.sourceMapInputFilename=r.normalizeFilename(this.options.sourceMapInputFilename)),void 0!==this.options.sourceMapBasepath&&void 0!==this.sourceMapURL&&(this.sourceMapURL=r.removeBasepath(this.sourceMapURL)),s+this.getCSSAppendage()},i.prototype.getCSSAppendage=function(){var e=this.sourceMapURL;if(this.options.sourceMapFileInline){if(void 0===this.sourceMap)return"";e="data:application/json;base64,"+t.encodeBase64(this.sourceMap)}return e?"/*# sourceMappingURL="+e+" */":""},i.prototype.getExternalSourceMap=function(){return this.sourceMap},i.prototype.setExternalSourceMap=function(e){this.sourceMap=e},i.prototype.isInline=function(){return this.options.sourceMapFileInline},i.prototype.getSourceMapURL=function(){return this.sourceMapURL},i.prototype.getOutputFilename=function(){return this.options.sourceMapOutputFilename},i.prototype.getInputFilename=function(){return this.sourceMapInputFilename},i}(i,e),ParseTree:o=function(e){var t=function(e,t){this.root=e,this.imports=t};return t.prototype.toCSS=function(t){var i,n,s={};try{i=$e(this.root,t)}catch(e){throw new U(e,this.imports)}try{var o=Boolean(t.compress);o&&r.warn("The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.");var a={compress:o,dumpLineNumbers:t.dumpLineNumbers,strictUnits:Boolean(t.strictUnits),numPrecision:8};t.sourceMap?(n=new e(t.sourceMap),s.css=n.toCSS(i,a,this.imports)):s.css=i.toCSS(a)}catch(e){throw new U(e,this.imports)}if(t.pluginManager)for(var l=t.pluginManager.getPostProcessors(),u=0;u