13 lines
188 KiB
JavaScript
Raw Normal View History

2025-09-05 14:59:21 +08:00
var csstree=(()=>{var Na=Object.create;var Lt=Object.defineProperty;var Oa=Object.getOwnPropertyDescriptor;var Fa=Object.getOwnPropertyNames;var Ra=Object.getPrototypeOf,Ma=Object.prototype.hasOwnProperty;var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x=(e,t)=>{for(var r in t)Lt(e,r,{get:t[r],enumerable:!0})},so=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fa(t))!Ma.call(e,i)&&i!==r&&Lt(e,i,{get:()=>t[i],enumerable:!(n=Oa(t,i))||n.enumerable});return e};var Ba=(e,t,r)=>(r=e!=null?Na(Ra(e)):{},so(t||!e||!e.__esModule?Lt(r,"default",{value:e,enumerable:!0}):r,e)),_a=e=>so(Lt({},"__esModule",{value:!0}),e);var vo=Be(br=>{var wo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");br.encode=function(e){if(0<=e&&e<wo.length)return wo[e];throw new TypeError("Must be between 0 and 63: "+e)};br.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 Lo=Be(yr=>{var So=vo(),xr=5,Co=1<<xr,To=Co-1,Ao=Co;function Xa(e){return e<0?(-e<<1)+1:(e<<1)+0}function $a(e){var t=(e&1)===1,r=e>>1;return t?-r:r}yr.encode=function(t){var r="",n,i=Xa(t);do n=i&To,i>>>=xr,i>0&&(n|=Ao),r+=So.encode(n);while(i>0);return r};yr.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=So.decode(t.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(l&Ao),l&=To,o=o+(l<<a),a+=xr}while(u);n.value=$a(o),n.rest=r}});var Rt=Be(V=>{function Za(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}V.getArg=Za;var Eo=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ja=/^data:.+\,.+$/;function at(e){var t=e.match(Eo);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}V.urlParse=at;function Ve(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}V.urlGenerate=Ve;var el=32;function tl(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>el&&t.pop(),o}}var kr=tl(function(t){var r=t,n=at(t);if(n){if(!n.path)return t;r=n.path}for(var i=V.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,Ve(n)):r});V.normalize=kr;function zo(e,t){e===""&&(e="."),t===""&&(t=".");var r=at(t),n=at(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ve(r);if(r||t.match(Ja))return t;if(n&&!n.host&&!n.path)return n.host=t,Ve(n);var i=t.charAt(0)==="/"?t:kr(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Ve(n)):i}V.join=zo;V.isAbsolute=function(e){return e.charAt(0)==="/"||Eo.test(e)};function rl(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)}V.relative=rl;var Po=function(){var e=Object.create(null);return!("__proto__"in e)}();function Io(e){return e}function nl(e){return Do(e)?"$"+e:e}V.toSetString=Po?Io:nl;function il(e){return Do(e)?e.slice(1):e}V.fromSetString=Po?Io:il;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 ol(e,t,r){var n=ye(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0
`)}})}var mr=100,ho=60,mo=" ";function fo({source:e,line:t,column:r,baseLine:n,baseColumn:i},o){function a(w,ee){return s.slice(w,ee).map((G,C)=>String(w+C+1).padStart(m)+" |"+G).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+=(mo.length-1)*(s[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>mr&&(f=r-ho+3,r=ho-2);for(let w=c;w<=h;w++)w>=0&&w<s.length&&(s[w]=s[w].replace(/\t/g,mo),s[w]=(f>0&&s[w].length>f?"\u2026":"")+s[w].substr(f,mr-2)+(s[w].length>f+mr-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 fr(e,t,r,n,i,o=1,a=1){return Object.assign(De("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(l){return fo({source:t,line:n,column:i,baseLine:o,baseColumn:a},isNaN(l)?0:l)},get formattedMessage(){return`Parse error: ${e}
`+fo({source:t,line:n,column:i,baseLine:o,baseColumn:a},2)}})}function go(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 bo=()=>{},Ya=33,Ka=35,dr=59,xo=123,yo=0;function Va(e){return function(){return this[e]()}}function gr(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 Qa(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:gr(e.atrule),pseudo:gr(e.pseudo),node:gr(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]=Va(n);break}return{config:t,...t,...t.node}}function ko(e){let t="",r="<unknown>",n=!1,i=bo,o=!1,a=new Ge,u=Object.assign(new Ye,Qa(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:go,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===xo?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===xo||s===dr?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Ya||s===dr?1:0},consumeUntilSemicolonIncluded(s){return s===dr?2:0},createList(){return new X},createSingleNodeList(s){return new X().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!==yo);return yo},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 be(t,s,c)},cmpStr(s,c,h){return xe(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,ze(t,this.tokenStart));return this.eat(s),c},eat(s){if(this.tokenType!==s){let c=Pe[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(Ka)&&(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 fr(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:bo,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.parseCustomProper
`,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 _t&&(a.tokenBefore=_t[n.mode]));let u={node:l=>a.node(l),children:yl,token:(l,s)=>a.token(l,s),tokenize:kl};return a.node(r),a.result()}}function Yo(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof X)&&(r.children=new X().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof X&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:Tr}=Object.prototype,ct=function(){};function Ko(e){return typeof e=="function"?e:ct}function Vo(e,t){return function(r,n,i){r.type===t&&e.call(this,r,n,i)}}function wl(e,t){let r=t.structure,n=[];for(let i in r){if(Tr.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 vl(e){let t={};for(let r in e.node)if(Tr.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]=wl(r,n)}return t}function Qo(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 Xo({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 $o(e){let t=vl(e),r={},n={},i=Symbol("break-walk"),o=Symbol("skip-node");for(let s in t)Tr.call(t,s)&&t[s]!==null&&(r[s]=Qo(t[s],!1),n[s]=Qo(t[s],!0));let a=Xo(r),u=Xo(n),l=function(s,c){function h(C,M,ve){let O=m.call(G,C,M,ve);return O===i?!0:O===o?!1:!!(w.hasOwnProperty(C.type)&&w[C.type](C,G,h,ee)||f.call(G,C,M,ve)===i)}let m=ct,f=ct,w=r,ee=(C,M,ve,O)=>C||h(M,ve,O),G={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=Ko(c.enter),f=Ko(c.leave),c.reverse&&(w=n),c.visit)){if(a.hasOwnProperty(c.visit))w=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===ct&&f===ct)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,w){if(c.call(this,m,f,w))return h=m,i}),h},l.findLast=function(s,c){let h=null;return l(s,{reverse:!0,enter(m,f,w){if(c.call(this,m,f,w))return h=m,i}}),h},l.findAll=function(s,c){let h=[];return l(s,function(m,f,w){c.call(this,m,f,w)&&h.push(m)}),h},l}function Sl(e){return e}function Cl(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 Tl(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 Al(e,t,r,n){let i=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",o=e.terms.map(a=>Wt(a,t,r,n)).join(i);return e.explicit||r?(n||o[0]===","?"[":"[ ")+o+(n?"]":" ]"):o}function Wt(e,t,r,n){let i;switch(e.type){case"Group":i=Al(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Wt(e.term,t,r,n)+t(Cl(e),e);case"Boolean":i="<boolean-expr["+Wt(e.term,t,r,n)+"]>";break;case"Type":i="<"+e.name+(e.opts?t(Tl(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
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 qt=new Map,Xe=new Map,Ut=45,pt=zl,Ht=Pl,El=Ar;function ht(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Ut&&e.charCodeAt(t+1)===Ut}function Ar(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Ut&&e.charCodeAt(t+1)!==Ut){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function zl(e){if(qt.has(e))return qt.get(e);let t=e.toLowerCase(),r=qt.get(t);if(r===void 0){let n=ht(t,0),i=n?"":Ar(t,0);r=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:n})}return qt.set(e,r),r}function Pl(e){if(Xe.has(e))return Xe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=ht(t,r.length);if(!n&&(t=t.toLowerCase(),Xe.has(t))){let u=Xe.get(t);return Xe.set(e,u),u}let i=n?"":Ar(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 Xe.set(e,a),a}var $e=["initial","inherit","unset","revert","revert-layer"];var ft=43,fe=45,Lr=110,Ze=!0,Dl=!1;function zr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function mt(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===ft||i===fe){if(r)return 0;t++}for(;t<e.value.length;t++)if(!j(e.value.charCodeAt(t)))return 0;return n+1}function Er(e,t,r){let n=!1,i=mt(e,t,r);if(e=r(i),e===null)return t;if(e.type!==10)if(zr(e,ft)||zr(e,fe)){if(n=!0,i=mt(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!==ft&&o!==fe)return 0}return Ce(e,n?0:1,n,i)}function Pr(e,t){let r=0;if(!e)return 0;if(e.type===10)return Ce(e,0,Dl,r);if(e.type===1&&e.value.charCodeAt(0)===fe){if(!be(e.value,1,Lr))return 0;switch(e.value.length){case 2:return Er(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==fe?0:(r=mt(t(++r),r,t),e=t(r),Ce(e,0,Ze,r));default:return e.value.charCodeAt(2)!==fe?0:Ce(e,3,Ze,r)}}else if(e.type===1||zr(e,ft)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!be(e.value,0,Lr))return 0;switch(e.value.length){case 1:return Er(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==fe?0:(r=mt(t(++r),r,t),e=t(r),Ce(e,0,Ze,r));default:return e.value.charCodeAt(1)!==fe?0:Ce(e,2,Ze,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),i=n===ft||n===fe?1:0,o=i;for(;o<e.value.length&&j(e.value.charCodeAt(o));o++);return o===i||!be(e.value,o,Lr)?0:o+1===e.value.length?Er(t(++r),r,t):e.value.charCodeAt(o+1)!==fe?0:o+2===e.value.length?(r=mt(t(++r),r,t),e=t(r),Ce(e,0,Ze,r)):Ce(e,o+2,Ze,r)}return 0}var Nl=43,es=45,ts=63,Ol=117;function Ir(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Fl(e,t){return e.value.charCodeAt(0)===t}function dt(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 dt(e,t+n+1,!1),6;if(!te(o)||++n>6)return 0}return n}function Gt(e,t,r){if(!e)return 0;for(;Ir(r(t),ts);){if(++e>6)return 0;t++}return t}function Dr(e,t){let r=0;if(e===null||e.type!==1||!be(e.value,0,Ol)||(e=t(++r),e===null))return 0;if(Ir(e,Nl))return e=t(++r),e===null?0:e.type===1?Gt(dt(e,0,!0),++r,t):Ir(e,ts)?Gt(1,++r,t):0;if(e.type===10){let n=dt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!Fl(e,es)||!dt(e,1,!1)?0:r+1:Gt(n,r,t))}return e.type===12?Gt(dt(e,1,!0),++r,t):0}var Rl=["calc(","-moz-calc(","-webkit-calc("],Nr=new Map([[2,22],[21,22],[19,20],[23,24]]);function le(e,t){return t<e.length?e.charCodeAt(t):0}function rs(e,t){return xe(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:le(e,t)===92&&j(le(e,t+1))}function Yt(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 Ml(e,t){let r=0,n
`+t+`
--`+new Array((r||t.length)+1).join("-")+"^"})}var ic=9,oc=10,sc=12,ac=13,lc=32,ls=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Qt=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)}isNameCharCode(t=this.charCode()){return t<128&&ls[t]===1}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!==ac&&r!==oc&&r!==sc&&r!==lc&&r!==ic)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 Vt(t,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let t=this.pos;for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r>=128||ls[r]===0)break}return this.pos===t&&this.error("Expect a keyword"),this.substringToPos(t)}scanNumber(){let t=this.pos;for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r<48||r>57)break}return this.pos===t&&this.error("Expect a number"),this.substringToPos(t)}scanString(){let t=this.str.indexOf("'",this.pos+1);return t===-1&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(t+1)}};var cc=9,uc=10,pc=12,hc=13,mc=32,gs=33,Mr=35,cs=38,Xt=39,bs=40,fc=41,xs=42,Br=43,_r=44,us=45,Wr=60,Fr=62,Rr=63,dc=64,gt=91,bt=93,$t=123,ps=124,hs=125,ms=8734,fs={" ":1,"&&":2,"||":3,"|":4};function ds(e){let t=null,r=null;return e.eat($t),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===_r?(e.pos++,e.skipWs(),e.charCode()!==hs&&(r=e.scanNumber(e),e.skipWs())):r=t,e.eat(hs),{min:Number(t),max:r?Number(r):0}}function gc(e){let t=null,r=!1;switch(e.charCode()){case xs:e.pos++,t={min:0,max:0};break;case Br:e.pos++,t={min:1,max:0};break;case Rr:e.pos++,t={min:0,max:1};break;case Mr:e.pos++,r=!0,e.charCode()===$t?t=ds(e):e.charCode()===Rr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case $t:t=ds(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Te(e,t){let r=gc(e);return r!==null?(r.term=t,e.charCode()===Mr&&e.charCodeAt(e.pos-1)===Br?Te(e,r):r):t}function Or(e){let t=e.peek();return t===""?null:Te(e,{type:"Token",value:t})}function bc(e){let t;return e.eat(Wr),e.eat(Xt),t=e.scanWord(),e.eat(Xt),e.eat(Fr),Te(e,{type:"Property",name:t})}function xc(e){let t=null,r=null,n=1;return e.eat(gt),e.charCode()===us&&(e.peek(),n=-1),n==-1&&e.charCode()===ms?e.peek():(t=n*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(_r),e.skipWs(),e.charCode()===ms?e.peek():(n=1,e.charCode()===us&&(e.peek(),n=-1),r=n*Number(e.scanNumber(e)),e.isNameCharCode()&&(r+=e.scanWord())),e.eat(bt),{type:"Range",min:t,max:r}}function yc(e){let t,r=null;if(e.eat(Wr),t=e.scanWord(),t==="boolean-expr"){e.eat(gt);let n=jr(e,bt);return e.eat(bt),e.eat(Fr),Te(e,{type:"Boolean",term:n.terms.length===1?n.terms[0]:n})}return e.charCode()===bs&&e.nextCharCode()===fc&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===gt&&(e.skipWs(),r=xc(e)),e.eat(Fr),Te(e,{type:"Type",name:t,opts:r})}function kc(e){let t=e.scanWord();return e.charCode()===bs?(e.pos++,{type:"Function",name:t}):Te(e,{type:"Keyword",name:t})}function wc(e,t){function r(i,o){return{type:"Group",terms:i,combinator:o,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((i,o)=>fs[i]-fs[o]);t.length>0;){n=t.shift();let i=0,o=0;for(;i<e.length;i++){let a=e[i];a.type==="Combinator"&&(a.value===n?(o===-1&&(o=i-1),e.splice(i,1),i--):(o!==-1&&i-o>1&&(e.splice(o,i-o,r(e.slice(o,i),n)),i=o+1),o=-1))}o!==-1&&t.length&&e.splice(o,i-o,r(e.slice(o,i),n))}return n}function jr(e,t){let r=Object.create(null),n=[],i,o=null,a=e.pos;for(;e.charCode()!==t&&(i=Sc(e,t));)i.type!=="Spaces"&&(i.type==="Combinator"?((o===null||o.type==="Combinator")&&