csstree-validator
Version:
CSS validator built on csstree
18 lines • 192 kB
JavaScript
var csstreeValidator=(()=>{var Ga=Object.create;var wt=Object.defineProperty;var Ya=Object.getOwnPropertyDescriptor;var Va=Object.getOwnPropertyNames;var Ka=Object.getPrototypeOf,Qa=Object.prototype.hasOwnProperty;var ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x=(e,t)=>{for(var r in t)wt(e,r,{get:t[r],enumerable:!0})},ro=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Va(t))!Qa.call(e,i)&&i!==r&&wt(e,i,{get:()=>t[i],enumerable:!(n=Ya(t,i))||n.enumerable});return e};var Xa=(e,t,r)=>(r=e!=null?Ga(Ka(e)):{},ro(t||!e||!e.__esModule?wt(r,"default",{value:e,enumerable:!0}):r,e)),$a=e=>ro(wt({},"__esModule",{value:!0}),e);var wo=ze(fr=>{var ko="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");fr.encode=function(e){if(0<=e&&e<ko.length)return ko[e];throw new TypeError("Must be between 0 and 63: "+e)};fr.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,u=43,l=47,s=26,c=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+s:o<=e&&e<=a?e-o+c:e==u?62:e==l?63:-1}});var Ao=ze(gr=>{var vo=wo(),dr=5,So=1<<dr,Co=So-1,To=So;function ul(e){return e<0?(-e<<1)+1:(e<<1)+0}function pl(e){var t=(e&1)===1,r=e>>1;return t?-r:r}gr.encode=function(t){var r="",n,i=ul(t);do n=i&Co,i>>>=dr,i>0&&(n|=To),r+=vo.encode(n);while(i>0);return r};gr.decode=function(t,r,n){var i=t.length,o=0,a=0,u,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=vo.decode(t.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(l&To),l&=Co,o=o+(l<<a),a+=dr}while(u);n.value=pl(o),n.rest=r}});var Nt=ze(Y=>{function hl(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Y.getArg=hl;var Eo=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ml=/^data:.+\,.+$/;function it(e){var t=e.match(Eo);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Y.urlParse=it;function je(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Y.urlGenerate=je;var fl=32;function dl(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var o=e(r);return t.unshift({input:r,result:o}),t.length>fl&&t.pop(),o}}var br=dl(function(t){var r=t,n=it(t);if(n){if(!n.path)return t;r=n.path}for(var i=Y.isAbsolute(r),o=[],a=0,u=0;;)if(a=u,u=r.indexOf("/",a),u===-1){o.push(r.slice(a));break}else for(o.push(r.slice(a,u));u<r.length&&r[u]==="/";)u++;for(var l,s=0,u=o.length-1;u>=0;u--)l=o[u],l==="."?o.splice(u,1):l===".."?s++:s>0&&(l===""?(o.splice(u+1,s),s=0):(o.splice(u,2),s--));return r=o.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,je(n)):r});Y.normalize=br;function Lo(e,t){e===""&&(e="."),t===""&&(t=".");var r=it(t),n=it(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),je(r);if(r||t.match(ml))return t;if(n&&!n.host&&!n.path)return n.host=t,je(n);var i=t.charAt(0)==="/"?t:br(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,je(n)):i}Y.join=Lo;Y.isAbsolute=function(e){return e.charAt(0)==="/"||Eo.test(e)};function gl(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Y.relative=gl;var Po=function(){var e=Object.create(null);return!("__proto__"in e)}();function Io(e){return e}function bl(e){return Do(e)?"$"+e:e}Y.toSetString=Po?Io:bl;function xl(e){return Do(e)?e.slice(1):e}Y.fromSetString=Po?Io:xl;function Do(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function yl(e,t,r){var n=xe(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:xe(e.name,t.name)}Y.compareByOriginalPositions=yl;function kl(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:xe(e.name,t.name)}Y.compareByOriginalPositionsNoSource=kl;function wl(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=xe(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:xe(e.name,t.name)}Y.compareByGeneratedPositionsDeflated=wl;function vl(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=xe(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:xe(e.name,t.name)}Y.compareByGeneratedPositionsDeflatedNoLine=vl;function xe(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function Sl(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=xe(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:xe(e.name,t.name)}Y.compareByGeneratedPositionsInflated=Sl;function Cl(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Y.parseSourceMapInput=Cl;function Tl(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=it(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=Lo(je(n),t)}return br(t)}Y.computeSourceURL=Tl});var Oo=ze(No=>{var xr=Nt(),yr=Object.prototype.hasOwnProperty,Le=typeof Map<"u";function ye(){this._array=[],this._set=Le?new Map:Object.create(null)}ye.fromArray=function(t,r){for(var n=new ye,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};ye.prototype.size=function(){return Le?this._set.size:Object.getOwnPropertyNames(this._set).length};ye.prototype.add=function(t,r){var n=Le?t:xr.toSetString(t),i=Le?this.has(t):yr.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(Le?this._set.set(t,o):this._set[n]=o)};ye.prototype.has=function(t){if(Le)return this._set.has(t);var r=xr.toSetString(t);return yr.call(this._set,r)};ye.prototype.indexOf=function(t){if(Le){var r=this._set.get(t);if(r>=0)return r}else{var n=xr.toSetString(t);if(yr.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};ye.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};ye.prototype.toArray=function(){return this._array.slice()};No.ArraySet=ye});var Fo=ze(Ro=>{var zo=Nt();function Al(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||zo.compareByGeneratedPositionsInflated(e,t)<=0}function Ot(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ot.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Ot.prototype.add=function(t){Al(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Ot.prototype.toArray=function(){return this._sorted||(this._array.sort(zo.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Ro.MappingList=Ot});var Bo=ze(Mo=>{var ot=Ao(),j=Nt(),zt=Oo().ArraySet,El=Fo().MappingList;function ie(e){e||(e={}),this._file=j.getArg(e,"file",null),this._sourceRoot=j.getArg(e,"sourceRoot",null),this._skipValidation=j.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=j.getArg(e,"ignoreInvalidMapping",!1),this._sources=new zt,this._names=new zt,this._mappings=new El,this._sourcesContents=null}ie.prototype._version=3;ie.fromSourceMap=function(t,r){var n=t.sourceRoot,i=new ie(Object.assign(r||{},{file:t.file,sourceRoot:n}));return t.eachMapping(function(o){var a={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(a.source=o.source,n!=null&&(a.source=j.relative(n,a.source)),a.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(a.name=o.name)),i.addMapping(a)}),t.sources.forEach(function(o){var a=o;n!==null&&(a=j.relative(n,o)),i._sources.has(a)||i._sources.add(a);var u=t.sourceContentFor(o);u!=null&&i.setSourceContent(o,u)}),i};ie.prototype.addMapping=function(t){var r=j.getArg(t,"generated"),n=j.getArg(t,"original",null),i=j.getArg(t,"source",null),o=j.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,o)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o}))};ie.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=j.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[j.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[j.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ie.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=j.relative(o,i));var a=new zt,u=new zt;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var s=t.originalPositionFor({line:l.originalLine,column:l.originalColumn});s.source!=null&&(l.source=s.source,n!=null&&(l.source=j.join(n,l.source)),o!=null&&(l.source=j.relative(o,l.source)),l.originalLine=s.line,l.originalColumn=s.column,s.name!=null&&(l.name=s.name))}var c=l.source;c!=null&&!a.has(c)&&a.add(c);var h=l.name;h!=null&&!u.has(h)&&u.add(h)},this),this._sources=a,this._names=u,t.sources.forEach(function(l){var s=t.sourceContentFor(l);s!=null&&(n!=null&&(l=j.join(n,l)),o!=null&&(l=j.relative(o,l)),this.setSourceContent(l,s))},this)};ie.prototype._validateMapping=function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var o="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;var o="Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}};ie.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,u="",l,s,c,h,m=this._mappings.toArray(),f=0,v=m.length;f<v;f++){if(s=m[f],l="",s.generatedLine!==r)for(t=0;s.generatedLine!==r;)l+=";",r++;else if(f>0){if(!j.compareByGeneratedPositionsInflated(s,m[f-1]))continue;l+=","}l+=ot.encode(s.generatedColumn-t),t=s.generatedColumn,s.source!=null&&(h=this._sources.indexOf(s.source),l+=ot.encode(h-a),a=h,l+=ot.encode(s.originalLine-1-i),i=s.originalLine-1,l+=ot.encode(s.originalColumn-n),n=s.originalColumn,s.name!=null&&(c=this._names.indexOf(s.name),l+=ot.encode(c-o),o=c)),u+=l}return u};ie.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=j.relative(r,n));var i=j.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};ie.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};ie.prototype.toString=function(){return JSON.stringify(this.toJSON())};Mo.SourceMapGenerator=ie});var df={};x(df,{reporters:()=>or,validate:()=>ff,validateAtrule:()=>ja,validateAtruleDescriptor:()=>Ua,validateAtrulePrelude:()=>qa,validateDeclaration:()=>Wa,validateRule:()=>Ha,version:()=>Za});var or={};x(or,{checkstyle:()=>oo,console:()=>io,gnu:()=>so,json:()=>no});function no(e){let t=[];for(let[r,n]of e)t.push(...n.map(i=>{let o=i.error||i;return{name:r,line:i.line||1,column:i.column||1,atrule:i.atrule,descriptor:i.descriptor,property:i.property,message:i.message,details:o.details||(o.rawMessage?o.message:null)}}));return JSON.stringify(t,null,4)}function io(e){let t=[];for(let[r,n]of e)t.push("# "+r),t.push(...n.map(function(i){return i.name==="SyntaxError"?" [ERROR] "+i.message:" * "+String(i.details).replace(/^[^\n]+/,i.message).replace(/\n/g,`
`)})),t.push("");return t.join(`
`)}function oo(e){let t=['<?xml version="1.0" encoding="utf-8"?>','<checkstyle version="4.3">'];for(let[r,n]of e)t.push(' <file name="'+r+'">',n.map(i=>' <error line="'+(i.line||1)+'" column="'+(i.column||1)+'" severity="error" message="'+String(i.message||i.error).replace(/&/g,"&").replace(/"/g,""")+'" source="csstree-validator"/>').join(`
`)," </file>");return t.push("</checkstyle>"),t.join(`
`)}function so(e){let t=[];for(let[r,n]of e)t.push(n.map(i=>{let o=i.line||-1,a=i.column||-1,u=i.message,l=i.css?": `"+i.css+"`":"",s=i.syntax?"; allowed: "+i.syntax:"",c=o+"."+a;return i.loc&&(c+="-"+i.loc.end.line+"."+i.loc.end.column),'"'+r+'":'+c+": error: "+u+l+s}).join(`
`));return t.join(`
`)}var Za="4.0.0";function _(e){return e>=48&&e<=57}function te(e){return _(e)||e>=65&&e<=70||e>=97&&e<=102}function Ct(e){return e>=65&&e<=90}function Ja(e){return e>=97&&e<=122}function el(e){return Ct(e)||Ja(e)}function tl(e){return e>=128}function St(e){return el(e)||tl(e)||e===95}function Xe(e){return St(e)||_(e)||e===45}function rl(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function $e(e){return e===10||e===13||e===12}function ce(e){return $e(e)||e===32||e===9}function J(e,t){return!(e!==92||$e(t)||t===0)}function Re(e,t,r){return e===45?St(t)||t===45||J(t,r):St(e)?!0:e===92?J(e,t):!1}function Tt(e,t,r){return e===43||e===45?_(t)?2:t===46&&_(r)?3:0:e===46?_(t)?2:0:_(e)?1:0}function At(e){return e===65279||e===65534?1:0}var sr=new Array(128),nl=128,Ze=130,ar=131,Et=132,lr=133;for(let e=0;e<sr.length;e++)sr[e]=ce(e)&&Ze||_(e)&&ar||St(e)&&Et||rl(e)&&lr||e||nl;function Lt(e){return e<128?sr[e]:Et}function Fe(e,t){return t<e.length?e.charCodeAt(t):0}function Pt(e,t,r){return r===13&&Fe(e,t+1)===10?2:1}function ge(e,t,r){let n=e.charCodeAt(t);return Ct(n)&&(n=n|32),n===r}function be(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let i=t;i<r;i++){let o=n.charCodeAt(i-t),a=e.charCodeAt(i);if(Ct(a)&&(a=a|32),a!==o)return!1}return!0}function ao(e,t){for(;t>=0&&ce(e.charCodeAt(t));t--);return t+1}function Je(e,t){for(;t<e.length&&ce(e.charCodeAt(t));t++);return t}function cr(e,t){for(;t<e.length&&_(e.charCodeAt(t));t++);return t}function ue(e,t){if(t+=2,te(Fe(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&te(Fe(e,t));t++);let r=Fe(e,t);ce(r)&&(t+=Pt(e,t,r))}return t}function et(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!Xe(r)){if(J(r,Fe(e,t+1))){t=ue(e,t)-1;continue}break}}return t}function Ae(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),_(r)&&(t=cr(e,t+1),r=e.charCodeAt(t)),r===46&&_(e.charCodeAt(t+1))&&(t+=2,t=cr(e,t)),ge(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),_(r)&&(t=cr(e,t+1+n+1))}return t}function It(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r===41){t++;break}J(r,Fe(e,t+1))&&(t=ue(e,t))}return t}function tt(e){if(e.length===1&&!te(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Me=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function Be(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var lo=10,il=12,co=13;function uo(e){let t=e.source,r=t.length,n=t.length>0?At(t.charCodeAt(0)):0,i=Be(e.lines,r),o=Be(e.columns,r),a=e.startLine,u=e.startColumn;for(let l=n;l<r;l++){let s=t.charCodeAt(l);i[l]=a,o[l]=u++,(s===lo||s===co||s===il)&&(s===co&&l+1<r&&t.charCodeAt(l+1)===lo&&(l++,i[l]=a,o[l]=u),a++,u=1)}i[r]=a,o[r]=u,e.lines=i,e.columns=o,e.computed=!0}var Dt=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(t,r=0,n=1,i=1){this.source=t,this.startOffset=r,this.startLine=n,this.startColumn=i,this.computed=!1}getLocation(t,r){return this.computed||uo(this),{source:r,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,r,n){return this.computed||uo(this),{source:n,start:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]},end:{offset:this.startOffset+r,line:this.lines[r],column:this.columns[r]}}}};var ne=16777215,pe=24,ol=new Map([[2,22],[21,22],[19,20],[23,24]]),rt=class{constructor(t,r){this.setSource(t,r)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(t="",r=()=>{}){t=String(t||"");let n=t.length,i=Be(this.offsetAndType,t.length+1),o=Be(this.balance,t.length+1),a=0,u=0,l=0,s=-1;for(this.offsetAndType=null,this.balance=null,r(t,(c,h,m)=>{switch(c){default:o[a]=n;break;case u:{let f=l≠for(l=o[f],u=l>>pe,o[a]=f,o[f++]=a;f<a;f++)o[f]===n&&(o[f]=a);break}case 21:case 2:case 19:case 23:o[a]=l,u=ol.get(c),l=u<<pe|a;break}i[a++]=c<<pe|m,s===-1&&(s=h)}),i[a]=0<<pe|n,o[a]=n,o[n]=n;l!==0;){let c=l≠l=o[c],o[c]=n}this.source=t,this.firstCharOffset=s===-1?0:s,this.tokenCount=a,this.offsetAndType=i,this.balance=o,this.reset(),this.next()}lookupType(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t]>>pe:0}lookupTypeNonSC(t){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>pe;if(n!==13&&n!==25&&t--===0)return n}return 0}lookupOffset(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t-1]&ne:this.source.length}lookupOffsetNonSC(t){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>pe;if(n!==13&&n!==25&&t--===0)return r-this.tokenIndex}return 0}lookupValue(t,r){return t+=this.tokenIndex,t<this.tokenCount?be(this.source,this.offsetAndType[t-1]&ne,this.offsetAndType[t]&ne,r):!1}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&ne:this.offsetAndType[this.tokenCount]&ne:this.firstCharOffset}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBalanceEdge(t){return this.balance[this.tokenIndex]<t}isDelim(t,r){return r?this.lookupType(r)===9&&this.source.charCodeAt(this.lookupOffset(r))===t:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===t}skip(t){let r=this.tokenIndex+t;r<this.tokenCount?(this.tokenIndex=r,this.tokenStart=this.offsetAndType[r-1]&ne,r=this.offsetAndType[r],this.tokenType=r>>pe,this.tokenEnd=r&ne):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.tokenEnd,t=this.offsetAndType[t],this.tokenType=t>>pe,this.tokenEnd=t&ne):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(t,r){let n=t,i,o;e:for(;n<this.tokenCount;n++){if(i=this.balance[n],i<t)break e;switch(o=n>0?this.offsetAndType[n-1]&ne:this.firstCharOffset,r(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[i]===n&&(n=i)}}this.skip(n-this.tokenIndex)}forEachToken(t){for(let r=0,n=this.firstCharOffset;r<this.tokenCount;r++){let i=n,o=this.offsetAndType[r],a=o&ne,u=o>>pe;n=a,t(u,i,a,r)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,i,o)=>{t[o]={idx:o,type:Me[r],chunk:this.source.substring(n,i),balance:this.balance[o]}}),t}};function Se(e,t){function r(h){return h<u?e.charCodeAt(h):0}function n(){if(s=Ae(e,s),Re(r(s),r(s+1),r(s+2))){c=12,s=et(e,s);return}if(r(s)===37){c=11,s++;return}c=10}function i(){let h=s;if(s=et(e,s),be(e,h,s,"url")&&r(s)===40){if(s=Je(e,s+1),r(s)===34||r(s)===39){c=2,s=h+4;return}a();return}if(r(s)===40){c=2,s++;return}c=1}function o(h){for(h||(h=r(s++)),c=5;s<e.length;s++){let m=e.charCodeAt(s);switch(Lt(m)){case h:s++;return;case Ze:if($e(m)){s+=Pt(e,s,m),c=6;return}break;case 92:if(s===e.length-1)break;let f=r(s+1);$e(f)?s+=Pt(e,s+1,f):J(m,f)&&(s=ue(e,s)-1);break}}}function a(){for(c=7,s=Je(e,s);s<e.length;s++){let h=e.charCodeAt(s);switch(Lt(h)){case 41:s++;return;case Ze:if(s=Je(e,s),r(s)===41||s>=e.length){s<e.length&&s++;return}s=It(e,s),c=8;return;case 34:case 39:case 40:case lr:s=It(e,s),c=8;return;case 92:if(J(h,r(s+1))){s=ue(e,s)-1;break}s=It(e,s),c=8;return}}}e=String(e||"");let u=e.length,l=At(r(0)),s=l,c;for(;s<u;){let h=e.charCodeAt(s);switch(Lt(h)){case Ze:c=13,s=Je(e,s+1);break;case 34:o();break;case 35:Xe(r(s+1))||J(r(s+1),r(s+2))?(c=4,s=et(e,s+1)):(c=9,s++);break;case 39:o();break;case 40:c=21,s++;break;case 41:c=22,s++;break;case 43:Tt(h,r(s+1),r(s+2))?n():(c=9,s++);break;case 44:c=18,s++;break;case 45:Tt(h,r(s+1),r(s+2))?n():r(s+1)===45&&r(s+2)===62?(c=15,s=s+3):Re(h,r(s+1),r(s+2))?i():(c=9,s++);break;case 46:Tt(h,r(s+1),r(s+2))?n():(c=9,s++);break;case 47:r(s+1)===42?(c=25,s=e.indexOf("*/",s+2),s=s===-1?e.length:s+2):(c=9,s++);break;case 58:c=16,s++;break;case 59:c=17,s++;break;case 60:r(s+1)===33&&r(s+2)===45&&r(s+3)===45?(c=14,s=s+4):(c=9,s++);break;case 64:Re(r(s+1),r(s+2),r(s+3))?(c=3,s=et(e,s+1)):(c=9,s++);break;case 91:c=19,s++;break;case 92:J(h,r(s+1))?i():(c=9,s++);break;case 93:c=20,s++;break;case 123:c=23,s++;break;case 125:c=24,s++;break;case ar:n();break;case Et:i();break;default:c=9,s++}t(c,l,l=s)}}var _e=null,ee=class e{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(t,r){let n;return _e!==null?(n=_e,_e=_e.cursor,n.prev=t,n.next=r,n.cursor=this.cursor):n={prev:t,next:r,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=_e,_e=t}updateCursors(t,r,n,i){let{cursor:o}=this;for(;o!==null;)o.prev===t&&(o.prev=r),o.next===n&&(o.next=i),o=o.cursor}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data}get size(){let t=0;for(let r=this.head;r!==null;r=r.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let r=null;this.head=null;for(let n of t){let i=e.createItem(n);r!==null?r.next=i:this.head=i,i.prev=r,r=i}return this.tail=r,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,r=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let i=n.next;n.next=i.next,t.call(r,i.data,i,this)}this.releaseCursor()}forEachRight(t,r=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let i=n.prev;n.prev=i.prev,t.call(r,i.data,i,this)}this.releaseCursor()}reduce(t,r,n=this){let i=this.allocateCursor(null,this.head),o=r,a;for(;i.next!==null;)a=i.next,i.next=a.next,o=t.call(n,o,a.data,a,this);return this.releaseCursor(),o}reduceRight(t,r,n=this){let i=this.allocateCursor(this.tail,null),o=r,a;for(;i.prev!==null;)a=i.prev,i.prev=a.prev,o=t.call(n,o,a.data,a,this);return this.releaseCursor(),o}some(t,r=this){for(let n=this.head;n!==null;n=n.next)if(t.call(r,n.data,n,this))return!0;return!1}map(t,r=this){let n=new e;for(let i=this.head;i!==null;i=i.next)n.appendData(t.call(r,i.data,i,this));return n}filter(t,r=this){let n=new e;for(let i=this.head;i!==null;i=i.next)t.call(r,i.data,i,this)&&n.appendData(i.data);return n}nextUntil(t,r,n=this){if(t===null)return;let i=this.allocateCursor(null,t);for(;i.next!==null;){let o=i.next;if(i.next=o.next,r.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(t,r,n=this){if(t===null)return;let i=this.allocateCursor(t,null);for(;i.prev!==null;){let o=i.prev;if(i.prev=o.prev,r.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let r of this)t.appendData(r);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head!==null?(this.head.prev=t,t.next=this.head):this.tail=t,this.head=t,this}prependData(t){return this.prepend(e.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(e.createItem(t))}insert(t,r=null){if(r!==null)if(this.updateCursors(r.prev,t,r,t),r.prev===null){if(this.head!==r)throw new Error("before doesn't belong to list");this.head=t,r.prev=t,t.next=r,this.updateCursors(null,t)}else r.prev.next=t,t.prev=r.prev,r.prev=t,t.next=r;else this.updateCursors(this.tail,t,null,t),this.tail!==null?(this.tail.next=t,t.prev=this.tail):this.head=t,this.tail=t;return this}insertData(t,r){return this.insert(e.createItem(t),r)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else{if(this.head!==t)throw new Error("item doesn't belong to list");this.head=t.next}if(t.next!==null)t.next.prev=t.prev;else{if(this.tail!==t)throw new Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(t){this.insert(e.createItem(t))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head!==null?this.remove(this.head):null}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,r){return t.head===null?this:(r!=null?(this.updateCursors(r.prev,t.tail,r,t.head),r.prev!==null?(r.prev.next=t.head,t.head.prev=r.prev):this.head=t.head,r.prev=t.tail,t.tail.next=r):(this.updateCursors(this.tail,t.tail,null,t.head),this.tail!==null?(this.tail.next=t.head,t.head.prev=this.tail):this.head=t.head,this.tail=t.tail),t.head=null,t.tail=null,this)}replace(t,r){"head"in r?this.insertList(r,t):this.insert(r,t),this.remove(t)}};function Ee(e,t){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
`)}})}var ur=100,po=60,ho=" ";function mo({source:e,line:t,column:r,baseLine:n,baseColumn:i},o){function a(v,Z){return s.slice(v,Z).map((H,C)=>String(v+C+1).padStart(m)+" |"+H).join(`
`)}let u=`
`.repeat(Math.max(n-1,0)),l=" ".repeat(Math.max(i-1,0)),s=(u+l+e).split(/\r\n?|\n|\f/),c=Math.max(1,t-o)-1,h=Math.min(t+o,s.length+1),m=Math.max(4,String(h).length)+1,f=0;r+=(ho.length-1)*(s[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>ur&&(f=r-po+3,r=po-2);for(let v=c;v<=h;v++)v>=0&&v<s.length&&(s[v]=s[v].replace(/\t/g,ho),s[v]=(f>0&&s[v].length>f?"\u2026":"")+s[v].substr(f,ur-2)+(s[v].length>f+ur-1?"\u2026":""));return[a(c,t),new Array(r+m+2).join("-")+"^",a(t,h)].filter(Boolean).join(`
`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function pr(e,t,r,n,i,o=1,a=1){return Object.assign(Ee("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(l){return mo({source:t,line:n,column:i,baseLine:o,baseColumn:a},isNaN(l)?0:l)},get formattedMessage(){return`Parse error: ${e}
`+mo({source:t,line:n,column:i,baseLine:o,baseColumn:a},2)}})}function fo(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let i=e.getNode.call(this,n);if(i===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,n),r=!1),t.push(i)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var go=()=>{},sl=33,al=35,hr=59,bo=123,xo=0;function ll(e){return function(){return this[e]()}}function mr(e){let t=Object.create(null);for(let r of Object.keys(e)){let n=e[r],i=n.parse||n;i&&(t[r]=i)}return t}function cl(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:mr(e.atrule),pseudo:mr(e.pseudo),node:mr(e.node)};for(let[r,n]of Object.entries(e.parseContext))switch(typeof n){case"function":t.context[r]=n;break;case"string":t.context[r]=ll(n);break}return{config:t,...t,...t.node}}function yo(e){let t="",r="<unknown>",n=!1,i=go,o=!1,a=new Dt,u=Object.assign(new rt,cl(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:fo,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===bo?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===bo||s===hr?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===sl||s===hr?1:0},consumeUntilSemicolonIncluded(s){return s===hr?2:0},createList(){return new ee},createSingleNodeList(s){return new ee().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,c){let h=this.tokenIndex;try{return s.call(this)}catch(m){if(o)throw m;this.skip(h-this.tokenIndex);let f=c.call(this);return o=!0,i(m,f),o=!1,f}},lookupNonWSType(s){let c;do if(c=this.lookupType(s++),c!==13&&c!==25)return c;while(c!==xo);return xo},charCodeAt(s){return s>=0&&s<t.length?t.charCodeAt(s):0},substring(s,c){return t.substring(s,c)},substrToCursor(s){return this.source.substring(s,this.tokenStart)},cmpChar(s,c){return ge(t,s,c)},cmpStr(s,c,h){return be(t,s,c,h)},consume(s){let c=this.tokenStart;return this.eat(s),this.substrToCursor(c)},consumeFunctionName(){let s=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),s},consumeNumber(s){let c=t.substring(this.tokenStart,Ae(t,this.tokenStart));return this.eat(s),c},eat(s){if(this.tokenType!==s){let c=Me[s].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),h=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,m=this.tokenStart;switch(s){case 1:this.tokenType===2||this.tokenType===7?(m=this.tokenEnd-1,h="Identifier is expected but function found"):h="Identifier is expected";break;case 4:this.isDelim(al)&&(this.next(),m++,h="Name is expected");break;case 11:this.tokenType===10&&(m=this.tokenEnd,h="Percent sign is expected");break}this.error(h,m)}this.next()},eatIdent(s){(this.tokenType!==1||this.lookupValue(0,s)===!1)&&this.error(`Identifier "${s}" is expected`),this.next()},eatDelim(s){this.isDelim(s)||this.error(`Delim "${String.fromCharCode(s)}" is expected`),this.next()},getLocation(s,c){return n?a.getLocationRange(s,c,r):null},getLocationFromList(s){if(n){let c=this.getFirstListNode(s),h=this.getLastListNode(s);return a.getLocationRange(c!==null?c.loc.start.offset-a.startOffset:this.tokenStart,h!==null?h.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(s,c){let h=typeof c<"u"&&c<t.length?a.getLocation(c):this.eof?a.getLocation(ao(t,t.length-1)):a.getLocation(this.tokenStart);throw new pr(s||"Unexpected input",t,h.offset,h.line,h.column,a.startLine,a.startColumn)}});return Object.assign(function(s,c){t=s,c=c||{},u.setSource(t,Se),a.setSource(t,c.offset,c.line,c.column),r=c.filename||"<unknown>",n=!!c.positions,i=typeof c.onParseError=="function"?c.onParseError:go,o=!1,u.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,u.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,u.parseValue="parseValue"in c?!!c.parseValue:!0,u.parseCustomProperty="parseCustomProperty"in c?!!c.parseCustomProperty:!1;let{context:h="default",onComment:m}=c;if(!(h in u.context))throw new Error("Unknown context `"+h+"`");typeof m=="function"&&u.forEachToken((v,Z,H)=>{if(v===25){let C=u.getLocation(Z,H),z=be(t,H-2,H,"*/")?t.slice(Z+2,H-2):t.slice(Z+2,H);m(z,C)}});let f=u.context[h].call(u,c);return u.eof||u.error(),f},{SyntaxError:pr,config:u.config})}var jo=Xa(Bo(),1),_o=new Set(["Atrule","Selector","Declaration"]);function qo(e){let t=new jo.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},i={line:1,column:0},o={generated:i},a=1,u=0,l=!1,s=e.node;e.node=function(m){if(m.loc&&m.loc.start&&_o.has(m.type)){let f=m.loc.start.line,v=m.loc.start.column-1;(n.line!==f||n.column!==v)&&(n.line=f,n.column=v,r.line=a,r.column=u,l&&(l=!1,(r.line!==i.line||r.column!==i.column)&&t.addMapping(o)),l=!0,t.addMapping({source:m.loc.source,original:n,generated:r}))}s.call(this,m),l&&_o.has(m.type)&&(i.line=a,i.column=u)};let c=e.emit;e.emit=function(m,f,v){for(let Z=0;Z<m.length;Z++)m.charCodeAt(Z)===10?(a++,u=0):u++;c(m,f,v)};let h=e.result;return e.result=function(){return l&&t.addMapping(o),{css:h(),map:t}},e}var Rt={};x(Rt,{safe:()=>wr,spec:()=>Dl});var Ll=43,Pl=45,kr=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let r=e.charCodeAt(0);return r>127?32768:r<<8}return e},Uo=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],Il=Uo.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function Wo(e){let t=new Set(e.map(([r,n])=>kr(r)<<16|kr(n)));return function(r,n,i){let o=kr(n,i),a=i.charCodeAt(0);return(a===Pl&&n!==1&&n!==2&&n!==15||a===Ll?t.has(r<<16|a<<8):t.has(r<<16|o))&&this.emit(" ",13,!0),o}}var Dl=Wo(Uo),wr=Wo(Il);var Nl=92;function Ol(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n});return}e.children.forEach(this.node,this)}function zl(e){Se(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function Ho(e){let t=new Map;for(let[r,n]of Object.entries(e.node))typeof(n.generate||n)=="function"&&t.set(r,n.generate||n);return function(r,n){let i="",o=0,a={node(l){if(t.has(l.type))t.get(l.type).call(u,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:wr,token(l,s){o=this.tokenBefore(o,l,s),this.emit(s,l,!1),l===9&&s.charCodeAt(0)===Nl&&this.emit(`
`,13,!0)},emit(l){i+=l},result(){return i}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=qo(a)),n.mode in Rt&&(a.tokenBefore=Rt[n.mode]));let u={node:l=>a.node(l),children:Ol,token:(l,s)=>a.token(l,s),tokenize:zl};return a.node(r),a.result()}}function Go(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof ee)&&(r.children=new ee().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof ee&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:vr}=Object.prototype,st=function(){};function Yo(e){return typeof e=="function"?e:st}function Vo(e,t){return function(r,n,i){r.type===t&&e.call(this,r,n,i)}}function Rl(e,t){let r=t.structure,n=[];for(let i in r){if(vr.call(r,i)===!1)continue;let o=r[i],a={name:i,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(let u of o)u===null?a.nullable=!0:typeof u=="string"?a.type="node":Array.isArray(u)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Fl(e){let t={};for(let r in e.node)if(vr.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Rl(r,n)}return t}function Ko(e,t){let r=e.fields.slice(),n=e.context,i=typeof n=="string";return t&&r.reverse(),function(o,a,u,l){let s;i&&(s=a[n],a[n]=o);for(let c of r){let h=o[c.name];if(!c.nullable||h){if(c.type==="list"){if(t?h.reduceRight(l,!1):h.reduce(l,!1))return!0}else if(u(h))return!0}}i&&(a[n]=s)}}function Qo({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}}}function Xo(e){let t=Fl(e),r={},n={},i=Symbol("break-walk"),o=Symbol("skip-node");for(let s in t)vr.call(t,s)&&t[s]!==null&&(r[s]=Ko(t[s],!1),n[s]=Ko(t[s],!0));let a=Qo(r),u=Qo(n),l=function(s,c){function h(C,z,we){let O=m.call(H,C,z,we);return O===i?!0:O===o?!1:!!(v.hasOwnProperty(C.type)&&v[C.type](C,H,h,Z)||f.call(H,C,z,we)===i)}let m=st,f=st,v=r,Z=(C,z,we,O)=>C||h(z,we,O),H={break:i,skip:o,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c=="function")m=c;else if(c&&(m=Yo(c.enter),f=Yo(c.leave),c.reverse&&(v=n),c.visit)){if(a.hasOwnProperty(c.visit))v=c.reverse?u[c.visit]:a[c.visit];else if(!t.hasOwnProperty(c.visit))throw new Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");m=Vo(m,c.visit),f=Vo(f,c.visit)}if(m===st&&f===st)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");h(s)};return l.break=i,l.skip=o,l.find=function(s,c){let h=null;return l(s,function(m,f,v){if(c.call(this,m,f,v))return h=m,i}),h},l.findLast=function(s,c){let h=null;return l(s,{reverse:!0,enter(m,f,v){if(c.call(this,m,f,v))return h=m,i}}),h},l.findAll=function(s,c){let h=[];return l(s,function(m,f,v){c.call(this,m,f,v)&&h.push(m)}),h},l}function Ml(e){return e}function Bl(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function _l(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function jl(e,t,r,n){let i=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",o=e.terms.map(a=>Sr(a,t,r,n)).join(i);return e.explicit||r?(n||o[0]===","?"[":"[ ")+o+(n?"]":" ]"):o}function Sr(e,t,r,n){let i;switch(e.type){case"Group":i=jl(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Sr(e.term,t,r,n)+t(Bl(e),e);case"Type":i="<"+e.name+(e.opts?t(_l(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}function qe(e,t){let r=Ml,n=!1,i=!1;return typeof t=="function"?r=t:t&&(n=!!t.forceBraces,i=!!t.compact,typeof t.decorate=="function"&&(r=t.decorate)),Sr(e,r,n,i)}var $o={offset:0,line:1,column:1};function ql(e,t){let r=e.tokens,n=e.longestMatch,i=n<r.length&&r[n].node||null,o=i!==t?i:null,a=0,u=0,l=0,s="",c,h;for(let m=0;m<r.length;m++){let f=r[m].value;m===n&&(u=f.length,a=s.length),o!==null&&r[m].node===o&&(m<=n?l++:l=0),s+=f}return n===r.length||l>1?(c=Ft(o||t,"end")||at($o,s),h=at(c)):(c=Ft(o,"start")||at(Ft(t,"start")||$o,s.slice(0,a)),h=Ft(o,"end")||at(c,s.substr(a,u))),{css:s,mismatchOffset:a,mismatchLength:u,start:c,end:h}}function Ft(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?at(r):r:null}function at({offset:e,line:t,column:r},n){let i={offset:e,line:t,column:r};if(n){let o=n.split(/\n|\r\n?|\f/);i.offset+=n.length,i.line+=o.length-1,i.column=o.length===1?i.column+n.length:o.pop().length+1}return i}var Ue=function(e,t){let r=Ee("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Zo=function(e,t,r,n){let i=Ee("SyntaxMatchError",e),{css:o,mismatchOffset:a,mismatchLength:u,start:l,end:s}=ql(n,r);return i.rawMessage=e,i.syntax=t?qe(t):"<generic>",i.css=o,i.mismatchOffset=a,i.mismatchLength=u,i.message=e+`
syntax: `+i.syntax+`
value: `+(o||"<empty string>")+`
--------`+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,l),i.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:l,end:s},i};var Mt=new Map,We=new Map,Bt=45,_t=Ul,lt=Wl;function jt(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Bt&&e.charCodeAt(t+1)===Bt}function Jo(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Bt&&e.charCodeAt(t+1)!==Bt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function Ul(e){if(Mt.has(e))return Mt.get(e);let t=e.toLowerCase(),r=Mt.get(t);if(r===void 0){let n=jt(t,0),i=n?"":Jo(t,0);r=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:n})}return Mt.set(e,r),r}function Wl(e){if(We.has(e))return We.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=jt(t,r.length);if(!n&&(t=t.toLowerCase(),We.has(t))){let u=We.get(t);return We.set(e,u),u}let i=n?"":Jo(t,r.length),o=t.substr(0,r.length+i.length),a=Object.freeze({basename:t.substr(o.length),name:t.substr(r.length),hack:r,vendor:i,prefix:o,custom:n});return We.set(e,a),a}var qt=["initial","inherit","unset","revert","revert-layer"];var ut=43,me=45,Cr=110,He=!0,Gl=!1;function Ar(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function ct(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Ce(e,t,r,n){if(!e)return 0;let i=e.value.charCodeAt(t);if(i===ut||i===me){if(r)return 0;t++}for(;t<e.value.length;t++)if(!_(e.value.charCodeAt(t)))return 0;return n+1}function Tr(e,t,r){let n=!1,i=ct(e,t,r);if(e=r(i),e===null)return t;if(e.type!==10)if(Ar(e,ut)||Ar(e,me)){if(n=!0,i=ct(r(++i),i,r),e=r(i),e===null||e.type!==10)return 0}else return t;if(!n){let o=e.value.charCodeAt(0);if(o!==ut&&o!==me)return 0}return Ce(e,n?0:1,n,i)}function Er(e,t){let r=0;if(!e)return 0;if(e.type===10)return Ce(e,0,Gl,r);if(e.type===1&&e.value.charCodeAt(0)===me){if(!ge(e.value,1,Cr))return 0;switch(e.value.length){case 2:return Tr(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==me?0:(r=ct(t(++r),r,t),e=t(r),Ce(e,0,He,r));default:return e.value.charCodeAt(2)!==me?0:Ce(e,3,He,r)}}else if(e.type===1||Ar(e,ut)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!ge(e.value,0,Cr))return 0;switch(e.value.length){case 1:return Tr(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==me?0:(r=ct(t(++r),r,t),e=t(r),Ce(e,0,He,r));default:return e.value.charCodeAt(1)!==me?0:Ce(e,2,He,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),i=n===ut||n===me?1:0,o=i;for(;o<e.value.length&&_(e.value.charCodeAt(o));o++);return o===i||!ge(e.value,o,Cr)?0:o+1===e.value.length?Tr(t(++r),r,t):e.value.charCodeAt(o+1)!==me?0:o+2===e.value.length?(r=ct(t(++r),r,t),e=t(r),Ce(e,0,He,r)):Ce(e,o+2,He,r)}return 0}var Yl=43,es=45,ts=63,Vl=117;function Lr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Kl(e,t){return e.value.charCodeAt(0)===t}function pt(e,t,r){let n=0;for(let i=t;i<e.value.length;i++){let o=e.value.charCodeAt(i);if(o===es&&r&&n!==0)return pt(e,t+n+1,!1),6;if(!te(o)||++n>6)return 0}return n}function Ut(e,t,r){if(!e)return 0;for(;Lr(r(t),ts);){if(++e>6)return 0;t++}return t}function Pr(e,t){let r=0;if(e===null||e.type!==1||!ge(e.value,0,Vl)||(e=t(++r),e===null))return 0;if(Lr(e,Yl))return e=t(++r),e===null?0:e.type===1?Ut(pt(e,0,!0),++r,t):Lr(e,ts)?Ut(1,++r,t):0;if(e.type===10){let n=pt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!Kl(e,es)||!pt(e,1,!1)?0:r+1:Ut(n,r,t))}return e.type===12?Ut(pt(e,1,!0),++r,t):0}var Ql=["calc(","-moz-calc(","-webkit-calc("],Ir=new Map([[2,22],[21,22],[19,20],[23,24]]);function ae(e,t){return t<e.length?e.charCodeAt(t):0}function rs(e,t){return be(e,0,e.length,t)}function ns(e,t){for(let r=0;r<t.length;r++)if(rs(e,t[r]))return!0;return!1}function is(e,t){return t!==e.length-2?!1:ae(e,t)===92&&_(ae(e,t+1))}function Wt(e,t,r){if(e&&e.type==="Range"){let n=Number(r!==void 0&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||e.min!==null&&n<e.min&&typeof e.min!="string"||e.max!==null&&n>e.max&&typeof e.max!="string")return!0}return!1}function Xl(e,t){let r=0,n=[],i=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){i++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Ir.get(e.type);break}i++}while(e=t(i));return i}function oe(e){return function(t,r,n){return t===null?0:t.type===2&&ns(t.value,Ql)?Xl(t,r):e(t,r,n)}}function N(e){return function(t){return t===null||t.type!==e?0:1}}function $l(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return ns(t,qt)||rs(t,"default")?0:1}function os(e){return e===null||e.type!==1||ae(e.value,0)!==45||ae(e.value,1)!==45?0:1}function Zl(e){return!os(e)||e.value==="--"?0:1}function Jl(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r<t;r++)if(!te(ae(e.value,r)))return 0;return 1}function ec(e){return e===null||e.type!==4||!Re(ae(e.value,1),ae(e.value,2),ae(e.value,3))?0:1}function tc(e,t){if(!e)return 0;let r=0,n=[],i=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(r===0)break e;break;case 9:if(r===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Ir.get(e.type);break}i++}while(e=t(i));return i}function rc(e,t){if(!e)return 0;let r=0,n=[],i=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Ir.get(e.type);break}i++}while(e=t(i));return i}function ke(e){return e&&(e=new Set(e)),function(t,r,n){if(t===null||t.type!==12)return 0;let i=Ae(t.value,0);if(e!==null){let o=t.value.indexOf("\\",i),a=o===-1||!is(t.value,o)?t.value.substr(i):t.value.substring(i,o);if(e.has(a.toLowerCase())===!1)return 0}return Wt(n,t.value,i)?0:1}}function nc(e,t,r){return e===null||e.type!==11||Wt(r,e.value,e.value.length-1)?0:1}function ss(e){return typeof e!="function"&&(e=function(){return 0}),function(t,r,n){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,r,n)}}function ic(e,t,r){if(e===null)return 0;let n=Ae(e.value,0);return!(n===e.value.length)&&!is(e.value,n)||Wt(r,e.value,n)?0:1}function oc(e,t,r){if(e===null||e.type!==10)return 0;let n=ae(e.value,0)===43||ae(e.value,0)===45?1:0;for(;n<e.value.length;n++)if(!_(ae(e.value,n)))return 0;return Wt(r,e.value,n)?0:1}var sc={"ident-token":N(1),"function-token":N(2),"at-keyword-token":N(3),"hash-token":N(4),"string-token":N(5),"bad-string-token":N(6),"url-token":N(7),"bad-url-token":N(8),"delim-token":N(9),"number-token":N(10),"percentage-token":N(11),"dimension-token":N(12),"whitespace-token":N(13),"CDO-token":N(14),"CDC-token":N(15),"colon-token":N(16),"semicolon-token":N(17),"comma-token":N(18),"[-token":N(19),"]-token":N(20),"(-token":N(21),")-token":N(22),"{-token":N(23),"}-token":N(24)},ac={string:N(5),ident:N(1),percentage:oe(nc),zero:ss(),number:oe(ic),integer:oe(oc),"custom-ident":$l,"dashed-ident":os,"custom-property-name":Zl,"hex-color":Jl,"id-selector":ec,"an-plus-b":Er,urange:Pr,"declaration-value":tc,"any-value":rc};function lc(e){let{angle:t,decibel:r,frequency:n,flex:i,length:o,resolution:a,semitones:u,time:l}=e||{};return{dimension:oe(ke(null)),angle:oe(ke(t)),decibel:oe(ke(r)),frequency:oe(ke(n)),flex:oe(ke(i)),length:oe(ss(ke(o))),resolution:oe(ke(a)),semitones:oe(ke(u)),time:oe(ke(l))}}function as(e){return{...sc,...ac,...lc(e)}}var Ht={};x(Ht,{angle:()=>uc,decibel:()=>dc,flex:()=>fc,frequency:()=>hc,length:()=>cc,resolution:()=>mc,semitones:()=>gc,time:()=>pc});var cc=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],uc=["deg","grad","rad","turn"],pc=["s","ms"],hc=["hz","khz"],mc=["dpi","dpcm","dppx","x"],fc=["fr"],dc=["db"],gc=["st"];function Dr(e,t,r){return Object.assign(Ee("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+`
`+t+`
--`+new Array((r||t.length)+1).join("-")+"^"})}var bc=9,xc=10,yc=12,kc=13,wc=32,Gt=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(t){for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r!==kc&&r!==xc&&r!==yc&&r!==wc&&r!==bc)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new Dr(t,this.str,this.pos)}};var vc=9,Sc=10,Cc=12,Tc=13,Ac=32,ds=33,zr=35,ls=38,Yt=39,gs=40,Ec=41,bs=42,Rr=43,Fr=44,cs=45,Mr=60,xs=62,Or=63,Lc=64,Xt=91,Br=93,Vt=123,us=124,ps=125,hs=8734,ht=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),ms={" ":1,"&&":2,"||":3,"|":4};function Kt(e){return e.substringToPos(e.findWsEnd(e.pos))}function Ge(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||ht[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Qt(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Pc(e){let t=e.str.index