You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
17 KiB
2 lines
17 KiB
6 months ago
|
function fr(x){var pr=x.statementIndent,ur=x.jsonld,br=x.json||ur,k=x.typescript,U=x.wordCharacters||/[\w$\xa1-\uffff]/,wr=function(){function r(y){return{type:y,style:"keyword"}}var e=r("keyword a"),t=r("keyword b"),f=r("keyword c"),u=r("keyword d"),c=r("operator"),m={type:"atom",style:"atom"};return{if:r("if"),while:e,with:e,else:t,do:t,try:t,finally:t,return:u,break:u,continue:u,new:r("new"),delete:f,void:f,throw:f,debugger:r("debugger"),var:r("var"),const:r("var"),let:r("var"),function:r("function"),catch:r("catch"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:c,typeof:c,instanceof:c,true:m,false:m,null:m,undefined:m,NaN:m,Infinity:m,this:r("this"),class:r("class"),super:r("atom"),yield:f,export:r("export"),import:r("import"),extends:f,await:f}}(),hr=/[+\-*&%=<>!?|~^@]/,Or=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function qr(r){for(var e=!1,t,f=!1;(t=r.next())!=null;){if(!e){if(t=="/"&&!f)return;t=="["?f=!0:f&&t=="]"&&(f=!1)}e=!e&&t=="\\"}}var D,G;function b(r,e,t){return D=r,G=t,e}function S(r,e){var t=r.next();if(t=='"'||t=="'")return e.tokenize=Nr(t),e.tokenize(r,e);if(t=="."&&r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return b("number","number");if(t=="."&&r.match(".."))return b("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(t))return b(t);if(t=="="&&r.eat(">"))return b("=>","operator");if(t=="0"&&r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return b("number","number");if(/\d/.test(t))return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),b("number","number");if(t=="/")return r.eat("*")?(e.tokenize=H,H(r,e)):r.eat("/")?(r.skipToEnd(),b("comment","comment")):ce(r,e,1)?(qr(r),r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),b("regexp","string.special")):(r.eat("="),b("operator","operator",r.current()));if(t=="`")return e.tokenize=L,L(r,e);if(t=="#"&&r.peek()=="!")return r.skipToEnd(),b("meta","meta");if(t=="#"&&r.eatWhile(U))return b("variable","property");if(t=="<"&&r.match("!--")||t=="-"&&r.match("->")&&!/\S/.test(r.string.slice(0,r.start)))return r.skipToEnd(),b("comment","comment");if(hr.test(t))return(t!=">"||!e.lexical||e.lexical.type!=">")&&(r.eat("=")?(t=="!"||t=="=")&&r.eat("="):/[<>*+\-|&?]/.test(t)&&(r.eat(t),t==">"&&r.eat(t))),t=="?"&&r.eat(".")?b("."):b("operator","operator",r.current());if(U.test(t)){r.eatWhile(U);var f=r.current();if(e.lastType!="."){if(wr.propertyIsEnumerable(f)){var u=wr[f];return b(u.type,u.style,f)}if(f=="async"&&r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return b("async","keyword",f)}return b("variable","variable",f)}}function Nr(r){return function(e,t){var f=!1,u;if(ur&&e.peek()=="@"&&e.match(Or))return t.tokenize=S,b("jsonld-keyword","meta");for(;(u=e.next())!=null&&!(u==r&&!f);)f=!f&&u=="\\";return f||(t.tokenize=S),b("string","string")}}function H(r,e){for(var t=!1,f;f=r.next();){if(f=="/"&&t){e.tokenize=S;break}t=f=="*"}return b("comment","comment")}function L(r,e){for(var t=!1,f;(f=r.next())!=null;){if(!t&&(f=="`"||f=="$"&&r.eat("{"))){e.tokenize=S;break}t=!t&&f=="\\"}return b("quasi","string.special",r.current())}var Br="([{}])";function ar(r,e){e.fatArrowAt&&(e.fatArrowAt=null);var t=r.string.indexOf("=>",r.start);if(!(t<0)){if(k){var f=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start,t));f&&(t=f.index)}for(var u=0,c=!1,m=t-1;m>=0;--m){var y=r.string.charAt(m),v=Br.indexOf(y);if(v>=0&&v<3){if(!u){++m;break}if(--u==0){y=="("&&(c=!0);break}}else if(v>=3&&v<6)++u;else if(U.test(y))c=!0;else if(/["'\/`]/.test(y))for(;;--m){if(m==0)return;var K=r.string.charAt(m-1);if(K==y&&r.string.charAt(m-2)!="\\"){m--;break}}else if(c&&!u){++m;break}}c&&!u&&(e.fatArrowAt=m)}}var Fr={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function xr(r,e,t,f,u,c){this.indented=r,this.column=e,this.type=t,this.prev=u,this.info=c,f!=null&&(this.align=f)}function Jr(r,e){for(var t=r.localVars;t;t=t.next)if(t.name==e)return!0;for(var f=r.context;f;f=f.prev)for(var t=f.vars;t;t=t.next)if(t.name==e)return!0}function Mr(r,e,t,f,u){var c=r.cc;for(
|