2018-11-07 15:33:56 +00:00
|
|
|
var usercssMeta=function(e){"use strict";class n extends Error{constructor(e){super(e.message),delete e.message,this.name="ParseError",Object.assign(this,e)}}class t extends n{constructor(e,n){super({code:"missingChar",args:e,message:`Missing character: ${e.map(e=>`'${e}'`).join(", ")}`,index:n})}}class a extends n{constructor(e){super({code:"EOF",message:"Unexpected end of file",index:e})}}const s=/<<<EOT([\s\S]+?)EOT;/y,l=/.*/y,i=/-?(\d+(\.\d+)?|\.\d+)([eE]-?\d+)?\s*/y,r=/\s*/y,o=/[^\S\n]*/y,u=/([\w-]+)\s*/y,d=/(`(?:\\`|[\s\S])*?`)/y,c=/((['"])(?:\\\2|[^\n])*?\2|\w+)/y,x=/[^"]*/y,p={__proto__:null,null:null,true:!0,false:!1};function f(e){return e.replace(/\*\\\//g,"*/")}function v(e){const n=e[0];return n!==e[e.length-1]||'"'!==n&&"'"!==n&&"`"!==n?f(e):e.slice(1,-1).replace(new RegExp(`\\\\([${n}\\\\/bfnrt]|u[0-9a-fA-F]{4})`,"g"),e=>e[1]===n?n:JSON.parse(`"${e}"`))}function m(e){l.lastIndex=e.lastIndex,l.exec(e.text),e.lastIndex=l.lastIndex}function g(e){r.lastIndex=e.lastIndex,e.lastIndex+=r.exec(e.text)[0].length}function y(e){if(e.lastIndex>=e.text.length)throw new a(e.lastIndex);e.index=e.lastIndex,e.value=e.text[e.lastIndex],e.lastIndex++,g(e)}function h(e){const t=e.lastIndex;u.lastIndex=t;const a=u.exec(e.text);if(!a)throw new n({code:"invalidWord",message:"Invalid word",index:t});e.index=t,e.value=a[1],e.lastIndex+=a[0].length}function w(e){const a=e.lastIndex;try{!function e(a){const{text:s}=a;if("{"===s[a.lastIndex]){const n={};for(a.lastIndex++,g(a);"}"!==s[a.lastIndex];){O(a);const l=a.value;if(":"!==s[a.lastIndex])throw new t([":"],a.lastIndex);if(a.lastIndex++,g(a),e(a),n[l]=a.value,","===s[a.lastIndex])a.lastIndex++,g(a);else if("}"!==s[a.lastIndex])throw new t([",","}"],a.lastIndex)}a.lastIndex++,g(a),a.value=n}else if("["===s[a.lastIndex]){const n=[];for(a.lastIndex++,g(a);"]"!==s[a.lastIndex];)if(e(a),n.push(a.value),","===s[a.lastIndex])a.lastIndex++,g(a);else if("]"!==s[a.lastIndex])throw new t([",","]"],a.lastIndex);a.lastIndex++,g(a),a.value=n}else if('"'===s[a.lastIndex]||"'"===s[a.lastIndex]||"`"===s[a.lastIndex])O(a);else if(/[-\d.]/.test(s[a.lastIndex]))S(a);else{if(h(a),!(a.value in p))throw new n({code:"unknownJSONLiteral",args:[a.value],message:`Unknown literal '${a.value}'`,index:a.index});a.value=p[a.value]}}(e)}catch(e){throw e.message=`Invalid JSON: ${e.message}`,e}e.index=a}function I(e){const t=e.lastIndex;s.lastIndex=t;const a=e.text.match(s);if(!a)throw new n({code:"missingEOT",message:"Missing EOT",index:t});e.index=t,e.lastIndex+=a[0].length,e.value=f(a[1].trim()),g(e)}function b(e){x.lastIndex=e.lastIndex;const n=x.exec(e.text);e.index=e.lastIndex,e.lastIndex=x.lastIndex,e.value=n[0].trim().replace(/\s+/g,"-")}function O(e,t=!1){const a=e.lastIndex,s="`"===e.text[a]?d:c;s.lastIndex=a;const l=s.exec(e.text);if(!l)throw new n({code:"invalidString",message:"Invalid string",index:a});e.index=a,e.lastIndex+=l[0].length,e.value=v(l[1]),t?function(e){o.lastIndex=e.lastIndex,e.lastIndex+=o.exec(e.text)[0].length}(e):g(e)}function S(e){const t=e.lastIndex;i.lastIndex=t;const a=i.exec(e.text);if(!a)throw new n({code:"invalidNumber",message:"Invalid number",index:t});e.index=t,e.value=Number(a[0].trim()),e.lastIndex+=a[0].length}function $(e){l.lastIndex=e.lastIndex;const n=l.exec(e.text);e.index=e.lastIndex,e.value=v(n[0].trim()),e.lastIndex=l.lastIndex}var k={eatLine:m,eatWhitespace:g,parseChar:y,parseEOT:I,parseJSON:w,parseNumber:S,parseString:O,parseStringToEnd:$,parseStringUnquoted:b,parseWord:h,unquote:v};const R=self.URL,E=new Set(["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pt","pc","px","deg","grad","rad","turn","s","ms","Hz","kHz","dpi","dpcm","dppx","%"]),j={name:$,version:$,namespace:$,author:$,description:$,homepageURL:$,supportURL:$,updateURL:$,license:$,preprocessor:$},U={version:function(e){const t=e.value.match(/\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/gi);if(!t||t[0]!==e.value)throw new n({code:"invalidVersion",args:[e.value],message:`Invalid ve
|