5 lines
7.6 KiB
JavaScript
5 lines
7.6 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6264],{6264:function(b,M,w){b=w.nmd(b),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(u,v,y){"use strict";var k=u("../lib/oop"),_=u("./text_highlight_rules").TextHighlightRules,p=function(){var x="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",m="true|false|nil|_G|_VERSION",i="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",d="string|package|os|io|math|debug|table|coroutine",o="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:x,"support.function":i,"keyword.deprecated":o,"constant.library":d,"constant.language":m,"variable.language":"self"},"identifier"),n="(?:(?:[1-9]\\d*)|(?:0))",a="(?:0[xX][\\dA-Fa-f]+)",e="(?:"+n+"|"+a+")",t="(?:\\.\\d+)",r="(?:\\d+)",l="(?:(?:"+r+"?"+t+")|(?:"+r+"\\.))",f="(?:"+l+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(g,h,c){return c.unshift(this.next,g.length-2,h),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(g,h,c){return g.length==c[1]?(c.shift(),c.shift(),this.next=c.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(g,h,c){return c.unshift(this.next,g.length,h),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(g,h,c){return g.length==c[1]?(c.shift(),c.shift(),this.next=c.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:f},{token:"constant.numeric",regex:e+"\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};k.inherits(p,_),v.LuaHighlightRules=p}),ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(u,v,y){"use strict";var k=u("../../lib/oop"),_=u("./fold_mode").FoldMode,p=u("../../range").Range,x=u("../../token_iterator").TokenIterator,m=v.FoldMode=function(){};k.inherits(m,_),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(i,d,o){var s=i.getLine(o),n=this.foldingStartMarker.test(s),a=this.foldingStopMarker.test(s);if(n&&!a){var t=s.match(this.foldingStartMarker);if(t[1]=="then"&&/\belseif\b/.test(s))return;if(t[1]){if(i.getTokenAt(o,t.index+1).type==="keyword")return"start"}else if(t[2]){var e=i.bgTokenizer.getState(o)||"";if(e[0]=="bracketedComment"||e[0]=="bracketedString")return"start"}else return"start"}if(d!="markbeginend"||!a||n&&a)return"";var t=s.match(this.foldingStopMarker);if(t[0]==="end"){if(i.getTokenAt(o,t.index+1).type==="keyword")return"end"}else if(t[0][0]==="]"){var e=i.bgTokenizer.getState(o-1)||"";if(e[0]=="bracketedComment"||e[0]=="bracketedString")return"end"}else return"end"},this.getFoldWidgetRange=function(i,d,o){var s=i.doc.getLine(o),n=this.foldingStartMarker.exec(s);if(n)return n[1]?this.luaBlock(i,o,n.index+1):n[2]?i.getCommentFoldRange(o,n.index+1):this.openingBracketBlock(i,"{",o,n.index);var n=this.foldingStopMarker.exec(s);if(n)return n[0]==="end"&&i.getTokenAt(o,n.index+1).type==="keyword"?this.luaBlock(i,o,n.index+1):n[0][0]==="]"?i.getCommentFoldRange(o,n.index+1):this.closingBracketBlock(i,"}",o,n.index+n[0].length)},this.luaBlock=function(i,d,o,s){var n=new x(i,d,o),a={function:1,do:1,then:1,elseif:-1,end:-1,repeat:1,until:-1},e=n.getCurrentToken();if(!(!e||e.type!="keyword")){var t=e.value,r=[t],l=a[t];if(!!l){var f=l===-1?n.getCurrentTokenColumn():i.getLine(d).length,g=d;for(n.step=l===-1?n.stepBackward:n.stepForward;e=n.step();)if(e.type==="keyword"){var h=l*a[e.value];if(h>0)r.unshift(e.value);else if(h<=0){if(r.shift(),!r.length&&e.value!="elseif")break;h===0&&r.unshift(e.value)}}if(!e)return null;if(s)return n.getCurrentTokenRange();var d=n.getCurrentTokenRow();return l===-1?new p(d,i.getLine(d).length,g,f):new p(g,f,d,n.getCurrentTokenColumn())}}}}.call(m.prototype)}),ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(u,v,y){"use strict";var k=u("../lib/oop"),_=u("./text").Mode,p=u("./lua_highlight_rules").LuaHighlightRules,x=u("./folding/lua").FoldMode,m=u("../range").Range,i=u("../worker/worker_client").WorkerClient,d=function(){this.HighlightRules=p,this.foldingRules=new x,this.$behaviour=this.$defaultBehaviour};k.inherits(d,_),function(){this.lineCommentStart="--",this.blockComment={start:"--[[",end:"--]]"};var o={function:1,then:1,do:1,else:1,elseif:1,repeat:1,end:-1,until:-1},s=["else","elseif","end","until"];function n(a){for(var e=0,t=0;t<a.length;t++){var r=a[t];r.type=="keyword"?r.value in o&&(e+=o[r.value]):r.type=="paren.lparen"?e+=r.value.length:r.type=="paren.rparen"&&(e-=r.value.length)}return e<0?-1:e>0?1:0}this.getNextLineIndent=function(a,e,t){var r=this.$getIndent(e),l=0,f=this.getTokenizer().getLineTokens(e,a),g=f.tokens;return a=="start"&&(l=n(g)),l>0?r+t:l<0&&r.substr(r.length-t.length)==t&&!this.checkOutdent(a,e,`
|
|
`)?r.substr(0,r.length-t.length):r},this.checkOutdent=function(a,e,t){if(t!=`
|
|
`&&t!="\r"&&t!=`\r
|
|
`)return!1;if(e.match(/^\s*[\)\}\]]$/))return!0;var r=this.getTokenizer().getLineTokens(e.trim(),a).tokens;return!r||!r.length?!1:r[0].type=="keyword"&&s.indexOf(r[0].value)!=-1},this.getMatching=function(a,e,t){if(e==null){var r=a.selection.lead;t=r.column,e=r.row}var l=a.getTokenAt(e,t);if(l&&l.value in o)return this.foldingRules.luaBlock(a,e,t,!0)},this.autoOutdent=function(a,e,t){var r=e.getLine(t),l=r.match(/^\s*/)[0].length;if(!(!l||!t)){var f=this.getMatching(e,t,l+1);if(!(!f||f.start.row==t)){var g=this.$getIndent(e.getLine(f.start.row));g.length!=l&&(e.replace(new m(t,0,t,l),g),e.outdentRows(new m(t+1,0,t+1,0)))}}},this.createWorker=function(a){var e=new i(["ace"],"ace/mode/lua_worker","Worker");return e.attachToDocument(a.getDocument()),e.on("annotate",function(t){a.setAnnotations(t.data)}),e.on("terminate",function(){a.clearAnnotations()}),e},this.$id="ace/mode/lua",this.snippetFileId="ace/snippets/lua"}.call(d.prototype),v.Mode=d}),function(){ace.require(["ace/mode/lua"],function(u){b&&(b.exports=u)})}()}}]);
|