chunk-6D4BEOWP.js 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209
  1. import {
  2. require_codemirror
  3. } from "./chunk-SPLH5WDX.js";
  4. import {
  5. __commonJS
  6. } from "./chunk-2LSFTFF7.js";
  7. // node_modules/.pnpm/codemirror@5.65.12/node_modules/codemirror/mode/javascript/javascript.js
  8. var require_javascript = __commonJS({
  9. "node_modules/.pnpm/codemirror@5.65.12/node_modules/codemirror/mode/javascript/javascript.js"(exports, module) {
  10. (function(mod) {
  11. if (typeof exports == "object" && typeof module == "object")
  12. mod(require_codemirror());
  13. else if (typeof define == "function" && define.amd)
  14. define(["../../lib/codemirror"], mod);
  15. else
  16. mod(CodeMirror);
  17. })(function(CodeMirror2) {
  18. "use strict";
  19. CodeMirror2.defineMode("javascript", function(config, parserConfig) {
  20. var indentUnit = config.indentUnit;
  21. var statementIndent = parserConfig.statementIndent;
  22. var jsonldMode = parserConfig.jsonld;
  23. var jsonMode = parserConfig.json || jsonldMode;
  24. var trackScope = parserConfig.trackScope !== false;
  25. var isTS = parserConfig.typescript;
  26. var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
  27. var keywords = function() {
  28. function kw(type2) {
  29. return { type: type2, style: "keyword" };
  30. }
  31. var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
  32. var operator = kw("operator"), atom = { type: "atom", style: "atom" };
  33. return {
  34. "if": kw("if"),
  35. "while": A,
  36. "with": A,
  37. "else": B,
  38. "do": B,
  39. "try": B,
  40. "finally": B,
  41. "return": D,
  42. "break": D,
  43. "continue": D,
  44. "new": kw("new"),
  45. "delete": C,
  46. "void": C,
  47. "throw": C,
  48. "debugger": kw("debugger"),
  49. "var": kw("var"),
  50. "const": kw("var"),
  51. "let": kw("var"),
  52. "function": kw("function"),
  53. "catch": kw("catch"),
  54. "for": kw("for"),
  55. "switch": kw("switch"),
  56. "case": kw("case"),
  57. "default": kw("default"),
  58. "in": operator,
  59. "typeof": operator,
  60. "instanceof": operator,
  61. "true": atom,
  62. "false": atom,
  63. "null": atom,
  64. "undefined": atom,
  65. "NaN": atom,
  66. "Infinity": atom,
  67. "this": kw("this"),
  68. "class": kw("class"),
  69. "super": kw("atom"),
  70. "yield": C,
  71. "export": kw("export"),
  72. "import": kw("import"),
  73. "extends": C,
  74. "await": C
  75. };
  76. }();
  77. var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
  78. var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
  79. function readRegexp(stream) {
  80. var escaped = false, next, inSet = false;
  81. while ((next = stream.next()) != null) {
  82. if (!escaped) {
  83. if (next == "/" && !inSet)
  84. return;
  85. if (next == "[")
  86. inSet = true;
  87. else if (inSet && next == "]")
  88. inSet = false;
  89. }
  90. escaped = !escaped && next == "\\";
  91. }
  92. }
  93. var type, content;
  94. function ret(tp, style, cont2) {
  95. type = tp;
  96. content = cont2;
  97. return style;
  98. }
  99. function tokenBase(stream, state) {
  100. var ch = stream.next();
  101. if (ch == '"' || ch == "'") {
  102. state.tokenize = tokenString(ch);
  103. return state.tokenize(stream, state);
  104. } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
  105. return ret("number", "number");
  106. } else if (ch == "." && stream.match("..")) {
  107. return ret("spread", "meta");
  108. } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
  109. return ret(ch);
  110. } else if (ch == "=" && stream.eat(">")) {
  111. return ret("=>", "operator");
  112. } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
  113. return ret("number", "number");
  114. } else if (/\d/.test(ch)) {
  115. stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
  116. return ret("number", "number");
  117. } else if (ch == "/") {
  118. if (stream.eat("*")) {
  119. state.tokenize = tokenComment;
  120. return tokenComment(stream, state);
  121. } else if (stream.eat("/")) {
  122. stream.skipToEnd();
  123. return ret("comment", "comment");
  124. } else if (expressionAllowed(stream, state, 1)) {
  125. readRegexp(stream);
  126. stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
  127. return ret("regexp", "string-2");
  128. } else {
  129. stream.eat("=");
  130. return ret("operator", "operator", stream.current());
  131. }
  132. } else if (ch == "`") {
  133. state.tokenize = tokenQuasi;
  134. return tokenQuasi(stream, state);
  135. } else if (ch == "#" && stream.peek() == "!") {
  136. stream.skipToEnd();
  137. return ret("meta", "meta");
  138. } else if (ch == "#" && stream.eatWhile(wordRE)) {
  139. return ret("variable", "property");
  140. } else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start))) {
  141. stream.skipToEnd();
  142. return ret("comment", "comment");
  143. } else if (isOperatorChar.test(ch)) {
  144. if (ch != ">" || !state.lexical || state.lexical.type != ">") {
  145. if (stream.eat("=")) {
  146. if (ch == "!" || ch == "=")
  147. stream.eat("=");
  148. } else if (/[<>*+\-|&?]/.test(ch)) {
  149. stream.eat(ch);
  150. if (ch == ">")
  151. stream.eat(ch);
  152. }
  153. }
  154. if (ch == "?" && stream.eat("."))
  155. return ret(".");
  156. return ret("operator", "operator", stream.current());
  157. } else if (wordRE.test(ch)) {
  158. stream.eatWhile(wordRE);
  159. var word = stream.current();
  160. if (state.lastType != ".") {
  161. if (keywords.propertyIsEnumerable(word)) {
  162. var kw = keywords[word];
  163. return ret(kw.type, kw.style, word);
  164. }
  165. if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
  166. return ret("async", "keyword", word);
  167. }
  168. return ret("variable", "variable", word);
  169. }
  170. }
  171. function tokenString(quote) {
  172. return function(stream, state) {
  173. var escaped = false, next;
  174. if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)) {
  175. state.tokenize = tokenBase;
  176. return ret("jsonld-keyword", "meta");
  177. }
  178. while ((next = stream.next()) != null) {
  179. if (next == quote && !escaped)
  180. break;
  181. escaped = !escaped && next == "\\";
  182. }
  183. if (!escaped)
  184. state.tokenize = tokenBase;
  185. return ret("string", "string");
  186. };
  187. }
  188. function tokenComment(stream, state) {
  189. var maybeEnd = false, ch;
  190. while (ch = stream.next()) {
  191. if (ch == "/" && maybeEnd) {
  192. state.tokenize = tokenBase;
  193. break;
  194. }
  195. maybeEnd = ch == "*";
  196. }
  197. return ret("comment", "comment");
  198. }
  199. function tokenQuasi(stream, state) {
  200. var escaped = false, next;
  201. while ((next = stream.next()) != null) {
  202. if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
  203. state.tokenize = tokenBase;
  204. break;
  205. }
  206. escaped = !escaped && next == "\\";
  207. }
  208. return ret("quasi", "string-2", stream.current());
  209. }
  210. var brackets = "([{}])";
  211. function findFatArrow(stream, state) {
  212. if (state.fatArrowAt)
  213. state.fatArrowAt = null;
  214. var arrow = stream.string.indexOf("=>", stream.start);
  215. if (arrow < 0)
  216. return;
  217. if (isTS) {
  218. var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow));
  219. if (m)
  220. arrow = m.index;
  221. }
  222. var depth = 0, sawSomething = false;
  223. for (var pos = arrow - 1; pos >= 0; --pos) {
  224. var ch = stream.string.charAt(pos);
  225. var bracket = brackets.indexOf(ch);
  226. if (bracket >= 0 && bracket < 3) {
  227. if (!depth) {
  228. ++pos;
  229. break;
  230. }
  231. if (--depth == 0) {
  232. if (ch == "(")
  233. sawSomething = true;
  234. break;
  235. }
  236. } else if (bracket >= 3 && bracket < 6) {
  237. ++depth;
  238. } else if (wordRE.test(ch)) {
  239. sawSomething = true;
  240. } else if (/["'\/`]/.test(ch)) {
  241. for (; ; --pos) {
  242. if (pos == 0)
  243. return;
  244. var next = stream.string.charAt(pos - 1);
  245. if (next == ch && stream.string.charAt(pos - 2) != "\\") {
  246. pos--;
  247. break;
  248. }
  249. }
  250. } else if (sawSomething && !depth) {
  251. ++pos;
  252. break;
  253. }
  254. }
  255. if (sawSomething && !depth)
  256. state.fatArrowAt = pos;
  257. }
  258. var atomicTypes = {
  259. "atom": true,
  260. "number": true,
  261. "variable": true,
  262. "string": true,
  263. "regexp": true,
  264. "this": true,
  265. "import": true,
  266. "jsonld-keyword": true
  267. };
  268. function JSLexical(indented, column, type2, align, prev, info) {
  269. this.indented = indented;
  270. this.column = column;
  271. this.type = type2;
  272. this.prev = prev;
  273. this.info = info;
  274. if (align != null)
  275. this.align = align;
  276. }
  277. function inScope(state, varname) {
  278. if (!trackScope)
  279. return false;
  280. for (var v = state.localVars; v; v = v.next)
  281. if (v.name == varname)
  282. return true;
  283. for (var cx2 = state.context; cx2; cx2 = cx2.prev) {
  284. for (var v = cx2.vars; v; v = v.next)
  285. if (v.name == varname)
  286. return true;
  287. }
  288. }
  289. function parseJS(state, style, type2, content2, stream) {
  290. var cc = state.cc;
  291. cx.state = state;
  292. cx.stream = stream;
  293. cx.marked = null, cx.cc = cc;
  294. cx.style = style;
  295. if (!state.lexical.hasOwnProperty("align"))
  296. state.lexical.align = true;
  297. while (true) {
  298. var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
  299. if (combinator(type2, content2)) {
  300. while (cc.length && cc[cc.length - 1].lex)
  301. cc.pop()();
  302. if (cx.marked)
  303. return cx.marked;
  304. if (type2 == "variable" && inScope(state, content2))
  305. return "variable-2";
  306. return style;
  307. }
  308. }
  309. }
  310. var cx = { state: null, column: null, marked: null, cc: null };
  311. function pass() {
  312. for (var i = arguments.length - 1; i >= 0; i--)
  313. cx.cc.push(arguments[i]);
  314. }
  315. function cont() {
  316. pass.apply(null, arguments);
  317. return true;
  318. }
  319. function inList(name, list) {
  320. for (var v = list; v; v = v.next)
  321. if (v.name == name)
  322. return true;
  323. return false;
  324. }
  325. function register(varname) {
  326. var state = cx.state;
  327. cx.marked = "def";
  328. if (!trackScope)
  329. return;
  330. if (state.context) {
  331. if (state.lexical.info == "var" && state.context && state.context.block) {
  332. var newContext = registerVarScoped(varname, state.context);
  333. if (newContext != null) {
  334. state.context = newContext;
  335. return;
  336. }
  337. } else if (!inList(varname, state.localVars)) {
  338. state.localVars = new Var(varname, state.localVars);
  339. return;
  340. }
  341. }
  342. if (parserConfig.globalVars && !inList(varname, state.globalVars))
  343. state.globalVars = new Var(varname, state.globalVars);
  344. }
  345. function registerVarScoped(varname, context) {
  346. if (!context) {
  347. return null;
  348. } else if (context.block) {
  349. var inner = registerVarScoped(varname, context.prev);
  350. if (!inner)
  351. return null;
  352. if (inner == context.prev)
  353. return context;
  354. return new Context(inner, context.vars, true);
  355. } else if (inList(varname, context.vars)) {
  356. return context;
  357. } else {
  358. return new Context(context.prev, new Var(varname, context.vars), false);
  359. }
  360. }
  361. function isModifier(name) {
  362. return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly";
  363. }
  364. function Context(prev, vars, block2) {
  365. this.prev = prev;
  366. this.vars = vars;
  367. this.block = block2;
  368. }
  369. function Var(name, next) {
  370. this.name = name;
  371. this.next = next;
  372. }
  373. var defaultVars = new Var("this", new Var("arguments", null));
  374. function pushcontext() {
  375. cx.state.context = new Context(cx.state.context, cx.state.localVars, false);
  376. cx.state.localVars = defaultVars;
  377. }
  378. function pushblockcontext() {
  379. cx.state.context = new Context(cx.state.context, cx.state.localVars, true);
  380. cx.state.localVars = null;
  381. }
  382. pushcontext.lex = pushblockcontext.lex = true;
  383. function popcontext() {
  384. cx.state.localVars = cx.state.context.vars;
  385. cx.state.context = cx.state.context.prev;
  386. }
  387. popcontext.lex = true;
  388. function pushlex(type2, info) {
  389. var result = function() {
  390. var state = cx.state, indent = state.indented;
  391. if (state.lexical.type == "stat")
  392. indent = state.lexical.indented;
  393. else
  394. for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
  395. indent = outer.indented;
  396. state.lexical = new JSLexical(indent, cx.stream.column(), type2, null, state.lexical, info);
  397. };
  398. result.lex = true;
  399. return result;
  400. }
  401. function poplex() {
  402. var state = cx.state;
  403. if (state.lexical.prev) {
  404. if (state.lexical.type == ")")
  405. state.indented = state.lexical.indented;
  406. state.lexical = state.lexical.prev;
  407. }
  408. }
  409. poplex.lex = true;
  410. function expect(wanted) {
  411. function exp(type2) {
  412. if (type2 == wanted)
  413. return cont();
  414. else if (wanted == ";" || type2 == "}" || type2 == ")" || type2 == "]")
  415. return pass();
  416. else
  417. return cont(exp);
  418. }
  419. ;
  420. return exp;
  421. }
  422. function statement(type2, value) {
  423. if (type2 == "var")
  424. return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
  425. if (type2 == "keyword a")
  426. return cont(pushlex("form"), parenExpr, statement, poplex);
  427. if (type2 == "keyword b")
  428. return cont(pushlex("form"), statement, poplex);
  429. if (type2 == "keyword d")
  430. return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
  431. if (type2 == "debugger")
  432. return cont(expect(";"));
  433. if (type2 == "{")
  434. return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
  435. if (type2 == ";")
  436. return cont();
  437. if (type2 == "if") {
  438. if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
  439. cx.state.cc.pop()();
  440. return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
  441. }
  442. if (type2 == "function")
  443. return cont(functiondef);
  444. if (type2 == "for")
  445. return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
  446. if (type2 == "class" || isTS && value == "interface") {
  447. cx.marked = "keyword";
  448. return cont(pushlex("form", type2 == "class" ? type2 : value), className, poplex);
  449. }
  450. if (type2 == "variable") {
  451. if (isTS && value == "declare") {
  452. cx.marked = "keyword";
  453. return cont(statement);
  454. } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
  455. cx.marked = "keyword";
  456. if (value == "enum")
  457. return cont(enumdef);
  458. else if (value == "type")
  459. return cont(typename, expect("operator"), typeexpr, expect(";"));
  460. else
  461. return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex);
  462. } else if (isTS && value == "namespace") {
  463. cx.marked = "keyword";
  464. return cont(pushlex("form"), expression, statement, poplex);
  465. } else if (isTS && value == "abstract") {
  466. cx.marked = "keyword";
  467. return cont(statement);
  468. } else {
  469. return cont(pushlex("stat"), maybelabel);
  470. }
  471. }
  472. if (type2 == "switch")
  473. return cont(
  474. pushlex("form"),
  475. parenExpr,
  476. expect("{"),
  477. pushlex("}", "switch"),
  478. pushblockcontext,
  479. block,
  480. poplex,
  481. poplex,
  482. popcontext
  483. );
  484. if (type2 == "case")
  485. return cont(expression, expect(":"));
  486. if (type2 == "default")
  487. return cont(expect(":"));
  488. if (type2 == "catch")
  489. return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
  490. if (type2 == "export")
  491. return cont(pushlex("stat"), afterExport, poplex);
  492. if (type2 == "import")
  493. return cont(pushlex("stat"), afterImport, poplex);
  494. if (type2 == "async")
  495. return cont(statement);
  496. if (value == "@")
  497. return cont(expression, statement);
  498. return pass(pushlex("stat"), expression, expect(";"), poplex);
  499. }
  500. function maybeCatchBinding(type2) {
  501. if (type2 == "(")
  502. return cont(funarg, expect(")"));
  503. }
  504. function expression(type2, value) {
  505. return expressionInner(type2, value, false);
  506. }
  507. function expressionNoComma(type2, value) {
  508. return expressionInner(type2, value, true);
  509. }
  510. function parenExpr(type2) {
  511. if (type2 != "(")
  512. return pass();
  513. return cont(pushlex(")"), maybeexpression, expect(")"), poplex);
  514. }
  515. function expressionInner(type2, value, noComma) {
  516. if (cx.state.fatArrowAt == cx.stream.start) {
  517. var body = noComma ? arrowBodyNoComma : arrowBody;
  518. if (type2 == "(")
  519. return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
  520. else if (type2 == "variable")
  521. return pass(pushcontext, pattern, expect("=>"), body, popcontext);
  522. }
  523. var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
  524. if (atomicTypes.hasOwnProperty(type2))
  525. return cont(maybeop);
  526. if (type2 == "function")
  527. return cont(functiondef, maybeop);
  528. if (type2 == "class" || isTS && value == "interface") {
  529. cx.marked = "keyword";
  530. return cont(pushlex("form"), classExpression, poplex);
  531. }
  532. if (type2 == "keyword c" || type2 == "async")
  533. return cont(noComma ? expressionNoComma : expression);
  534. if (type2 == "(")
  535. return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
  536. if (type2 == "operator" || type2 == "spread")
  537. return cont(noComma ? expressionNoComma : expression);
  538. if (type2 == "[")
  539. return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
  540. if (type2 == "{")
  541. return contCommasep(objprop, "}", null, maybeop);
  542. if (type2 == "quasi")
  543. return pass(quasi, maybeop);
  544. if (type2 == "new")
  545. return cont(maybeTarget(noComma));
  546. return cont();
  547. }
  548. function maybeexpression(type2) {
  549. if (type2.match(/[;\}\)\],]/))
  550. return pass();
  551. return pass(expression);
  552. }
  553. function maybeoperatorComma(type2, value) {
  554. if (type2 == ",")
  555. return cont(maybeexpression);
  556. return maybeoperatorNoComma(type2, value, false);
  557. }
  558. function maybeoperatorNoComma(type2, value, noComma) {
  559. var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
  560. var expr = noComma == false ? expression : expressionNoComma;
  561. if (type2 == "=>")
  562. return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
  563. if (type2 == "operator") {
  564. if (/\+\+|--/.test(value) || isTS && value == "!")
  565. return cont(me);
  566. if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
  567. return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
  568. if (value == "?")
  569. return cont(expression, expect(":"), expr);
  570. return cont(expr);
  571. }
  572. if (type2 == "quasi") {
  573. return pass(quasi, me);
  574. }
  575. if (type2 == ";")
  576. return;
  577. if (type2 == "(")
  578. return contCommasep(expressionNoComma, ")", "call", me);
  579. if (type2 == ".")
  580. return cont(property, me);
  581. if (type2 == "[")
  582. return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
  583. if (isTS && value == "as") {
  584. cx.marked = "keyword";
  585. return cont(typeexpr, me);
  586. }
  587. if (type2 == "regexp") {
  588. cx.state.lastType = cx.marked = "operator";
  589. cx.stream.backUp(cx.stream.pos - cx.stream.start - 1);
  590. return cont(expr);
  591. }
  592. }
  593. function quasi(type2, value) {
  594. if (type2 != "quasi")
  595. return pass();
  596. if (value.slice(value.length - 2) != "${")
  597. return cont(quasi);
  598. return cont(maybeexpression, continueQuasi);
  599. }
  600. function continueQuasi(type2) {
  601. if (type2 == "}") {
  602. cx.marked = "string-2";
  603. cx.state.tokenize = tokenQuasi;
  604. return cont(quasi);
  605. }
  606. }
  607. function arrowBody(type2) {
  608. findFatArrow(cx.stream, cx.state);
  609. return pass(type2 == "{" ? statement : expression);
  610. }
  611. function arrowBodyNoComma(type2) {
  612. findFatArrow(cx.stream, cx.state);
  613. return pass(type2 == "{" ? statement : expressionNoComma);
  614. }
  615. function maybeTarget(noComma) {
  616. return function(type2) {
  617. if (type2 == ".")
  618. return cont(noComma ? targetNoComma : target);
  619. else if (type2 == "variable" && isTS)
  620. return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma);
  621. else
  622. return pass(noComma ? expressionNoComma : expression);
  623. };
  624. }
  625. function target(_, value) {
  626. if (value == "target") {
  627. cx.marked = "keyword";
  628. return cont(maybeoperatorComma);
  629. }
  630. }
  631. function targetNoComma(_, value) {
  632. if (value == "target") {
  633. cx.marked = "keyword";
  634. return cont(maybeoperatorNoComma);
  635. }
  636. }
  637. function maybelabel(type2) {
  638. if (type2 == ":")
  639. return cont(poplex, statement);
  640. return pass(maybeoperatorComma, expect(";"), poplex);
  641. }
  642. function property(type2) {
  643. if (type2 == "variable") {
  644. cx.marked = "property";
  645. return cont();
  646. }
  647. }
  648. function objprop(type2, value) {
  649. if (type2 == "async") {
  650. cx.marked = "property";
  651. return cont(objprop);
  652. } else if (type2 == "variable" || cx.style == "keyword") {
  653. cx.marked = "property";
  654. if (value == "get" || value == "set")
  655. return cont(getterSetter);
  656. var m;
  657. if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
  658. cx.state.fatArrowAt = cx.stream.pos + m[0].length;
  659. return cont(afterprop);
  660. } else if (type2 == "number" || type2 == "string") {
  661. cx.marked = jsonldMode ? "property" : cx.style + " property";
  662. return cont(afterprop);
  663. } else if (type2 == "jsonld-keyword") {
  664. return cont(afterprop);
  665. } else if (isTS && isModifier(value)) {
  666. cx.marked = "keyword";
  667. return cont(objprop);
  668. } else if (type2 == "[") {
  669. return cont(expression, maybetype, expect("]"), afterprop);
  670. } else if (type2 == "spread") {
  671. return cont(expressionNoComma, afterprop);
  672. } else if (value == "*") {
  673. cx.marked = "keyword";
  674. return cont(objprop);
  675. } else if (type2 == ":") {
  676. return pass(afterprop);
  677. }
  678. }
  679. function getterSetter(type2) {
  680. if (type2 != "variable")
  681. return pass(afterprop);
  682. cx.marked = "property";
  683. return cont(functiondef);
  684. }
  685. function afterprop(type2) {
  686. if (type2 == ":")
  687. return cont(expressionNoComma);
  688. if (type2 == "(")
  689. return pass(functiondef);
  690. }
  691. function commasep(what, end, sep) {
  692. function proceed(type2, value) {
  693. if (sep ? sep.indexOf(type2) > -1 : type2 == ",") {
  694. var lex = cx.state.lexical;
  695. if (lex.info == "call")
  696. lex.pos = (lex.pos || 0) + 1;
  697. return cont(function(type3, value2) {
  698. if (type3 == end || value2 == end)
  699. return pass();
  700. return pass(what);
  701. }, proceed);
  702. }
  703. if (type2 == end || value == end)
  704. return cont();
  705. if (sep && sep.indexOf(";") > -1)
  706. return pass(what);
  707. return cont(expect(end));
  708. }
  709. return function(type2, value) {
  710. if (type2 == end || value == end)
  711. return cont();
  712. return pass(what, proceed);
  713. };
  714. }
  715. function contCommasep(what, end, info) {
  716. for (var i = 3; i < arguments.length; i++)
  717. cx.cc.push(arguments[i]);
  718. return cont(pushlex(end, info), commasep(what, end), poplex);
  719. }
  720. function block(type2) {
  721. if (type2 == "}")
  722. return cont();
  723. return pass(statement, block);
  724. }
  725. function maybetype(type2, value) {
  726. if (isTS) {
  727. if (type2 == ":")
  728. return cont(typeexpr);
  729. if (value == "?")
  730. return cont(maybetype);
  731. }
  732. }
  733. function maybetypeOrIn(type2, value) {
  734. if (isTS && (type2 == ":" || value == "in"))
  735. return cont(typeexpr);
  736. }
  737. function mayberettype(type2) {
  738. if (isTS && type2 == ":") {
  739. if (cx.stream.match(/^\s*\w+\s+is\b/, false))
  740. return cont(expression, isKW, typeexpr);
  741. else
  742. return cont(typeexpr);
  743. }
  744. }
  745. function isKW(_, value) {
  746. if (value == "is") {
  747. cx.marked = "keyword";
  748. return cont();
  749. }
  750. }
  751. function typeexpr(type2, value) {
  752. if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
  753. cx.marked = "keyword";
  754. return cont(value == "typeof" ? expressionNoComma : typeexpr);
  755. }
  756. if (type2 == "variable" || value == "void") {
  757. cx.marked = "type";
  758. return cont(afterType);
  759. }
  760. if (value == "|" || value == "&")
  761. return cont(typeexpr);
  762. if (type2 == "string" || type2 == "number" || type2 == "atom")
  763. return cont(afterType);
  764. if (type2 == "[")
  765. return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType);
  766. if (type2 == "{")
  767. return cont(pushlex("}"), typeprops, poplex, afterType);
  768. if (type2 == "(")
  769. return cont(commasep(typearg, ")"), maybeReturnType, afterType);
  770. if (type2 == "<")
  771. return cont(commasep(typeexpr, ">"), typeexpr);
  772. if (type2 == "quasi") {
  773. return pass(quasiType, afterType);
  774. }
  775. }
  776. function maybeReturnType(type2) {
  777. if (type2 == "=>")
  778. return cont(typeexpr);
  779. }
  780. function typeprops(type2) {
  781. if (type2.match(/[\}\)\]]/))
  782. return cont();
  783. if (type2 == "," || type2 == ";")
  784. return cont(typeprops);
  785. return pass(typeprop, typeprops);
  786. }
  787. function typeprop(type2, value) {
  788. if (type2 == "variable" || cx.style == "keyword") {
  789. cx.marked = "property";
  790. return cont(typeprop);
  791. } else if (value == "?" || type2 == "number" || type2 == "string") {
  792. return cont(typeprop);
  793. } else if (type2 == ":") {
  794. return cont(typeexpr);
  795. } else if (type2 == "[") {
  796. return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop);
  797. } else if (type2 == "(") {
  798. return pass(functiondecl, typeprop);
  799. } else if (!type2.match(/[;\}\)\],]/)) {
  800. return cont();
  801. }
  802. }
  803. function quasiType(type2, value) {
  804. if (type2 != "quasi")
  805. return pass();
  806. if (value.slice(value.length - 2) != "${")
  807. return cont(quasiType);
  808. return cont(typeexpr, continueQuasiType);
  809. }
  810. function continueQuasiType(type2) {
  811. if (type2 == "}") {
  812. cx.marked = "string-2";
  813. cx.state.tokenize = tokenQuasi;
  814. return cont(quasiType);
  815. }
  816. }
  817. function typearg(type2, value) {
  818. if (type2 == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?")
  819. return cont(typearg);
  820. if (type2 == ":")
  821. return cont(typeexpr);
  822. if (type2 == "spread")
  823. return cont(typearg);
  824. return pass(typeexpr);
  825. }
  826. function afterType(type2, value) {
  827. if (value == "<")
  828. return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
  829. if (value == "|" || type2 == "." || value == "&")
  830. return cont(typeexpr);
  831. if (type2 == "[")
  832. return cont(typeexpr, expect("]"), afterType);
  833. if (value == "extends" || value == "implements") {
  834. cx.marked = "keyword";
  835. return cont(typeexpr);
  836. }
  837. if (value == "?")
  838. return cont(typeexpr, expect(":"), typeexpr);
  839. }
  840. function maybeTypeArgs(_, value) {
  841. if (value == "<")
  842. return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
  843. }
  844. function typeparam() {
  845. return pass(typeexpr, maybeTypeDefault);
  846. }
  847. function maybeTypeDefault(_, value) {
  848. if (value == "=")
  849. return cont(typeexpr);
  850. }
  851. function vardef(_, value) {
  852. if (value == "enum") {
  853. cx.marked = "keyword";
  854. return cont(enumdef);
  855. }
  856. return pass(pattern, maybetype, maybeAssign, vardefCont);
  857. }
  858. function pattern(type2, value) {
  859. if (isTS && isModifier(value)) {
  860. cx.marked = "keyword";
  861. return cont(pattern);
  862. }
  863. if (type2 == "variable") {
  864. register(value);
  865. return cont();
  866. }
  867. if (type2 == "spread")
  868. return cont(pattern);
  869. if (type2 == "[")
  870. return contCommasep(eltpattern, "]");
  871. if (type2 == "{")
  872. return contCommasep(proppattern, "}");
  873. }
  874. function proppattern(type2, value) {
  875. if (type2 == "variable" && !cx.stream.match(/^\s*:/, false)) {
  876. register(value);
  877. return cont(maybeAssign);
  878. }
  879. if (type2 == "variable")
  880. cx.marked = "property";
  881. if (type2 == "spread")
  882. return cont(pattern);
  883. if (type2 == "}")
  884. return pass();
  885. if (type2 == "[")
  886. return cont(expression, expect("]"), expect(":"), proppattern);
  887. return cont(expect(":"), pattern, maybeAssign);
  888. }
  889. function eltpattern() {
  890. return pass(pattern, maybeAssign);
  891. }
  892. function maybeAssign(_type, value) {
  893. if (value == "=")
  894. return cont(expressionNoComma);
  895. }
  896. function vardefCont(type2) {
  897. if (type2 == ",")
  898. return cont(vardef);
  899. }
  900. function maybeelse(type2, value) {
  901. if (type2 == "keyword b" && value == "else")
  902. return cont(pushlex("form", "else"), statement, poplex);
  903. }
  904. function forspec(type2, value) {
  905. if (value == "await")
  906. return cont(forspec);
  907. if (type2 == "(")
  908. return cont(pushlex(")"), forspec1, poplex);
  909. }
  910. function forspec1(type2) {
  911. if (type2 == "var")
  912. return cont(vardef, forspec2);
  913. if (type2 == "variable")
  914. return cont(forspec2);
  915. return pass(forspec2);
  916. }
  917. function forspec2(type2, value) {
  918. if (type2 == ")")
  919. return cont();
  920. if (type2 == ";")
  921. return cont(forspec2);
  922. if (value == "in" || value == "of") {
  923. cx.marked = "keyword";
  924. return cont(expression, forspec2);
  925. }
  926. return pass(expression, forspec2);
  927. }
  928. function functiondef(type2, value) {
  929. if (value == "*") {
  930. cx.marked = "keyword";
  931. return cont(functiondef);
  932. }
  933. if (type2 == "variable") {
  934. register(value);
  935. return cont(functiondef);
  936. }
  937. if (type2 == "(")
  938. return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
  939. if (isTS && value == "<")
  940. return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef);
  941. }
  942. function functiondecl(type2, value) {
  943. if (value == "*") {
  944. cx.marked = "keyword";
  945. return cont(functiondecl);
  946. }
  947. if (type2 == "variable") {
  948. register(value);
  949. return cont(functiondecl);
  950. }
  951. if (type2 == "(")
  952. return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
  953. if (isTS && value == "<")
  954. return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl);
  955. }
  956. function typename(type2, value) {
  957. if (type2 == "keyword" || type2 == "variable") {
  958. cx.marked = "type";
  959. return cont(typename);
  960. } else if (value == "<") {
  961. return cont(pushlex(">"), commasep(typeparam, ">"), poplex);
  962. }
  963. }
  964. function funarg(type2, value) {
  965. if (value == "@")
  966. cont(expression, funarg);
  967. if (type2 == "spread")
  968. return cont(funarg);
  969. if (isTS && isModifier(value)) {
  970. cx.marked = "keyword";
  971. return cont(funarg);
  972. }
  973. if (isTS && type2 == "this")
  974. return cont(maybetype, maybeAssign);
  975. return pass(pattern, maybetype, maybeAssign);
  976. }
  977. function classExpression(type2, value) {
  978. if (type2 == "variable")
  979. return className(type2, value);
  980. return classNameAfter(type2, value);
  981. }
  982. function className(type2, value) {
  983. if (type2 == "variable") {
  984. register(value);
  985. return cont(classNameAfter);
  986. }
  987. }
  988. function classNameAfter(type2, value) {
  989. if (value == "<")
  990. return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter);
  991. if (value == "extends" || value == "implements" || isTS && type2 == ",") {
  992. if (value == "implements")
  993. cx.marked = "keyword";
  994. return cont(isTS ? typeexpr : expression, classNameAfter);
  995. }
  996. if (type2 == "{")
  997. return cont(pushlex("}"), classBody, poplex);
  998. }
  999. function classBody(type2, value) {
  1000. if (type2 == "async" || type2 == "variable" && (value == "static" || value == "get" || value == "set" || isTS && isModifier(value)) && cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false)) {
  1001. cx.marked = "keyword";
  1002. return cont(classBody);
  1003. }
  1004. if (type2 == "variable" || cx.style == "keyword") {
  1005. cx.marked = "property";
  1006. return cont(classfield, classBody);
  1007. }
  1008. if (type2 == "number" || type2 == "string")
  1009. return cont(classfield, classBody);
  1010. if (type2 == "[")
  1011. return cont(expression, maybetype, expect("]"), classfield, classBody);
  1012. if (value == "*") {
  1013. cx.marked = "keyword";
  1014. return cont(classBody);
  1015. }
  1016. if (isTS && type2 == "(")
  1017. return pass(functiondecl, classBody);
  1018. if (type2 == ";" || type2 == ",")
  1019. return cont(classBody);
  1020. if (type2 == "}")
  1021. return cont();
  1022. if (value == "@")
  1023. return cont(expression, classBody);
  1024. }
  1025. function classfield(type2, value) {
  1026. if (value == "!")
  1027. return cont(classfield);
  1028. if (value == "?")
  1029. return cont(classfield);
  1030. if (type2 == ":")
  1031. return cont(typeexpr, maybeAssign);
  1032. if (value == "=")
  1033. return cont(expressionNoComma);
  1034. var context = cx.state.lexical.prev, isInterface = context && context.info == "interface";
  1035. return pass(isInterface ? functiondecl : functiondef);
  1036. }
  1037. function afterExport(type2, value) {
  1038. if (value == "*") {
  1039. cx.marked = "keyword";
  1040. return cont(maybeFrom, expect(";"));
  1041. }
  1042. if (value == "default") {
  1043. cx.marked = "keyword";
  1044. return cont(expression, expect(";"));
  1045. }
  1046. if (type2 == "{")
  1047. return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
  1048. return pass(statement);
  1049. }
  1050. function exportField(type2, value) {
  1051. if (value == "as") {
  1052. cx.marked = "keyword";
  1053. return cont(expect("variable"));
  1054. }
  1055. if (type2 == "variable")
  1056. return pass(expressionNoComma, exportField);
  1057. }
  1058. function afterImport(type2) {
  1059. if (type2 == "string")
  1060. return cont();
  1061. if (type2 == "(")
  1062. return pass(expression);
  1063. if (type2 == ".")
  1064. return pass(maybeoperatorComma);
  1065. return pass(importSpec, maybeMoreImports, maybeFrom);
  1066. }
  1067. function importSpec(type2, value) {
  1068. if (type2 == "{")
  1069. return contCommasep(importSpec, "}");
  1070. if (type2 == "variable")
  1071. register(value);
  1072. if (value == "*")
  1073. cx.marked = "keyword";
  1074. return cont(maybeAs);
  1075. }
  1076. function maybeMoreImports(type2) {
  1077. if (type2 == ",")
  1078. return cont(importSpec, maybeMoreImports);
  1079. }
  1080. function maybeAs(_type, value) {
  1081. if (value == "as") {
  1082. cx.marked = "keyword";
  1083. return cont(importSpec);
  1084. }
  1085. }
  1086. function maybeFrom(_type, value) {
  1087. if (value == "from") {
  1088. cx.marked = "keyword";
  1089. return cont(expression);
  1090. }
  1091. }
  1092. function arrayLiteral(type2) {
  1093. if (type2 == "]")
  1094. return cont();
  1095. return pass(commasep(expressionNoComma, "]"));
  1096. }
  1097. function enumdef() {
  1098. return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex);
  1099. }
  1100. function enummember() {
  1101. return pass(pattern, maybeAssign);
  1102. }
  1103. function isContinuedStatement(state, textAfter) {
  1104. return state.lastType == "operator" || state.lastType == "," || isOperatorChar.test(textAfter.charAt(0)) || /[,.]/.test(textAfter.charAt(0));
  1105. }
  1106. function expressionAllowed(stream, state, backUp) {
  1107. return state.tokenize == tokenBase && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)));
  1108. }
  1109. return {
  1110. startState: function(basecolumn) {
  1111. var state = {
  1112. tokenize: tokenBase,
  1113. lastType: "sof",
  1114. cc: [],
  1115. lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
  1116. localVars: parserConfig.localVars,
  1117. context: parserConfig.localVars && new Context(null, null, false),
  1118. indented: basecolumn || 0
  1119. };
  1120. if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
  1121. state.globalVars = parserConfig.globalVars;
  1122. return state;
  1123. },
  1124. token: function(stream, state) {
  1125. if (stream.sol()) {
  1126. if (!state.lexical.hasOwnProperty("align"))
  1127. state.lexical.align = false;
  1128. state.indented = stream.indentation();
  1129. findFatArrow(stream, state);
  1130. }
  1131. if (state.tokenize != tokenComment && stream.eatSpace())
  1132. return null;
  1133. var style = state.tokenize(stream, state);
  1134. if (type == "comment")
  1135. return style;
  1136. state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
  1137. return parseJS(state, style, type, content, stream);
  1138. },
  1139. indent: function(state, textAfter) {
  1140. if (state.tokenize == tokenComment || state.tokenize == tokenQuasi)
  1141. return CodeMirror2.Pass;
  1142. if (state.tokenize != tokenBase)
  1143. return 0;
  1144. var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top;
  1145. if (!/^\s*else\b/.test(textAfter))
  1146. for (var i = state.cc.length - 1; i >= 0; --i) {
  1147. var c = state.cc[i];
  1148. if (c == poplex)
  1149. lexical = lexical.prev;
  1150. else if (c != maybeelse && c != popcontext)
  1151. break;
  1152. }
  1153. while ((lexical.type == "stat" || lexical.type == "form") && (firstChar == "}" || (top = state.cc[state.cc.length - 1]) && (top == maybeoperatorComma || top == maybeoperatorNoComma) && !/^[,\.=+\-*:?[\(]/.test(textAfter)))
  1154. lexical = lexical.prev;
  1155. if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
  1156. lexical = lexical.prev;
  1157. var type2 = lexical.type, closing = firstChar == type2;
  1158. if (type2 == "vardef")
  1159. return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
  1160. else if (type2 == "form" && firstChar == "{")
  1161. return lexical.indented;
  1162. else if (type2 == "form")
  1163. return lexical.indented + indentUnit;
  1164. else if (type2 == "stat")
  1165. return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
  1166. else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
  1167. return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
  1168. else if (lexical.align)
  1169. return lexical.column + (closing ? 0 : 1);
  1170. else
  1171. return lexical.indented + (closing ? 0 : indentUnit);
  1172. },
  1173. electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
  1174. blockCommentStart: jsonMode ? null : "/*",
  1175. blockCommentEnd: jsonMode ? null : "*/",
  1176. blockCommentContinue: jsonMode ? null : " * ",
  1177. lineComment: jsonMode ? null : "//",
  1178. fold: "brace",
  1179. closeBrackets: "()[]{}''\"\"``",
  1180. helperType: jsonMode ? "json" : "javascript",
  1181. jsonldMode,
  1182. jsonMode,
  1183. expressionAllowed,
  1184. skipExpression: function(state) {
  1185. parseJS(state, "atom", "atom", "true", new CodeMirror2.StringStream("", 2, null));
  1186. }
  1187. };
  1188. });
  1189. CodeMirror2.registerHelper("wordChars", "javascript", /[\w$]/);
  1190. CodeMirror2.defineMIME("text/javascript", "javascript");
  1191. CodeMirror2.defineMIME("text/ecmascript", "javascript");
  1192. CodeMirror2.defineMIME("application/javascript", "javascript");
  1193. CodeMirror2.defineMIME("application/x-javascript", "javascript");
  1194. CodeMirror2.defineMIME("application/ecmascript", "javascript");
  1195. CodeMirror2.defineMIME("application/json", { name: "javascript", json: true });
  1196. CodeMirror2.defineMIME("application/x-json", { name: "javascript", json: true });
  1197. CodeMirror2.defineMIME("application/manifest+json", { name: "javascript", json: true });
  1198. CodeMirror2.defineMIME("application/ld+json", { name: "javascript", jsonld: true });
  1199. CodeMirror2.defineMIME("text/typescript", { name: "javascript", typescript: true });
  1200. CodeMirror2.defineMIME("application/typescript", { name: "javascript", typescript: true });
  1201. });
  1202. }
  1203. });
  1204. export {
  1205. require_javascript
  1206. };
  1207. //# sourceMappingURL=chunk-6D4BEOWP.js.map