chunk-2RUEMQ2Y.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. import {
  2. editor_api_exports
  3. } from "./chunk-5Q5BEFT4.js";
  4. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js
  5. var __defProp = Object.defineProperty;
  6. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  7. var __getOwnPropNames = Object.getOwnPropertyNames;
  8. var __hasOwnProp = Object.prototype.hasOwnProperty;
  9. var __copyProps = (to, from, except, desc) => {
  10. if (from && typeof from === "object" || typeof from === "function") {
  11. for (let key of __getOwnPropNames(from))
  12. if (!__hasOwnProp.call(to, key) && key !== except)
  13. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  14. }
  15. return to;
  16. };
  17. var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
  18. var monaco_editor_core_exports = {};
  19. __reExport(monaco_editor_core_exports, editor_api_exports);
  20. var conf = {
  21. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
  22. comments: {
  23. lineComment: "//",
  24. blockComment: ["/*", "*/"]
  25. },
  26. brackets: [
  27. ["{", "}"],
  28. ["[", "]"],
  29. ["(", ")"]
  30. ],
  31. onEnterRules: [
  32. {
  33. beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
  34. afterText: /^\s*\*\/$/,
  35. action: {
  36. indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent,
  37. appendText: " * "
  38. }
  39. },
  40. {
  41. beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
  42. action: {
  43. indentAction: monaco_editor_core_exports.languages.IndentAction.None,
  44. appendText: " * "
  45. }
  46. },
  47. {
  48. beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
  49. action: {
  50. indentAction: monaco_editor_core_exports.languages.IndentAction.None,
  51. appendText: "* "
  52. }
  53. },
  54. {
  55. beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
  56. action: {
  57. indentAction: monaco_editor_core_exports.languages.IndentAction.None,
  58. removeText: 1
  59. }
  60. }
  61. ],
  62. autoClosingPairs: [
  63. { open: "{", close: "}" },
  64. { open: "[", close: "]" },
  65. { open: "(", close: ")" },
  66. { open: '"', close: '"', notIn: ["string"] },
  67. { open: "'", close: "'", notIn: ["string", "comment"] },
  68. { open: "`", close: "`", notIn: ["string", "comment"] },
  69. { open: "/**", close: " */", notIn: ["string"] }
  70. ],
  71. folding: {
  72. markers: {
  73. start: new RegExp("^\\s*//\\s*#?region\\b"),
  74. end: new RegExp("^\\s*//\\s*#?endregion\\b")
  75. }
  76. }
  77. };
  78. var language = {
  79. defaultToken: "invalid",
  80. tokenPostfix: ".ts",
  81. keywords: [
  82. "abstract",
  83. "any",
  84. "as",
  85. "asserts",
  86. "bigint",
  87. "boolean",
  88. "break",
  89. "case",
  90. "catch",
  91. "class",
  92. "continue",
  93. "const",
  94. "constructor",
  95. "debugger",
  96. "declare",
  97. "default",
  98. "delete",
  99. "do",
  100. "else",
  101. "enum",
  102. "export",
  103. "extends",
  104. "false",
  105. "finally",
  106. "for",
  107. "from",
  108. "function",
  109. "get",
  110. "if",
  111. "implements",
  112. "import",
  113. "in",
  114. "infer",
  115. "instanceof",
  116. "interface",
  117. "is",
  118. "keyof",
  119. "let",
  120. "module",
  121. "namespace",
  122. "never",
  123. "new",
  124. "null",
  125. "number",
  126. "object",
  127. "out",
  128. "package",
  129. "private",
  130. "protected",
  131. "public",
  132. "override",
  133. "readonly",
  134. "require",
  135. "global",
  136. "return",
  137. "satisfies",
  138. "set",
  139. "static",
  140. "string",
  141. "super",
  142. "switch",
  143. "symbol",
  144. "this",
  145. "throw",
  146. "true",
  147. "try",
  148. "type",
  149. "typeof",
  150. "undefined",
  151. "unique",
  152. "unknown",
  153. "var",
  154. "void",
  155. "while",
  156. "with",
  157. "yield",
  158. "async",
  159. "await",
  160. "of"
  161. ],
  162. operators: [
  163. "<=",
  164. ">=",
  165. "==",
  166. "!=",
  167. "===",
  168. "!==",
  169. "=>",
  170. "+",
  171. "-",
  172. "**",
  173. "*",
  174. "/",
  175. "%",
  176. "++",
  177. "--",
  178. "<<",
  179. "</",
  180. ">>",
  181. ">>>",
  182. "&",
  183. "|",
  184. "^",
  185. "!",
  186. "~",
  187. "&&",
  188. "||",
  189. "??",
  190. "?",
  191. ":",
  192. "=",
  193. "+=",
  194. "-=",
  195. "*=",
  196. "**=",
  197. "/=",
  198. "%=",
  199. "<<=",
  200. ">>=",
  201. ">>>=",
  202. "&=",
  203. "|=",
  204. "^=",
  205. "@"
  206. ],
  207. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  208. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  209. digits: /\d+(_+\d+)*/,
  210. octaldigits: /[0-7]+(_+[0-7]+)*/,
  211. binarydigits: /[0-1]+(_+[0-1]+)*/,
  212. hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
  213. regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
  214. regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
  215. tokenizer: {
  216. root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
  217. common: [
  218. [
  219. /[a-z_$][\w$]*/,
  220. {
  221. cases: {
  222. "@keywords": "keyword",
  223. "@default": "identifier"
  224. }
  225. }
  226. ],
  227. [/[A-Z][\w\$]*/, "type.identifier"],
  228. { include: "@whitespace" },
  229. [
  230. /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
  231. { token: "regexp", bracket: "@open", next: "@regexp" }
  232. ],
  233. [/[()\[\]]/, "@brackets"],
  234. [/[<>](?!@symbols)/, "@brackets"],
  235. [/!(?=([^=]|$))/, "delimiter"],
  236. [
  237. /@symbols/,
  238. {
  239. cases: {
  240. "@operators": "delimiter",
  241. "@default": ""
  242. }
  243. }
  244. ],
  245. [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
  246. [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
  247. [/0[xX](@hexdigits)n?/, "number.hex"],
  248. [/0[oO]?(@octaldigits)n?/, "number.octal"],
  249. [/0[bB](@binarydigits)n?/, "number.binary"],
  250. [/(@digits)n?/, "number"],
  251. [/[;,.]/, "delimiter"],
  252. [/"([^"\\]|\\.)*$/, "string.invalid"],
  253. [/'([^'\\]|\\.)*$/, "string.invalid"],
  254. [/"/, "string", "@string_double"],
  255. [/'/, "string", "@string_single"],
  256. [/`/, "string", "@string_backtick"]
  257. ],
  258. whitespace: [
  259. [/[ \t\r\n]+/, ""],
  260. [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
  261. [/\/\*/, "comment", "@comment"],
  262. [/\/\/.*$/, "comment"]
  263. ],
  264. comment: [
  265. [/[^\/*]+/, "comment"],
  266. [/\*\//, "comment", "@pop"],
  267. [/[\/*]/, "comment"]
  268. ],
  269. jsdoc: [
  270. [/[^\/*]+/, "comment.doc"],
  271. [/\*\//, "comment.doc", "@pop"],
  272. [/[\/*]/, "comment.doc"]
  273. ],
  274. regexp: [
  275. [
  276. /(\{)(\d+(?:,\d*)?)(\})/,
  277. ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
  278. ],
  279. [
  280. /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
  281. ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
  282. ],
  283. [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
  284. [/[()]/, "regexp.escape.control"],
  285. [/@regexpctl/, "regexp.escape.control"],
  286. [/[^\\\/]/, "regexp"],
  287. [/@regexpesc/, "regexp.escape"],
  288. [/\\\./, "regexp.invalid"],
  289. [/(\/)([dgimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
  290. ],
  291. regexrange: [
  292. [/-/, "regexp.escape.control"],
  293. [/\^/, "regexp.invalid"],
  294. [/@regexpesc/, "regexp.escape"],
  295. [/[^\]]/, "regexp"],
  296. [
  297. /\]/,
  298. {
  299. token: "regexp.escape.control",
  300. next: "@pop",
  301. bracket: "@close"
  302. }
  303. ]
  304. ],
  305. string_double: [
  306. [/[^\\"]+/, "string"],
  307. [/@escapes/, "string.escape"],
  308. [/\\./, "string.escape.invalid"],
  309. [/"/, "string", "@pop"]
  310. ],
  311. string_single: [
  312. [/[^\\']+/, "string"],
  313. [/@escapes/, "string.escape"],
  314. [/\\./, "string.escape.invalid"],
  315. [/'/, "string", "@pop"]
  316. ],
  317. string_backtick: [
  318. [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
  319. [/[^\\`$]+/, "string"],
  320. [/@escapes/, "string.escape"],
  321. [/\\./, "string.escape.invalid"],
  322. [/`/, "string", "@pop"]
  323. ],
  324. bracketCounting: [
  325. [/\{/, "delimiter.bracket", "@bracketCounting"],
  326. [/\}/, "delimiter.bracket", "@pop"],
  327. { include: "common" }
  328. ]
  329. }
  330. };
  331. export {
  332. conf,
  333. language
  334. };
  335. /*! Bundled license information:
  336. monaco-editor/esm/vs/basic-languages/typescript/typescript.js:
  337. (*!-----------------------------------------------------------------------------
  338. * Copyright (c) Microsoft Corporation. All rights reserved.
  339. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  340. * Released under the MIT license
  341. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  342. *-----------------------------------------------------------------------------*)
  343. */
  344. //# sourceMappingURL=chunk-2RUEMQ2Y.js.map