mode-json5-fbff6d3d.js 6.2 KB

1
  1. import{g as b}from"./index-15e3682d.js";function _(p,k){for(var o=0;o<k.length;o++){const l=k[o];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in p)){const c=Object.getOwnPropertyDescriptor(l,d);c&&Object.defineProperty(p,d,c.get?c:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var v={exports:{}};(function(p,k){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(o,l,d){var c=o("../lib/oop"),u=o("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{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:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};c.inherits(r,u),l.JsonHighlightRules=r}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(o,l,d){var c=o("../lib/oop"),u=o("./json_highlight_rules").JsonHighlightRules,r=function(){u.call(this);var g=[{token:"variable",regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:"variable",regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:"constant.language.boolean",regex:/(?:null)\b/},{token:"string",regex:/'/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/'|$/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:/"(?![^"]*":)/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/"|$/,next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/[+-]?(?:Infinity|NaN)\b/}];for(var e in this.$rules)this.$rules[e].unshift.apply(this.$rules[e],g);this.normalizeRules()};c.inherits(r,u),l.Json5HighlightRules=r}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(o,l,d){var c=o("../range").Range,u=function(){};(function(){this.checkOutdent=function(r,g){return/^\s+$/.test(r)?/^\s*\}/.test(g):!1},this.autoOutdent=function(r,g){var e=r.getLine(g),t=e.match(/^(\s*\})/);if(!t)return 0;var n=t[1].length,i=r.findMatchingBracket({row:g,column:n});if(!i||i.row==g)return 0;var a=this.$getIndent(r.getLine(i.row));r.replace(new c(g,0,g,n-1),a)},this.$getIndent=function(r){return r.match(/^\s*/)[0]}}).call(u.prototype),l.MatchingBraceOutdent=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(o,l,d){var c=o("../../lib/oop"),u=o("../../range").Range,r=o("./fold_mode").FoldMode,g=l.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};c.inherits(g,r),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,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var a=this._getFoldWidgetBase(e,t,n);return!a&&this.startRegionRe.test(i)?"start":a},this.getFoldWidgetRange=function(e,t,n,i){var a=e.getLine(n);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,n);var s=a.match(this.foldingStartMarker);if(s){var f=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,f);var h=e.getCommentFoldRange(n,f+s[0].length,1);return h&&!h.isMultiLine()&&(i?h=this.getSectionRange(e,n):t!="all"&&(h=null)),h}if(t!=="markbegin"){var s=a.match(this.foldingStopMarker);if(s){var f=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,f):e.getCommentFoldRange(n,f,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),i=n.search(/\S/),a=t,f=n.length;t=t+1;for(var h=t,s=e.getLength();++t<s;){n=e.getLine(t);var x=n.search(/\S/);if(x!==-1){if(i>x)break;var m=this.getFoldWidgetRange(e,"all",t);if(m){if(m.start.row<=a)break;if(m.isMultiLine())t=m.end.row;else if(i==x)break}h=t}}return new u(a,f,h,e.getLine(h).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),a=e.getLength(),f=n,h=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++n<a;){t=e.getLine(n);var x=h.exec(t);if(x&&(x[1]?s--:s++,!s))break}var m=n;if(m>f)return new u(f,i,m,t.length)}}.call(g.prototype)}),ace.define("ace/mode/json5",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json5_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(o,l,d){var c=o("../lib/oop"),u=o("./text").Mode,r=o("./json5_highlight_rules").Json5HighlightRules,g=o("./matching_brace_outdent").MatchingBraceOutdent,e=o("./folding/cstyle").FoldMode,t=function(){this.HighlightRules=r,this.$outdent=new g,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new e};c.inherits(t,u),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(n,i,a){return this.$outdent.checkOutdent(i,a)},this.autoOutdent=function(n,i,a){this.$outdent.autoOutdent(i,a)},this.$id="ace/mode/json5"}.call(t.prototype),l.Mode=t}),function(){ace.require(["ace/mode/json5"],function(o){p&&(p.exports=o)})}()})(v);var R=v.exports;const $=b(R),F=_({__proto__:null,default:$},[R]);export{F as m};