/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*! 
CSSLint
Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/* 
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(r,n){typeof define==="function"&&define.amd?define("orion/Deferred",n):typeof exports==="object"?module.exports=n():(r.orion=r.orion||{},r.orion.Deferred=n())})(this,function(){function r(){for(var i;i=u.shift();)i();t=!1}function n(i){u.push(i);t||(t=!0,setTimeout(r,0))}function A(i){return function(){i.apply(void 0,arguments)}}function o(){function i(){for(var j;j=a.shift();){var c=j.deferred,h=d==="fulfilled"?"resolve":"reject";if(typeof j[h]==="function")try{var k=(0,j[h])(b),e=k&&(typeof k===
"object"||typeof k==="function")&&k.then;if(typeof e==="function")if(k===c.promise)c.reject(new TypeError);else{var g=k.cancel;typeof g==="function"?c._protected(u).parentCancel=g.bind(k):delete c._protected(u).parentCancel;e.call(k,A(c.resolve),A(c.reject),A(c.progress))}else c.resolve(k)}catch(i){c.reject(i)}else c[h](b)}}function c(c){delete k.parentCancel;d="rejected";b=c;a.length&&n(i)}function g(j){function e(a){return function(b){m||(m=!0,a(b))}}var m=!1;delete k.parentCancel;try{var q=j&&
(typeof j==="object"||typeof j==="function")&&j.then;if(typeof q==="function")if(j===h)c(new TypeError);else{d="assumed";var w=j&&j.cancel;if(typeof w!=="function"){var x=new o,j=x.promise;try{q(x.resolve,x.reject,x.progress)}catch(s){x.reject(s)}w=j.cancel;q=j.then}b=j;q.call(j,e(g),e(c));k.parentCancel=w.bind(j)}else d="fulfilled",b=j,a.length&&n(i)}catch(G){e(c)(G)}}function e(){var a=k.parentCancel;if(a)delete k.parentCancel,a();else if(!d)a=Error("Cancel"),a.name="Cancel",c(a)}var b,d,a=[],h=
this,k={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==u)throw Error("protected");return k}});this.resolve=function(a){d||g(a);return h};this.reject=function(a){d||c(a);return h};this.progress=function(b){d||a.forEach(function(a){if(a.progress)try{a.progress(b)}catch(c){}});return h.promise};this.cancel=function(){k.parentCancel?setTimeout(e,0):e();return h};this.then=function(b,c,k){b={resolve:b,reject:c,progress:k,deferred:new o};a.push(b);b.deferred._protected(u).parentCancel=
h.promise.cancel.bind(h);(d==="fulfilled"||d==="rejected")&&n(i);return b.deferred.promise};this.promise={then:h.then,cancel:h.cancel}}var u=[],t=!1;o.all=function(i,c){function g(c,j){a||(d[c]=j,--b===0&&h.resolve(d))}function e(b,d){if(!a){if(c)try{g(b,c(d));return}catch(e){d=e}h.reject(d)}}var b=i.length,d=[],a=!1,h=new o;h.then(void 0,function(){a=!0;i.forEach(function(a){a.cancel&&a.cancel()})});b===0?h.resolve(d):i.forEach(function(a,b){a.then(g.bind(void 0,b),e.bind(void 0,b))});return h.promise};
o.when=function(i,c,g,e){var b;if(!(i&&typeof i.then==="function"))b=new o,b.resolve(i),i=b.promise;return i.then(c,g,e)};return o});
(function(r,n){typeof define==="function"&&define.amd?define("orion/plugin",["orion/Deferred"],n):typeof exports==="object"?module.exports=n(require("orion/Deferred")):(r.orion=r.orion||{},r.orion.PluginProvider=n(r.orion.Deferred))})(this,function(r){function n(n,o){this.__objectId=n;this.__methods=o}return function(A){function o(a){h&&(typeof ArrayBuffer==="undefined"&&(a=JSON.stringify(a)),h===self?h.postMessage(a):h.postMessage(a,"*"))}function u(){var a=[];Object.keys(x).forEach(function(b){var c=
x[b];a.push({serviceId:b,names:c.names,methods:c.methods,properties:c.properties})});return{headers:d||{},services:a}}function t(a,b){if(b&&b instanceof XMLHttpRequest){var c,d;try{c=b.status,d=b.statusText}catch(h){c=0,d=""}return{status:c||0,statusText:d}}return b}function i(a){var b=a?JSON.parse(JSON.stringify(a,t)):a;if(a instanceof Error)b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name;return b}function c(b){if(!h)return(new r).reject(Error("plugin not connected"));b.id=String(k++);
var c=new r;q[b.id]=c;c.then(null,function(c){a&&c instanceof Error&&c.name==="Cancel"&&s({requestId:b.id,method:"cancel",params:c.message?[c.message]:[]})});var d=Object.prototype.toString;b.params.forEach(function(a,h){if(d.call(a)==="[object Object]"&&!(a instanceof n)){var e,k;for(e in a)d.call(a[e])==="[object Function]"&&(k=k||[],k.push(e));if(k){var g=j++;w[g]=a;e=function(){delete w[g]};c.then(e,e);b.params[h]=new n(g,k)}}});s(b);return c.promise}function g(a,b){a||a===0?s({id:a,result:null,
error:b}):console.log(b)}function e(a,b,d,h){h.forEach(function(a,b){if(a&&typeof a.__objectId!=="undefined"){var d={};a.__methods.forEach(function(b){d[b]=function(){return c({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});h[b]=d}});var e=typeof a===void 0?null:{id:a,result:null,error:null};try{var j=d.apply(b,h);if(e)j&&typeof j.then==="function"?(m[a]=j,j.then(function(b){delete m[a];e.result=b;s(e)},function(b){if(m[a])delete m[a],e.error=i(b),s(e)},function(){s({responseId:a,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(e.result=j,s(e))}catch(k){if(e)e.error=i(k),s(e)}}function b(a){if(a.source===h){a=typeof a.data!=="string"?a.data:JSON.parse(a.data);try{if(a.method){var b=a.method,c=a.params||[];if("serviceId"in a){var d=x[a.serviceId];d||g(a.id,"service not found");d=d.implementation;b in d?e(a.id,d,d[b],c):g(a.id,"method not found")}else if("objectId"in a){var j=w[a.objectId];j||g(a.id,"object not found");!b in j?e(a.id,j,j[b],c):g(a.id,"method not found")}else if("requestId"in
a){var k=m[a.requestId];k&&b==="cancel"&&k.cancel&&k.cancel.apply(k,c)}else if("responseId"in a){var v=q[a.responseId];v&&b==="progress"&&v.progress&&v.progress.apply(v,c)}else throw Error("Bad method: "+a.method);}else{var i=q[String(a.id)];delete q[String(a.id)];a.error?i.reject(a.error):i.resolve(a.result)}}catch(s){console.log("Plugin._messageHandler "+s)}}}var d=A,a=!1,h=null,k=0,j=0,v=0,m={},q={},w={},x={},s=o;this.updateHeaders=function(b){if(a)throw Error("Cannot update headers. Plugin Provider is connected");
d=b};this.registerServiceProvider=this.registerService=function(b,c,d){if(a)throw Error("Cannot register service. Plugin Provider is connected");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var e=null,h=[];for(e in c)typeof c[e]==="function"&&h.push(e);x[v++]={names:b,methods:h,implementation:c,properties:d||{},listeners:{}}};this.connect=function(c,d){if(!a){if(typeof window==="undefined")h=self;else if(window!==window.parent)h=window.parent;else if(window.opener!==null)h=window.opener;else{d&&
d("No valid plugin target");return}addEventListener("message",b,!1);var e={method:"plugin",params:[u()]};o(e);a=!0}c&&c()};this.disconnect=function(){a&&(removeEventListener("message",b),h=null,a=!1)}}});
var CSSLint=function(){var r,n,A,o,u;function t(c,g){this.messages=[];this.stats=[];this.lines=c;this.ruleset=g}(function(){function c(){this._listeners={}}function g(a){this._input=a.replace(/\n\r?/g,"\n");this._col=this._line=1;this._cursor=0}function e(a,b,c){this.col=c;this.line=b;this.message=a}function b(a,b,c,d){this.col=c;this.line=b;this.text=a;this.type=d}function d(a,b){this._reader=a?new g(a.toString()):null;this._token=null;this._tokenData=b;this._lt=[];this._ltIndex=0;this._ltIndexCache=
[]}c.prototype={constructor:c,addListener:function(a,b){this._listeners[a]||(this._listeners[a]=[]);this._listeners[a].push(b)},fire:function(a){typeof a=="string"&&(a={type:a});if(typeof a.target!="undefined")a.target=this;if(typeof a.type=="undefined")throw Error("Event object missing 'type' property.");if(this._listeners[a.type])for(var b=this._listeners[a.type].concat(),c=0,d=b.length;c<d;c++)b[c].call(this,a)},removeListener:function(a,b){if(this._listeners[a])for(var c=this._listeners[a],d=
0,e=c.length;d<e;d++)if(c[d]===b){c.splice(d,1);break}}};g.prototype={constructor:g,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(a){var b=null;this._cursor<this._input.length&&(b=this._input.charAt(this._cursor+(typeof a=="undefined"?1:a)-1));return b},read:function(){var a=null;if(this._cursor<this._input.length)this._input.charAt(this._cursor)=="\n"?(this._line++,this._col=1):this._col++,a=this._input.charAt(this._cursor++);
return a},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){if(this._bookmark)this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark},readTo:function(a){for(var b="",c;b.length<a.length||b.lastIndexOf(a)!=b.length-a.length;)if(c=this.read())b+=c;else throw Error('Expected "'+a+'" at line '+this._line+", col "+this._col+".");return b},readWhile:function(a){for(var b="",c=this.read();c!==
null&&a(c);)b+=c,c=this.read();return b},readMatch:function(a){var b=this._input.substring(this._cursor),c=null;typeof a=="string"?b.indexOf(a)===0&&(c=this.readCount(a.length)):a instanceof RegExp&&a.test(b)&&(c=this.readCount(RegExp.lastMatch.length));return c},readCount:function(a){for(var b="";a--;)b+=this.read();return b}};e.prototype=Error();b.fromToken=function(a){return new b(a.value,a.startLine,a.startCol)};b.prototype={constructor:b,valueOf:function(){return this.toString()},toString:function(){return this.text}};
d.createTokenData=function(a){var b=[],c={},a=a.concat([]),d=0,e=a.length+1;a.UNKNOWN=-1;for(a.unshift({name:"EOF"});d<e;d++)b.push(a[d].name),a[a[d].name]=d,a[d].text&&(c[a[d].text]=d);a.name=function(a){return b[a]};a.type=function(a){return c[a]};return a};d.prototype={constructor:d,match:function(a,b){a instanceof Array||(a=[a]);for(var c=this.get(b),d=0,e=a.length;d<e;)if(c==a[d++])return!0;this.unget();return!1},mustMatch:function(a,b){var c;a instanceof Array||(a=[a]);if(!this.match.apply(this,
arguments))throw c=this.LT(1),new e("Expected "+this._tokenData[a[0]].name+" at line "+c.startLine+", col "+c.startCol+".",c.startLine,c.startCol);},advance:function(a,b){for(;this.LA(0)!=0&&!this.match(a,b);)this.get();return this.LA(0)},get:function(a){var b=this._tokenData,c=0,d,e;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){c++;this._token=this._lt[this._ltIndex++];for(e=b[this._token.type];e.channel!==void 0&&a!==e.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],
e=b[this._token.type],c++;if((e.channel===void 0||a===e.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(c),this._token.type}d=this._getToken();if(d.type>-1&&!b[d.type].hide)d.channel=b[d.type].channel,this._token=d,this._lt.push(d),this._ltIndexCache.push(this._lt.length-this._ltIndex+c),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length;return(e=b[d.type])&&(e.hide||e.channel!==void 0&&a!==e.channel)?this.get(a):
d.type},LA:function(a){var b=a,c;if(a>0){if(a>5)throw Error("Too much lookahead.");for(;b;)c=this.get(),b--;for(;b<a;)this.unget(),b++}else if(a<0)if(this._lt[this._ltIndex+a])c=this._lt[this._ltIndex+a].type;else throw Error("Too much lookbehind.");else c=this._token.type;return c},LT:function(a){this.LA(a);return this._lt[this._ltIndex+a-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(a){return a<0||a>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[a].name},
tokenType:function(a){return this._tokenData[a]||-1},unget:function(){if(this._ltIndexCache.length)this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1];else throw Error("Too much lookahead.");}};n=e;A=b;o=c;u=d})();(function(){function c(a,c,d){p.call(this,a,c,d,b.COMBINATOR_TYPE);this.type="unknown";if(/^\s+$/.test(a))this.type="descendant";else if(a==">")this.type="child";else if(a=="+")this.type="adjacent-sibling";else if(a=="~")this.type="sibling"}function g(a,c){p.call(this,
"("+a+(c!==null?":"+c:"")+")",a.startLine,a.startCol,b.MEDIA_FEATURE_TYPE);this.name=a;this.value=c}function e(a,c,d,B,J){p.call(this,(a?a+" ":"")+(c?c+" ":"")+d.join(" and "),B,J,b.MEDIA_QUERY_TYPE);this.modifier=a;this.mediaType=c;this.features=d}function b(a){L.call(this);this.options=a||{};this._tokenStream=null}function d(a,c,d,B){p.call(this,a,d,B,b.PROPERTY_NAME_TYPE);this.hack=c}function a(a,c,d){p.call(this,a.join(" "),c,d,b.PROPERTY_VALUE_TYPE);this.parts=a}function h(a,c,d){p.call(this,
a,c,d,b.PROPERTY_VALUE_PART_TYPE);this.type="unknown";if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(a))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case "em":case "rem":case "ex":case "px":case "cm":case "mm":case "in":case "pt":case "pc":this.type="length";break;case "deg":case "rad":case "grad":this.type="angle";break;case "ms":case "s":this.type="time";break;case "hz":case "khz":this.type="frequency";break;case "dpi":case "dpcm":this.type="resolution"}else if(/^([+\-]?[\d\.]+)%$/i.test(a))this.type=
"percentage",this.value=+RegExp.$1;else if(/^([+\-]?[\d\.]+)%$/i.test(a))this.type="percentage",this.value=+RegExp.$1;else if(/^([+\-]?\d+)$/i.test(a))this.type="integer",this.value=+RegExp.$1;else if(/^([+\-]?[\d\.]+)$/i.test(a))this.type="number",this.value=+RegExp.$1;else if(/^#([a-f0-9]{3,6})/i.test(a))this.type="color",a=RegExp.$1,a.length==3?(this.red=parseInt(a.charAt(0)+a.charAt(0),16),this.green=parseInt(a.charAt(1)+a.charAt(1),16),this.blue=parseInt(a.charAt(2)+a.charAt(2),16)):(this.red=
parseInt(a.substring(0,2),16),this.green=parseInt(a.substring(2,4),16),this.blue=parseInt(a.substring(4,6),16));else if(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(a))this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3;else if(/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(a))this.type="color",this.red=+RegExp.$1*255/100,this.green=+RegExp.$2*255/100,this.blue=+RegExp.$3*255/100;else if(/^url\(["']?([^\)"']+)["']?\)/i.test(a))this.type="uri",this.uri=RegExp.$1;
else if(/^["'][^"']*["']/.test(a))this.type="string",this.value=eval(a);else if(M[a.toLowerCase()])this.type="color",a=M[a.toLowerCase()].substring(1),this.red=parseInt(a.substring(0,2),16),this.green=parseInt(a.substring(2,4),16),this.blue=parseInt(a.substring(4,6),16);else if(/^[\,\/]$/.test(a))this.type="operator",this.value=a;else if(/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(a))this.type="identifier",this.value=a}function k(a,c,d){p.call(this,a.join(" "),c,d,b.SELECTOR_TYPE);this.parts=
a;this.specificity=m.calculate(this)}function j(a,c,d,B,J){p.call(this,d,B,J,b.SELECTOR_PART_TYPE);this.elementName=a;this.modifiers=c}function i(a,c,d,B){p.call(this,a,d,B,b.SELECTOR_SUB_PART_TYPE);this.type=c;this.args=[]}function m(a,b,c,B){this.a=a;this.b=b;this.c=c;this.d=B}function q(a){return a!=null&&/\d/.test(a)}function w(a){return a!=null&&/\s/.test(a)}function x(a){return a!=null&&N.test(a)}function s(a){return a!=null&&/[a-z_\u0080-\uFFFF\\]/i.test(a)}function G(a){return a!=null&&(s(a)||
/[0-9\-\\]/.test(a))}function D(a){t.call(this,a,f)}function E(a,b,c){this.col=c;this.line=b;this.message=a}var L=o,t=u,C=n,p=A,M={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",
cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",
forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",
lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};c.prototype=new p;c.prototype.constructor=c;g.prototype=new p;g.prototype.constructor=g;e.prototype=new p;e.prototype.constructor=e;b.DEFAULT_TYPE=
0;b.COMBINATOR_TYPE=1;b.MEDIA_FEATURE_TYPE=2;b.MEDIA_QUERY_TYPE=3;b.PROPERTY_NAME_TYPE=4;b.PROPERTY_VALUE_TYPE=5;b.PROPERTY_VALUE_PART_TYPE=6;b.SELECTOR_TYPE=7;b.SELECTOR_PART_TYPE=8;b.SELECTOR_SUB_PART_TYPE=9;b.prototype=function(){var l=new L,I,y={constructor:b,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var a=this._tokenStream,
b,c;this.fire("startstylesheet");this._charset();for(this._skipCruft();a.peek()==f.IMPORT_SYM;)this._import(),this._skipCruft();for(;a.peek()==f.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(c=a.peek();c>f.EOF;){try{switch(c){case f.MEDIA_SYM:this._media();this._skipCruft();break;case f.PAGE_SYM:this._page();this._skipCruft();break;case f.FONT_FACE_SYM:this._font_face();this._skipCruft();break;case f.KEYFRAMES_SYM:this._keyframes();this._skipCruft();break;case f.S:this._readWhitespace();
break;default:if(!this._ruleset())switch(c){case f.CHARSET_SYM:throw b=a.LT(1),this._charset(!1),new C("@charset not allowed here.",b.startLine,b.startCol);case f.IMPORT_SYM:throw b=a.LT(1),this._import(!1),new C("@import not allowed here.",b.startLine,b.startCol);case f.NAMESPACE_SYM:throw b=a.LT(1),this._namespace(!1),new C("@namespace not allowed here.",b.startLine,b.startCol);default:a.get(),this._unexpectedToken(a.token())}}}catch(d){if(d instanceof C&&!this.options.strict)this.fire({type:"error",
error:d,message:d.message,line:d.line,col:d.col});else throw d;}c=a.peek()}c!=f.EOF&&this._unexpectedToken(a.token());this.fire("endstylesheet")},_charset:function(a){var b=this._tokenStream,c,d,l;if(b.match(f.CHARSET_SYM))d=b.token().startLine,l=b.token().startCol,this._readWhitespace(),b.mustMatch(f.STRING),c=b.token(),c=c.value,this._readWhitespace(),b.mustMatch(f.SEMICOLON),a!==!1&&this.fire({type:"charset",charset:c,line:d,col:l})},_import:function(a){var b=this._tokenStream,c,d,l=[];b.mustMatch(f.IMPORT_SYM);
d=b.token();this._readWhitespace();b.mustMatch([f.STRING,f.URI]);c=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();l=this._media_query_list();b.mustMatch(f.SEMICOLON);this._readWhitespace();a!==!1&&this.fire({type:"import",uri:c,media:l,line:d.startLine,col:d.startCol})},_namespace:function(a){var b=this._tokenStream,c,d,l,e;b.mustMatch(f.NAMESPACE_SYM);c=b.token().startLine;d=b.token().startCol;this._readWhitespace();if(b.match(f.IDENT))l=b.token().value,this._readWhitespace();
b.mustMatch([f.STRING,f.URI]);e=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();b.mustMatch(f.SEMICOLON);this._readWhitespace();a!==!1&&this.fire({type:"namespace",prefix:l,uri:e,line:c,col:d})},_media:function(){var a=this._tokenStream,b,c,d;a.mustMatch(f.MEDIA_SYM);b=a.token().startLine;c=a.token().startCol;this._readWhitespace();d=this._media_query_list();a.mustMatch(f.LBRACE);this._readWhitespace();for(this.fire({type:"startmedia",media:d,line:b,col:c});;)if(a.peek()==
f.PAGE_SYM)this._page();else if(!this._ruleset())break;a.mustMatch(f.RBRACE);this._readWhitespace();this.fire({type:"endmedia",media:d,line:b,col:c})},_media_query_list:function(){var a=this._tokenStream,b=[];this._readWhitespace();for((a.peek()==f.IDENT||a.peek()==f.LPAREN)&&b.push(this._media_query());a.match(f.COMMA);)this._readWhitespace(),b.push(this._media_query());return b},_media_query:function(){var a=this._tokenStream,b=null,c=null,d=null,l=[];a.match(f.IDENT)&&(c=a.token().value.toLowerCase(),
c!="only"&&c!="not"?(a.unget(),c=null):d=a.token());this._readWhitespace();a.peek()==f.IDENT?(b=this._media_type(),d===null&&(d=a.token())):a.peek()==f.LPAREN&&(d===null&&(d=a.LT(1)),l.push(this._media_expression()));if(b===null&&l.length===0)return null;else for(this._readWhitespace();a.match(f.IDENT);)a.token().value.toLowerCase()!="and"&&this._unexpectedToken(a.token()),this._readWhitespace(),l.push(this._media_expression());return new e(c,b,l,d.startLine,d.startCol)},_media_type:function(){return this._media_feature()},
_media_expression:function(){var a=this._tokenStream,b=null,c,d=null;a.mustMatch(f.LPAREN);b=this._media_feature();this._readWhitespace();a.match(f.COLON)&&(this._readWhitespace(),c=a.LT(1),d=this._expression());a.mustMatch(f.RPAREN);this._readWhitespace();return new g(b,d?new p(d,c.startLine,c.startCol):null)},_media_feature:function(){var a=this._tokenStream;a.mustMatch(f.IDENT);return p.fromToken(a.token())},_page:function(){var a=this._tokenStream,b,c,d=null,l=null;a.mustMatch(f.PAGE_SYM);b=a.token().startLine;
c=a.token().startCol;this._readWhitespace();if(a.match(f.IDENT))d=a.token().value,d.toLowerCase()==="auto"&&this._unexpectedToken(a.token());a.peek()==f.COLON&&(l=this._pseudo_page());this._readWhitespace();this.fire({type:"startpage",id:d,pseudo:l,line:b,col:c});this._readDeclarations(!0,!0);this.fire({type:"endpage",id:d,pseudo:l,line:b,col:c})},_margin:function(){var a=this._tokenStream,b,c=this._margin_sym();return c?(b=a.token().startLine,a=a.token().startCol,this.fire({type:"startpagemargin",
margin:c,line:b,col:a}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:c,line:b,col:a}),!0):!1},_margin_sym:function(){var a=this._tokenStream;return a.match([f.TOPLEFTCORNER_SYM,f.TOPLEFT_SYM,f.TOPCENTER_SYM,f.TOPRIGHT_SYM,f.TOPRIGHTCORNER_SYM,f.BOTTOMLEFTCORNER_SYM,f.BOTTOMLEFT_SYM,f.BOTTOMCENTER_SYM,f.BOTTOMRIGHT_SYM,f.BOTTOMRIGHTCORNER_SYM,f.LEFTTOP_SYM,f.LEFTMIDDLE_SYM,f.LEFTBOTTOM_SYM,f.RIGHTTOP_SYM,f.RIGHTMIDDLE_SYM,f.RIGHTBOTTOM_SYM])?p.fromToken(a.token()):null},_pseudo_page:function(){var a=
this._tokenStream;a.mustMatch(f.COLON);a.mustMatch(f.IDENT);return a.token().value},_font_face:function(){var a=this._tokenStream,b;a.mustMatch(f.FONT_FACE_SYM);b=a.token().startLine;a=a.token().startCol;this._readWhitespace();this.fire({type:"startfontface",line:b,col:a});this._readDeclarations(!0);this.fire({type:"endfontface",line:b,col:a})},_operator:function(){var a=this._tokenStream,b=null;a.match([f.SLASH,f.COMMA])&&(b=a.token(),this._readWhitespace());return b?h.fromToken(b):null},_combinator:function(){var a=
this._tokenStream,b=null;a.match([f.PLUS,f.GREATER,f.TILDE])&&(a=a.token(),b=new c(a.value,a.startLine,a.startCol),this._readWhitespace());return b},_unary_operator:function(){var a=this._tokenStream;return a.match([f.MINUS,f.PLUS])?a.token().value:null},_property:function(){var a=this._tokenStream,b=null,c=null,l,e,j;if(a.peek()==f.STAR&&this.options.starHack)a.get(),l=a.token(),c=l.value,e=l.startLine,j=l.startCol;if(a.match(f.IDENT))l=a.token(),a=l.value,a.charAt(0)=="_"&&this.options.underscoreHack&&
(c="_",a=a.substring(1)),b=new d(a,c,e||l.startLine,j||l.startCol),this._readWhitespace();return b},_ruleset:function(){var a=this._tokenStream,b;try{b=this._selectors_group()}catch(c){if(c instanceof C&&!this.options.strict){if(this.fire({type:"error",error:c,message:c.message,line:c.line,col:c.col}),a=a.advance([f.RBRACE]),a!=f.RBRACE)throw c;}else throw c;return!0}b&&(this.fire({type:"startrule",selectors:b,line:b[0].line,col:b[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:b,
line:b[0].line,col:b[0].col}));return b},_selectors_group:function(){var a=this._tokenStream,b=[],c;c=this._selector();if(c!==null)for(b.push(c);a.match(f.COMMA);)this._readWhitespace(),c=this._selector(),c!==null?b.push(c):this._unexpectedToken(a.LT(1));return b.length?b:null},_selector:function(){var a=this._tokenStream,b=[],d=null,l=null,f=null,d=this._simple_selector_sequence();if(d===null)return null;b.push(d);do if(l=this._combinator(),l!==null)b.push(l),d=this._simple_selector_sequence(),d===
null?this._unexpectedToken(this.LT(1)):b.push(d);else if(this._readWhitespace())f=new c(a.token().value,a.token().startLine,a.token().startCol),l=this._combinator(),d=this._simple_selector_sequence(),d===null?l!==null&&this._unexpectedToken(a.LT(1)):(l!==null?b.push(l):b.push(f),b.push(d));else break;while(1);return new k(b,b[0].line,b[0].col)},_simple_selector_sequence:function(){var a=this._tokenStream,b=null,c=[],d="",l=[function(){return a.match(f.HASH)?new i(a.token().value,"id",a.token().startLine,
a.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],e=0,g=l.length,y=null,h,k;h=a.LT(1).startLine;k=a.LT(1).startCol;(b=this._type_selector())||(b=this._universal());for(b!==null&&(d+=b);;){if(a.peek()===f.S)break;for(;e<g&&y===null;)y=l[e++].call(this);if(y===null)if(d==="")return null;else break;else e=0,c.push(y),d+=y.toString(),y=null}return d!==""?new j(b,c,d,h,k):null},_type_selector:function(){var a=this._tokenStream,b=this._namespace_prefix(),c=this._element_name();
if(c){if(b)c.text=b+c.text,c.col-=b.length;return c}else return b&&(a.unget(),b.length>1&&a.unget()),null},_class:function(){var a=this._tokenStream;return a.match(f.DOT)?(a.mustMatch(f.IDENT),a=a.token(),new i("."+a.value,"class",a.startLine,a.startCol-1)):null},_element_name:function(){var a=this._tokenStream;return a.match(f.IDENT)?(a=a.token(),new i(a.value,"elementName",a.startLine,a.startCol)):null},_namespace_prefix:function(){var a=this._tokenStream,b="";if(a.LA(1)===f.PIPE||a.LA(2)===f.PIPE)a.match([f.IDENT,
f.STAR])&&(b+=a.token().value),a.mustMatch(f.PIPE),b+="|";return b.length?b:null},_universal:function(){var a=this._tokenStream,b="",c;(c=this._namespace_prefix())&&(b+=c);a.match(f.STAR)&&(b+="*");return b.length?b:null},_attrib:function(){var a=this._tokenStream,b=null,c,d;return a.match(f.LBRACKET)?(d=a.token(),b=d.value,b+=this._readWhitespace(),(c=this._namespace_prefix())&&(b+=c),a.mustMatch(f.IDENT),b+=a.token().value,b+=this._readWhitespace(),a.match([f.PREFIXMATCH,f.SUFFIXMATCH,f.SUBSTRINGMATCH,
f.EQUALS,f.INCLUDES,f.DASHMATCH])&&(b+=a.token().value,b+=this._readWhitespace(),a.mustMatch([f.IDENT,f.STRING]),b+=a.token().value,b+=this._readWhitespace()),a.mustMatch(f.RBRACKET),new i(b+"]","attribute",d.startLine,d.startCol)):null},_pseudo:function(){var a=this._tokenStream,b=null,c=":",d,l;if(a.match(f.COLON)){a.match(f.COLON)&&(c+=":");if(a.match(f.IDENT))b=a.token().value,d=a.token().startLine,l=a.token().startCol-c.length;else if(a.peek()==f.FUNCTION)d=a.LT(1).startLine,l=a.LT(1).startCol-
c.length,b=this._functional_pseudo();b&&(b=new i(c+b,"pseudo",d,l))}return b},_functional_pseudo:function(){var a=this._tokenStream,b=null;if(a.match(f.FUNCTION))b=a.token().value,b+=this._readWhitespace(),b+=this._expression(),a.mustMatch(f.RPAREN),b+=")";return b},_expression:function(){for(var a=this._tokenStream,b="";a.match([f.PLUS,f.MINUS,f.DIMENSION,f.NUMBER,f.STRING,f.IDENT,f.LENGTH,f.FREQ,f.ANGLE,f.TIME,f.RESOLUTION]);)b+=a.token().value,b+=this._readWhitespace();return b.length?b:null},
_negation:function(){var a=this._tokenStream,b,c,d="",l;b=null;if(a.match(f.NOT))d=a.token().value,b=a.token().startLine,c=a.token().startCol,d+=this._readWhitespace(),l=this._negation_arg(),d+=l,d+=this._readWhitespace(),a.match(f.RPAREN),d+=a.token().value,b=new i(d,"not",b,c),b.args.push(l);return b},_negation_arg:function(){var a=this._tokenStream,b=[this._type_selector,this._universal,function(){return a.match(f.HASH)?new i(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,
this._attrib,this._pseudo],c=null,d=0,l=b.length,e,y;e=a.LT(1).startLine;for(y=a.LT(1).startCol;d<l&&c===null;)c=b[d].call(this),d++;c===null&&this._unexpectedToken(a.LT(1));return c.type=="elementName"?new j(c,[],c.toString(),e,y):new j(null,[c],c.toString(),e,y)},_declaration:function(){var a=this._tokenStream,b=null,c=null,d=null,l=null,b=this._property();if(b!==null){a.mustMatch(f.COLON);this._readWhitespace();c=this._expr();(!c||c.length===0)&&this._unexpectedToken(a.LT(1));d=this._prio();try{this._validateProperty(b,
c)}catch(e){l=e}this.fire({type:"property",property:b,value:c,important:d,line:b.line,col:b.col,invalid:l});return!0}else return!1},_prio:function(){var a=this._tokenStream.match(f.IMPORTANT_SYM);this._readWhitespace();return a},_expr:function(){var b=[],c=null,c=null,c=this._term();if(c!==null){b.push(c);do if((c=this._operator())&&b.push(c),c=this._term(),c===null)break;else b.push(c);while(1)}return b.length>0?new a(b,b[0].startLine,b[0].startCol):null},_term:function(){var a=this._tokenStream,
b=null,c=null,d,l,b=this._unary_operator();if(b!==null)d=a.token().startLine,l=a.token().startCol;if(a.peek()==f.IE_FUNCTION&&this.options.ieFilters){if(c=this._ie_function(),b===null)d=a.token().startLine,l=a.token().startCol}else if(a.match([f.NUMBER,f.PERCENTAGE,f.LENGTH,f.ANGLE,f.TIME,f.FREQ,f.STRING,f.IDENT,f.URI,f.UNICODE_RANGE])){c=a.token().value;if(b===null)d=a.token().startLine,l=a.token().startCol;this._readWhitespace()}else if(c=this._hexcolor(),c===null){if(b===null)d=a.LT(1).startLine,
l=a.LT(1).startCol;c===null&&(c=a.LA(3)==f.EQUALS&&this.options.ieFilters?this._ie_function():this._function())}else if(b===null)d=a.token().startLine,l=a.token().startCol;return c!==null?new h(b!==null?b+c:c,d,l):null},_function:function(){var a=this._tokenStream,b=null,c=null;if(a.match(f.FUNCTION)){b=a.token().value;this._readWhitespace();c=this._expr();b+=c;if(this.options.ieFilters&&a.peek()==f.EQUALS){do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==f.COMMA&&(b+=a.token().value);a.match(f.IDENT);
b+=a.token().value;a.match(f.EQUALS);b+=a.token().value;for(c=a.peek();c!=f.COMMA&&c!=f.S&&c!=f.RPAREN;)a.get(),b+=a.token().value,c=a.peek()}while(a.match([f.COMMA,f.S]))}a.match(f.RPAREN);b+=")";this._readWhitespace()}return b},_ie_function:function(){var a=this._tokenStream,b=null,c;if(a.match([f.IE_FUNCTION,f.FUNCTION])){b=a.token().value;do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==f.COMMA&&(b+=a.token().value);a.match(f.IDENT);b+=a.token().value;a.match(f.EQUALS);b+=a.token().value;
for(c=a.peek();c!=f.COMMA&&c!=f.S&&c!=f.RPAREN;)a.get(),b+=a.token().value,c=a.peek()}while(a.match([f.COMMA,f.S]));a.match(f.RPAREN);b+=")";this._readWhitespace()}return b},_hexcolor:function(){var a=this._tokenStream,b=null;if(a.match(f.HASH)){a=a.token();b=a.value;if(!/#[a-f0-9]{3,6}/i.test(b))throw new C("Expected a hex color but found '"+b+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);this._readWhitespace()}return b},_keyframes:function(){var a=this._tokenStream,b,
c;a.mustMatch(f.KEYFRAMES_SYM);this._readWhitespace();c=this._keyframe_name();this._readWhitespace();a.mustMatch(f.LBRACE);this.fire({type:"startkeyframes",name:c,line:c.line,col:c.col});this._readWhitespace();for(b=a.peek();b==f.IDENT||b==f.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),b=a.peek();this.fire({type:"endkeyframes",name:c,line:c.line,col:c.col});this._readWhitespace();a.mustMatch(f.RBRACE)},_keyframe_name:function(){var a=this._tokenStream;a.mustMatch([f.IDENT,f.STRING]);return p.fromToken(a.token())},
_keyframe_rule:function(){var a=this._key_list();this.fire({type:"startkeyframerule",keys:a,line:a[0].line,col:a[0].col});this._readDeclarations(!0);this.fire({type:"endkeyframerule",keys:a,line:a[0].line,col:a[0].col})},_key_list:function(){var a=this._tokenStream,b=[];b.push(this._key());for(this._readWhitespace();a.match(f.COMMA);)this._readWhitespace(),b.push(this._key()),this._readWhitespace();return b},_key:function(){var a=this._tokenStream,b;if(a.match(f.PERCENTAGE))return p.fromToken(a.token());
else if(a.match(f.IDENT)){b=a.token();if(/from|to/i.test(b.value))return p.fromToken(b);a.unget()}this._unexpectedToken(a.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([f.S,f.CDO,f.CDC]););},_readDeclarations:function(a,b){var c=this._tokenStream;this._readWhitespace();a&&c.mustMatch(f.LBRACE);this._readWhitespace();try{for(;;){if(!b||!this._margin())if(this._declaration()){if(!c.match(f.SEMICOLON))break}else break;this._readWhitespace()}c.mustMatch(f.RBRACE);this._readWhitespace()}catch(d){if(d instanceof
C&&!this.options.strict)if(this.fire({type:"error",error:d,message:d.message,line:d.line,col:d.col}),c=c.advance([f.SEMICOLON,f.RBRACE]),c==f.SEMICOLON)this._readDeclarations(!1,b);else{if(c!=f.RBRACE)throw d;}else throw d;}},_readWhitespace:function(){for(var a=this._tokenStream,b="";a.match(f.S);)b+=a.token().value;return b},_unexpectedToken:function(a){throw new C("Unexpected token '"+a.value+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);},_verifyEnd:function(){this._tokenStream.LA(1)!=
f.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(a,b){var c=a.text.toLowerCase();if(z[c]){if(typeof z[c]=="function")z[c](b)}else if(c.indexOf("-")!==0)throw new E("Unknown property '"+a+"'.",a.line,a.col);},parse:function(a){this._tokenStream=new D(a,f);this._stylesheet()},parseStyleSheet:function(a){return this.parse(a)},parseMediaQuery:function(a){this._tokenStream=new D(a,f);a=this._media_query();this._verifyEnd();return a},parsePropertyValue:function(a){this._tokenStream=
new D(a,f);this._readWhitespace();a=this._expr();this._readWhitespace();this._verifyEnd();return a},parseRule:function(a){this._tokenStream=new D(a,f);this._readWhitespace();a=this._ruleset();this._readWhitespace();this._verifyEnd();return a},parseSelector:function(a){this._tokenStream=new D(a,f);this._readWhitespace();a=this._selector();this._readWhitespace();this._verifyEnd();return a}};for(I in y)l[I]=y[I];return l}();var F={"absolute-size":function(a){return this.identifier(a,"xx-small | x-small | small | medium | large | x-large | xx-large")},
"relative-size":function(a){return this.identifier(a,"smaller | larger")},identifier:function(a,b){var c=a.text.toString().toLowerCase(),d=b.split(" | "),f,e,j=!1;for(f=0,e=d.length;f<e&&!j;f++)c==d[f]&&(j=!0);return j},length:function(a){return a.type=="length"||a.type=="number"||a.type=="integer"||a=="0"},color:function(a){return a.type=="color"||a=="transparent"},number:function(a){return a.type=="number"||this.integer(a)},integer:function(a){return a.type=="integer"},angle:function(a){return a.type==
"angle"},uri:function(a){return a.type=="uri"},image:function(a){return this.uri(a)},percentage:function(a){return a.type=="percentage"||a=="0"},"border-width":function(a){return this.length(a)||this.identifier(a,"thin | medium | thick")},"border-style":function(a){return this.identifier(a,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"margin-width":function(a){return this.length(a)||this.percentage(a)||this.identifier(a,"auto")},"padding-width":function(a){return this.length(a)||
this.percentage(a)}},z={"alignment-adjust":1,"alignment-baseline":1,animation:1,"animation-delay":1,"animation-direction":1,"animation-duration":1,"animation-fill-mode":1,"animation-iteration-count":1,"animation-name":1,"animation-play-state":1,"animation-timing-function":1,appearance:1,azimuth:1,"backface-visibility":1,background:1,"background-attachment":["scroll | fixed | inherit"],"background-break":1,"background-clip":1,"background-color":["color","inherit"],"background-image":1,"background-origin":1,
"background-position":1,"background-repeat":["repeat | repeat-x | repeat-y | no-repeat | inherit"],"background-size":1,"baseline-shift":1,binding:1,bleed:1,"bookmark-label":1,"bookmark-level":1,"bookmark-state":1,"bookmark-target":1,border:1,"border-bottom":1,"border-bottom-color":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"border-bottom-style":["border-style"],"border-bottom-width":["border-width"],"border-collapse":["collapse | separate | inherit"],"border-color":{multi:["color",
"inherit"],max:4},"border-image":1,"border-image-outset":{multi:["length","number"],max:4},"border-image-repeat":{multi:["stretch | repeat | round"],max:2},"border-image-slice":1,"border-image-source":["image","none"],"border-image-width":{multi:["length","percentage","number","auto"],max:4},"border-left":1,"border-left-color":["color","inherit"],"border-left-style":["border-style"],"border-left-width":["border-width"],"border-radius":1,"border-right":1,"border-right-color":["color","inherit"],"border-right-style":["border-style"],
"border-right-width":["border-width"],"border-spacing":1,"border-style":{multi:["border-style"],max:4},"border-top":1,"border-top-color":["color","inherit"],"border-top-left-radius":1,"border-top-right-radius":1,"border-top-style":["border-style"],"border-top-width":["border-width"],"border-width":{multi:["border-width"],max:4},bottom:["margin-width","inherit"],"box-align":["start | end | center | baseline | stretch"],"box-decoration-break":["slice |clone"],"box-direction":["normal | reverse | inherit"],
"box-flex":["number"],"box-flex-group":["integer"],"box-lines":["single | multiple"],"box-ordinal-group":["integer"],"box-orient":["horizontal | vertical | inline-axis | block-axis | inherit"],"box-pack":["start | end | center | justify"],"box-shadow":1,"box-sizing":["content-box | border-box | inherit"],"break-after":["auto | always | avoid | left | right | page | column | avoid-page | avoid-column"],"break-before":["auto | always | avoid | left | right | page | column | avoid-page | avoid-column"],
"break-inside":["auto | avoid | avoid-page | avoid-column"],"caption-side":["top | bottom | inherit"],clear:["none | right | left | both | inherit"],clip:1,color:["color","inherit"],"color-profile":1,"column-count":["integer","auto"],"column-fill":["auto | balance"],"column-gap":["length","normal"],"column-rule":1,"column-rule-color":["color"],"column-rule-style":["border-style"],"column-rule-width":["border-width"],"column-span":["none | all"],"column-width":["length","auto"],columns:1,content:1,
"counter-increment":1,"counter-reset":1,crop:1,cue:["cue-after | cue-before | inherit"],"cue-after":1,"cue-before":1,cursor:1,direction:["ltr | rtl | inherit"],display:["inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid","none | inherit"],"dominant-baseline":1,"drop-initial-after-adjust":1,"drop-initial-after-align":1,
"drop-initial-before-adjust":1,"drop-initial-before-align":1,"drop-initial-size":1,"drop-initial-value":1,elevation:1,"empty-cells":["show | hide | inherit"],filter:1,fit:["fill | hidden | meet | slice"],"fit-position":1,"float":["left | right | none | inherit"],"float-offset":1,font:1,"font-family":1,"font-size":["absolute-size","relative-size","length","percentage","inherit"],"font-size-adjust":1,"font-stretch":1,"font-style":["normal | italic | oblique | inherit"],"font-variant":["normal | small-caps | inherit"],
"font-weight":["normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit"],"grid-cell-stacking":["columns | rows | layer"],"grid-column":1,"grid-columns":1,"grid-column-align":["start | end | center | stretch"],"grid-column-sizing":1,"grid-column-span":["integer"],"grid-flow":["none | rows | columns"],"grid-layer":["integer"],"grid-row":1,"grid-rows":1,"grid-row-align":["start | end | center | stretch"],"grid-row-span":["integer"],"grid-row-sizing":1,"hanging-punctuation":1,
height:["margin-width","inherit"],"hyphenate-after":1,"hyphenate-before":1,"hyphenate-character":["string","auto"],"hyphenate-lines":1,"hyphenate-resource":1,hyphens:["none | manual | auto"],icon:1,"image-orientation":["angle","auto"],"image-rendering":1,"image-resolution":1,"inline-box-align":1,left:["margin-width","inherit"],"letter-spacing":["length","normal | inherit"],"line-height":["number","length","percentage","normal | inherit"],"line-break":["auto | loose | normal | strict"],"line-stacking":1,
"line-stacking-ruby":1,"line-stacking-shift":1,"line-stacking-strategy":1,"list-style":1,"list-style-image":["uri","none | inherit"],"list-style-position":["inside | outsider | inherit"],"list-style-type":["disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit"],margin:{multi:["margin-width","inherit"],max:4},"margin-bottom":["margin-width","inherit"],"margin-left":["margin-width",
"inherit"],"margin-right":["margin-width","inherit"],"margin-top":["margin-width","inherit"],mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":["length","percentage","none | inherit"],"max-width":["length","percentage","none | inherit"],"min-height":["length","percentage","inherit"],"min-width":["length","percentage","inherit"],"move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:["number",
"inherit"],orphans:["integer","inherit"],outline:1,"outline-color":["color","invert | inherit"],"outline-offset":1,"outline-style":["border-style","inherit"],"outline-width":["border-width","inherit"],overflow:["visible | hidden | scroll | auto | inherit"],"overflow-style":1,"overflow-x":1,"overflow-y":1,padding:{multi:["padding-width","inherit"],max:4},"padding-bottom":["padding-width","inherit"],"padding-left":["padding-width","inherit"],"padding-right":["padding-width","inherit"],"padding-top":["padding-width",
"inherit"],page:1,"page-break-after":["auto | always | avoid | left | right | inherit"],"page-break-before":["auto | always | avoid | left | right | inherit"],"page-break-inside":["auto | avoid | inherit"],"page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,position:["static | relative | absolute | fixed | inherit"],"presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,
"rest-after":1,"rest-before":1,richness:1,right:["margin-width","inherit"],rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:["normal | none | spell-out | inherit"],"speak-header":["once | always | inherit"],"speak-numeral":["digits | continuous | inherit"],"speak-punctuation":["code | none | inherit"],"speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":["auto | fixed | inherit"],"tab-size":["integer","length"],target:1,"target-name":1,
"target-new":1,"target-position":1,"text-align":["left | right | center | justify | inherit"],"text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":["length","percentage","inherit"],"text-justify":["auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida"],"text-outline":1,"text-shadow":1,"text-transform":["capitalize | uppercase | lowercase | none | inherit"],"text-wrap":["normal | none | avoid"],top:["margin-width","inherit"],transform:1,
"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":["normal | embed | bidi-override | inherit"],"user-modify":["read-only | read-write | write-only | inherit"],"user-select":["none | text | toggle | element | elements | all | inherit"],"vertical-align":["percentage","length","baseline | sub | super | top | text-top | middle | bottom | text-bottom | inherit"],visibility:["visible | hidden | collapse | inherit"],
"voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":["normal | pre | nowrap | pre-wrap | pre-line | inherit"],"white-space-collapse":1,widows:["integer","inherit"],width:["length","percentage","auto","inherit"],"word-break":["normal | keep-all | break-all"],"word-spacing":["length","normal | inherit"],"word-wrap":1,"z-index":["integer","auto | inherit"],zoom:["number","percentage","normal"]};
(function(){for(var a in z)z.hasOwnProperty(a)&&(z[a]instanceof Array?z[a]=function(a){return function(b){var c=!1,d=[],f=b.parts[0];if(b.parts.length!=1)throw new E("Expected 1 value but found "+b.parts.length+".",b.line,b.col);for(var e=0,l=a.length;e<l&&!c;e++)typeof F[a[e]]=="undefined"?(c=c||F.identifier(f,a[e]),d.push("one of ("+a[e]+")")):(c=c||F[a[e]](f),d.push(a[e]));if(!c)throw new E("Expected "+d.join(" or ")+" but found '"+b+"'.",b.line,b.col);}}(z[a]):typeof z[a]=="object"&&(z[a]=function(a){return function(b){var c,
d,f,e,l,j,g,h=b.parts;if(a.max&&h.length>a.max)throw new E("Expected a max of "+a.max+" property values but found "+h.length+".",b.line,b.col);if(a.multi)g=a.multi;for(d=0,f=h.length;d<f;d++){j=[];c=!1;for(e=0,l=g.length;e<l;e++)if(typeof F[g[e]]=="undefined"){if(F.identifier(h[d],g[e])){c=!0;break}j.push("one of ("+g[e]+")")}else{if(F[g[e]](h[d])){c=!0;break}j.push(g[e])}if(!c)throw new E("Expected "+j.join(" or ")+" but found '"+h[d]+"'.",b.line,b.col);}}}(z[a])))})();d.prototype=new p;d.prototype.constructor=
d;d.prototype.toString=function(){return(this.hack?this.hack:"")+this.text};a.prototype=new p;a.prototype.constructor=a;h.prototype=new p;h.prototype.constructor=a;h.fromToken=function(a){return new h(a.value,a.startLine,a.startCol)};var H={":first-letter":1,":first-line":1,":before":1,":after":1,ELEMENT:1,CLASS:2};H.isElement=function(a){return a.indexOf("::")===0||H[a.toLowerCase()]==H.ELEMENT};k.prototype=new p;k.prototype.constructor=k;j.prototype=new p;j.prototype.constructor=j;i.prototype=new p;
i.prototype.constructor=i;m.prototype={constructor:m,compare:function(a){var b=["a","b","c","d"],c,d;for(c=0,d=b.length;c<d;c++)if(this[b[c]]<a[b[c]])return-1;else if(this[b[c]]>a[b[c]])return 1;return 0},valueOf:function(){return this.a*1E3+this.b*100+this.c*10+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}};m.calculate=function(a){function b(a){var c,d,l,j,h;a.elementName&&a.text.charAt(a.text.length-1)!="*"&&g++;for(c=0,l=a.modifiers.length;c<l;c++)switch(h=a.modifiers[c],
h.type){case "class":case "attribute":e++;break;case "id":f++;break;case "pseudo":H.isElement(h.text)?g++:e++;break;case "not":for(d=0,j=h.args.length;d<j;d++)b(h.args[d])}}var c,d,f=0,e=0,g=0;for(c=0,d=a.parts.length;c<d;c++)part=a.parts[c],part instanceof j&&b(part);return new m(0,f,e,g)};var K=/^[0-9a-fA-F]$/,N=/\n|\r\n|\r|\f/;D.prototype=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}(new t,{_getToken:function(){var a,b=this._reader,c=null,d=b.getLine(),e=b.getCol();for(a=
b.read();a;){switch(a){case "/":c=b.peek()=="*"?this.commentToken(a,d,e):this.charToken(a,d,e);break;case "|":case "~":case "^":case "$":case "*":c=b.peek()=="="?this.comparisonToken(a,d,e):this.charToken(a,d,e);break;case '"':case "'":c=this.stringToken(a,d,e);break;case "#":c=G(b.peek())?this.hashToken(a,d,e):this.charToken(a,d,e);break;case ".":c=q(b.peek())?this.numberToken(a,d,e):this.charToken(a,d,e);break;case "-":c=b.peek()=="-"?this.htmlCommentEndToken(a,d,e):s(b.peek())?this.identOrFunctionToken(a,
d,e):this.charToken(a,d,e);break;case "!":c=this.importantToken(a,d,e);break;case "@":c=this.atRuleToken(a,d,e);break;case ":":c=this.notToken(a,d,e);break;case "<":c=this.htmlCommentStartToken(a,d,e);break;case "U":case "u":if(b.peek()=="+"){c=this.unicodeRangeToken(a,d,e);break}default:c=q(a)?this.numberToken(a,d,e):w(a)?this.whitespaceToken(a,d,e):a!=null&&(s(a)||/\-\\/.test(a))?this.identOrFunctionToken(a,d,e):this.charToken(a,d,e)}break}!c&&a==null&&(c=this.createToken(f.EOF,null,d,e));return c},
createToken:function(a,b,c,d,e){var f=this._reader,e=e||{};return{value:b,type:a,channel:e.channel,hide:e.hide||!1,startLine:c,startCol:d,endLine:f.getLine(),endCol:f.getCol()}},atRuleToken:function(a,b,c){var d=a,e=this._reader,j=f.CHAR;e.mark();d=this.readName();d=a+d;j=f.type(d.toLowerCase());if(j==f.CHAR||j==f.UNKNOWN)j=f.CHAR,d=a,e.reset();return this.createToken(j,d,b,c)},charToken:function(a,b,c){var d=f.type(a);if(d==-1)d=f.CHAR;return this.createToken(d,a,b,c)},commentToken:function(a,b,
c){a=this.readComment(a);return this.createToken(f.COMMENT,a,b,c)},comparisonToken:function(a,b,c){a+=this._reader.read();return this.createToken(f.type(a)||f.CHAR,a,b,c)},hashToken:function(a,b,c){a=this.readName(a);return this.createToken(f.HASH,a,b,c)},htmlCommentStartToken:function(a,b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(3);return e=="<\!--"?this.createToken(f.CDO,e,b,c):(d.reset(),this.charToken(a,b,c))},htmlCommentEndToken:function(a,b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(2);
return e=="--\>"?this.createToken(f.CDC,e,b,c):(d.reset(),this.charToken(a,b,c))},identOrFunctionToken:function(a,b,c){var d=this._reader,a=this.readName(a),e=f.IDENT;if(d.peek()=="(")if(a+=d.read(),a.toLowerCase()=="url("){if(e=f.URI,a=this.readURI(a),a.toLowerCase()=="url(")e=f.FUNCTION}else e=f.FUNCTION;else if(d.peek()==":"&&a.toLowerCase()=="progid")a+=d.readTo("("),e=f.IE_FUNCTION;return this.createToken(e,a,b,c)},importantToken:function(a,b,c){var d=this._reader,e=a,j=f.CHAR,g,h;d.mark();for(h=
d.read();h;){if(h=="/")if(d.peek()!="*")break;else{if(g=this.readComment(h),g=="")break}else if(w(h))e+=h+this.readWhitespace();else{if(/i/i.test(h)&&(g=d.readCount(8),/mportant/i.test(g)))e+=h+g,j=f.IMPORTANT_SYM;break}h=d.read()}return j==f.CHAR?(d.reset(),this.charToken(a,b,c)):this.createToken(j,e,b,c)},notToken:function(a,b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(4);return e.toLowerCase()==":not("?this.createToken(f.NOT,e,b,c):(d.reset(),this.charToken(a,b,c))},numberToken:function(a,
b,c){var d=this._reader,a=this.readNumber(a),e=f.NUMBER,j=d.peek();if(j!=null&&(s(j)||/\-\\/.test(j)))d=this.readName(d.read()),a+=d,e=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(d)?f.LENGTH:/^deg|^rad$|^grad$/i.test(d)?f.ANGLE:/^ms$|^s$/i.test(d)?f.TIME:/^hz$|^khz$/i.test(d)?f.FREQ:/^dpi$|^dpcm$/i.test(d)?f.RESOLUTION:f.DIMENSION;else if(j=="%")a+=d.read(),e=f.PERCENTAGE;return this.createToken(e,a,b,c)},stringToken:function(a,b,c){for(var d=a,e=this._reader,j=
a,h=f.STRING,g=e.read();g;){d+=g;if(g==a&&j!="\\")break;if(x(e.peek())&&g!="\\"){h=f.INVALID;break}j=g;g=e.read()}if(g==null)h=f.INVALID;return this.createToken(h,d,b,c)},unicodeRangeToken:function(a,b,c){var d=this._reader,e,j=f.CHAR;if(d.peek()=="+")d.mark(),a+=d.read(),a+=this.readUnicodeRangePart(!0),a.length==2?d.reset():(j=f.UNICODE_RANGE,a.indexOf("?")==-1&&d.peek()=="-"&&(d.mark(),e=d.read(),e+=this.readUnicodeRangePart(!1),e.length==1?d.reset():a+=e));return this.createToken(j,a,b,c)},whitespaceToken:function(a,
b,c){a+=this.readWhitespace();return this.createToken(f.S,a,b,c)},readUnicodeRangePart:function(a){for(var b=this._reader,c="",d=b.peek();d!=null&&K.test(d)&&c.length<6;)b.read(),c+=d,d=b.peek();if(a)for(;d=="?"&&c.length<6;)b.read(),c+=d,d=b.peek();return c},readWhitespace:function(){for(var a=this._reader,b="",c=a.peek();w(c);)a.read(),b+=c,c=a.peek();return b},readNumber:function(a){for(var b=this._reader,c=a,a=a==".",d=b.peek();d;){if(q(d))c+=b.read();else if(d==".")if(a)break;else a=!0,c+=b.read();
else break;d=b.peek()}return c},readString:function(){for(var a=this._reader,b=a.read(),c=b,d=b,e=a.peek();e;){e=a.read();c+=e;if(e==b&&d!="\\")break;if(x(a.peek())&&e!="\\"){c="";break}d=e;e=a.peek()}e==null&&(c="");return c},readURI:function(a){var b=this._reader,c=a,d="",e=b.peek();for(b.mark();e&&w(e);)b.read(),e=b.peek();d=e=="'"||e=='"'?this.readString():this.readURL();for(e=b.peek();e&&w(e);)b.read(),e=b.peek();d==""||e!=")"?(c=a,b.reset()):c+=d+b.read();return c},readURL:function(){for(var a=
this._reader,b="",c=a.peek();/^[!#$%&\\*-~]$/.test(c);)b+=a.read(),c=a.peek();return b},readName:function(a){for(var b=this._reader,a=a||"",c=b.peek();;)if(c=="\\")a+=this.readEscape(b.read()),c=b.peek();else if(c&&G(c))a+=b.read(),c=b.peek();else break;return a},readEscape:function(a){var b=this._reader,a=a||"",c=0,d=b.peek();if(d!=null&&K.test(d)){do a+=b.read(),d=b.peek();while(d&&d!=null&&K.test(d)&&++c<6)}a.length==3&&/\s/.test(d)||a.length==7||a.length==1?b.read():d="";return a+d},readComment:function(a){var b=
this._reader,a=a||"",c=b.read();if(c=="*"){for(;c;){a+=c;if(a.length>2&&c=="*"&&b.peek()=="/"){a+=b.read();break}c=b.read()}return a}else return""}});var f=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",
text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},
{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",
text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",
text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var a=[],b={};f.UNKNOWN=-1;f.unshift({name:"EOF"});for(var c=0,d=f.length;c<d;c++)if(a.push(f[c].name),f[f[c].name]=c,f[c].text)if(f[c].text instanceof Array)for(var e=0;e<f[c].text.length;e++)b[f[c].text[e]]=c;else b[f[c].text]=c;f.name=function(b){return a[b]};f.type=function(a){return b[a]||-1}})();
E.prototype=Error();r=b})();var i=function(){var c=[],g=[],e=new o;e.version="0.8.1";e.addRule=function(b){c.push(b);c[b.id]=b};e.clearRules=function(){c=[]};e.getRules=function(){return[].concat(c).sort(function(b,c){return b.id>c.id?1:0})};e.addFormatter=function(b){g[b.id]=b};e.getFormatter=function(b){return g[b]};e.format=function(b,c,a,e){var a=this.getFormatter(a),g=null;a&&(g=a.startFormat(),g+=a.formatResults(b,c,e||{}),g+=a.endFormat());return g};e.hasFormat=function(b){return g.hasOwnProperty(b)};
e.verify=function(b,d){var a=0,e=c.length,g,j=new r({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});g=b.split(/\n\r?/g);if(!d)for(d={};a<e;)d[c[a++].id]=1;e=new t(g,d);d.errors=2;for(a in d)d.hasOwnProperty(a)&&c[a]&&c[a].init(j,e);try{j.parse(b)}catch(i){e.error("Fatal error, cannot continue: "+i.message,i.line,i.col,{})}a={messages:e.messages,stats:e.stats};a.messages.sort(function(a,b){return a.rollup&&!b.rollup?1:!a.rollup&&b.rollup?-1:a.line-b.line});return a};return e}();t.prototype=
{constructor:t,error:function(c,g,e,b){this.messages.push({type:"error",line:g,col:e,message:c,evidence:this.lines[g-1],rule:b||{}})},warn:function(c,g,e,b){this.report(c,g,e,b)},report:function(c,g,e,b){this.messages.push({type:this.ruleset[b.id]==2?"error":"warning",line:g,col:e,message:c,evidence:this.lines[g-1],rule:b})},info:function(c,g,e,b){this.messages.push({type:"info",line:g,col:e,message:c,evidence:this.lines[g-1],rule:b})},rollupError:function(c,g){this.messages.push({type:"error",rollup:!0,
message:c,rule:g})},rollupWarn:function(c,g){this.messages.push({type:"warning",rollup:!0,message:c,rule:g})},stat:function(c,g){this.stats[c]=g}};i._Reporter=t;i.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(c,g){var e=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,h,k,j,i,m;for(j=0;j<b.length;j++){d=b[j];for(i=0;i<d.parts.length;i++)if(a=d.parts[i],a.type==c.SELECTOR_PART_TYPE)for(m=k=0;m<a.modifiers.length;m++)h=
a.modifiers[m],h.type=="class"&&k++,k>1&&g.report("Don't use adjoining classes.",a.line,a.col,e)}})}});i.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",browsers:"All",init:function(c,g){function e(){k={}}function b(){var b;if(k.height)for(b in h)h.hasOwnProperty(b)&&k[b]&&(b=="padding"&&k[b].value.parts.length===2&&k[b].value.parts[0].value===0||g.report("Using height with "+b+" can sometimes make elements larger than you expect.",
k[b].line,k[b].col,d));if(k.width)for(b in a)a.hasOwnProperty(b)&&k[b]&&(b=="padding"&&k[b].value.parts.length===2&&k[b].value.parts[1].value===0||g.report("Using width with "+b+" can sometimes make elements larger than you expect.",k[b].line,k[b].col,d))}var d=this,a={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},h={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},k;c.addListener("startrule",e);c.addListener("startfontface",
e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(b){var c=b.property.text.toLowerCase();if(h[c]||a[c])!/^0\S*$/.test(b.value)&&!(c=="border"&&b.value=="none")&&(k[c]={line:b.property.line,col:b.property.col,value:b.value});else if(c=="width"||c=="height")k[c]=1});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",
b)}});i.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(c,g){var e=this;c.addListener("property",function(b){b.property.text.toLowerCase()=="box-sizing"&&g.report("The box-sizing property isn't supported in IE6 and IE7.",b.line,b.col,e)})}});i.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",
browsers:"All",init:function(c,g){var e=this,b,d,a,h,k,j,i,m=Array.prototype.push,q=[];b={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz",
"border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit moz","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz",
"column-gap":"webkit moz","column-rule":"webkit moz","column-rule-color":"webkit moz","column-rule-style":"webkit moz","column-rule-width":"webkit moz","column-width":"webkit moz",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",
transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz","word-break":"epub ms","writing-mode":"epub ms"};for(a in b)if(b.hasOwnProperty(a)){h=[];k=b[a].split(" ");for(j=0,i=k.length;j<i;j++)h.push("-"+k[j]+"-"+a);b[a]=h;m.apply(q,h)}c.addListener("startrule",function(){d=[]});c.addListener("property",function(a){a=a.property.text;
q.indexOf(a)>-1&&d.push(a)});c.addListener("endrule",function(a){if(d.length){var c={},j,h,k,i,m,v,q;for(j=0,h=d.length;j<h;j++)for(i in k=d[j],b)b.hasOwnProperty(i)&&(m=b[i],m.indexOf(k)>-1&&(c[i]===void 0&&(c[i]={full:m.slice(0),actual:[]}),c[i].actual.indexOf(k)===-1&&c[i].actual.push(k)));for(i in c)if(c.hasOwnProperty(i)&&(j=c[i],k=j.full,m=j.actual,k.length>m.length))for(j=0,h=k.length;j<h;j++)v=k[j],m.indexOf(v)===-1&&(q=m.length===1?m[0]:m.length==2?m.join(" and "):m.join(", "),g.report("The property "+
v+" is compatible with "+q+" and should be included as well.",a.selectors[0].line,a.selectors[0].col,e))}})}});i.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",browsers:"All",init:function(c,g){function e(b,c,d){if(k[b]&&(typeof h[b]!="string"||k[b].value.toLowerCase()!=h[b]))g.report(d||b+" can't be used with display: "+c+".",k[b].line,k[b].col,a)}function b(){k={}}function d(){var a=
k.display?k.display.value:null;if(a)switch(a){case "inline":e("height",a);e("width",a);e("margin",a);e("margin-top",a);e("margin-bottom",a);e("float",a,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case "block":e("vertical-align",a);break;case "inline-block":e("float",a);break;default:a.indexOf("table-")===0&&(e("margin",a),e("margin-left",a),e("margin-right",a),e("margin-top",a),e("margin-bottom",a),e("float",a))}}var a=this,h={display:1,
"float":"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1},k;c.addListener("startrule",b);c.addListener("startfontface",b);c.addListener("startkeyframerule",b);c.addListener("startpagemargin",b);c.addListener("startpage",b);c.addListener("property",function(a){var b=a.property.text.toLowerCase();h[b]&&(k[b]={value:a.value.text,line:a.property.line,col:a.property.col})});
c.addListener("endrule",d);c.addListener("endfontface",d);c.addListener("endkeyframerule",d);c.addListener("endpagemargin",d);c.addListener("endpage",d)}});i.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(c,g){function e(){d={}}var b=this,d,a;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",
e);c.addListener("property",function(c){var e=c.property.text.toLowerCase();d[e]&&(a!=e||d[e]==c.value.text)&&g.report("Duplicate property '"+c.property+"' found.",c.line,c.col,b);d[e]=c.value.text;a=e})}});i.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(c,g){var e=this,b=0;c.addListener("startrule",function(){b=0});c.addListener("property",function(){b++});c.addListener("endrule",function(c){c=c.selectors;
b===0&&g.report("Rule is empty.",c[0].line,c[0].col,e)})}});i.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(c,g){var e=this;c.addListener("error",function(b){g.error(b.message,b.line,b.col,e)})}});i.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(c,g){var e=this,b=0;c.addListener("property",function(c){c.property.text.toLowerCase()==
"float"&&c.value.text.toLowerCase()!="none"&&b++});c.addListener("endstylesheet",function(){g.stat("floats",b);b>=10&&g.rollupWarn("Too many floats ("+b+"), you're probably using them for layout. Consider using a grid system instead.",e)})}});i.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(c,g){var e=this,b=0;c.addListener("startfontface",function(){b++});c.addListener("endstylesheet",function(){b>
5&&g.rollupWarn("Too many @font-face declarations ("+b+").",e)})}});i.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(c,g){var e=this,b=0;c.addListener("property",function(c){c.property=="font-size"&&b++});c.addListener("endstylesheet",function(){g.stat("font-sizes",b);b>=10&&g.rollupWarn("Too many font-size declarations ("+b+"), abstraction needed.",e)})}});i.addRule({id:"gradients",name:"Require all gradient definitions",
desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(c,g){var e=this,b;c.addListener("startrule",function(){b={moz:0,webkit:0,ms:0,o:0}});c.addListener("property",function(c){/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/.test(c.value)&&(b[RegExp.$1]=1)});c.addListener("endrule",function(c){var a=[];b.moz||a.push("Firefox 3.6+");b.webkit||a.push("Webkit (Safari, Chrome)");b.ms||a.push("Internet Explorer 10+");b.o||a.push("Opera 11.1+");a.length&&
a.length<4&&g.report("Missing vendor-prefixed CSS gradients for "+a.join(", ")+".",c.selectors[0].line,c.selectors[0].col,e)})}});i.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,h,k,j,i,m;for(j=0;j<b.length;j++){d=b[j];for(i=k=0;i<d.parts.length;i++)if(a=d.parts[i],a.type==c.SELECTOR_PART_TYPE)for(m=0;m<a.modifiers.length;m++)h=a.modifiers[m],h.type==
"id"&&k++;k==1?g.report("Don't use IDs in selectors.",d.line,d.col,e):k>1&&g.report(k+" IDs in the selector, really?",d.line,d.col,e)}})}});i.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(c,g){var e=this;c.addListener("import",function(b){g.report("@import prevents parallel downloads, use <link> instead.",b.line,b.col,e)})}});i.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",
browsers:"All",init:function(c,g){var e=this,b=0;c.addListener("property",function(c){c.important===!0&&(b++,g.report("Use of !important",c.line,c.col,e))});c.addListener("endstylesheet",function(){g.stat("important",b);b>=10&&g.rollupWarn("Too many !important declarations ("+b+"), try to use less than 10 to avoid specifity issues.",e)})}});i.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",
browsers:"All",init:function(c,g){var e=this;c.addListener("property",function(b){b.property.text.toLowerCase();b.invalid&&g.report(b.invalid.message,b.line,b.col,e)})}});i.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(c,g){function e(b){a=b.selectors?{line:b.line,col:b.col,selectors:b.selectors,propCount:0,outline:!1}:null}function b(){a&&a.outline&&(a.selectors.toString().toLowerCase().indexOf(":focus")==
-1?g.report("Outlines should only be modified using :focus.",a.line,a.col,d):a.propCount==1&&g.report("Outlines shouldn't be hidden unless other visual changes are made.",a.line,a.col,d))}var d=this,a;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(b){var c=b.property.text.toLowerCase(),b=b.value;if(a&&(a.propCount++,c=="outline"&&(b=="none"||b=="0")))a.outline=
!0});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",b)}});i.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(c,g){var e=this,b={};c.addListener("startrule",function(d){var d=d.selectors,a,h,k,j,i,m;for(j=0;j<d.length;j++){a=d[j];for(i=0;i<a.parts.length;i++)if(h=a.parts[i],h.type==
c.SELECTOR_PART_TYPE)for(m=0;m<h.modifiers.length;m++)k=h.modifiers[m],h.elementName&&k.type=="id"?g.report("Element ("+h+") is overqualified, just use "+k+" without element name.",h.line,h.col,e):k.type=="class"&&(b[k]||(b[k]=[]),b[k].push({modifier:k,part:h}))}});c.addListener("endstylesheet",function(){for(var c in b)b.hasOwnProperty(c)&&b[c].length==1&&b[c][0].part.elementName&&g.report("Element ("+b[c][0].part+") is overqualified, just use "+b[c][0].modifier+" without element name.",b[c][0].part.line,
b[c][0].part.col,e)})}});i.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,h,k;for(h=0;h<b.length;h++){d=b[h];for(k=0;k<d.parts.length;k++)a=d.parts[k],a.type==c.SELECTOR_PART_TYPE&&a.elementName&&/h[1-6]/.test(a.elementName.toString())&&k>0&&g.report("Heading ("+a.elementName+") should not be qualified.",a.line,a.col,e)}})}});
i.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,h,k,j,i;for(k=0;k<b.length;k++){d=b[k];for(j=0;j<d.parts.length;j++)if(a=d.parts[j],a.type==c.SELECTOR_PART_TYPE)for(i=0;i<a.modifiers.length;i++)h=a.modifiers[i],h.type=="attribute"&&/([\~\|\^\$\*]=)/.test(h)&&g.report("Attribute selectors with "+
RegExp.$1+" are slow!",h.line,h.col,e)}})}});i.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(c,g){var e=0;c.addListener("startrule",function(){e++});c.addListener("endstylesheet",function(){g.stat("rule-count",e)})}});i.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(c,g){function e(){v={}}function b(a){var b,c,e,h;for(b in m)if(m.hasOwnProperty(b)){h=
0;for(c=0,e=m[b].length;c<e;c++)h+=v[m[b][c]]?1:0;h==m[b].length&&g.report("The properties "+m[b].join(", ")+" can be replaced by "+b+".",a.line,a.col,d)}}var d=this,a,h,i,j={},v,m={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(a in m)if(m.hasOwnProperty(a))for(h=0,i=m[a].length;h<i;h++)j[m[a][h]]=a;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("property",function(a){a=a.property.toString().toLowerCase();
j[a]&&(v[a]=1)});c.addListener("endrule",b);c.addListener("endfontface",b)}});i.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(c,g){function e(){a=!1}function b(){a&&g.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.",a.line,a.col,d)}var d=this,a=!1;c.addListener("startrule",e);c.addListener("startfontface",
e);c.addListener("property",function(b){var c=b.property.toString().toLowerCase(),d=b.value;c=="text-indent"&&d.parts[0].value<-99?a=b.property:c=="direction"&&d=="ltr"&&(a=!1)});c.addListener("endrule",b);c.addListener("endfontface",b)}});i.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(c,g){var e=this,b={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};c.addListener("startrule",function(c){var c=c.selectors,a,h,i,
j;for(i=0;i<c.length;i++)if(a=c[i],a=a.parts[a.parts.length-1],a.elementName&&/(h[1-6])/i.test(a.elementName.toString())){for(j=0;j<a.modifiers.length;j++)if(a.modifiers[j].type=="pseudo"){h=!0;break}h||(b[RegExp.$1]++,b[RegExp.$1]>1&&g.report("Heading ("+a.elementName+") has already been defined.",a.line,a.col,e))}});c.addListener("endstylesheet",function(){var c,a=[];for(c in b)b.hasOwnProperty(c)&&b[c]>1&&a.push(b[c]+" "+c+"s");a.length&&g.rollupWarn("You have "+a.join(", ")+" defined in this stylesheet.",
e)})}});i.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(b){var b=b.selectors,c,a;for(a=0;a<b.length;a++)c=b[a],c=c.parts[c.parts.length-1],c.elementName=="*"&&g.report(e.desc,c.line,c.col,e)})}});i.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",
browsers:"All",init:function(c,g){function e(){a={};h=1}function b(b){var c,e,h,n,o=[];for(c in a)i[c]&&o.push({actual:c,needed:i[c]});for(c=0,e=o.length;c<e;c++)h=o[c].needed,n=o[c].actual,a[h]?a[h][0].pos<a[n][0].pos&&g.report("Standard property '"+h+"' should come after vendor-prefixed property '"+n+"'.",b.line,b.col,d):g.report("Missing standard property '"+h+"' to go along with '"+n+"'.",b.line,b.col,d)}var d=this,a,h,i={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius",
"-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius",
"-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color",
"-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin",
"-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing","-moz-user-select":"user-select","-khtml-user-select":"user-select","-webkit-user-select":"user-select"};c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(b){var c=
b.property.text.toLowerCase();a[c]||(a[c]=[]);a[c].push({name:b.property,value:b.value,pos:h++})});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",b)}});i.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",browsers:"All",init:function(c,g){var e=this;c.addListener("property",function(b){for(var b=b.value.parts,c=0,a=b.length;c<a;)(b[c].units||
b[c].type=="percentage")&&b[c].value===0&&g.report("Values of 0 shouldn't have units specified.",b[c].line,b[c].col,e),c++})}});i.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},formatResults:function(c,g){var e=c.messages,b=[];e.length>0&&(b.push('<file name="'+g+'">'),e.forEach(function(c){c.rollup||b.push('<error line="'+c.line+'" column="'+c.col+'" severity="'+
c.type+'" message="'+(!c.message||c.message.constructor!==String?"":c.message.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;"))+'" source="'+(!c.rule||!("name"in c.rule)?"":"net.csslint."+c.rule.name.replace(/\s/g,""))+'"/>')}),b.push("</file>"));return b.join("")}});i.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,e){var c=c.messages,b="",e=e||{};if(c.length===0)return e.quiet?"":
g+": Lint Free!";c.forEach(function(c){b+=c.rollup?g+": "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n":g+": line "+c.line+", col "+c.col+", "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n"});return b}});i.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){return"</csslint>"},formatResults:function(c,g){var e=c.messages,b=[],d=function(a){return!a||
a.constructor!==String?"":a.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;")};e.length>0&&(b.push('<file name="'+g+'">'),e.forEach(function(a){a.rollup?b.push('<issue severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>'):b.push('<issue line="'+a.line+'" char="'+a.col+'" severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>')}),b.push("</file>"));return b.join("")}});i.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><lint>'},
endFormat:function(){return"</lint>"},formatResults:function(c,g){var e=c.messages,b=[],d=function(a){return!a||a.constructor!==String?"":a.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;")};e.length>0&&(b.push('<file name="'+g+'">'),e.forEach(function(a){a.rollup?b.push('<issue severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>'):b.push('<issue line="'+a.line+'" char="'+a.col+'" severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>')}),
b.push("</file>"));return b.join("")}});i.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,e){var c=c.messages,b="",e=e||{};if(c.length===0)return e.quiet?"":"\n\ncsslint: No errors in "+g+".";var b="\n\ncsslint: There are "+c.length+" problems in "+g+".",e=g.lastIndexOf("/"),d=g;e===-1&&(e=g.lastIndexOf("\\"));e>-1&&(d=g.substring(e+1));c.forEach(function(a,c){b=b+"\n\n"+d;a.rollup?(b+="\n"+(c+1)+": "+a.type,b+="\n"+
a.message):(b+="\n"+(c+1)+": "+a.type+" at line "+a.line+", col "+a.col,b+="\n"+a.message,b+="\n"+a.evidence)});return b}});return i}();define("plugins/csslintPlugin/lib/csslint",function(){});
define('built-csslintPlugin.js',["orion/plugin","plugins/csslintPlugin/lib/csslint"],function(r){function n(i){for(var c=CSSLint.verify(i).messages,i=i.split(/\r?\n/),g=[],e=0;e<c.length;e++){var b=c[e];b.line&&(b={description:b.message,line:b.line,start:b.col,end:i[b.line-1].indexOf(b.evidence)+b.evidence.length,severity:b.type},g.push(b))}return{problems:g}}function A(i){CSSLint.addRule({id:"css-outline",name:"CSS outline",desc:"CSS outline helper rule",browsers:"All",init:function(c){i.length=0;
c.addListener("startrule",function(c){if((c=c.selectors)&&c.length){for(var e=[],b=null,d=null,a=0;a<c.length;a++){var h=c[a];if(b===null)b=h.line;if(d===null)d=h.col;e.push(h.text)}i.push({label:e.join(", "),line:b,col:d})}})}})}try{var o=new r({name:"Orion CSSLint Support",version:"1.0",description:"This plugin provides a CSSLint service to support outline and validation of CSS files."});o.registerService("orion.edit.validator",{computeProblems:function(i){return i.getText().then(n)}},{contentType:["text/css"]});
var u=[];A(u);o.registerService("orion.edit.outliner",{getOutline:function(i){CSSLint.verify(i);return u}},{id:"orion.outline.css.csslint",name:"CSS rule outline",contentType:["text/css"]});o.connect()}catch(t){console.debug("Couldn't install csslintPlugin: "+t)}});