From dfd3e2471ff31c2529b7a4e14233aa7fbe27e9d2 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 30 Nov 2010 11:51:55 -0500 Subject: [PATCH] (build) 1.0.40 --- dist/less-1.0.38.min.js | 68 ------------------------ dist/{less-1.0.38.js => less-1.0.40.js} | 47 ++++++++++------- dist/less-1.0.40.min.js | 69 +++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 86 deletions(-) delete mode 100644 dist/less-1.0.38.min.js rename dist/{less-1.0.38.js => less-1.0.40.js} (98%) create mode 100644 dist/less-1.0.40.min.js diff --git a/dist/less-1.0.38.min.js b/dist/less-1.0.38.min.js deleted file mode 100644 index 88b9a7c..0000000 --- a/dist/less-1.0.38.min.js +++ /dev/null @@ -1,68 +0,0 @@ -// -// LESS - Leaner CSS v1.0.38 -// http://lesscss.org -// -// Copyright (c) 2010, Alexis Sellier -// Licensed under the Apache 2.0 License. -// -(function(y){function q(d){return y.less[d.split("/")[1]]}function U(){for(var d=document.getElementsByTagName("style"),b=0;b0)g.firstChild.nodeValue!==j.nodeValue&&g.replaceChild(j,g.firstChild);else g.appendChild(j)})(document.createTextNode(d));if(e&&D){I("saving "+a+" to cache.");D.setItem(a,d);D.setItem(a+":timestamp",e)}}function $(d,b,e,g){function a(j,n,r){if(j.status>=200&&j.status<300)n(j.responseText,j.getResponseHeader("Last-Modified"));else typeof r==="function"&&r(j.status,d)}var h=ba(),i=P?false:o.async;typeof h.overrideMimeType==="function"&&h.overrideMimeType("text/css"); -h.open("GET",d,i);h.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5");h.send(null);if(P)h.status===0?e(h.responseText):g(h.status,d);else if(i)h.onreadystatechange=function(){h.readyState==4&&a(h,e,g)};else a(h,e,g)}function ba(){if(y.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(d){I("browser doesn't support AJAX.");return null}}function aa(d){return d&&d.parentNode.removeChild(d)}function I(d){o.env=="development"&& -typeof console!=="undefined"&&console.log("less: "+d)}function Q(d,b){var e="less-error-message:"+R(b),g=document.createElement("div"),a;g.id=e;g.className="less-error-message";b="

"+(d.message||"There is an error in your .less file")+'

'+b+" ";if(d.extract)b+="on line "+d.line+", column "+(d.column+1)+":

