mode-jsx-10a001cc.js 7.3 KB

12
  1. import{g as R}from"./index-63ed8a66.js";function b(x,v){for(var i=0;i<v.length;i++){const c=v[i];if(typeof c!="string"&&!Array.isArray(c)){for(const f in c)if(f!=="default"&&!(f in x)){const u=Object.getOwnPropertyDescriptor(c,f);u&&Object.defineProperty(x,f,u.get?u:{enumerable:!0,get:()=>c[f]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var k={exports:{}};(function(x,v){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(i,c,f){var u=i("../lib/oop"),h=i("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};u.inherits(o,h),o.getTagRule=function(g){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(g){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:g}},o.getEndRule=function(g){return{token:"comment.doc",regex:"\\*\\/",next:g}},c.DocCommentHighlightRules=o}),ace.define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(i,c,f){var u=i("../lib/oop"),h=i("../lib/lang"),o=i("./doc_comment_highlight_rules").DocCommentHighlightRules,g=i("./text_highlight_rules").TextHighlightRules,e=function(){var n=h.arrayToMap("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|if|throw|delete|in|try|class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|number|int|string|boolean|variant|log|assert".split("|")),t=h.arrayToMap("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined".split("|")),r=h.arrayToMap("debugger|with|const|export|let|private|public|yield|protected|extern|native|as|operator|__fake__|__readonly__".split("|")),a="[a-zA-Z_][a-zA-Z0-9_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:["storage.type","text","entity.name.function"],regex:"(function)(\\s+)("+a+")"},{token:function(l){return l=="this"?"variable.language":l=="function"?"storage.type":n.hasOwnProperty(l)||r.hasOwnProperty(l)?"keyword":t.hasOwnProperty(l)?"constant.language":/^_?[A-Z][a-zA-Z0-9_]*$/.test(l)?"language.support.class":"identifier"},regex:a},{token:"keyword.operator",regex:"!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};u.inherits(e,g),c.JsxHighlightRules=e}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(i,c,f){var u=i("../range").Range,h=function(){};(function(){this.checkOutdent=function(o,g){return/^\s+$/.test(o)?/^\s*\}/.test(g):!1},this.autoOutdent=function(o,g){var e=o.getLine(g),n=e.match(/^(\s*\})/);if(!n)return 0;var t=n[1].length,r=o.findMatchingBracket({row:g,column:t});if(!r||r.row==g)return 0;var a=this.$getIndent(o.getLine(r.row));o.replace(new u(g,0,g,t-1),a)},this.$getIndent=function(o){return o.match(/^\s*/)[0]}}).call(h.prototype),c.MatchingBraceOutdent=h}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(i,c,f){var u=i("../../lib/oop"),h=i("../../range").Range,o=i("./fold_mode").FoldMode,g=c.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};u.inherits(g,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,n,t){var r=e.getLine(t);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var a=this._getFoldWidgetBase(e,n,t);return!a&&this.startRegionRe.test(r)?"start":a},this.getFoldWidgetRange=function(e,n,t,r){var a=e.getLine(t);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,t);var s=a.match(this.foldingStartMarker);if(s){var l=s.index;if(s[1])return this.openingBracketBlock(e,s[1],t,l);var d=e.getCommentFoldRange(t,l+s[0].length,1);return d&&!d.isMultiLine()&&(r?d=this.getSectionRange(e,t):n!="all"&&(d=null)),d}if(n!=="markbegin"){var s=a.match(this.foldingStopMarker);if(s){var l=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],t,l):e.getCommentFoldRange(t,l,-1)}}},this.getSectionRange=function(e,n){var t=e.getLine(n),r=t.search(/\S/),a=n,l=t.length;n=n+1;for(var d=n,s=e.getLength();++n<s;){t=e.getLine(n);var m=t.search(/\S/);if(m!==-1){if(r>m)break;var p=this.getFoldWidgetRange(e,"all",n);if(p){if(p.start.row<=a)break;if(p.isMultiLine())n=p.end.row;else if(r==m)break}d=n}}return new h(a,l,d,e.getLine(d).length)},this.getCommentRegionBlock=function(e,n,t){for(var r=n.search(/\s*$/),a=e.getLength(),l=t,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++t<a;){n=e.getLine(t);var m=d.exec(n);if(m&&(m[1]?s--:s++,!s))break}var p=t;if(p>l)return new h(l,r,p,n.length)}}.call(g.prototype)}),ace.define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(i,c,f){var u=i("../lib/oop"),h=i("./text").Mode,o=i("./jsx_highlight_rules").JsxHighlightRules,g=i("./matching_brace_outdent").MatchingBraceOutdent,e=i("./folding/cstyle").FoldMode;function n(){this.HighlightRules=o,this.$outdent=new g,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new e}u.inherits(n,h),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(t,r,a){var l=this.$getIndent(r),d=this.getTokenizer().getLineTokens(r,t),s=d.tokens;if(s.length&&s[s.length-1].type=="comment")return l;if(t=="start"){var m=r.match(/^.*[\{\(\[]\s*$/);m&&(l+=a)}return l},this.checkOutdent=function(t,r,a){return this.$outdent.checkOutdent(r,a)},this.autoOutdent=function(t,r,a){this.$outdent.autoOutdent(r,a)},this.$id="ace/mode/jsx"}.call(n.prototype),c.Mode=n}),function(){ace.require(["ace/mode/jsx"],function(i){x&&(x.exports=i)})}()})(k);var _=k.exports;const y=R(_),$=b({__proto__:null,default:y},[_]);export{$ as m};
  2. //# sourceMappingURL=mode-jsx-10a001cc.js.map