/* * LESS - Leaner CSS v1.4.1 * http://lesscss.org * * Copyright (c) 2009-2013, Alexis Sellier * Licensed under the Apache 2.0 License. * * @licence */ !function(e,t){function n(t){return e.less[t.split("/")[1]]}function i(){"development"===d.env?(d.optimization=0,d.watchTimer=setInterval(function(){d.watchMode&&s(function(e,t,n,i,r){e?v(e,i.href):t&&c(t.toCSS(d),i,r.lastModified)})},d.poll)):d.optimization=3}function r(){for(var e=document.getElementsByTagName("style"),t=0;tn&&u.directories[n]===o.directories[n];n++);for(s=u.directories.slice(n),r=o.directories.slice(n),n=0;n0&&(a.splice(n-1,2),n-=2)}return o.hostPart=s[1],o.directories=a,o.path=s[1]+a.join("/"),o.fileUrl=o.path+(s[4]||""),o.url=o.fileUrl+(s[5]||""),o}function u(t,n,i,r){var s,u=a(t.href,e.location.href),f=u.url,m=S&&S.getItem(f),v=S&&S.getItem(f+":timestamp"),g={css:m,timestamp:v},b={relativeUrls:d.relativeUrls,currentDirectory:u.path,filename:f};t instanceof d.tree.parseEnv?(s=new d.tree.parseEnv(t),b.entryPath=s.currentFileInfo.entryPath,b.rootpath=s.currentFileInfo.rootpath,b.rootFilename=s.currentFileInfo.rootFilename):(s=new d.tree.parseEnv(d),s.mime=t.type,b.entryPath=u.path,b.rootpath=d.rootpath||u.path,b.rootFilename=f),s.relativeUrls&&(b.rootpath=d.rootpath?a(d.rootpath+o(u.path,b.entryPath)).path:u.path),h(f,t.type,function(e,o){if(E+=e.replace(/@import .+?;/gi,""),!i&&g&&o&&new Date(o).valueOf()===new Date(g.timestamp).valueOf())c(g.css,t),n(null,null,e,t,{local:!0,remaining:r},f);else try{s.contents[f]=e,s.paths=[u.path],s.currentFileInfo=b,new d.Parser(s).parse(e,function(i,a){if(i)return n(i,null,null,t);try{n(i,a,e,t,{local:!1,lastModified:o,remaining:r},f),s.currentFileInfo.rootFilename===f&&p(document.getElementById("less-error-message:"+l(f)))}catch(i){n(i,null,null,t)}})}catch(a){n(a,null,null,t)}},function(e,i){n({type:"File",message:"'"+i+"' wasn't found ("+e+")"},null,null,t)})}function l(e){return e.replace(/^[a-z-]+:\/+?[^\/]+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function c(e,t,n){var i=t.href||"",r="less:"+(t.title||l(i)),s=document.getElementById(r),o=!1,a=document.createElement("style");if(a.setAttribute("type","text/css"),t.media&&a.setAttribute("media",t.media),a.id=r,a.styleSheet)try{a.styleSheet.cssText=e}catch(u){throw new Error("Couldn't reassign styleSheet.cssText.")}else a.appendChild(document.createTextNode(e)),o=null!==s&&s.childNodes.length>0&&a.childNodes.length>0&&s.firstChild.nodeValue===a.firstChild.nodeValue;var c=document.getElementsByTagName("head")[0];if(null==s||o===!1){var h=t&&t.nextSibling||null;(h||document.getElementsByTagName("head")[0]).parentNode.insertBefore(a,h)}if(s&&o===!1&&c.removeChild(s),n&&S){m("saving "+i+" to cache.");try{S.setItem(i,e),S.setItem(i+":timestamp",n)}catch(u){m("failed to save")}}}function h(e,t,n,i){function r(t,n,i){t.status>=200&&t.status<300?n(t.responseText,t.getResponseHeader("Last-Modified")):"function"==typeof i&&i(t.status,e)}var s=f(),o=b?d.fileAsync:d.async;"function"==typeof s.overrideMimeType&&s.overrideMimeType("text/css"),s.open("GET",e,o),s.setRequestHeader("Accept",t||"text/x-less, text/css; q=0.9, */*; q=0.5"),s.send(null),b&&!d.fileAsync?0===s.status||s.status>=200&&s.status<300?n(s.responseText):i(s.status,e):o?s.onreadystatechange=function(){4==s.readyState&&r(s,n,i)}:r(s,n,i)}function f(){if(e.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(t){return m("browser doesn't support AJAX."),null}}function p(e){return e&&e.parentNode.removeChild(e)}function m(e){"development"==d.env&&"undefined"!=typeof console&&console.log("less: "+e)}function v(e,n){var i,r,s="less-error-message:"+l(n||""),o='
  • {content}
  • ',a=document.createElement("div"),u=[],h=e.filename||n,f=h.match(/([^\/]+(\?.*)?)$/)[1];a.id=s,a.className="less-error-message",r="

    "+(e.type||"Syntax")+"Error: "+(e.message||"There is an error in your .less file")+'

    in '+f+" ";var p=function(e,n,i){e.extract[n]!=t&&u.push(o.replace(/\{line\}/,(parseInt(e.line)||0)+(n-1)).replace(/\{class\}/,i).replace(/\{content\}/,e.extract[n]))};e.extract?(p(e,0,""),p(e,1,"line"),p(e,2,""),r+="on line "+e.line+", column "+(e.column+1)+":

    "):e.stack&&(r+="
    "+e.stack.split("\n").slice(1).join("
    ")),a.innerHTML=r,c([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),a.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"].join(";"),"development"==d.env&&(i=setInterval(function(){document.body&&(document.getElementById(s)?document.body.replaceChild(a,document.getElementById(s)):document.body.insertBefore(a,document.body.firstChild),clearInterval(i))},10))}var d,g;"object"==typeof environment&&"[object Environment]"==={}.toString.call(environment)?(d="undefined"==typeof e?{}:e.less={},g=d.tree={},d.mode="rhino"):"undefined"==typeof e?(d=exports,g=n("./tree"),d.mode="node"):("undefined"==typeof e.less&&(e.less={}),d=e.less,g=e.less.tree={},d.mode="browser"),d.Parser=function(e){function t(){w=C[y],S=b,I=b}function i(){C[y]=w,b=S,I=b}function r(){b>I&&(C[y]=C[y].slice(b-I),I=b)}function s(e){var t=e.charCodeAt(0);return 32===t||10===t||9===t}function o(e){var t,n;if(e instanceof Function)return e.call(k.parsers);if("string"==typeof e)t=v.charAt(b)===e?e:null,n=1,r();else{if(r(),!(t=e.exec(C[y])))return null;n=t[0].length}return t?(a(n),"string"==typeof t?t:1===t.length?t[0]:t):void 0}function a(e){for(var t=b,n=y,i=b+C[y].length,r=b+=e;i>b&&s(v.charAt(b));)b++;return C[y]=C[y].slice(e+(b-r)),I=b,0===C[y].length&&y=0&&"\n"!==t.charAt(n);n--)i++;return{line:"number"==typeof e?(t.slice(0,e).match(/\n/g)||"").length:null,column:i}}function p(e,t,i){var r=i.currentFileInfo.filename;return"browser"!==d.mode&&"rhino"!==d.mode&&(r=n("path").resolve(r)),{lineNumber:f(e,t).line+1,fileName:r}}function m(e,t){var n=h(e,t),i=f(e.index,n),r=i.line,s=i.column,o=n.split("\n");this.type=e.type||"Syntax",this.message=e.message,this.filename=e.filename||t.currentFileInfo.filename,this.index=e.index,this.line="number"==typeof r?r+1:null,this.callLine=e.call&&f(e.call,n).line+1,this.callExtract=o[f(e.call,n).line],this.stack=e.stack,this.column=s,this.extract=[o[r-1],o[r],o[r+1]]}var v,b,y,w,S,x,C,I,k;e instanceof g.parseEnv||(e=new g.parseEnv(e));var E=this.imports={paths:e.paths||[],queue:[],files:e.files,contents:e.contents,mime:e.mime,error:null,push:function(t,n,i){var r=this;this.queue.push(t),d.Parser.importer(t,n,function(e,n,s){r.queue.splice(r.queue.indexOf(t),1);var o=s in r.files;r.files[s]=n,e&&!r.error&&(r.error=e),i(e,n,o)},e)}};return m.prototype=new Error,m.prototype.constructor=m,this.env=e=e||{},this.optimization="optimization"in this.env?this.env.optimization:1,k={imports:E,parse:function(t,i){var r,s,a,u=null;if(b=y=I=x=0,v=t.replace(/\r\n/g,"\n"),v=v.replace(/^\uFEFF/,""),C=function(t){for(var n,i,r,s,o=0,a=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,c=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,h=0,f=t[0],p=0;p0?"missing closing `}`":"missing opening `{`",filename:e.currentFileInfo.filename},e)),t.map(function(e){return e.join("")})}([[]]),u)return i(new m(u,e));try{r=new g.Ruleset([],o(this.parsers.primary)),r.root=!0,r.firstRoot=!0}catch(l){return i(new m(l,e))}if(r.toCSS=function(t){return function(i,r){i=i||{};var s=new g.evalEnv(i);"object"==typeof r&&!Array.isArray(r)&&(r=Object.keys(r).map(function(e){var t=r[e];return t instanceof g.Value||(t instanceof g.Expression||(t=new g.Expression([t])),t=new g.Value([t])),new g.Rule("@"+e,t,!1,0)}),s.frames=[new g.Ruleset(null,r)]);try{var o=t.call(this,s);(new g.joinSelectorVisitor).run(o),(new g.processExtendsVisitor).run(o);var a=o.toCSS({compress:Boolean(i.compress),dumpLineNumbers:e.dumpLineNumbers,strictUnits:Boolean(i.strictUnits)})}catch(u){throw new m(u,e)}return i.yuicompress&&"node"===d.mode?n("ycssmin").cssmin(a,i.maxLineLen):i.compress?a.replace(/(\s)+/g,"$1"):a}}(r.eval),b=0&&"\n"!==v.charAt(c);c--)h++;u={type:"Parse",message:"Unrecognised input",index:b,filename:e.currentFileInfo.filename,line:s,column:h,extract:[a[s-2],a[s-1],a[s]]}}var f=function(t){t=u||t||k.imports.error,t?(t instanceof m||(t=new m(t,e)),i(t)):i(null,r)};e.processImports!==!1?new g.importVisitor(this.imports,f).run(r):f()},parsers:{primary:function(){for(var e,t=[];(e=o(this.extendRule)||o(this.mixin.definition)||o(this.rule)||o(this.ruleset)||o(this.mixin.call)||o(this.comment)||o(this.directive))||o(/^[\s\n]+/)||o(/^;+/);)e&&t.push(e);return t},comment:function(){var e;if("/"===v.charAt(b))return"/"===v.charAt(b+1)?new g.Comment(o(/^\/\/.*/),!0):(e=o(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new g.Comment(e):void 0},entities:{quoted:function(){var t,n,i=b,r=b;return"~"===v.charAt(i)&&(i++,n=!0),'"'===v.charAt(i)||"'"===v.charAt(i)?(n&&o("~"),(t=o(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))?new g.Quoted(t[0],t[1]||t[2],n,r,e.currentFileInfo):void 0):void 0},keyword:function(){var e;return(e=o(/^[_A-Za-z-][_A-Za-z0-9-]*/))?g.colors.hasOwnProperty(e)?new g.Color(g.colors[e].slice(1)):new g.Keyword(e):void 0},call:function(){var t,n,i,r,s=b;if(t=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(C[y])){if(t=t[1],n=t.toLowerCase(),"url"===n)return null;if(b+=t.length,"alpha"===n&&(r=o(this.alpha),"undefined"!=typeof r))return r;if(o("("),i=o(this.entities.arguments),o(")"))return t?new g.Call(t,i,s,e.currentFileInfo):void 0}},arguments:function(){for(var e,t=[];(e=o(this.entities.assignment)||o(this.expression))&&(t.push(e),o(",")););return t},literal:function(){return o(this.entities.dimension)||o(this.entities.color)||o(this.entities.quoted)||o(this.entities.unicodeDescriptor)},assignment:function(){var e,t;return(e=o(/^\w+(?=\s?=)/i))&&o("=")&&(t=o(this.entity))?new g.Assignment(e,t):void 0},url:function(){var t;if("u"===v.charAt(b)&&o(/^url\(/))return t=o(this.entities.quoted)||o(this.entities.variable)||o(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/)||"",u(")"),new g.URL(null!=t.value||t instanceof g.Variable?t:new g.Anonymous(t),e.currentFileInfo)},variable:function(){var t,n=b;return"@"===v.charAt(b)&&(t=o(/^@@?[\w-]+/))?new g.Variable(t,n,e.currentFileInfo):void 0},variableCurly:function(){var t,n=b;return"@"===v.charAt(b)&&(t=o(/^@\{([\w-]+)\}/))?new g.Variable("@"+t[1],n,e.currentFileInfo):void 0},color:function(){var e;return"#"===v.charAt(b)&&(e=o(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/))?new g.Color(e[1]):void 0},dimension:function(){var e,t=v.charCodeAt(b);if(!(t>57||43>t||47===t||44==t))return(e=o(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/))?new g.Dimension(e[1],e[2]):void 0},unicodeDescriptor:function(){var e;return(e=o(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/))?new g.UnicodeDescriptor(e[0]):void 0},javascript:function(){var e,t,n=b;return"~"===v.charAt(n)&&(n++,t=!0),"`"===v.charAt(n)?(t&&o("~"),(e=o(/^`([^`]*)`/))?new g.JavaScript(e[1],b,t):void 0):void 0}},variable:function(){var e;return"@"===v.charAt(b)&&(e=o(/^(@[\w-]+)\s*:/))?e[1]:void 0},extend:function(e){var t,n,i,r=b,s=[];if(o(e?/^&:extend\(/:/^:extend\(/)){do{for(i=null,t=[];!(i=o(/^(all)(?=\s*(\)|,))/))&&(n=o(this.element),n);)t.push(n);i=i&&i[1],s.push(new g.Extend(new g.Selector(t),i,r))}while(o(","));return u(/^\)/),e&&u(/^;/),s}},extendRule:function(){return this.extend(!0)},mixin:{call:function(){var n,r,s,a=[],l=b,h=v.charAt(b),f=!1;if("."===h||"#"===h){for(t();n=o(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/);)a.push(new g.Element(r,n,b)),r=o(">");return o("(")&&(s=this.mixin.args.call(this,!0).args,u(")")),s=s||[],o(this.important)&&(f=!0),a.length>0&&(o(";")||c("}"))?new g.mixin.Call(a,s,l,e.currentFileInfo,f):void i()}},args:function(e){for(var t,n,i,r,s,a,c=[],h=[],f=[],p={args:null,variadic:!1};;){if(e)a=o(this.expression);else{if(o(this.comment),"."===v.charAt(b)&&o(/^\.{3}/)){p.variadic=!0,o(";")&&!t&&(t=!0),(t?h:f).push({variadic:!0});break}a=o(this.entities.variable)||o(this.entities.literal)||o(this.entities.keyword)}if(!a)break;r=null,a.throwAwayComments&&a.throwAwayComments(),s=a;var m=null;if(e){if(1==a.value.length)var m=a.value[0]}else m=a;if(m&&m instanceof g.Variable)if(o(":"))c.length>0&&(t&&l("Cannot mix ; and , as delimiter types"),n=!0),s=u(this.expression),r=i=m.name;else{if(!e&&o(/^\.{3}/)){p.variadic=!0,o(";")&&!t&&(t=!0),(t?h:f).push({name:a.name,variadic:!0});break}e||(i=r=m.name,s=null)}s&&c.push(s),f.push({name:r,value:s}),o(",")||(o(";")||t)&&(n&&l("Cannot mix ; and , as delimiter types"),t=!0,c.length>1&&(s=new g.Value(c)),h.push({name:i,value:s}),i=null,c=[],n=!1)}return p.args=t?h:f,p},definition:function(){var e,n,r,s,a=[],l=!1;if(!("."!==v.charAt(b)&&"#"!==v.charAt(b)||c(/^[^{]*\}/))&&(t(),n=o(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/))){e=n[1];var h=this.mixin.args.call(this,!1);if(a=h.args,l=h.variadic,o(")")||(x=b,i()),o(this.comment),o(/^when/)&&(s=u(this.conditions,"expected condition")),r=o(this.block),r)return new g.mixin.Definition(e,a,r,s,l);i()}}},entity:function(){return o(this.entities.literal)||o(this.entities.variable)||o(this.entities.url)||o(this.entities.call)||o(this.entities.keyword)||o(this.entities.javascript)||o(this.comment)},end:function(){return o(";")||c("}")},alpha:function(){var e;if(o(/^\(opacity=/i))return(e=o(/^\d+/)||o(this.entities.variable))?(u(")"),new g.Alpha(e)):void 0},element:function(){var e,t,n;return t=o(this.combinator),e=o(/^(?:\d+\.\d+|\d+)%/)||o(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||o("*")||o("&")||o(this.attribute)||o(/^\([^()@]+\)/)||o(/^[\.#](?=@)/)||o(this.entities.variableCurly),e||o("(")&&(n=o(this.selector))&&o(")")&&(e=new g.Paren(n)),e?new g.Element(t,e,b):void 0},combinator:function(){var e=v.charAt(b);if(">"===e||"+"===e||"~"===e||"|"===e){for(b++;v.charAt(b).match(/\s/);)b++;return new g.Combinator(e)}return new g.Combinator(v.charAt(b-1).match(/\s/)?" ":null)},selector:function(){for(var e,t,n,i=[],r=[];((n=o(this.extend))||(e=o(this.element)))&&(n?r.push.apply(r,n):(r.length&&l("Extend can only be used at the end of selector"),t=v.charAt(b),i.push(e),e=null),"{"!==t&&"}"!==t&&";"!==t&&","!==t&&")"!==t););return i.length>0?new g.Selector(i,r):void(r.length&&l("Extend must be used to extend a selector, it cannot be used on its own"))},attribute:function(){var e,t,n;if(o("["))return(e=o(this.entities.variableCurly))||(e=u(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/)),(n=o(/^[|~*$^]?=/))&&(t=o(this.entities.quoted)||o(/^[\w-]+/)||o(this.entities.variableCurly)),u("]"),new g.Attribute(e,n,t)},block:function(){var e;return o("{")&&(e=o(this.primary))&&o("}")?e:void 0},ruleset:function(){var n,r,s,a=[];for(t(),e.dumpLineNumbers&&(s=p(b,v,e));(n=o(this.selector))&&(a.push(n),o(this.comment),o(","));)o(this.comment);if(a.length>0&&(r=o(this.block))){var u=new g.Ruleset(a,r,e.strictImports);return e.dumpLineNumbers&&(u.debugInfo=s),u}x=b,i()},rule:function(n){var r,s,a,u=v.charAt(b);if(t(),"."!==u&&"#"!==u&&"&"!==u&&(r=o(this.variable)||o(this.property))){if(s=n||!e.compress&&"@"!==r.charAt(0)?o(this.anonymousValue)||o(this.value):o(this.value)||o(this.anonymousValue),a=o(this.important),s&&o(this.end))return new g.Rule(r,s,a,S,e.currentFileInfo);if(x=b,i(),s&&!n)return this.rule(!0)}},anonymousValue:function(){var e;return(e=/^([^@+\/'"*`(;{}-]*);/.exec(C[y]))?(b+=e[0].length-1,new g.Anonymous(e[1])):void 0},"import":function(){var n,r,s=b;t();var a=o(/^@import?\s+/),u=(a?o(this.importOptions):null)||{};return a&&(n=o(this.entities.quoted)||o(this.entities.url))&&(r=o(this.mediaFeatures),o(";"))?(r=r&&new g.Value(r),new g.Import(n,r,u,s,e.currentFileInfo)):void i()},importOptions:function(){var e,t,n,i={};if(!o("("))return null;do if(e=o(this.importOption)){switch(t=e,n=!0,t){case"css":t="less",n=!1;break;case"once":t="multiple",n=!1}if(i[t]=n,!o(","))break}while(e);return u(")"),i},importOption:function(){var e=o(/^(less|css|multiple|once)/);return e?e[1]:void 0},mediaFeature:function(){var t,n,i=[];do if(t=o(this.entities.keyword))i.push(t);else if(o("(")){if(n=o(this.property),t=o(this.value),!o(")"))return null;if(n&&t)i.push(new g.Paren(new g.Rule(n,t,null,b,e.currentFileInfo,!0)));else{if(!t)return null;i.push(new g.Paren(t))}}while(t);return i.length>0?new g.Expression(i):void 0},mediaFeatures:function(){var e,t=[];do if(e=o(this.mediaFeature)){if(t.push(e),!o(","))break}else if((e=o(this.entities.variable))&&(t.push(e),!o(",")))break;while(e);return t.length>0?t:null},media:function(){var t,n,i,r;return e.dumpLineNumbers&&(r=p(b,v,e)),o(/^@media/)&&(t=o(this.mediaFeatures),n=o(this.block))?(i=new g.Media(n,t),e.dumpLineNumbers&&(i.debugInfo=r),i):void 0},directive:function(){var n,r,s,a,u,l,c;if("@"===v.charAt(b)){if(r=o(this["import"])||o(this.media))return r;if(t(),n=o(/^@[a-z-]+/)){switch(a=n,"-"==n.charAt(1)&&n.indexOf("-",2)>0&&(a="@"+n.slice(n.indexOf("-",2)+1)),a){case"@font-face":u=!0;break;case"@viewport":case"@top-left":case"@top-left-corner":case"@top-center":case"@top-right":case"@top-right-corner":case"@bottom-left":case"@bottom-left-corner":case"@bottom-center":case"@bottom-right":case"@bottom-right-corner":case"@left-top":case"@left-middle":case"@left-bottom":case"@right-top":case"@right-middle":case"@right-bottom":u=!0;break;case"@page":case"@document":case"@supports":case"@keyframes":u=!0,l=!0;break;case"@namespace":c=!0}if(l&&(n+=" "+(o(/^[^{]+/)||"").trim()),u){if(s=o(this.block))return new g.Directive(n,s)}else if((r=o(c?this.expression:this.entity))&&o(";")){var h=new g.Directive(n,r);return e.dumpLineNumbers&&(h.debugInfo=p(b,v,e)),h}i()}}},value:function(){for(var e,t=[];(e=o(this.expression))&&(t.push(e),o(",")););return t.length>0?new g.Value(t):void 0},important:function(){return"!"===v.charAt(b)?o(/^! *important/):void 0},sub:function(){var e,t;return o("(")&&(e=o(this.addition))?(t=new g.Expression([e]),u(")"),t.parens=!0,t):void 0},multiplication:function(){var e,t,n,i,r;if(e=o(this.operand)){for(r=s(v.charAt(b-1));!c(/^\/[*\/]/)&&(n=o("/")||o("*"))&&(t=o(this.operand));)e.parensInOp=!0,t.parensInOp=!0,i=new g.Operation(n,[i||e,t],r),r=s(v.charAt(b-1));return i||e}},addition:function(){var e,t,n,i,r;if(e=o(this.multiplication)){for(r=s(v.charAt(b-1));(n=o(/^[-+]\s+/)||!r&&(o("+")||o("-")))&&(t=o(this.multiplication));)e.parensInOp=!0,t.parensInOp=!0,i=new g.Operation(n,[i||e,t],r),r=s(v.charAt(b-1));return i||e}},conditions:function(){var e,t,n,i=b;if(e=o(this.condition)){for(;o(",")&&(t=o(this.condition));)n=new g.Condition("or",n||e,t,i);return n||e}},condition:function(){var e,t,n,i,r=b,s=!1;return o(/^not/)&&(s=!0),u("("),(e=o(this.addition)||o(this.entities.keyword)||o(this.entities.quoted))?((i=o(/^(?:>=|=<|[<=>])/))?(t=o(this.addition)||o(this.entities.keyword)||o(this.entities.quoted))?n=new g.Condition(i,e,t,r,s):l("expected expression"):n=new g.Condition("=",e,new g.Keyword("true"),r,s),u(")"),o(/^and/)?new g.Condition("and",n,o(this.condition)):n):void 0},operand:function(){var e,t=v.charAt(b+1);"-"===v.charAt(b)&&("@"===t||"("===t)&&(e=o("-"));var n=o(this.sub)||o(this.entities.dimension)||o(this.entities.color)||o(this.entities.variable)||o(this.entities.call);return e&&(n.parensInOp=!0,n=new g.Negative(n)),n},expression:function(){for(var e,t,n=[];e=o(this.addition)||o(this.entity);)n.push(e),!c(/^\/[\/*]/)&&(t=o("/"))&&n.push(new g.Anonymous(t));return n.length>0?new g.Expression(n):void 0},property:function(){var e;return(e=o(/^(\*?-?[_a-z0-9-]+)\s*:/))?e[1]:void 0}}}},("browser"===d.mode||"rhino"===d.mode)&&(d.Parser.importer=function(e,t,n,i){!/^([a-z-]+:)?\//.test(e)&&t.currentDirectory&&(e=t.currentDirectory+e);var r=i.toSheet(e);r.processImports=!1,r.currentFileInfo=t,u(r,function(e,t,i,r,s,o){n.call(null,e,t,o)},!0)}),function(i){function r(e){return i.functions.hsla(e.h,e.s,e.l,e.a)}function s(e,t){return e instanceof i.Dimension&&e.unit.is("%")?parseFloat(e.value*t/100):o(e)}function o(e){if(e instanceof i.Dimension)return parseFloat(e.unit.is("%")?e.value/100:e.value);if("number"==typeof e)return e;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function a(e){return Math.min(1,Math.max(0,e))}i.functions={rgb:function(e,t,n){return this.rgba(e,t,n,1)},rgba:function(e,t,n,r){var a=[e,t,n].map(function(e){return s(e,256)});return r=o(r),new i.Color(a,r)},hsl:function(e,t,n){return this.hsla(e,t,n,1)},hsla:function(e,t,n,i){function r(e){return e=0>e?e+1:e>1?e-1:e,1>6*e?u+(s-u)*e*6:1>2*e?s:2>3*e?u+(s-u)*(2/3-e)*6:u}e=o(e)%360/360,t=a(o(t)),n=a(o(n)),i=a(o(i));var s=.5>=n?n*(t+1):n+t-n*t,u=2*n-s;return this.rgba(255*r(e+1/3),255*r(e),255*r(e-1/3),i)},hsv:function(e,t,n){return this.hsva(e,t,n,1)},hsva:function(e,t,n,i){e=o(e)%360/360*360,t=o(t),n=o(n),i=o(i);var r,s;r=Math.floor(e/60%6),s=e/60-r;var a=[n,n*(1-t),n*(1-s*t),n*(1-(1-s)*t)],u=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return this.rgba(255*a[u[r][0]],255*a[u[r][1]],255*a[u[r][2]],i)},hue:function(e){return new i.Dimension(Math.round(e.toHSL().h))},saturation:function(e){return new i.Dimension(Math.round(100*e.toHSL().s),"%")},lightness:function(e){return new i.Dimension(Math.round(100*e.toHSL().l),"%")},hsvhue:function(e){return new i.Dimension(Math.round(e.toHSV().h))},hsvsaturation:function(e){return new i.Dimension(Math.round(100*e.toHSV().s),"%")},hsvvalue:function(e){return new i.Dimension(Math.round(100*e.toHSV().v),"%")},red:function(e){return new i.Dimension(e.rgb[0])},green:function(e){return new i.Dimension(e.rgb[1])},blue:function(e){return new i.Dimension(e.rgb[2])},alpha:function(e){return new i.Dimension(e.toHSL().a)},luma:function(e){return new i.Dimension(Math.round(e.luma()*e.alpha*100),"%")},saturate:function(e,t){var n=e.toHSL();return n.s+=t.value/100,n.s=a(n.s),r(n)},desaturate:function(e,t){var n=e.toHSL();return n.s-=t.value/100,n.s=a(n.s),r(n)},lighten:function(e,t){var n=e.toHSL();return n.l+=t.value/100,n.l=a(n.l),r(n)},darken:function(e,t){var n=e.toHSL();return n.l-=t.value/100,n.l=a(n.l),r(n)},fadein:function(e,t){var n=e.toHSL();return n.a+=t.value/100,n.a=a(n.a),r(n)},fadeout:function(e,t){var n=e.toHSL();return n.a-=t.value/100,n.a=a(n.a),r(n)},fade:function(e,t){var n=e.toHSL();return n.a=t.value/100,n.a=a(n.a),r(n)},spin:function(e,t){var n=e.toHSL(),i=(n.h+t.value)%360;return n.h=0>i?360+i:i,r(n)},mix:function(e,t,n){n||(n=new i.Dimension(50));var r=n.value/100,s=2*r-1,o=e.toHSL().a-t.toHSL().a,a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,u=1-a,l=[e.rgb[0]*a+t.rgb[0]*u,e.rgb[1]*a+t.rgb[1]*u,e.rgb[2]*a+t.rgb[2]*u],c=e.alpha*r+t.alpha*(1-r);return new i.Color(l,c)},greyscale:function(e){return this.desaturate(e,new i.Dimension(100))},contrast:function(e,t,n,i){if(!e.rgb)return null;if("undefined"==typeof n&&(n=this.rgba(255,255,255,1)),"undefined"==typeof t&&(t=this.rgba(0,0,0,1)),t.luma()>n.luma()){var r=n;n=t,t=r}return i="undefined"==typeof i?.43:o(i),e.luma()*e.alpha=m){if(this.env.ieCompat!==!1)return this.env.silent||console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!",o,v,m),new i.URL(r||t,this.currentFileInfo).eval(this.env);this.env.silent||console.warn("WARNING: Embedding %s (%dKB) exceeds IE8's data-uri size limit of %dKB!",o,v,m)}p=l?p.toString("base64"):encodeURIComponent(p);var d="'data:"+s+","+p+"'";return new i.URL(new i.Anonymous(d))}},i._mime={_types:{".htm":"text/html",".html":"text/html",".gif":"image/gif",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},lookup:function(e){var r=n("path").extname(e),s=i._mime._types[r];if(s===t)throw new Error('Optional dependency "mime" is required for '+r);return s},charsets:{lookup:function(e){return e&&/^text\//.test(e)?"UTF-8":""}}};for(var u=[{name:"ceil"},{name:"floor"},{name:"sqrt"},{name:"abs"},{name:"tan",unit:""},{name:"sin",unit:""},{name:"cos",unit:""},{name:"atan",unit:"rad"},{name:"asin",unit:"rad"},{name:"acos",unit:"rad"}],l=function(e,t){return function(n){return null!=t&&(n=n.unify()),this._math(Math[e],t,n)}},c=0;ct?-1:1}}}(n("../tree")),function(e){e.Assignment=function(e,t){this.key=e,this.value=t},e.Assignment.prototype={type:"Assignment",accept:function(e){this.value=e.visit(this.value)},toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(t){return this.value.eval?new e.Assignment(this.key,this.value.eval(t)):this}}}(n("../tree")),function(e){e.Call=function(e,t,n,i){this.name=e,this.args=t,this.index=n,this.currentFileInfo=i},e.Call.prototype={type:"Call",accept:function(e){this.args=e.visit(this.args)},eval:function(t){var n,i,r=this.args.map(function(e){return e.eval(t)}),s=this.name.toLowerCase();if(s in e.functions)try{if(i=new e.functionCall(t,this.currentFileInfo),n=i[s].apply(i,r),null!=n)return n}catch(o){throw{type:o.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(o.message?": "+o.message:""),index:this.index,filename:this.currentFileInfo.filename}}return new e.Anonymous(this.name+"("+r.map(function(e){return e.toCSS(t)}).join(", ")+")")},toCSS:function(e){return this.eval(e).toCSS()}}}(n("../tree")),function(e){e.Color=function(e,t){this.rgb=Array.isArray(e)?e:6==e.length?e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):e.split("").map(function(e){return parseInt(e+e,16)}),this.alpha="number"==typeof t?t:1},e.Color.prototype={type:"Color",eval:function(){return this},luma:function(){return.2126*this.rgb[0]/255+.7152*this.rgb[1]/255+.0722*this.rgb[2]/255},toCSS:function(e,t){var n=e&&e.compress&&!t;if(this.alpha<1)return"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(","+(n?"":" "))+")";var i=this.rgb.map(function(e){return e=Math.round(e),e=(e>255?255:0>e?0:e).toString(16),1===e.length?"0"+e:e}).join("");return n&&(i=i.split(""),i=i[0]==i[1]&&i[2]==i[3]&&i[4]==i[5]?i[0]+i[2]+i[4]:i.join("")),"#"+i},operate:function(t,n,i){var r=[];i instanceof e.Color||(i=i.toColor());for(var s=0;3>s;s++)r[s]=e.operate(t,n,this.rgb[s],i.rgb[s]);return new e.Color(r,this.alpha+i.alpha)},toHSL:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),u=(o+a)/2,l=o-a;if(o===a)e=t=0;else{switch(t=u>.5?l/(2-o-a):l/(o+a),o){case n:e=(i-r)/l+(r>i?6:0);break;case i:e=(r-n)/l+2;break;case r:e=(n-i)/l+4}e/=6}return{h:360*e,s:t,l:u,a:s}},toHSV:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),u=o,l=o-a;if(t=0===o?0:l/o,o===a)e=0;else{switch(o){case n:e=(i-r)/l+(r>i?6:0);break;case i:e=(r-n)/l+2;break;case r:e=(n-i)/l+4}e/=6}return{h:360*e,s:t,v:u,a:s}},toARGB:function(){var e=[Math.round(255*this.alpha)].concat(this.rgb);return"#"+e.map(function(e){return e=Math.round(e),e=(e>255?255:0>e?0:e).toString(16),1===e.length?"0"+e:e}).join("")},compare:function(e){return e.rgb&&e.rgb[0]===this.rgb[0]&&e.rgb[1]===this.rgb[1]&&e.rgb[2]===this.rgb[2]&&e.alpha===this.alpha?0:-1}}}(n("../tree")),function(e){e.Comment=function(e,t){this.value=e,this.silent=!!t},e.Comment.prototype={type:"Comment",toCSS:function(e){return e.compress?"":this.value},eval:function(){return this}}}(n("../tree")),function(e){e.Condition=function(e,t,n,i,r){this.op=e.trim(),this.lvalue=t,this.rvalue=n,this.index=i,this.negate=r},e.Condition.prototype={type:"Condition",accept:function(e){this.lvalue=e.visit(this.lvalue),this.rvalue=e.visit(this.rvalue)},eval:function(e){var t,n=this.lvalue.eval(e),i=this.rvalue.eval(e),r=this.index,t=function(e){switch(e){case"and":return n&&i;case"or":return n||i;default:if(n.compare)t=n.compare(i);else{if(!i.compare)throw{type:"Type",message:"Unable to perform comparison",index:r};t=i.compare(n)}switch(t){case-1:return"<"===e||"=<"===e;case 0:return"="===e||">="===e||"=<"===e;case 1:return">"===e||">="===e}}}(this.op);return this.negate?!t:t}}}(n("../tree")),function(e){e.Dimension=function(n,i){this.value=parseFloat(n),this.unit=i&&i instanceof e.Unit?i:new e.Unit(i?[i]:t)},e.Dimension.prototype={type:"Dimension",accept:function(e){this.unit=e.visit(this.unit)},eval:function(){return this},toColor:function(){return new e.Color([this.value,this.value,this.value])},toCSS:function(e){if(e&&e.strictUnits&&!this.unit.isSingular())throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString());var t=this.value,n=String(t);if(0!==t&&1e-6>t&&t>-1e-6&&(n=t.toFixed(20).replace(/0+$/,"")),e&&e.compress){if(0===t&&!this.unit.isAngle())return n;t>0&&1>t&&(n=n.substr(1))}return n+this.unit.toCSS(e)},operate:function(t,n,i){var r=e.operate(t,n,this.value,i.value),s=this.unit.clone();if("+"===n||"-"===n){if(0===s.numerator.length&&0===s.denominator.length)s.numerator=i.unit.numerator.slice(0),s.denominator=i.unit.denominator.slice(0);else if(0!=i.unit.numerator.length||0!=s.denominator.length){if(i=i.convertTo(this.unit.usedUnits()),t.strictUnits&&i.unit.toString()!==s.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+s.toString()+"' and '"+i.unit.toString()+"'.");r=e.operate(t,n,this.value,i.value)}}else"*"===n?(s.numerator=s.numerator.concat(i.unit.numerator).sort(),s.denominator=s.denominator.concat(i.unit.denominator).sort(),s.cancel()):"/"===n&&(s.numerator=s.numerator.concat(i.unit.denominator).sort(),s.denominator=s.denominator.concat(i.unit.numerator).sort(),s.cancel());return new e.Dimension(r,s)},compare:function(t){if(t instanceof e.Dimension){var n=this.unify(),i=t.unify(),r=n.value,s=i.value;return s>r?-1:r>s?1:i.unit.isEmpty()||0===n.unit.compare(i.unit)?0:-1}return-1},unify:function(){return this.convertTo({length:"m",duration:"s",angle:"rad"})},convertTo:function(t){var n,i,r,s,o=this.value,a=this.unit.clone(),u={};if("string"==typeof t){for(n in e.UnitConversions)e.UnitConversions[n].hasOwnProperty(t)&&(u={},u[n]=t);t=u}for(i in t)t.hasOwnProperty(i)&&(s=t[i],r=e.UnitConversions[i],a.map(function(e,t){return r.hasOwnProperty(e)?(t?o/=r[e]/r[s]:o*=r[e]/r[s],s):e}));return a.cancel(),new e.Dimension(o,a)}},e.UnitConversions={length:{m:1,cm:.01,mm:.001,"in":.0254,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}},e.Unit=function(e,t,n){this.numerator=e?e.slice(0).sort():[],this.denominator=t?t.slice(0).sort():[],this.backupUnit=n},e.Unit.prototype={type:"Unit",clone:function(){return new e.Unit(this.numerator.slice(0),this.denominator.slice(0),this.backupUnit)},toCSS:function(e){return this.numerator.length>=1?this.numerator[0]:this.denominator.length>=1?this.denominator[0]:e&&e.strictUnits||!this.backupUnit?"":this.backupUnit},toString:function(){var e,t=this.numerator.join("*");for(e=0;e0)for(t=0;r>t;t++)this.numerator.push(e);else if(0>r)for(t=0;-r>t;t++)this.denominator.push(e)}0===this.numerator.length&&0===this.denominator.length&&n&&(this.backupUnit=n),this.numerator.sort(),this.denominator.sort()}}}(n("../tree")),function(e){e.Directive=function(t,n){this.name=t,Array.isArray(n)?(this.ruleset=new e.Ruleset([],n),this.ruleset.allowImports=!0):this.value=n},e.Directive.prototype={type:"Directive",accept:function(e){this.ruleset=e.visit(this.ruleset),this.value=e.visit(this.value)},toCSS:function(e){return this.ruleset?(this.ruleset.root=!0,this.name+(e.compress?"{":" {\n ")+this.ruleset.toCSS(e).trim().replace(/\n/g,"\n ")+(e.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(t){var n=this;return this.ruleset&&(t.frames.unshift(this),n=new e.Directive(this.name),n.ruleset=this.ruleset.eval(t),t.frames.shift()),n},variable:function(t){return e.Ruleset.prototype.variable.call(this.ruleset,t)},find:function(){return e.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return e.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(n("../tree")),function(e){e.Element=function(t,n,i){this.combinator=t instanceof e.Combinator?t:new e.Combinator(t),this.value="string"==typeof n?n.trim():n?n:"",this.index=i},e.Element.prototype={type:"Element",accept:function(e){this.combinator=e.visit(this.combinator),this.value=e.visit(this.value)},eval:function(t){return new e.Element(this.combinator,this.value.eval?this.value.eval(t):this.value,this.index)},toCSS:function(e){var t=this.value.toCSS?this.value.toCSS(e):this.value;return""==t&&"&"==this.combinator.value.charAt(0)?"":this.combinator.toCSS(e||{})+t}},e.Attribute=function(e,t,n){this.key=e,this.op=t,this.value=n},e.Attribute.prototype={type:"Attribute",accept:function(e){this.value=e.visit(this.value)},eval:function(t){return new e.Attribute(this.key.eval?this.key.eval(t):this.key,this.op,this.value&&this.value.eval?this.value.eval(t):this.value)},toCSS:function(e){var t=this.key.toCSS?this.key.toCSS(e):this.key;return this.op&&(t+=this.op,t+=this.value.toCSS?this.value.toCSS(e):this.value),"["+t+"]"}},e.Combinator=function(e){this.value=" "===e?" ":e?e.trim():""},e.Combinator.prototype={type:"Combinator",toCSS:function(e){return{"":""," ":" ",":":" :","+":e.compress?"+":" + ","~":e.compress?"~":" ~ ",">":e.compress?">":" > ","|":e.compress?"|":" | "}[this.value]}}}(n("../tree")),function(e){e.Expression=function(e){this.value=e},e.Expression.prototype={type:"Expression",accept:function(e){this.value=e.visit(this.value)},eval:function(t){var n,i=this.parens&&!this.parensInOp,r=!1;return i&&t.inParenthesis(),this.value.length>1?n=new e.Expression(this.value.map(function(e){return e.eval(t)})):1===this.value.length?(this.value[0].parens&&!this.value[0].parensInOp&&(r=!0),n=this.value[0].eval(t)):n=this,i&&t.outOfParenthesis(),this.parens&&this.parensInOp&&!t.isMathOn()&&!r&&(n=new e.Paren(n)),n},toCSS:function(e){return this.value.map(function(t){return t.toCSS?t.toCSS(e):""}).join(" ")},throwAwayComments:function(){this.value=this.value.filter(function(t){return!(t instanceof e.Comment)})}}}(n("../tree")),function(e){e.Extend=function(e,t,n){switch(this.selector=e,this.option=t,this.index=n,t){case"all":this.allowBefore=!0,this.allowAfter=!0;break;default:this.allowBefore=!1,this.allowAfter=!1}},e.Extend.prototype={type:"Extend",accept:function(e){this.selector=e.visit(this.selector)},eval:function(t){return new e.Extend(this.selector.eval(t),this.option,this.index)},clone:function(){return new e.Extend(this.selector,this.option,this.index)},findSelfSelectors:function(e){var t,n=[];for(t=0;t1){var i=this.emptySelectors();n=new e.Ruleset(i,t.mediaBlocks),n.multiMedia=!0}return delete t.mediaBlocks,delete t.mediaPath,n},evalNested:function(t){var n,i,r=t.mediaPath.concat([this]);for(n=0;n0;n--)t.splice(n,0,new e.Anonymous("and"));return new e.Expression(t)})),new e.Ruleset([],[])},permute:function(e){if(0===e.length)return[];if(1===e.length)return e[0];for(var t=[],n=this.permute(e.slice(1)),i=0;i0){for(l=!0,o=0;othis.params.length)return!1;if(this.required>0&&i>this.params.length)return!1}n=Math.min(i,this.arity);for(var r=0;n>r;r++)if(!this.params[r].name&&!this.params[r].variadic&&e[r].value.eval(t).toCSS()!=this.params[r].value.eval(t).toCSS())return!1;return!0}}}(n("../tree")),function(e){e.Negative=function(e){this.value=e},e.Negative.prototype={type:"Negative",accept:function(e){this.value=e.visit(this.value)},toCSS:function(e){return"-"+this.value.toCSS(e)},eval:function(t){return t.isMathOn()?new e.Operation("*",[new e.Dimension(-1),this.value]).eval(t):new e.Negative(this.value.eval(t))}}}(n("../tree")),function(e){e.Operation=function(e,t,n){this.op=e.trim(),this.operands=t,this.isSpaced=n},e.Operation.prototype={type:"Operation",accept:function(e){this.operands=e.visit(this.operands)},eval:function(t){var n,i=this.operands[0].eval(t),r=this.operands[1].eval(t);if(t.isMathOn()){if(i instanceof e.Dimension&&r instanceof e.Color){if("*"!==this.op&&"+"!==this.op)throw{type:"Operation",message:"Can't substract or divide a color from a number"};n=r,r=i,i=n}if(!i.operate)throw{type:"Operation",message:"Operation on an invalid type"};return i.operate(t,this.op,r)}return new e.Operation(this.op,[i,r],this.isSpaced)},toCSS:function(){var e=this.isSpaced?" ":"";return this.operands[0].toCSS()+e+this.op+e+this.operands[1].toCSS()}},e.operate=function(e,t,n,i){switch(t){case"+":return n+i;case"-":return n-i;case"*":return n*i;case"/":return n/i}}}(n("../tree")),function(e){e.Paren=function(e){this.value=e},e.Paren.prototype={type:"Paren",accept:function(e){this.value=e.visit(this.value)},toCSS:function(e){return"("+this.value.toCSS(e).trim()+")"},eval:function(t){return new e.Paren(this.value.eval(t))}}}(n("../tree")),function(e){e.Quoted=function(e,t,n,i,r){this.escaped=n,this.value=t||"",this.quote=e.charAt(0),this.index=i,this.currentFileInfo=r},e.Quoted.prototype={type:"Quoted",toCSS:function(){return this.escaped?this.value:this.quote+this.value+this.quote},eval:function(t){var n=this,i=this.value.replace(/`([^`]+)`/g,function(i,r){return new e.JavaScript(r,n.index,!0).eval(t).value}).replace(/@\{([\w-]+)\}/g,function(i,r){var s=new e.Variable("@"+r,n.index,n.currentFileInfo).eval(t,!0);return s instanceof e.Quoted?s.value:s.toCSS()});return new e.Quoted(this.quote+i+this.quote,i,this.escaped,this.index)},compare:function(e){if(!e.toCSS)return-1;var t=this.toCSS(),n=e.toCSS();return t===n?0:n>t?-1:1}}}(n("../tree")),function(e){e.Rule=function(t,n,i,r,s,o){this.name=t,this.value=n instanceof e.Value?n:new e.Value([n]),this.important=i?" "+i.trim():"",this.index=r,this.currentFileInfo=s,this.inline=o||!1,this.variable="@"===t.charAt(0)?!0:!1},e.Rule.prototype={type:"Rule",accept:function(e){this.value=e.visit(this.value)},toCSS:function(e){if(this.variable)return"";try{return this.name+(e.compress?":":": ")+this.value.toCSS(e)+this.important+(this.inline?"":";")}catch(t){throw t.index=this.index,t.filename=this.currentFileInfo.filename,t}},eval:function(t){var n=!1;"font"===this.name&&t.strictMath===!1&&(n=!0,t.strictMath=!0);try{return new e.Rule(this.name,this.value.eval(t),this.important,this.index,this.currentFileInfo,this.inline)}finally{n&&(t.strictMath=!1)}},makeImportant:function(){return new e.Rule(this.name,this.value,"!important",this.index,this.currentFileInfo,this.inline)}}}(n("../tree")),function(e){e.Ruleset=function(e,t,n){this.selectors=e,this.rules=t,this._lookups={},this.strictImports=n},e.Ruleset.prototype={type:"Ruleset",accept:function(e){this.selectors=e.visit(this.selectors),this.rules=e.visit(this.rules)},eval:function(t){var n,i=this.selectors&&this.selectors.map(function(e){return e.eval(t)}),r=new e.Ruleset(i,this.rules.slice(0),this.strictImports);r.originalRuleset=this,r.root=this.root,r.firstRoot=this.firstRoot,r.allowImports=this.allowImports,this.debugInfo&&(r.debugInfo=this.debugInfo),t.frames.unshift(r),t.selectors||(t.selectors=[]),t.selectors.unshift(this.selectors),(r.root||r.allowImports||!r.strictImports)&&r.evalImports(t);for(var s=0;ss.selectors[o].elements.length?Array.prototype.push.apply(r,s.find(new e.Selector(t.elements.slice(1)),n)):r.push(s);break}}),this._lookups[s]=r)},toCSS:function(t){for(var n,i,r,s=[],o=[],a=[],u=[],l=0;l0){i=e.debugInfo(t,this),n=this.paths.map(function(e){return e.map(function(e){return e.toCSS(t)}).join("").trim()}).join(t.compress?",":",\n");for(var l=o.length-1;l>=0;l--)("/*"===o[l].slice(0,2)||-1===a.indexOf(o[l]))&&a.unshift(o[l]);o=a,s.push(i+n+(t.compress?"{":" {\n ")+o.join(t.compress?"":"\n ")+(t.compress?"}":"\n}\n"))}return s.push(u),s.join("")+(t.compress?"\n":"")},joinSelectors:function(e,t,n){for(var i=0;i0&&this.mergeElementsOnToSelectors(g,u),s=0;s0&&(c[0].elements=c[0].elements.slice(0),c[0].elements.push(new e.Element(l.combinator,"",0))),b.push(c);else for(o=0;o0?(f=c.slice(0),d=f.pop(),m=new e.Selector(d.elements.slice(0),i.extendList),v=!1):m=new e.Selector([],i.extendList),h.length>1&&(p=p.concat(h.slice(1))),h.length>0&&(v=!1,m.elements.push(new e.Element(l.combinator,h[0].elements[0].value,0)),m.elements=m.elements.concat(h[0].elements.slice(1))),v||f.push(m),f=f.concat(p),b.push(f);u=b,g=[]}for(g.length>0&&this.mergeElementsOnToSelectors(g,u),r=0;r0&&t.push(u[r])}else if(n.length>0)for(r=0;r0?r[r.length-1]=new e.Selector(r[r.length-1].elements.concat(t),r[r.length-1].extendList):r.push(new e.Selector(t))}}}(n("../tree")),function(e){e.Selector=function(e,t){this.elements=e,this.extendList=t||[]},e.Selector.prototype={type:"Selector",accept:function(e){this.elements=e.visit(this.elements),this.extendList=e.visit(this.extendList)},match:function(e){var t,n,i,r,s=this.elements,o=s.length;if(t=e.elements.slice(e.elements.length&&"&"===e.elements[0].value?1:0),n=t.length,i=Math.min(o,n),0===n||n>o)return!1;for(r=0;i>r;r++)if(s[r].value!==t[r].value)return!1;return!0},eval:function(t){return new e.Selector(this.elements.map(function(e){return e.eval(t)}),this.extendList.map(function(e){return e.eval(t)}))},toCSS:function(e){return this._css?this._css:(this._css=""===this.elements[0].combinator.value?" ":"",this._css+=this.elements.map(function(t){return"string"==typeof t?" "+t.trim():t.toCSS(e)}).join(""),this._css)}}}(n("../tree")),function(e){e.UnicodeDescriptor=function(e){this.value=e},e.UnicodeDescriptor.prototype={type:"UnicodeDescriptor",toCSS:function(){return this.value},eval:function(){return this}}}(n("../tree")),function(e){e.URL=function(e,t){this.value=e,this.currentFileInfo=t},e.URL.prototype={type:"Url",accept:function(e){this.value=e.visit(this.value)},toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(t){var n,i=this.value.eval(t);return n=this.currentFileInfo&&this.currentFileInfo.rootpath,n&&"string"==typeof i.value&&t.isPathRelative(i.value)&&(i.quote||(n=n.replace(/[\(\)'"\s]/g,function(e){return"\\"+e})),i.value=n+i.value),new e.URL(i,null)}}}(n("../tree")),function(e){e.Value=function(e){this.value=e},e.Value.prototype={type:"Value",accept:function(e){this.value=e.visit(this.value)},eval:function(t){return 1===this.value.length?this.value[0].eval(t):new e.Value(this.value.map(function(e){return e.eval(t)}))},toCSS:function(e){return this.value.map(function(t){return t.toCSS(e)}).join(e.compress?",":", ")}}}(n("../tree")),function(e){e.Variable=function(e,t,n){this.name=e,this.index=t,this.currentFileInfo=n},e.Variable.prototype={type:"Variable",eval:function(t){var n,i,r=this.name;if(0==r.indexOf("@@")&&(r="@"+new e.Variable(r.slice(1)).eval(t).value),this.evaluating)throw{type:"Name",message:"Recursive variable definition for "+r,filename:this.currentFileInfo.file,index:this.index};if(this.evaluating=!0,n=e.find(t.frames,function(e){return(i=e.variable(r))?i.value.eval(t):void 0}))return this.evaluating=!1,n;throw{type:"Name",message:"variable "+r+" is undefined",filename:this.currentFileInfo.filename,index:this.index}}}}(n("../tree")),function(e){e.debugInfo=function(t,n){var i="";if(t.dumpLineNumbers&&!t.compress)switch(t.dumpLineNumbers){case"comments":i=e.debugInfo.asComment(n);break;case"mediaquery":i=e.debugInfo.asMediaQuery(n);break;case"all":i=e.debugInfo.asComment(n)+e.debugInfo.asMediaQuery(n)}return i},e.debugInfo.asComment=function(e){return"/* line "+e.debugInfo.lineNumber+", "+e.debugInfo.fileName+" */\n" },e.debugInfo.asMediaQuery=function(e){return"@media -sass-debug-info{filename{font-family:"+("file://"+e.debugInfo.fileName).replace(/([.:/\\])/g,function(e){return"\\"==e&&(e="/"),"\\"+e})+"}line{font-family:\\00003"+e.debugInfo.lineNumber+"}}\n"},e.find=function(e,t){for(var n,i=0;i1?"["+e.value.map(function(e){return e.toCSS(!1)}).join(", ")+"]":e.toCSS(!1)}}(n("./tree")),function(e){var t=["paths","optimization","files","contents","relativeUrls","strictImports","dumpLineNumbers","compress","processImports","syncImport","mime","currentFileInfo"];e.parseEnv=function(e){if(i(e,this,t),this.contents||(this.contents={}),this.files||(this.files={}),!this.currentFileInfo){var n=e&&e.filename||"input",r=n.replace(/[^\/\\]*$/,"");e&&(e.filename=null),this.currentFileInfo={filename:n,relativeUrls:this.relativeUrls,rootpath:e&&e.rootpath||"",currentDirectory:r,entryPath:r,rootFilename:n}}},e.parseEnv.prototype.toSheet=function(t){var n=new e.parseEnv(this);return n.href=t,n.type=this.mime,n};var n=["silent","verbose","compress","yuicompress","ieCompat","strictMath","strictUnits"];e.evalEnv=function(e,t){i(e,this,n),this.frames=t||[]},e.evalEnv.prototype.inParenthesis=function(){this.parensStack||(this.parensStack=[]),this.parensStack.push(!0)},e.evalEnv.prototype.outOfParenthesis=function(){this.parensStack.pop()},e.evalEnv.prototype.isMathOn=function(){return this.strictMath?this.parensStack&&this.parensStack.length:!0},e.evalEnv.prototype.isPathRelative=function(e){return!/^(?:[a-z-]+:|\/)/.test(e)};var i=function(e,t,n){if(e)for(var i=0;i100){var m="{unable to calculate}",v="{unable to calculate}";try{m=f[0].selfSelectors[0].toCSS(),v=f[0].selector.toCSS()}catch(d){}throw{message:"extend circular reference detected. One of the circular extends is currently:"+m+":extend("+v+")"}}return f.concat(p.doExtendChaining(f,n,i+1))}return f},inInheritanceChain:function(e,t){if(e===t)return!0;if(t.parents){if(this.inInheritanceChain(e,t.parents[0]))return!0;if(this.inInheritanceChain(e,t.parents[1]))return!0}return!1},visitRule:function(e,t){t.visitDeeper=!1},visitMixinDefinition:function(e,t){t.visitDeeper=!1},visitSelector:function(e,t){t.visitDeeper=!1},visitRuleset:function(e){if(!e.root){var t,n,i,r,s=this.allExtendsStack[this.allExtendsStack.length-1],o=[],a=this;for(i=0;i0&&c[u.matched].combinator.value!==o?u=null:u.matched++,u&&(u.finished=u.matched===c.length,u.finished&&!e.allowAfter&&(r+1u&&l>0&&(c[c.length-1].elements=c[c.length-1].elements.concat(n[u].elements.slice(l)),l=0,u++),c=c.concat(n.slice(u,a.pathIndex)),c.push(new e.Selector(s.elements.slice(l,a.index).concat([o]).concat(i.elements.slice(1)))),u=a.endPathIndex,l=a.endPathElementIndex,l>=s.elements.length&&(l=0,u++);return u0&&(c[c.length-1].elements=c[c.length-1].elements.concat(n[u].elements.slice(l)),l=0,u++),c=c.concat(n.slice(u,n.length))},visitRulesetOut:function(){},visitMedia:function(e){var t=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);t=t.concat(this.doExtendChaining(t,e.allExtends)),this.allExtendsStack.push(t)},visitMediaOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1},visitDirective:function(e){var t=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);t=t.concat(this.doExtendChaining(t,e.allExtends)),this.allExtendsStack.push(t)},visitDirectiveOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1}}}(n("./tree"));var b=/^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);if(d.env=d.env||("127.0.0.1"==location.hostname||"0.0.0.0"==location.hostname||"localhost"==location.hostname||location.port.length>0||b?"development":"production"),d.async=d.async||!1,d.fileAsync=d.fileAsync||!1,d.poll=d.poll||(b?1e3:1500),d.functions)for(var y in d.functions)d.tree.functions[y]=d.functions[y];var w=/!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);w&&(d.dumpLineNumbers=w[1]),d.watch=function(){return d.watchMode||(d.env="development",i()),this.watchMode=!0},d.unwatch=function(){return clearInterval(d.watchTimer),this.watchMode=!1},/!watch/.test(location.hash)&&d.watch();var S=null;if("development"!=d.env)try{S="undefined"==typeof e.localStorage?null:e.localStorage}catch(x){}var C=document.getElementsByTagName("link"),I=/^text\/(x-)?less$/;d.sheets=[];for(var k=0;k