"+''.replace(/\[(-?\d)\]/g, -function(h,i){return parseInt(d.line)+parseInt(i)||""}).replace(/\{(\d)\}/g,function(h,i){return d.extract[parseInt(i)]||""}).replace(/\{current\}/,d.extract[1].slice(0,d.column)+''+d.extract[1].slice(d.column)+"");g.innerHTML=b;N(".less-error-message ul, .less-error-message li {\nlist-style-type: none;\nmargin-right: 15px;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message label {\nfont-size: 12px;\nmargin-right: 15px;\npadding: 4px 0;\ncolor: #cc7777;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\ndisplay: inline-block;\n}\n.less-error-message pre.ctx {\ncolor: #dd4444;\n}\n.less-error-message h3 {\nfont-size: 20px;\nfont-weight: bold;\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}", -{title:"error-message"});g.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(o.env=="development")a=setInterval(function(){if(document.body){document.getElementById(e)?document.body.replaceChild(g,document.getElementById(e)):document.body.insertBefore(g,document.body.firstChild);clearInterval(a)}},10)}if(!Array.isArray)Array.isArray=function(d){return Object.prototype.toString.call(d)=== -"[object Array]"||d instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(d,b){for(var e=this.length>>>0,g=0;g>>0,g=new Array(e),a=0;a>>0,e=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var g=arguments[1];else{do{if(e in this){g=this[e++];break}if(++e>=b)throw new TypeError;}while(1)}for(;e=e)return-1;if(b<0)b+=e;for(;bE){t[n]=t[n].slice(j-E);E=j}} -function a(f){var k,l,p;if(f instanceof Function)return f.call(O.parsers);else if(typeof f==="string"){f=i.charAt(j)===f?f:null;k=1;g()}else{g();if(f=f.exec(t[n]))k=f[0].length;else return null}if(f){mem=j+=k;for(p=j+t[n].length-k;j0)throw{type:"Syntax",message:"Missing closing `}`", -filename:d.filename};return L.map(function(F){return F.join("")})}([[]]);l=new m.Ruleset([],a(this.parsers.primary));l.root=true;l.toCSS=function(L){var G,H;return function(A,B){function x(u){return u?(i.slice(0,u).match(/\n/g)||"").length:null}var z=[];A=A||{};if(typeof B==="object"&&!Array.isArray(B)){B=Object.keys(B).map(function(u){var F=B[u];if(!(F instanceof m.Value)){F instanceof m.Expression||(F=new m.Expression([F]));F=new m.Value([F])}return new m.Rule("@"+u,F,false,0)});z=[new m.Ruleset(null, -B)]}try{var C=L.call(this,{frames:z}).toCSS([],{compress:A.compress||false})}catch(s){H=i.split("\n");G=x(s.index);A=s.index;for(z=-1;A>=0&&i.charAt(A)!=="\n";A--)z++;throw{type:s.type,message:s.message,filename:d.filename,index:s.index,line:typeof G==="number"?G+1:null,callLine:s.call&&x(s.call)+1,callExtract:H[x(s.call)],stack:s.stack,column:z,extract:[H[G-1],H[G],H[G+1]]};}return A.compress?C.replace(/(\s)+/g,"$1"):C}}(l.eval);if(j=0&&i.charAt(T)!=="\n";T--)Z++;K={name:"ParseError",message:"Syntax Error on line "+f,filename:d.filename,line:f,column:Z,extract:[p[f-2],p[f-1],p[f]]}}if(this.imports.queue.length>0)Y=function(){k(K,l)};else k(K,l)},parsers:{primary:function(){for(var f,k=[];(f=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||a(this.directive))||a(/^[\s\n]+/);)f&&k.push(f);return k},comment:function(){var f;if(i.charAt(j)==="/")if(i.charAt(j+ -1)==="/")return new m.Comment(a(/^\/\/.*/),true);else if(f=a(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new m.Comment(f)},entities:{quoted:function(){var f;if(!(i.charAt(j)!=='"'&&i.charAt(j)!=="'"))if(f=a(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new m.Quoted(f[0],f[1]||f[2])},keyword:function(){var f;if(f=a(/^[A-Za-z-]+/))return new m.Keyword(f)},call:function(){var f,k;if(f=/^([\w-]+|%)\(/.exec(t[n])){f=f[1].toLowerCase();if(f==="url")return null;else j+=f.length+1;if(f==="alpha")return a(this.alpha); -k=a(this.entities.arguments);if(a(")"))if(f)return new m.Call(f,k)}},arguments:function(){for(var f=[],k;k=a(this.expression);){f.push(k);if(!a(","))break}return f},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var f;if(!(i.charAt(j)!=="u"||!a(/^url\(/))){f=a(this.entities.quoted)||a(this.entities.variable)||a(this.entities.dataURI)||a(/^[-\w%@$\/.&=:;#+?]+/)||"";if(!a(")"))throw new Error("missing closing ) for url()");return new m.URL(f.value|| -f.data||f instanceof m.Variable?f:new m.Anonymous(f),S.paths)}},dataURI:function(){var f;if(a(/^data:/)){f={};f.mime=a(/^[^\/]+\/[^,;)]+/)||"";f.charset=a(/^;\s*charset=[^,;)]+/)||"";f.base64=a(/^;\s*base64/)||"";f.data=a(/^,\s*[^)]+/);if(f.data)return f}},variable:function(){var f,k=j;if(i.charAt(j)==="@"&&(f=a(/^@[\w-]+/)))return new m.Variable(f,k)},color:function(){var f;if(i.charAt(j)==="#"&&(f=a(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new m.Color(f[1])},dimension:function(){var f;f=i.charCodeAt(j); -if(!(f>57||f<45||f===47))if(f=a(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new m.Dimension(f[1],f[2])},javascript:function(){var f;if(i.charAt(j)==="`")if(f=a(/^`([^`]*)`/))return new m.JavaScript(f[1],j)}},variable:function(){var f;if(i.charAt(j)==="@"&&(f=a(/^(@[\w-]+)\s*:/)))return f[1]},shorthand:function(){var f,k;if(h(/^[@\w.%-]+\/[@\w.-]+/))if((f=a(this.entity))&&a("/")&&(k=a(this.entity)))return new m.Shorthand(f,k)},mixin:{call:function(){var f=[],k,l,p,K= -j;k=i.charAt(j);if(!(k!=="."&&k!=="#")){for(;k=a(/^[#.][\w-]+/);){f.push(new m.Element(l,k));l=a(">")}a("(")&&(p=a(this.entities.arguments))&&a(")");if(f.length>0&&(a(";")||h("}")))return new m.mixin.Call(f,p,K)}},definition:function(){var f,k=[],l,p;if(!(i.charAt(j)!=="."&&i.charAt(j)!=="#"||h(/^[^{]*(;|})/)))if(f=a(/^([#.][\w-]+)\s*\(/)){for(f=f[1];l=a(this.entities.variable)||a(this.entities.literal)||a(this.entities.keyword);){if(l instanceof m.Variable)if(a(":"))if(p=a(this.expression))k.push({name:l.name, -value:p});else throw new Error("Expected value");else k.push({name:l.name});else k.push({value:l});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(l=a(this.block))return new m.mixin.Definition(f,k,l)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)||a(this.entities.javascript)},end:function(){return a(";")||h("}")},alpha:function(){var f;if(a(/^opacity=/i))if(f=a(/^\d+/)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()"); -return new m.Alpha(f)}},element:function(){var f;c=a(this.combinator);if(f=a(/^[.#:]?[\w-]+/)||a("*")||a(this.attribute)||a(/^\([^)@]+\)/))return new m.Element(c,f)},combinator:function(){var f=i.charAt(j);if(f===">"||f==="&"||f==="+"||f==="~"){for(j++;i.charAt(j)===" ";)j++;return new m.Combinator(f)}else if(f===":"&&i.charAt(j+1)===":"){for(j+=2;i.charAt(j)===" ";)j++;return new m.Combinator("::")}else return i.charAt(j-1)===" "?new m.Combinator(" "):new m.Combinator(null)},selector:function(){for(var f, -k=[],l;f=a(this.element);){l=i.charAt(j);k.push(f);if(l==="{"||l==="}"||l===";"||l===",")break}if(k.length>0)return new m.Selector(k)},tag:function(){return a(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||a("*")},attribute:function(){var f="",k,l,p;if(a("[")){if(k=a(/^[a-zA-Z-]+/)||a(this.entities.quoted))f=(p=a(/^[|~*$^]?=/))&&(l=a(this.entities.quoted)||a(/^[\w-]+/))?[k,p,l.toCSS?l.toCSS():l].join(""):k;if(a("]"))if(f)return"["+f+"]"}},block:function(){var f;if(a("{")&&(f=a(this.primary))&&a("}"))return f},ruleset:function(){var f= -[],k,l;b();if(k=/^([.#: \w-]+)[\s\n]*\{/.exec(t[n])){j+=k[0].length-1;f=[new m.Selector([new m.Element(null,k[1])])]}else{for(;k=a(this.selector);){f.push(k);if(!a(","))break}k&&a(this.comment)}if(f.length>0&&(l=a(this.block)))return new m.Ruleset(f,l);else{v=j;e()}},rule:function(){var f;f=i.charAt(j);var k;b();if(!(f==="."||f==="#"||f==="&"))if(name=a(this.variable)||a(this.property)){if(name.charAt(0)!="@"&&(match=/^([^@+\/'"*`(;{}-]*);/.exec(t[n]))){j+=match[0].length-1;f=new m.Anonymous(match[1])}else f= -name==="font"?a(this.font):a(this.value);k=a(this.important);if(f&&a(this.end))return new m.Rule(name,f,k,w);else{v=j;e()}}},"import":function(){var f;if(a(/^@import\s+/)&&(f=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new m.Import(f,S)},directive:function(){var f,k,l;if(i.charAt(j)==="@")if(k=a(this["import"]))return k;else if(f=a(/^@media|@page/)){l=a(/^[^{]+/).trim();if(k=a(this.block))return new m.Directive(f+" "+l,k)}else if(f=a(/^@[-a-z]+/))if(f==="@font-face"){if(k=a(this.block))return new m.Directive(f, -k)}else if((k=a(this.entity))&&a(";"))return new m.Directive(f,k)},font:function(){for(var f=[],k=[],l;l=a(this.shorthand)||a(this.entity);)k.push(l);f.push(new m.Expression(k));if(a(","))for(;l=a(this.expression);){f.push(l);if(!a(","))break}return new m.Value(f)},value:function(){for(var f,k=[];f=a(this.expression);){k.push(f);if(!a(","))break}if(k.length>0)return new m.Value(k)},important:function(){if(i.charAt(j)==="!")return a(/^! *important/)},sub:function(){var f;if(a("(")&&(f=a(this.expression))&& -a(")"))return f},multiplication:function(){var f,k,l,p;if(f=a(this.operand)){for(;(l=a("/")||a("*"))&&(k=a(this.operand));)p=new m.Operation(l,[p||f,k]);return p||f}},addition:function(){var f,k,l,p;if(f=a(this.multiplication)){for(;(l=a(/^[-+]\s+/)||i.charAt(j-1)!=" "&&(a("+")||a("-")))&&(k=a(this.multiplication));)p=new m.Operation(l,[p||f,k]);return p||f}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)||a(this.entities.call)}, -expression:function(){for(var f,k=[];f=a(this.addition)||a(this.entity);)k.push(f);if(k.length>0)return new m.Expression(k)},property:function(){var f;if(f=a(/^(\*?-?[-a-z_0-9]+)\s*:/))return f[1]}}}};if(typeof y!=="undefined")o.Parser.importer=function(d,b,e,g){if(d.charAt(0)!=="/"&&b.length>0)d=b[0]+d;X({href:d,title:d,type:g.mime},e,true)};(function(d){function b(a){return d.functions.hsla(a.h,a.s,a.l,a.a)}function e(a){if(a instanceof d.Dimension)return parseFloat(a.unit=="%"?a.value/100:a.value); -else if(typeof a==="number")return a;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function g(a){return Math.min(1,Math.max(0,a))}d.functions={rgb:function(a,h,i){return this.rgba(a,h,i,1)},rgba:function(a,h,i,j){a=[a,h,i].map(function(n){return e(n)});j=e(j);return new d.Color(a,j)},hsl:function(a,h,i){return this.hsla(a,h,i,1)},hsla:function(a,h,i,j){function n(v){v=v<0?v+1:v>1?v-1:v;return v*6<1?w+(r-w)*v*6:v*2<1?r:v*3<2?w+(r-w)*(2/3-v)*6:w}a=e(a)%360/360; -h=e(h);i=e(i);j=e(j);var r=i<=0.5?i*(h+1):i+h-i*h,w=i*2-r;return this.rgba(n(a+1/3)*255,n(a)*255,n(a-1/3)*255,j)},hue:function(a){return new d.Dimension(Math.round(a.toHSL().h))},saturation:function(a){return new d.Dimension(Math.round(a.toHSL().s*100),"%")},lightness:function(a){return new d.Dimension(Math.round(a.toHSL().l*100),"%")},alpha:function(a){return new d.Dimension(a.toHSL().a)},saturate:function(a,h){a=a.toHSL();a.s+=h.value/100;a.s=g(a.s);return b(a)},desaturate:function(a,h){a=a.toHSL(); -a.s-=h.value/100;a.s=g(a.s);return b(a)},lighten:function(a,h){a=a.toHSL();a.l+=h.value/100;a.l=g(a.l);return b(a)},darken:function(a,h){a=a.toHSL();a.l-=h.value/100;a.l=g(a.l);return b(a)},fadein:function(a,h){a=a.toHSL();a.a+=h.value/100;a.a=g(a.a);return b(a)},fadeout:function(a,h){a=a.toHSL();a.a-=h.value/100;a.a=g(a.a);return b(a)},spin:function(a,h){a=a.toHSL();h=(a.h+h.value)%360;a.h=h<0?360+h:h;return b(a)},greyscale:function(a){return this.desaturate(a,new d.Dimension(100))},e:function(a){return new d.Anonymous(a instanceof -d.JavaScript?a.evaluated:a)},"%":function(a){for(var h=Array.prototype.slice.call(arguments,1),i=a.value,j=0;j255?255:b<0?0:b).toString(16);return b.length===1?"0"+b:b}).join("")},operate:function(b, -e){var g=[];e instanceof d.Color||(e=e.toColor());for(var a=0;a<3;a++)g[a]=d.operate(b,this.rgb[a],e.rgb[a]);return new d.Color(g)},toHSL:function(){var b=this.rgb[0]/255,e=this.rgb[1]/255,g=this.rgb[2]/255,a=this.alpha,h=Math.max(b,e,g),i=Math.min(b,e,g),j,n=(h+i)/2,r=h-i;if(h===i)j=i=0;else{i=n>0.5?r/(2-h-i):r/(h+i);switch(h){case b:j=(e-g)/r+(e":b.compress?">":" > "}[this.value]}})(q("less/tree"));(function(d){d.Expression=function(b){this.value=b};d.Expression.prototype={eval:function(b){return this.value.length>1?new d.Expression(this.value.map(function(e){return e.eval(b)})):this.value[0].eval(b)},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(" ")}}})(q("less/tree"));(function(d){d.Import=function(b,e){var g=this;this._path= -b;this.path=b instanceof d.Quoted?/\.(le?|c)ss$/.test(b.value)?b.value:b.value+".less":b.value.value||b.value;(this.css=/css$/.test(this.path))||e.push(this.path,function(a){if(!a)throw new Error("Error parsing "+g.path);g.root=a})};d.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var e;if(this.css)return this;else{e=new d.Ruleset(null,this.root.rules.slice(0));for(var g=0;g0){for(h=0;h1?Array.prototype.push.apply(g,h.find(new d.Selector(b.elements.slice(1)),e)):g.push(h);break}});return this._lookups[a]=g},toCSS:function(b,e){var g=[],a=[],h=[],i=[];if(!this.root)if(b.length===0)i=this.selectors.map(function(r){return[r]});else for(var j=0;j0){i=i.map(function(r){return r.map(function(w){return w.toCSS(e)}).join("").trim()}).join(e.compress? -",":i.length>3?",\n":", ");g.push(i,(e.compress?"{":" {\n ")+a.join(e.compress?"":"\n ")+(e.compress?"}":"\n}\n"))}g.push(h);return g.join("")+(e.compress?"\n":"")}}})(q("less/tree"));(function(d){d.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};d.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};d.Selector.prototype.toCSS=function(b){if(this._css)return this._css;return this._css= -this.elements.map(function(e){return typeof e==="string"?" "+e.trim():e.toCSS(b)}).join("")}})(q("less/tree"));(function(d){d.URL=function(b,e){if(b.data)this.attrs=b;else{if(!/^(?:https?:\/|file:\/)?\//.test(b.value)&&e.length>0&&typeof y!=="undefined")b.value=e[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value);this.value=b;this.paths=e}};d.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+ -")"},eval:function(b){return this.attrs?this:new d.URL(this.value.eval(b),this.paths)}}})(q("less/tree"));(function(d){d.Value=function(b){this.value=b;this.is="value"};d.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new d.Value(this.value.map(function(e){return e.eval(b)}))},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(b.compress?",":", ")}}})(q("less/tree"));(function(d){d.Variable=function(b,e){this.name=b;this.index=e};d.Variable.prototype= -{eval:function(b){var e,g,a=this.name;if(e=d.find(b.frames,function(h){if(g=h.variable(a))return g.value.eval(b)}))return e;else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find=function(d,b){for(var e=0,g;e0||P?"development":"production");o.async=false;o.poll=o.poll||(P?1E3:1500);o.watch=function(){return this.watchMode=true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization=0;/!watch/.test(location.hash)&&o.watch();o.watchTimer=setInterval(function(){o.watchMode&&W(function(d,b,e){d&&N(d.toCSS(),b,e.lastModified)})},o.poll)}else o.optimization=3;var D;try{D=typeof y.localStorage==="undefined"?null:y.localStorage}catch(ca){D= -null}var M=document.getElementsByTagName("link"),V=/^text\/(x-)?less$/;o.sheets=[];for(var J=0;J'); } @@ -832,7 +823,7 @@ less.Parser = function Parser(env) { if ((input.charAt(i) !== '.' && input.charAt(i) !== '#') || peek(/^[^{]*(;|})/)) return; - if (match = $(/^([#.][\w-]+)\s*\(/)) { + if (match = $(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)) { name = match[1]; while (param = $(this.entities.variable) || $(this.entities.literal) @@ -913,7 +904,7 @@ less.Parser = function Parser(env) { var e, t; c = $(this.combinator); - e = $(/^[.#:]?[\w-]+/) || $('*') || $(this.attribute) || $(/^\([^)@]+\)/); + e = $(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/) || $('*') || $(this.attribute) || $(/^\([^)@]+\)/); if (e) { return new(tree.Element)(c, e) } }, @@ -1023,7 +1014,7 @@ less.Parser = function Parser(env) { } }, rule: function () { - var value, c = input.charAt(i), important; + var name, value, c = input.charAt(i), important; save(); if (c === '.' || c === '#' || c === '&') { return } @@ -1080,7 +1071,7 @@ less.Parser = function Parser(env) { if (value = $(this['import'])) { return value; } else if (name = $(/^@media|@page/)) { - types = $(/^[^{]+/).trim(); + types = ($(/^[^{]+/) || '').trim(); if (rules = $(this.block)) { return new(tree.Directive)(name + " " + types, rules); } @@ -1312,6 +1303,26 @@ tree.functions = { return hsla(hsl); }, + // + // Copyright (c) 2006-2009 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein + // http://sass-lang.com + // + mix: function (color1, color2, weight) { + var p = weight.value / 100.0; + var w = p * 2 - 1; + var a = color1.toHSL().a - color2.toHSL().a; + + var w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; + var w2 = 1 - w1; + + var rgb = [color1.rgb[0] * w1 + color2.rgb[0] * w2, + color1.rgb[1] * w1 + color2.rgb[1] * w2, + color1.rgb[2] * w1 + color2.rgb[2] * w2]; + + var alpha = color1.alpha * p + color2.alpha * (1 - p); + + return new(tree.Color)(rgb, alpha); + }, greyscale: function (color) { return this.desaturate(color, new(tree.Dimension)(100)); }, @@ -2350,7 +2361,7 @@ function loadStyleSheets(callback, reload) { } function loadStyleSheet(sheet, callback, reload, remaining) { - var url = window.location.href; + var url = window.location.href.replace(/[#?].*$/, ''); var href = sheet.href.replace(/\?.*$/, ''); var css = cache && cache.getItem(href); var timestamp = cache && cache.getItem(href + ':timestamp'); @@ -2362,7 +2373,7 @@ function loadStyleSheet(sheet, callback, reload, remaining) { } xhr(sheet.href, sheet.type, function (data, lastModified) { - if (!reload && styles && + if (!reload && styles && lastModified && (new(Date)(lastModified).valueOf() === new(Date)(styles.timestamp).valueOf())) { // Use local copy diff --git a/dist/less-1.0.40.min.js b/dist/less-1.0.40.min.js new file mode 100644 index 0000000..e812bfc --- /dev/null +++ b/dist/less-1.0.40.min.js @@ -0,0 +1,69 @@ +// +// LESS - Leaner CSS v1.0.40 +// http://lesscss.org +// +// Copyright (c) 2010, Alexis Sellier +// Licensed under the Apache 2.0 License. +// +(function(y){function q(d){return y.less[d.split("/")[1]]}function U(){for(var d=document.getElementsByTagName("style"),b=0;b0)g.firstChild.nodeValue!==i.nodeValue&&g.replaceChild(i,g.firstChild);else g.appendChild(i)})(document.createTextNode(d));if(e&&D){I("saving "+a+" to cache.");D.setItem(a,d);D.setItem(a+":timestamp",e)}}function $(d,b,e,g){function a(i,n,r){if(i.status>=200&&i.status<300)n(i.responseText,i.getResponseHeader("Last-Modified"));else typeof r==="function"&&r(i.status,d)}var h=ba(),j=P?false:o.async; +typeof h.overrideMimeType==="function"&&h.overrideMimeType("text/css");h.open("GET",d,j);h.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5");h.send(null);if(P)h.status===0?e(h.responseText):g(h.status,d);else if(j)h.onreadystatechange=function(){h.readyState==4&&a(h,e,g)};else a(h,e,g)}function ba(){if(y.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(d){I("browser doesn't support AJAX.");return null}}function aa(d){return d&& +d.parentNode.removeChild(d)}function I(d){o.env=="development"&&typeof console!=="undefined"&&console.log("less: "+d)}function Q(d,b){var e="less-error-message:"+R(b),g=document.createElement("div"),a;g.id=e;g.className="less-error-message";b="

"+(d.message||"There is an error in your .less file")+'

'+b+" ";if(d.extract)b+="on line "+d.line+", column "+(d.column+1)+":

"+'
    \n
  • {0}
  • \n
  • {current}
  • \n
  • {2}
  • \n
'.replace(/\[(-?\d)\]/g, +function(h,j){return parseInt(d.line)+parseInt(j)||""}).replace(/\{(\d)\}/g,function(h,j){return d.extract[parseInt(j)]||""}).replace(/\{current\}/,d.extract[1].slice(0,d.column)+''+d.extract[1].slice(d.column)+"");g.innerHTML=b;N(".less-error-message ul, .less-error-message li {\nlist-style-type: none;\nmargin-right: 15px;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message label {\nfont-size: 12px;\nmargin-right: 15px;\npadding: 4px 0;\ncolor: #cc7777;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\ndisplay: inline-block;\n}\n.less-error-message pre.ctx {\ncolor: #dd4444;\n}\n.less-error-message h3 {\nfont-size: 20px;\nfont-weight: bold;\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}", +{title:"error-message"});g.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(o.env=="development")a=setInterval(function(){if(document.body){document.getElementById(e)?document.body.replaceChild(g,document.getElementById(e)):document.body.insertBefore(g,document.body.firstChild);clearInterval(a)}},10)}if(!Array.isArray)Array.isArray=function(d){return Object.prototype.toString.call(d)=== +"[object Array]"||d instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(d,b){for(var e=this.length>>>0,g=0;g>>0,g=new Array(e),a=0;a>>0,e=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var g=arguments[1];else{do{if(e in this){g=this[e++];break}if(++e>=b)throw new TypeError;}while(1)}for(;e=e)return-1;if(b<0)b+=e;for(;bE){t[n]=t[n].slice(i-E);E=i}} +function a(f){var k,l,p;if(f instanceof Function)return f.call(O.parsers);else if(typeof f==="string"){f=j.charAt(i)===f?f:null;k=1;g()}else{g();if(f=f.exec(t[n]))k=f[0].length;else return null}if(f){mem=i+=k;for(p=i+t[n].length-k;i0)throw{type:"Syntax",message:"Missing closing `}`", +filename:d.filename};return L.map(function(F){return F.join("")})}([[]]);l=new m.Ruleset([],a(this.parsers.primary));l.root=true;l.toCSS=function(L){var G,H;return function(A,B){function x(u){return u?(j.slice(0,u).match(/\n/g)||"").length:null}var z=[];A=A||{};if(typeof B==="object"&&!Array.isArray(B)){B=Object.keys(B).map(function(u){var F=B[u];if(!(F instanceof m.Value)){F instanceof m.Expression||(F=new m.Expression([F]));F=new m.Value([F])}return new m.Rule("@"+u,F,false,0)});z=[new m.Ruleset(null, +B)]}try{var C=L.call(this,{frames:z}).toCSS([],{compress:A.compress||false})}catch(s){H=j.split("\n");G=x(s.index);A=s.index;for(z=-1;A>=0&&j.charAt(A)!=="\n";A--)z++;throw{type:s.type,message:s.message,filename:d.filename,index:s.index,line:typeof G==="number"?G+1:null,callLine:s.call&&x(s.call)+1,callExtract:H[x(s.call)],stack:s.stack,column:z,extract:[H[G-1],H[G],H[G+1]]};}return A.compress?C.replace(/(\s)+/g,"$1"):C}}(l.eval);if(i=0&&j.charAt(T)!=="\n";T--)Z++;K={name:"ParseError",message:"Syntax Error on line "+f,filename:d.filename,line:f,column:Z,extract:[p[f-2],p[f-1],p[f]]}}if(this.imports.queue.length>0)Y=function(){k(K,l)};else k(K,l)},parsers:{primary:function(){for(var f,k=[];(f=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||a(this.directive))||a(/^[\s\n]+/);)f&&k.push(f);return k},comment:function(){var f;if(j.charAt(i)==="/")if(j.charAt(i+ +1)==="/")return new m.Comment(a(/^\/\/.*/),true);else if(f=a(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new m.Comment(f)},entities:{quoted:function(){var f;if(!(j.charAt(i)!=='"'&&j.charAt(i)!=="'"))if(f=a(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new m.Quoted(f[0],f[1]||f[2])},keyword:function(){var f;if(f=a(/^[A-Za-z-]+/))return new m.Keyword(f)},call:function(){var f,k;if(f=/^([\w-]+|%)\(/.exec(t[n])){f=f[1].toLowerCase();if(f==="url")return null;else i+=f.length+1;if(f==="alpha")return a(this.alpha); +k=a(this.entities.arguments);if(a(")"))if(f)return new m.Call(f,k)}},arguments:function(){for(var f=[],k;k=a(this.expression);){f.push(k);if(!a(","))break}return f},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var f;if(!(j.charAt(i)!=="u"||!a(/^url\(/))){f=a(this.entities.quoted)||a(this.entities.variable)||a(this.entities.dataURI)||a(/^[-\w%@$\/.&=:;#+?]+/)||"";if(!a(")"))throw new Error("missing closing ) for url()");return new m.URL(f.value|| +f.data||f instanceof m.Variable?f:new m.Anonymous(f),S.paths)}},dataURI:function(){var f;if(a(/^data:/)){f={};f.mime=a(/^[^\/]+\/[^,;)]+/)||"";f.charset=a(/^;\s*charset=[^,;)]+/)||"";f.base64=a(/^;\s*base64/)||"";f.data=a(/^,\s*[^)]+/);if(f.data)return f}},variable:function(){var f,k=i;if(j.charAt(i)==="@"&&(f=a(/^@[\w-]+/)))return new m.Variable(f,k)},color:function(){var f;if(j.charAt(i)==="#"&&(f=a(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new m.Color(f[1])},dimension:function(){var f;f=j.charCodeAt(i); +if(!(f>57||f<45||f===47))if(f=a(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new m.Dimension(f[1],f[2])},javascript:function(){var f;if(j.charAt(i)==="`")if(f=a(/^`([^`]*)`/))return new m.JavaScript(f[1],i)}},variable:function(){var f;if(j.charAt(i)==="@"&&(f=a(/^(@[\w-]+)\s*:/)))return f[1]},shorthand:function(){var f,k;if(h(/^[@\w.%-]+\/[@\w.-]+/))if((f=a(this.entity))&&a("/")&&(k=a(this.entity)))return new m.Shorthand(f,k)},mixin:{call:function(){var f=[],k,l,p,K= +i;k=j.charAt(i);if(!(k!=="."&&k!=="#")){for(;k=a(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/);){f.push(new m.Element(l,k));l=a(">")}a("(")&&(p=a(this.entities.arguments))&&a(")");if(f.length>0&&(a(";")||h("}")))return new m.mixin.Call(f,p,K)}},definition:function(){var f,k=[],l,p;if(!(j.charAt(i)!=="."&&j.charAt(i)!=="#"||h(/^[^{]*(;|})/)))if(f=a(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){for(f=f[1];l=a(this.entities.variable)||a(this.entities.literal)||a(this.entities.keyword);){if(l instanceof +m.Variable)if(a(":"))if(p=a(this.expression))k.push({name:l.name,value:p});else throw new Error("Expected value");else k.push({name:l.name});else k.push({value:l});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(l=a(this.block))return new m.mixin.Definition(f,k,l)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)||a(this.entities.javascript)},end:function(){return a(";")||h("}")},alpha:function(){var f; +if(a(/^opacity=/i))if(f=a(/^\d+/)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new m.Alpha(f)}},element:function(){var f;c=a(this.combinator);if(f=a(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||a("*")||a(this.attribute)||a(/^\([^)@]+\)/))return new m.Element(c,f)},combinator:function(){var f=j.charAt(i);if(f===">"||f==="&"||f==="+"||f==="~"){for(i++;j.charAt(i)===" ";)i++;return new m.Combinator(f)}else if(f===":"&&j.charAt(i+ +1)===":"){for(i+=2;j.charAt(i)===" ";)i++;return new m.Combinator("::")}else return j.charAt(i-1)===" "?new m.Combinator(" "):new m.Combinator(null)},selector:function(){for(var f,k=[],l;f=a(this.element);){l=j.charAt(i);k.push(f);if(l==="{"||l==="}"||l===";"||l===",")break}if(k.length>0)return new m.Selector(k)},tag:function(){return a(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||a("*")},attribute:function(){var f="",k,l,p;if(a("[")){if(k=a(/^[a-zA-Z-]+/)||a(this.entities.quoted))f=(p=a(/^[|~*$^]?=/))&&(l=a(this.entities.quoted)|| +a(/^[\w-]+/))?[k,p,l.toCSS?l.toCSS():l].join(""):k;if(a("]"))if(f)return"["+f+"]"}},block:function(){var f;if(a("{")&&(f=a(this.primary))&&a("}"))return f},ruleset:function(){var f=[],k,l;b();if(k=/^([.#: \w-]+)[\s\n]*\{/.exec(t[n])){i+=k[0].length-1;f=[new m.Selector([new m.Element(null,k[1])])]}else{for(;k=a(this.selector);){f.push(k);if(!a(","))break}k&&a(this.comment)}if(f.length>0&&(l=a(this.block)))return new m.Ruleset(f,l);else{v=i;e()}},rule:function(){var f,k;f=j.charAt(i);var l;b();if(!(f=== +"."||f==="#"||f==="&"))if(f=a(this.variable)||a(this.property)){if(f.charAt(0)!="@"&&(match=/^([^@+\/'"*`(;{}-]*);/.exec(t[n]))){i+=match[0].length-1;k=new m.Anonymous(match[1])}else k=f==="font"?a(this.font):a(this.value);l=a(this.important);if(k&&a(this.end))return new m.Rule(f,k,l,w);else{v=i;e()}}},"import":function(){var f;if(a(/^@import\s+/)&&(f=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new m.Import(f,S)},directive:function(){var f,k,l;if(j.charAt(i)==="@")if(k=a(this["import"]))return k; +else if(f=a(/^@media|@page/)){l=(a(/^[^{]+/)||"").trim();if(k=a(this.block))return new m.Directive(f+" "+l,k)}else if(f=a(/^@[-a-z]+/))if(f==="@font-face"){if(k=a(this.block))return new m.Directive(f,k)}else if((k=a(this.entity))&&a(";"))return new m.Directive(f,k)},font:function(){for(var f=[],k=[],l;l=a(this.shorthand)||a(this.entity);)k.push(l);f.push(new m.Expression(k));if(a(","))for(;l=a(this.expression);){f.push(l);if(!a(","))break}return new m.Value(f)},value:function(){for(var f,k=[];f=a(this.expression);){k.push(f); +if(!a(","))break}if(k.length>0)return new m.Value(k)},important:function(){if(j.charAt(i)==="!")return a(/^! *important/)},sub:function(){var f;if(a("(")&&(f=a(this.expression))&&a(")"))return f},multiplication:function(){var f,k,l,p;if(f=a(this.operand)){for(;(l=a("/")||a("*"))&&(k=a(this.operand));)p=new m.Operation(l,[p||f,k]);return p||f}},addition:function(){var f,k,l,p;if(f=a(this.multiplication)){for(;(l=a(/^[-+]\s+/)||j.charAt(i-1)!=" "&&(a("+")||a("-")))&&(k=a(this.multiplication));)p=new m.Operation(l, +[p||f,k]);return p||f}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)||a(this.entities.call)},expression:function(){for(var f,k=[];f=a(this.addition)||a(this.entity);)k.push(f);if(k.length>0)return new m.Expression(k)},property:function(){var f;if(f=a(/^(\*?-?[-a-z_0-9]+)\s*:/))return f[1]}}}};if(typeof y!=="undefined")o.Parser.importer=function(d,b,e,g){if(d.charAt(0)!=="/"&&b.length>0)d=b[0]+d;X({href:d,title:d,type:g.mime}, +e,true)};(function(d){function b(a){return d.functions.hsla(a.h,a.s,a.l,a.a)}function e(a){if(a instanceof d.Dimension)return parseFloat(a.unit=="%"?a.value/100:a.value);else if(typeof a==="number")return a;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function g(a){return Math.min(1,Math.max(0,a))}d.functions={rgb:function(a,h,j){return this.rgba(a,h,j,1)},rgba:function(a,h,j,i){a=[a,h,j].map(function(n){return e(n)});i=e(i);return new d.Color(a,i)},hsl:function(a, +h,j){return this.hsla(a,h,j,1)},hsla:function(a,h,j,i){function n(v){v=v<0?v+1:v>1?v-1:v;return v*6<1?w+(r-w)*v*6:v*2<1?r:v*3<2?w+(r-w)*(2/3-v)*6:w}a=e(a)%360/360;h=e(h);j=e(j);i=e(i);var r=j<=0.5?j*(h+1):j+h-j*h,w=j*2-r;return this.rgba(n(a+1/3)*255,n(a)*255,n(a-1/3)*255,i)},hue:function(a){return new d.Dimension(Math.round(a.toHSL().h))},saturation:function(a){return new d.Dimension(Math.round(a.toHSL().s*100),"%")},lightness:function(a){return new d.Dimension(Math.round(a.toHSL().l*100),"%")}, +alpha:function(a){return new d.Dimension(a.toHSL().a)},saturate:function(a,h){a=a.toHSL();a.s+=h.value/100;a.s=g(a.s);return b(a)},desaturate:function(a,h){a=a.toHSL();a.s-=h.value/100;a.s=g(a.s);return b(a)},lighten:function(a,h){a=a.toHSL();a.l+=h.value/100;a.l=g(a.l);return b(a)},darken:function(a,h){a=a.toHSL();a.l-=h.value/100;a.l=g(a.l);return b(a)},fadein:function(a,h){a=a.toHSL();a.a+=h.value/100;a.a=g(a.a);return b(a)},fadeout:function(a,h){a=a.toHSL();a.a-=h.value/100;a.a=g(a.a);return b(a)}, +spin:function(a,h){a=a.toHSL();h=(a.h+h.value)%360;a.h=h<0?360+h:h;return b(a)},mix:function(a,h,j){j=j.value/100;var i=j*2-1,n=a.toHSL().a-h.toHSL().a;i=((i*n==-1?i:(i+n)/(1+i*n))+1)/2;n=1-i;return new d.Color([a.rgb[0]*i+h.rgb[0]*n,a.rgb[1]*i+h.rgb[1]*n,a.rgb[2]*i+h.rgb[2]*n],a.alpha*j+h.alpha*(1-j))},greyscale:function(a){return this.desaturate(a,new d.Dimension(100))},e:function(a){return new d.Anonymous(a instanceof d.JavaScript?a.evaluated:a)},"%":function(a){for(var h=Array.prototype.slice.call(arguments, +1),j=a.value,i=0;i255?255:b<0?0:b).toString(16);return b.length===1?"0"+b:b}).join("")},operate:function(b,e){var g=[];e instanceof d.Color||(e=e.toColor());for(var a=0;a<3;a++)g[a]=d.operate(b,this.rgb[a], +e.rgb[a]);return new d.Color(g)},toHSL:function(){var b=this.rgb[0]/255,e=this.rgb[1]/255,g=this.rgb[2]/255,a=this.alpha,h=Math.max(b,e,g),j=Math.min(b,e,g),i,n=(h+j)/2,r=h-j;if(h===j)i=j=0;else{j=n>0.5?r/(2-h-j):r/(h+j);switch(h){case b:i=(e-g)/r+(e":b.compress?">":" > "}[this.value]}})(q("less/tree"));(function(d){d.Expression=function(b){this.value=b};d.Expression.prototype={eval:function(b){return this.value.length>1?new d.Expression(this.value.map(function(e){return e.eval(b)})):this.value[0].eval(b)},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(" ")}}})(q("less/tree"));(function(d){d.Import=function(b,e){var g=this;this._path=b;this.path=b instanceof d.Quoted?/\.(le?|c)ss$/.test(b.value)?b.value: +b.value+".less":b.value.value||b.value;(this.css=/css$/.test(this.path))||e.push(this.path,function(a){if(!a)throw new Error("Error parsing "+g.path);g.root=a})};d.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var e;if(this.css)return this;else{e=new d.Ruleset(null,this.root.rules.slice(0));for(var g=0;g0){for(h=0;h1?Array.prototype.push.apply(g,h.find(new d.Selector(b.elements.slice(1)),e)):g.push(h);break}});return this._lookups[a]=g},toCSS:function(b,e){var g=[],a=[],h=[],j=[];if(!this.root)if(b.length===0)j=this.selectors.map(function(r){return[r]});else for(var i=0;i0){j=j.map(function(r){return r.map(function(w){return w.toCSS(e)}).join("").trim()}).join(e.compress? +",":j.length>3?",\n":", ");g.push(j,(e.compress?"{":" {\n ")+a.join(e.compress?"":"\n ")+(e.compress?"}":"\n}\n"))}g.push(h);return g.join("")+(e.compress?"\n":"")}}})(q("less/tree"));(function(d){d.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};d.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};d.Selector.prototype.toCSS=function(b){if(this._css)return this._css;return this._css= +this.elements.map(function(e){return typeof e==="string"?" "+e.trim():e.toCSS(b)}).join("")}})(q("less/tree"));(function(d){d.URL=function(b,e){if(b.data)this.attrs=b;else{if(!/^(?:https?:\/|file:\/)?\//.test(b.value)&&e.length>0&&typeof y!=="undefined")b.value=e[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value);this.value=b;this.paths=e}};d.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+ +")"},eval:function(b){return this.attrs?this:new d.URL(this.value.eval(b),this.paths)}}})(q("less/tree"));(function(d){d.Value=function(b){this.value=b;this.is="value"};d.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new d.Value(this.value.map(function(e){return e.eval(b)}))},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(b.compress?",":", ")}}})(q("less/tree"));(function(d){d.Variable=function(b,e){this.name=b;this.index=e};d.Variable.prototype= +{eval:function(b){var e,g,a=this.name;if(e=d.find(b.frames,function(h){if(g=h.variable(a))return g.value.eval(b)}))return e;else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find=function(d,b){for(var e=0,g;e0||P?"development":"production");o.async=false;o.poll=o.poll||(P?1E3:1500);o.watch=function(){return this.watchMode=true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization=0;/!watch/.test(location.hash)&&o.watch();o.watchTimer=setInterval(function(){o.watchMode&&W(function(d,b,e){d&&N(d.toCSS(),b,e.lastModified)})},o.poll)}else o.optimization=3;var D;try{D=typeof y.localStorage==="undefined"?null:y.localStorage}catch(ca){D= +null}var M=document.getElementsByTagName("link"),V=/^text\/(x-)?less$/;o.sheets=[];for(var J=0;J