Files
owncast/static/web/_next/static/chunks/6092.528dc547249ef589.js
2023-11-24 06:25:00 +00:00

1 line
5.6 KiB
JavaScript
Vendored

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6092],{76092:function(e,t,n){function wordRegexp(e,t,n){return void 0===n&&(n=""),void 0===t&&(t="\\b"),RegExp("^"+n+"(("+e.join(")|(")+"))"+t)}n.r(t),n.d(t,{julia:function(){return b}});var r=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],a=wordRegexp(["[<>]:","[<>=]=","[!=]==","<<=?",">>>?=?","=>?","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),o=/^[;,()[\]{}]/,i=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,s=wordRegexp(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\uD800-\uDFFF]|[\uD800-\uDFFF][\uDC00-\uDFFF])"],"'"),u=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],c=["true","false","nothing","NaN","Inf"],l=wordRegexp(["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),m=wordRegexp(["end","else","elseif","catch","finally"]),p=wordRegexp(u),f=wordRegexp(c),h=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,d=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,k=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,F=wordRegexp(r,"","@"),g=wordRegexp(r,"",":");function inArray(e){return e.nestedArrays>0}function inGenerator(e){return e.nestedGenerators>0}function currentScope(e,t){return(void 0===t&&(t=0),e.scopes.length<=t)?null:e.scopes[e.scopes.length-(t+1)]}function tokenBase(e,t){if(e.match("#=",!1))return t.tokenize=tokenComment,t.tokenize(e,t);var n,r=t.leavingExpr;if(e.sol()&&(r=!1),t.leavingExpr=!1,r&&e.match(/^'+/))return"operator";if(e.match(/\.{4,}/))return"error";if(e.match(/\.{1,3}/))return"operator";if(e.eatSpace())return null;var s=e.peek();if("#"===s)return e.skipToEnd(),"comment";if("["===s&&(t.scopes.push("["),t.nestedArrays++),"("===s&&(t.scopes.push("("),t.nestedGenerators++),inArray(t)&&"]"===s){for(;t.scopes.length&&"["!==currentScope(t);)t.scopes.pop();t.scopes.pop(),t.nestedArrays--,t.leavingExpr=!0}if(inGenerator(t)&&")"===s){for(;t.scopes.length&&"("!==currentScope(t);)t.scopes.pop();t.scopes.pop(),t.nestedGenerators--,t.leavingExpr=!0}if(inArray(t)){if("end"==t.lastToken&&e.match(":"))return"operator";if(e.match("end"))return"number"}if((n=e.match(l,!1))&&t.scopes.push(n[0]),e.match(m,!1)&&t.scopes.pop(),e.match(/^::(?![:\$])/))return t.tokenize=tokenAnnotation,t.tokenize(e,t);if(!r&&(e.match(d)||e.match(g)))return"builtin";if(e.match(a))return"operator";if(e.match(/^\.?\d/,!1)){var u=RegExp(/^im\b/),c=!1;if(e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(c=!0),e.match(/^0x[0-9a-f_]+/i)&&(c=!0),e.match(/^0b[01_]+/i)&&(c=!0),e.match(/^0o[0-7_]+/i)&&(c=!0),e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(c=!0),e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(c=!0),c)return e.match(u),t.leavingExpr=!0,"number"}if(e.match("'"))return t.tokenize=tokenChar,t.tokenize(e,t);if(e.match(k))return t.tokenize=tokenStringFactory(e.current()),t.tokenize(e,t);if(e.match(h)||e.match(F))return"meta";if(e.match(o))return null;if(e.match(p))return"keyword";if(e.match(f))return"builtin";var b=t.isDefinition||"function"==t.lastToken||"macro"==t.lastToken||"type"==t.lastToken||"struct"==t.lastToken||"immutable"==t.lastToken;return e.match(i)?b?"."===e.peek()?(t.isDefinition=!0,"variable"):(t.isDefinition=!1,"def"):(t.leavingExpr=!0,"variable"):(e.next(),"error")}function tokenAnnotation(e,t){return e.match(/.*?(?=[,;{}()=\s]|$)/),e.match("{")?t.nestedParameters++:e.match("}")&&t.nestedParameters>0&&t.nestedParameters--,t.nestedParameters>0?e.match(/.*?(?={|})/)||e.next():0==t.nestedParameters&&(t.tokenize=tokenBase),"builtin"}function tokenComment(e,t){return e.match("#=")&&t.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match("=#")&&(t.nestedComments--,0==t.nestedComments&&(t.tokenize=tokenBase)),"comment"}function tokenChar(e,t){var n,r=!1;if(e.match(s))r=!0;else if(n=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){var a=parseInt(n[1],16);(a<=55295||a>=57344)&&(r=!0,e.next())}else if(n=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var a=parseInt(n[1],16);a<=1114111&&(r=!0,e.next())}return r?(t.leavingExpr=!0,t.tokenize=tokenBase,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match("'")&&(t.tokenize=tokenBase),"error")}function tokenStringFactory(e){return'"""'===e.substr(-3)?e='"""':'"'===e.substr(-1)&&(e='"'),function(t,n){if(t.eat("\\"))t.next();else{if(t.match(e))return n.tokenize=tokenBase,n.leavingExpr=!0,"string";t.eat(/[`"]/)}return t.eatWhile(/[^\\`"]/),"string"}}let b={name:"julia",startState:function(){return{tokenize:tokenBase,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),r=e.current();return r&&n&&(t.lastToken=r),n},indent:function(e,t,n){var r=0;return("]"===t||")"===t||/^end\b/.test(t)||/^else/.test(t)||/^catch\b/.test(t)||/^elseif\b/.test(t)||/^finally/.test(t))&&(r=-1),(e.scopes.length+r)*n.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:u.concat(c)}}}}]);