HTML.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. import Utils from "../Utils.js";
  2. /**
  3. * HTML operations.
  4. *
  5. * @author n1474335 [n1474335@gmail.com]
  6. * @copyright Crown Copyright 2016
  7. * @license Apache-2.0
  8. *
  9. * @namespace
  10. */
  11. const HTML = {
  12. /**
  13. * @constant
  14. * @default
  15. */
  16. CONVERT_ALL: false,
  17. /**
  18. * @constant
  19. * @default
  20. */
  21. CONVERT_OPTIONS: ["Named entities where possible", "Numeric entities", "Hex entities"],
  22. /**
  23. * To HTML Entity operation.
  24. *
  25. * @param {string} input
  26. * @param {Object[]} args
  27. * @returns {string}
  28. */
  29. runToEntity: function(input, args) {
  30. let convertAll = args[0],
  31. numeric = args[1] === "Numeric entities",
  32. hexa = args[1] === "Hex entities";
  33. const charcodes = Utils.strToCharcode(input);
  34. let output = "";
  35. for (let i = 0; i < charcodes.length; i++) {
  36. if (convertAll && numeric) {
  37. output += "&#" + charcodes[i] + ";";
  38. } else if (convertAll && hexa) {
  39. output += "&#x" + Utils.hex(charcodes[i]) + ";";
  40. } else if (convertAll) {
  41. output += HTML._byteToEntity[charcodes[i]] || "&#" + charcodes[i] + ";";
  42. } else if (numeric) {
  43. if (charcodes[i] > 255 || HTML._byteToEntity.hasOwnProperty(charcodes[i])) {
  44. output += "&#" + charcodes[i] + ";";
  45. } else {
  46. output += Utils.chr(charcodes[i]);
  47. }
  48. } else if (hexa) {
  49. if (charcodes[i] > 255 || HTML._byteToEntity.hasOwnProperty(charcodes[i])) {
  50. output += "&#x" + Utils.hex(charcodes[i]) + ";";
  51. } else {
  52. output += Utils.chr(charcodes[i]);
  53. }
  54. } else {
  55. output += HTML._byteToEntity[charcodes[i]] || (
  56. charcodes[i] > 255 ?
  57. "&#" + charcodes[i] + ";" :
  58. Utils.chr(charcodes[i])
  59. );
  60. }
  61. }
  62. return output;
  63. },
  64. /**
  65. * From HTML Entity operation.
  66. *
  67. * @param {string} input
  68. * @param {Object[]} args
  69. * @returns {string}
  70. */
  71. runFromEntity: function(input, args) {
  72. let regex = /&(#?x?[a-zA-Z0-9]{1,8});/g,
  73. output = "",
  74. m,
  75. i = 0;
  76. while ((m = regex.exec(input))) {
  77. // Add up to match
  78. for (; i < m.index;)
  79. output += input[i++];
  80. // Add match
  81. const bite = HTML._entityToByte[m[1]];
  82. if (bite) {
  83. output += Utils.chr(bite);
  84. } else if (!bite && m[1][0] === "#" && m[1].length > 1 && /^#\d{1,6}$/.test(m[1])) {
  85. // Numeric entity (e.g. &#10;)
  86. const num = m[1].slice(1, m[1].length);
  87. output += Utils.chr(parseInt(num, 10));
  88. } else if (!bite && m[1][0] === "#" && m[1].length > 3 && /^#x[\dA-F]{2,8}$/i.test(m[1])) {
  89. // Hex entity (e.g. &#x3A;)
  90. const hex = m[1].slice(2, m[1].length);
  91. output += Utils.chr(parseInt(hex, 16));
  92. } else {
  93. // Not a valid entity, print as normal
  94. for (; i < regex.lastIndex;)
  95. output += input[i++];
  96. }
  97. i = regex.lastIndex;
  98. }
  99. // Add all after final match
  100. for (; i < input.length;)
  101. output += input[i++];
  102. return output;
  103. },
  104. /**
  105. * @constant
  106. * @default
  107. */
  108. REMOVE_INDENTATION: true,
  109. /**
  110. * @constant
  111. * @default
  112. */
  113. REMOVE_LINE_BREAKS: true,
  114. /**
  115. * Strip HTML tags operation.
  116. *
  117. * @param {string} input
  118. * @param {Object[]} args
  119. * @returns {string}
  120. */
  121. runStripTags: function(input, args) {
  122. let removeIndentation = args[0],
  123. removeLineBreaks = args[1];
  124. input = Utils.stripHtmlTags(input);
  125. if (removeIndentation) {
  126. input = input.replace(/\n[ \f\t]+/g, "\n");
  127. }
  128. if (removeLineBreaks) {
  129. input = input
  130. .replace(/^\s*\n/, "") // first line
  131. .replace(/(\n\s*){2,}/g, "\n"); // all others
  132. }
  133. return input;
  134. },
  135. /**
  136. * Parse colour code operation.
  137. *
  138. * @param {string} input
  139. * @param {Object[]} args
  140. * @returns {html}
  141. */
  142. runParseColourCode: function(input, args) {
  143. let m = null,
  144. r = 0, g = 0, b = 0, a = 1;
  145. // Read in the input
  146. if ((m = input.match(/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i))) {
  147. // Hex - #d9edf7
  148. r = parseInt(m[1], 16);
  149. g = parseInt(m[2], 16);
  150. b = parseInt(m[3], 16);
  151. } else if ((m = input.match(/rgba?\((\d{1,3}(?:\.\d+)?),\s?(\d{1,3}(?:\.\d+)?),\s?(\d{1,3}(?:\.\d+)?)(?:,\s?(\d(?:\.\d+)?))?\)/i))) {
  152. // RGB or RGBA - rgb(217,237,247) or rgba(217,237,247,1)
  153. r = parseFloat(m[1]);
  154. g = parseFloat(m[2]);
  155. b = parseFloat(m[3]);
  156. a = m[4] ? parseFloat(m[4]) : 1;
  157. } else if ((m = input.match(/hsla?\((\d{1,3}(?:\.\d+)?),\s?(\d{1,3}(?:\.\d+)?)%,\s?(\d{1,3}(?:\.\d+)?)%(?:,\s?(\d(?:\.\d+)?))?\)/i))) {
  158. // HSL or HSLA - hsl(200, 65%, 91%) or hsla(200, 65%, 91%, 1)
  159. let h_ = parseFloat(m[1]) / 360,
  160. s_ = parseFloat(m[2]) / 100,
  161. l_ = parseFloat(m[3]) / 100,
  162. rgb_ = HTML._hslToRgb(h_, s_, l_);
  163. r = rgb_[0];
  164. g = rgb_[1];
  165. b = rgb_[2];
  166. a = m[4] ? parseFloat(m[4]) : 1;
  167. } else if ((m = input.match(/cmyk\((\d(?:\.\d+)?),\s?(\d(?:\.\d+)?),\s?(\d(?:\.\d+)?),\s?(\d(?:\.\d+)?)\)/i))) {
  168. // CMYK - cmyk(0.12, 0.04, 0.00, 0.03)
  169. let c_ = parseFloat(m[1]),
  170. m_ = parseFloat(m[2]),
  171. y_ = parseFloat(m[3]),
  172. k_ = parseFloat(m[4]);
  173. r = Math.round(255 * (1 - c_) * (1 - k_));
  174. g = Math.round(255 * (1 - m_) * (1 - k_));
  175. b = Math.round(255 * (1 - y_) * (1 - k_));
  176. }
  177. let hsl_ = HTML._rgbToHsl(r, g, b),
  178. h = Math.round(hsl_[0] * 360),
  179. s = Math.round(hsl_[1] * 100),
  180. l = Math.round(hsl_[2] * 100),
  181. k = 1 - Math.max(r/255, g/255, b/255),
  182. c = (1 - r/255 - k) / (1 - k),
  183. y = (1 - b/255 - k) / (1 - k);
  184. m = (1 - g/255 - k) / (1 - k);
  185. c = isNaN(c) ? "0" : c.toFixed(2);
  186. m = isNaN(m) ? "0" : m.toFixed(2);
  187. y = isNaN(y) ? "0" : y.toFixed(2);
  188. k = k.toFixed(2);
  189. let hex = "#" +
  190. Math.round(r).toString(16).padStart(2, "0") +
  191. Math.round(g).toString(16).padStart(2, "0") +
  192. Math.round(b).toString(16).padStart(2, "0"),
  193. rgb = "rgb(" + r + ", " + g + ", " + b + ")",
  194. rgba = "rgba(" + r + ", " + g + ", " + b + ", " + a + ")",
  195. hsl = "hsl(" + h + ", " + s + "%, " + l + "%)",
  196. hsla = "hsla(" + h + ", " + s + "%, " + l + "%, " + a + ")",
  197. cmyk = "cmyk(" + c + ", " + m + ", " + y + ", " + k + ")";
  198. // Generate output
  199. return `<div id="colorpicker" style="display: inline-block"></div>
  200. Hex: ${hex}
  201. RGB: ${rgb}
  202. RGBA: ${rgba}
  203. HSL: ${hsl}
  204. HSLA: ${hsla}
  205. CMYK: ${cmyk}
  206. <script>
  207. $('#colorpicker').colorpicker({
  208. format: 'rgba',
  209. color: '${rgba}',
  210. container: true,
  211. inline: true,
  212. }).on('changeColor', function(e) {
  213. var color = e.color.toRGB();
  214. document.getElementById('input-text').value = 'rgba(' +
  215. color.r + ', ' + color.g + ', ' + color.b + ', ' + color.a + ')';
  216. window.app.autoBake();
  217. });
  218. </script>`;
  219. },
  220. /**
  221. * Converts an HSL color value to RGB. Conversion formula
  222. * adapted from http://en.wikipedia.org/wiki/HSL_colorSpace.
  223. * Assumes h, s, and l are contained in the set [0, 1] and
  224. * returns r, g, and b in the set [0, 255].
  225. *
  226. * @private
  227. * @author Mohsen (http://stackoverflow.com/a/9493060)
  228. *
  229. * @param {number} h - The hue
  230. * @param {number} s - The saturation
  231. * @param {number} l - The lightness
  232. * @return {Array} The RGB representation
  233. */
  234. _hslToRgb: function(h, s, l){
  235. let r, g, b;
  236. if (s === 0){
  237. r = g = b = l; // achromatic
  238. } else {
  239. const hue2rgb = function hue2rgb(p, q, t) {
  240. if (t < 0) t += 1;
  241. if (t > 1) t -= 1;
  242. if (t < 1/6) return p + (q - p) * 6 * t;
  243. if (t < 1/2) return q;
  244. if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;
  245. return p;
  246. };
  247. const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  248. const p = 2 * l - q;
  249. r = hue2rgb(p, q, h + 1/3);
  250. g = hue2rgb(p, q, h);
  251. b = hue2rgb(p, q, h - 1/3);
  252. }
  253. return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
  254. },
  255. /**
  256. * Converts an RGB color value to HSL. Conversion formula
  257. * adapted from http://en.wikipedia.org/wiki/HSL_colorSpace.
  258. * Assumes r, g, and b are contained in the set [0, 255] and
  259. * returns h, s, and l in the set [0, 1].
  260. *
  261. * @private
  262. * @author Mohsen (http://stackoverflow.com/a/9493060)
  263. *
  264. * @param {number} r - The red color value
  265. * @param {number} g - The green color value
  266. * @param {number} b - The blue color value
  267. * @return {Array} The HSL representation
  268. */
  269. _rgbToHsl: function(r, g, b) {
  270. r /= 255; g /= 255; b /= 255;
  271. let max = Math.max(r, g, b),
  272. min = Math.min(r, g, b),
  273. h, s, l = (max + min) / 2;
  274. if (max === min) {
  275. h = s = 0; // achromatic
  276. } else {
  277. const d = max - min;
  278. s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
  279. switch (max) {
  280. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  281. case g: h = (b - r) / d + 2; break;
  282. case b: h = (r - g) / d + 4; break;
  283. }
  284. h /= 6;
  285. }
  286. return [h, s, l];
  287. },
  288. /**
  289. * Lookup table to translate byte values to their HTML entity codes.
  290. *
  291. * @private
  292. * @constant
  293. */
  294. _byteToEntity: {
  295. 34: "&quot;",
  296. 38: "&amp;",
  297. 39: "&apos;",
  298. 60: "&lt;",
  299. 62: "&gt;",
  300. 160: "&nbsp;",
  301. 161: "&iexcl;",
  302. 162: "&cent;",
  303. 163: "&pound;",
  304. 164: "&curren;",
  305. 165: "&yen;",
  306. 166: "&brvbar;",
  307. 167: "&sect;",
  308. 168: "&uml;",
  309. 169: "&copy;",
  310. 170: "&ordf;",
  311. 171: "&laquo;",
  312. 172: "&not;",
  313. 173: "&shy;",
  314. 174: "&reg;",
  315. 175: "&macr;",
  316. 176: "&deg;",
  317. 177: "&plusmn;",
  318. 178: "&sup2;",
  319. 179: "&sup3;",
  320. 180: "&acute;",
  321. 181: "&micro;",
  322. 182: "&para;",
  323. 183: "&middot;",
  324. 184: "&cedil;",
  325. 185: "&sup1;",
  326. 186: "&ordm;",
  327. 187: "&raquo;",
  328. 188: "&frac14;",
  329. 189: "&frac12;",
  330. 190: "&frac34;",
  331. 191: "&iquest;",
  332. 192: "&Agrave;",
  333. 193: "&Aacute;",
  334. 194: "&Acirc;",
  335. 195: "&Atilde;",
  336. 196: "&Auml;",
  337. 197: "&Aring;",
  338. 198: "&AElig;",
  339. 199: "&Ccedil;",
  340. 200: "&Egrave;",
  341. 201: "&Eacute;",
  342. 202: "&Ecirc;",
  343. 203: "&Euml;",
  344. 204: "&Igrave;",
  345. 205: "&Iacute;",
  346. 206: "&Icirc;",
  347. 207: "&Iuml;",
  348. 208: "&ETH;",
  349. 209: "&Ntilde;",
  350. 210: "&Ograve;",
  351. 211: "&Oacute;",
  352. 212: "&Ocirc;",
  353. 213: "&Otilde;",
  354. 214: "&Ouml;",
  355. 215: "&times;",
  356. 216: "&Oslash;",
  357. 217: "&Ugrave;",
  358. 218: "&Uacute;",
  359. 219: "&Ucirc;",
  360. 220: "&Uuml;",
  361. 221: "&Yacute;",
  362. 222: "&THORN;",
  363. 223: "&szlig;",
  364. 224: "&agrave;",
  365. 225: "&aacute;",
  366. 226: "&acirc;",
  367. 227: "&atilde;",
  368. 228: "&auml;",
  369. 229: "&aring;",
  370. 230: "&aelig;",
  371. 231: "&ccedil;",
  372. 232: "&egrave;",
  373. 233: "&eacute;",
  374. 234: "&ecirc;",
  375. 235: "&euml;",
  376. 236: "&igrave;",
  377. 237: "&iacute;",
  378. 238: "&icirc;",
  379. 239: "&iuml;",
  380. 240: "&eth;",
  381. 241: "&ntilde;",
  382. 242: "&ograve;",
  383. 243: "&oacute;",
  384. 244: "&ocirc;",
  385. 245: "&otilde;",
  386. 246: "&ouml;",
  387. 247: "&divide;",
  388. 248: "&oslash;",
  389. 249: "&ugrave;",
  390. 250: "&uacute;",
  391. 251: "&ucirc;",
  392. 252: "&uuml;",
  393. 253: "&yacute;",
  394. 254: "&thorn;",
  395. 255: "&yuml;",
  396. 338: "&OElig;",
  397. 339: "&oelig;",
  398. 352: "&Scaron;",
  399. 353: "&scaron;",
  400. 376: "&Yuml;",
  401. 402: "&fnof;",
  402. 710: "&circ;",
  403. 732: "&tilde;",
  404. 913: "&Alpha;",
  405. 914: "&Beta;",
  406. 915: "&Gamma;",
  407. 916: "&Delta;",
  408. 917: "&Epsilon;",
  409. 918: "&Zeta;",
  410. 919: "&Eta;",
  411. 920: "&Theta;",
  412. 921: "&Iota;",
  413. 922: "&Kappa;",
  414. 923: "&Lambda;",
  415. 924: "&Mu;",
  416. 925: "&Nu;",
  417. 926: "&Xi;",
  418. 927: "&Omicron;",
  419. 928: "&Pi;",
  420. 929: "&Rho;",
  421. 931: "&Sigma;",
  422. 932: "&Tau;",
  423. 933: "&Upsilon;",
  424. 934: "&Phi;",
  425. 935: "&Chi;",
  426. 936: "&Psi;",
  427. 937: "&Omega;",
  428. 945: "&alpha;",
  429. 946: "&beta;",
  430. 947: "&gamma;",
  431. 948: "&delta;",
  432. 949: "&epsilon;",
  433. 950: "&zeta;",
  434. 951: "&eta;",
  435. 952: "&theta;",
  436. 953: "&iota;",
  437. 954: "&kappa;",
  438. 955: "&lambda;",
  439. 956: "&mu;",
  440. 957: "&nu;",
  441. 958: "&xi;",
  442. 959: "&omicron;",
  443. 960: "&pi;",
  444. 961: "&rho;",
  445. 962: "&sigmaf;",
  446. 963: "&sigma;",
  447. 964: "&tau;",
  448. 965: "&upsilon;",
  449. 966: "&phi;",
  450. 967: "&chi;",
  451. 968: "&psi;",
  452. 969: "&omega;",
  453. 977: "&thetasym;",
  454. 978: "&upsih;",
  455. 982: "&piv;",
  456. 8194: "&ensp;",
  457. 8195: "&emsp;",
  458. 8201: "&thinsp;",
  459. 8204: "&zwnj;",
  460. 8205: "&zwj;",
  461. 8206: "&lrm;",
  462. 8207: "&rlm;",
  463. 8211: "&ndash;",
  464. 8212: "&mdash;",
  465. 8216: "&lsquo;",
  466. 8217: "&rsquo;",
  467. 8218: "&sbquo;",
  468. 8220: "&ldquo;",
  469. 8221: "&rdquo;",
  470. 8222: "&bdquo;",
  471. 8224: "&dagger;",
  472. 8225: "&Dagger;",
  473. 8226: "&bull;",
  474. 8230: "&hellip;",
  475. 8240: "&permil;",
  476. 8242: "&prime;",
  477. 8243: "&Prime;",
  478. 8249: "&lsaquo;",
  479. 8250: "&rsaquo;",
  480. 8254: "&oline;",
  481. 8260: "&frasl;",
  482. 8364: "&euro;",
  483. 8465: "&image;",
  484. 8472: "&weierp;",
  485. 8476: "&real;",
  486. 8482: "&trade;",
  487. 8501: "&alefsym;",
  488. 8592: "&larr;",
  489. 8593: "&uarr;",
  490. 8594: "&rarr;",
  491. 8595: "&darr;",
  492. 8596: "&harr;",
  493. 8629: "&crarr;",
  494. 8656: "&lArr;",
  495. 8657: "&uArr;",
  496. 8658: "&rArr;",
  497. 8659: "&dArr;",
  498. 8660: "&hArr;",
  499. 8704: "&forall;",
  500. 8706: "&part;",
  501. 8707: "&exist;",
  502. 8709: "&empty;",
  503. 8711: "&nabla;",
  504. 8712: "&isin;",
  505. 8713: "&notin;",
  506. 8715: "&ni;",
  507. 8719: "&prod;",
  508. 8721: "&sum;",
  509. 8722: "&minus;",
  510. 8727: "&lowast;",
  511. 8730: "&radic;",
  512. 8733: "&prop;",
  513. 8734: "&infin;",
  514. 8736: "&ang;",
  515. 8743: "&and;",
  516. 8744: "&or;",
  517. 8745: "&cap;",
  518. 8746: "&cup;",
  519. 8747: "&int;",
  520. 8756: "&there4;",
  521. 8764: "&sim;",
  522. 8773: "&cong;",
  523. 8776: "&asymp;",
  524. 8800: "&ne;",
  525. 8801: "&equiv;",
  526. 8804: "&le;",
  527. 8805: "&ge;",
  528. 8834: "&sub;",
  529. 8835: "&sup;",
  530. 8836: "&nsub;",
  531. 8838: "&sube;",
  532. 8839: "&supe;",
  533. 8853: "&oplus;",
  534. 8855: "&otimes;",
  535. 8869: "&perp;",
  536. 8901: "&sdot;",
  537. 8942: "&vellip;",
  538. 8968: "&lceil;",
  539. 8969: "&rceil;",
  540. 8970: "&lfloor;",
  541. 8971: "&rfloor;",
  542. 9001: "&lang;",
  543. 9002: "&rang;",
  544. 9674: "&loz;",
  545. 9824: "&spades;",
  546. 9827: "&clubs;",
  547. 9829: "&hearts;",
  548. 9830: "&diams;",
  549. },
  550. /**
  551. * Lookup table to translate HTML entity codes to their byte values.
  552. *
  553. * @private
  554. * @constant
  555. */
  556. _entityToByte: {
  557. "quot": 34,
  558. "amp": 38,
  559. "apos": 39,
  560. "lt": 60,
  561. "gt": 62,
  562. "nbsp": 160,
  563. "iexcl": 161,
  564. "cent": 162,
  565. "pound": 163,
  566. "curren": 164,
  567. "yen": 165,
  568. "brvbar": 166,
  569. "sect": 167,
  570. "uml": 168,
  571. "copy": 169,
  572. "ordf": 170,
  573. "laquo": 171,
  574. "not": 172,
  575. "shy": 173,
  576. "reg": 174,
  577. "macr": 175,
  578. "deg": 176,
  579. "plusmn": 177,
  580. "sup2": 178,
  581. "sup3": 179,
  582. "acute": 180,
  583. "micro": 181,
  584. "para": 182,
  585. "middot": 183,
  586. "cedil": 184,
  587. "sup1": 185,
  588. "ordm": 186,
  589. "raquo": 187,
  590. "frac14": 188,
  591. "frac12": 189,
  592. "frac34": 190,
  593. "iquest": 191,
  594. "Agrave": 192,
  595. "Aacute": 193,
  596. "Acirc": 194,
  597. "Atilde": 195,
  598. "Auml": 196,
  599. "Aring": 197,
  600. "AElig": 198,
  601. "Ccedil": 199,
  602. "Egrave": 200,
  603. "Eacute": 201,
  604. "Ecirc": 202,
  605. "Euml": 203,
  606. "Igrave": 204,
  607. "Iacute": 205,
  608. "Icirc": 206,
  609. "Iuml": 207,
  610. "ETH": 208,
  611. "Ntilde": 209,
  612. "Ograve": 210,
  613. "Oacute": 211,
  614. "Ocirc": 212,
  615. "Otilde": 213,
  616. "Ouml": 214,
  617. "times": 215,
  618. "Oslash": 216,
  619. "Ugrave": 217,
  620. "Uacute": 218,
  621. "Ucirc": 219,
  622. "Uuml": 220,
  623. "Yacute": 221,
  624. "THORN": 222,
  625. "szlig": 223,
  626. "agrave": 224,
  627. "aacute": 225,
  628. "acirc": 226,
  629. "atilde": 227,
  630. "auml": 228,
  631. "aring": 229,
  632. "aelig": 230,
  633. "ccedil": 231,
  634. "egrave": 232,
  635. "eacute": 233,
  636. "ecirc": 234,
  637. "euml": 235,
  638. "igrave": 236,
  639. "iacute": 237,
  640. "icirc": 238,
  641. "iuml": 239,
  642. "eth": 240,
  643. "ntilde": 241,
  644. "ograve": 242,
  645. "oacute": 243,
  646. "ocirc": 244,
  647. "otilde": 245,
  648. "ouml": 246,
  649. "divide": 247,
  650. "oslash": 248,
  651. "ugrave": 249,
  652. "uacute": 250,
  653. "ucirc": 251,
  654. "uuml": 252,
  655. "yacute": 253,
  656. "thorn": 254,
  657. "yuml": 255,
  658. "OElig": 338,
  659. "oelig": 339,
  660. "Scaron": 352,
  661. "scaron": 353,
  662. "Yuml": 376,
  663. "fnof": 402,
  664. "circ": 710,
  665. "tilde": 732,
  666. "Alpha": 913,
  667. "Beta": 914,
  668. "Gamma": 915,
  669. "Delta": 916,
  670. "Epsilon": 917,
  671. "Zeta": 918,
  672. "Eta": 919,
  673. "Theta": 920,
  674. "Iota": 921,
  675. "Kappa": 922,
  676. "Lambda": 923,
  677. "Mu": 924,
  678. "Nu": 925,
  679. "Xi": 926,
  680. "Omicron": 927,
  681. "Pi": 928,
  682. "Rho": 929,
  683. "Sigma": 931,
  684. "Tau": 932,
  685. "Upsilon": 933,
  686. "Phi": 934,
  687. "Chi": 935,
  688. "Psi": 936,
  689. "Omega": 937,
  690. "alpha": 945,
  691. "beta": 946,
  692. "gamma": 947,
  693. "delta": 948,
  694. "epsilon": 949,
  695. "zeta": 950,
  696. "eta": 951,
  697. "theta": 952,
  698. "iota": 953,
  699. "kappa": 954,
  700. "lambda": 955,
  701. "mu": 956,
  702. "nu": 957,
  703. "xi": 958,
  704. "omicron": 959,
  705. "pi": 960,
  706. "rho": 961,
  707. "sigmaf": 962,
  708. "sigma": 963,
  709. "tau": 964,
  710. "upsilon": 965,
  711. "phi": 966,
  712. "chi": 967,
  713. "psi": 968,
  714. "omega": 969,
  715. "thetasym": 977,
  716. "upsih": 978,
  717. "piv": 982,
  718. "ensp": 8194,
  719. "emsp": 8195,
  720. "thinsp": 8201,
  721. "zwnj": 8204,
  722. "zwj": 8205,
  723. "lrm": 8206,
  724. "rlm": 8207,
  725. "ndash": 8211,
  726. "mdash": 8212,
  727. "lsquo": 8216,
  728. "rsquo": 8217,
  729. "sbquo": 8218,
  730. "ldquo": 8220,
  731. "rdquo": 8221,
  732. "bdquo": 8222,
  733. "dagger": 8224,
  734. "Dagger": 8225,
  735. "bull": 8226,
  736. "hellip": 8230,
  737. "permil": 8240,
  738. "prime": 8242,
  739. "Prime": 8243,
  740. "lsaquo": 8249,
  741. "rsaquo": 8250,
  742. "oline": 8254,
  743. "frasl": 8260,
  744. "euro": 8364,
  745. "image": 8465,
  746. "weierp": 8472,
  747. "real": 8476,
  748. "trade": 8482,
  749. "alefsym": 8501,
  750. "larr": 8592,
  751. "uarr": 8593,
  752. "rarr": 8594,
  753. "darr": 8595,
  754. "harr": 8596,
  755. "crarr": 8629,
  756. "lArr": 8656,
  757. "uArr": 8657,
  758. "rArr": 8658,
  759. "dArr": 8659,
  760. "hArr": 8660,
  761. "forall": 8704,
  762. "part": 8706,
  763. "exist": 8707,
  764. "empty": 8709,
  765. "nabla": 8711,
  766. "isin": 8712,
  767. "notin": 8713,
  768. "ni": 8715,
  769. "prod": 8719,
  770. "sum": 8721,
  771. "minus": 8722,
  772. "lowast": 8727,
  773. "radic": 8730,
  774. "prop": 8733,
  775. "infin": 8734,
  776. "ang": 8736,
  777. "and": 8743,
  778. "or": 8744,
  779. "cap": 8745,
  780. "cup": 8746,
  781. "int": 8747,
  782. "there4": 8756,
  783. "sim": 8764,
  784. "cong": 8773,
  785. "asymp": 8776,
  786. "ne": 8800,
  787. "equiv": 8801,
  788. "le": 8804,
  789. "ge": 8805,
  790. "sub": 8834,
  791. "sup": 8835,
  792. "nsub": 8836,
  793. "sube": 8838,
  794. "supe": 8839,
  795. "oplus": 8853,
  796. "otimes": 8855,
  797. "perp": 8869,
  798. "sdot": 8901,
  799. "vellip": 8942,
  800. "lceil": 8968,
  801. "rceil": 8969,
  802. "lfloor": 8970,
  803. "rfloor": 8971,
  804. "lang": 9001,
  805. "rang": 9002,
  806. "loz": 9674,
  807. "spades": 9824,
  808. "clubs": 9827,
  809. "hearts": 9829,
  810. "diams": 9830,
  811. },
  812. };
  813. export default HTML;