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

1 line
3.0 KiB
JavaScript
Vendored

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8910],{48910:function(t,e,n){n.r(e),n.d(e,{go:function(){return u}});var o,r={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},i={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},a=/[+\-*&^%:=<>!|\/]/;function tokenBase(t,e){var n=t.next();if('"'==n||"'"==n||"`"==n)return e.tokenize=tokenString(n),e.tokenize(t,e);if(/[\d\.]/.test(n))return"."==n?t.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==n?t.match(/^[xX][0-9a-fA-F]+/)||t.match(/^0[0-7]+/):t.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(n))return o=n,null;if("/"==n){if(t.eat("*"))return e.tokenize=tokenComment,tokenComment(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(a.test(n))return t.eatWhile(a),"operator";t.eatWhile(/[\w\$_\xa1-\uffff]/);var u=t.current();return r.propertyIsEnumerable(u)?(("case"==u||"default"==u)&&(o="case"),"keyword"):i.propertyIsEnumerable(u)?"atom":"variable"}function tokenString(t){return function(e,n){for(var o,r=!1,i=!1;null!=(o=e.next());){if(o==t&&!r){i=!0;break}r=!r&&"`"!=t&&"\\"==o}return(i||!(r||"`"==t))&&(n.tokenize=tokenBase),"string"}}function tokenComment(t,e){for(var n,o=!1;n=t.next();){if("/"==n&&o){e.tokenize=tokenBase;break}o="*"==n}return"comment"}function Context(t,e,n,o,r){this.indented=t,this.column=e,this.type=n,this.align=o,this.prev=r}function pushContext(t,e,n){return t.context=new Context(t.indented,e,n,null,t.context)}function popContext(t){if(t.context.prev){var e=t.context.type;return(")"==e||"]"==e||"}"==e)&&(t.indented=t.context.indented),t.context=t.context.prev}}let u={name:"go",startState:function(t){return{tokenize:null,context:new Context(-t,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,e){var n=e.context;if(t.sol()&&(null==n.align&&(n.align=!1),e.indented=t.indentation(),e.startOfLine=!0,"case"==n.type&&(n.type="}")),t.eatSpace())return null;o=null;var r=(e.tokenize||tokenBase)(t,e);return"comment"==r||(null==n.align&&(n.align=!0),"{"==o?pushContext(e,t.column(),"}"):"["==o?pushContext(e,t.column(),"]"):"("==o?pushContext(e,t.column(),")"):"case"==o?n.type="case":"}"==o&&"}"==n.type?popContext(e):o==n.type&&popContext(e),e.startOfLine=!1),r},indent:function(t,e,n){if(t.tokenize!=tokenBase&&null!=t.tokenize)return null;var o=t.context,r=e&&e.charAt(0);if("case"==o.type&&/^(?:case|default)\b/.test(e))return o.indented;var i=r==o.type;return o.align?o.column+(i?0:1):o.indented+(i?0:n.unit)},languageData:{indentOnInput:/^\s([{}]|case |default\s*:)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}}}]);