html-KEWL4ZC3.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. import {
  2. editor_api_exports
  3. } from "./chunk-5Q5BEFT4.js";
  4. import "./chunk-FBUDSZGC.js";
  5. import "./chunk-2LSFTFF7.js";
  6. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/html/html.js
  7. var __defProp = Object.defineProperty;
  8. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  9. var __getOwnPropNames = Object.getOwnPropertyNames;
  10. var __hasOwnProp = Object.prototype.hasOwnProperty;
  11. var __copyProps = (to, from, except, desc) => {
  12. if (from && typeof from === "object" || typeof from === "function") {
  13. for (let key of __getOwnPropNames(from))
  14. if (!__hasOwnProp.call(to, key) && key !== except)
  15. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  16. }
  17. return to;
  18. };
  19. var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
  20. var monaco_editor_core_exports = {};
  21. __reExport(monaco_editor_core_exports, editor_api_exports);
  22. var EMPTY_ELEMENTS = [
  23. "area",
  24. "base",
  25. "br",
  26. "col",
  27. "embed",
  28. "hr",
  29. "img",
  30. "input",
  31. "keygen",
  32. "link",
  33. "menuitem",
  34. "meta",
  35. "param",
  36. "source",
  37. "track",
  38. "wbr"
  39. ];
  40. var conf = {
  41. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
  42. comments: {
  43. blockComment: ["<!--", "-->"]
  44. },
  45. brackets: [
  46. ["<!--", "-->"],
  47. ["<", ">"],
  48. ["{", "}"],
  49. ["(", ")"]
  50. ],
  51. autoClosingPairs: [
  52. { open: "{", close: "}" },
  53. { open: "[", close: "]" },
  54. { open: "(", close: ")" },
  55. { open: '"', close: '"' },
  56. { open: "'", close: "'" }
  57. ],
  58. surroundingPairs: [
  59. { open: '"', close: '"' },
  60. { open: "'", close: "'" },
  61. { open: "{", close: "}" },
  62. { open: "[", close: "]" },
  63. { open: "(", close: ")" },
  64. { open: "<", close: ">" }
  65. ],
  66. onEnterRules: [
  67. {
  68. beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  69. afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
  70. action: {
  71. indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
  72. }
  73. },
  74. {
  75. beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  76. action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
  77. }
  78. ],
  79. folding: {
  80. markers: {
  81. start: new RegExp("^\\s*<!--\\s*#region\\b.*-->"),
  82. end: new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")
  83. }
  84. }
  85. };
  86. var language = {
  87. defaultToken: "",
  88. tokenPostfix: ".html",
  89. ignoreCase: true,
  90. tokenizer: {
  91. root: [
  92. [/<!DOCTYPE/, "metatag", "@doctype"],
  93. [/<!--/, "comment", "@comment"],
  94. [/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter", "tag", "", "delimiter"]],
  95. [/(<)(script)/, ["delimiter", { token: "tag", next: "@script" }]],
  96. [/(<)(style)/, ["delimiter", { token: "tag", next: "@style" }]],
  97. [/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter", { token: "tag", next: "@otherTag" }]],
  98. [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter", { token: "tag", next: "@otherTag" }]],
  99. [/</, "delimiter"],
  100. [/[^<]+/]
  101. ],
  102. doctype: [
  103. [/[^>]+/, "metatag.content"],
  104. [/>/, "metatag", "@pop"]
  105. ],
  106. comment: [
  107. [/-->/, "comment", "@pop"],
  108. [/[^-]+/, "comment.content"],
  109. [/./, "comment.content"]
  110. ],
  111. otherTag: [
  112. [/\/?>/, "delimiter", "@pop"],
  113. [/"([^"]*)"/, "attribute.value"],
  114. [/'([^']*)'/, "attribute.value"],
  115. [/[\w\-]+/, "attribute.name"],
  116. [/=/, "delimiter"],
  117. [/[ \t\r\n]+/]
  118. ],
  119. script: [
  120. [/type/, "attribute.name", "@scriptAfterType"],
  121. [/"([^"]*)"/, "attribute.value"],
  122. [/'([^']*)'/, "attribute.value"],
  123. [/[\w\-]+/, "attribute.name"],
  124. [/=/, "delimiter"],
  125. [
  126. />/,
  127. {
  128. token: "delimiter",
  129. next: "@scriptEmbedded",
  130. nextEmbedded: "text/javascript"
  131. }
  132. ],
  133. [/[ \t\r\n]+/],
  134. [/(<\/)(script\s*)(>)/, ["delimiter", "tag", { token: "delimiter", next: "@pop" }]]
  135. ],
  136. scriptAfterType: [
  137. [/=/, "delimiter", "@scriptAfterTypeEquals"],
  138. [
  139. />/,
  140. {
  141. token: "delimiter",
  142. next: "@scriptEmbedded",
  143. nextEmbedded: "text/javascript"
  144. }
  145. ],
  146. [/[ \t\r\n]+/],
  147. [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
  148. ],
  149. scriptAfterTypeEquals: [
  150. [
  151. /"module"/,
  152. {
  153. token: "attribute.value",
  154. switchTo: "@scriptWithCustomType.text/javascript"
  155. }
  156. ],
  157. [
  158. /'module'/,
  159. {
  160. token: "attribute.value",
  161. switchTo: "@scriptWithCustomType.text/javascript"
  162. }
  163. ],
  164. [
  165. /"([^"]*)"/,
  166. {
  167. token: "attribute.value",
  168. switchTo: "@scriptWithCustomType.$1"
  169. }
  170. ],
  171. [
  172. /'([^']*)'/,
  173. {
  174. token: "attribute.value",
  175. switchTo: "@scriptWithCustomType.$1"
  176. }
  177. ],
  178. [
  179. />/,
  180. {
  181. token: "delimiter",
  182. next: "@scriptEmbedded",
  183. nextEmbedded: "text/javascript"
  184. }
  185. ],
  186. [/[ \t\r\n]+/],
  187. [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
  188. ],
  189. scriptWithCustomType: [
  190. [
  191. />/,
  192. {
  193. token: "delimiter",
  194. next: "@scriptEmbedded.$S2",
  195. nextEmbedded: "$S2"
  196. }
  197. ],
  198. [/"([^"]*)"/, "attribute.value"],
  199. [/'([^']*)'/, "attribute.value"],
  200. [/[\w\-]+/, "attribute.name"],
  201. [/=/, "delimiter"],
  202. [/[ \t\r\n]+/],
  203. [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
  204. ],
  205. scriptEmbedded: [
  206. [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
  207. [/[^<]+/, ""]
  208. ],
  209. style: [
  210. [/type/, "attribute.name", "@styleAfterType"],
  211. [/"([^"]*)"/, "attribute.value"],
  212. [/'([^']*)'/, "attribute.value"],
  213. [/[\w\-]+/, "attribute.name"],
  214. [/=/, "delimiter"],
  215. [
  216. />/,
  217. {
  218. token: "delimiter",
  219. next: "@styleEmbedded",
  220. nextEmbedded: "text/css"
  221. }
  222. ],
  223. [/[ \t\r\n]+/],
  224. [/(<\/)(style\s*)(>)/, ["delimiter", "tag", { token: "delimiter", next: "@pop" }]]
  225. ],
  226. styleAfterType: [
  227. [/=/, "delimiter", "@styleAfterTypeEquals"],
  228. [
  229. />/,
  230. {
  231. token: "delimiter",
  232. next: "@styleEmbedded",
  233. nextEmbedded: "text/css"
  234. }
  235. ],
  236. [/[ \t\r\n]+/],
  237. [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
  238. ],
  239. styleAfterTypeEquals: [
  240. [
  241. /"([^"]*)"/,
  242. {
  243. token: "attribute.value",
  244. switchTo: "@styleWithCustomType.$1"
  245. }
  246. ],
  247. [
  248. /'([^']*)'/,
  249. {
  250. token: "attribute.value",
  251. switchTo: "@styleWithCustomType.$1"
  252. }
  253. ],
  254. [
  255. />/,
  256. {
  257. token: "delimiter",
  258. next: "@styleEmbedded",
  259. nextEmbedded: "text/css"
  260. }
  261. ],
  262. [/[ \t\r\n]+/],
  263. [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
  264. ],
  265. styleWithCustomType: [
  266. [
  267. />/,
  268. {
  269. token: "delimiter",
  270. next: "@styleEmbedded.$S2",
  271. nextEmbedded: "$S2"
  272. }
  273. ],
  274. [/"([^"]*)"/, "attribute.value"],
  275. [/'([^']*)'/, "attribute.value"],
  276. [/[\w\-]+/, "attribute.name"],
  277. [/=/, "delimiter"],
  278. [/[ \t\r\n]+/],
  279. [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
  280. ],
  281. styleEmbedded: [
  282. [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
  283. [/[^<]+/, ""]
  284. ]
  285. }
  286. };
  287. export {
  288. conf,
  289. language
  290. };
  291. /*! Bundled license information:
  292. monaco-editor/esm/vs/basic-languages/html/html.js:
  293. (*!-----------------------------------------------------------------------------
  294. * Copyright (c) Microsoft Corporation. All rights reserved.
  295. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  296. * Released under the MIT license
  297. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  298. *-----------------------------------------------------------------------------*)
  299. */
  300. //# sourceMappingURL=html-KEWL4ZC3.js.map