15bd8deadSopenharmony_ci(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.katex = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
25bd8deadSopenharmony_ci/* eslint no-console:0 */
35bd8deadSopenharmony_ci/**
45bd8deadSopenharmony_ci * This is the main entry point for KaTeX. Here, we expose functions for
55bd8deadSopenharmony_ci * rendering expressions either to DOM nodes or to markup strings.
65bd8deadSopenharmony_ci *
75bd8deadSopenharmony_ci * We also expose the ParseError class to check if errors thrown from KaTeX are
85bd8deadSopenharmony_ci * errors in the expression, or errors in javascript handling.
95bd8deadSopenharmony_ci */
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_civar ParseError = require("./src/ParseError");
125bd8deadSopenharmony_civar Settings = require("./src/Settings");
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_civar buildTree = require("./src/buildTree");
155bd8deadSopenharmony_civar parseTree = require("./src/parseTree");
165bd8deadSopenharmony_civar utils = require("./src/utils");
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ci/**
195bd8deadSopenharmony_ci * Parse and build an expression, and place that expression in the DOM node
205bd8deadSopenharmony_ci * given.
215bd8deadSopenharmony_ci */
225bd8deadSopenharmony_civar render = function(expression, baseNode, options) {
235bd8deadSopenharmony_ci    utils.clearNode(baseNode);
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    var settings = new Settings(options);
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    var tree = parseTree(expression, settings);
285bd8deadSopenharmony_ci    var node = buildTree(tree, expression, settings).toNode();
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    baseNode.appendChild(node);
315bd8deadSopenharmony_ci};
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci// KaTeX's styles don't work properly in quirks mode. Print out an error, and
345bd8deadSopenharmony_ci// disable rendering.
355bd8deadSopenharmony_ciif (typeof document !== "undefined") {
365bd8deadSopenharmony_ci    if (document.compatMode !== "CSS1Compat") {
375bd8deadSopenharmony_ci        typeof console !== "undefined" && console.warn(
385bd8deadSopenharmony_ci            "Warning: KaTeX doesn't work in quirks mode. Make sure your " +
395bd8deadSopenharmony_ci                "website has a suitable doctype.");
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci        render = function() {
425bd8deadSopenharmony_ci            throw new ParseError("KaTeX doesn't work in quirks mode.");
435bd8deadSopenharmony_ci        };
445bd8deadSopenharmony_ci    }
455bd8deadSopenharmony_ci}
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci/**
485bd8deadSopenharmony_ci * Parse and build an expression, and return the markup for that.
495bd8deadSopenharmony_ci */
505bd8deadSopenharmony_civar renderToString = function(expression, options) {
515bd8deadSopenharmony_ci    var settings = new Settings(options);
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    var tree = parseTree(expression, settings);
545bd8deadSopenharmony_ci    return buildTree(tree, expression, settings).toMarkup();
555bd8deadSopenharmony_ci};
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci/**
585bd8deadSopenharmony_ci * Parse an expression and return the parse tree.
595bd8deadSopenharmony_ci */
605bd8deadSopenharmony_civar generateParseTree = function(expression, options) {
615bd8deadSopenharmony_ci    var settings = new Settings(options);
625bd8deadSopenharmony_ci    return parseTree(expression, settings);
635bd8deadSopenharmony_ci};
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_cimodule.exports = {
665bd8deadSopenharmony_ci    render: render,
675bd8deadSopenharmony_ci    renderToString: renderToString,
685bd8deadSopenharmony_ci    /**
695bd8deadSopenharmony_ci     * NOTE: This method is not currently recommended for public use.
705bd8deadSopenharmony_ci     * The internal tree representation is unstable and is very likely
715bd8deadSopenharmony_ci     * to change. Use at your own risk.
725bd8deadSopenharmony_ci     */
735bd8deadSopenharmony_ci    __parse: generateParseTree,
745bd8deadSopenharmony_ci    ParseError: ParseError
755bd8deadSopenharmony_ci};
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci},{"./src/ParseError":6,"./src/Settings":8,"./src/buildTree":13,"./src/parseTree":22,"./src/utils":25}],2:[function(require,module,exports){
785bd8deadSopenharmony_ci/** @flow */
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci"use strict";
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_cifunction getRelocatable(re) {
835bd8deadSopenharmony_ci  // In the future, this could use a WeakMap instead of an expando.
845bd8deadSopenharmony_ci  if (!re.__matchAtRelocatable) {
855bd8deadSopenharmony_ci    // Disjunctions are the lowest-precedence operator, so we can make any
865bd8deadSopenharmony_ci    // pattern match the empty string by appending `|()` to it:
875bd8deadSopenharmony_ci    // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-patterns
885bd8deadSopenharmony_ci    var source = re.source + "|()";
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    // We always make the new regex global.
915bd8deadSopenharmony_ci    var flags = "g" + (re.ignoreCase ? "i" : "") + (re.multiline ? "m" : "") + (re.unicode ? "u" : "")
925bd8deadSopenharmony_ci    // sticky (/.../y) doesn't make sense in conjunction with our relocation
935bd8deadSopenharmony_ci    // logic, so we ignore it here.
945bd8deadSopenharmony_ci    ;
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci    re.__matchAtRelocatable = new RegExp(source, flags);
975bd8deadSopenharmony_ci  }
985bd8deadSopenharmony_ci  return re.__matchAtRelocatable;
995bd8deadSopenharmony_ci}
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_cifunction matchAt(re, str, pos) {
1025bd8deadSopenharmony_ci  if (re.global || re.sticky) {
1035bd8deadSopenharmony_ci    throw new Error("matchAt(...): Only non-global regexes are supported");
1045bd8deadSopenharmony_ci  }
1055bd8deadSopenharmony_ci  var reloc = getRelocatable(re);
1065bd8deadSopenharmony_ci  reloc.lastIndex = pos;
1075bd8deadSopenharmony_ci  var match = reloc.exec(str);
1085bd8deadSopenharmony_ci  // Last capturing group is our sentinel that indicates whether the regex
1095bd8deadSopenharmony_ci  // matched at the given location.
1105bd8deadSopenharmony_ci  if (match[match.length - 1] == null) {
1115bd8deadSopenharmony_ci    // Original regex matched.
1125bd8deadSopenharmony_ci    match.length = match.length - 1;
1135bd8deadSopenharmony_ci    return match;
1145bd8deadSopenharmony_ci  } else {
1155bd8deadSopenharmony_ci    return null;
1165bd8deadSopenharmony_ci  }
1175bd8deadSopenharmony_ci}
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_cimodule.exports = matchAt;
1205bd8deadSopenharmony_ci},{}],3:[function(require,module,exports){
1215bd8deadSopenharmony_ci/**
1225bd8deadSopenharmony_ci * The Lexer class handles tokenizing the input in various ways. Since our
1235bd8deadSopenharmony_ci * parser expects us to be able to backtrack, the lexer allows lexing from any
1245bd8deadSopenharmony_ci * given starting point.
1255bd8deadSopenharmony_ci *
1265bd8deadSopenharmony_ci * Its main exposed function is the `lex` function, which takes a position to
1275bd8deadSopenharmony_ci * lex from and a type of token to lex. It defers to the appropriate `_innerLex`
1285bd8deadSopenharmony_ci * function.
1295bd8deadSopenharmony_ci *
1305bd8deadSopenharmony_ci * The various `_innerLex` functions perform the actual lexing of different
1315bd8deadSopenharmony_ci * kinds.
1325bd8deadSopenharmony_ci */
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_civar matchAt = require("match-at");
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_civar ParseError = require("./ParseError");
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci// The main lexer class
1395bd8deadSopenharmony_cifunction Lexer(input) {
1405bd8deadSopenharmony_ci    this.input = input;
1415bd8deadSopenharmony_ci    this.pos = 0;
1425bd8deadSopenharmony_ci}
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci/**
1455bd8deadSopenharmony_ci * The resulting token returned from `lex`.
1465bd8deadSopenharmony_ci *
1475bd8deadSopenharmony_ci * It consists of the token text plus some position information.
1485bd8deadSopenharmony_ci * The position information is essentially a range in an input string,
1495bd8deadSopenharmony_ci * but instead of referencing the bare input string, we refer to the lexer.
1505bd8deadSopenharmony_ci * That way it is possible to attach extra metadata to the input string,
1515bd8deadSopenharmony_ci * like for example a file name or similar.
1525bd8deadSopenharmony_ci *
1535bd8deadSopenharmony_ci * The position information (all three parameters) is optional,
1545bd8deadSopenharmony_ci * so it is OK to construct synthetic tokens if appropriate.
1555bd8deadSopenharmony_ci * Not providing available position information may lead to
1565bd8deadSopenharmony_ci * degraded error reporting, though.
1575bd8deadSopenharmony_ci *
1585bd8deadSopenharmony_ci * @param {string}  text   the text of this token
1595bd8deadSopenharmony_ci * @param {number=} start  the start offset, zero-based inclusive
1605bd8deadSopenharmony_ci * @param {number=} end    the end offset, zero-based exclusive
1615bd8deadSopenharmony_ci * @param {Lexer=}  lexer  the lexer which in turn holds the input string
1625bd8deadSopenharmony_ci */
1635bd8deadSopenharmony_cifunction Token(text, start, end, lexer) {
1645bd8deadSopenharmony_ci    this.text = text;
1655bd8deadSopenharmony_ci    this.start = start;
1665bd8deadSopenharmony_ci    this.end = end;
1675bd8deadSopenharmony_ci    this.lexer = lexer;
1685bd8deadSopenharmony_ci}
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci/**
1715bd8deadSopenharmony_ci * Given a pair of tokens (this and endToken), compute a “Token” encompassing
1725bd8deadSopenharmony_ci * the whole input range enclosed by these two.
1735bd8deadSopenharmony_ci *
1745bd8deadSopenharmony_ci * @param {Token}  endToken  last token of the range, inclusive
1755bd8deadSopenharmony_ci * @param {string} text      the text of the newly constructed token
1765bd8deadSopenharmony_ci */
1775bd8deadSopenharmony_ciToken.prototype.range = function(endToken, text) {
1785bd8deadSopenharmony_ci    if (endToken.lexer !== this.lexer) {
1795bd8deadSopenharmony_ci        return new Token(text); // sorry, no position information available
1805bd8deadSopenharmony_ci    }
1815bd8deadSopenharmony_ci    return new Token(text, this.start, endToken.end, this.lexer);
1825bd8deadSopenharmony_ci};
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci/* The following tokenRegex
1855bd8deadSopenharmony_ci * - matches typical whitespace (but not NBSP etc.) using its first group
1865bd8deadSopenharmony_ci * - does not match any control character \x00-\x1f except whitespace
1875bd8deadSopenharmony_ci * - does not match a bare backslash
1885bd8deadSopenharmony_ci * - matches any ASCII character except those just mentioned
1895bd8deadSopenharmony_ci * - does not match the BMP private use area \uE000-\uF8FF
1905bd8deadSopenharmony_ci * - does not match bare surrogate code units
1915bd8deadSopenharmony_ci * - matches any BMP character except for those just described
1925bd8deadSopenharmony_ci * - matches any valid Unicode surrogate pair
1935bd8deadSopenharmony_ci * - matches a backslash followed by one or more letters
1945bd8deadSopenharmony_ci * - matches a backslash followed by any BMP character, including newline
1955bd8deadSopenharmony_ci * Just because the Lexer matches something doesn't mean it's valid input:
1965bd8deadSopenharmony_ci * If there is no matching function or symbol definition, the Parser will
1975bd8deadSopenharmony_ci * still reject the input.
1985bd8deadSopenharmony_ci */
1995bd8deadSopenharmony_civar tokenRegex = new RegExp(
2005bd8deadSopenharmony_ci    "([ \r\n\t]+)|" +                                 // whitespace
2015bd8deadSopenharmony_ci    "([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]" +  // single codepoint
2025bd8deadSopenharmony_ci    "|[\uD800-\uDBFF][\uDC00-\uDFFF]" +               // surrogate pair
2035bd8deadSopenharmony_ci    "|\\\\(?:[a-zA-Z]+|[^\uD800-\uDFFF])" +           // function name
2045bd8deadSopenharmony_ci    ")"
2055bd8deadSopenharmony_ci);
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci/**
2085bd8deadSopenharmony_ci * This function lexes a single token.
2095bd8deadSopenharmony_ci */
2105bd8deadSopenharmony_ciLexer.prototype.lex = function() {
2115bd8deadSopenharmony_ci    var input = this.input;
2125bd8deadSopenharmony_ci    var pos = this.pos;
2135bd8deadSopenharmony_ci    if (pos === input.length) {
2145bd8deadSopenharmony_ci        return new Token("EOF", pos, pos, this);
2155bd8deadSopenharmony_ci    }
2165bd8deadSopenharmony_ci    var match = matchAt(tokenRegex, input, pos);
2175bd8deadSopenharmony_ci    if (match === null) {
2185bd8deadSopenharmony_ci        throw new ParseError(
2195bd8deadSopenharmony_ci            "Unexpected character: '" + input[pos] + "'",
2205bd8deadSopenharmony_ci            new Token(input[pos], pos, pos + 1, this));
2215bd8deadSopenharmony_ci    }
2225bd8deadSopenharmony_ci    var text = match[2] || " ";
2235bd8deadSopenharmony_ci    var start = this.pos;
2245bd8deadSopenharmony_ci    this.pos += match[0].length;
2255bd8deadSopenharmony_ci    var end = this.pos;
2265bd8deadSopenharmony_ci    return new Token(text, start, end, this);
2275bd8deadSopenharmony_ci};
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_cimodule.exports = Lexer;
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci},{"./ParseError":6,"match-at":2}],4:[function(require,module,exports){
2325bd8deadSopenharmony_ci/**
2335bd8deadSopenharmony_ci * This file contains the “gullet” where macros are expanded
2345bd8deadSopenharmony_ci * until only non-macro tokens remain.
2355bd8deadSopenharmony_ci */
2365bd8deadSopenharmony_ci
2375bd8deadSopenharmony_civar Lexer = require("./Lexer");
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_cifunction MacroExpander(input, macros) {
2405bd8deadSopenharmony_ci    this.lexer = new Lexer(input);
2415bd8deadSopenharmony_ci    this.macros = macros;
2425bd8deadSopenharmony_ci    this.stack = []; // contains tokens in REVERSE order
2435bd8deadSopenharmony_ci    this.discardedWhiteSpace = [];
2445bd8deadSopenharmony_ci}
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci/**
2475bd8deadSopenharmony_ci * Recursively expand first token, then return first non-expandable token.
2485bd8deadSopenharmony_ci */
2495bd8deadSopenharmony_ciMacroExpander.prototype.nextToken = function() {
2505bd8deadSopenharmony_ci    for (;;) {
2515bd8deadSopenharmony_ci        if (this.stack.length === 0) {
2525bd8deadSopenharmony_ci            this.stack.push(this.lexer.lex());
2535bd8deadSopenharmony_ci        }
2545bd8deadSopenharmony_ci        var topToken = this.stack.pop();
2555bd8deadSopenharmony_ci        var name = topToken.text;
2565bd8deadSopenharmony_ci        if (!(name.charAt(0) === "\\" && this.macros.hasOwnProperty(name))) {
2575bd8deadSopenharmony_ci            return topToken;
2585bd8deadSopenharmony_ci        }
2595bd8deadSopenharmony_ci        var expansion = this.macros[name];
2605bd8deadSopenharmony_ci        if (typeof expansion === "string") {
2615bd8deadSopenharmony_ci            var bodyLexer = new Lexer(expansion);
2625bd8deadSopenharmony_ci            expansion = [];
2635bd8deadSopenharmony_ci            var tok = bodyLexer.lex();
2645bd8deadSopenharmony_ci            while (tok.text !== "EOF") {
2655bd8deadSopenharmony_ci                expansion.push(tok);
2665bd8deadSopenharmony_ci                tok = bodyLexer.lex();
2675bd8deadSopenharmony_ci            }
2685bd8deadSopenharmony_ci            expansion.reverse(); // to fit in with stack using push and pop
2695bd8deadSopenharmony_ci            this.macros[name] = expansion;
2705bd8deadSopenharmony_ci        }
2715bd8deadSopenharmony_ci        this.stack = this.stack.concat(expansion);
2725bd8deadSopenharmony_ci    }
2735bd8deadSopenharmony_ci};
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ciMacroExpander.prototype.get = function(ignoreSpace) {
2765bd8deadSopenharmony_ci    this.discardedWhiteSpace = [];
2775bd8deadSopenharmony_ci    var token = this.nextToken();
2785bd8deadSopenharmony_ci    if (ignoreSpace) {
2795bd8deadSopenharmony_ci        while (token.text === " ") {
2805bd8deadSopenharmony_ci            this.discardedWhiteSpace.push(token);
2815bd8deadSopenharmony_ci            token = this.nextToken();
2825bd8deadSopenharmony_ci        }
2835bd8deadSopenharmony_ci    }
2845bd8deadSopenharmony_ci    return token;
2855bd8deadSopenharmony_ci};
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci/**
2885bd8deadSopenharmony_ci * Undo the effect of the preceding call to the get method.
2895bd8deadSopenharmony_ci * A call to this method MUST be immediately preceded and immediately followed
2905bd8deadSopenharmony_ci * by a call to get.  Only used during mode switching, i.e. after one token
2915bd8deadSopenharmony_ci * was got in the old mode but should get got again in a new mode
2925bd8deadSopenharmony_ci * with possibly different whitespace handling.
2935bd8deadSopenharmony_ci */
2945bd8deadSopenharmony_ciMacroExpander.prototype.unget = function(token) {
2955bd8deadSopenharmony_ci    this.stack.push(token);
2965bd8deadSopenharmony_ci    while (this.discardedWhiteSpace.length !== 0) {
2975bd8deadSopenharmony_ci        this.stack.push(this.discardedWhiteSpace.pop());
2985bd8deadSopenharmony_ci    }
2995bd8deadSopenharmony_ci};
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_cimodule.exports = MacroExpander;
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ci},{"./Lexer":3}],5:[function(require,module,exports){
3045bd8deadSopenharmony_ci/**
3055bd8deadSopenharmony_ci * This file contains information about the options that the Parser carries
3065bd8deadSopenharmony_ci * around with it while parsing. Data is held in an `Options` object, and when
3075bd8deadSopenharmony_ci * recursing, a new `Options` object can be created with the `.with*` and
3085bd8deadSopenharmony_ci * `.reset` functions.
3095bd8deadSopenharmony_ci */
3105bd8deadSopenharmony_ci
3115bd8deadSopenharmony_ci/**
3125bd8deadSopenharmony_ci * This is the main options class. It contains the style, size, color, and font
3135bd8deadSopenharmony_ci * of the current parse level. It also contains the style and size of the parent
3145bd8deadSopenharmony_ci * parse level, so size changes can be handled efficiently.
3155bd8deadSopenharmony_ci *
3165bd8deadSopenharmony_ci * Each of the `.with*` and `.reset` functions passes its current style and size
3175bd8deadSopenharmony_ci * as the parentStyle and parentSize of the new options class, so parent
3185bd8deadSopenharmony_ci * handling is taken care of automatically.
3195bd8deadSopenharmony_ci */
3205bd8deadSopenharmony_cifunction Options(data) {
3215bd8deadSopenharmony_ci    this.style = data.style;
3225bd8deadSopenharmony_ci    this.color = data.color;
3235bd8deadSopenharmony_ci    this.size = data.size;
3245bd8deadSopenharmony_ci    this.phantom = data.phantom;
3255bd8deadSopenharmony_ci    this.font = data.font;
3265bd8deadSopenharmony_ci
3275bd8deadSopenharmony_ci    if (data.parentStyle === undefined) {
3285bd8deadSopenharmony_ci        this.parentStyle = data.style;
3295bd8deadSopenharmony_ci    } else {
3305bd8deadSopenharmony_ci        this.parentStyle = data.parentStyle;
3315bd8deadSopenharmony_ci    }
3325bd8deadSopenharmony_ci
3335bd8deadSopenharmony_ci    if (data.parentSize === undefined) {
3345bd8deadSopenharmony_ci        this.parentSize = data.size;
3355bd8deadSopenharmony_ci    } else {
3365bd8deadSopenharmony_ci        this.parentSize = data.parentSize;
3375bd8deadSopenharmony_ci    }
3385bd8deadSopenharmony_ci}
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci/**
3415bd8deadSopenharmony_ci * Returns a new options object with the same properties as "this".  Properties
3425bd8deadSopenharmony_ci * from "extension" will be copied to the new options object.
3435bd8deadSopenharmony_ci */
3445bd8deadSopenharmony_ciOptions.prototype.extend = function(extension) {
3455bd8deadSopenharmony_ci    var data = {
3465bd8deadSopenharmony_ci        style: this.style,
3475bd8deadSopenharmony_ci        size: this.size,
3485bd8deadSopenharmony_ci        color: this.color,
3495bd8deadSopenharmony_ci        parentStyle: this.style,
3505bd8deadSopenharmony_ci        parentSize: this.size,
3515bd8deadSopenharmony_ci        phantom: this.phantom,
3525bd8deadSopenharmony_ci        font: this.font
3535bd8deadSopenharmony_ci    };
3545bd8deadSopenharmony_ci
3555bd8deadSopenharmony_ci    for (var key in extension) {
3565bd8deadSopenharmony_ci        if (extension.hasOwnProperty(key)) {
3575bd8deadSopenharmony_ci            data[key] = extension[key];
3585bd8deadSopenharmony_ci        }
3595bd8deadSopenharmony_ci    }
3605bd8deadSopenharmony_ci
3615bd8deadSopenharmony_ci    return new Options(data);
3625bd8deadSopenharmony_ci};
3635bd8deadSopenharmony_ci
3645bd8deadSopenharmony_ci/**
3655bd8deadSopenharmony_ci * Create a new options object with the given style.
3665bd8deadSopenharmony_ci */
3675bd8deadSopenharmony_ciOptions.prototype.withStyle = function(style) {
3685bd8deadSopenharmony_ci    return this.extend({
3695bd8deadSopenharmony_ci        style: style
3705bd8deadSopenharmony_ci    });
3715bd8deadSopenharmony_ci};
3725bd8deadSopenharmony_ci
3735bd8deadSopenharmony_ci/**
3745bd8deadSopenharmony_ci * Create a new options object with the given size.
3755bd8deadSopenharmony_ci */
3765bd8deadSopenharmony_ciOptions.prototype.withSize = function(size) {
3775bd8deadSopenharmony_ci    return this.extend({
3785bd8deadSopenharmony_ci        size: size
3795bd8deadSopenharmony_ci    });
3805bd8deadSopenharmony_ci};
3815bd8deadSopenharmony_ci
3825bd8deadSopenharmony_ci/**
3835bd8deadSopenharmony_ci * Create a new options object with the given color.
3845bd8deadSopenharmony_ci */
3855bd8deadSopenharmony_ciOptions.prototype.withColor = function(color) {
3865bd8deadSopenharmony_ci    return this.extend({
3875bd8deadSopenharmony_ci        color: color
3885bd8deadSopenharmony_ci    });
3895bd8deadSopenharmony_ci};
3905bd8deadSopenharmony_ci
3915bd8deadSopenharmony_ci/**
3925bd8deadSopenharmony_ci * Create a new options object with "phantom" set to true.
3935bd8deadSopenharmony_ci */
3945bd8deadSopenharmony_ciOptions.prototype.withPhantom = function() {
3955bd8deadSopenharmony_ci    return this.extend({
3965bd8deadSopenharmony_ci        phantom: true
3975bd8deadSopenharmony_ci    });
3985bd8deadSopenharmony_ci};
3995bd8deadSopenharmony_ci
4005bd8deadSopenharmony_ci/**
4015bd8deadSopenharmony_ci * Create a new options objects with the give font.
4025bd8deadSopenharmony_ci */
4035bd8deadSopenharmony_ciOptions.prototype.withFont = function(font) {
4045bd8deadSopenharmony_ci    return this.extend({
4055bd8deadSopenharmony_ci        font: font || this.font
4065bd8deadSopenharmony_ci    });
4075bd8deadSopenharmony_ci};
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci/**
4105bd8deadSopenharmony_ci * Create a new options object with the same style, size, and color. This is
4115bd8deadSopenharmony_ci * used so that parent style and size changes are handled correctly.
4125bd8deadSopenharmony_ci */
4135bd8deadSopenharmony_ciOptions.prototype.reset = function() {
4145bd8deadSopenharmony_ci    return this.extend({});
4155bd8deadSopenharmony_ci};
4165bd8deadSopenharmony_ci
4175bd8deadSopenharmony_ci/**
4185bd8deadSopenharmony_ci * A map of color names to CSS colors.
4195bd8deadSopenharmony_ci * TODO(emily): Remove this when we have real macros
4205bd8deadSopenharmony_ci */
4215bd8deadSopenharmony_civar colorMap = {
4225bd8deadSopenharmony_ci    "katex-blue": "#6495ed",
4235bd8deadSopenharmony_ci    "katex-orange": "#ffa500",
4245bd8deadSopenharmony_ci    "katex-pink": "#ff00af",
4255bd8deadSopenharmony_ci    "katex-red": "#df0030",
4265bd8deadSopenharmony_ci    "katex-green": "#28ae7b",
4275bd8deadSopenharmony_ci    "katex-gray": "gray",
4285bd8deadSopenharmony_ci    "katex-purple": "#9d38bd",
4295bd8deadSopenharmony_ci    "katex-blueA": "#ccfaff",
4305bd8deadSopenharmony_ci    "katex-blueB": "#80f6ff",
4315bd8deadSopenharmony_ci    "katex-blueC": "#63d9ea",
4325bd8deadSopenharmony_ci    "katex-blueD": "#11accd",
4335bd8deadSopenharmony_ci    "katex-blueE": "#0c7f99",
4345bd8deadSopenharmony_ci    "katex-tealA": "#94fff5",
4355bd8deadSopenharmony_ci    "katex-tealB": "#26edd5",
4365bd8deadSopenharmony_ci    "katex-tealC": "#01d1c1",
4375bd8deadSopenharmony_ci    "katex-tealD": "#01a995",
4385bd8deadSopenharmony_ci    "katex-tealE": "#208170",
4395bd8deadSopenharmony_ci    "katex-greenA": "#b6ffb0",
4405bd8deadSopenharmony_ci    "katex-greenB": "#8af281",
4415bd8deadSopenharmony_ci    "katex-greenC": "#74cf70",
4425bd8deadSopenharmony_ci    "katex-greenD": "#1fab54",
4435bd8deadSopenharmony_ci    "katex-greenE": "#0d923f",
4445bd8deadSopenharmony_ci    "katex-goldA": "#ffd0a9",
4455bd8deadSopenharmony_ci    "katex-goldB": "#ffbb71",
4465bd8deadSopenharmony_ci    "katex-goldC": "#ff9c39",
4475bd8deadSopenharmony_ci    "katex-goldD": "#e07d10",
4485bd8deadSopenharmony_ci    "katex-goldE": "#a75a05",
4495bd8deadSopenharmony_ci    "katex-redA": "#fca9a9",
4505bd8deadSopenharmony_ci    "katex-redB": "#ff8482",
4515bd8deadSopenharmony_ci    "katex-redC": "#f9685d",
4525bd8deadSopenharmony_ci    "katex-redD": "#e84d39",
4535bd8deadSopenharmony_ci    "katex-redE": "#bc2612",
4545bd8deadSopenharmony_ci    "katex-maroonA": "#ffbde0",
4555bd8deadSopenharmony_ci    "katex-maroonB": "#ff92c6",
4565bd8deadSopenharmony_ci    "katex-maroonC": "#ed5fa6",
4575bd8deadSopenharmony_ci    "katex-maroonD": "#ca337c",
4585bd8deadSopenharmony_ci    "katex-maroonE": "#9e034e",
4595bd8deadSopenharmony_ci    "katex-purpleA": "#ddd7ff",
4605bd8deadSopenharmony_ci    "katex-purpleB": "#c6b9fc",
4615bd8deadSopenharmony_ci    "katex-purpleC": "#aa87ff",
4625bd8deadSopenharmony_ci    "katex-purpleD": "#7854ab",
4635bd8deadSopenharmony_ci    "katex-purpleE": "#543b78",
4645bd8deadSopenharmony_ci    "katex-mintA": "#f5f9e8",
4655bd8deadSopenharmony_ci    "katex-mintB": "#edf2df",
4665bd8deadSopenharmony_ci    "katex-mintC": "#e0e5cc",
4675bd8deadSopenharmony_ci    "katex-grayA": "#f6f7f7",
4685bd8deadSopenharmony_ci    "katex-grayB": "#f0f1f2",
4695bd8deadSopenharmony_ci    "katex-grayC": "#e3e5e6",
4705bd8deadSopenharmony_ci    "katex-grayD": "#d6d8da",
4715bd8deadSopenharmony_ci    "katex-grayE": "#babec2",
4725bd8deadSopenharmony_ci    "katex-grayF": "#888d93",
4735bd8deadSopenharmony_ci    "katex-grayG": "#626569",
4745bd8deadSopenharmony_ci    "katex-grayH": "#3b3e40",
4755bd8deadSopenharmony_ci    "katex-grayI": "#21242c",
4765bd8deadSopenharmony_ci    "katex-kaBlue": "#314453",
4775bd8deadSopenharmony_ci    "katex-kaGreen": "#71B307"
4785bd8deadSopenharmony_ci};
4795bd8deadSopenharmony_ci
4805bd8deadSopenharmony_ci/**
4815bd8deadSopenharmony_ci * Gets the CSS color of the current options object, accounting for the
4825bd8deadSopenharmony_ci * `colorMap`.
4835bd8deadSopenharmony_ci */
4845bd8deadSopenharmony_ciOptions.prototype.getColor = function() {
4855bd8deadSopenharmony_ci    if (this.phantom) {
4865bd8deadSopenharmony_ci        return "transparent";
4875bd8deadSopenharmony_ci    } else {
4885bd8deadSopenharmony_ci        return colorMap[this.color] || this.color;
4895bd8deadSopenharmony_ci    }
4905bd8deadSopenharmony_ci};
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_cimodule.exports = Options;
4935bd8deadSopenharmony_ci
4945bd8deadSopenharmony_ci},{}],6:[function(require,module,exports){
4955bd8deadSopenharmony_ci/**
4965bd8deadSopenharmony_ci * This is the ParseError class, which is the main error thrown by KaTeX
4975bd8deadSopenharmony_ci * functions when something has gone wrong. This is used to distinguish internal
4985bd8deadSopenharmony_ci * errors from errors in the expression that the user provided.
4995bd8deadSopenharmony_ci *
5005bd8deadSopenharmony_ci * If possible, a caller should provide a Token or ParseNode with information
5015bd8deadSopenharmony_ci * about where in the source string the problem occurred.
5025bd8deadSopenharmony_ci *
5035bd8deadSopenharmony_ci * @param {string} message  The error message
5045bd8deadSopenharmony_ci * @param {(Token|ParseNode)=} token  An object providing position information
5055bd8deadSopenharmony_ci */
5065bd8deadSopenharmony_cifunction ParseError(message, token) {
5075bd8deadSopenharmony_ci    var error = "KaTeX parse error: " + message;
5085bd8deadSopenharmony_ci    var start;
5095bd8deadSopenharmony_ci    var end;
5105bd8deadSopenharmony_ci
5115bd8deadSopenharmony_ci    if (token && token.lexer && token.start <= token.end) {
5125bd8deadSopenharmony_ci        // If we have the input and a position, make the error a bit fancier
5135bd8deadSopenharmony_ci
5145bd8deadSopenharmony_ci        // Get the input
5155bd8deadSopenharmony_ci        var input = token.lexer.input;
5165bd8deadSopenharmony_ci
5175bd8deadSopenharmony_ci        // Prepend some information
5185bd8deadSopenharmony_ci        start = token.start;
5195bd8deadSopenharmony_ci        end = token.end;
5205bd8deadSopenharmony_ci        if (start === input.length) {
5215bd8deadSopenharmony_ci            error += " at end of input: ";
5225bd8deadSopenharmony_ci        } else {
5235bd8deadSopenharmony_ci            error += " at position " + (start + 1) + ": ";
5245bd8deadSopenharmony_ci        }
5255bd8deadSopenharmony_ci
5265bd8deadSopenharmony_ci        // Underline token in question using combining underscores
5275bd8deadSopenharmony_ci        var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332");
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci        // Extract some context from the input and add it to the error
5305bd8deadSopenharmony_ci        var left;
5315bd8deadSopenharmony_ci        if (start > 15) {
5325bd8deadSopenharmony_ci            left = "…" + input.slice(start - 15, start);
5335bd8deadSopenharmony_ci        } else {
5345bd8deadSopenharmony_ci            left = input.slice(0, start);
5355bd8deadSopenharmony_ci        }
5365bd8deadSopenharmony_ci        var right;
5375bd8deadSopenharmony_ci        if (end + 15 < input.length) {
5385bd8deadSopenharmony_ci            right = input.slice(end, end + 15) + "…";
5395bd8deadSopenharmony_ci        } else {
5405bd8deadSopenharmony_ci            right = input.slice(end);
5415bd8deadSopenharmony_ci        }
5425bd8deadSopenharmony_ci        error += left + underlined + right;
5435bd8deadSopenharmony_ci    }
5445bd8deadSopenharmony_ci
5455bd8deadSopenharmony_ci    // Some hackery to make ParseError a prototype of Error
5465bd8deadSopenharmony_ci    // See http://stackoverflow.com/a/8460753
5475bd8deadSopenharmony_ci    var self = new Error(error);
5485bd8deadSopenharmony_ci    self.name = "ParseError";
5495bd8deadSopenharmony_ci    self.__proto__ = ParseError.prototype;
5505bd8deadSopenharmony_ci
5515bd8deadSopenharmony_ci    self.position = start;
5525bd8deadSopenharmony_ci    return self;
5535bd8deadSopenharmony_ci}
5545bd8deadSopenharmony_ci
5555bd8deadSopenharmony_ci// More hackery
5565bd8deadSopenharmony_ciParseError.prototype.__proto__ = Error.prototype;
5575bd8deadSopenharmony_ci
5585bd8deadSopenharmony_cimodule.exports = ParseError;
5595bd8deadSopenharmony_ci
5605bd8deadSopenharmony_ci},{}],7:[function(require,module,exports){
5615bd8deadSopenharmony_ci/* eslint no-constant-condition:0 */
5625bd8deadSopenharmony_civar functions = require("./functions");
5635bd8deadSopenharmony_civar environments = require("./environments");
5645bd8deadSopenharmony_civar MacroExpander = require("./MacroExpander");
5655bd8deadSopenharmony_civar symbols = require("./symbols");
5665bd8deadSopenharmony_civar utils = require("./utils");
5675bd8deadSopenharmony_civar cjkRegex = require("./unicodeRegexes").cjkRegex;
5685bd8deadSopenharmony_ci
5695bd8deadSopenharmony_civar parseData = require("./parseData");
5705bd8deadSopenharmony_civar ParseError = require("./ParseError");
5715bd8deadSopenharmony_ci
5725bd8deadSopenharmony_ci/**
5735bd8deadSopenharmony_ci * This file contains the parser used to parse out a TeX expression from the
5745bd8deadSopenharmony_ci * input. Since TeX isn't context-free, standard parsers don't work particularly
5755bd8deadSopenharmony_ci * well.
5765bd8deadSopenharmony_ci *
5775bd8deadSopenharmony_ci * The strategy of this parser is as such:
5785bd8deadSopenharmony_ci *
5795bd8deadSopenharmony_ci * The main functions (the `.parse...` ones) take a position in the current
5805bd8deadSopenharmony_ci * parse string to parse tokens from. The lexer (found in Lexer.js, stored at
5815bd8deadSopenharmony_ci * this.lexer) also supports pulling out tokens at arbitrary places. When
5825bd8deadSopenharmony_ci * individual tokens are needed at a position, the lexer is called to pull out a
5835bd8deadSopenharmony_ci * token, which is then used.
5845bd8deadSopenharmony_ci *
5855bd8deadSopenharmony_ci * The parser has a property called "mode" indicating the mode that
5865bd8deadSopenharmony_ci * the parser is currently in. Currently it has to be one of "math" or
5875bd8deadSopenharmony_ci * "text", which denotes whether the current environment is a math-y
5885bd8deadSopenharmony_ci * one or a text-y one (e.g. inside \text). Currently, this serves to
5895bd8deadSopenharmony_ci * limit the functions which can be used in text mode.
5905bd8deadSopenharmony_ci *
5915bd8deadSopenharmony_ci * The main functions then return an object which contains the useful data that
5925bd8deadSopenharmony_ci * was parsed at its given point, and a new position at the end of the parsed
5935bd8deadSopenharmony_ci * data. The main functions can call each other and continue the parsing by
5945bd8deadSopenharmony_ci * using the returned position as a new starting point.
5955bd8deadSopenharmony_ci *
5965bd8deadSopenharmony_ci * There are also extra `.handle...` functions, which pull out some reused
5975bd8deadSopenharmony_ci * functionality into self-contained functions.
5985bd8deadSopenharmony_ci *
5995bd8deadSopenharmony_ci * The earlier functions return ParseNodes.
6005bd8deadSopenharmony_ci * The later functions (which are called deeper in the parse) sometimes return
6015bd8deadSopenharmony_ci * ParseFuncOrArgument, which contain a ParseNode as well as some data about
6025bd8deadSopenharmony_ci * whether the parsed object is a function which is missing some arguments, or a
6035bd8deadSopenharmony_ci * standalone object which can be used as an argument to another function.
6045bd8deadSopenharmony_ci */
6055bd8deadSopenharmony_ci
6065bd8deadSopenharmony_ci/**
6075bd8deadSopenharmony_ci * Main Parser class
6085bd8deadSopenharmony_ci */
6095bd8deadSopenharmony_cifunction Parser(input, settings) {
6105bd8deadSopenharmony_ci    // Create a new macro expander (gullet) and (indirectly via that) also a
6115bd8deadSopenharmony_ci    // new lexer (mouth) for this parser (stomach, in the language of TeX)
6125bd8deadSopenharmony_ci    this.gullet = new MacroExpander(input, settings.macros);
6135bd8deadSopenharmony_ci    // Store the settings for use in parsing
6145bd8deadSopenharmony_ci    this.settings = settings;
6155bd8deadSopenharmony_ci    // Count leftright depth (for \middle errors)
6165bd8deadSopenharmony_ci    this.leftrightDepth = 0;
6175bd8deadSopenharmony_ci}
6185bd8deadSopenharmony_ci
6195bd8deadSopenharmony_civar ParseNode = parseData.ParseNode;
6205bd8deadSopenharmony_ci
6215bd8deadSopenharmony_ci/**
6225bd8deadSopenharmony_ci * An initial function (without its arguments), or an argument to a function.
6235bd8deadSopenharmony_ci * The `result` argument should be a ParseNode.
6245bd8deadSopenharmony_ci */
6255bd8deadSopenharmony_cifunction ParseFuncOrArgument(result, isFunction, token) {
6265bd8deadSopenharmony_ci    this.result = result;
6275bd8deadSopenharmony_ci    // Is this a function (i.e. is it something defined in functions.js)?
6285bd8deadSopenharmony_ci    this.isFunction = isFunction;
6295bd8deadSopenharmony_ci    this.token = token;
6305bd8deadSopenharmony_ci}
6315bd8deadSopenharmony_ci
6325bd8deadSopenharmony_ci/**
6335bd8deadSopenharmony_ci * Checks a result to make sure it has the right type, and throws an
6345bd8deadSopenharmony_ci * appropriate error otherwise.
6355bd8deadSopenharmony_ci *
6365bd8deadSopenharmony_ci * @param {boolean=} consume whether to consume the expected token,
6375bd8deadSopenharmony_ci *                           defaults to true
6385bd8deadSopenharmony_ci */
6395bd8deadSopenharmony_ciParser.prototype.expect = function(text, consume) {
6405bd8deadSopenharmony_ci    if (this.nextToken.text !== text) {
6415bd8deadSopenharmony_ci        throw new ParseError(
6425bd8deadSopenharmony_ci            "Expected '" + text + "', got '" + this.nextToken.text + "'",
6435bd8deadSopenharmony_ci            this.nextToken
6445bd8deadSopenharmony_ci        );
6455bd8deadSopenharmony_ci    }
6465bd8deadSopenharmony_ci    if (consume !== false) {
6475bd8deadSopenharmony_ci        this.consume();
6485bd8deadSopenharmony_ci    }
6495bd8deadSopenharmony_ci};
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci/**
6525bd8deadSopenharmony_ci * Considers the current look ahead token as consumed,
6535bd8deadSopenharmony_ci * and fetches the one after that as the new look ahead.
6545bd8deadSopenharmony_ci */
6555bd8deadSopenharmony_ciParser.prototype.consume = function() {
6565bd8deadSopenharmony_ci    this.nextToken = this.gullet.get(this.mode === "math");
6575bd8deadSopenharmony_ci};
6585bd8deadSopenharmony_ci
6595bd8deadSopenharmony_ciParser.prototype.switchMode = function(newMode) {
6605bd8deadSopenharmony_ci    this.gullet.unget(this.nextToken);
6615bd8deadSopenharmony_ci    this.mode = newMode;
6625bd8deadSopenharmony_ci    this.consume();
6635bd8deadSopenharmony_ci};
6645bd8deadSopenharmony_ci
6655bd8deadSopenharmony_ci/**
6665bd8deadSopenharmony_ci * Main parsing function, which parses an entire input.
6675bd8deadSopenharmony_ci *
6685bd8deadSopenharmony_ci * @return {?Array.<ParseNode>}
6695bd8deadSopenharmony_ci */
6705bd8deadSopenharmony_ciParser.prototype.parse = function() {
6715bd8deadSopenharmony_ci    // Try to parse the input
6725bd8deadSopenharmony_ci    this.mode = "math";
6735bd8deadSopenharmony_ci    this.consume();
6745bd8deadSopenharmony_ci    var parse = this.parseInput();
6755bd8deadSopenharmony_ci    return parse;
6765bd8deadSopenharmony_ci};
6775bd8deadSopenharmony_ci
6785bd8deadSopenharmony_ci/**
6795bd8deadSopenharmony_ci * Parses an entire input tree.
6805bd8deadSopenharmony_ci */
6815bd8deadSopenharmony_ciParser.prototype.parseInput = function() {
6825bd8deadSopenharmony_ci    // Parse an expression
6835bd8deadSopenharmony_ci    var expression = this.parseExpression(false);
6845bd8deadSopenharmony_ci    // If we succeeded, make sure there's an EOF at the end
6855bd8deadSopenharmony_ci    this.expect("EOF", false);
6865bd8deadSopenharmony_ci    return expression;
6875bd8deadSopenharmony_ci};
6885bd8deadSopenharmony_ci
6895bd8deadSopenharmony_civar endOfExpression = ["}", "\\end", "\\right", "&", "\\\\", "\\cr"];
6905bd8deadSopenharmony_ci
6915bd8deadSopenharmony_ci/**
6925bd8deadSopenharmony_ci * Parses an "expression", which is a list of atoms.
6935bd8deadSopenharmony_ci *
6945bd8deadSopenharmony_ci * @param {boolean} breakOnInfix  Should the parsing stop when we hit infix
6955bd8deadSopenharmony_ci *                  nodes? This happens when functions have higher precendence
6965bd8deadSopenharmony_ci *                  than infix nodes in implicit parses.
6975bd8deadSopenharmony_ci *
6985bd8deadSopenharmony_ci * @param {?string} breakOnTokenText  The text of the token that the expression
6995bd8deadSopenharmony_ci *                  should end with, or `null` if something else should end the
7005bd8deadSopenharmony_ci *                  expression.
7015bd8deadSopenharmony_ci *
7025bd8deadSopenharmony_ci * @return {ParseNode}
7035bd8deadSopenharmony_ci */
7045bd8deadSopenharmony_ciParser.prototype.parseExpression = function(breakOnInfix, breakOnTokenText) {
7055bd8deadSopenharmony_ci    var body = [];
7065bd8deadSopenharmony_ci    // Keep adding atoms to the body until we can't parse any more atoms (either
7075bd8deadSopenharmony_ci    // we reached the end, a }, or a \right)
7085bd8deadSopenharmony_ci    while (true) {
7095bd8deadSopenharmony_ci        var lex = this.nextToken;
7105bd8deadSopenharmony_ci        if (endOfExpression.indexOf(lex.text) !== -1) {
7115bd8deadSopenharmony_ci            break;
7125bd8deadSopenharmony_ci        }
7135bd8deadSopenharmony_ci        if (breakOnTokenText && lex.text === breakOnTokenText) {
7145bd8deadSopenharmony_ci            break;
7155bd8deadSopenharmony_ci        }
7165bd8deadSopenharmony_ci        if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) {
7175bd8deadSopenharmony_ci            break;
7185bd8deadSopenharmony_ci        }
7195bd8deadSopenharmony_ci        var atom = this.parseAtom();
7205bd8deadSopenharmony_ci        if (!atom) {
7215bd8deadSopenharmony_ci            if (!this.settings.throwOnError && lex.text[0] === "\\") {
7225bd8deadSopenharmony_ci                var errorNode = this.handleUnsupportedCmd();
7235bd8deadSopenharmony_ci                body.push(errorNode);
7245bd8deadSopenharmony_ci                continue;
7255bd8deadSopenharmony_ci            }
7265bd8deadSopenharmony_ci
7275bd8deadSopenharmony_ci            break;
7285bd8deadSopenharmony_ci        }
7295bd8deadSopenharmony_ci        body.push(atom);
7305bd8deadSopenharmony_ci    }
7315bd8deadSopenharmony_ci    return this.handleInfixNodes(body);
7325bd8deadSopenharmony_ci};
7335bd8deadSopenharmony_ci
7345bd8deadSopenharmony_ci/**
7355bd8deadSopenharmony_ci * Rewrites infix operators such as \over with corresponding commands such
7365bd8deadSopenharmony_ci * as \frac.
7375bd8deadSopenharmony_ci *
7385bd8deadSopenharmony_ci * There can only be one infix operator per group.  If there's more than one
7395bd8deadSopenharmony_ci * then the expression is ambiguous.  This can be resolved by adding {}.
7405bd8deadSopenharmony_ci *
7415bd8deadSopenharmony_ci * @returns {Array}
7425bd8deadSopenharmony_ci */
7435bd8deadSopenharmony_ciParser.prototype.handleInfixNodes = function(body) {
7445bd8deadSopenharmony_ci    var overIndex = -1;
7455bd8deadSopenharmony_ci    var funcName;
7465bd8deadSopenharmony_ci
7475bd8deadSopenharmony_ci    for (var i = 0; i < body.length; i++) {
7485bd8deadSopenharmony_ci        var node = body[i];
7495bd8deadSopenharmony_ci        if (node.type === "infix") {
7505bd8deadSopenharmony_ci            if (overIndex !== -1) {
7515bd8deadSopenharmony_ci                throw new ParseError(
7525bd8deadSopenharmony_ci                    "only one infix operator per group",
7535bd8deadSopenharmony_ci                    node.value.token);
7545bd8deadSopenharmony_ci            }
7555bd8deadSopenharmony_ci            overIndex = i;
7565bd8deadSopenharmony_ci            funcName = node.value.replaceWith;
7575bd8deadSopenharmony_ci        }
7585bd8deadSopenharmony_ci    }
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ci    if (overIndex !== -1) {
7615bd8deadSopenharmony_ci        var numerNode;
7625bd8deadSopenharmony_ci        var denomNode;
7635bd8deadSopenharmony_ci
7645bd8deadSopenharmony_ci        var numerBody = body.slice(0, overIndex);
7655bd8deadSopenharmony_ci        var denomBody = body.slice(overIndex + 1);
7665bd8deadSopenharmony_ci
7675bd8deadSopenharmony_ci        if (numerBody.length === 1 && numerBody[0].type === "ordgroup") {
7685bd8deadSopenharmony_ci            numerNode = numerBody[0];
7695bd8deadSopenharmony_ci        } else {
7705bd8deadSopenharmony_ci            numerNode = new ParseNode("ordgroup", numerBody, this.mode);
7715bd8deadSopenharmony_ci        }
7725bd8deadSopenharmony_ci
7735bd8deadSopenharmony_ci        if (denomBody.length === 1 && denomBody[0].type === "ordgroup") {
7745bd8deadSopenharmony_ci            denomNode = denomBody[0];
7755bd8deadSopenharmony_ci        } else {
7765bd8deadSopenharmony_ci            denomNode = new ParseNode("ordgroup", denomBody, this.mode);
7775bd8deadSopenharmony_ci        }
7785bd8deadSopenharmony_ci
7795bd8deadSopenharmony_ci        var value = this.callFunction(
7805bd8deadSopenharmony_ci            funcName, [numerNode, denomNode], null);
7815bd8deadSopenharmony_ci        return [new ParseNode(value.type, value, this.mode)];
7825bd8deadSopenharmony_ci    } else {
7835bd8deadSopenharmony_ci        return body;
7845bd8deadSopenharmony_ci    }
7855bd8deadSopenharmony_ci};
7865bd8deadSopenharmony_ci
7875bd8deadSopenharmony_ci// The greediness of a superscript or subscript
7885bd8deadSopenharmony_civar SUPSUB_GREEDINESS = 1;
7895bd8deadSopenharmony_ci
7905bd8deadSopenharmony_ci/**
7915bd8deadSopenharmony_ci * Handle a subscript or superscript with nice errors.
7925bd8deadSopenharmony_ci */
7935bd8deadSopenharmony_ciParser.prototype.handleSupSubscript = function(name) {
7945bd8deadSopenharmony_ci    var symbolToken = this.nextToken;
7955bd8deadSopenharmony_ci    var symbol = symbolToken.text;
7965bd8deadSopenharmony_ci    this.consume();
7975bd8deadSopenharmony_ci    var group = this.parseGroup();
7985bd8deadSopenharmony_ci
7995bd8deadSopenharmony_ci    if (!group) {
8005bd8deadSopenharmony_ci        if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
8015bd8deadSopenharmony_ci            return this.handleUnsupportedCmd();
8025bd8deadSopenharmony_ci        } else {
8035bd8deadSopenharmony_ci            throw new ParseError(
8045bd8deadSopenharmony_ci                "Expected group after '" + symbol + "'",
8055bd8deadSopenharmony_ci                symbolToken
8065bd8deadSopenharmony_ci            );
8075bd8deadSopenharmony_ci        }
8085bd8deadSopenharmony_ci    } else if (group.isFunction) {
8095bd8deadSopenharmony_ci        // ^ and _ have a greediness, so handle interactions with functions'
8105bd8deadSopenharmony_ci        // greediness
8115bd8deadSopenharmony_ci        var funcGreediness = functions[group.result].greediness;
8125bd8deadSopenharmony_ci        if (funcGreediness > SUPSUB_GREEDINESS) {
8135bd8deadSopenharmony_ci            return this.parseFunction(group);
8145bd8deadSopenharmony_ci        } else {
8155bd8deadSopenharmony_ci            throw new ParseError(
8165bd8deadSopenharmony_ci                "Got function '" + group.result + "' with no arguments " +
8175bd8deadSopenharmony_ci                    "as " + name, symbolToken);
8185bd8deadSopenharmony_ci        }
8195bd8deadSopenharmony_ci    } else {
8205bd8deadSopenharmony_ci        return group.result;
8215bd8deadSopenharmony_ci    }
8225bd8deadSopenharmony_ci};
8235bd8deadSopenharmony_ci
8245bd8deadSopenharmony_ci/**
8255bd8deadSopenharmony_ci * Converts the textual input of an unsupported command into a text node
8265bd8deadSopenharmony_ci * contained within a color node whose color is determined by errorColor
8275bd8deadSopenharmony_ci */
8285bd8deadSopenharmony_ciParser.prototype.handleUnsupportedCmd = function() {
8295bd8deadSopenharmony_ci    var text = this.nextToken.text;
8305bd8deadSopenharmony_ci    var textordArray = [];
8315bd8deadSopenharmony_ci
8325bd8deadSopenharmony_ci    for (var i = 0; i < text.length; i++) {
8335bd8deadSopenharmony_ci        textordArray.push(new ParseNode("textord", text[i], "text"));
8345bd8deadSopenharmony_ci    }
8355bd8deadSopenharmony_ci
8365bd8deadSopenharmony_ci    var textNode = new ParseNode(
8375bd8deadSopenharmony_ci        "text",
8385bd8deadSopenharmony_ci        {
8395bd8deadSopenharmony_ci            body: textordArray,
8405bd8deadSopenharmony_ci            type: "text"
8415bd8deadSopenharmony_ci        },
8425bd8deadSopenharmony_ci        this.mode);
8435bd8deadSopenharmony_ci
8445bd8deadSopenharmony_ci    var colorNode = new ParseNode(
8455bd8deadSopenharmony_ci        "color",
8465bd8deadSopenharmony_ci        {
8475bd8deadSopenharmony_ci            color: this.settings.errorColor,
8485bd8deadSopenharmony_ci            value: [textNode],
8495bd8deadSopenharmony_ci            type: "color"
8505bd8deadSopenharmony_ci        },
8515bd8deadSopenharmony_ci        this.mode);
8525bd8deadSopenharmony_ci
8535bd8deadSopenharmony_ci    this.consume();
8545bd8deadSopenharmony_ci    return colorNode;
8555bd8deadSopenharmony_ci};
8565bd8deadSopenharmony_ci
8575bd8deadSopenharmony_ci/**
8585bd8deadSopenharmony_ci * Parses a group with optional super/subscripts.
8595bd8deadSopenharmony_ci *
8605bd8deadSopenharmony_ci * @return {?ParseNode}
8615bd8deadSopenharmony_ci */
8625bd8deadSopenharmony_ciParser.prototype.parseAtom = function() {
8635bd8deadSopenharmony_ci    // The body of an atom is an implicit group, so that things like
8645bd8deadSopenharmony_ci    // \left(x\right)^2 work correctly.
8655bd8deadSopenharmony_ci    var base = this.parseImplicitGroup();
8665bd8deadSopenharmony_ci
8675bd8deadSopenharmony_ci    // In text mode, we don't have superscripts or subscripts
8685bd8deadSopenharmony_ci    if (this.mode === "text") {
8695bd8deadSopenharmony_ci        return base;
8705bd8deadSopenharmony_ci    }
8715bd8deadSopenharmony_ci
8725bd8deadSopenharmony_ci    // Note that base may be empty (i.e. null) at this point.
8735bd8deadSopenharmony_ci
8745bd8deadSopenharmony_ci    var superscript;
8755bd8deadSopenharmony_ci    var subscript;
8765bd8deadSopenharmony_ci    while (true) {
8775bd8deadSopenharmony_ci        // Lex the first token
8785bd8deadSopenharmony_ci        var lex = this.nextToken;
8795bd8deadSopenharmony_ci
8805bd8deadSopenharmony_ci        if (lex.text === "\\limits" || lex.text === "\\nolimits") {
8815bd8deadSopenharmony_ci            // We got a limit control
8825bd8deadSopenharmony_ci            if (!base || base.type !== "op") {
8835bd8deadSopenharmony_ci                throw new ParseError(
8845bd8deadSopenharmony_ci                    "Limit controls must follow a math operator",
8855bd8deadSopenharmony_ci                    lex);
8865bd8deadSopenharmony_ci            } else {
8875bd8deadSopenharmony_ci                var limits = lex.text === "\\limits";
8885bd8deadSopenharmony_ci                base.value.limits = limits;
8895bd8deadSopenharmony_ci                base.value.alwaysHandleSupSub = true;
8905bd8deadSopenharmony_ci            }
8915bd8deadSopenharmony_ci            this.consume();
8925bd8deadSopenharmony_ci        } else if (lex.text === "^") {
8935bd8deadSopenharmony_ci            // We got a superscript start
8945bd8deadSopenharmony_ci            if (superscript) {
8955bd8deadSopenharmony_ci                throw new ParseError("Double superscript", lex);
8965bd8deadSopenharmony_ci            }
8975bd8deadSopenharmony_ci            superscript = this.handleSupSubscript("superscript");
8985bd8deadSopenharmony_ci        } else if (lex.text === "_") {
8995bd8deadSopenharmony_ci            // We got a subscript start
9005bd8deadSopenharmony_ci            if (subscript) {
9015bd8deadSopenharmony_ci                throw new ParseError("Double subscript", lex);
9025bd8deadSopenharmony_ci            }
9035bd8deadSopenharmony_ci            subscript = this.handleSupSubscript("subscript");
9045bd8deadSopenharmony_ci        } else if (lex.text === "'") {
9055bd8deadSopenharmony_ci            // We got a prime
9065bd8deadSopenharmony_ci            var prime = new ParseNode("textord", "\\prime", this.mode);
9075bd8deadSopenharmony_ci
9085bd8deadSopenharmony_ci            // Many primes can be grouped together, so we handle this here
9095bd8deadSopenharmony_ci            var primes = [prime];
9105bd8deadSopenharmony_ci            this.consume();
9115bd8deadSopenharmony_ci            // Keep lexing tokens until we get something that's not a prime
9125bd8deadSopenharmony_ci            while (this.nextToken.text === "'") {
9135bd8deadSopenharmony_ci                // For each one, add another prime to the list
9145bd8deadSopenharmony_ci                primes.push(prime);
9155bd8deadSopenharmony_ci                this.consume();
9165bd8deadSopenharmony_ci            }
9175bd8deadSopenharmony_ci            // Put them into an ordgroup as the superscript
9185bd8deadSopenharmony_ci            superscript = new ParseNode("ordgroup", primes, this.mode);
9195bd8deadSopenharmony_ci        } else {
9205bd8deadSopenharmony_ci            // If it wasn't ^, _, or ', stop parsing super/subscripts
9215bd8deadSopenharmony_ci            break;
9225bd8deadSopenharmony_ci        }
9235bd8deadSopenharmony_ci    }
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci    if (superscript || subscript) {
9265bd8deadSopenharmony_ci        // If we got either a superscript or subscript, create a supsub
9275bd8deadSopenharmony_ci        return new ParseNode("supsub", {
9285bd8deadSopenharmony_ci            base: base,
9295bd8deadSopenharmony_ci            sup: superscript,
9305bd8deadSopenharmony_ci            sub: subscript
9315bd8deadSopenharmony_ci        }, this.mode);
9325bd8deadSopenharmony_ci    } else {
9335bd8deadSopenharmony_ci        // Otherwise return the original body
9345bd8deadSopenharmony_ci        return base;
9355bd8deadSopenharmony_ci    }
9365bd8deadSopenharmony_ci};
9375bd8deadSopenharmony_ci
9385bd8deadSopenharmony_ci// A list of the size-changing functions, for use in parseImplicitGroup
9395bd8deadSopenharmony_civar sizeFuncs = [
9405bd8deadSopenharmony_ci    "\\tiny", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize",
9415bd8deadSopenharmony_ci    "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"
9425bd8deadSopenharmony_ci];
9435bd8deadSopenharmony_ci
9445bd8deadSopenharmony_ci// A list of the style-changing functions, for use in parseImplicitGroup
9455bd8deadSopenharmony_civar styleFuncs = [
9465bd8deadSopenharmony_ci    "\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"
9475bd8deadSopenharmony_ci];
9485bd8deadSopenharmony_ci
9495bd8deadSopenharmony_ci/**
9505bd8deadSopenharmony_ci * Parses an implicit group, which is a group that starts at the end of a
9515bd8deadSopenharmony_ci * specified, and ends right before a higher explicit group ends, or at EOL. It
9525bd8deadSopenharmony_ci * is used for functions that appear to affect the current style, like \Large or
9535bd8deadSopenharmony_ci * \textrm, where instead of keeping a style we just pretend that there is an
9545bd8deadSopenharmony_ci * implicit grouping after it until the end of the group. E.g.
9555bd8deadSopenharmony_ci *   small text {\Large large text} small text again
9565bd8deadSopenharmony_ci * It is also used for \left and \right to get the correct grouping.
9575bd8deadSopenharmony_ci *
9585bd8deadSopenharmony_ci * @return {?ParseNode}
9595bd8deadSopenharmony_ci */
9605bd8deadSopenharmony_ciParser.prototype.parseImplicitGroup = function() {
9615bd8deadSopenharmony_ci    var start = this.parseSymbol();
9625bd8deadSopenharmony_ci
9635bd8deadSopenharmony_ci    if (start == null) {
9645bd8deadSopenharmony_ci        // If we didn't get anything we handle, fall back to parseFunction
9655bd8deadSopenharmony_ci        return this.parseFunction();
9665bd8deadSopenharmony_ci    }
9675bd8deadSopenharmony_ci
9685bd8deadSopenharmony_ci    var func = start.result;
9695bd8deadSopenharmony_ci    var body;
9705bd8deadSopenharmony_ci
9715bd8deadSopenharmony_ci    if (func === "\\left") {
9725bd8deadSopenharmony_ci        // If we see a left:
9735bd8deadSopenharmony_ci        // Parse the entire left function (including the delimiter)
9745bd8deadSopenharmony_ci        var left = this.parseFunction(start);
9755bd8deadSopenharmony_ci        // Parse out the implicit body
9765bd8deadSopenharmony_ci        ++this.leftrightDepth;
9775bd8deadSopenharmony_ci        body = this.parseExpression(false);
9785bd8deadSopenharmony_ci        --this.leftrightDepth;
9795bd8deadSopenharmony_ci        // Check the next token
9805bd8deadSopenharmony_ci        this.expect("\\right", false);
9815bd8deadSopenharmony_ci        var right = this.parseFunction();
9825bd8deadSopenharmony_ci        return new ParseNode("leftright", {
9835bd8deadSopenharmony_ci            body: body,
9845bd8deadSopenharmony_ci            left: left.value.value,
9855bd8deadSopenharmony_ci            right: right.value.value
9865bd8deadSopenharmony_ci        }, this.mode);
9875bd8deadSopenharmony_ci    } else if (func === "\\begin") {
9885bd8deadSopenharmony_ci        // begin...end is similar to left...right
9895bd8deadSopenharmony_ci        var begin = this.parseFunction(start);
9905bd8deadSopenharmony_ci        var envName = begin.value.name;
9915bd8deadSopenharmony_ci        if (!environments.hasOwnProperty(envName)) {
9925bd8deadSopenharmony_ci            throw new ParseError(
9935bd8deadSopenharmony_ci                "No such environment: " + envName, begin.value.nameGroup);
9945bd8deadSopenharmony_ci        }
9955bd8deadSopenharmony_ci        // Build the environment object. Arguments and other information will
9965bd8deadSopenharmony_ci        // be made available to the begin and end methods using properties.
9975bd8deadSopenharmony_ci        var env = environments[envName];
9985bd8deadSopenharmony_ci        var args = this.parseArguments("\\begin{" + envName + "}", env);
9995bd8deadSopenharmony_ci        var context = {
10005bd8deadSopenharmony_ci            mode: this.mode,
10015bd8deadSopenharmony_ci            envName: envName,
10025bd8deadSopenharmony_ci            parser: this,
10035bd8deadSopenharmony_ci            positions: args.pop()
10045bd8deadSopenharmony_ci        };
10055bd8deadSopenharmony_ci        var result = env.handler(context, args);
10065bd8deadSopenharmony_ci        this.expect("\\end", false);
10075bd8deadSopenharmony_ci        var endNameToken = this.nextToken;
10085bd8deadSopenharmony_ci        var end = this.parseFunction();
10095bd8deadSopenharmony_ci        if (end.value.name !== envName) {
10105bd8deadSopenharmony_ci            throw new ParseError(
10115bd8deadSopenharmony_ci                "Mismatch: \\begin{" + envName + "} matched " +
10125bd8deadSopenharmony_ci                "by \\end{" + end.value.name + "}",
10135bd8deadSopenharmony_ci                endNameToken);
10145bd8deadSopenharmony_ci        }
10155bd8deadSopenharmony_ci        result.position = end.position;
10165bd8deadSopenharmony_ci        return result;
10175bd8deadSopenharmony_ci    } else if (utils.contains(sizeFuncs, func)) {
10185bd8deadSopenharmony_ci        // If we see a sizing function, parse out the implict body
10195bd8deadSopenharmony_ci        body = this.parseExpression(false);
10205bd8deadSopenharmony_ci        return new ParseNode("sizing", {
10215bd8deadSopenharmony_ci            // Figure out what size to use based on the list of functions above
10225bd8deadSopenharmony_ci            size: "size" + (utils.indexOf(sizeFuncs, func) + 1),
10235bd8deadSopenharmony_ci            value: body
10245bd8deadSopenharmony_ci        }, this.mode);
10255bd8deadSopenharmony_ci    } else if (utils.contains(styleFuncs, func)) {
10265bd8deadSopenharmony_ci        // If we see a styling function, parse out the implict body
10275bd8deadSopenharmony_ci        body = this.parseExpression(true);
10285bd8deadSopenharmony_ci        return new ParseNode("styling", {
10295bd8deadSopenharmony_ci            // Figure out what style to use by pulling out the style from
10305bd8deadSopenharmony_ci            // the function name
10315bd8deadSopenharmony_ci            style: func.slice(1, func.length - 5),
10325bd8deadSopenharmony_ci            value: body
10335bd8deadSopenharmony_ci        }, this.mode);
10345bd8deadSopenharmony_ci    } else {
10355bd8deadSopenharmony_ci        // Defer to parseFunction if it's not a function we handle
10365bd8deadSopenharmony_ci        return this.parseFunction(start);
10375bd8deadSopenharmony_ci    }
10385bd8deadSopenharmony_ci};
10395bd8deadSopenharmony_ci
10405bd8deadSopenharmony_ci/**
10415bd8deadSopenharmony_ci * Parses an entire function, including its base and all of its arguments.
10425bd8deadSopenharmony_ci * The base might either have been parsed already, in which case
10435bd8deadSopenharmony_ci * it is provided as an argument, or it's the next group in the input.
10445bd8deadSopenharmony_ci *
10455bd8deadSopenharmony_ci * @param {ParseFuncOrArgument=} baseGroup optional as described above
10465bd8deadSopenharmony_ci * @return {?ParseNode}
10475bd8deadSopenharmony_ci */
10485bd8deadSopenharmony_ciParser.prototype.parseFunction = function(baseGroup) {
10495bd8deadSopenharmony_ci    if (!baseGroup) {
10505bd8deadSopenharmony_ci        baseGroup = this.parseGroup();
10515bd8deadSopenharmony_ci    }
10525bd8deadSopenharmony_ci
10535bd8deadSopenharmony_ci    if (baseGroup) {
10545bd8deadSopenharmony_ci        if (baseGroup.isFunction) {
10555bd8deadSopenharmony_ci            var func = baseGroup.result;
10565bd8deadSopenharmony_ci            var funcData = functions[func];
10575bd8deadSopenharmony_ci            if (this.mode === "text" && !funcData.allowedInText) {
10585bd8deadSopenharmony_ci                throw new ParseError(
10595bd8deadSopenharmony_ci                    "Can't use function '" + func + "' in text mode",
10605bd8deadSopenharmony_ci                    baseGroup.token);
10615bd8deadSopenharmony_ci            }
10625bd8deadSopenharmony_ci
10635bd8deadSopenharmony_ci            var args = this.parseArguments(func, funcData);
10645bd8deadSopenharmony_ci            var token = baseGroup.token;
10655bd8deadSopenharmony_ci            var result = this.callFunction(func, args, args.pop(), token);
10665bd8deadSopenharmony_ci            return new ParseNode(result.type, result, this.mode);
10675bd8deadSopenharmony_ci        } else {
10685bd8deadSopenharmony_ci            return baseGroup.result;
10695bd8deadSopenharmony_ci        }
10705bd8deadSopenharmony_ci    } else {
10715bd8deadSopenharmony_ci        return null;
10725bd8deadSopenharmony_ci    }
10735bd8deadSopenharmony_ci};
10745bd8deadSopenharmony_ci
10755bd8deadSopenharmony_ci/**
10765bd8deadSopenharmony_ci * Call a function handler with a suitable context and arguments.
10775bd8deadSopenharmony_ci */
10785bd8deadSopenharmony_ciParser.prototype.callFunction = function(name, args, positions, token) {
10795bd8deadSopenharmony_ci    var context = {
10805bd8deadSopenharmony_ci        funcName: name,
10815bd8deadSopenharmony_ci        parser: this,
10825bd8deadSopenharmony_ci        positions: positions,
10835bd8deadSopenharmony_ci        token: token
10845bd8deadSopenharmony_ci    };
10855bd8deadSopenharmony_ci    return functions[name].handler(context, args);
10865bd8deadSopenharmony_ci};
10875bd8deadSopenharmony_ci
10885bd8deadSopenharmony_ci/**
10895bd8deadSopenharmony_ci * Parses the arguments of a function or environment
10905bd8deadSopenharmony_ci *
10915bd8deadSopenharmony_ci * @param {string} func  "\name" or "\begin{name}"
10925bd8deadSopenharmony_ci * @param {{numArgs:number,numOptionalArgs:number|undefined}} funcData
10935bd8deadSopenharmony_ci * @return the array of arguments, with the list of positions as last element
10945bd8deadSopenharmony_ci */
10955bd8deadSopenharmony_ciParser.prototype.parseArguments = function(func, funcData) {
10965bd8deadSopenharmony_ci    var totalArgs = funcData.numArgs + funcData.numOptionalArgs;
10975bd8deadSopenharmony_ci    if (totalArgs === 0) {
10985bd8deadSopenharmony_ci        return [[this.pos]];
10995bd8deadSopenharmony_ci    }
11005bd8deadSopenharmony_ci
11015bd8deadSopenharmony_ci    var baseGreediness = funcData.greediness;
11025bd8deadSopenharmony_ci    var positions = [this.pos];
11035bd8deadSopenharmony_ci    var args = [];
11045bd8deadSopenharmony_ci
11055bd8deadSopenharmony_ci    for (var i = 0; i < totalArgs; i++) {
11065bd8deadSopenharmony_ci        var nextToken = this.nextToken;
11075bd8deadSopenharmony_ci        var argType = funcData.argTypes && funcData.argTypes[i];
11085bd8deadSopenharmony_ci        var arg;
11095bd8deadSopenharmony_ci        if (i < funcData.numOptionalArgs) {
11105bd8deadSopenharmony_ci            if (argType) {
11115bd8deadSopenharmony_ci                arg = this.parseGroupOfType(argType, true);
11125bd8deadSopenharmony_ci            } else {
11135bd8deadSopenharmony_ci                arg = this.parseGroup(true);
11145bd8deadSopenharmony_ci            }
11155bd8deadSopenharmony_ci            if (!arg) {
11165bd8deadSopenharmony_ci                args.push(null);
11175bd8deadSopenharmony_ci                positions.push(this.pos);
11185bd8deadSopenharmony_ci                continue;
11195bd8deadSopenharmony_ci            }
11205bd8deadSopenharmony_ci        } else {
11215bd8deadSopenharmony_ci            if (argType) {
11225bd8deadSopenharmony_ci                arg = this.parseGroupOfType(argType);
11235bd8deadSopenharmony_ci            } else {
11245bd8deadSopenharmony_ci                arg = this.parseGroup();
11255bd8deadSopenharmony_ci            }
11265bd8deadSopenharmony_ci            if (!arg) {
11275bd8deadSopenharmony_ci                if (!this.settings.throwOnError &&
11285bd8deadSopenharmony_ci                    this.nextToken.text[0] === "\\") {
11295bd8deadSopenharmony_ci                    arg = new ParseFuncOrArgument(
11305bd8deadSopenharmony_ci                        this.handleUnsupportedCmd(this.nextToken.text),
11315bd8deadSopenharmony_ci                        false);
11325bd8deadSopenharmony_ci                } else {
11335bd8deadSopenharmony_ci                    throw new ParseError(
11345bd8deadSopenharmony_ci                        "Expected group after '" + func + "'", nextToken);
11355bd8deadSopenharmony_ci                }
11365bd8deadSopenharmony_ci            }
11375bd8deadSopenharmony_ci        }
11385bd8deadSopenharmony_ci        var argNode;
11395bd8deadSopenharmony_ci        if (arg.isFunction) {
11405bd8deadSopenharmony_ci            var argGreediness =
11415bd8deadSopenharmony_ci                functions[arg.result].greediness;
11425bd8deadSopenharmony_ci            if (argGreediness > baseGreediness) {
11435bd8deadSopenharmony_ci                argNode = this.parseFunction(arg);
11445bd8deadSopenharmony_ci            } else {
11455bd8deadSopenharmony_ci                throw new ParseError(
11465bd8deadSopenharmony_ci                    "Got function '" + arg.result + "' as " +
11475bd8deadSopenharmony_ci                    "argument to '" + func + "'", nextToken);
11485bd8deadSopenharmony_ci            }
11495bd8deadSopenharmony_ci        } else {
11505bd8deadSopenharmony_ci            argNode = arg.result;
11515bd8deadSopenharmony_ci        }
11525bd8deadSopenharmony_ci        args.push(argNode);
11535bd8deadSopenharmony_ci        positions.push(this.pos);
11545bd8deadSopenharmony_ci    }
11555bd8deadSopenharmony_ci
11565bd8deadSopenharmony_ci    args.push(positions);
11575bd8deadSopenharmony_ci
11585bd8deadSopenharmony_ci    return args;
11595bd8deadSopenharmony_ci};
11605bd8deadSopenharmony_ci
11615bd8deadSopenharmony_ci
11625bd8deadSopenharmony_ci/**
11635bd8deadSopenharmony_ci * Parses a group when the mode is changing.
11645bd8deadSopenharmony_ci *
11655bd8deadSopenharmony_ci * @return {?ParseFuncOrArgument}
11665bd8deadSopenharmony_ci */
11675bd8deadSopenharmony_ciParser.prototype.parseGroupOfType = function(innerMode, optional) {
11685bd8deadSopenharmony_ci    var outerMode = this.mode;
11695bd8deadSopenharmony_ci    // Handle `original` argTypes
11705bd8deadSopenharmony_ci    if (innerMode === "original") {
11715bd8deadSopenharmony_ci        innerMode = outerMode;
11725bd8deadSopenharmony_ci    }
11735bd8deadSopenharmony_ci
11745bd8deadSopenharmony_ci    if (innerMode === "color") {
11755bd8deadSopenharmony_ci        return this.parseColorGroup(optional);
11765bd8deadSopenharmony_ci    }
11775bd8deadSopenharmony_ci    if (innerMode === "size") {
11785bd8deadSopenharmony_ci        return this.parseSizeGroup(optional);
11795bd8deadSopenharmony_ci    }
11805bd8deadSopenharmony_ci
11815bd8deadSopenharmony_ci    this.switchMode(innerMode);
11825bd8deadSopenharmony_ci    if (innerMode === "text") {
11835bd8deadSopenharmony_ci        // text mode is special because it should ignore the whitespace before
11845bd8deadSopenharmony_ci        // it
11855bd8deadSopenharmony_ci        while (this.nextToken.text === " ") {
11865bd8deadSopenharmony_ci            this.consume();
11875bd8deadSopenharmony_ci        }
11885bd8deadSopenharmony_ci    }
11895bd8deadSopenharmony_ci    // By the time we get here, innerMode is one of "text" or "math".
11905bd8deadSopenharmony_ci    // We switch the mode of the parser, recurse, then restore the old mode.
11915bd8deadSopenharmony_ci    var res = this.parseGroup(optional);
11925bd8deadSopenharmony_ci    this.switchMode(outerMode);
11935bd8deadSopenharmony_ci    return res;
11945bd8deadSopenharmony_ci};
11955bd8deadSopenharmony_ci
11965bd8deadSopenharmony_ci/**
11975bd8deadSopenharmony_ci * Parses a group, essentially returning the string formed by the
11985bd8deadSopenharmony_ci * brace-enclosed tokens plus some position information.
11995bd8deadSopenharmony_ci *
12005bd8deadSopenharmony_ci * @param {string} modeName  Used to describe the mode in error messages
12015bd8deadSopenharmony_ci * @param {boolean=} optional  Whether the group is optional or required
12025bd8deadSopenharmony_ci */
12035bd8deadSopenharmony_ciParser.prototype.parseStringGroup = function(modeName, optional) {
12045bd8deadSopenharmony_ci    if (optional && this.nextToken.text !== "[") {
12055bd8deadSopenharmony_ci        return null;
12065bd8deadSopenharmony_ci    }
12075bd8deadSopenharmony_ci    var outerMode = this.mode;
12085bd8deadSopenharmony_ci    this.mode = "text";
12095bd8deadSopenharmony_ci    this.expect(optional ? "[" : "{");
12105bd8deadSopenharmony_ci    var str = "";
12115bd8deadSopenharmony_ci    var firstToken = this.nextToken;
12125bd8deadSopenharmony_ci    var lastToken = firstToken;
12135bd8deadSopenharmony_ci    while (this.nextToken.text !== (optional ? "]" : "}")) {
12145bd8deadSopenharmony_ci        if (this.nextToken.text === "EOF") {
12155bd8deadSopenharmony_ci            throw new ParseError(
12165bd8deadSopenharmony_ci                "Unexpected end of input in " + modeName,
12175bd8deadSopenharmony_ci                firstToken.range(this.nextToken, str));
12185bd8deadSopenharmony_ci        }
12195bd8deadSopenharmony_ci        lastToken = this.nextToken;
12205bd8deadSopenharmony_ci        str += lastToken.text;
12215bd8deadSopenharmony_ci        this.consume();
12225bd8deadSopenharmony_ci    }
12235bd8deadSopenharmony_ci    this.mode = outerMode;
12245bd8deadSopenharmony_ci    this.expect(optional ? "]" : "}");
12255bd8deadSopenharmony_ci    return firstToken.range(lastToken, str);
12265bd8deadSopenharmony_ci};
12275bd8deadSopenharmony_ci
12285bd8deadSopenharmony_ci/**
12295bd8deadSopenharmony_ci * Parses a regex-delimited group: the largest sequence of tokens
12305bd8deadSopenharmony_ci * whose concatenated strings match `regex`. Returns the string
12315bd8deadSopenharmony_ci * formed by the tokens plus some position information.
12325bd8deadSopenharmony_ci *
12335bd8deadSopenharmony_ci * @param {RegExp} regex
12345bd8deadSopenharmony_ci * @param {string} modeName  Used to describe the mode in error messages
12355bd8deadSopenharmony_ci */
12365bd8deadSopenharmony_ciParser.prototype.parseRegexGroup = function(regex, modeName) {
12375bd8deadSopenharmony_ci    var outerMode = this.mode;
12385bd8deadSopenharmony_ci    this.mode = "text";
12395bd8deadSopenharmony_ci    var firstToken = this.nextToken;
12405bd8deadSopenharmony_ci    var lastToken = firstToken;
12415bd8deadSopenharmony_ci    var str = "";
12425bd8deadSopenharmony_ci    while (this.nextToken.text !== "EOF"
12435bd8deadSopenharmony_ci           && regex.test(str + this.nextToken.text)) {
12445bd8deadSopenharmony_ci        lastToken = this.nextToken;
12455bd8deadSopenharmony_ci        str += lastToken.text;
12465bd8deadSopenharmony_ci        this.consume();
12475bd8deadSopenharmony_ci    }
12485bd8deadSopenharmony_ci    if (str === "") {
12495bd8deadSopenharmony_ci        throw new ParseError(
12505bd8deadSopenharmony_ci            "Invalid " + modeName + ": '" + firstToken.text + "'",
12515bd8deadSopenharmony_ci            firstToken);
12525bd8deadSopenharmony_ci    }
12535bd8deadSopenharmony_ci    this.mode = outerMode;
12545bd8deadSopenharmony_ci    return firstToken.range(lastToken, str);
12555bd8deadSopenharmony_ci};
12565bd8deadSopenharmony_ci
12575bd8deadSopenharmony_ci/**
12585bd8deadSopenharmony_ci * Parses a color description.
12595bd8deadSopenharmony_ci */
12605bd8deadSopenharmony_ciParser.prototype.parseColorGroup = function(optional) {
12615bd8deadSopenharmony_ci    var res = this.parseStringGroup("color", optional);
12625bd8deadSopenharmony_ci    if (!res) {
12635bd8deadSopenharmony_ci        return null;
12645bd8deadSopenharmony_ci    }
12655bd8deadSopenharmony_ci    var match = (/^(#[a-z0-9]+|[a-z]+)$/i).exec(res.text);
12665bd8deadSopenharmony_ci    if (!match) {
12675bd8deadSopenharmony_ci        throw new ParseError("Invalid color: '" + res.text + "'", res);
12685bd8deadSopenharmony_ci    }
12695bd8deadSopenharmony_ci    return new ParseFuncOrArgument(
12705bd8deadSopenharmony_ci        new ParseNode("color", match[0], this.mode),
12715bd8deadSopenharmony_ci        false);
12725bd8deadSopenharmony_ci};
12735bd8deadSopenharmony_ci
12745bd8deadSopenharmony_ci/**
12755bd8deadSopenharmony_ci * Parses a size specification, consisting of magnitude and unit.
12765bd8deadSopenharmony_ci */
12775bd8deadSopenharmony_ciParser.prototype.parseSizeGroup = function(optional) {
12785bd8deadSopenharmony_ci    var res;
12795bd8deadSopenharmony_ci    if (!optional && this.nextToken.text !== "{") {
12805bd8deadSopenharmony_ci        res = this.parseRegexGroup(
12815bd8deadSopenharmony_ci            /^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2}$/, "size");
12825bd8deadSopenharmony_ci    } else {
12835bd8deadSopenharmony_ci        res = this.parseStringGroup("size", optional);
12845bd8deadSopenharmony_ci    }
12855bd8deadSopenharmony_ci    if (!res) {
12865bd8deadSopenharmony_ci        return null;
12875bd8deadSopenharmony_ci    }
12885bd8deadSopenharmony_ci    var match = (/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/).exec(res.text);
12895bd8deadSopenharmony_ci    if (!match) {
12905bd8deadSopenharmony_ci        throw new ParseError("Invalid size: '" + res.text + "'", res);
12915bd8deadSopenharmony_ci    }
12925bd8deadSopenharmony_ci    var data = {
12935bd8deadSopenharmony_ci        number: +(match[1] + match[2]), // sign + magnitude, cast to number
12945bd8deadSopenharmony_ci        unit: match[3]
12955bd8deadSopenharmony_ci    };
12965bd8deadSopenharmony_ci    if (data.unit !== "em" && data.unit !== "ex" && data.unit !== "mu") {
12975bd8deadSopenharmony_ci        throw new ParseError("Invalid unit: '" + data.unit + "'", res);
12985bd8deadSopenharmony_ci    }
12995bd8deadSopenharmony_ci    return new ParseFuncOrArgument(
13005bd8deadSopenharmony_ci        new ParseNode("color", data, this.mode),
13015bd8deadSopenharmony_ci        false);
13025bd8deadSopenharmony_ci};
13035bd8deadSopenharmony_ci
13045bd8deadSopenharmony_ci/**
13055bd8deadSopenharmony_ci * If the argument is false or absent, this parses an ordinary group,
13065bd8deadSopenharmony_ci * which is either a single nucleus (like "x") or an expression
13075bd8deadSopenharmony_ci * in braces (like "{x+y}").
13085bd8deadSopenharmony_ci * If the argument is true, it parses either a bracket-delimited expression
13095bd8deadSopenharmony_ci * (like "[x+y]") or returns null to indicate the absence of a
13105bd8deadSopenharmony_ci * bracket-enclosed group.
13115bd8deadSopenharmony_ci *
13125bd8deadSopenharmony_ci * @param {boolean=} optional  Whether the group is optional or required
13135bd8deadSopenharmony_ci * @return {?ParseFuncOrArgument}
13145bd8deadSopenharmony_ci */
13155bd8deadSopenharmony_ciParser.prototype.parseGroup = function(optional) {
13165bd8deadSopenharmony_ci    var firstToken = this.nextToken;
13175bd8deadSopenharmony_ci    // Try to parse an open brace
13185bd8deadSopenharmony_ci    if (this.nextToken.text === (optional ? "[" : "{")) {
13195bd8deadSopenharmony_ci        // If we get a brace, parse an expression
13205bd8deadSopenharmony_ci        this.consume();
13215bd8deadSopenharmony_ci        var expression = this.parseExpression(false, optional ? "]" : null);
13225bd8deadSopenharmony_ci        var lastToken = this.nextToken;
13235bd8deadSopenharmony_ci        // Make sure we get a close brace
13245bd8deadSopenharmony_ci        this.expect(optional ? "]" : "}");
13255bd8deadSopenharmony_ci        if (this.mode === "text") {
13265bd8deadSopenharmony_ci            this.formLigatures(expression);
13275bd8deadSopenharmony_ci        }
13285bd8deadSopenharmony_ci        return new ParseFuncOrArgument(
13295bd8deadSopenharmony_ci            new ParseNode("ordgroup", expression, this.mode,
13305bd8deadSopenharmony_ci                          firstToken, lastToken),
13315bd8deadSopenharmony_ci            false);
13325bd8deadSopenharmony_ci    } else {
13335bd8deadSopenharmony_ci        // Otherwise, just return a nucleus, or nothing for an optional group
13345bd8deadSopenharmony_ci        return optional ? null : this.parseSymbol();
13355bd8deadSopenharmony_ci    }
13365bd8deadSopenharmony_ci};
13375bd8deadSopenharmony_ci
13385bd8deadSopenharmony_ci/**
13395bd8deadSopenharmony_ci * Form ligature-like combinations of characters for text mode.
13405bd8deadSopenharmony_ci * This includes inputs like "--", "---", "``" and "''".
13415bd8deadSopenharmony_ci * The result will simply replace multiple textord nodes with a single
13425bd8deadSopenharmony_ci * character in each value by a single textord node having multiple
13435bd8deadSopenharmony_ci * characters in its value.  The representation is still ASCII source.
13445bd8deadSopenharmony_ci *
13455bd8deadSopenharmony_ci * @param {Array.<ParseNode>} group  the nodes of this group,
13465bd8deadSopenharmony_ci *                                   list will be moified in place
13475bd8deadSopenharmony_ci */
13485bd8deadSopenharmony_ciParser.prototype.formLigatures = function(group) {
13495bd8deadSopenharmony_ci    var i;
13505bd8deadSopenharmony_ci    var n = group.length - 1;
13515bd8deadSopenharmony_ci    for (i = 0; i < n; ++i) {
13525bd8deadSopenharmony_ci        var a = group[i];
13535bd8deadSopenharmony_ci        var v = a.value;
13545bd8deadSopenharmony_ci        if (v === "-" && group[i + 1].value === "-") {
13555bd8deadSopenharmony_ci            if (i + 1 < n && group[i + 2].value === "-") {
13565bd8deadSopenharmony_ci                group.splice(i, 3, new ParseNode(
13575bd8deadSopenharmony_ci                    "textord", "---", "text", a, group[i + 2]));
13585bd8deadSopenharmony_ci                n -= 2;
13595bd8deadSopenharmony_ci            } else {
13605bd8deadSopenharmony_ci                group.splice(i, 2, new ParseNode(
13615bd8deadSopenharmony_ci                    "textord", "--", "text", a, group[i + 1]));
13625bd8deadSopenharmony_ci                n -= 1;
13635bd8deadSopenharmony_ci            }
13645bd8deadSopenharmony_ci        }
13655bd8deadSopenharmony_ci        if ((v === "'" || v === "`") && group[i + 1].value === v) {
13665bd8deadSopenharmony_ci            group.splice(i, 2, new ParseNode(
13675bd8deadSopenharmony_ci                "textord", v + v, "text", a, group[i + 1]));
13685bd8deadSopenharmony_ci            n -= 1;
13695bd8deadSopenharmony_ci        }
13705bd8deadSopenharmony_ci    }
13715bd8deadSopenharmony_ci};
13725bd8deadSopenharmony_ci
13735bd8deadSopenharmony_ci/**
13745bd8deadSopenharmony_ci * Parse a single symbol out of the string. Here, we handle both the functions
13755bd8deadSopenharmony_ci * we have defined, as well as the single character symbols
13765bd8deadSopenharmony_ci *
13775bd8deadSopenharmony_ci * @return {?ParseFuncOrArgument}
13785bd8deadSopenharmony_ci */
13795bd8deadSopenharmony_ciParser.prototype.parseSymbol = function() {
13805bd8deadSopenharmony_ci    var nucleus = this.nextToken;
13815bd8deadSopenharmony_ci
13825bd8deadSopenharmony_ci    if (functions[nucleus.text]) {
13835bd8deadSopenharmony_ci        this.consume();
13845bd8deadSopenharmony_ci        // If there exists a function with this name, we return the function and
13855bd8deadSopenharmony_ci        // say that it is a function.
13865bd8deadSopenharmony_ci        return new ParseFuncOrArgument(
13875bd8deadSopenharmony_ci            nucleus.text,
13885bd8deadSopenharmony_ci            true, nucleus);
13895bd8deadSopenharmony_ci    } else if (symbols[this.mode][nucleus.text]) {
13905bd8deadSopenharmony_ci        this.consume();
13915bd8deadSopenharmony_ci        // Otherwise if this is a no-argument function, find the type it
13925bd8deadSopenharmony_ci        // corresponds to in the symbols map
13935bd8deadSopenharmony_ci        return new ParseFuncOrArgument(
13945bd8deadSopenharmony_ci            new ParseNode(symbols[this.mode][nucleus.text].group,
13955bd8deadSopenharmony_ci                          nucleus.text, this.mode, nucleus),
13965bd8deadSopenharmony_ci            false, nucleus);
13975bd8deadSopenharmony_ci    } else if (this.mode === "text" && cjkRegex.test(nucleus.text)) {
13985bd8deadSopenharmony_ci        this.consume();
13995bd8deadSopenharmony_ci        return new ParseFuncOrArgument(
14005bd8deadSopenharmony_ci            new ParseNode("textord", nucleus.text, this.mode, nucleus),
14015bd8deadSopenharmony_ci            false, nucleus);
14025bd8deadSopenharmony_ci    } else {
14035bd8deadSopenharmony_ci        return null;
14045bd8deadSopenharmony_ci    }
14055bd8deadSopenharmony_ci};
14065bd8deadSopenharmony_ci
14075bd8deadSopenharmony_ciParser.prototype.ParseNode = ParseNode;
14085bd8deadSopenharmony_ci
14095bd8deadSopenharmony_cimodule.exports = Parser;
14105bd8deadSopenharmony_ci
14115bd8deadSopenharmony_ci},{"./MacroExpander":4,"./ParseError":6,"./environments":16,"./functions":19,"./parseData":21,"./symbols":23,"./unicodeRegexes":24,"./utils":25}],8:[function(require,module,exports){
14125bd8deadSopenharmony_ci/**
14135bd8deadSopenharmony_ci * This is a module for storing settings passed into KaTeX. It correctly handles
14145bd8deadSopenharmony_ci * default settings.
14155bd8deadSopenharmony_ci */
14165bd8deadSopenharmony_ci
14175bd8deadSopenharmony_ci/**
14185bd8deadSopenharmony_ci * Helper function for getting a default value if the value is undefined
14195bd8deadSopenharmony_ci */
14205bd8deadSopenharmony_cifunction get(option, defaultValue) {
14215bd8deadSopenharmony_ci    return option === undefined ? defaultValue : option;
14225bd8deadSopenharmony_ci}
14235bd8deadSopenharmony_ci
14245bd8deadSopenharmony_ci/**
14255bd8deadSopenharmony_ci * The main Settings object
14265bd8deadSopenharmony_ci *
14275bd8deadSopenharmony_ci * The current options stored are:
14285bd8deadSopenharmony_ci *  - displayMode: Whether the expression should be typeset by default in
14295bd8deadSopenharmony_ci *                 textstyle or displaystyle (default false)
14305bd8deadSopenharmony_ci */
14315bd8deadSopenharmony_cifunction Settings(options) {
14325bd8deadSopenharmony_ci    // allow null options
14335bd8deadSopenharmony_ci    options = options || {};
14345bd8deadSopenharmony_ci    this.displayMode = get(options.displayMode, false);
14355bd8deadSopenharmony_ci    this.throwOnError = get(options.throwOnError, true);
14365bd8deadSopenharmony_ci    this.errorColor = get(options.errorColor, "#cc0000");
14375bd8deadSopenharmony_ci    this.macros = options.macros || {};
14385bd8deadSopenharmony_ci}
14395bd8deadSopenharmony_ci
14405bd8deadSopenharmony_cimodule.exports = Settings;
14415bd8deadSopenharmony_ci
14425bd8deadSopenharmony_ci},{}],9:[function(require,module,exports){
14435bd8deadSopenharmony_ci/**
14445bd8deadSopenharmony_ci * This file contains information and classes for the various kinds of styles
14455bd8deadSopenharmony_ci * used in TeX. It provides a generic `Style` class, which holds information
14465bd8deadSopenharmony_ci * about a specific style. It then provides instances of all the different kinds
14475bd8deadSopenharmony_ci * of styles possible, and provides functions to move between them and get
14485bd8deadSopenharmony_ci * information about them.
14495bd8deadSopenharmony_ci */
14505bd8deadSopenharmony_ci
14515bd8deadSopenharmony_civar sigmas = require("./fontMetrics.js").sigmas;
14525bd8deadSopenharmony_ci
14535bd8deadSopenharmony_civar metrics = [{}, {}, {}];
14545bd8deadSopenharmony_civar i;
14555bd8deadSopenharmony_cifor (var key in sigmas) {
14565bd8deadSopenharmony_ci    if (sigmas.hasOwnProperty(key)) {
14575bd8deadSopenharmony_ci        for (i = 0; i < 3; i++) {
14585bd8deadSopenharmony_ci            metrics[i][key] = sigmas[key][i];
14595bd8deadSopenharmony_ci        }
14605bd8deadSopenharmony_ci    }
14615bd8deadSopenharmony_ci}
14625bd8deadSopenharmony_cifor (i = 0; i < 3; i++) {
14635bd8deadSopenharmony_ci    metrics[i].emPerEx = sigmas.xHeight[i] / sigmas.quad[i];
14645bd8deadSopenharmony_ci}
14655bd8deadSopenharmony_ci
14665bd8deadSopenharmony_ci/**
14675bd8deadSopenharmony_ci * The main style class. Contains a unique id for the style, a size (which is
14685bd8deadSopenharmony_ci * the same for cramped and uncramped version of a style), a cramped flag, and a
14695bd8deadSopenharmony_ci * size multiplier, which gives the size difference between a style and
14705bd8deadSopenharmony_ci * textstyle.
14715bd8deadSopenharmony_ci */
14725bd8deadSopenharmony_cifunction Style(id, size, multiplier, cramped) {
14735bd8deadSopenharmony_ci    this.id = id;
14745bd8deadSopenharmony_ci    this.size = size;
14755bd8deadSopenharmony_ci    this.cramped = cramped;
14765bd8deadSopenharmony_ci    this.sizeMultiplier = multiplier;
14775bd8deadSopenharmony_ci    this.metrics = metrics[size > 0 ? size - 1 : 0];
14785bd8deadSopenharmony_ci}
14795bd8deadSopenharmony_ci
14805bd8deadSopenharmony_ci/**
14815bd8deadSopenharmony_ci * Get the style of a superscript given a base in the current style.
14825bd8deadSopenharmony_ci */
14835bd8deadSopenharmony_ciStyle.prototype.sup = function() {
14845bd8deadSopenharmony_ci    return styles[sup[this.id]];
14855bd8deadSopenharmony_ci};
14865bd8deadSopenharmony_ci
14875bd8deadSopenharmony_ci/**
14885bd8deadSopenharmony_ci * Get the style of a subscript given a base in the current style.
14895bd8deadSopenharmony_ci */
14905bd8deadSopenharmony_ciStyle.prototype.sub = function() {
14915bd8deadSopenharmony_ci    return styles[sub[this.id]];
14925bd8deadSopenharmony_ci};
14935bd8deadSopenharmony_ci
14945bd8deadSopenharmony_ci/**
14955bd8deadSopenharmony_ci * Get the style of a fraction numerator given the fraction in the current
14965bd8deadSopenharmony_ci * style.
14975bd8deadSopenharmony_ci */
14985bd8deadSopenharmony_ciStyle.prototype.fracNum = function() {
14995bd8deadSopenharmony_ci    return styles[fracNum[this.id]];
15005bd8deadSopenharmony_ci};
15015bd8deadSopenharmony_ci
15025bd8deadSopenharmony_ci/**
15035bd8deadSopenharmony_ci * Get the style of a fraction denominator given the fraction in the current
15045bd8deadSopenharmony_ci * style.
15055bd8deadSopenharmony_ci */
15065bd8deadSopenharmony_ciStyle.prototype.fracDen = function() {
15075bd8deadSopenharmony_ci    return styles[fracDen[this.id]];
15085bd8deadSopenharmony_ci};
15095bd8deadSopenharmony_ci
15105bd8deadSopenharmony_ci/**
15115bd8deadSopenharmony_ci * Get the cramped version of a style (in particular, cramping a cramped style
15125bd8deadSopenharmony_ci * doesn't change the style).
15135bd8deadSopenharmony_ci */
15145bd8deadSopenharmony_ciStyle.prototype.cramp = function() {
15155bd8deadSopenharmony_ci    return styles[cramp[this.id]];
15165bd8deadSopenharmony_ci};
15175bd8deadSopenharmony_ci
15185bd8deadSopenharmony_ci/**
15195bd8deadSopenharmony_ci * HTML class name, like "displaystyle cramped"
15205bd8deadSopenharmony_ci */
15215bd8deadSopenharmony_ciStyle.prototype.cls = function() {
15225bd8deadSopenharmony_ci    return sizeNames[this.size] + (this.cramped ? " cramped" : " uncramped");
15235bd8deadSopenharmony_ci};
15245bd8deadSopenharmony_ci
15255bd8deadSopenharmony_ci/**
15265bd8deadSopenharmony_ci * HTML Reset class name, like "reset-textstyle"
15275bd8deadSopenharmony_ci */
15285bd8deadSopenharmony_ciStyle.prototype.reset = function() {
15295bd8deadSopenharmony_ci    return resetNames[this.size];
15305bd8deadSopenharmony_ci};
15315bd8deadSopenharmony_ci
15325bd8deadSopenharmony_ci/**
15335bd8deadSopenharmony_ci * Return if this style is tightly spaced (scriptstyle/scriptscriptstyle)
15345bd8deadSopenharmony_ci */
15355bd8deadSopenharmony_ciStyle.prototype.isTight = function() {
15365bd8deadSopenharmony_ci    return this.size >= 2;
15375bd8deadSopenharmony_ci};
15385bd8deadSopenharmony_ci
15395bd8deadSopenharmony_ci// IDs of the different styles
15405bd8deadSopenharmony_civar D = 0;
15415bd8deadSopenharmony_civar Dc = 1;
15425bd8deadSopenharmony_civar T = 2;
15435bd8deadSopenharmony_civar Tc = 3;
15445bd8deadSopenharmony_civar S = 4;
15455bd8deadSopenharmony_civar Sc = 5;
15465bd8deadSopenharmony_civar SS = 6;
15475bd8deadSopenharmony_civar SSc = 7;
15485bd8deadSopenharmony_ci
15495bd8deadSopenharmony_ci// String names for the different sizes
15505bd8deadSopenharmony_civar sizeNames = [
15515bd8deadSopenharmony_ci    "displaystyle textstyle",
15525bd8deadSopenharmony_ci    "textstyle",
15535bd8deadSopenharmony_ci    "scriptstyle",
15545bd8deadSopenharmony_ci    "scriptscriptstyle"
15555bd8deadSopenharmony_ci];
15565bd8deadSopenharmony_ci
15575bd8deadSopenharmony_ci// Reset names for the different sizes
15585bd8deadSopenharmony_civar resetNames = [
15595bd8deadSopenharmony_ci    "reset-textstyle",
15605bd8deadSopenharmony_ci    "reset-textstyle",
15615bd8deadSopenharmony_ci    "reset-scriptstyle",
15625bd8deadSopenharmony_ci    "reset-scriptscriptstyle"
15635bd8deadSopenharmony_ci];
15645bd8deadSopenharmony_ci
15655bd8deadSopenharmony_ci// Instances of the different styles
15665bd8deadSopenharmony_civar styles = [
15675bd8deadSopenharmony_ci    new Style(D, 0, 1.0, false),
15685bd8deadSopenharmony_ci    new Style(Dc, 0, 1.0, true),
15695bd8deadSopenharmony_ci    new Style(T, 1, 1.0, false),
15705bd8deadSopenharmony_ci    new Style(Tc, 1, 1.0, true),
15715bd8deadSopenharmony_ci    new Style(S, 2, 0.7, false),
15725bd8deadSopenharmony_ci    new Style(Sc, 2, 0.7, true),
15735bd8deadSopenharmony_ci    new Style(SS, 3, 0.5, false),
15745bd8deadSopenharmony_ci    new Style(SSc, 3, 0.5, true)
15755bd8deadSopenharmony_ci];
15765bd8deadSopenharmony_ci
15775bd8deadSopenharmony_ci// Lookup tables for switching from one style to another
15785bd8deadSopenharmony_civar sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];
15795bd8deadSopenharmony_civar sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];
15805bd8deadSopenharmony_civar fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];
15815bd8deadSopenharmony_civar fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
15825bd8deadSopenharmony_civar cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];
15835bd8deadSopenharmony_ci
15845bd8deadSopenharmony_ci// We only export some of the styles. Also, we don't export the `Style` class so
15855bd8deadSopenharmony_ci// no more styles can be generated.
15865bd8deadSopenharmony_cimodule.exports = {
15875bd8deadSopenharmony_ci    DISPLAY: styles[D],
15885bd8deadSopenharmony_ci    TEXT: styles[T],
15895bd8deadSopenharmony_ci    SCRIPT: styles[S],
15905bd8deadSopenharmony_ci    SCRIPTSCRIPT: styles[SS]
15915bd8deadSopenharmony_ci};
15925bd8deadSopenharmony_ci
15935bd8deadSopenharmony_ci},{"./fontMetrics.js":17}],10:[function(require,module,exports){
15945bd8deadSopenharmony_ci/* eslint no-console:0 */
15955bd8deadSopenharmony_ci/**
15965bd8deadSopenharmony_ci * This module contains general functions that can be used for building
15975bd8deadSopenharmony_ci * different kinds of domTree nodes in a consistent manner.
15985bd8deadSopenharmony_ci */
15995bd8deadSopenharmony_ci
16005bd8deadSopenharmony_civar domTree = require("./domTree");
16015bd8deadSopenharmony_civar fontMetrics = require("./fontMetrics");
16025bd8deadSopenharmony_civar symbols = require("./symbols");
16035bd8deadSopenharmony_civar utils = require("./utils");
16045bd8deadSopenharmony_ci
16055bd8deadSopenharmony_civar greekCapitals = [
16065bd8deadSopenharmony_ci    "\\Gamma",
16075bd8deadSopenharmony_ci    "\\Delta",
16085bd8deadSopenharmony_ci    "\\Theta",
16095bd8deadSopenharmony_ci    "\\Lambda",
16105bd8deadSopenharmony_ci    "\\Xi",
16115bd8deadSopenharmony_ci    "\\Pi",
16125bd8deadSopenharmony_ci    "\\Sigma",
16135bd8deadSopenharmony_ci    "\\Upsilon",
16145bd8deadSopenharmony_ci    "\\Phi",
16155bd8deadSopenharmony_ci    "\\Psi",
16165bd8deadSopenharmony_ci    "\\Omega"
16175bd8deadSopenharmony_ci];
16185bd8deadSopenharmony_ci
16195bd8deadSopenharmony_ci// The following have to be loaded from Main-Italic font, using class mainit
16205bd8deadSopenharmony_civar mainitLetters = [
16215bd8deadSopenharmony_ci    "\u0131",   // dotless i, \imath
16225bd8deadSopenharmony_ci    "\u0237",   // dotless j, \jmath
16235bd8deadSopenharmony_ci    "\u00a3"   // \pounds
16245bd8deadSopenharmony_ci];
16255bd8deadSopenharmony_ci
16265bd8deadSopenharmony_ci/**
16275bd8deadSopenharmony_ci * Makes a symbolNode after translation via the list of symbols in symbols.js.
16285bd8deadSopenharmony_ci * Correctly pulls out metrics for the character, and optionally takes a list of
16295bd8deadSopenharmony_ci * classes to be attached to the node.
16305bd8deadSopenharmony_ci *
16315bd8deadSopenharmony_ci * TODO: make argument order closer to makeSpan
16325bd8deadSopenharmony_ci * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
16335bd8deadSopenharmony_ci * should if present come first in `classes`.
16345bd8deadSopenharmony_ci */
16355bd8deadSopenharmony_civar makeSymbol = function(value, fontFamily, mode, options, classes) {
16365bd8deadSopenharmony_ci    // Replace the value with its replaced value from symbol.js
16375bd8deadSopenharmony_ci    if (symbols[mode][value] && symbols[mode][value].replace) {
16385bd8deadSopenharmony_ci        value = symbols[mode][value].replace;
16395bd8deadSopenharmony_ci    }
16405bd8deadSopenharmony_ci
16415bd8deadSopenharmony_ci    var metrics = fontMetrics.getCharacterMetrics(value, fontFamily);
16425bd8deadSopenharmony_ci
16435bd8deadSopenharmony_ci    var symbolNode;
16445bd8deadSopenharmony_ci    if (metrics) {
16455bd8deadSopenharmony_ci        var italic = metrics.italic;
16465bd8deadSopenharmony_ci        if (mode === "text") {
16475bd8deadSopenharmony_ci            italic = 0;
16485bd8deadSopenharmony_ci        }
16495bd8deadSopenharmony_ci        symbolNode = new domTree.symbolNode(
16505bd8deadSopenharmony_ci            value, metrics.height, metrics.depth, italic, metrics.skew,
16515bd8deadSopenharmony_ci            classes);
16525bd8deadSopenharmony_ci    } else {
16535bd8deadSopenharmony_ci        // TODO(emily): Figure out a good way to only print this in development
16545bd8deadSopenharmony_ci        typeof console !== "undefined" && console.warn(
16555bd8deadSopenharmony_ci            "No character metrics for '" + value + "' in style '" +
16565bd8deadSopenharmony_ci                fontFamily + "'");
16575bd8deadSopenharmony_ci        symbolNode = new domTree.symbolNode(value, 0, 0, 0, 0, classes);
16585bd8deadSopenharmony_ci    }
16595bd8deadSopenharmony_ci
16605bd8deadSopenharmony_ci    if (options) {
16615bd8deadSopenharmony_ci        if (options.style.isTight()) {
16625bd8deadSopenharmony_ci            symbolNode.classes.push("mtight");
16635bd8deadSopenharmony_ci        }
16645bd8deadSopenharmony_ci        if (options.getColor()) {
16655bd8deadSopenharmony_ci            symbolNode.style.color = options.getColor();
16665bd8deadSopenharmony_ci        }
16675bd8deadSopenharmony_ci    }
16685bd8deadSopenharmony_ci
16695bd8deadSopenharmony_ci    return symbolNode;
16705bd8deadSopenharmony_ci};
16715bd8deadSopenharmony_ci
16725bd8deadSopenharmony_ci/**
16735bd8deadSopenharmony_ci * Makes a symbol in Main-Regular or AMS-Regular.
16745bd8deadSopenharmony_ci * Used for rel, bin, open, close, inner, and punct.
16755bd8deadSopenharmony_ci */
16765bd8deadSopenharmony_civar mathsym = function(value, mode, options, classes) {
16775bd8deadSopenharmony_ci    // Decide what font to render the symbol in by its entry in the symbols
16785bd8deadSopenharmony_ci    // table.
16795bd8deadSopenharmony_ci    // Have a special case for when the value = \ because the \ is used as a
16805bd8deadSopenharmony_ci    // textord in unsupported command errors but cannot be parsed as a regular
16815bd8deadSopenharmony_ci    // text ordinal and is therefore not present as a symbol in the symbols
16825bd8deadSopenharmony_ci    // table for text
16835bd8deadSopenharmony_ci    if (value === "\\" || symbols[mode][value].font === "main") {
16845bd8deadSopenharmony_ci        return makeSymbol(value, "Main-Regular", mode, options, classes);
16855bd8deadSopenharmony_ci    } else {
16865bd8deadSopenharmony_ci        return makeSymbol(
16875bd8deadSopenharmony_ci            value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
16885bd8deadSopenharmony_ci    }
16895bd8deadSopenharmony_ci};
16905bd8deadSopenharmony_ci
16915bd8deadSopenharmony_ci/**
16925bd8deadSopenharmony_ci * Makes a symbol in the default font for mathords and textords.
16935bd8deadSopenharmony_ci */
16945bd8deadSopenharmony_civar mathDefault = function(value, mode, options, classes, type) {
16955bd8deadSopenharmony_ci    if (type === "mathord") {
16965bd8deadSopenharmony_ci        return mathit(value, mode, options, classes);
16975bd8deadSopenharmony_ci    } else if (type === "textord") {
16985bd8deadSopenharmony_ci        return makeSymbol(
16995bd8deadSopenharmony_ci            value, "Main-Regular", mode, options, classes.concat(["mathrm"]));
17005bd8deadSopenharmony_ci    } else {
17015bd8deadSopenharmony_ci        throw new Error("unexpected type: " + type + " in mathDefault");
17025bd8deadSopenharmony_ci    }
17035bd8deadSopenharmony_ci};
17045bd8deadSopenharmony_ci
17055bd8deadSopenharmony_ci/**
17065bd8deadSopenharmony_ci * Makes a symbol in the italic math font.
17075bd8deadSopenharmony_ci */
17085bd8deadSopenharmony_civar mathit = function(value, mode, options, classes) {
17095bd8deadSopenharmony_ci    if (/[0-9]/.test(value.charAt(0)) ||
17105bd8deadSopenharmony_ci            // glyphs for \imath and \jmath do not exist in Math-Italic so we
17115bd8deadSopenharmony_ci            // need to use Main-Italic instead
17125bd8deadSopenharmony_ci            utils.contains(mainitLetters, value) ||
17135bd8deadSopenharmony_ci            utils.contains(greekCapitals, value)) {
17145bd8deadSopenharmony_ci        return makeSymbol(
17155bd8deadSopenharmony_ci            value, "Main-Italic", mode, options, classes.concat(["mainit"]));
17165bd8deadSopenharmony_ci    } else {
17175bd8deadSopenharmony_ci        return makeSymbol(
17185bd8deadSopenharmony_ci            value, "Math-Italic", mode, options, classes.concat(["mathit"]));
17195bd8deadSopenharmony_ci    }
17205bd8deadSopenharmony_ci};
17215bd8deadSopenharmony_ci
17225bd8deadSopenharmony_ci/**
17235bd8deadSopenharmony_ci * Makes either a mathord or textord in the correct font and color.
17245bd8deadSopenharmony_ci */
17255bd8deadSopenharmony_civar makeOrd = function(group, options, type) {
17265bd8deadSopenharmony_ci    var mode = group.mode;
17275bd8deadSopenharmony_ci    var value = group.value;
17285bd8deadSopenharmony_ci    if (symbols[mode][value] && symbols[mode][value].replace) {
17295bd8deadSopenharmony_ci        value = symbols[mode][value].replace;
17305bd8deadSopenharmony_ci    }
17315bd8deadSopenharmony_ci
17325bd8deadSopenharmony_ci    var classes = ["mord"];
17335bd8deadSopenharmony_ci
17345bd8deadSopenharmony_ci    var font = options.font;
17355bd8deadSopenharmony_ci    if (font) {
17365bd8deadSopenharmony_ci        if (font === "mathit" || utils.contains(mainitLetters, value)) {
17375bd8deadSopenharmony_ci            return mathit(value, mode, options, classes);
17385bd8deadSopenharmony_ci        } else {
17395bd8deadSopenharmony_ci            var fontName = fontMap[font].fontName;
17405bd8deadSopenharmony_ci            if (fontMetrics.getCharacterMetrics(value, fontName)) {
17415bd8deadSopenharmony_ci                return makeSymbol(
17425bd8deadSopenharmony_ci                    value, fontName, mode, options, classes.concat([font]));
17435bd8deadSopenharmony_ci            } else {
17445bd8deadSopenharmony_ci                return mathDefault(value, mode, options, classes, type);
17455bd8deadSopenharmony_ci            }
17465bd8deadSopenharmony_ci        }
17475bd8deadSopenharmony_ci    } else {
17485bd8deadSopenharmony_ci        return mathDefault(value, mode, options, classes, type);
17495bd8deadSopenharmony_ci    }
17505bd8deadSopenharmony_ci};
17515bd8deadSopenharmony_ci
17525bd8deadSopenharmony_ci/**
17535bd8deadSopenharmony_ci * Calculate the height, depth, and maxFontSize of an element based on its
17545bd8deadSopenharmony_ci * children.
17555bd8deadSopenharmony_ci */
17565bd8deadSopenharmony_civar sizeElementFromChildren = function(elem) {
17575bd8deadSopenharmony_ci    var height = 0;
17585bd8deadSopenharmony_ci    var depth = 0;
17595bd8deadSopenharmony_ci    var maxFontSize = 0;
17605bd8deadSopenharmony_ci
17615bd8deadSopenharmony_ci    if (elem.children) {
17625bd8deadSopenharmony_ci        for (var i = 0; i < elem.children.length; i++) {
17635bd8deadSopenharmony_ci            if (elem.children[i].height > height) {
17645bd8deadSopenharmony_ci                height = elem.children[i].height;
17655bd8deadSopenharmony_ci            }
17665bd8deadSopenharmony_ci            if (elem.children[i].depth > depth) {
17675bd8deadSopenharmony_ci                depth = elem.children[i].depth;
17685bd8deadSopenharmony_ci            }
17695bd8deadSopenharmony_ci            if (elem.children[i].maxFontSize > maxFontSize) {
17705bd8deadSopenharmony_ci                maxFontSize = elem.children[i].maxFontSize;
17715bd8deadSopenharmony_ci            }
17725bd8deadSopenharmony_ci        }
17735bd8deadSopenharmony_ci    }
17745bd8deadSopenharmony_ci
17755bd8deadSopenharmony_ci    elem.height = height;
17765bd8deadSopenharmony_ci    elem.depth = depth;
17775bd8deadSopenharmony_ci    elem.maxFontSize = maxFontSize;
17785bd8deadSopenharmony_ci};
17795bd8deadSopenharmony_ci
17805bd8deadSopenharmony_ci/**
17815bd8deadSopenharmony_ci * Makes a span with the given list of classes, list of children, and options.
17825bd8deadSopenharmony_ci *
17835bd8deadSopenharmony_ci * TODO: Ensure that `options` is always provided (currently some call sites
17845bd8deadSopenharmony_ci * don't pass it).
17855bd8deadSopenharmony_ci * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
17865bd8deadSopenharmony_ci * should if present come first in `classes`.
17875bd8deadSopenharmony_ci */
17885bd8deadSopenharmony_civar makeSpan = function(classes, children, options) {
17895bd8deadSopenharmony_ci    var span = new domTree.span(classes, children, options);
17905bd8deadSopenharmony_ci
17915bd8deadSopenharmony_ci    sizeElementFromChildren(span);
17925bd8deadSopenharmony_ci
17935bd8deadSopenharmony_ci    return span;
17945bd8deadSopenharmony_ci};
17955bd8deadSopenharmony_ci
17965bd8deadSopenharmony_ci/**
17975bd8deadSopenharmony_ci * Prepends the given children to the given span, updating height, depth, and
17985bd8deadSopenharmony_ci * maxFontSize.
17995bd8deadSopenharmony_ci */
18005bd8deadSopenharmony_civar prependChildren = function(span, children) {
18015bd8deadSopenharmony_ci    span.children = children.concat(span.children);
18025bd8deadSopenharmony_ci
18035bd8deadSopenharmony_ci    sizeElementFromChildren(span);
18045bd8deadSopenharmony_ci};
18055bd8deadSopenharmony_ci
18065bd8deadSopenharmony_ci/**
18075bd8deadSopenharmony_ci * Makes a document fragment with the given list of children.
18085bd8deadSopenharmony_ci */
18095bd8deadSopenharmony_civar makeFragment = function(children) {
18105bd8deadSopenharmony_ci    var fragment = new domTree.documentFragment(children);
18115bd8deadSopenharmony_ci
18125bd8deadSopenharmony_ci    sizeElementFromChildren(fragment);
18135bd8deadSopenharmony_ci
18145bd8deadSopenharmony_ci    return fragment;
18155bd8deadSopenharmony_ci};
18165bd8deadSopenharmony_ci
18175bd8deadSopenharmony_ci/**
18185bd8deadSopenharmony_ci * Makes an element placed in each of the vlist elements to ensure that each
18195bd8deadSopenharmony_ci * element has the same max font size. To do this, we create a zero-width space
18205bd8deadSopenharmony_ci * with the correct font size.
18215bd8deadSopenharmony_ci */
18225bd8deadSopenharmony_civar makeFontSizer = function(options, fontSize) {
18235bd8deadSopenharmony_ci    var fontSizeInner = makeSpan([], [new domTree.symbolNode("\u200b")]);
18245bd8deadSopenharmony_ci    fontSizeInner.style.fontSize =
18255bd8deadSopenharmony_ci        (fontSize / options.style.sizeMultiplier) + "em";
18265bd8deadSopenharmony_ci
18275bd8deadSopenharmony_ci    var fontSizer = makeSpan(
18285bd8deadSopenharmony_ci        ["fontsize-ensurer", "reset-" + options.size, "size5"],
18295bd8deadSopenharmony_ci        [fontSizeInner]);
18305bd8deadSopenharmony_ci
18315bd8deadSopenharmony_ci    return fontSizer;
18325bd8deadSopenharmony_ci};
18335bd8deadSopenharmony_ci
18345bd8deadSopenharmony_ci/**
18355bd8deadSopenharmony_ci * Makes a vertical list by stacking elements and kerns on top of each other.
18365bd8deadSopenharmony_ci * Allows for many different ways of specifying the positioning method.
18375bd8deadSopenharmony_ci *
18385bd8deadSopenharmony_ci * Arguments:
18395bd8deadSopenharmony_ci *  - children: A list of child or kern nodes to be stacked on top of each other
18405bd8deadSopenharmony_ci *              (i.e. the first element will be at the bottom, and the last at
18415bd8deadSopenharmony_ci *              the top). Element nodes are specified as
18425bd8deadSopenharmony_ci *                {type: "elem", elem: node}
18435bd8deadSopenharmony_ci *              while kern nodes are specified as
18445bd8deadSopenharmony_ci *                {type: "kern", size: size}
18455bd8deadSopenharmony_ci *  - positionType: The method by which the vlist should be positioned. Valid
18465bd8deadSopenharmony_ci *                  values are:
18475bd8deadSopenharmony_ci *                   - "individualShift": The children list only contains elem
18485bd8deadSopenharmony_ci *                                        nodes, and each node contains an extra
18495bd8deadSopenharmony_ci *                                        "shift" value of how much it should be
18505bd8deadSopenharmony_ci *                                        shifted (note that shifting is always
18515bd8deadSopenharmony_ci *                                        moving downwards). positionData is
18525bd8deadSopenharmony_ci *                                        ignored.
18535bd8deadSopenharmony_ci *                   - "top": The positionData specifies the topmost point of
18545bd8deadSopenharmony_ci *                            the vlist (note this is expected to be a height,
18555bd8deadSopenharmony_ci *                            so positive values move up)
18565bd8deadSopenharmony_ci *                   - "bottom": The positionData specifies the bottommost point
18575bd8deadSopenharmony_ci *                               of the vlist (note this is expected to be a
18585bd8deadSopenharmony_ci *                               depth, so positive values move down
18595bd8deadSopenharmony_ci *                   - "shift": The vlist will be positioned such that its
18605bd8deadSopenharmony_ci *                              baseline is positionData away from the baseline
18615bd8deadSopenharmony_ci *                              of the first child. Positive values move
18625bd8deadSopenharmony_ci *                              downwards.
18635bd8deadSopenharmony_ci *                   - "firstBaseline": The vlist will be positioned such that
18645bd8deadSopenharmony_ci *                                      its baseline is aligned with the
18655bd8deadSopenharmony_ci *                                      baseline of the first child.
18665bd8deadSopenharmony_ci *                                      positionData is ignored. (this is
18675bd8deadSopenharmony_ci *                                      equivalent to "shift" with
18685bd8deadSopenharmony_ci *                                      positionData=0)
18695bd8deadSopenharmony_ci *  - positionData: Data used in different ways depending on positionType
18705bd8deadSopenharmony_ci *  - options: An Options object
18715bd8deadSopenharmony_ci *
18725bd8deadSopenharmony_ci */
18735bd8deadSopenharmony_civar makeVList = function(children, positionType, positionData, options) {
18745bd8deadSopenharmony_ci    var depth;
18755bd8deadSopenharmony_ci    var currPos;
18765bd8deadSopenharmony_ci    var i;
18775bd8deadSopenharmony_ci    if (positionType === "individualShift") {
18785bd8deadSopenharmony_ci        var oldChildren = children;
18795bd8deadSopenharmony_ci        children = [oldChildren[0]];
18805bd8deadSopenharmony_ci
18815bd8deadSopenharmony_ci        // Add in kerns to the list of children to get each element to be
18825bd8deadSopenharmony_ci        // shifted to the correct specified shift
18835bd8deadSopenharmony_ci        depth = -oldChildren[0].shift - oldChildren[0].elem.depth;
18845bd8deadSopenharmony_ci        currPos = depth;
18855bd8deadSopenharmony_ci        for (i = 1; i < oldChildren.length; i++) {
18865bd8deadSopenharmony_ci            var diff = -oldChildren[i].shift - currPos -
18875bd8deadSopenharmony_ci                oldChildren[i].elem.depth;
18885bd8deadSopenharmony_ci            var size = diff -
18895bd8deadSopenharmony_ci                (oldChildren[i - 1].elem.height +
18905bd8deadSopenharmony_ci                 oldChildren[i - 1].elem.depth);
18915bd8deadSopenharmony_ci
18925bd8deadSopenharmony_ci            currPos = currPos + diff;
18935bd8deadSopenharmony_ci
18945bd8deadSopenharmony_ci            children.push({type: "kern", size: size});
18955bd8deadSopenharmony_ci            children.push(oldChildren[i]);
18965bd8deadSopenharmony_ci        }
18975bd8deadSopenharmony_ci    } else if (positionType === "top") {
18985bd8deadSopenharmony_ci        // We always start at the bottom, so calculate the bottom by adding up
18995bd8deadSopenharmony_ci        // all the sizes
19005bd8deadSopenharmony_ci        var bottom = positionData;
19015bd8deadSopenharmony_ci        for (i = 0; i < children.length; i++) {
19025bd8deadSopenharmony_ci            if (children[i].type === "kern") {
19035bd8deadSopenharmony_ci                bottom -= children[i].size;
19045bd8deadSopenharmony_ci            } else {
19055bd8deadSopenharmony_ci                bottom -= children[i].elem.height + children[i].elem.depth;
19065bd8deadSopenharmony_ci            }
19075bd8deadSopenharmony_ci        }
19085bd8deadSopenharmony_ci        depth = bottom;
19095bd8deadSopenharmony_ci    } else if (positionType === "bottom") {
19105bd8deadSopenharmony_ci        depth = -positionData;
19115bd8deadSopenharmony_ci    } else if (positionType === "shift") {
19125bd8deadSopenharmony_ci        depth = -children[0].elem.depth - positionData;
19135bd8deadSopenharmony_ci    } else if (positionType === "firstBaseline") {
19145bd8deadSopenharmony_ci        depth = -children[0].elem.depth;
19155bd8deadSopenharmony_ci    } else {
19165bd8deadSopenharmony_ci        depth = 0;
19175bd8deadSopenharmony_ci    }
19185bd8deadSopenharmony_ci
19195bd8deadSopenharmony_ci    // Make the fontSizer
19205bd8deadSopenharmony_ci    var maxFontSize = 0;
19215bd8deadSopenharmony_ci    for (i = 0; i < children.length; i++) {
19225bd8deadSopenharmony_ci        if (children[i].type === "elem") {
19235bd8deadSopenharmony_ci            maxFontSize = Math.max(maxFontSize, children[i].elem.maxFontSize);
19245bd8deadSopenharmony_ci        }
19255bd8deadSopenharmony_ci    }
19265bd8deadSopenharmony_ci    var fontSizer = makeFontSizer(options, maxFontSize);
19275bd8deadSopenharmony_ci
19285bd8deadSopenharmony_ci    // Create a new list of actual children at the correct offsets
19295bd8deadSopenharmony_ci    var realChildren = [];
19305bd8deadSopenharmony_ci    currPos = depth;
19315bd8deadSopenharmony_ci    for (i = 0; i < children.length; i++) {
19325bd8deadSopenharmony_ci        if (children[i].type === "kern") {
19335bd8deadSopenharmony_ci            currPos += children[i].size;
19345bd8deadSopenharmony_ci        } else {
19355bd8deadSopenharmony_ci            var child = children[i].elem;
19365bd8deadSopenharmony_ci
19375bd8deadSopenharmony_ci            var shift = -child.depth - currPos;
19385bd8deadSopenharmony_ci            currPos += child.height + child.depth;
19395bd8deadSopenharmony_ci
19405bd8deadSopenharmony_ci            var childWrap = makeSpan([], [fontSizer, child]);
19415bd8deadSopenharmony_ci            childWrap.height -= shift;
19425bd8deadSopenharmony_ci            childWrap.depth += shift;
19435bd8deadSopenharmony_ci            childWrap.style.top = shift + "em";
19445bd8deadSopenharmony_ci
19455bd8deadSopenharmony_ci            realChildren.push(childWrap);
19465bd8deadSopenharmony_ci        }
19475bd8deadSopenharmony_ci    }
19485bd8deadSopenharmony_ci
19495bd8deadSopenharmony_ci    // Add in an element at the end with no offset to fix the calculation of
19505bd8deadSopenharmony_ci    // baselines in some browsers (namely IE, sometimes safari)
19515bd8deadSopenharmony_ci    var baselineFix = makeSpan(
19525bd8deadSopenharmony_ci        ["baseline-fix"], [fontSizer, new domTree.symbolNode("\u200b")]);
19535bd8deadSopenharmony_ci    realChildren.push(baselineFix);
19545bd8deadSopenharmony_ci
19555bd8deadSopenharmony_ci    var vlist = makeSpan(["vlist"], realChildren);
19565bd8deadSopenharmony_ci    // Fix the final height and depth, in case there were kerns at the ends
19575bd8deadSopenharmony_ci    // since the makeSpan calculation won't take that in to account.
19585bd8deadSopenharmony_ci    vlist.height = Math.max(currPos, vlist.height);
19595bd8deadSopenharmony_ci    vlist.depth = Math.max(-depth, vlist.depth);
19605bd8deadSopenharmony_ci    return vlist;
19615bd8deadSopenharmony_ci};
19625bd8deadSopenharmony_ci
19635bd8deadSopenharmony_ci// A table of size -> font size for the different sizing functions
19645bd8deadSopenharmony_civar sizingMultiplier = {
19655bd8deadSopenharmony_ci    size1: 0.5,
19665bd8deadSopenharmony_ci    size2: 0.7,
19675bd8deadSopenharmony_ci    size3: 0.8,
19685bd8deadSopenharmony_ci    size4: 0.9,
19695bd8deadSopenharmony_ci    size5: 1.0,
19705bd8deadSopenharmony_ci    size6: 1.2,
19715bd8deadSopenharmony_ci    size7: 1.44,
19725bd8deadSopenharmony_ci    size8: 1.73,
19735bd8deadSopenharmony_ci    size9: 2.07,
19745bd8deadSopenharmony_ci    size10: 2.49
19755bd8deadSopenharmony_ci};
19765bd8deadSopenharmony_ci
19775bd8deadSopenharmony_ci// A map of spacing functions to their attributes, like size and corresponding
19785bd8deadSopenharmony_ci// CSS class
19795bd8deadSopenharmony_civar spacingFunctions = {
19805bd8deadSopenharmony_ci    "\\qquad": {
19815bd8deadSopenharmony_ci        size: "2em",
19825bd8deadSopenharmony_ci        className: "qquad"
19835bd8deadSopenharmony_ci    },
19845bd8deadSopenharmony_ci    "\\quad": {
19855bd8deadSopenharmony_ci        size: "1em",
19865bd8deadSopenharmony_ci        className: "quad"
19875bd8deadSopenharmony_ci    },
19885bd8deadSopenharmony_ci    "\\enspace": {
19895bd8deadSopenharmony_ci        size: "0.5em",
19905bd8deadSopenharmony_ci        className: "enspace"
19915bd8deadSopenharmony_ci    },
19925bd8deadSopenharmony_ci    "\\;": {
19935bd8deadSopenharmony_ci        size: "0.277778em",
19945bd8deadSopenharmony_ci        className: "thickspace"
19955bd8deadSopenharmony_ci    },
19965bd8deadSopenharmony_ci    "\\:": {
19975bd8deadSopenharmony_ci        size: "0.22222em",
19985bd8deadSopenharmony_ci        className: "mediumspace"
19995bd8deadSopenharmony_ci    },
20005bd8deadSopenharmony_ci    "\\,": {
20015bd8deadSopenharmony_ci        size: "0.16667em",
20025bd8deadSopenharmony_ci        className: "thinspace"
20035bd8deadSopenharmony_ci    },
20045bd8deadSopenharmony_ci    "\\!": {
20055bd8deadSopenharmony_ci        size: "-0.16667em",
20065bd8deadSopenharmony_ci        className: "negativethinspace"
20075bd8deadSopenharmony_ci    }
20085bd8deadSopenharmony_ci};
20095bd8deadSopenharmony_ci
20105bd8deadSopenharmony_ci/**
20115bd8deadSopenharmony_ci * Maps TeX font commands to objects containing:
20125bd8deadSopenharmony_ci * - variant: string used for "mathvariant" attribute in buildMathML.js
20135bd8deadSopenharmony_ci * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
20145bd8deadSopenharmony_ci */
20155bd8deadSopenharmony_ci// A map between tex font commands an MathML mathvariant attribute values
20165bd8deadSopenharmony_civar fontMap = {
20175bd8deadSopenharmony_ci    // styles
20185bd8deadSopenharmony_ci    "mathbf": {
20195bd8deadSopenharmony_ci        variant: "bold",
20205bd8deadSopenharmony_ci        fontName: "Main-Bold"
20215bd8deadSopenharmony_ci    },
20225bd8deadSopenharmony_ci    "mathrm": {
20235bd8deadSopenharmony_ci        variant: "normal",
20245bd8deadSopenharmony_ci        fontName: "Main-Regular"
20255bd8deadSopenharmony_ci    },
20265bd8deadSopenharmony_ci    "textit": {
20275bd8deadSopenharmony_ci        variant: "italic",
20285bd8deadSopenharmony_ci        fontName: "Main-Italic"
20295bd8deadSopenharmony_ci    },
20305bd8deadSopenharmony_ci
20315bd8deadSopenharmony_ci    // "mathit" is missing because it requires the use of two fonts: Main-Italic
20325bd8deadSopenharmony_ci    // and Math-Italic.  This is handled by a special case in makeOrd which ends
20335bd8deadSopenharmony_ci    // up calling mathit.
20345bd8deadSopenharmony_ci
20355bd8deadSopenharmony_ci    // families
20365bd8deadSopenharmony_ci    "mathbb": {
20375bd8deadSopenharmony_ci        variant: "double-struck",
20385bd8deadSopenharmony_ci        fontName: "AMS-Regular"
20395bd8deadSopenharmony_ci    },
20405bd8deadSopenharmony_ci    "mathcal": {
20415bd8deadSopenharmony_ci        variant: "script",
20425bd8deadSopenharmony_ci        fontName: "Caligraphic-Regular"
20435bd8deadSopenharmony_ci    },
20445bd8deadSopenharmony_ci    "mathfrak": {
20455bd8deadSopenharmony_ci        variant: "fraktur",
20465bd8deadSopenharmony_ci        fontName: "Fraktur-Regular"
20475bd8deadSopenharmony_ci    },
20485bd8deadSopenharmony_ci    "mathscr": {
20495bd8deadSopenharmony_ci        variant: "script",
20505bd8deadSopenharmony_ci        fontName: "Script-Regular"
20515bd8deadSopenharmony_ci    },
20525bd8deadSopenharmony_ci    "mathsf": {
20535bd8deadSopenharmony_ci        variant: "sans-serif",
20545bd8deadSopenharmony_ci        fontName: "SansSerif-Regular"
20555bd8deadSopenharmony_ci    },
20565bd8deadSopenharmony_ci    "mathtt": {
20575bd8deadSopenharmony_ci        variant: "monospace",
20585bd8deadSopenharmony_ci        fontName: "Typewriter-Regular"
20595bd8deadSopenharmony_ci    }
20605bd8deadSopenharmony_ci};
20615bd8deadSopenharmony_ci
20625bd8deadSopenharmony_cimodule.exports = {
20635bd8deadSopenharmony_ci    fontMap: fontMap,
20645bd8deadSopenharmony_ci    makeSymbol: makeSymbol,
20655bd8deadSopenharmony_ci    mathsym: mathsym,
20665bd8deadSopenharmony_ci    makeSpan: makeSpan,
20675bd8deadSopenharmony_ci    makeFragment: makeFragment,
20685bd8deadSopenharmony_ci    makeVList: makeVList,
20695bd8deadSopenharmony_ci    makeOrd: makeOrd,
20705bd8deadSopenharmony_ci    prependChildren: prependChildren,
20715bd8deadSopenharmony_ci    sizingMultiplier: sizingMultiplier,
20725bd8deadSopenharmony_ci    spacingFunctions: spacingFunctions
20735bd8deadSopenharmony_ci};
20745bd8deadSopenharmony_ci
20755bd8deadSopenharmony_ci},{"./domTree":15,"./fontMetrics":17,"./symbols":23,"./utils":25}],11:[function(require,module,exports){
20765bd8deadSopenharmony_ci/* eslint no-console:0 */
20775bd8deadSopenharmony_ci/**
20785bd8deadSopenharmony_ci * This file does the main work of building a domTree structure from a parse
20795bd8deadSopenharmony_ci * tree. The entry point is the `buildHTML` function, which takes a parse tree.
20805bd8deadSopenharmony_ci * Then, the buildExpression, buildGroup, and various groupTypes functions are
20815bd8deadSopenharmony_ci * called, to produce a final HTML tree.
20825bd8deadSopenharmony_ci */
20835bd8deadSopenharmony_ci
20845bd8deadSopenharmony_civar ParseError = require("./ParseError");
20855bd8deadSopenharmony_civar Style = require("./Style");
20865bd8deadSopenharmony_ci
20875bd8deadSopenharmony_civar buildCommon = require("./buildCommon");
20885bd8deadSopenharmony_civar delimiter = require("./delimiter");
20895bd8deadSopenharmony_civar domTree = require("./domTree");
20905bd8deadSopenharmony_civar fontMetrics = require("./fontMetrics");
20915bd8deadSopenharmony_civar utils = require("./utils");
20925bd8deadSopenharmony_ci
20935bd8deadSopenharmony_civar makeSpan = buildCommon.makeSpan;
20945bd8deadSopenharmony_ci
20955bd8deadSopenharmony_civar isSpace = function(node) {
20965bd8deadSopenharmony_ci    return node instanceof domTree.span && node.classes[0] === "mspace";
20975bd8deadSopenharmony_ci};
20985bd8deadSopenharmony_ci
20995bd8deadSopenharmony_ci// Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)
21005bd8deadSopenharmony_ci// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
21015bd8deadSopenharmony_ci// and the text before Rule 19.
21025bd8deadSopenharmony_ci
21035bd8deadSopenharmony_civar isBin = function(node) {
21045bd8deadSopenharmony_ci    return node && node.classes[0] === "mbin";
21055bd8deadSopenharmony_ci};
21065bd8deadSopenharmony_ci
21075bd8deadSopenharmony_civar isBinLeftCanceller = function(node, isRealGroup) {
21085bd8deadSopenharmony_ci    // TODO: This code assumes that a node's math class is the first element
21095bd8deadSopenharmony_ci    // of its `classes` array. A later cleanup should ensure this, for
21105bd8deadSopenharmony_ci    // instance by changing the signature of `makeSpan`.
21115bd8deadSopenharmony_ci    if (node) {
21125bd8deadSopenharmony_ci        return utils.contains(["mbin", "mopen", "mrel", "mop", "mpunct"],
21135bd8deadSopenharmony_ci                              node.classes[0]);
21145bd8deadSopenharmony_ci    } else {
21155bd8deadSopenharmony_ci        return isRealGroup;
21165bd8deadSopenharmony_ci    }
21175bd8deadSopenharmony_ci};
21185bd8deadSopenharmony_ci
21195bd8deadSopenharmony_civar isBinRightCanceller = function(node, isRealGroup) {
21205bd8deadSopenharmony_ci    if (node) {
21215bd8deadSopenharmony_ci        return utils.contains(["mrel", "mclose", "mpunct"], node.classes[0]);
21225bd8deadSopenharmony_ci    } else {
21235bd8deadSopenharmony_ci        return isRealGroup;
21245bd8deadSopenharmony_ci    }
21255bd8deadSopenharmony_ci};
21265bd8deadSopenharmony_ci
21275bd8deadSopenharmony_ci/**
21285bd8deadSopenharmony_ci * Take a list of nodes, build them in order, and return a list of the built
21295bd8deadSopenharmony_ci * nodes. documentFragments are flattened into their contents, so the
21305bd8deadSopenharmony_ci * returned list contains no fragments. `isRealGroup` is true if `expression`
21315bd8deadSopenharmony_ci * is a real group (no atoms will be added on either side), as opposed to
21325bd8deadSopenharmony_ci * a partial group (e.g. one created by \color).
21335bd8deadSopenharmony_ci */
21345bd8deadSopenharmony_civar buildExpression = function(expression, options, isRealGroup) {
21355bd8deadSopenharmony_ci    // Parse expressions into `groups`.
21365bd8deadSopenharmony_ci    var groups = [];
21375bd8deadSopenharmony_ci    for (var i = 0; i < expression.length; i++) {
21385bd8deadSopenharmony_ci        var group = expression[i];
21395bd8deadSopenharmony_ci        var output = buildGroup(group, options);
21405bd8deadSopenharmony_ci        if (output instanceof domTree.documentFragment) {
21415bd8deadSopenharmony_ci            Array.prototype.push.apply(groups, output.children);
21425bd8deadSopenharmony_ci        } else {
21435bd8deadSopenharmony_ci            groups.push(output);
21445bd8deadSopenharmony_ci        }
21455bd8deadSopenharmony_ci    }
21465bd8deadSopenharmony_ci    // At this point `groups` consists entirely of `symbolNode`s and `span`s.
21475bd8deadSopenharmony_ci
21485bd8deadSopenharmony_ci    // Explicit spaces (e.g., \;, \,) should be ignored with respect to atom
21495bd8deadSopenharmony_ci    // spacing (e.g., "add thick space between mord and mrel"). Since CSS
21505bd8deadSopenharmony_ci    // adjacency rules implement atom spacing, spaces should be invisible to
21515bd8deadSopenharmony_ci    // CSS. So we splice them out of `groups` and into the atoms themselves.
21525bd8deadSopenharmony_ci    var spaces = null;
21535bd8deadSopenharmony_ci    for (i = 0; i < groups.length; i++) {
21545bd8deadSopenharmony_ci        if (isSpace(groups[i])) {
21555bd8deadSopenharmony_ci            spaces = spaces || [];
21565bd8deadSopenharmony_ci            spaces.push(groups[i]);
21575bd8deadSopenharmony_ci            groups.splice(i, 1);
21585bd8deadSopenharmony_ci            i--;
21595bd8deadSopenharmony_ci        } else if (spaces) {
21605bd8deadSopenharmony_ci            if (groups[i] instanceof domTree.symbolNode) {
21615bd8deadSopenharmony_ci                groups[i] = makeSpan([].concat(groups[i].classes), [groups[i]]);
21625bd8deadSopenharmony_ci            }
21635bd8deadSopenharmony_ci            buildCommon.prependChildren(groups[i], spaces);
21645bd8deadSopenharmony_ci            spaces = null;
21655bd8deadSopenharmony_ci        }
21665bd8deadSopenharmony_ci    }
21675bd8deadSopenharmony_ci    if (spaces) {
21685bd8deadSopenharmony_ci        Array.prototype.push.apply(groups, spaces);
21695bd8deadSopenharmony_ci    }
21705bd8deadSopenharmony_ci
21715bd8deadSopenharmony_ci    // Binary operators change to ordinary symbols in some contexts.
21725bd8deadSopenharmony_ci    for (i = 0; i < groups.length; i++) {
21735bd8deadSopenharmony_ci        if (isBin(groups[i])
21745bd8deadSopenharmony_ci            && (isBinLeftCanceller(groups[i - 1], isRealGroup)
21755bd8deadSopenharmony_ci                || isBinRightCanceller(groups[i + 1], isRealGroup))) {
21765bd8deadSopenharmony_ci            groups[i].classes[0] = "mord";
21775bd8deadSopenharmony_ci        }
21785bd8deadSopenharmony_ci    }
21795bd8deadSopenharmony_ci
21805bd8deadSopenharmony_ci    return groups;
21815bd8deadSopenharmony_ci};
21825bd8deadSopenharmony_ci
21835bd8deadSopenharmony_ci// Return math atom class (mclass) of a domTree.
21845bd8deadSopenharmony_civar getTypeOfDomTree = function(node) {
21855bd8deadSopenharmony_ci    if (node instanceof domTree.documentFragment) {
21865bd8deadSopenharmony_ci        if (node.children.length) {
21875bd8deadSopenharmony_ci            return getTypeOfDomTree(
21885bd8deadSopenharmony_ci                node.children[node.children.length - 1]);
21895bd8deadSopenharmony_ci        }
21905bd8deadSopenharmony_ci    } else {
21915bd8deadSopenharmony_ci        if (utils.contains(["mord", "mop", "mbin", "mrel", "mopen", "mclose",
21925bd8deadSopenharmony_ci            "mpunct", "minner"], node.classes[0])) {
21935bd8deadSopenharmony_ci            return node.classes[0];
21945bd8deadSopenharmony_ci        }
21955bd8deadSopenharmony_ci    }
21965bd8deadSopenharmony_ci    return null;
21975bd8deadSopenharmony_ci};
21985bd8deadSopenharmony_ci
21995bd8deadSopenharmony_ci/**
22005bd8deadSopenharmony_ci * Sometimes, groups perform special rules when they have superscripts or
22015bd8deadSopenharmony_ci * subscripts attached to them. This function lets the `supsub` group know that
22025bd8deadSopenharmony_ci * its inner element should handle the superscripts and subscripts instead of
22035bd8deadSopenharmony_ci * handling them itself.
22045bd8deadSopenharmony_ci */
22055bd8deadSopenharmony_civar shouldHandleSupSub = function(group, options) {
22065bd8deadSopenharmony_ci    if (!group) {
22075bd8deadSopenharmony_ci        return false;
22085bd8deadSopenharmony_ci    } else if (group.type === "op") {
22095bd8deadSopenharmony_ci        // Operators handle supsubs differently when they have limits
22105bd8deadSopenharmony_ci        // (e.g. `\displaystyle\sum_2^3`)
22115bd8deadSopenharmony_ci        return group.value.limits &&
22125bd8deadSopenharmony_ci            (options.style.size === Style.DISPLAY.size ||
22135bd8deadSopenharmony_ci            group.value.alwaysHandleSupSub);
22145bd8deadSopenharmony_ci    } else if (group.type === "accent") {
22155bd8deadSopenharmony_ci        return isCharacterBox(group.value.base);
22165bd8deadSopenharmony_ci    } else {
22175bd8deadSopenharmony_ci        return null;
22185bd8deadSopenharmony_ci    }
22195bd8deadSopenharmony_ci};
22205bd8deadSopenharmony_ci
22215bd8deadSopenharmony_ci/**
22225bd8deadSopenharmony_ci * Sometimes we want to pull out the innermost element of a group. In most
22235bd8deadSopenharmony_ci * cases, this will just be the group itself, but when ordgroups and colors have
22245bd8deadSopenharmony_ci * a single element, we want to pull that out.
22255bd8deadSopenharmony_ci */
22265bd8deadSopenharmony_civar getBaseElem = function(group) {
22275bd8deadSopenharmony_ci    if (!group) {
22285bd8deadSopenharmony_ci        return false;
22295bd8deadSopenharmony_ci    } else if (group.type === "ordgroup") {
22305bd8deadSopenharmony_ci        if (group.value.length === 1) {
22315bd8deadSopenharmony_ci            return getBaseElem(group.value[0]);
22325bd8deadSopenharmony_ci        } else {
22335bd8deadSopenharmony_ci            return group;
22345bd8deadSopenharmony_ci        }
22355bd8deadSopenharmony_ci    } else if (group.type === "color") {
22365bd8deadSopenharmony_ci        if (group.value.value.length === 1) {
22375bd8deadSopenharmony_ci            return getBaseElem(group.value.value[0]);
22385bd8deadSopenharmony_ci        } else {
22395bd8deadSopenharmony_ci            return group;
22405bd8deadSopenharmony_ci        }
22415bd8deadSopenharmony_ci    } else if (group.type === "font") {
22425bd8deadSopenharmony_ci        return getBaseElem(group.value.body);
22435bd8deadSopenharmony_ci    } else {
22445bd8deadSopenharmony_ci        return group;
22455bd8deadSopenharmony_ci    }
22465bd8deadSopenharmony_ci};
22475bd8deadSopenharmony_ci
22485bd8deadSopenharmony_ci/**
22495bd8deadSopenharmony_ci * TeXbook algorithms often reference "character boxes", which are simply groups
22505bd8deadSopenharmony_ci * with a single character in them. To decide if something is a character box,
22515bd8deadSopenharmony_ci * we find its innermost group, and see if it is a single character.
22525bd8deadSopenharmony_ci */
22535bd8deadSopenharmony_civar isCharacterBox = function(group) {
22545bd8deadSopenharmony_ci    var baseElem = getBaseElem(group);
22555bd8deadSopenharmony_ci
22565bd8deadSopenharmony_ci    // These are all they types of groups which hold single characters
22575bd8deadSopenharmony_ci    return baseElem.type === "mathord" ||
22585bd8deadSopenharmony_ci        baseElem.type === "textord" ||
22595bd8deadSopenharmony_ci        baseElem.type === "bin" ||
22605bd8deadSopenharmony_ci        baseElem.type === "rel" ||
22615bd8deadSopenharmony_ci        baseElem.type === "inner" ||
22625bd8deadSopenharmony_ci        baseElem.type === "open" ||
22635bd8deadSopenharmony_ci        baseElem.type === "close" ||
22645bd8deadSopenharmony_ci        baseElem.type === "punct";
22655bd8deadSopenharmony_ci};
22665bd8deadSopenharmony_ci
22675bd8deadSopenharmony_civar makeNullDelimiter = function(options, classes) {
22685bd8deadSopenharmony_ci    return makeSpan(classes.concat([
22695bd8deadSopenharmony_ci        "sizing", "reset-" + options.size, "size5",
22705bd8deadSopenharmony_ci        options.style.reset(), Style.TEXT.cls(),
22715bd8deadSopenharmony_ci        "nulldelimiter"]));
22725bd8deadSopenharmony_ci};
22735bd8deadSopenharmony_ci
22745bd8deadSopenharmony_ci/**
22755bd8deadSopenharmony_ci * This is a map of group types to the function used to handle that type.
22765bd8deadSopenharmony_ci * Simpler types come at the beginning, while complicated types come afterwards.
22775bd8deadSopenharmony_ci */
22785bd8deadSopenharmony_civar groupTypes = {};
22795bd8deadSopenharmony_ci
22805bd8deadSopenharmony_cigroupTypes.mathord = function(group, options) {
22815bd8deadSopenharmony_ci    return buildCommon.makeOrd(group, options, "mathord");
22825bd8deadSopenharmony_ci};
22835bd8deadSopenharmony_ci
22845bd8deadSopenharmony_cigroupTypes.textord = function(group, options) {
22855bd8deadSopenharmony_ci    return buildCommon.makeOrd(group, options, "textord");
22865bd8deadSopenharmony_ci};
22875bd8deadSopenharmony_ci
22885bd8deadSopenharmony_cigroupTypes.bin = function(group, options) {
22895bd8deadSopenharmony_ci    return buildCommon.mathsym(
22905bd8deadSopenharmony_ci        group.value, group.mode, options, ["mbin"]);
22915bd8deadSopenharmony_ci};
22925bd8deadSopenharmony_ci
22935bd8deadSopenharmony_cigroupTypes.rel = function(group, options) {
22945bd8deadSopenharmony_ci    return buildCommon.mathsym(
22955bd8deadSopenharmony_ci        group.value, group.mode, options, ["mrel"]);
22965bd8deadSopenharmony_ci};
22975bd8deadSopenharmony_ci
22985bd8deadSopenharmony_cigroupTypes.open = function(group, options) {
22995bd8deadSopenharmony_ci    return buildCommon.mathsym(
23005bd8deadSopenharmony_ci        group.value, group.mode, options, ["mopen"]);
23015bd8deadSopenharmony_ci};
23025bd8deadSopenharmony_ci
23035bd8deadSopenharmony_cigroupTypes.close = function(group, options) {
23045bd8deadSopenharmony_ci    return buildCommon.mathsym(
23055bd8deadSopenharmony_ci        group.value, group.mode, options, ["mclose"]);
23065bd8deadSopenharmony_ci};
23075bd8deadSopenharmony_ci
23085bd8deadSopenharmony_cigroupTypes.inner = function(group, options) {
23095bd8deadSopenharmony_ci    return buildCommon.mathsym(
23105bd8deadSopenharmony_ci        group.value, group.mode, options, ["minner"]);
23115bd8deadSopenharmony_ci};
23125bd8deadSopenharmony_ci
23135bd8deadSopenharmony_cigroupTypes.punct = function(group, options) {
23145bd8deadSopenharmony_ci    return buildCommon.mathsym(
23155bd8deadSopenharmony_ci        group.value, group.mode, options, ["mpunct"]);
23165bd8deadSopenharmony_ci};
23175bd8deadSopenharmony_ci
23185bd8deadSopenharmony_cigroupTypes.ordgroup = function(group, options) {
23195bd8deadSopenharmony_ci    return makeSpan(
23205bd8deadSopenharmony_ci        ["mord", options.style.cls()],
23215bd8deadSopenharmony_ci        buildExpression(group.value, options.reset(), true),
23225bd8deadSopenharmony_ci        options
23235bd8deadSopenharmony_ci    );
23245bd8deadSopenharmony_ci};
23255bd8deadSopenharmony_ci
23265bd8deadSopenharmony_cigroupTypes.text = function(group, options) {
23275bd8deadSopenharmony_ci    var newOptions = options.withFont(group.value.style);
23285bd8deadSopenharmony_ci    var inner = buildExpression(group.value.body, newOptions, true);
23295bd8deadSopenharmony_ci    for (var i = 0; i < inner.length - 1; i++) {
23305bd8deadSopenharmony_ci        if (inner[i].tryCombine(inner[i + 1])) {
23315bd8deadSopenharmony_ci            inner.splice(i + 1, 1);
23325bd8deadSopenharmony_ci            i--;
23335bd8deadSopenharmony_ci        }
23345bd8deadSopenharmony_ci    }
23355bd8deadSopenharmony_ci    return makeSpan(["mord", "text", newOptions.style.cls()],
23365bd8deadSopenharmony_ci        inner, newOptions);
23375bd8deadSopenharmony_ci};
23385bd8deadSopenharmony_ci
23395bd8deadSopenharmony_cigroupTypes.color = function(group, options) {
23405bd8deadSopenharmony_ci    var elements = buildExpression(
23415bd8deadSopenharmony_ci        group.value.value,
23425bd8deadSopenharmony_ci        options.withColor(group.value.color),
23435bd8deadSopenharmony_ci        false
23445bd8deadSopenharmony_ci    );
23455bd8deadSopenharmony_ci
23465bd8deadSopenharmony_ci    // \color isn't supposed to affect the type of the elements it contains.
23475bd8deadSopenharmony_ci    // To accomplish this, we wrap the results in a fragment, so the inner
23485bd8deadSopenharmony_ci    // elements will be able to directly interact with their neighbors. For
23495bd8deadSopenharmony_ci    // example, `\color{red}{2 +} 3` has the same spacing as `2 + 3`
23505bd8deadSopenharmony_ci    return new buildCommon.makeFragment(elements);
23515bd8deadSopenharmony_ci};
23525bd8deadSopenharmony_ci
23535bd8deadSopenharmony_cigroupTypes.supsub = function(group, options) {
23545bd8deadSopenharmony_ci    // Superscript and subscripts are handled in the TeXbook on page
23555bd8deadSopenharmony_ci    // 445-446, rules 18(a-f).
23565bd8deadSopenharmony_ci
23575bd8deadSopenharmony_ci    // Here is where we defer to the inner group if it should handle
23585bd8deadSopenharmony_ci    // superscripts and subscripts itself.
23595bd8deadSopenharmony_ci    if (shouldHandleSupSub(group.value.base, options)) {
23605bd8deadSopenharmony_ci        return groupTypes[group.value.base.type](group, options);
23615bd8deadSopenharmony_ci    }
23625bd8deadSopenharmony_ci
23635bd8deadSopenharmony_ci    var base = buildGroup(group.value.base, options.reset());
23645bd8deadSopenharmony_ci    var supmid;
23655bd8deadSopenharmony_ci    var submid;
23665bd8deadSopenharmony_ci    var sup;
23675bd8deadSopenharmony_ci    var sub;
23685bd8deadSopenharmony_ci
23695bd8deadSopenharmony_ci    var style = options.style;
23705bd8deadSopenharmony_ci    var newOptions;
23715bd8deadSopenharmony_ci
23725bd8deadSopenharmony_ci    if (group.value.sup) {
23735bd8deadSopenharmony_ci        newOptions = options.withStyle(style.sup());
23745bd8deadSopenharmony_ci        sup = buildGroup(group.value.sup, newOptions);
23755bd8deadSopenharmony_ci        supmid = makeSpan([style.reset(), style.sup().cls()],
23765bd8deadSopenharmony_ci            [sup], newOptions);
23775bd8deadSopenharmony_ci    }
23785bd8deadSopenharmony_ci
23795bd8deadSopenharmony_ci    if (group.value.sub) {
23805bd8deadSopenharmony_ci        newOptions = options.withStyle(style.sub());
23815bd8deadSopenharmony_ci        sub = buildGroup(group.value.sub, newOptions);
23825bd8deadSopenharmony_ci        submid = makeSpan([style.reset(), style.sub().cls()],
23835bd8deadSopenharmony_ci            [sub], newOptions);
23845bd8deadSopenharmony_ci    }
23855bd8deadSopenharmony_ci
23865bd8deadSopenharmony_ci    // Rule 18a
23875bd8deadSopenharmony_ci    var supShift;
23885bd8deadSopenharmony_ci    var subShift;
23895bd8deadSopenharmony_ci    if (isCharacterBox(group.value.base)) {
23905bd8deadSopenharmony_ci        supShift = 0;
23915bd8deadSopenharmony_ci        subShift = 0;
23925bd8deadSopenharmony_ci    } else {
23935bd8deadSopenharmony_ci        supShift = base.height - style.metrics.supDrop;
23945bd8deadSopenharmony_ci        subShift = base.depth + style.metrics.subDrop;
23955bd8deadSopenharmony_ci    }
23965bd8deadSopenharmony_ci
23975bd8deadSopenharmony_ci    // Rule 18c
23985bd8deadSopenharmony_ci    var minSupShift;
23995bd8deadSopenharmony_ci    if (style === Style.DISPLAY) {
24005bd8deadSopenharmony_ci        minSupShift = style.metrics.sup1;
24015bd8deadSopenharmony_ci    } else if (style.cramped) {
24025bd8deadSopenharmony_ci        minSupShift = style.metrics.sup3;
24035bd8deadSopenharmony_ci    } else {
24045bd8deadSopenharmony_ci        minSupShift = style.metrics.sup2;
24055bd8deadSopenharmony_ci    }
24065bd8deadSopenharmony_ci
24075bd8deadSopenharmony_ci    // scriptspace is a font-size-independent size, so scale it
24085bd8deadSopenharmony_ci    // appropriately
24095bd8deadSopenharmony_ci    var multiplier = Style.TEXT.sizeMultiplier *
24105bd8deadSopenharmony_ci            style.sizeMultiplier;
24115bd8deadSopenharmony_ci    var scriptspace =
24125bd8deadSopenharmony_ci        (0.5 / fontMetrics.metrics.ptPerEm) / multiplier + "em";
24135bd8deadSopenharmony_ci
24145bd8deadSopenharmony_ci    var supsub;
24155bd8deadSopenharmony_ci    if (!group.value.sup) {
24165bd8deadSopenharmony_ci        // Rule 18b
24175bd8deadSopenharmony_ci        subShift = Math.max(
24185bd8deadSopenharmony_ci            subShift, style.metrics.sub1,
24195bd8deadSopenharmony_ci            sub.height - 0.8 * style.metrics.xHeight);
24205bd8deadSopenharmony_ci
24215bd8deadSopenharmony_ci        supsub = buildCommon.makeVList([
24225bd8deadSopenharmony_ci            {type: "elem", elem: submid}
24235bd8deadSopenharmony_ci        ], "shift", subShift, options);
24245bd8deadSopenharmony_ci
24255bd8deadSopenharmony_ci        supsub.children[0].style.marginRight = scriptspace;
24265bd8deadSopenharmony_ci
24275bd8deadSopenharmony_ci        // Subscripts shouldn't be shifted by the base's italic correction.
24285bd8deadSopenharmony_ci        // Account for that by shifting the subscript back the appropriate
24295bd8deadSopenharmony_ci        // amount. Note we only do this when the base is a single symbol.
24305bd8deadSopenharmony_ci        if (base instanceof domTree.symbolNode) {
24315bd8deadSopenharmony_ci            supsub.children[0].style.marginLeft = -base.italic + "em";
24325bd8deadSopenharmony_ci        }
24335bd8deadSopenharmony_ci    } else if (!group.value.sub) {
24345bd8deadSopenharmony_ci        // Rule 18c, d
24355bd8deadSopenharmony_ci        supShift = Math.max(supShift, minSupShift,
24365bd8deadSopenharmony_ci            sup.depth + 0.25 * style.metrics.xHeight);
24375bd8deadSopenharmony_ci
24385bd8deadSopenharmony_ci        supsub = buildCommon.makeVList([
24395bd8deadSopenharmony_ci            {type: "elem", elem: supmid}
24405bd8deadSopenharmony_ci        ], "shift", -supShift, options);
24415bd8deadSopenharmony_ci
24425bd8deadSopenharmony_ci        supsub.children[0].style.marginRight = scriptspace;
24435bd8deadSopenharmony_ci    } else {
24445bd8deadSopenharmony_ci        supShift = Math.max(
24455bd8deadSopenharmony_ci            supShift, minSupShift, sup.depth + 0.25 * style.metrics.xHeight);
24465bd8deadSopenharmony_ci        subShift = Math.max(subShift, style.metrics.sub2);
24475bd8deadSopenharmony_ci
24485bd8deadSopenharmony_ci        var ruleWidth = fontMetrics.metrics.defaultRuleThickness;
24495bd8deadSopenharmony_ci
24505bd8deadSopenharmony_ci        // Rule 18e
24515bd8deadSopenharmony_ci        if ((supShift - sup.depth) - (sub.height - subShift) <
24525bd8deadSopenharmony_ci                4 * ruleWidth) {
24535bd8deadSopenharmony_ci            subShift = 4 * ruleWidth - (supShift - sup.depth) + sub.height;
24545bd8deadSopenharmony_ci            var psi = 0.8 * style.metrics.xHeight - (supShift - sup.depth);
24555bd8deadSopenharmony_ci            if (psi > 0) {
24565bd8deadSopenharmony_ci                supShift += psi;
24575bd8deadSopenharmony_ci                subShift -= psi;
24585bd8deadSopenharmony_ci            }
24595bd8deadSopenharmony_ci        }
24605bd8deadSopenharmony_ci
24615bd8deadSopenharmony_ci        supsub = buildCommon.makeVList([
24625bd8deadSopenharmony_ci            {type: "elem", elem: submid, shift: subShift},
24635bd8deadSopenharmony_ci            {type: "elem", elem: supmid, shift: -supShift}
24645bd8deadSopenharmony_ci        ], "individualShift", null, options);
24655bd8deadSopenharmony_ci
24665bd8deadSopenharmony_ci        // See comment above about subscripts not being shifted
24675bd8deadSopenharmony_ci        if (base instanceof domTree.symbolNode) {
24685bd8deadSopenharmony_ci            supsub.children[0].style.marginLeft = -base.italic + "em";
24695bd8deadSopenharmony_ci        }
24705bd8deadSopenharmony_ci
24715bd8deadSopenharmony_ci        supsub.children[0].style.marginRight = scriptspace;
24725bd8deadSopenharmony_ci        supsub.children[1].style.marginRight = scriptspace;
24735bd8deadSopenharmony_ci    }
24745bd8deadSopenharmony_ci
24755bd8deadSopenharmony_ci    // We ensure to wrap the supsub vlist in a span.msupsub to reset text-align
24765bd8deadSopenharmony_ci    var mclass = getTypeOfDomTree(base) || "mord";
24775bd8deadSopenharmony_ci    return makeSpan([mclass],
24785bd8deadSopenharmony_ci        [base, makeSpan(["msupsub"], [supsub])],
24795bd8deadSopenharmony_ci        options);
24805bd8deadSopenharmony_ci};
24815bd8deadSopenharmony_ci
24825bd8deadSopenharmony_cigroupTypes.genfrac = function(group, options) {
24835bd8deadSopenharmony_ci    // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
24845bd8deadSopenharmony_ci    // Figure out what style this fraction should be in based on the
24855bd8deadSopenharmony_ci    // function used
24865bd8deadSopenharmony_ci    var style = options.style;
24875bd8deadSopenharmony_ci    if (group.value.size === "display") {
24885bd8deadSopenharmony_ci        style = Style.DISPLAY;
24895bd8deadSopenharmony_ci    } else if (group.value.size === "text") {
24905bd8deadSopenharmony_ci        style = Style.TEXT;
24915bd8deadSopenharmony_ci    }
24925bd8deadSopenharmony_ci
24935bd8deadSopenharmony_ci    var nstyle = style.fracNum();
24945bd8deadSopenharmony_ci    var dstyle = style.fracDen();
24955bd8deadSopenharmony_ci    var newOptions;
24965bd8deadSopenharmony_ci
24975bd8deadSopenharmony_ci    newOptions = options.withStyle(nstyle);
24985bd8deadSopenharmony_ci    var numer = buildGroup(group.value.numer, newOptions);
24995bd8deadSopenharmony_ci    var numerreset = makeSpan([style.reset(), nstyle.cls()],
25005bd8deadSopenharmony_ci        [numer], newOptions);
25015bd8deadSopenharmony_ci
25025bd8deadSopenharmony_ci    newOptions = options.withStyle(dstyle);
25035bd8deadSopenharmony_ci    var denom = buildGroup(group.value.denom, newOptions);
25045bd8deadSopenharmony_ci    var denomreset = makeSpan([style.reset(), dstyle.cls()],
25055bd8deadSopenharmony_ci        [denom], newOptions);
25065bd8deadSopenharmony_ci
25075bd8deadSopenharmony_ci    var ruleWidth;
25085bd8deadSopenharmony_ci    if (group.value.hasBarLine) {
25095bd8deadSopenharmony_ci        ruleWidth = fontMetrics.metrics.defaultRuleThickness /
25105bd8deadSopenharmony_ci            options.style.sizeMultiplier;
25115bd8deadSopenharmony_ci    } else {
25125bd8deadSopenharmony_ci        ruleWidth = 0;
25135bd8deadSopenharmony_ci    }
25145bd8deadSopenharmony_ci
25155bd8deadSopenharmony_ci    // Rule 15b
25165bd8deadSopenharmony_ci    var numShift;
25175bd8deadSopenharmony_ci    var clearance;
25185bd8deadSopenharmony_ci    var denomShift;
25195bd8deadSopenharmony_ci    if (style.size === Style.DISPLAY.size) {
25205bd8deadSopenharmony_ci        numShift = style.metrics.num1;
25215bd8deadSopenharmony_ci        if (ruleWidth > 0) {
25225bd8deadSopenharmony_ci            clearance = 3 * ruleWidth;
25235bd8deadSopenharmony_ci        } else {
25245bd8deadSopenharmony_ci            clearance = 7 * fontMetrics.metrics.defaultRuleThickness;
25255bd8deadSopenharmony_ci        }
25265bd8deadSopenharmony_ci        denomShift = style.metrics.denom1;
25275bd8deadSopenharmony_ci    } else {
25285bd8deadSopenharmony_ci        if (ruleWidth > 0) {
25295bd8deadSopenharmony_ci            numShift = style.metrics.num2;
25305bd8deadSopenharmony_ci            clearance = ruleWidth;
25315bd8deadSopenharmony_ci        } else {
25325bd8deadSopenharmony_ci            numShift = style.metrics.num3;
25335bd8deadSopenharmony_ci            clearance = 3 * fontMetrics.metrics.defaultRuleThickness;
25345bd8deadSopenharmony_ci        }
25355bd8deadSopenharmony_ci        denomShift = style.metrics.denom2;
25365bd8deadSopenharmony_ci    }
25375bd8deadSopenharmony_ci
25385bd8deadSopenharmony_ci    var frac;
25395bd8deadSopenharmony_ci    if (ruleWidth === 0) {
25405bd8deadSopenharmony_ci        // Rule 15c
25415bd8deadSopenharmony_ci        var candidateClearance =
25425bd8deadSopenharmony_ci            (numShift - numer.depth) - (denom.height - denomShift);
25435bd8deadSopenharmony_ci        if (candidateClearance < clearance) {
25445bd8deadSopenharmony_ci            numShift += 0.5 * (clearance - candidateClearance);
25455bd8deadSopenharmony_ci            denomShift += 0.5 * (clearance - candidateClearance);
25465bd8deadSopenharmony_ci        }
25475bd8deadSopenharmony_ci
25485bd8deadSopenharmony_ci        frac = buildCommon.makeVList([
25495bd8deadSopenharmony_ci            {type: "elem", elem: denomreset, shift: denomShift},
25505bd8deadSopenharmony_ci            {type: "elem", elem: numerreset, shift: -numShift}
25515bd8deadSopenharmony_ci        ], "individualShift", null, options);
25525bd8deadSopenharmony_ci    } else {
25535bd8deadSopenharmony_ci        // Rule 15d
25545bd8deadSopenharmony_ci        var axisHeight = style.metrics.axisHeight;
25555bd8deadSopenharmony_ci
25565bd8deadSopenharmony_ci        if ((numShift - numer.depth) - (axisHeight + 0.5 * ruleWidth) <
25575bd8deadSopenharmony_ci                clearance) {
25585bd8deadSopenharmony_ci            numShift +=
25595bd8deadSopenharmony_ci                clearance - ((numShift - numer.depth) -
25605bd8deadSopenharmony_ci                             (axisHeight + 0.5 * ruleWidth));
25615bd8deadSopenharmony_ci        }
25625bd8deadSopenharmony_ci
25635bd8deadSopenharmony_ci        if ((axisHeight - 0.5 * ruleWidth) - (denom.height - denomShift) <
25645bd8deadSopenharmony_ci                clearance) {
25655bd8deadSopenharmony_ci            denomShift +=
25665bd8deadSopenharmony_ci                clearance - ((axisHeight - 0.5 * ruleWidth) -
25675bd8deadSopenharmony_ci                             (denom.height - denomShift));
25685bd8deadSopenharmony_ci        }
25695bd8deadSopenharmony_ci
25705bd8deadSopenharmony_ci        var mid = makeSpan(
25715bd8deadSopenharmony_ci            [options.style.reset(), Style.TEXT.cls(), "frac-line"]);
25725bd8deadSopenharmony_ci        // Manually set the height of the line because its height is
25735bd8deadSopenharmony_ci        // created in CSS
25745bd8deadSopenharmony_ci        mid.height = ruleWidth;
25755bd8deadSopenharmony_ci
25765bd8deadSopenharmony_ci        var midShift = -(axisHeight - 0.5 * ruleWidth);
25775bd8deadSopenharmony_ci
25785bd8deadSopenharmony_ci        frac = buildCommon.makeVList([
25795bd8deadSopenharmony_ci            {type: "elem", elem: denomreset, shift: denomShift},
25805bd8deadSopenharmony_ci            {type: "elem", elem: mid,        shift: midShift},
25815bd8deadSopenharmony_ci            {type: "elem", elem: numerreset, shift: -numShift}
25825bd8deadSopenharmony_ci        ], "individualShift", null, options);
25835bd8deadSopenharmony_ci    }
25845bd8deadSopenharmony_ci
25855bd8deadSopenharmony_ci    // Since we manually change the style sometimes (with \dfrac or \tfrac),
25865bd8deadSopenharmony_ci    // account for the possible size change here.
25875bd8deadSopenharmony_ci    frac.height *= style.sizeMultiplier / options.style.sizeMultiplier;
25885bd8deadSopenharmony_ci    frac.depth *= style.sizeMultiplier / options.style.sizeMultiplier;
25895bd8deadSopenharmony_ci
25905bd8deadSopenharmony_ci    // Rule 15e
25915bd8deadSopenharmony_ci    var delimSize;
25925bd8deadSopenharmony_ci    if (style.size === Style.DISPLAY.size) {
25935bd8deadSopenharmony_ci        delimSize = style.metrics.delim1;
25945bd8deadSopenharmony_ci    } else {
25955bd8deadSopenharmony_ci        delimSize = style.metrics.delim2;
25965bd8deadSopenharmony_ci    }
25975bd8deadSopenharmony_ci
25985bd8deadSopenharmony_ci    var leftDelim;
25995bd8deadSopenharmony_ci    var rightDelim;
26005bd8deadSopenharmony_ci    if (group.value.leftDelim == null) {
26015bd8deadSopenharmony_ci        leftDelim = makeNullDelimiter(options, ["mopen"]);
26025bd8deadSopenharmony_ci    } else {
26035bd8deadSopenharmony_ci        leftDelim = delimiter.customSizedDelim(
26045bd8deadSopenharmony_ci            group.value.leftDelim, delimSize, true,
26055bd8deadSopenharmony_ci            options.withStyle(style), group.mode, ["mopen"]);
26065bd8deadSopenharmony_ci    }
26075bd8deadSopenharmony_ci    if (group.value.rightDelim == null) {
26085bd8deadSopenharmony_ci        rightDelim = makeNullDelimiter(options, ["mclose"]);
26095bd8deadSopenharmony_ci    } else {
26105bd8deadSopenharmony_ci        rightDelim = delimiter.customSizedDelim(
26115bd8deadSopenharmony_ci            group.value.rightDelim, delimSize, true,
26125bd8deadSopenharmony_ci            options.withStyle(style), group.mode, ["mclose"]);
26135bd8deadSopenharmony_ci    }
26145bd8deadSopenharmony_ci
26155bd8deadSopenharmony_ci    return makeSpan(
26165bd8deadSopenharmony_ci        ["mord", options.style.reset(), style.cls()],
26175bd8deadSopenharmony_ci        [leftDelim, makeSpan(["mfrac"], [frac]), rightDelim],
26185bd8deadSopenharmony_ci        options);
26195bd8deadSopenharmony_ci};
26205bd8deadSopenharmony_ci
26215bd8deadSopenharmony_civar calculateSize = function(sizeValue, style) {
26225bd8deadSopenharmony_ci    var x = sizeValue.number;
26235bd8deadSopenharmony_ci    if (sizeValue.unit === "ex") {
26245bd8deadSopenharmony_ci        x *= style.metrics.emPerEx;
26255bd8deadSopenharmony_ci    } else if (sizeValue.unit === "mu") {
26265bd8deadSopenharmony_ci        x /= 18;
26275bd8deadSopenharmony_ci    }
26285bd8deadSopenharmony_ci    return x;
26295bd8deadSopenharmony_ci};
26305bd8deadSopenharmony_ci
26315bd8deadSopenharmony_cigroupTypes.array = function(group, options) {
26325bd8deadSopenharmony_ci    var r;
26335bd8deadSopenharmony_ci    var c;
26345bd8deadSopenharmony_ci    var nr = group.value.body.length;
26355bd8deadSopenharmony_ci    var nc = 0;
26365bd8deadSopenharmony_ci    var body = new Array(nr);
26375bd8deadSopenharmony_ci
26385bd8deadSopenharmony_ci    var style = options.style;
26395bd8deadSopenharmony_ci
26405bd8deadSopenharmony_ci    // Horizontal spacing
26415bd8deadSopenharmony_ci    var pt = 1 / fontMetrics.metrics.ptPerEm;
26425bd8deadSopenharmony_ci    var arraycolsep = 5 * pt; // \arraycolsep in article.cls
26435bd8deadSopenharmony_ci
26445bd8deadSopenharmony_ci    // Vertical spacing
26455bd8deadSopenharmony_ci    var baselineskip = 12 * pt; // see size10.clo
26465bd8deadSopenharmony_ci    // Default \arraystretch from lttab.dtx
26475bd8deadSopenharmony_ci    // TODO(gagern): may get redefined once we have user-defined macros
26485bd8deadSopenharmony_ci    var arraystretch = utils.deflt(group.value.arraystretch, 1);
26495bd8deadSopenharmony_ci    var arrayskip = arraystretch * baselineskip;
26505bd8deadSopenharmony_ci    var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and
26515bd8deadSopenharmony_ci    var arstrutDepth = 0.3 * arrayskip;  // \@arstrutbox in lttab.dtx
26525bd8deadSopenharmony_ci
26535bd8deadSopenharmony_ci    var totalHeight = 0;
26545bd8deadSopenharmony_ci    for (r = 0; r < group.value.body.length; ++r) {
26555bd8deadSopenharmony_ci        var inrow = group.value.body[r];
26565bd8deadSopenharmony_ci        var height = arstrutHeight; // \@array adds an \@arstrut
26575bd8deadSopenharmony_ci        var depth = arstrutDepth;   // to each tow (via the template)
26585bd8deadSopenharmony_ci
26595bd8deadSopenharmony_ci        if (nc < inrow.length) {
26605bd8deadSopenharmony_ci            nc = inrow.length;
26615bd8deadSopenharmony_ci        }
26625bd8deadSopenharmony_ci
26635bd8deadSopenharmony_ci        var outrow = new Array(inrow.length);
26645bd8deadSopenharmony_ci        for (c = 0; c < inrow.length; ++c) {
26655bd8deadSopenharmony_ci            var elt = buildGroup(inrow[c], options);
26665bd8deadSopenharmony_ci            if (depth < elt.depth) {
26675bd8deadSopenharmony_ci                depth = elt.depth;
26685bd8deadSopenharmony_ci            }
26695bd8deadSopenharmony_ci            if (height < elt.height) {
26705bd8deadSopenharmony_ci                height = elt.height;
26715bd8deadSopenharmony_ci            }
26725bd8deadSopenharmony_ci            outrow[c] = elt;
26735bd8deadSopenharmony_ci        }
26745bd8deadSopenharmony_ci
26755bd8deadSopenharmony_ci        var gap = 0;
26765bd8deadSopenharmony_ci        if (group.value.rowGaps[r]) {
26775bd8deadSopenharmony_ci            gap = calculateSize(group.value.rowGaps[r].value, style);
26785bd8deadSopenharmony_ci            if (gap > 0) { // \@argarraycr
26795bd8deadSopenharmony_ci                gap += arstrutDepth;
26805bd8deadSopenharmony_ci                if (depth < gap) {
26815bd8deadSopenharmony_ci                    depth = gap; // \@xargarraycr
26825bd8deadSopenharmony_ci                }
26835bd8deadSopenharmony_ci                gap = 0;
26845bd8deadSopenharmony_ci            }
26855bd8deadSopenharmony_ci        }
26865bd8deadSopenharmony_ci
26875bd8deadSopenharmony_ci        outrow.height = height;
26885bd8deadSopenharmony_ci        outrow.depth = depth;
26895bd8deadSopenharmony_ci        totalHeight += height;
26905bd8deadSopenharmony_ci        outrow.pos = totalHeight;
26915bd8deadSopenharmony_ci        totalHeight += depth + gap; // \@yargarraycr
26925bd8deadSopenharmony_ci        body[r] = outrow;
26935bd8deadSopenharmony_ci    }
26945bd8deadSopenharmony_ci
26955bd8deadSopenharmony_ci    var offset = totalHeight / 2 + style.metrics.axisHeight;
26965bd8deadSopenharmony_ci    var colDescriptions = group.value.cols || [];
26975bd8deadSopenharmony_ci    var cols = [];
26985bd8deadSopenharmony_ci    var colSep;
26995bd8deadSopenharmony_ci    var colDescrNum;
27005bd8deadSopenharmony_ci    for (c = 0, colDescrNum = 0;
27015bd8deadSopenharmony_ci         // Continue while either there are more columns or more column
27025bd8deadSopenharmony_ci         // descriptions, so trailing separators don't get lost.
27035bd8deadSopenharmony_ci         c < nc || colDescrNum < colDescriptions.length;
27045bd8deadSopenharmony_ci         ++c, ++colDescrNum) {
27055bd8deadSopenharmony_ci
27065bd8deadSopenharmony_ci        var colDescr = colDescriptions[colDescrNum] || {};
27075bd8deadSopenharmony_ci
27085bd8deadSopenharmony_ci        var firstSeparator = true;
27095bd8deadSopenharmony_ci        while (colDescr.type === "separator") {
27105bd8deadSopenharmony_ci            // If there is more than one separator in a row, add a space
27115bd8deadSopenharmony_ci            // between them.
27125bd8deadSopenharmony_ci            if (!firstSeparator) {
27135bd8deadSopenharmony_ci                colSep = makeSpan(["arraycolsep"], []);
27145bd8deadSopenharmony_ci                colSep.style.width =
27155bd8deadSopenharmony_ci                    fontMetrics.metrics.doubleRuleSep + "em";
27165bd8deadSopenharmony_ci                cols.push(colSep);
27175bd8deadSopenharmony_ci            }
27185bd8deadSopenharmony_ci
27195bd8deadSopenharmony_ci            if (colDescr.separator === "|") {
27205bd8deadSopenharmony_ci                var separator = makeSpan(
27215bd8deadSopenharmony_ci                    ["vertical-separator"],
27225bd8deadSopenharmony_ci                    []);
27235bd8deadSopenharmony_ci                separator.style.height = totalHeight + "em";
27245bd8deadSopenharmony_ci                separator.style.verticalAlign =
27255bd8deadSopenharmony_ci                    -(totalHeight - offset) + "em";
27265bd8deadSopenharmony_ci
27275bd8deadSopenharmony_ci                cols.push(separator);
27285bd8deadSopenharmony_ci            } else {
27295bd8deadSopenharmony_ci                throw new ParseError(
27305bd8deadSopenharmony_ci                    "Invalid separator type: " + colDescr.separator);
27315bd8deadSopenharmony_ci            }
27325bd8deadSopenharmony_ci
27335bd8deadSopenharmony_ci            colDescrNum++;
27345bd8deadSopenharmony_ci            colDescr = colDescriptions[colDescrNum] || {};
27355bd8deadSopenharmony_ci            firstSeparator = false;
27365bd8deadSopenharmony_ci        }
27375bd8deadSopenharmony_ci
27385bd8deadSopenharmony_ci        if (c >= nc) {
27395bd8deadSopenharmony_ci            continue;
27405bd8deadSopenharmony_ci        }
27415bd8deadSopenharmony_ci
27425bd8deadSopenharmony_ci        var sepwidth;
27435bd8deadSopenharmony_ci        if (c > 0 || group.value.hskipBeforeAndAfter) {
27445bd8deadSopenharmony_ci            sepwidth = utils.deflt(colDescr.pregap, arraycolsep);
27455bd8deadSopenharmony_ci            if (sepwidth !== 0) {
27465bd8deadSopenharmony_ci                colSep = makeSpan(["arraycolsep"], []);
27475bd8deadSopenharmony_ci                colSep.style.width = sepwidth + "em";
27485bd8deadSopenharmony_ci                cols.push(colSep);
27495bd8deadSopenharmony_ci            }
27505bd8deadSopenharmony_ci        }
27515bd8deadSopenharmony_ci
27525bd8deadSopenharmony_ci        var col = [];
27535bd8deadSopenharmony_ci        for (r = 0; r < nr; ++r) {
27545bd8deadSopenharmony_ci            var row = body[r];
27555bd8deadSopenharmony_ci            var elem = row[c];
27565bd8deadSopenharmony_ci            if (!elem) {
27575bd8deadSopenharmony_ci                continue;
27585bd8deadSopenharmony_ci            }
27595bd8deadSopenharmony_ci            var shift = row.pos - offset;
27605bd8deadSopenharmony_ci            elem.depth = row.depth;
27615bd8deadSopenharmony_ci            elem.height = row.height;
27625bd8deadSopenharmony_ci            col.push({type: "elem", elem: elem, shift: shift});
27635bd8deadSopenharmony_ci        }
27645bd8deadSopenharmony_ci
27655bd8deadSopenharmony_ci        col = buildCommon.makeVList(col, "individualShift", null, options);
27665bd8deadSopenharmony_ci        col = makeSpan(
27675bd8deadSopenharmony_ci            ["col-align-" + (colDescr.align || "c")],
27685bd8deadSopenharmony_ci            [col]);
27695bd8deadSopenharmony_ci        cols.push(col);
27705bd8deadSopenharmony_ci
27715bd8deadSopenharmony_ci        if (c < nc - 1 || group.value.hskipBeforeAndAfter) {
27725bd8deadSopenharmony_ci            sepwidth = utils.deflt(colDescr.postgap, arraycolsep);
27735bd8deadSopenharmony_ci            if (sepwidth !== 0) {
27745bd8deadSopenharmony_ci                colSep = makeSpan(["arraycolsep"], []);
27755bd8deadSopenharmony_ci                colSep.style.width = sepwidth + "em";
27765bd8deadSopenharmony_ci                cols.push(colSep);
27775bd8deadSopenharmony_ci            }
27785bd8deadSopenharmony_ci        }
27795bd8deadSopenharmony_ci    }
27805bd8deadSopenharmony_ci    body = makeSpan(["mtable"], cols);
27815bd8deadSopenharmony_ci    return makeSpan(["mord"], [body], options);
27825bd8deadSopenharmony_ci};
27835bd8deadSopenharmony_ci
27845bd8deadSopenharmony_cigroupTypes.spacing = function(group, options) {
27855bd8deadSopenharmony_ci    if (group.value === "\\ " || group.value === "\\space" ||
27865bd8deadSopenharmony_ci        group.value === " " || group.value === "~") {
27875bd8deadSopenharmony_ci        // Spaces are generated by adding an actual space. Each of these
27885bd8deadSopenharmony_ci        // things has an entry in the symbols table, so these will be turned
27895bd8deadSopenharmony_ci        // into appropriate outputs.
27905bd8deadSopenharmony_ci        if (group.mode === "text") {
27915bd8deadSopenharmony_ci            return buildCommon.makeOrd(group, options, "textord");
27925bd8deadSopenharmony_ci        } else {
27935bd8deadSopenharmony_ci            return makeSpan(["mspace"],
27945bd8deadSopenharmony_ci                [buildCommon.mathsym(group.value, group.mode, options)],
27955bd8deadSopenharmony_ci                options);
27965bd8deadSopenharmony_ci        }
27975bd8deadSopenharmony_ci    } else {
27985bd8deadSopenharmony_ci        // Other kinds of spaces are of arbitrary width. We use CSS to
27995bd8deadSopenharmony_ci        // generate these.
28005bd8deadSopenharmony_ci        return makeSpan(
28015bd8deadSopenharmony_ci            ["mspace",
28025bd8deadSopenharmony_ci                buildCommon.spacingFunctions[group.value].className],
28035bd8deadSopenharmony_ci            [], options);
28045bd8deadSopenharmony_ci    }
28055bd8deadSopenharmony_ci};
28065bd8deadSopenharmony_ci
28075bd8deadSopenharmony_cigroupTypes.llap = function(group, options) {
28085bd8deadSopenharmony_ci    var inner = makeSpan(
28095bd8deadSopenharmony_ci        ["inner"], [buildGroup(group.value.body, options.reset())]);
28105bd8deadSopenharmony_ci    var fix = makeSpan(["fix"], []);
28115bd8deadSopenharmony_ci    return makeSpan(
28125bd8deadSopenharmony_ci        ["mord", "llap", options.style.cls()], [inner, fix], options);
28135bd8deadSopenharmony_ci};
28145bd8deadSopenharmony_ci
28155bd8deadSopenharmony_cigroupTypes.rlap = function(group, options) {
28165bd8deadSopenharmony_ci    var inner = makeSpan(
28175bd8deadSopenharmony_ci        ["inner"], [buildGroup(group.value.body, options.reset())]);
28185bd8deadSopenharmony_ci    var fix = makeSpan(["fix"], []);
28195bd8deadSopenharmony_ci    return makeSpan(
28205bd8deadSopenharmony_ci        ["mord", "rlap", options.style.cls()], [inner, fix], options);
28215bd8deadSopenharmony_ci};
28225bd8deadSopenharmony_ci
28235bd8deadSopenharmony_cigroupTypes.op = function(group, options) {
28245bd8deadSopenharmony_ci    // Operators are handled in the TeXbook pg. 443-444, rule 13(a).
28255bd8deadSopenharmony_ci    var supGroup;
28265bd8deadSopenharmony_ci    var subGroup;
28275bd8deadSopenharmony_ci    var hasLimits = false;
28285bd8deadSopenharmony_ci    if (group.type === "supsub") {
28295bd8deadSopenharmony_ci        // If we have limits, supsub will pass us its group to handle. Pull
28305bd8deadSopenharmony_ci        // out the superscript and subscript and set the group to the op in
28315bd8deadSopenharmony_ci        // its base.
28325bd8deadSopenharmony_ci        supGroup = group.value.sup;
28335bd8deadSopenharmony_ci        subGroup = group.value.sub;
28345bd8deadSopenharmony_ci        group = group.value.base;
28355bd8deadSopenharmony_ci        hasLimits = true;
28365bd8deadSopenharmony_ci    }
28375bd8deadSopenharmony_ci
28385bd8deadSopenharmony_ci    var style = options.style;
28395bd8deadSopenharmony_ci
28405bd8deadSopenharmony_ci    // Most operators have a large successor symbol, but these don't.
28415bd8deadSopenharmony_ci    var noSuccessor = [
28425bd8deadSopenharmony_ci        "\\smallint"
28435bd8deadSopenharmony_ci    ];
28445bd8deadSopenharmony_ci
28455bd8deadSopenharmony_ci    var large = false;
28465bd8deadSopenharmony_ci    if (style.size === Style.DISPLAY.size &&
28475bd8deadSopenharmony_ci        group.value.symbol &&
28485bd8deadSopenharmony_ci        !utils.contains(noSuccessor, group.value.body)) {
28495bd8deadSopenharmony_ci
28505bd8deadSopenharmony_ci        // Most symbol operators get larger in displaystyle (rule 13)
28515bd8deadSopenharmony_ci        large = true;
28525bd8deadSopenharmony_ci    }
28535bd8deadSopenharmony_ci
28545bd8deadSopenharmony_ci    var base;
28555bd8deadSopenharmony_ci    var baseShift = 0;
28565bd8deadSopenharmony_ci    var slant = 0;
28575bd8deadSopenharmony_ci    if (group.value.symbol) {
28585bd8deadSopenharmony_ci        // If this is a symbol, create the symbol.
28595bd8deadSopenharmony_ci        var fontName = large ? "Size2-Regular" : "Size1-Regular";
28605bd8deadSopenharmony_ci        base = buildCommon.makeSymbol(
28615bd8deadSopenharmony_ci            group.value.body, fontName, "math", options,
28625bd8deadSopenharmony_ci            ["mop", "op-symbol", large ? "large-op" : "small-op"]);
28635bd8deadSopenharmony_ci
28645bd8deadSopenharmony_ci        // Shift the symbol so its center lies on the axis (rule 13). It
28655bd8deadSopenharmony_ci        // appears that our fonts have the centers of the symbols already
28665bd8deadSopenharmony_ci        // almost on the axis, so these numbers are very small. Note we
28675bd8deadSopenharmony_ci        // don't actually apply this here, but instead it is used either in
28685bd8deadSopenharmony_ci        // the vlist creation or separately when there are no limits.
28695bd8deadSopenharmony_ci        baseShift = (base.height - base.depth) / 2 -
28705bd8deadSopenharmony_ci            style.metrics.axisHeight * style.sizeMultiplier;
28715bd8deadSopenharmony_ci
28725bd8deadSopenharmony_ci        // The slant of the symbol is just its italic correction.
28735bd8deadSopenharmony_ci        slant = base.italic;
28745bd8deadSopenharmony_ci    } else if (group.value.value) {
28755bd8deadSopenharmony_ci        // If this is a list, compose that list.
28765bd8deadSopenharmony_ci        var inner = buildExpression(group.value.value, options, true);
28775bd8deadSopenharmony_ci
28785bd8deadSopenharmony_ci        base = makeSpan(["mop"], inner, options);
28795bd8deadSopenharmony_ci    } else {
28805bd8deadSopenharmony_ci        // Otherwise, this is a text operator. Build the text from the
28815bd8deadSopenharmony_ci        // operator's name.
28825bd8deadSopenharmony_ci        // TODO(emily): Add a space in the middle of some of these
28835bd8deadSopenharmony_ci        // operators, like \limsup
28845bd8deadSopenharmony_ci        var output = [];
28855bd8deadSopenharmony_ci        for (var i = 1; i < group.value.body.length; i++) {
28865bd8deadSopenharmony_ci            output.push(buildCommon.mathsym(group.value.body[i], group.mode));
28875bd8deadSopenharmony_ci        }
28885bd8deadSopenharmony_ci        base = makeSpan(["mop"], output, options);
28895bd8deadSopenharmony_ci    }
28905bd8deadSopenharmony_ci
28915bd8deadSopenharmony_ci    if (hasLimits) {
28925bd8deadSopenharmony_ci        // IE 8 clips \int if it is in a display: inline-block. We wrap it
28935bd8deadSopenharmony_ci        // in a new span so it is an inline, and works.
28945bd8deadSopenharmony_ci        base = makeSpan([], [base]);
28955bd8deadSopenharmony_ci
28965bd8deadSopenharmony_ci        var supmid;
28975bd8deadSopenharmony_ci        var supKern;
28985bd8deadSopenharmony_ci        var submid;
28995bd8deadSopenharmony_ci        var subKern;
29005bd8deadSopenharmony_ci        var newOptions;
29015bd8deadSopenharmony_ci        // We manually have to handle the superscripts and subscripts. This,
29025bd8deadSopenharmony_ci        // aside from the kern calculations, is copied from supsub.
29035bd8deadSopenharmony_ci        if (supGroup) {
29045bd8deadSopenharmony_ci            newOptions = options.withStyle(style.sup());
29055bd8deadSopenharmony_ci            var sup = buildGroup(supGroup, newOptions);
29065bd8deadSopenharmony_ci            supmid = makeSpan([style.reset(), style.sup().cls()],
29075bd8deadSopenharmony_ci                [sup], newOptions);
29085bd8deadSopenharmony_ci
29095bd8deadSopenharmony_ci            supKern = Math.max(
29105bd8deadSopenharmony_ci                fontMetrics.metrics.bigOpSpacing1,
29115bd8deadSopenharmony_ci                fontMetrics.metrics.bigOpSpacing3 - sup.depth);
29125bd8deadSopenharmony_ci        }
29135bd8deadSopenharmony_ci
29145bd8deadSopenharmony_ci        if (subGroup) {
29155bd8deadSopenharmony_ci            newOptions = options.withStyle(style.sub());
29165bd8deadSopenharmony_ci            var sub = buildGroup(subGroup, newOptions);
29175bd8deadSopenharmony_ci            submid = makeSpan([style.reset(), style.sub().cls()],
29185bd8deadSopenharmony_ci                [sub], newOptions);
29195bd8deadSopenharmony_ci
29205bd8deadSopenharmony_ci            subKern = Math.max(
29215bd8deadSopenharmony_ci                fontMetrics.metrics.bigOpSpacing2,
29225bd8deadSopenharmony_ci                fontMetrics.metrics.bigOpSpacing4 - sub.height);
29235bd8deadSopenharmony_ci        }
29245bd8deadSopenharmony_ci
29255bd8deadSopenharmony_ci        // Build the final group as a vlist of the possible subscript, base,
29265bd8deadSopenharmony_ci        // and possible superscript.
29275bd8deadSopenharmony_ci        var finalGroup;
29285bd8deadSopenharmony_ci        var top;
29295bd8deadSopenharmony_ci        var bottom;
29305bd8deadSopenharmony_ci        if (!supGroup) {
29315bd8deadSopenharmony_ci            top = base.height - baseShift;
29325bd8deadSopenharmony_ci
29335bd8deadSopenharmony_ci            finalGroup = buildCommon.makeVList([
29345bd8deadSopenharmony_ci                {type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
29355bd8deadSopenharmony_ci                {type: "elem", elem: submid},
29365bd8deadSopenharmony_ci                {type: "kern", size: subKern},
29375bd8deadSopenharmony_ci                {type: "elem", elem: base}
29385bd8deadSopenharmony_ci            ], "top", top, options);
29395bd8deadSopenharmony_ci
29405bd8deadSopenharmony_ci            // Here, we shift the limits by the slant of the symbol. Note
29415bd8deadSopenharmony_ci            // that we are supposed to shift the limits by 1/2 of the slant,
29425bd8deadSopenharmony_ci            // but since we are centering the limits adding a full slant of
29435bd8deadSopenharmony_ci            // margin will shift by 1/2 that.
29445bd8deadSopenharmony_ci            finalGroup.children[0].style.marginLeft = -slant + "em";
29455bd8deadSopenharmony_ci        } else if (!subGroup) {
29465bd8deadSopenharmony_ci            bottom = base.depth + baseShift;
29475bd8deadSopenharmony_ci
29485bd8deadSopenharmony_ci            finalGroup = buildCommon.makeVList([
29495bd8deadSopenharmony_ci                {type: "elem", elem: base},
29505bd8deadSopenharmony_ci                {type: "kern", size: supKern},
29515bd8deadSopenharmony_ci                {type: "elem", elem: supmid},
29525bd8deadSopenharmony_ci                {type: "kern", size: fontMetrics.metrics.bigOpSpacing5}
29535bd8deadSopenharmony_ci            ], "bottom", bottom, options);
29545bd8deadSopenharmony_ci
29555bd8deadSopenharmony_ci            // See comment above about slants
29565bd8deadSopenharmony_ci            finalGroup.children[1].style.marginLeft = slant + "em";
29575bd8deadSopenharmony_ci        } else if (!supGroup && !subGroup) {
29585bd8deadSopenharmony_ci            // This case probably shouldn't occur (this would mean the
29595bd8deadSopenharmony_ci            // supsub was sending us a group with no superscript or
29605bd8deadSopenharmony_ci            // subscript) but be safe.
29615bd8deadSopenharmony_ci            return base;
29625bd8deadSopenharmony_ci        } else {
29635bd8deadSopenharmony_ci            bottom = fontMetrics.metrics.bigOpSpacing5 +
29645bd8deadSopenharmony_ci                submid.height + submid.depth +
29655bd8deadSopenharmony_ci                subKern +
29665bd8deadSopenharmony_ci                base.depth + baseShift;
29675bd8deadSopenharmony_ci
29685bd8deadSopenharmony_ci            finalGroup = buildCommon.makeVList([
29695bd8deadSopenharmony_ci                {type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
29705bd8deadSopenharmony_ci                {type: "elem", elem: submid},
29715bd8deadSopenharmony_ci                {type: "kern", size: subKern},
29725bd8deadSopenharmony_ci                {type: "elem", elem: base},
29735bd8deadSopenharmony_ci                {type: "kern", size: supKern},
29745bd8deadSopenharmony_ci                {type: "elem", elem: supmid},
29755bd8deadSopenharmony_ci                {type: "kern", size: fontMetrics.metrics.bigOpSpacing5}
29765bd8deadSopenharmony_ci            ], "bottom", bottom, options);
29775bd8deadSopenharmony_ci
29785bd8deadSopenharmony_ci            // See comment above about slants
29795bd8deadSopenharmony_ci            finalGroup.children[0].style.marginLeft = -slant + "em";
29805bd8deadSopenharmony_ci            finalGroup.children[2].style.marginLeft = slant + "em";
29815bd8deadSopenharmony_ci        }
29825bd8deadSopenharmony_ci
29835bd8deadSopenharmony_ci        return makeSpan(["mop", "op-limits"], [finalGroup], options);
29845bd8deadSopenharmony_ci    } else {
29855bd8deadSopenharmony_ci        if (group.value.symbol) {
29865bd8deadSopenharmony_ci            base.style.top = baseShift + "em";
29875bd8deadSopenharmony_ci        }
29885bd8deadSopenharmony_ci
29895bd8deadSopenharmony_ci        return base;
29905bd8deadSopenharmony_ci    }
29915bd8deadSopenharmony_ci};
29925bd8deadSopenharmony_ci
29935bd8deadSopenharmony_cigroupTypes.mod = function(group, options) {
29945bd8deadSopenharmony_ci    var inner = [];
29955bd8deadSopenharmony_ci
29965bd8deadSopenharmony_ci    if (group.value.modType === "bmod") {
29975bd8deadSopenharmony_ci        // “\nonscript\mskip-\medmuskip\mkern5mu”
29985bd8deadSopenharmony_ci        if (!options.style.isTight()) {
29995bd8deadSopenharmony_ci            inner.push(makeSpan(
30005bd8deadSopenharmony_ci                ["mspace", "negativemediumspace"], [], options));
30015bd8deadSopenharmony_ci        }
30025bd8deadSopenharmony_ci        inner.push(makeSpan(["mspace", "thickspace"], [], options));
30035bd8deadSopenharmony_ci    } else if (options.style.size === Style.DISPLAY.size) {
30045bd8deadSopenharmony_ci        inner.push(makeSpan(["mspace", "quad"], [], options));
30055bd8deadSopenharmony_ci    } else if (group.value.modType === "mod") {
30065bd8deadSopenharmony_ci        inner.push(makeSpan(["mspace", "twelvemuspace"], [], options));
30075bd8deadSopenharmony_ci    } else {
30085bd8deadSopenharmony_ci        inner.push(makeSpan(["mspace", "eightmuspace"], [], options));
30095bd8deadSopenharmony_ci    }
30105bd8deadSopenharmony_ci
30115bd8deadSopenharmony_ci    if (group.value.modType === "pod" || group.value.modType === "pmod") {
30125bd8deadSopenharmony_ci        inner.push(buildCommon.mathsym("(", group.mode));
30135bd8deadSopenharmony_ci    }
30145bd8deadSopenharmony_ci
30155bd8deadSopenharmony_ci    if (group.value.modType !== "pod") {
30165bd8deadSopenharmony_ci        var modInner = [
30175bd8deadSopenharmony_ci            buildCommon.mathsym("m", group.mode),
30185bd8deadSopenharmony_ci            buildCommon.mathsym("o", group.mode),
30195bd8deadSopenharmony_ci            buildCommon.mathsym("d", group.mode)];
30205bd8deadSopenharmony_ci        if (group.value.modType === "bmod") {
30215bd8deadSopenharmony_ci            inner.push(makeSpan(["mbin"], modInner, options));
30225bd8deadSopenharmony_ci            // “\mkern5mu\nonscript\mskip-\medmuskip”
30235bd8deadSopenharmony_ci            inner.push(makeSpan(["mspace", "thickspace"], [], options));
30245bd8deadSopenharmony_ci            if (!options.style.isTight()) {
30255bd8deadSopenharmony_ci                inner.push(makeSpan(
30265bd8deadSopenharmony_ci                    ["mspace", "negativemediumspace"], [], options));
30275bd8deadSopenharmony_ci            }
30285bd8deadSopenharmony_ci        } else {
30295bd8deadSopenharmony_ci            Array.prototype.push.apply(inner, modInner);
30305bd8deadSopenharmony_ci            inner.push(makeSpan(["mspace", "sixmuspace"], [], options));
30315bd8deadSopenharmony_ci        }
30325bd8deadSopenharmony_ci    }
30335bd8deadSopenharmony_ci
30345bd8deadSopenharmony_ci    if (group.value.value) {
30355bd8deadSopenharmony_ci        Array.prototype.push.apply(inner,
30365bd8deadSopenharmony_ci            buildExpression(group.value.value, options, false));
30375bd8deadSopenharmony_ci    }
30385bd8deadSopenharmony_ci
30395bd8deadSopenharmony_ci    if (group.value.modType === "pod" || group.value.modType === "pmod") {
30405bd8deadSopenharmony_ci        inner.push(buildCommon.mathsym(")", group.mode));
30415bd8deadSopenharmony_ci    }
30425bd8deadSopenharmony_ci
30435bd8deadSopenharmony_ci    return buildCommon.makeFragment(inner);
30445bd8deadSopenharmony_ci};
30455bd8deadSopenharmony_ci
30465bd8deadSopenharmony_cigroupTypes.katex = function(group, options) {
30475bd8deadSopenharmony_ci    // The KaTeX logo. The offsets for the K and a were chosen to look
30485bd8deadSopenharmony_ci    // good, but the offsets for the T, E, and X were taken from the
30495bd8deadSopenharmony_ci    // definition of \TeX in TeX (see TeXbook pg. 356)
30505bd8deadSopenharmony_ci    var k = makeSpan(
30515bd8deadSopenharmony_ci        ["k"], [buildCommon.mathsym("K", group.mode)], options);
30525bd8deadSopenharmony_ci    var a = makeSpan(
30535bd8deadSopenharmony_ci        ["a"], [buildCommon.mathsym("A", group.mode)], options);
30545bd8deadSopenharmony_ci
30555bd8deadSopenharmony_ci    a.height = (a.height + 0.2) * 0.75;
30565bd8deadSopenharmony_ci    a.depth = (a.height - 0.2) * 0.75;
30575bd8deadSopenharmony_ci
30585bd8deadSopenharmony_ci    var t = makeSpan(
30595bd8deadSopenharmony_ci        ["t"], [buildCommon.mathsym("T", group.mode)], options);
30605bd8deadSopenharmony_ci    var e = makeSpan(
30615bd8deadSopenharmony_ci        ["e"], [buildCommon.mathsym("E", group.mode)], options);
30625bd8deadSopenharmony_ci
30635bd8deadSopenharmony_ci    e.height = (e.height - 0.2155);
30645bd8deadSopenharmony_ci    e.depth = (e.depth + 0.2155);
30655bd8deadSopenharmony_ci
30665bd8deadSopenharmony_ci    var x = makeSpan(
30675bd8deadSopenharmony_ci        ["x"], [buildCommon.mathsym("X", group.mode)], options);
30685bd8deadSopenharmony_ci
30695bd8deadSopenharmony_ci    return makeSpan(
30705bd8deadSopenharmony_ci        ["mord", "katex-logo"], [k, a, t, e, x], options);
30715bd8deadSopenharmony_ci};
30725bd8deadSopenharmony_ci
30735bd8deadSopenharmony_cigroupTypes.overline = function(group, options) {
30745bd8deadSopenharmony_ci    // Overlines are handled in the TeXbook pg 443, Rule 9.
30755bd8deadSopenharmony_ci    var style = options.style;
30765bd8deadSopenharmony_ci
30775bd8deadSopenharmony_ci    // Build the inner group in the cramped style.
30785bd8deadSopenharmony_ci    var innerGroup = buildGroup(group.value.body,
30795bd8deadSopenharmony_ci            options.withStyle(style.cramp()));
30805bd8deadSopenharmony_ci
30815bd8deadSopenharmony_ci    var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
30825bd8deadSopenharmony_ci        style.sizeMultiplier;
30835bd8deadSopenharmony_ci
30845bd8deadSopenharmony_ci    // Create the line above the body
30855bd8deadSopenharmony_ci    var line = makeSpan(
30865bd8deadSopenharmony_ci        [style.reset(), Style.TEXT.cls(), "overline-line"]);
30875bd8deadSopenharmony_ci    line.height = ruleWidth;
30885bd8deadSopenharmony_ci    line.maxFontSize = 1.0;
30895bd8deadSopenharmony_ci
30905bd8deadSopenharmony_ci    // Generate the vlist, with the appropriate kerns
30915bd8deadSopenharmony_ci    var vlist = buildCommon.makeVList([
30925bd8deadSopenharmony_ci        {type: "elem", elem: innerGroup},
30935bd8deadSopenharmony_ci        {type: "kern", size: 3 * ruleWidth},
30945bd8deadSopenharmony_ci        {type: "elem", elem: line},
30955bd8deadSopenharmony_ci        {type: "kern", size: ruleWidth}
30965bd8deadSopenharmony_ci    ], "firstBaseline", null, options);
30975bd8deadSopenharmony_ci
30985bd8deadSopenharmony_ci    return makeSpan(["mord", "overline"], [vlist], options);
30995bd8deadSopenharmony_ci};
31005bd8deadSopenharmony_ci
31015bd8deadSopenharmony_cigroupTypes.underline = function(group, options) {
31025bd8deadSopenharmony_ci    // Underlines are handled in the TeXbook pg 443, Rule 10.
31035bd8deadSopenharmony_ci    var style = options.style;
31045bd8deadSopenharmony_ci
31055bd8deadSopenharmony_ci    // Build the inner group.
31065bd8deadSopenharmony_ci    var innerGroup = buildGroup(group.value.body, options);
31075bd8deadSopenharmony_ci
31085bd8deadSopenharmony_ci    var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
31095bd8deadSopenharmony_ci        style.sizeMultiplier;
31105bd8deadSopenharmony_ci
31115bd8deadSopenharmony_ci    // Create the line above the body
31125bd8deadSopenharmony_ci    var line = makeSpan([style.reset(), Style.TEXT.cls(), "underline-line"]);
31135bd8deadSopenharmony_ci    line.height = ruleWidth;
31145bd8deadSopenharmony_ci    line.maxFontSize = 1.0;
31155bd8deadSopenharmony_ci
31165bd8deadSopenharmony_ci    // Generate the vlist, with the appropriate kerns
31175bd8deadSopenharmony_ci    var vlist = buildCommon.makeVList([
31185bd8deadSopenharmony_ci        {type: "kern", size: ruleWidth},
31195bd8deadSopenharmony_ci        {type: "elem", elem: line},
31205bd8deadSopenharmony_ci        {type: "kern", size: 3 * ruleWidth},
31215bd8deadSopenharmony_ci        {type: "elem", elem: innerGroup}
31225bd8deadSopenharmony_ci    ], "top", innerGroup.height, options);
31235bd8deadSopenharmony_ci
31245bd8deadSopenharmony_ci    return makeSpan(["mord", "underline"], [vlist], options);
31255bd8deadSopenharmony_ci};
31265bd8deadSopenharmony_ci
31275bd8deadSopenharmony_cigroupTypes.sqrt = function(group, options) {
31285bd8deadSopenharmony_ci    // Square roots are handled in the TeXbook pg. 443, Rule 11.
31295bd8deadSopenharmony_ci    var style = options.style;
31305bd8deadSopenharmony_ci
31315bd8deadSopenharmony_ci    // First, we do the same steps as in overline to build the inner group
31325bd8deadSopenharmony_ci    // and line
31335bd8deadSopenharmony_ci    var inner = buildGroup(group.value.body, options.withStyle(style.cramp()));
31345bd8deadSopenharmony_ci
31355bd8deadSopenharmony_ci    var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
31365bd8deadSopenharmony_ci        style.sizeMultiplier;
31375bd8deadSopenharmony_ci
31385bd8deadSopenharmony_ci    var line = makeSpan(
31395bd8deadSopenharmony_ci        [style.reset(), Style.TEXT.cls(), "sqrt-line"], [],
31405bd8deadSopenharmony_ci        options);
31415bd8deadSopenharmony_ci    line.height = ruleWidth;
31425bd8deadSopenharmony_ci    line.maxFontSize = 1.0;
31435bd8deadSopenharmony_ci
31445bd8deadSopenharmony_ci    var phi = ruleWidth;
31455bd8deadSopenharmony_ci    if (style.id < Style.TEXT.id) {
31465bd8deadSopenharmony_ci        phi = style.metrics.xHeight;
31475bd8deadSopenharmony_ci    }
31485bd8deadSopenharmony_ci
31495bd8deadSopenharmony_ci    // Calculate the clearance between the body and line
31505bd8deadSopenharmony_ci    var lineClearance = ruleWidth + phi / 4;
31515bd8deadSopenharmony_ci
31525bd8deadSopenharmony_ci    var innerHeight = (inner.height + inner.depth) * style.sizeMultiplier;
31535bd8deadSopenharmony_ci    var minDelimiterHeight = innerHeight + lineClearance + ruleWidth;
31545bd8deadSopenharmony_ci
31555bd8deadSopenharmony_ci    // Create a \surd delimiter of the required minimum size
31565bd8deadSopenharmony_ci    var delim = makeSpan(["sqrt-sign"], [
31575bd8deadSopenharmony_ci        delimiter.customSizedDelim("\\surd", minDelimiterHeight,
31585bd8deadSopenharmony_ci                                   false, options, group.mode)],
31595bd8deadSopenharmony_ci                         options);
31605bd8deadSopenharmony_ci
31615bd8deadSopenharmony_ci    var delimDepth = (delim.height + delim.depth) - ruleWidth;
31625bd8deadSopenharmony_ci
31635bd8deadSopenharmony_ci    // Adjust the clearance based on the delimiter size
31645bd8deadSopenharmony_ci    if (delimDepth > inner.height + inner.depth + lineClearance) {
31655bd8deadSopenharmony_ci        lineClearance =
31665bd8deadSopenharmony_ci            (lineClearance + delimDepth - inner.height - inner.depth) / 2;
31675bd8deadSopenharmony_ci    }
31685bd8deadSopenharmony_ci
31695bd8deadSopenharmony_ci    // Shift the delimiter so that its top lines up with the top of the line
31705bd8deadSopenharmony_ci    var delimShift = -(inner.height + lineClearance + ruleWidth) + delim.height;
31715bd8deadSopenharmony_ci    delim.style.top = delimShift + "em";
31725bd8deadSopenharmony_ci    delim.height -= delimShift;
31735bd8deadSopenharmony_ci    delim.depth += delimShift;
31745bd8deadSopenharmony_ci
31755bd8deadSopenharmony_ci    // We add a special case here, because even when `inner` is empty, we
31765bd8deadSopenharmony_ci    // still get a line. So, we use a simple heuristic to decide if we
31775bd8deadSopenharmony_ci    // should omit the body entirely. (note this doesn't work for something
31785bd8deadSopenharmony_ci    // like `\sqrt{\rlap{x}}`, but if someone is doing that they deserve for
31795bd8deadSopenharmony_ci    // it not to work.
31805bd8deadSopenharmony_ci    var body;
31815bd8deadSopenharmony_ci    if (inner.height === 0 && inner.depth === 0) {
31825bd8deadSopenharmony_ci        body = makeSpan();
31835bd8deadSopenharmony_ci    } else {
31845bd8deadSopenharmony_ci        body = buildCommon.makeVList([
31855bd8deadSopenharmony_ci            {type: "elem", elem: inner},
31865bd8deadSopenharmony_ci            {type: "kern", size: lineClearance},
31875bd8deadSopenharmony_ci            {type: "elem", elem: line},
31885bd8deadSopenharmony_ci            {type: "kern", size: ruleWidth}
31895bd8deadSopenharmony_ci        ], "firstBaseline", null, options);
31905bd8deadSopenharmony_ci    }
31915bd8deadSopenharmony_ci
31925bd8deadSopenharmony_ci    if (!group.value.index) {
31935bd8deadSopenharmony_ci        return makeSpan(["mord", "sqrt"], [delim, body], options);
31945bd8deadSopenharmony_ci    } else {
31955bd8deadSopenharmony_ci        // Handle the optional root index
31965bd8deadSopenharmony_ci
31975bd8deadSopenharmony_ci        // The index is always in scriptscript style
31985bd8deadSopenharmony_ci        var newOptions = options.withStyle(Style.SCRIPTSCRIPT);
31995bd8deadSopenharmony_ci        var root = buildGroup(group.value.index, newOptions);
32005bd8deadSopenharmony_ci        var rootWrap = makeSpan(
32015bd8deadSopenharmony_ci            [style.reset(), Style.SCRIPTSCRIPT.cls()],
32025bd8deadSopenharmony_ci            [root],
32035bd8deadSopenharmony_ci            newOptions);
32045bd8deadSopenharmony_ci
32055bd8deadSopenharmony_ci        // Figure out the height and depth of the inner part
32065bd8deadSopenharmony_ci        var innerRootHeight = Math.max(delim.height, body.height);
32075bd8deadSopenharmony_ci        var innerRootDepth = Math.max(delim.depth, body.depth);
32085bd8deadSopenharmony_ci
32095bd8deadSopenharmony_ci        // The amount the index is shifted by. This is taken from the TeX
32105bd8deadSopenharmony_ci        // source, in the definition of `\r@@t`.
32115bd8deadSopenharmony_ci        var toShift = 0.6 * (innerRootHeight - innerRootDepth);
32125bd8deadSopenharmony_ci
32135bd8deadSopenharmony_ci        // Build a VList with the superscript shifted up correctly
32145bd8deadSopenharmony_ci        var rootVList = buildCommon.makeVList(
32155bd8deadSopenharmony_ci            [{type: "elem", elem: rootWrap}],
32165bd8deadSopenharmony_ci            "shift", -toShift, options);
32175bd8deadSopenharmony_ci        // Add a class surrounding it so we can add on the appropriate
32185bd8deadSopenharmony_ci        // kerning
32195bd8deadSopenharmony_ci        var rootVListWrap = makeSpan(["root"], [rootVList]);
32205bd8deadSopenharmony_ci
32215bd8deadSopenharmony_ci        return makeSpan(["mord", "sqrt"],
32225bd8deadSopenharmony_ci            [rootVListWrap, delim, body], options);
32235bd8deadSopenharmony_ci    }
32245bd8deadSopenharmony_ci};
32255bd8deadSopenharmony_ci
32265bd8deadSopenharmony_cigroupTypes.sizing = function(group, options) {
32275bd8deadSopenharmony_ci    // Handle sizing operators like \Huge. Real TeX doesn't actually allow
32285bd8deadSopenharmony_ci    // these functions inside of math expressions, so we do some special
32295bd8deadSopenharmony_ci    // handling.
32305bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value,
32315bd8deadSopenharmony_ci            options.withSize(group.value.size), false);
32325bd8deadSopenharmony_ci
32335bd8deadSopenharmony_ci    // Compute the correct maxFontSize.
32345bd8deadSopenharmony_ci    var style = options.style;
32355bd8deadSopenharmony_ci    var fontSize = buildCommon.sizingMultiplier[group.value.size];
32365bd8deadSopenharmony_ci    fontSize = fontSize * style.sizeMultiplier;
32375bd8deadSopenharmony_ci
32385bd8deadSopenharmony_ci    // Add size-resetting classes to the inner list and set maxFontSize
32395bd8deadSopenharmony_ci    // manually. Handle nested size changes.
32405bd8deadSopenharmony_ci    for (var i = 0; i < inner.length; i++) {
32415bd8deadSopenharmony_ci        var pos = utils.indexOf(inner[i].classes, "sizing");
32425bd8deadSopenharmony_ci        if (pos < 0) {
32435bd8deadSopenharmony_ci            inner[i].classes.push("sizing", "reset-" + options.size,
32445bd8deadSopenharmony_ci                                  group.value.size, style.cls());
32455bd8deadSopenharmony_ci            inner[i].maxFontSize = fontSize;
32465bd8deadSopenharmony_ci        } else if (inner[i].classes[pos + 1] === "reset-" + group.value.size) {
32475bd8deadSopenharmony_ci            // This is a nested size change: e.g., inner[i] is the "b" in
32485bd8deadSopenharmony_ci            // `\Huge a \small b`. Override the old size (the `reset-` class)
32495bd8deadSopenharmony_ci            // but not the new size.
32505bd8deadSopenharmony_ci            inner[i].classes[pos + 1] = "reset-" + options.size;
32515bd8deadSopenharmony_ci        }
32525bd8deadSopenharmony_ci    }
32535bd8deadSopenharmony_ci
32545bd8deadSopenharmony_ci    return buildCommon.makeFragment(inner);
32555bd8deadSopenharmony_ci};
32565bd8deadSopenharmony_ci
32575bd8deadSopenharmony_cigroupTypes.styling = function(group, options) {
32585bd8deadSopenharmony_ci    // Style changes are handled in the TeXbook on pg. 442, Rule 3.
32595bd8deadSopenharmony_ci
32605bd8deadSopenharmony_ci    // Figure out what style we're changing to.
32615bd8deadSopenharmony_ci    var styleMap = {
32625bd8deadSopenharmony_ci        "display": Style.DISPLAY,
32635bd8deadSopenharmony_ci        "text": Style.TEXT,
32645bd8deadSopenharmony_ci        "script": Style.SCRIPT,
32655bd8deadSopenharmony_ci        "scriptscript": Style.SCRIPTSCRIPT
32665bd8deadSopenharmony_ci    };
32675bd8deadSopenharmony_ci
32685bd8deadSopenharmony_ci    var newStyle = styleMap[group.value.style];
32695bd8deadSopenharmony_ci    var newOptions = options.withStyle(newStyle);
32705bd8deadSopenharmony_ci
32715bd8deadSopenharmony_ci    // Build the inner expression in the new style.
32725bd8deadSopenharmony_ci    var inner = buildExpression(
32735bd8deadSopenharmony_ci        group.value.value, newOptions, false);
32745bd8deadSopenharmony_ci
32755bd8deadSopenharmony_ci    // Add style-resetting classes to the inner list. Handle nested changes.
32765bd8deadSopenharmony_ci    for (var i = 0; i < inner.length; i++) {
32775bd8deadSopenharmony_ci        var pos = utils.indexOf(inner[i].classes, newStyle.reset());
32785bd8deadSopenharmony_ci        if (pos < 0) {
32795bd8deadSopenharmony_ci            inner[i].classes.push(options.style.reset(), newStyle.cls());
32805bd8deadSopenharmony_ci        } else {
32815bd8deadSopenharmony_ci            // This is a nested style change, as `\textstyle a\scriptstyle b`.
32825bd8deadSopenharmony_ci            // Only override the old style (the reset class).
32835bd8deadSopenharmony_ci            inner[i].classes[pos] = options.style.reset();
32845bd8deadSopenharmony_ci        }
32855bd8deadSopenharmony_ci    }
32865bd8deadSopenharmony_ci
32875bd8deadSopenharmony_ci    return new buildCommon.makeFragment(inner);
32885bd8deadSopenharmony_ci};
32895bd8deadSopenharmony_ci
32905bd8deadSopenharmony_cigroupTypes.font = function(group, options) {
32915bd8deadSopenharmony_ci    var font = group.value.font;
32925bd8deadSopenharmony_ci    return buildGroup(group.value.body, options.withFont(font));
32935bd8deadSopenharmony_ci};
32945bd8deadSopenharmony_ci
32955bd8deadSopenharmony_cigroupTypes.delimsizing = function(group, options) {
32965bd8deadSopenharmony_ci    var delim = group.value.value;
32975bd8deadSopenharmony_ci
32985bd8deadSopenharmony_ci    if (delim === ".") {
32995bd8deadSopenharmony_ci        // Empty delimiters still count as elements, even though they don't
33005bd8deadSopenharmony_ci        // show anything.
33015bd8deadSopenharmony_ci        return makeSpan([group.value.mclass]);
33025bd8deadSopenharmony_ci    }
33035bd8deadSopenharmony_ci
33045bd8deadSopenharmony_ci    // Use delimiter.sizedDelim to generate the delimiter.
33055bd8deadSopenharmony_ci    return delimiter.sizedDelim(
33065bd8deadSopenharmony_ci            delim, group.value.size, options, group.mode,
33075bd8deadSopenharmony_ci            [group.value.mclass]);
33085bd8deadSopenharmony_ci};
33095bd8deadSopenharmony_ci
33105bd8deadSopenharmony_cigroupTypes.leftright = function(group, options) {
33115bd8deadSopenharmony_ci    // Build the inner expression
33125bd8deadSopenharmony_ci    var inner = buildExpression(group.value.body, options.reset(), true);
33135bd8deadSopenharmony_ci
33145bd8deadSopenharmony_ci    var innerHeight = 0;
33155bd8deadSopenharmony_ci    var innerDepth = 0;
33165bd8deadSopenharmony_ci    var hadMiddle = false;
33175bd8deadSopenharmony_ci
33185bd8deadSopenharmony_ci    // Calculate its height and depth
33195bd8deadSopenharmony_ci    for (var i = 0; i < inner.length; i++) {
33205bd8deadSopenharmony_ci        if (inner[i].isMiddle) {
33215bd8deadSopenharmony_ci            hadMiddle = true;
33225bd8deadSopenharmony_ci        } else {
33235bd8deadSopenharmony_ci            innerHeight = Math.max(inner[i].height, innerHeight);
33245bd8deadSopenharmony_ci            innerDepth = Math.max(inner[i].depth, innerDepth);
33255bd8deadSopenharmony_ci        }
33265bd8deadSopenharmony_ci    }
33275bd8deadSopenharmony_ci
33285bd8deadSopenharmony_ci    var style = options.style;
33295bd8deadSopenharmony_ci
33305bd8deadSopenharmony_ci    // The size of delimiters is the same, regardless of what style we are
33315bd8deadSopenharmony_ci    // in. Thus, to correctly calculate the size of delimiter we need around
33325bd8deadSopenharmony_ci    // a group, we scale down the inner size based on the size.
33335bd8deadSopenharmony_ci    innerHeight *= style.sizeMultiplier;
33345bd8deadSopenharmony_ci    innerDepth *= style.sizeMultiplier;
33355bd8deadSopenharmony_ci
33365bd8deadSopenharmony_ci    var leftDelim;
33375bd8deadSopenharmony_ci    if (group.value.left === ".") {
33385bd8deadSopenharmony_ci        // Empty delimiters in \left and \right make null delimiter spaces.
33395bd8deadSopenharmony_ci        leftDelim = makeNullDelimiter(options, ["mopen"]);
33405bd8deadSopenharmony_ci    } else {
33415bd8deadSopenharmony_ci        // Otherwise, use leftRightDelim to generate the correct sized
33425bd8deadSopenharmony_ci        // delimiter.
33435bd8deadSopenharmony_ci        leftDelim = delimiter.leftRightDelim(
33445bd8deadSopenharmony_ci            group.value.left, innerHeight, innerDepth, options,
33455bd8deadSopenharmony_ci            group.mode, ["mopen"]);
33465bd8deadSopenharmony_ci    }
33475bd8deadSopenharmony_ci    // Add it to the beginning of the expression
33485bd8deadSopenharmony_ci    inner.unshift(leftDelim);
33495bd8deadSopenharmony_ci
33505bd8deadSopenharmony_ci    // Handle middle delimiters
33515bd8deadSopenharmony_ci    if (hadMiddle) {
33525bd8deadSopenharmony_ci        for (i = 1; i < inner.length; i++) {
33535bd8deadSopenharmony_ci            if (inner[i].isMiddle) {
33545bd8deadSopenharmony_ci                // Apply the options that were active when \middle was called
33555bd8deadSopenharmony_ci                inner[i] = delimiter.leftRightDelim(
33565bd8deadSopenharmony_ci                    inner[i].isMiddle.value, innerHeight, innerDepth,
33575bd8deadSopenharmony_ci                    inner[i].isMiddle.options, group.mode, []);
33585bd8deadSopenharmony_ci            }
33595bd8deadSopenharmony_ci        }
33605bd8deadSopenharmony_ci    }
33615bd8deadSopenharmony_ci
33625bd8deadSopenharmony_ci    var rightDelim;
33635bd8deadSopenharmony_ci    // Same for the right delimiter
33645bd8deadSopenharmony_ci    if (group.value.right === ".") {
33655bd8deadSopenharmony_ci        rightDelim = makeNullDelimiter(options, ["mclose"]);
33665bd8deadSopenharmony_ci    } else {
33675bd8deadSopenharmony_ci        rightDelim = delimiter.leftRightDelim(
33685bd8deadSopenharmony_ci            group.value.right, innerHeight, innerDepth, options,
33695bd8deadSopenharmony_ci            group.mode, ["mclose"]);
33705bd8deadSopenharmony_ci    }
33715bd8deadSopenharmony_ci    // Add it to the end of the expression.
33725bd8deadSopenharmony_ci    inner.push(rightDelim);
33735bd8deadSopenharmony_ci
33745bd8deadSopenharmony_ci    return makeSpan(
33755bd8deadSopenharmony_ci        ["minner", style.cls()], inner, options);
33765bd8deadSopenharmony_ci};
33775bd8deadSopenharmony_ci
33785bd8deadSopenharmony_cigroupTypes.middle = function(group, options) {
33795bd8deadSopenharmony_ci    var middleDelim;
33805bd8deadSopenharmony_ci    if (group.value.value === ".") {
33815bd8deadSopenharmony_ci        middleDelim = makeNullDelimiter(options, []);
33825bd8deadSopenharmony_ci    } else {
33835bd8deadSopenharmony_ci        middleDelim = delimiter.sizedDelim(
33845bd8deadSopenharmony_ci            group.value.value, 1, options,
33855bd8deadSopenharmony_ci            group.mode, []);
33865bd8deadSopenharmony_ci        middleDelim.isMiddle = {value: group.value.value, options: options};
33875bd8deadSopenharmony_ci    }
33885bd8deadSopenharmony_ci    return middleDelim;
33895bd8deadSopenharmony_ci};
33905bd8deadSopenharmony_ci
33915bd8deadSopenharmony_cigroupTypes.rule = function(group, options) {
33925bd8deadSopenharmony_ci    // Make an empty span for the rule
33935bd8deadSopenharmony_ci    var rule = makeSpan(["mord", "rule"], [], options);
33945bd8deadSopenharmony_ci    var style = options.style;
33955bd8deadSopenharmony_ci
33965bd8deadSopenharmony_ci    // Calculate the shift, width, and height of the rule, and account for units
33975bd8deadSopenharmony_ci    var shift = 0;
33985bd8deadSopenharmony_ci    if (group.value.shift) {
33995bd8deadSopenharmony_ci        shift = calculateSize(group.value.shift, style);
34005bd8deadSopenharmony_ci    }
34015bd8deadSopenharmony_ci
34025bd8deadSopenharmony_ci    var width = calculateSize(group.value.width, style);
34035bd8deadSopenharmony_ci    var height = calculateSize(group.value.height, style);
34045bd8deadSopenharmony_ci
34055bd8deadSopenharmony_ci    // The sizes of rules are absolute, so make it larger if we are in a
34065bd8deadSopenharmony_ci    // smaller style.
34075bd8deadSopenharmony_ci    shift /= style.sizeMultiplier;
34085bd8deadSopenharmony_ci    width /= style.sizeMultiplier;
34095bd8deadSopenharmony_ci    height /= style.sizeMultiplier;
34105bd8deadSopenharmony_ci
34115bd8deadSopenharmony_ci    // Style the rule to the right size
34125bd8deadSopenharmony_ci    rule.style.borderRightWidth = width + "em";
34135bd8deadSopenharmony_ci    rule.style.borderTopWidth = height + "em";
34145bd8deadSopenharmony_ci    rule.style.bottom = shift + "em";
34155bd8deadSopenharmony_ci
34165bd8deadSopenharmony_ci    // Record the height and width
34175bd8deadSopenharmony_ci    rule.width = width;
34185bd8deadSopenharmony_ci    rule.height = height + shift;
34195bd8deadSopenharmony_ci    rule.depth = -shift;
34205bd8deadSopenharmony_ci
34215bd8deadSopenharmony_ci    return rule;
34225bd8deadSopenharmony_ci};
34235bd8deadSopenharmony_ci
34245bd8deadSopenharmony_cigroupTypes.kern = function(group, options) {
34255bd8deadSopenharmony_ci    // Make an empty span for the rule
34265bd8deadSopenharmony_ci    var rule = makeSpan(["mord", "rule"], [], options);
34275bd8deadSopenharmony_ci    var style = options.style;
34285bd8deadSopenharmony_ci
34295bd8deadSopenharmony_ci    var dimension = 0;
34305bd8deadSopenharmony_ci    if (group.value.dimension) {
34315bd8deadSopenharmony_ci        dimension = calculateSize(group.value.dimension, style);
34325bd8deadSopenharmony_ci    }
34335bd8deadSopenharmony_ci
34345bd8deadSopenharmony_ci    dimension /= style.sizeMultiplier;
34355bd8deadSopenharmony_ci
34365bd8deadSopenharmony_ci    rule.style.marginLeft = dimension + "em";
34375bd8deadSopenharmony_ci
34385bd8deadSopenharmony_ci    return rule;
34395bd8deadSopenharmony_ci};
34405bd8deadSopenharmony_ci
34415bd8deadSopenharmony_cigroupTypes.accent = function(group, options) {
34425bd8deadSopenharmony_ci    // Accents are handled in the TeXbook pg. 443, rule 12.
34435bd8deadSopenharmony_ci    var base = group.value.base;
34445bd8deadSopenharmony_ci    var style = options.style;
34455bd8deadSopenharmony_ci
34465bd8deadSopenharmony_ci    var supsubGroup;
34475bd8deadSopenharmony_ci    if (group.type === "supsub") {
34485bd8deadSopenharmony_ci        // If our base is a character box, and we have superscripts and
34495bd8deadSopenharmony_ci        // subscripts, the supsub will defer to us. In particular, we want
34505bd8deadSopenharmony_ci        // to attach the superscripts and subscripts to the inner body (so
34515bd8deadSopenharmony_ci        // that the position of the superscripts and subscripts won't be
34525bd8deadSopenharmony_ci        // affected by the height of the accent). We accomplish this by
34535bd8deadSopenharmony_ci        // sticking the base of the accent into the base of the supsub, and
34545bd8deadSopenharmony_ci        // rendering that, while keeping track of where the accent is.
34555bd8deadSopenharmony_ci
34565bd8deadSopenharmony_ci        // The supsub group is the group that was passed in
34575bd8deadSopenharmony_ci        var supsub = group;
34585bd8deadSopenharmony_ci        // The real accent group is the base of the supsub group
34595bd8deadSopenharmony_ci        group = supsub.value.base;
34605bd8deadSopenharmony_ci        // The character box is the base of the accent group
34615bd8deadSopenharmony_ci        base = group.value.base;
34625bd8deadSopenharmony_ci        // Stick the character box into the base of the supsub group
34635bd8deadSopenharmony_ci        supsub.value.base = base;
34645bd8deadSopenharmony_ci
34655bd8deadSopenharmony_ci        // Rerender the supsub group with its new base, and store that
34665bd8deadSopenharmony_ci        // result.
34675bd8deadSopenharmony_ci        supsubGroup = buildGroup(
34685bd8deadSopenharmony_ci            supsub, options.reset());
34695bd8deadSopenharmony_ci    }
34705bd8deadSopenharmony_ci
34715bd8deadSopenharmony_ci    // Build the base group
34725bd8deadSopenharmony_ci    var body = buildGroup(
34735bd8deadSopenharmony_ci        base, options.withStyle(style.cramp()));
34745bd8deadSopenharmony_ci
34755bd8deadSopenharmony_ci    // Calculate the skew of the accent. This is based on the line "If the
34765bd8deadSopenharmony_ci    // nucleus is not a single character, let s = 0; otherwise set s to the
34775bd8deadSopenharmony_ci    // kern amount for the nucleus followed by the \skewchar of its font."
34785bd8deadSopenharmony_ci    // Note that our skew metrics are just the kern between each character
34795bd8deadSopenharmony_ci    // and the skewchar.
34805bd8deadSopenharmony_ci    var skew;
34815bd8deadSopenharmony_ci    if (isCharacterBox(base)) {
34825bd8deadSopenharmony_ci        // If the base is a character box, then we want the skew of the
34835bd8deadSopenharmony_ci        // innermost character. To do that, we find the innermost character:
34845bd8deadSopenharmony_ci        var baseChar = getBaseElem(base);
34855bd8deadSopenharmony_ci        // Then, we render its group to get the symbol inside it
34865bd8deadSopenharmony_ci        var baseGroup = buildGroup(
34875bd8deadSopenharmony_ci            baseChar, options.withStyle(style.cramp()));
34885bd8deadSopenharmony_ci        // Finally, we pull the skew off of the symbol.
34895bd8deadSopenharmony_ci        skew = baseGroup.skew;
34905bd8deadSopenharmony_ci        // Note that we now throw away baseGroup, because the layers we
34915bd8deadSopenharmony_ci        // removed with getBaseElem might contain things like \color which
34925bd8deadSopenharmony_ci        // we can't get rid of.
34935bd8deadSopenharmony_ci        // TODO(emily): Find a better way to get the skew
34945bd8deadSopenharmony_ci    } else {
34955bd8deadSopenharmony_ci        skew = 0;
34965bd8deadSopenharmony_ci    }
34975bd8deadSopenharmony_ci
34985bd8deadSopenharmony_ci    // calculate the amount of space between the body and the accent
34995bd8deadSopenharmony_ci    var clearance = Math.min(
35005bd8deadSopenharmony_ci        body.height,
35015bd8deadSopenharmony_ci        style.metrics.xHeight);
35025bd8deadSopenharmony_ci
35035bd8deadSopenharmony_ci    // Build the accent
35045bd8deadSopenharmony_ci    var accent = buildCommon.makeSymbol(
35055bd8deadSopenharmony_ci        group.value.accent, "Main-Regular", "math", options);
35065bd8deadSopenharmony_ci    // Remove the italic correction of the accent, because it only serves to
35075bd8deadSopenharmony_ci    // shift the accent over to a place we don't want.
35085bd8deadSopenharmony_ci    accent.italic = 0;
35095bd8deadSopenharmony_ci
35105bd8deadSopenharmony_ci    // The \vec character that the fonts use is a combining character, and
35115bd8deadSopenharmony_ci    // thus shows up much too far to the left. To account for this, we add a
35125bd8deadSopenharmony_ci    // specific class which shifts the accent over to where we want it.
35135bd8deadSopenharmony_ci    // TODO(emily): Fix this in a better way, like by changing the font
35145bd8deadSopenharmony_ci    var vecClass = group.value.accent === "\\vec" ? "accent-vec" : null;
35155bd8deadSopenharmony_ci
35165bd8deadSopenharmony_ci    var accentBody = makeSpan(["accent-body", vecClass], [
35175bd8deadSopenharmony_ci        makeSpan([], [accent])]);
35185bd8deadSopenharmony_ci
35195bd8deadSopenharmony_ci    accentBody = buildCommon.makeVList([
35205bd8deadSopenharmony_ci        {type: "elem", elem: body},
35215bd8deadSopenharmony_ci        {type: "kern", size: -clearance},
35225bd8deadSopenharmony_ci        {type: "elem", elem: accentBody}
35235bd8deadSopenharmony_ci    ], "firstBaseline", null, options);
35245bd8deadSopenharmony_ci
35255bd8deadSopenharmony_ci    // Shift the accent over by the skew. Note we shift by twice the skew
35265bd8deadSopenharmony_ci    // because we are centering the accent, so by adding 2*skew to the left,
35275bd8deadSopenharmony_ci    // we shift it to the right by 1*skew.
35285bd8deadSopenharmony_ci    accentBody.children[1].style.marginLeft = 2 * skew + "em";
35295bd8deadSopenharmony_ci
35305bd8deadSopenharmony_ci    var accentWrap = makeSpan(["mord", "accent"], [accentBody], options);
35315bd8deadSopenharmony_ci
35325bd8deadSopenharmony_ci    if (supsubGroup) {
35335bd8deadSopenharmony_ci        // Here, we replace the "base" child of the supsub with our newly
35345bd8deadSopenharmony_ci        // generated accent.
35355bd8deadSopenharmony_ci        supsubGroup.children[0] = accentWrap;
35365bd8deadSopenharmony_ci
35375bd8deadSopenharmony_ci        // Since we don't rerun the height calculation after replacing the
35385bd8deadSopenharmony_ci        // accent, we manually recalculate height.
35395bd8deadSopenharmony_ci        supsubGroup.height = Math.max(accentWrap.height, supsubGroup.height);
35405bd8deadSopenharmony_ci
35415bd8deadSopenharmony_ci        // Accents should always be ords, even when their innards are not.
35425bd8deadSopenharmony_ci        supsubGroup.classes[0] = "mord";
35435bd8deadSopenharmony_ci
35445bd8deadSopenharmony_ci        return supsubGroup;
35455bd8deadSopenharmony_ci    } else {
35465bd8deadSopenharmony_ci        return accentWrap;
35475bd8deadSopenharmony_ci    }
35485bd8deadSopenharmony_ci};
35495bd8deadSopenharmony_ci
35505bd8deadSopenharmony_cigroupTypes.phantom = function(group, options) {
35515bd8deadSopenharmony_ci    var elements = buildExpression(
35525bd8deadSopenharmony_ci        group.value.value,
35535bd8deadSopenharmony_ci        options.withPhantom(),
35545bd8deadSopenharmony_ci        false
35555bd8deadSopenharmony_ci    );
35565bd8deadSopenharmony_ci
35575bd8deadSopenharmony_ci    // \phantom isn't supposed to affect the elements it contains.
35585bd8deadSopenharmony_ci    // See "color" for more details.
35595bd8deadSopenharmony_ci    return new buildCommon.makeFragment(elements);
35605bd8deadSopenharmony_ci};
35615bd8deadSopenharmony_ci
35625bd8deadSopenharmony_cigroupTypes.mclass = function(group, options) {
35635bd8deadSopenharmony_ci    var elements = buildExpression(group.value.value, options, true);
35645bd8deadSopenharmony_ci
35655bd8deadSopenharmony_ci    return makeSpan([group.value.mclass], elements, options);
35665bd8deadSopenharmony_ci};
35675bd8deadSopenharmony_ci
35685bd8deadSopenharmony_ci/**
35695bd8deadSopenharmony_ci * buildGroup is the function that takes a group and calls the correct groupType
35705bd8deadSopenharmony_ci * function for it. It also handles the interaction of size and style changes
35715bd8deadSopenharmony_ci * between parents and children.
35725bd8deadSopenharmony_ci */
35735bd8deadSopenharmony_civar buildGroup = function(group, options) {
35745bd8deadSopenharmony_ci    if (!group) {
35755bd8deadSopenharmony_ci        return makeSpan();
35765bd8deadSopenharmony_ci    }
35775bd8deadSopenharmony_ci
35785bd8deadSopenharmony_ci    if (groupTypes[group.type]) {
35795bd8deadSopenharmony_ci        // Call the groupTypes function
35805bd8deadSopenharmony_ci        var groupNode = groupTypes[group.type](group, options);
35815bd8deadSopenharmony_ci        var multiplier;
35825bd8deadSopenharmony_ci
35835bd8deadSopenharmony_ci        // If the style changed between the parent and the current group,
35845bd8deadSopenharmony_ci        // account for the size difference
35855bd8deadSopenharmony_ci        if (options.style !== options.parentStyle) {
35865bd8deadSopenharmony_ci            multiplier = options.style.sizeMultiplier /
35875bd8deadSopenharmony_ci                    options.parentStyle.sizeMultiplier;
35885bd8deadSopenharmony_ci
35895bd8deadSopenharmony_ci            groupNode.height *= multiplier;
35905bd8deadSopenharmony_ci            groupNode.depth *= multiplier;
35915bd8deadSopenharmony_ci        }
35925bd8deadSopenharmony_ci
35935bd8deadSopenharmony_ci        // If the size changed between the parent and the current group, account
35945bd8deadSopenharmony_ci        // for that size difference.
35955bd8deadSopenharmony_ci        if (options.size !== options.parentSize) {
35965bd8deadSopenharmony_ci            multiplier = buildCommon.sizingMultiplier[options.size] /
35975bd8deadSopenharmony_ci                    buildCommon.sizingMultiplier[options.parentSize];
35985bd8deadSopenharmony_ci
35995bd8deadSopenharmony_ci            groupNode.height *= multiplier;
36005bd8deadSopenharmony_ci            groupNode.depth *= multiplier;
36015bd8deadSopenharmony_ci        }
36025bd8deadSopenharmony_ci
36035bd8deadSopenharmony_ci        return groupNode;
36045bd8deadSopenharmony_ci    } else {
36055bd8deadSopenharmony_ci        throw new ParseError(
36065bd8deadSopenharmony_ci            "Got group of unknown type: '" + group.type + "'");
36075bd8deadSopenharmony_ci    }
36085bd8deadSopenharmony_ci};
36095bd8deadSopenharmony_ci
36105bd8deadSopenharmony_ci/**
36115bd8deadSopenharmony_ci * Take an entire parse tree, and build it into an appropriate set of HTML
36125bd8deadSopenharmony_ci * nodes.
36135bd8deadSopenharmony_ci */
36145bd8deadSopenharmony_civar buildHTML = function(tree, options) {
36155bd8deadSopenharmony_ci    // buildExpression is destructive, so we need to make a clone
36165bd8deadSopenharmony_ci    // of the incoming tree so that it isn't accidentally changed
36175bd8deadSopenharmony_ci    tree = JSON.parse(JSON.stringify(tree));
36185bd8deadSopenharmony_ci
36195bd8deadSopenharmony_ci    // Build the expression contained in the tree
36205bd8deadSopenharmony_ci    var expression = buildExpression(tree, options, true);
36215bd8deadSopenharmony_ci    var body = makeSpan(["base", options.style.cls()], expression, options);
36225bd8deadSopenharmony_ci
36235bd8deadSopenharmony_ci    // Add struts, which ensure that the top of the HTML element falls at the
36245bd8deadSopenharmony_ci    // height of the expression, and the bottom of the HTML element falls at the
36255bd8deadSopenharmony_ci    // depth of the expression.
36265bd8deadSopenharmony_ci    var topStrut = makeSpan(["strut"]);
36275bd8deadSopenharmony_ci    var bottomStrut = makeSpan(["strut", "bottom"]);
36285bd8deadSopenharmony_ci
36295bd8deadSopenharmony_ci    topStrut.style.height = body.height + "em";
36305bd8deadSopenharmony_ci    bottomStrut.style.height = (body.height + body.depth) + "em";
36315bd8deadSopenharmony_ci    // We'd like to use `vertical-align: top` but in IE 9 this lowers the
36325bd8deadSopenharmony_ci    // baseline of the box to the bottom of this strut (instead staying in the
36335bd8deadSopenharmony_ci    // normal place) so we use an absolute value for vertical-align instead
36345bd8deadSopenharmony_ci    bottomStrut.style.verticalAlign = -body.depth + "em";
36355bd8deadSopenharmony_ci
36365bd8deadSopenharmony_ci    // Wrap the struts and body together
36375bd8deadSopenharmony_ci    var htmlNode = makeSpan(["katex-html"], [topStrut, bottomStrut, body]);
36385bd8deadSopenharmony_ci
36395bd8deadSopenharmony_ci    htmlNode.setAttribute("aria-hidden", "true");
36405bd8deadSopenharmony_ci
36415bd8deadSopenharmony_ci    return htmlNode;
36425bd8deadSopenharmony_ci};
36435bd8deadSopenharmony_ci
36445bd8deadSopenharmony_cimodule.exports = buildHTML;
36455bd8deadSopenharmony_ci
36465bd8deadSopenharmony_ci},{"./ParseError":6,"./Style":9,"./buildCommon":10,"./delimiter":14,"./domTree":15,"./fontMetrics":17,"./utils":25}],12:[function(require,module,exports){
36475bd8deadSopenharmony_ci/**
36485bd8deadSopenharmony_ci * This file converts a parse tree into a cooresponding MathML tree. The main
36495bd8deadSopenharmony_ci * entry point is the `buildMathML` function, which takes a parse tree from the
36505bd8deadSopenharmony_ci * parser.
36515bd8deadSopenharmony_ci */
36525bd8deadSopenharmony_ci
36535bd8deadSopenharmony_civar buildCommon = require("./buildCommon");
36545bd8deadSopenharmony_civar fontMetrics = require("./fontMetrics");
36555bd8deadSopenharmony_civar mathMLTree = require("./mathMLTree");
36565bd8deadSopenharmony_civar ParseError = require("./ParseError");
36575bd8deadSopenharmony_civar symbols = require("./symbols");
36585bd8deadSopenharmony_civar utils = require("./utils");
36595bd8deadSopenharmony_ci
36605bd8deadSopenharmony_civar makeSpan = buildCommon.makeSpan;
36615bd8deadSopenharmony_civar fontMap = buildCommon.fontMap;
36625bd8deadSopenharmony_ci
36635bd8deadSopenharmony_ci/**
36645bd8deadSopenharmony_ci * Takes a symbol and converts it into a MathML text node after performing
36655bd8deadSopenharmony_ci * optional replacement from symbols.js.
36665bd8deadSopenharmony_ci */
36675bd8deadSopenharmony_civar makeText = function(text, mode) {
36685bd8deadSopenharmony_ci    if (symbols[mode][text] && symbols[mode][text].replace) {
36695bd8deadSopenharmony_ci        text = symbols[mode][text].replace;
36705bd8deadSopenharmony_ci    }
36715bd8deadSopenharmony_ci
36725bd8deadSopenharmony_ci    return new mathMLTree.TextNode(text);
36735bd8deadSopenharmony_ci};
36745bd8deadSopenharmony_ci
36755bd8deadSopenharmony_ci/**
36765bd8deadSopenharmony_ci * Returns the math variant as a string or null if none is required.
36775bd8deadSopenharmony_ci */
36785bd8deadSopenharmony_civar getVariant = function(group, options) {
36795bd8deadSopenharmony_ci    var font = options.font;
36805bd8deadSopenharmony_ci    if (!font) {
36815bd8deadSopenharmony_ci        return null;
36825bd8deadSopenharmony_ci    }
36835bd8deadSopenharmony_ci
36845bd8deadSopenharmony_ci    var mode = group.mode;
36855bd8deadSopenharmony_ci    if (font === "mathit") {
36865bd8deadSopenharmony_ci        return "italic";
36875bd8deadSopenharmony_ci    }
36885bd8deadSopenharmony_ci
36895bd8deadSopenharmony_ci    var value = group.value;
36905bd8deadSopenharmony_ci    if (utils.contains(["\\imath", "\\jmath"], value)) {
36915bd8deadSopenharmony_ci        return null;
36925bd8deadSopenharmony_ci    }
36935bd8deadSopenharmony_ci
36945bd8deadSopenharmony_ci    if (symbols[mode][value] && symbols[mode][value].replace) {
36955bd8deadSopenharmony_ci        value = symbols[mode][value].replace;
36965bd8deadSopenharmony_ci    }
36975bd8deadSopenharmony_ci
36985bd8deadSopenharmony_ci    var fontName = fontMap[font].fontName;
36995bd8deadSopenharmony_ci    if (fontMetrics.getCharacterMetrics(value, fontName)) {
37005bd8deadSopenharmony_ci        return fontMap[options.font].variant;
37015bd8deadSopenharmony_ci    }
37025bd8deadSopenharmony_ci
37035bd8deadSopenharmony_ci    return null;
37045bd8deadSopenharmony_ci};
37055bd8deadSopenharmony_ci
37065bd8deadSopenharmony_ci/**
37075bd8deadSopenharmony_ci * Functions for handling the different types of groups found in the parse
37085bd8deadSopenharmony_ci * tree. Each function should take a parse group and return a MathML node.
37095bd8deadSopenharmony_ci */
37105bd8deadSopenharmony_civar groupTypes = {};
37115bd8deadSopenharmony_ci
37125bd8deadSopenharmony_cigroupTypes.mathord = function(group, options) {
37135bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37145bd8deadSopenharmony_ci        "mi",
37155bd8deadSopenharmony_ci        [makeText(group.value, group.mode)]);
37165bd8deadSopenharmony_ci
37175bd8deadSopenharmony_ci    var variant = getVariant(group, options);
37185bd8deadSopenharmony_ci    if (variant) {
37195bd8deadSopenharmony_ci        node.setAttribute("mathvariant", variant);
37205bd8deadSopenharmony_ci    }
37215bd8deadSopenharmony_ci    return node;
37225bd8deadSopenharmony_ci};
37235bd8deadSopenharmony_ci
37245bd8deadSopenharmony_cigroupTypes.textord = function(group, options) {
37255bd8deadSopenharmony_ci    var text = makeText(group.value, group.mode);
37265bd8deadSopenharmony_ci
37275bd8deadSopenharmony_ci    var variant = getVariant(group, options) || "normal";
37285bd8deadSopenharmony_ci
37295bd8deadSopenharmony_ci    var node;
37305bd8deadSopenharmony_ci    if (/[0-9]/.test(group.value)) {
37315bd8deadSopenharmony_ci        // TODO(kevinb) merge adjacent <mn> nodes
37325bd8deadSopenharmony_ci        // do it as a post processing step
37335bd8deadSopenharmony_ci        node = new mathMLTree.MathNode("mn", [text]);
37345bd8deadSopenharmony_ci        if (options.font) {
37355bd8deadSopenharmony_ci            node.setAttribute("mathvariant", variant);
37365bd8deadSopenharmony_ci        }
37375bd8deadSopenharmony_ci    } else {
37385bd8deadSopenharmony_ci        node = new mathMLTree.MathNode("mi", [text]);
37395bd8deadSopenharmony_ci        node.setAttribute("mathvariant", variant);
37405bd8deadSopenharmony_ci    }
37415bd8deadSopenharmony_ci
37425bd8deadSopenharmony_ci    return node;
37435bd8deadSopenharmony_ci};
37445bd8deadSopenharmony_ci
37455bd8deadSopenharmony_cigroupTypes.bin = function(group) {
37465bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37475bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37485bd8deadSopenharmony_ci
37495bd8deadSopenharmony_ci    return node;
37505bd8deadSopenharmony_ci};
37515bd8deadSopenharmony_ci
37525bd8deadSopenharmony_cigroupTypes.rel = function(group) {
37535bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37545bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37555bd8deadSopenharmony_ci
37565bd8deadSopenharmony_ci    return node;
37575bd8deadSopenharmony_ci};
37585bd8deadSopenharmony_ci
37595bd8deadSopenharmony_cigroupTypes.open = function(group) {
37605bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37615bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37625bd8deadSopenharmony_ci
37635bd8deadSopenharmony_ci    return node;
37645bd8deadSopenharmony_ci};
37655bd8deadSopenharmony_ci
37665bd8deadSopenharmony_cigroupTypes.close = function(group) {
37675bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37685bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37695bd8deadSopenharmony_ci
37705bd8deadSopenharmony_ci    return node;
37715bd8deadSopenharmony_ci};
37725bd8deadSopenharmony_ci
37735bd8deadSopenharmony_cigroupTypes.inner = function(group) {
37745bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37755bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37765bd8deadSopenharmony_ci
37775bd8deadSopenharmony_ci    return node;
37785bd8deadSopenharmony_ci};
37795bd8deadSopenharmony_ci
37805bd8deadSopenharmony_cigroupTypes.punct = function(group) {
37815bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
37825bd8deadSopenharmony_ci        "mo", [makeText(group.value, group.mode)]);
37835bd8deadSopenharmony_ci
37845bd8deadSopenharmony_ci    node.setAttribute("separator", "true");
37855bd8deadSopenharmony_ci
37865bd8deadSopenharmony_ci    return node;
37875bd8deadSopenharmony_ci};
37885bd8deadSopenharmony_ci
37895bd8deadSopenharmony_cigroupTypes.ordgroup = function(group, options) {
37905bd8deadSopenharmony_ci    var inner = buildExpression(group.value, options);
37915bd8deadSopenharmony_ci
37925bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mrow", inner);
37935bd8deadSopenharmony_ci
37945bd8deadSopenharmony_ci    return node;
37955bd8deadSopenharmony_ci};
37965bd8deadSopenharmony_ci
37975bd8deadSopenharmony_cigroupTypes.text = function(group, options) {
37985bd8deadSopenharmony_ci    var inner = buildExpression(group.value.body, options);
37995bd8deadSopenharmony_ci
38005bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mtext", inner);
38015bd8deadSopenharmony_ci
38025bd8deadSopenharmony_ci    return node;
38035bd8deadSopenharmony_ci};
38045bd8deadSopenharmony_ci
38055bd8deadSopenharmony_cigroupTypes.color = function(group, options) {
38065bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value, options);
38075bd8deadSopenharmony_ci
38085bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mstyle", inner);
38095bd8deadSopenharmony_ci
38105bd8deadSopenharmony_ci    node.setAttribute("mathcolor", group.value.color);
38115bd8deadSopenharmony_ci
38125bd8deadSopenharmony_ci    return node;
38135bd8deadSopenharmony_ci};
38145bd8deadSopenharmony_ci
38155bd8deadSopenharmony_cigroupTypes.supsub = function(group, options) {
38165bd8deadSopenharmony_ci    var children = [buildGroup(group.value.base, options)];
38175bd8deadSopenharmony_ci
38185bd8deadSopenharmony_ci    if (group.value.sub) {
38195bd8deadSopenharmony_ci        children.push(buildGroup(group.value.sub, options));
38205bd8deadSopenharmony_ci    }
38215bd8deadSopenharmony_ci
38225bd8deadSopenharmony_ci    if (group.value.sup) {
38235bd8deadSopenharmony_ci        children.push(buildGroup(group.value.sup, options));
38245bd8deadSopenharmony_ci    }
38255bd8deadSopenharmony_ci
38265bd8deadSopenharmony_ci    var nodeType;
38275bd8deadSopenharmony_ci    if (!group.value.sub) {
38285bd8deadSopenharmony_ci        nodeType = "msup";
38295bd8deadSopenharmony_ci    } else if (!group.value.sup) {
38305bd8deadSopenharmony_ci        nodeType = "msub";
38315bd8deadSopenharmony_ci    } else {
38325bd8deadSopenharmony_ci        nodeType = "msubsup";
38335bd8deadSopenharmony_ci    }
38345bd8deadSopenharmony_ci
38355bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(nodeType, children);
38365bd8deadSopenharmony_ci
38375bd8deadSopenharmony_ci    return node;
38385bd8deadSopenharmony_ci};
38395bd8deadSopenharmony_ci
38405bd8deadSopenharmony_cigroupTypes.genfrac = function(group, options) {
38415bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
38425bd8deadSopenharmony_ci        "mfrac",
38435bd8deadSopenharmony_ci        [buildGroup(group.value.numer, options),
38445bd8deadSopenharmony_ci            buildGroup(group.value.denom, options)]);
38455bd8deadSopenharmony_ci
38465bd8deadSopenharmony_ci    if (!group.value.hasBarLine) {
38475bd8deadSopenharmony_ci        node.setAttribute("linethickness", "0px");
38485bd8deadSopenharmony_ci    }
38495bd8deadSopenharmony_ci
38505bd8deadSopenharmony_ci    if (group.value.leftDelim != null || group.value.rightDelim != null) {
38515bd8deadSopenharmony_ci        var withDelims = [];
38525bd8deadSopenharmony_ci
38535bd8deadSopenharmony_ci        if (group.value.leftDelim != null) {
38545bd8deadSopenharmony_ci            var leftOp = new mathMLTree.MathNode(
38555bd8deadSopenharmony_ci                "mo", [new mathMLTree.TextNode(group.value.leftDelim)]);
38565bd8deadSopenharmony_ci
38575bd8deadSopenharmony_ci            leftOp.setAttribute("fence", "true");
38585bd8deadSopenharmony_ci
38595bd8deadSopenharmony_ci            withDelims.push(leftOp);
38605bd8deadSopenharmony_ci        }
38615bd8deadSopenharmony_ci
38625bd8deadSopenharmony_ci        withDelims.push(node);
38635bd8deadSopenharmony_ci
38645bd8deadSopenharmony_ci        if (group.value.rightDelim != null) {
38655bd8deadSopenharmony_ci            var rightOp = new mathMLTree.MathNode(
38665bd8deadSopenharmony_ci                "mo", [new mathMLTree.TextNode(group.value.rightDelim)]);
38675bd8deadSopenharmony_ci
38685bd8deadSopenharmony_ci            rightOp.setAttribute("fence", "true");
38695bd8deadSopenharmony_ci
38705bd8deadSopenharmony_ci            withDelims.push(rightOp);
38715bd8deadSopenharmony_ci        }
38725bd8deadSopenharmony_ci
38735bd8deadSopenharmony_ci        var outerNode = new mathMLTree.MathNode("mrow", withDelims);
38745bd8deadSopenharmony_ci
38755bd8deadSopenharmony_ci        return outerNode;
38765bd8deadSopenharmony_ci    }
38775bd8deadSopenharmony_ci
38785bd8deadSopenharmony_ci    return node;
38795bd8deadSopenharmony_ci};
38805bd8deadSopenharmony_ci
38815bd8deadSopenharmony_cigroupTypes.array = function(group, options) {
38825bd8deadSopenharmony_ci    return new mathMLTree.MathNode(
38835bd8deadSopenharmony_ci        "mtable", group.value.body.map(function(row) {
38845bd8deadSopenharmony_ci            return new mathMLTree.MathNode(
38855bd8deadSopenharmony_ci                "mtr", row.map(function(cell) {
38865bd8deadSopenharmony_ci                    return new mathMLTree.MathNode(
38875bd8deadSopenharmony_ci                        "mtd", [buildGroup(cell, options)]);
38885bd8deadSopenharmony_ci                }));
38895bd8deadSopenharmony_ci        }));
38905bd8deadSopenharmony_ci};
38915bd8deadSopenharmony_ci
38925bd8deadSopenharmony_cigroupTypes.sqrt = function(group, options) {
38935bd8deadSopenharmony_ci    var node;
38945bd8deadSopenharmony_ci    if (group.value.index) {
38955bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
38965bd8deadSopenharmony_ci            "mroot", [
38975bd8deadSopenharmony_ci                buildGroup(group.value.body, options),
38985bd8deadSopenharmony_ci                buildGroup(group.value.index, options)
38995bd8deadSopenharmony_ci            ]);
39005bd8deadSopenharmony_ci    } else {
39015bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
39025bd8deadSopenharmony_ci            "msqrt", [buildGroup(group.value.body, options)]);
39035bd8deadSopenharmony_ci    }
39045bd8deadSopenharmony_ci
39055bd8deadSopenharmony_ci    return node;
39065bd8deadSopenharmony_ci};
39075bd8deadSopenharmony_ci
39085bd8deadSopenharmony_cigroupTypes.leftright = function(group, options) {
39095bd8deadSopenharmony_ci    var inner = buildExpression(group.value.body, options);
39105bd8deadSopenharmony_ci
39115bd8deadSopenharmony_ci    if (group.value.left !== ".") {
39125bd8deadSopenharmony_ci        var leftNode = new mathMLTree.MathNode(
39135bd8deadSopenharmony_ci            "mo", [makeText(group.value.left, group.mode)]);
39145bd8deadSopenharmony_ci
39155bd8deadSopenharmony_ci        leftNode.setAttribute("fence", "true");
39165bd8deadSopenharmony_ci
39175bd8deadSopenharmony_ci        inner.unshift(leftNode);
39185bd8deadSopenharmony_ci    }
39195bd8deadSopenharmony_ci
39205bd8deadSopenharmony_ci    if (group.value.right !== ".") {
39215bd8deadSopenharmony_ci        var rightNode = new mathMLTree.MathNode(
39225bd8deadSopenharmony_ci            "mo", [makeText(group.value.right, group.mode)]);
39235bd8deadSopenharmony_ci
39245bd8deadSopenharmony_ci        rightNode.setAttribute("fence", "true");
39255bd8deadSopenharmony_ci
39265bd8deadSopenharmony_ci        inner.push(rightNode);
39275bd8deadSopenharmony_ci    }
39285bd8deadSopenharmony_ci
39295bd8deadSopenharmony_ci    var outerNode = new mathMLTree.MathNode("mrow", inner);
39305bd8deadSopenharmony_ci
39315bd8deadSopenharmony_ci    return outerNode;
39325bd8deadSopenharmony_ci};
39335bd8deadSopenharmony_ci
39345bd8deadSopenharmony_cigroupTypes.middle = function(group, options) {
39355bd8deadSopenharmony_ci    var middleNode = new mathMLTree.MathNode(
39365bd8deadSopenharmony_ci        "mo", [makeText(group.value.middle, group.mode)]);
39375bd8deadSopenharmony_ci    middleNode.setAttribute("fence", "true");
39385bd8deadSopenharmony_ci    return middleNode;
39395bd8deadSopenharmony_ci};
39405bd8deadSopenharmony_ci
39415bd8deadSopenharmony_cigroupTypes.accent = function(group, options) {
39425bd8deadSopenharmony_ci    var accentNode = new mathMLTree.MathNode(
39435bd8deadSopenharmony_ci        "mo", [makeText(group.value.accent, group.mode)]);
39445bd8deadSopenharmony_ci
39455bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
39465bd8deadSopenharmony_ci        "mover",
39475bd8deadSopenharmony_ci        [buildGroup(group.value.base, options),
39485bd8deadSopenharmony_ci            accentNode]);
39495bd8deadSopenharmony_ci
39505bd8deadSopenharmony_ci    node.setAttribute("accent", "true");
39515bd8deadSopenharmony_ci
39525bd8deadSopenharmony_ci    return node;
39535bd8deadSopenharmony_ci};
39545bd8deadSopenharmony_ci
39555bd8deadSopenharmony_cigroupTypes.spacing = function(group) {
39565bd8deadSopenharmony_ci    var node;
39575bd8deadSopenharmony_ci
39585bd8deadSopenharmony_ci    if (group.value === "\\ " || group.value === "\\space" ||
39595bd8deadSopenharmony_ci        group.value === " " || group.value === "~") {
39605bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
39615bd8deadSopenharmony_ci            "mtext", [new mathMLTree.TextNode("\u00a0")]);
39625bd8deadSopenharmony_ci    } else {
39635bd8deadSopenharmony_ci        node = new mathMLTree.MathNode("mspace");
39645bd8deadSopenharmony_ci
39655bd8deadSopenharmony_ci        node.setAttribute(
39665bd8deadSopenharmony_ci            "width", buildCommon.spacingFunctions[group.value].size);
39675bd8deadSopenharmony_ci    }
39685bd8deadSopenharmony_ci
39695bd8deadSopenharmony_ci    return node;
39705bd8deadSopenharmony_ci};
39715bd8deadSopenharmony_ci
39725bd8deadSopenharmony_cigroupTypes.op = function(group, options) {
39735bd8deadSopenharmony_ci    var node;
39745bd8deadSopenharmony_ci
39755bd8deadSopenharmony_ci    // TODO(emily): handle big operators using the `largeop` attribute
39765bd8deadSopenharmony_ci
39775bd8deadSopenharmony_ci    if (group.value.symbol) {
39785bd8deadSopenharmony_ci        // This is a symbol. Just add the symbol.
39795bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
39805bd8deadSopenharmony_ci            "mo", [makeText(group.value.body, group.mode)]);
39815bd8deadSopenharmony_ci    } else if (group.value.value) {
39825bd8deadSopenharmony_ci        // This is an operator with children. Add them.
39835bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
39845bd8deadSopenharmony_ci            "mo", buildExpression(group.value.value, options));
39855bd8deadSopenharmony_ci    } else {
39865bd8deadSopenharmony_ci        // This is a text operator. Add all of the characters from the
39875bd8deadSopenharmony_ci        // operator's name.
39885bd8deadSopenharmony_ci        // TODO(emily): Add a space in the middle of some of these
39895bd8deadSopenharmony_ci        // operators, like \limsup.
39905bd8deadSopenharmony_ci        node = new mathMLTree.MathNode(
39915bd8deadSopenharmony_ci            "mi", [new mathMLTree.TextNode(group.value.body.slice(1))]);
39925bd8deadSopenharmony_ci    }
39935bd8deadSopenharmony_ci
39945bd8deadSopenharmony_ci    return node;
39955bd8deadSopenharmony_ci};
39965bd8deadSopenharmony_ci
39975bd8deadSopenharmony_cigroupTypes.mod = function(group, options) {
39985bd8deadSopenharmony_ci    var inner = [];
39995bd8deadSopenharmony_ci
40005bd8deadSopenharmony_ci    if (group.value.modType === "pod" || group.value.modType === "pmod") {
40015bd8deadSopenharmony_ci        inner.push(new mathMLTree.MathNode(
40025bd8deadSopenharmony_ci            "mo", [makeText("(", group.mode)]));
40035bd8deadSopenharmony_ci    }
40045bd8deadSopenharmony_ci    if (group.value.modType !== "pod") {
40055bd8deadSopenharmony_ci        inner.push(new mathMLTree.MathNode(
40065bd8deadSopenharmony_ci            "mo", [makeText("mod", group.mode)]));
40075bd8deadSopenharmony_ci    }
40085bd8deadSopenharmony_ci    if (group.value.value) {
40095bd8deadSopenharmony_ci        var space = new mathMLTree.MathNode("mspace");
40105bd8deadSopenharmony_ci        space.setAttribute("width", "0.333333em");
40115bd8deadSopenharmony_ci        inner.push(space);
40125bd8deadSopenharmony_ci        inner = inner.concat(buildExpression(group.value.value, options));
40135bd8deadSopenharmony_ci    }
40145bd8deadSopenharmony_ci    if (group.value.modType === "pod" || group.value.modType === "pmod") {
40155bd8deadSopenharmony_ci        inner.push(new mathMLTree.MathNode(
40165bd8deadSopenharmony_ci            "mo", [makeText(")", group.mode)]));
40175bd8deadSopenharmony_ci    }
40185bd8deadSopenharmony_ci
40195bd8deadSopenharmony_ci    return new mathMLTree.MathNode("mo", inner);
40205bd8deadSopenharmony_ci};
40215bd8deadSopenharmony_ci
40225bd8deadSopenharmony_cigroupTypes.katex = function(group) {
40235bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
40245bd8deadSopenharmony_ci        "mtext", [new mathMLTree.TextNode("KaTeX")]);
40255bd8deadSopenharmony_ci
40265bd8deadSopenharmony_ci    return node;
40275bd8deadSopenharmony_ci};
40285bd8deadSopenharmony_ci
40295bd8deadSopenharmony_cigroupTypes.font = function(group, options) {
40305bd8deadSopenharmony_ci    var font = group.value.font;
40315bd8deadSopenharmony_ci    return buildGroup(group.value.body, options.withFont(font));
40325bd8deadSopenharmony_ci};
40335bd8deadSopenharmony_ci
40345bd8deadSopenharmony_cigroupTypes.delimsizing = function(group) {
40355bd8deadSopenharmony_ci    var children = [];
40365bd8deadSopenharmony_ci
40375bd8deadSopenharmony_ci    if (group.value.value !== ".") {
40385bd8deadSopenharmony_ci        children.push(makeText(group.value.value, group.mode));
40395bd8deadSopenharmony_ci    }
40405bd8deadSopenharmony_ci
40415bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mo", children);
40425bd8deadSopenharmony_ci
40435bd8deadSopenharmony_ci    if (group.value.mclass === "mopen" ||
40445bd8deadSopenharmony_ci        group.value.mclass === "mclose") {
40455bd8deadSopenharmony_ci        // Only some of the delimsizing functions act as fences, and they
40465bd8deadSopenharmony_ci        // return "mopen" or "mclose" mclass.
40475bd8deadSopenharmony_ci        node.setAttribute("fence", "true");
40485bd8deadSopenharmony_ci    } else {
40495bd8deadSopenharmony_ci        // Explicitly disable fencing if it's not a fence, to override the
40505bd8deadSopenharmony_ci        // defaults.
40515bd8deadSopenharmony_ci        node.setAttribute("fence", "false");
40525bd8deadSopenharmony_ci    }
40535bd8deadSopenharmony_ci
40545bd8deadSopenharmony_ci    return node;
40555bd8deadSopenharmony_ci};
40565bd8deadSopenharmony_ci
40575bd8deadSopenharmony_cigroupTypes.styling = function(group, options) {
40585bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value, options);
40595bd8deadSopenharmony_ci
40605bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mstyle", inner);
40615bd8deadSopenharmony_ci
40625bd8deadSopenharmony_ci    var styleAttributes = {
40635bd8deadSopenharmony_ci        "display": ["0", "true"],
40645bd8deadSopenharmony_ci        "text": ["0", "false"],
40655bd8deadSopenharmony_ci        "script": ["1", "false"],
40665bd8deadSopenharmony_ci        "scriptscript": ["2", "false"]
40675bd8deadSopenharmony_ci    };
40685bd8deadSopenharmony_ci
40695bd8deadSopenharmony_ci    var attr = styleAttributes[group.value.style];
40705bd8deadSopenharmony_ci
40715bd8deadSopenharmony_ci    node.setAttribute("scriptlevel", attr[0]);
40725bd8deadSopenharmony_ci    node.setAttribute("displaystyle", attr[1]);
40735bd8deadSopenharmony_ci
40745bd8deadSopenharmony_ci    return node;
40755bd8deadSopenharmony_ci};
40765bd8deadSopenharmony_ci
40775bd8deadSopenharmony_cigroupTypes.sizing = function(group, options) {
40785bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value, options);
40795bd8deadSopenharmony_ci
40805bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mstyle", inner);
40815bd8deadSopenharmony_ci
40825bd8deadSopenharmony_ci    // TODO(emily): This doesn't produce the correct size for nested size
40835bd8deadSopenharmony_ci    // changes, because we don't keep state of what style we're currently
40845bd8deadSopenharmony_ci    // in, so we can't reset the size to normal before changing it.  Now
40855bd8deadSopenharmony_ci    // that we're passing an options parameter we should be able to fix
40865bd8deadSopenharmony_ci    // this.
40875bd8deadSopenharmony_ci    node.setAttribute(
40885bd8deadSopenharmony_ci        "mathsize", buildCommon.sizingMultiplier[group.value.size] + "em");
40895bd8deadSopenharmony_ci
40905bd8deadSopenharmony_ci    return node;
40915bd8deadSopenharmony_ci};
40925bd8deadSopenharmony_ci
40935bd8deadSopenharmony_cigroupTypes.overline = function(group, options) {
40945bd8deadSopenharmony_ci    var operator = new mathMLTree.MathNode(
40955bd8deadSopenharmony_ci        "mo", [new mathMLTree.TextNode("\u203e")]);
40965bd8deadSopenharmony_ci    operator.setAttribute("stretchy", "true");
40975bd8deadSopenharmony_ci
40985bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
40995bd8deadSopenharmony_ci        "mover",
41005bd8deadSopenharmony_ci        [buildGroup(group.value.body, options),
41015bd8deadSopenharmony_ci            operator]);
41025bd8deadSopenharmony_ci    node.setAttribute("accent", "true");
41035bd8deadSopenharmony_ci
41045bd8deadSopenharmony_ci    return node;
41055bd8deadSopenharmony_ci};
41065bd8deadSopenharmony_ci
41075bd8deadSopenharmony_cigroupTypes.underline = function(group, options) {
41085bd8deadSopenharmony_ci    var operator = new mathMLTree.MathNode(
41095bd8deadSopenharmony_ci        "mo", [new mathMLTree.TextNode("\u203e")]);
41105bd8deadSopenharmony_ci    operator.setAttribute("stretchy", "true");
41115bd8deadSopenharmony_ci
41125bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
41135bd8deadSopenharmony_ci        "munder",
41145bd8deadSopenharmony_ci        [buildGroup(group.value.body, options),
41155bd8deadSopenharmony_ci            operator]);
41165bd8deadSopenharmony_ci    node.setAttribute("accentunder", "true");
41175bd8deadSopenharmony_ci
41185bd8deadSopenharmony_ci    return node;
41195bd8deadSopenharmony_ci};
41205bd8deadSopenharmony_ci
41215bd8deadSopenharmony_cigroupTypes.rule = function(group) {
41225bd8deadSopenharmony_ci    // TODO(emily): Figure out if there's an actual way to draw black boxes
41235bd8deadSopenharmony_ci    // in MathML.
41245bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mrow");
41255bd8deadSopenharmony_ci
41265bd8deadSopenharmony_ci    return node;
41275bd8deadSopenharmony_ci};
41285bd8deadSopenharmony_ci
41295bd8deadSopenharmony_cigroupTypes.kern = function(group) {
41305bd8deadSopenharmony_ci    // TODO(kevin): Figure out if there's a way to add space in MathML
41315bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode("mrow");
41325bd8deadSopenharmony_ci
41335bd8deadSopenharmony_ci    return node;
41345bd8deadSopenharmony_ci};
41355bd8deadSopenharmony_ci
41365bd8deadSopenharmony_cigroupTypes.llap = function(group, options) {
41375bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
41385bd8deadSopenharmony_ci        "mpadded", [buildGroup(group.value.body, options)]);
41395bd8deadSopenharmony_ci
41405bd8deadSopenharmony_ci    node.setAttribute("lspace", "-1width");
41415bd8deadSopenharmony_ci    node.setAttribute("width", "0px");
41425bd8deadSopenharmony_ci
41435bd8deadSopenharmony_ci    return node;
41445bd8deadSopenharmony_ci};
41455bd8deadSopenharmony_ci
41465bd8deadSopenharmony_cigroupTypes.rlap = function(group, options) {
41475bd8deadSopenharmony_ci    var node = new mathMLTree.MathNode(
41485bd8deadSopenharmony_ci        "mpadded", [buildGroup(group.value.body, options)]);
41495bd8deadSopenharmony_ci
41505bd8deadSopenharmony_ci    node.setAttribute("width", "0px");
41515bd8deadSopenharmony_ci
41525bd8deadSopenharmony_ci    return node;
41535bd8deadSopenharmony_ci};
41545bd8deadSopenharmony_ci
41555bd8deadSopenharmony_cigroupTypes.phantom = function(group, options) {
41565bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value, options);
41575bd8deadSopenharmony_ci    return new mathMLTree.MathNode("mphantom", inner);
41585bd8deadSopenharmony_ci};
41595bd8deadSopenharmony_ci
41605bd8deadSopenharmony_cigroupTypes.mclass = function(group, options) {
41615bd8deadSopenharmony_ci    var inner = buildExpression(group.value.value, options);
41625bd8deadSopenharmony_ci    return new mathMLTree.MathNode("mstyle", inner);
41635bd8deadSopenharmony_ci};
41645bd8deadSopenharmony_ci
41655bd8deadSopenharmony_ci/**
41665bd8deadSopenharmony_ci * Takes a list of nodes, builds them, and returns a list of the generated
41675bd8deadSopenharmony_ci * MathML nodes. A little simpler than the HTML version because we don't do any
41685bd8deadSopenharmony_ci * previous-node handling.
41695bd8deadSopenharmony_ci */
41705bd8deadSopenharmony_civar buildExpression = function(expression, options) {
41715bd8deadSopenharmony_ci    var groups = [];
41725bd8deadSopenharmony_ci    for (var i = 0; i < expression.length; i++) {
41735bd8deadSopenharmony_ci        var group = expression[i];
41745bd8deadSopenharmony_ci        groups.push(buildGroup(group, options));
41755bd8deadSopenharmony_ci    }
41765bd8deadSopenharmony_ci    return groups;
41775bd8deadSopenharmony_ci};
41785bd8deadSopenharmony_ci
41795bd8deadSopenharmony_ci/**
41805bd8deadSopenharmony_ci * Takes a group from the parser and calls the appropriate groupTypes function
41815bd8deadSopenharmony_ci * on it to produce a MathML node.
41825bd8deadSopenharmony_ci */
41835bd8deadSopenharmony_civar buildGroup = function(group, options) {
41845bd8deadSopenharmony_ci    if (!group) {
41855bd8deadSopenharmony_ci        return new mathMLTree.MathNode("mrow");
41865bd8deadSopenharmony_ci    }
41875bd8deadSopenharmony_ci
41885bd8deadSopenharmony_ci    if (groupTypes[group.type]) {
41895bd8deadSopenharmony_ci        // Call the groupTypes function
41905bd8deadSopenharmony_ci        return groupTypes[group.type](group, options);
41915bd8deadSopenharmony_ci    } else {
41925bd8deadSopenharmony_ci        throw new ParseError(
41935bd8deadSopenharmony_ci            "Got group of unknown type: '" + group.type + "'");
41945bd8deadSopenharmony_ci    }
41955bd8deadSopenharmony_ci};
41965bd8deadSopenharmony_ci
41975bd8deadSopenharmony_ci/**
41985bd8deadSopenharmony_ci * Takes a full parse tree and settings and builds a MathML representation of
41995bd8deadSopenharmony_ci * it. In particular, we put the elements from building the parse tree into a
42005bd8deadSopenharmony_ci * <semantics> tag so we can also include that TeX source as an annotation.
42015bd8deadSopenharmony_ci *
42025bd8deadSopenharmony_ci * Note that we actually return a domTree element with a `<math>` inside it so
42035bd8deadSopenharmony_ci * we can do appropriate styling.
42045bd8deadSopenharmony_ci */
42055bd8deadSopenharmony_civar buildMathML = function(tree, texExpression, options) {
42065bd8deadSopenharmony_ci    var expression = buildExpression(tree, options);
42075bd8deadSopenharmony_ci
42085bd8deadSopenharmony_ci    // Wrap up the expression in an mrow so it is presented in the semantics
42095bd8deadSopenharmony_ci    // tag correctly.
42105bd8deadSopenharmony_ci    var wrapper = new mathMLTree.MathNode("mrow", expression);
42115bd8deadSopenharmony_ci
42125bd8deadSopenharmony_ci    // Build a TeX annotation of the source
42135bd8deadSopenharmony_ci    var annotation = new mathMLTree.MathNode(
42145bd8deadSopenharmony_ci        "annotation", [new mathMLTree.TextNode(texExpression)]);
42155bd8deadSopenharmony_ci
42165bd8deadSopenharmony_ci    annotation.setAttribute("encoding", "application/x-tex");
42175bd8deadSopenharmony_ci
42185bd8deadSopenharmony_ci    var semantics = new mathMLTree.MathNode(
42195bd8deadSopenharmony_ci        "semantics", [wrapper, annotation]);
42205bd8deadSopenharmony_ci
42215bd8deadSopenharmony_ci    var math = new mathMLTree.MathNode("math", [semantics]);
42225bd8deadSopenharmony_ci
42235bd8deadSopenharmony_ci    // You can't style <math> nodes, so we wrap the node in a span.
42245bd8deadSopenharmony_ci    return makeSpan(["katex-mathml"], [math]);
42255bd8deadSopenharmony_ci};
42265bd8deadSopenharmony_ci
42275bd8deadSopenharmony_cimodule.exports = buildMathML;
42285bd8deadSopenharmony_ci
42295bd8deadSopenharmony_ci},{"./ParseError":6,"./buildCommon":10,"./fontMetrics":17,"./mathMLTree":20,"./symbols":23,"./utils":25}],13:[function(require,module,exports){
42305bd8deadSopenharmony_civar buildHTML = require("./buildHTML");
42315bd8deadSopenharmony_civar buildMathML = require("./buildMathML");
42325bd8deadSopenharmony_civar buildCommon = require("./buildCommon");
42335bd8deadSopenharmony_civar Options = require("./Options");
42345bd8deadSopenharmony_civar Settings = require("./Settings");
42355bd8deadSopenharmony_civar Style = require("./Style");
42365bd8deadSopenharmony_ci
42375bd8deadSopenharmony_civar makeSpan = buildCommon.makeSpan;
42385bd8deadSopenharmony_ci
42395bd8deadSopenharmony_civar buildTree = function(tree, expression, settings) {
42405bd8deadSopenharmony_ci    settings = settings || new Settings({});
42415bd8deadSopenharmony_ci
42425bd8deadSopenharmony_ci    var startStyle = Style.TEXT;
42435bd8deadSopenharmony_ci    if (settings.displayMode) {
42445bd8deadSopenharmony_ci        startStyle = Style.DISPLAY;
42455bd8deadSopenharmony_ci    }
42465bd8deadSopenharmony_ci
42475bd8deadSopenharmony_ci    // Setup the default options
42485bd8deadSopenharmony_ci    var options = new Options({
42495bd8deadSopenharmony_ci        style: startStyle,
42505bd8deadSopenharmony_ci        size: "size5"
42515bd8deadSopenharmony_ci    });
42525bd8deadSopenharmony_ci
42535bd8deadSopenharmony_ci    // `buildHTML` sometimes messes with the parse tree (like turning bins ->
42545bd8deadSopenharmony_ci    // ords), so we build the MathML version first.
42555bd8deadSopenharmony_ci    var mathMLNode = buildMathML(tree, expression, options);
42565bd8deadSopenharmony_ci    var htmlNode = buildHTML(tree, options);
42575bd8deadSopenharmony_ci
42585bd8deadSopenharmony_ci    var katexNode = makeSpan(["katex"], [
42595bd8deadSopenharmony_ci        mathMLNode, htmlNode
42605bd8deadSopenharmony_ci    ]);
42615bd8deadSopenharmony_ci
42625bd8deadSopenharmony_ci    if (settings.displayMode) {
42635bd8deadSopenharmony_ci        return makeSpan(["katex-display"], [katexNode]);
42645bd8deadSopenharmony_ci    } else {
42655bd8deadSopenharmony_ci        return katexNode;
42665bd8deadSopenharmony_ci    }
42675bd8deadSopenharmony_ci};
42685bd8deadSopenharmony_ci
42695bd8deadSopenharmony_cimodule.exports = buildTree;
42705bd8deadSopenharmony_ci
42715bd8deadSopenharmony_ci},{"./Options":5,"./Settings":8,"./Style":9,"./buildCommon":10,"./buildHTML":11,"./buildMathML":12}],14:[function(require,module,exports){
42725bd8deadSopenharmony_ci/**
42735bd8deadSopenharmony_ci * This file deals with creating delimiters of various sizes. The TeXbook
42745bd8deadSopenharmony_ci * discusses these routines on page 441-442, in the "Another subroutine sets box
42755bd8deadSopenharmony_ci * x to a specified variable delimiter" paragraph.
42765bd8deadSopenharmony_ci *
42775bd8deadSopenharmony_ci * There are three main routines here. `makeSmallDelim` makes a delimiter in the
42785bd8deadSopenharmony_ci * normal font, but in either text, script, or scriptscript style.
42795bd8deadSopenharmony_ci * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,
42805bd8deadSopenharmony_ci * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of
42815bd8deadSopenharmony_ci * smaller pieces that are stacked on top of one another.
42825bd8deadSopenharmony_ci *
42835bd8deadSopenharmony_ci * The functions take a parameter `center`, which determines if the delimiter
42845bd8deadSopenharmony_ci * should be centered around the axis.
42855bd8deadSopenharmony_ci *
42865bd8deadSopenharmony_ci * Then, there are three exposed functions. `sizedDelim` makes a delimiter in
42875bd8deadSopenharmony_ci * one of the given sizes. This is used for things like `\bigl`.
42885bd8deadSopenharmony_ci * `customSizedDelim` makes a delimiter with a given total height+depth. It is
42895bd8deadSopenharmony_ci * called in places like `\sqrt`. `leftRightDelim` makes an appropriate
42905bd8deadSopenharmony_ci * delimiter which surrounds an expression of a given height an depth. It is
42915bd8deadSopenharmony_ci * used in `\left` and `\right`.
42925bd8deadSopenharmony_ci */
42935bd8deadSopenharmony_ci
42945bd8deadSopenharmony_civar ParseError = require("./ParseError");
42955bd8deadSopenharmony_civar Style = require("./Style");
42965bd8deadSopenharmony_ci
42975bd8deadSopenharmony_civar buildCommon = require("./buildCommon");
42985bd8deadSopenharmony_civar fontMetrics = require("./fontMetrics");
42995bd8deadSopenharmony_civar symbols = require("./symbols");
43005bd8deadSopenharmony_civar utils = require("./utils");
43015bd8deadSopenharmony_ci
43025bd8deadSopenharmony_civar makeSpan = buildCommon.makeSpan;
43035bd8deadSopenharmony_ci
43045bd8deadSopenharmony_ci/**
43055bd8deadSopenharmony_ci * Get the metrics for a given symbol and font, after transformation (i.e.
43065bd8deadSopenharmony_ci * after following replacement from symbols.js)
43075bd8deadSopenharmony_ci */
43085bd8deadSopenharmony_civar getMetrics = function(symbol, font) {
43095bd8deadSopenharmony_ci    if (symbols.math[symbol] && symbols.math[symbol].replace) {
43105bd8deadSopenharmony_ci        return fontMetrics.getCharacterMetrics(
43115bd8deadSopenharmony_ci            symbols.math[symbol].replace, font);
43125bd8deadSopenharmony_ci    } else {
43135bd8deadSopenharmony_ci        return fontMetrics.getCharacterMetrics(
43145bd8deadSopenharmony_ci            symbol, font);
43155bd8deadSopenharmony_ci    }
43165bd8deadSopenharmony_ci};
43175bd8deadSopenharmony_ci
43185bd8deadSopenharmony_ci/**
43195bd8deadSopenharmony_ci * Builds a symbol in the given font size (note size is an integer)
43205bd8deadSopenharmony_ci */
43215bd8deadSopenharmony_civar mathrmSize = function(value, size, mode, options) {
43225bd8deadSopenharmony_ci    return buildCommon.makeSymbol(value, "Size" + size + "-Regular",
43235bd8deadSopenharmony_ci        mode, options);
43245bd8deadSopenharmony_ci};
43255bd8deadSopenharmony_ci
43265bd8deadSopenharmony_ci/**
43275bd8deadSopenharmony_ci * Puts a delimiter span in a given style, and adds appropriate height, depth,
43285bd8deadSopenharmony_ci * and maxFontSizes.
43295bd8deadSopenharmony_ci */
43305bd8deadSopenharmony_civar styleWrap = function(delim, toStyle, options, classes) {
43315bd8deadSopenharmony_ci    classes = classes || [];
43325bd8deadSopenharmony_ci    var span = makeSpan(
43335bd8deadSopenharmony_ci        classes.concat(["style-wrap", options.style.reset(), toStyle.cls()]),
43345bd8deadSopenharmony_ci        [delim], options);
43355bd8deadSopenharmony_ci
43365bd8deadSopenharmony_ci    var multiplier = toStyle.sizeMultiplier / options.style.sizeMultiplier;
43375bd8deadSopenharmony_ci
43385bd8deadSopenharmony_ci    span.height *= multiplier;
43395bd8deadSopenharmony_ci    span.depth *= multiplier;
43405bd8deadSopenharmony_ci    span.maxFontSize = toStyle.sizeMultiplier;
43415bd8deadSopenharmony_ci
43425bd8deadSopenharmony_ci    return span;
43435bd8deadSopenharmony_ci};
43445bd8deadSopenharmony_ci
43455bd8deadSopenharmony_ci/**
43465bd8deadSopenharmony_ci * Makes a small delimiter. This is a delimiter that comes in the Main-Regular
43475bd8deadSopenharmony_ci * font, but is restyled to either be in textstyle, scriptstyle, or
43485bd8deadSopenharmony_ci * scriptscriptstyle.
43495bd8deadSopenharmony_ci */
43505bd8deadSopenharmony_civar makeSmallDelim = function(delim, style, center, options, mode, classes) {
43515bd8deadSopenharmony_ci    var text = buildCommon.makeSymbol(delim, "Main-Regular", mode, options);
43525bd8deadSopenharmony_ci
43535bd8deadSopenharmony_ci    var span = styleWrap(text, style, options, classes);
43545bd8deadSopenharmony_ci
43555bd8deadSopenharmony_ci    if (center) {
43565bd8deadSopenharmony_ci        var shift =
43575bd8deadSopenharmony_ci            (1 - options.style.sizeMultiplier / style.sizeMultiplier) *
43585bd8deadSopenharmony_ci            options.style.metrics.axisHeight;
43595bd8deadSopenharmony_ci
43605bd8deadSopenharmony_ci        span.style.top = shift + "em";
43615bd8deadSopenharmony_ci        span.height -= shift;
43625bd8deadSopenharmony_ci        span.depth += shift;
43635bd8deadSopenharmony_ci    }
43645bd8deadSopenharmony_ci
43655bd8deadSopenharmony_ci    return span;
43665bd8deadSopenharmony_ci};
43675bd8deadSopenharmony_ci
43685bd8deadSopenharmony_ci/**
43695bd8deadSopenharmony_ci * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,
43705bd8deadSopenharmony_ci * Size3, or Size4 fonts. It is always rendered in textstyle.
43715bd8deadSopenharmony_ci */
43725bd8deadSopenharmony_civar makeLargeDelim = function(delim, size, center, options, mode, classes) {
43735bd8deadSopenharmony_ci    var inner = mathrmSize(delim, size, mode, options);
43745bd8deadSopenharmony_ci
43755bd8deadSopenharmony_ci    var span = styleWrap(
43765bd8deadSopenharmony_ci        makeSpan(["delimsizing", "size" + size], [inner], options),
43775bd8deadSopenharmony_ci        Style.TEXT, options, classes);
43785bd8deadSopenharmony_ci
43795bd8deadSopenharmony_ci    if (center) {
43805bd8deadSopenharmony_ci        var shift = (1 - options.style.sizeMultiplier) *
43815bd8deadSopenharmony_ci            options.style.metrics.axisHeight;
43825bd8deadSopenharmony_ci
43835bd8deadSopenharmony_ci        span.style.top = shift + "em";
43845bd8deadSopenharmony_ci        span.height -= shift;
43855bd8deadSopenharmony_ci        span.depth += shift;
43865bd8deadSopenharmony_ci    }
43875bd8deadSopenharmony_ci
43885bd8deadSopenharmony_ci    return span;
43895bd8deadSopenharmony_ci};
43905bd8deadSopenharmony_ci
43915bd8deadSopenharmony_ci/**
43925bd8deadSopenharmony_ci * Make an inner span with the given offset and in the given font. This is used
43935bd8deadSopenharmony_ci * in `makeStackedDelim` to make the stacking pieces for the delimiter.
43945bd8deadSopenharmony_ci */
43955bd8deadSopenharmony_civar makeInner = function(symbol, font, mode) {
43965bd8deadSopenharmony_ci    var sizeClass;
43975bd8deadSopenharmony_ci    // Apply the correct CSS class to choose the right font.
43985bd8deadSopenharmony_ci    if (font === "Size1-Regular") {
43995bd8deadSopenharmony_ci        sizeClass = "delim-size1";
44005bd8deadSopenharmony_ci    } else if (font === "Size4-Regular") {
44015bd8deadSopenharmony_ci        sizeClass = "delim-size4";
44025bd8deadSopenharmony_ci    }
44035bd8deadSopenharmony_ci
44045bd8deadSopenharmony_ci    var inner = makeSpan(
44055bd8deadSopenharmony_ci        ["delimsizinginner", sizeClass],
44065bd8deadSopenharmony_ci        [makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]);
44075bd8deadSopenharmony_ci
44085bd8deadSopenharmony_ci    // Since this will be passed into `makeVList` in the end, wrap the element
44095bd8deadSopenharmony_ci    // in the appropriate tag that VList uses.
44105bd8deadSopenharmony_ci    return {type: "elem", elem: inner};
44115bd8deadSopenharmony_ci};
44125bd8deadSopenharmony_ci
44135bd8deadSopenharmony_ci/**
44145bd8deadSopenharmony_ci * Make a stacked delimiter out of a given delimiter, with the total height at
44155bd8deadSopenharmony_ci * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.
44165bd8deadSopenharmony_ci */
44175bd8deadSopenharmony_civar makeStackedDelim = function(delim, heightTotal, center, options, mode,
44185bd8deadSopenharmony_ci                                classes) {
44195bd8deadSopenharmony_ci    // There are four parts, the top, an optional middle, a repeated part, and a
44205bd8deadSopenharmony_ci    // bottom.
44215bd8deadSopenharmony_ci    var top;
44225bd8deadSopenharmony_ci    var middle;
44235bd8deadSopenharmony_ci    var repeat;
44245bd8deadSopenharmony_ci    var bottom;
44255bd8deadSopenharmony_ci    top = repeat = bottom = delim;
44265bd8deadSopenharmony_ci    middle = null;
44275bd8deadSopenharmony_ci    // Also keep track of what font the delimiters are in
44285bd8deadSopenharmony_ci    var font = "Size1-Regular";
44295bd8deadSopenharmony_ci
44305bd8deadSopenharmony_ci    // We set the parts and font based on the symbol. Note that we use
44315bd8deadSopenharmony_ci    // '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the
44325bd8deadSopenharmony_ci    // repeats of the arrows
44335bd8deadSopenharmony_ci    if (delim === "\\uparrow") {
44345bd8deadSopenharmony_ci        repeat = bottom = "\u23d0";
44355bd8deadSopenharmony_ci    } else if (delim === "\\Uparrow") {
44365bd8deadSopenharmony_ci        repeat = bottom = "\u2016";
44375bd8deadSopenharmony_ci    } else if (delim === "\\downarrow") {
44385bd8deadSopenharmony_ci        top = repeat = "\u23d0";
44395bd8deadSopenharmony_ci    } else if (delim === "\\Downarrow") {
44405bd8deadSopenharmony_ci        top = repeat = "\u2016";
44415bd8deadSopenharmony_ci    } else if (delim === "\\updownarrow") {
44425bd8deadSopenharmony_ci        top = "\\uparrow";
44435bd8deadSopenharmony_ci        repeat = "\u23d0";
44445bd8deadSopenharmony_ci        bottom = "\\downarrow";
44455bd8deadSopenharmony_ci    } else if (delim === "\\Updownarrow") {
44465bd8deadSopenharmony_ci        top = "\\Uparrow";
44475bd8deadSopenharmony_ci        repeat = "\u2016";
44485bd8deadSopenharmony_ci        bottom = "\\Downarrow";
44495bd8deadSopenharmony_ci    } else if (delim === "[" || delim === "\\lbrack") {
44505bd8deadSopenharmony_ci        top = "\u23a1";
44515bd8deadSopenharmony_ci        repeat = "\u23a2";
44525bd8deadSopenharmony_ci        bottom = "\u23a3";
44535bd8deadSopenharmony_ci        font = "Size4-Regular";
44545bd8deadSopenharmony_ci    } else if (delim === "]" || delim === "\\rbrack") {
44555bd8deadSopenharmony_ci        top = "\u23a4";
44565bd8deadSopenharmony_ci        repeat = "\u23a5";
44575bd8deadSopenharmony_ci        bottom = "\u23a6";
44585bd8deadSopenharmony_ci        font = "Size4-Regular";
44595bd8deadSopenharmony_ci    } else if (delim === "\\lfloor") {
44605bd8deadSopenharmony_ci        repeat = top = "\u23a2";
44615bd8deadSopenharmony_ci        bottom = "\u23a3";
44625bd8deadSopenharmony_ci        font = "Size4-Regular";
44635bd8deadSopenharmony_ci    } else if (delim === "\\lceil") {
44645bd8deadSopenharmony_ci        top = "\u23a1";
44655bd8deadSopenharmony_ci        repeat = bottom = "\u23a2";
44665bd8deadSopenharmony_ci        font = "Size4-Regular";
44675bd8deadSopenharmony_ci    } else if (delim === "\\rfloor") {
44685bd8deadSopenharmony_ci        repeat = top = "\u23a5";
44695bd8deadSopenharmony_ci        bottom = "\u23a6";
44705bd8deadSopenharmony_ci        font = "Size4-Regular";
44715bd8deadSopenharmony_ci    } else if (delim === "\\rceil") {
44725bd8deadSopenharmony_ci        top = "\u23a4";
44735bd8deadSopenharmony_ci        repeat = bottom = "\u23a5";
44745bd8deadSopenharmony_ci        font = "Size4-Regular";
44755bd8deadSopenharmony_ci    } else if (delim === "(") {
44765bd8deadSopenharmony_ci        top = "\u239b";
44775bd8deadSopenharmony_ci        repeat = "\u239c";
44785bd8deadSopenharmony_ci        bottom = "\u239d";
44795bd8deadSopenharmony_ci        font = "Size4-Regular";
44805bd8deadSopenharmony_ci    } else if (delim === ")") {
44815bd8deadSopenharmony_ci        top = "\u239e";
44825bd8deadSopenharmony_ci        repeat = "\u239f";
44835bd8deadSopenharmony_ci        bottom = "\u23a0";
44845bd8deadSopenharmony_ci        font = "Size4-Regular";
44855bd8deadSopenharmony_ci    } else if (delim === "\\{" || delim === "\\lbrace") {
44865bd8deadSopenharmony_ci        top = "\u23a7";
44875bd8deadSopenharmony_ci        middle = "\u23a8";
44885bd8deadSopenharmony_ci        bottom = "\u23a9";
44895bd8deadSopenharmony_ci        repeat = "\u23aa";
44905bd8deadSopenharmony_ci        font = "Size4-Regular";
44915bd8deadSopenharmony_ci    } else if (delim === "\\}" || delim === "\\rbrace") {
44925bd8deadSopenharmony_ci        top = "\u23ab";
44935bd8deadSopenharmony_ci        middle = "\u23ac";
44945bd8deadSopenharmony_ci        bottom = "\u23ad";
44955bd8deadSopenharmony_ci        repeat = "\u23aa";
44965bd8deadSopenharmony_ci        font = "Size4-Regular";
44975bd8deadSopenharmony_ci    } else if (delim === "\\lgroup") {
44985bd8deadSopenharmony_ci        top = "\u23a7";
44995bd8deadSopenharmony_ci        bottom = "\u23a9";
45005bd8deadSopenharmony_ci        repeat = "\u23aa";
45015bd8deadSopenharmony_ci        font = "Size4-Regular";
45025bd8deadSopenharmony_ci    } else if (delim === "\\rgroup") {
45035bd8deadSopenharmony_ci        top = "\u23ab";
45045bd8deadSopenharmony_ci        bottom = "\u23ad";
45055bd8deadSopenharmony_ci        repeat = "\u23aa";
45065bd8deadSopenharmony_ci        font = "Size4-Regular";
45075bd8deadSopenharmony_ci    } else if (delim === "\\lmoustache") {
45085bd8deadSopenharmony_ci        top = "\u23a7";
45095bd8deadSopenharmony_ci        bottom = "\u23ad";
45105bd8deadSopenharmony_ci        repeat = "\u23aa";
45115bd8deadSopenharmony_ci        font = "Size4-Regular";
45125bd8deadSopenharmony_ci    } else if (delim === "\\rmoustache") {
45135bd8deadSopenharmony_ci        top = "\u23ab";
45145bd8deadSopenharmony_ci        bottom = "\u23a9";
45155bd8deadSopenharmony_ci        repeat = "\u23aa";
45165bd8deadSopenharmony_ci        font = "Size4-Regular";
45175bd8deadSopenharmony_ci    } else if (delim === "\\surd") {
45185bd8deadSopenharmony_ci        top = "\ue001";
45195bd8deadSopenharmony_ci        bottom = "\u23b7";
45205bd8deadSopenharmony_ci        repeat = "\ue000";
45215bd8deadSopenharmony_ci        font = "Size4-Regular";
45225bd8deadSopenharmony_ci    }
45235bd8deadSopenharmony_ci
45245bd8deadSopenharmony_ci    // Get the metrics of the four sections
45255bd8deadSopenharmony_ci    var topMetrics = getMetrics(top, font);
45265bd8deadSopenharmony_ci    var topHeightTotal = topMetrics.height + topMetrics.depth;
45275bd8deadSopenharmony_ci    var repeatMetrics = getMetrics(repeat, font);
45285bd8deadSopenharmony_ci    var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;
45295bd8deadSopenharmony_ci    var bottomMetrics = getMetrics(bottom, font);
45305bd8deadSopenharmony_ci    var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;
45315bd8deadSopenharmony_ci    var middleHeightTotal = 0;
45325bd8deadSopenharmony_ci    var middleFactor = 1;
45335bd8deadSopenharmony_ci    if (middle !== null) {
45345bd8deadSopenharmony_ci        var middleMetrics = getMetrics(middle, font);
45355bd8deadSopenharmony_ci        middleHeightTotal = middleMetrics.height + middleMetrics.depth;
45365bd8deadSopenharmony_ci        middleFactor = 2; // repeat symmetrically above and below middle
45375bd8deadSopenharmony_ci    }
45385bd8deadSopenharmony_ci
45395bd8deadSopenharmony_ci    // Calcuate the minimal height that the delimiter can have.
45405bd8deadSopenharmony_ci    // It is at least the size of the top, bottom, and optional middle combined.
45415bd8deadSopenharmony_ci    var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal;
45425bd8deadSopenharmony_ci
45435bd8deadSopenharmony_ci    // Compute the number of copies of the repeat symbol we will need
45445bd8deadSopenharmony_ci    var repeatCount = Math.ceil(
45455bd8deadSopenharmony_ci        (heightTotal - minHeight) / (middleFactor * repeatHeightTotal));
45465bd8deadSopenharmony_ci
45475bd8deadSopenharmony_ci    // Compute the total height of the delimiter including all the symbols
45485bd8deadSopenharmony_ci    var realHeightTotal =
45495bd8deadSopenharmony_ci        minHeight + repeatCount * middleFactor * repeatHeightTotal;
45505bd8deadSopenharmony_ci
45515bd8deadSopenharmony_ci    // The center of the delimiter is placed at the center of the axis. Note
45525bd8deadSopenharmony_ci    // that in this context, "center" means that the delimiter should be
45535bd8deadSopenharmony_ci    // centered around the axis in the current style, while normally it is
45545bd8deadSopenharmony_ci    // centered around the axis in textstyle.
45555bd8deadSopenharmony_ci    var axisHeight = options.style.metrics.axisHeight;
45565bd8deadSopenharmony_ci    if (center) {
45575bd8deadSopenharmony_ci        axisHeight *= options.style.sizeMultiplier;
45585bd8deadSopenharmony_ci    }
45595bd8deadSopenharmony_ci    // Calculate the depth
45605bd8deadSopenharmony_ci    var depth = realHeightTotal / 2 - axisHeight;
45615bd8deadSopenharmony_ci
45625bd8deadSopenharmony_ci    // Now, we start building the pieces that will go into the vlist
45635bd8deadSopenharmony_ci
45645bd8deadSopenharmony_ci    // Keep a list of the inner pieces
45655bd8deadSopenharmony_ci    var inners = [];
45665bd8deadSopenharmony_ci
45675bd8deadSopenharmony_ci    // Add the bottom symbol
45685bd8deadSopenharmony_ci    inners.push(makeInner(bottom, font, mode));
45695bd8deadSopenharmony_ci
45705bd8deadSopenharmony_ci    var i;
45715bd8deadSopenharmony_ci    if (middle === null) {
45725bd8deadSopenharmony_ci        // Add that many symbols
45735bd8deadSopenharmony_ci        for (i = 0; i < repeatCount; i++) {
45745bd8deadSopenharmony_ci            inners.push(makeInner(repeat, font, mode));
45755bd8deadSopenharmony_ci        }
45765bd8deadSopenharmony_ci    } else {
45775bd8deadSopenharmony_ci        // When there is a middle bit, we need the middle part and two repeated
45785bd8deadSopenharmony_ci        // sections
45795bd8deadSopenharmony_ci        for (i = 0; i < repeatCount; i++) {
45805bd8deadSopenharmony_ci            inners.push(makeInner(repeat, font, mode));
45815bd8deadSopenharmony_ci        }
45825bd8deadSopenharmony_ci        inners.push(makeInner(middle, font, mode));
45835bd8deadSopenharmony_ci        for (i = 0; i < repeatCount; i++) {
45845bd8deadSopenharmony_ci            inners.push(makeInner(repeat, font, mode));
45855bd8deadSopenharmony_ci        }
45865bd8deadSopenharmony_ci    }
45875bd8deadSopenharmony_ci
45885bd8deadSopenharmony_ci    // Add the top symbol
45895bd8deadSopenharmony_ci    inners.push(makeInner(top, font, mode));
45905bd8deadSopenharmony_ci
45915bd8deadSopenharmony_ci    // Finally, build the vlist
45925bd8deadSopenharmony_ci    var inner = buildCommon.makeVList(inners, "bottom", depth, options);
45935bd8deadSopenharmony_ci
45945bd8deadSopenharmony_ci    return styleWrap(
45955bd8deadSopenharmony_ci        makeSpan(["delimsizing", "mult"], [inner], options),
45965bd8deadSopenharmony_ci        Style.TEXT, options, classes);
45975bd8deadSopenharmony_ci};
45985bd8deadSopenharmony_ci
45995bd8deadSopenharmony_ci// There are three kinds of delimiters, delimiters that stack when they become
46005bd8deadSopenharmony_ci// too large
46015bd8deadSopenharmony_civar stackLargeDelimiters = [
46025bd8deadSopenharmony_ci    "(", ")", "[", "\\lbrack", "]", "\\rbrack",
46035bd8deadSopenharmony_ci    "\\{", "\\lbrace", "\\}", "\\rbrace",
46045bd8deadSopenharmony_ci    "\\lfloor", "\\rfloor", "\\lceil", "\\rceil",
46055bd8deadSopenharmony_ci    "\\surd"
46065bd8deadSopenharmony_ci];
46075bd8deadSopenharmony_ci
46085bd8deadSopenharmony_ci// delimiters that always stack
46095bd8deadSopenharmony_civar stackAlwaysDelimiters = [
46105bd8deadSopenharmony_ci    "\\uparrow", "\\downarrow", "\\updownarrow",
46115bd8deadSopenharmony_ci    "\\Uparrow", "\\Downarrow", "\\Updownarrow",
46125bd8deadSopenharmony_ci    "|", "\\|", "\\vert", "\\Vert",
46135bd8deadSopenharmony_ci    "\\lvert", "\\rvert", "\\lVert", "\\rVert",
46145bd8deadSopenharmony_ci    "\\lgroup", "\\rgroup", "\\lmoustache", "\\rmoustache"
46155bd8deadSopenharmony_ci];
46165bd8deadSopenharmony_ci
46175bd8deadSopenharmony_ci// and delimiters that never stack
46185bd8deadSopenharmony_civar stackNeverDelimiters = [
46195bd8deadSopenharmony_ci    "<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"
46205bd8deadSopenharmony_ci];
46215bd8deadSopenharmony_ci
46225bd8deadSopenharmony_ci// Metrics of the different sizes. Found by looking at TeX's output of
46235bd8deadSopenharmony_ci// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$
46245bd8deadSopenharmony_ci// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.
46255bd8deadSopenharmony_civar sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];
46265bd8deadSopenharmony_ci
46275bd8deadSopenharmony_ci/**
46285bd8deadSopenharmony_ci * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.
46295bd8deadSopenharmony_ci */
46305bd8deadSopenharmony_civar makeSizedDelim = function(delim, size, options, mode, classes) {
46315bd8deadSopenharmony_ci    // < and > turn into \langle and \rangle in delimiters
46325bd8deadSopenharmony_ci    if (delim === "<" || delim === "\\lt") {
46335bd8deadSopenharmony_ci        delim = "\\langle";
46345bd8deadSopenharmony_ci    } else if (delim === ">" || delim === "\\gt") {
46355bd8deadSopenharmony_ci        delim = "\\rangle";
46365bd8deadSopenharmony_ci    }
46375bd8deadSopenharmony_ci
46385bd8deadSopenharmony_ci    // Sized delimiters are never centered.
46395bd8deadSopenharmony_ci    if (utils.contains(stackLargeDelimiters, delim) ||
46405bd8deadSopenharmony_ci        utils.contains(stackNeverDelimiters, delim)) {
46415bd8deadSopenharmony_ci        return makeLargeDelim(delim, size, false, options, mode, classes);
46425bd8deadSopenharmony_ci    } else if (utils.contains(stackAlwaysDelimiters, delim)) {
46435bd8deadSopenharmony_ci        return makeStackedDelim(
46445bd8deadSopenharmony_ci            delim, sizeToMaxHeight[size], false, options, mode, classes);
46455bd8deadSopenharmony_ci    } else {
46465bd8deadSopenharmony_ci        throw new ParseError("Illegal delimiter: '" + delim + "'");
46475bd8deadSopenharmony_ci    }
46485bd8deadSopenharmony_ci};
46495bd8deadSopenharmony_ci
46505bd8deadSopenharmony_ci/**
46515bd8deadSopenharmony_ci * There are three different sequences of delimiter sizes that the delimiters
46525bd8deadSopenharmony_ci * follow depending on the kind of delimiter. This is used when creating custom
46535bd8deadSopenharmony_ci * sized delimiters to decide whether to create a small, large, or stacked
46545bd8deadSopenharmony_ci * delimiter.
46555bd8deadSopenharmony_ci *
46565bd8deadSopenharmony_ci * In real TeX, these sequences aren't explicitly defined, but are instead
46575bd8deadSopenharmony_ci * defined inside the font metrics. Since there are only three sequences that
46585bd8deadSopenharmony_ci * are possible for the delimiters that TeX defines, it is easier to just encode
46595bd8deadSopenharmony_ci * them explicitly here.
46605bd8deadSopenharmony_ci */
46615bd8deadSopenharmony_ci
46625bd8deadSopenharmony_ci// Delimiters that never stack try small delimiters and large delimiters only
46635bd8deadSopenharmony_civar stackNeverDelimiterSequence = [
46645bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPTSCRIPT},
46655bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPT},
46665bd8deadSopenharmony_ci    {type: "small", style: Style.TEXT},
46675bd8deadSopenharmony_ci    {type: "large", size: 1},
46685bd8deadSopenharmony_ci    {type: "large", size: 2},
46695bd8deadSopenharmony_ci    {type: "large", size: 3},
46705bd8deadSopenharmony_ci    {type: "large", size: 4}
46715bd8deadSopenharmony_ci];
46725bd8deadSopenharmony_ci
46735bd8deadSopenharmony_ci// Delimiters that always stack try the small delimiters first, then stack
46745bd8deadSopenharmony_civar stackAlwaysDelimiterSequence = [
46755bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPTSCRIPT},
46765bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPT},
46775bd8deadSopenharmony_ci    {type: "small", style: Style.TEXT},
46785bd8deadSopenharmony_ci    {type: "stack"}
46795bd8deadSopenharmony_ci];
46805bd8deadSopenharmony_ci
46815bd8deadSopenharmony_ci// Delimiters that stack when large try the small and then large delimiters, and
46825bd8deadSopenharmony_ci// stack afterwards
46835bd8deadSopenharmony_civar stackLargeDelimiterSequence = [
46845bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPTSCRIPT},
46855bd8deadSopenharmony_ci    {type: "small", style: Style.SCRIPT},
46865bd8deadSopenharmony_ci    {type: "small", style: Style.TEXT},
46875bd8deadSopenharmony_ci    {type: "large", size: 1},
46885bd8deadSopenharmony_ci    {type: "large", size: 2},
46895bd8deadSopenharmony_ci    {type: "large", size: 3},
46905bd8deadSopenharmony_ci    {type: "large", size: 4},
46915bd8deadSopenharmony_ci    {type: "stack"}
46925bd8deadSopenharmony_ci];
46935bd8deadSopenharmony_ci
46945bd8deadSopenharmony_ci/**
46955bd8deadSopenharmony_ci * Get the font used in a delimiter based on what kind of delimiter it is.
46965bd8deadSopenharmony_ci */
46975bd8deadSopenharmony_civar delimTypeToFont = function(type) {
46985bd8deadSopenharmony_ci    if (type.type === "small") {
46995bd8deadSopenharmony_ci        return "Main-Regular";
47005bd8deadSopenharmony_ci    } else if (type.type === "large") {
47015bd8deadSopenharmony_ci        return "Size" + type.size + "-Regular";
47025bd8deadSopenharmony_ci    } else if (type.type === "stack") {
47035bd8deadSopenharmony_ci        return "Size4-Regular";
47045bd8deadSopenharmony_ci    }
47055bd8deadSopenharmony_ci};
47065bd8deadSopenharmony_ci
47075bd8deadSopenharmony_ci/**
47085bd8deadSopenharmony_ci * Traverse a sequence of types of delimiters to decide what kind of delimiter
47095bd8deadSopenharmony_ci * should be used to create a delimiter of the given height+depth.
47105bd8deadSopenharmony_ci */
47115bd8deadSopenharmony_civar traverseSequence = function(delim, height, sequence, options) {
47125bd8deadSopenharmony_ci    // Here, we choose the index we should start at in the sequences. In smaller
47135bd8deadSopenharmony_ci    // sizes (which correspond to larger numbers in style.size) we start earlier
47145bd8deadSopenharmony_ci    // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts
47155bd8deadSopenharmony_ci    // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2
47165bd8deadSopenharmony_ci    var start = Math.min(2, 3 - options.style.size);
47175bd8deadSopenharmony_ci    for (var i = start; i < sequence.length; i++) {
47185bd8deadSopenharmony_ci        if (sequence[i].type === "stack") {
47195bd8deadSopenharmony_ci            // This is always the last delimiter, so we just break the loop now.
47205bd8deadSopenharmony_ci            break;
47215bd8deadSopenharmony_ci        }
47225bd8deadSopenharmony_ci
47235bd8deadSopenharmony_ci        var metrics = getMetrics(delim, delimTypeToFont(sequence[i]));
47245bd8deadSopenharmony_ci        var heightDepth = metrics.height + metrics.depth;
47255bd8deadSopenharmony_ci
47265bd8deadSopenharmony_ci        // Small delimiters are scaled down versions of the same font, so we
47275bd8deadSopenharmony_ci        // account for the style change size.
47285bd8deadSopenharmony_ci
47295bd8deadSopenharmony_ci        if (sequence[i].type === "small") {
47305bd8deadSopenharmony_ci            heightDepth *= sequence[i].style.sizeMultiplier;
47315bd8deadSopenharmony_ci        }
47325bd8deadSopenharmony_ci
47335bd8deadSopenharmony_ci        // Check if the delimiter at this size works for the given height.
47345bd8deadSopenharmony_ci        if (heightDepth > height) {
47355bd8deadSopenharmony_ci            return sequence[i];
47365bd8deadSopenharmony_ci        }
47375bd8deadSopenharmony_ci    }
47385bd8deadSopenharmony_ci
47395bd8deadSopenharmony_ci    // If we reached the end of the sequence, return the last sequence element.
47405bd8deadSopenharmony_ci    return sequence[sequence.length - 1];
47415bd8deadSopenharmony_ci};
47425bd8deadSopenharmony_ci
47435bd8deadSopenharmony_ci/**
47445bd8deadSopenharmony_ci * Make a delimiter of a given height+depth, with optional centering. Here, we
47455bd8deadSopenharmony_ci * traverse the sequences, and create a delimiter that the sequence tells us to.
47465bd8deadSopenharmony_ci */
47475bd8deadSopenharmony_civar makeCustomSizedDelim = function(delim, height, center, options, mode,
47485bd8deadSopenharmony_ci                                    classes) {
47495bd8deadSopenharmony_ci    if (delim === "<" || delim === "\\lt") {
47505bd8deadSopenharmony_ci        delim = "\\langle";
47515bd8deadSopenharmony_ci    } else if (delim === ">" || delim === "\\gt") {
47525bd8deadSopenharmony_ci        delim = "\\rangle";
47535bd8deadSopenharmony_ci    }
47545bd8deadSopenharmony_ci
47555bd8deadSopenharmony_ci    // Decide what sequence to use
47565bd8deadSopenharmony_ci    var sequence;
47575bd8deadSopenharmony_ci    if (utils.contains(stackNeverDelimiters, delim)) {
47585bd8deadSopenharmony_ci        sequence = stackNeverDelimiterSequence;
47595bd8deadSopenharmony_ci    } else if (utils.contains(stackLargeDelimiters, delim)) {
47605bd8deadSopenharmony_ci        sequence = stackLargeDelimiterSequence;
47615bd8deadSopenharmony_ci    } else {
47625bd8deadSopenharmony_ci        sequence = stackAlwaysDelimiterSequence;
47635bd8deadSopenharmony_ci    }
47645bd8deadSopenharmony_ci
47655bd8deadSopenharmony_ci    // Look through the sequence
47665bd8deadSopenharmony_ci    var delimType = traverseSequence(delim, height, sequence, options);
47675bd8deadSopenharmony_ci
47685bd8deadSopenharmony_ci    // Depending on the sequence element we decided on, call the appropriate
47695bd8deadSopenharmony_ci    // function.
47705bd8deadSopenharmony_ci    if (delimType.type === "small") {
47715bd8deadSopenharmony_ci        return makeSmallDelim(delim, delimType.style, center, options, mode,
47725bd8deadSopenharmony_ci                              classes);
47735bd8deadSopenharmony_ci    } else if (delimType.type === "large") {
47745bd8deadSopenharmony_ci        return makeLargeDelim(delim, delimType.size, center, options, mode,
47755bd8deadSopenharmony_ci                              classes);
47765bd8deadSopenharmony_ci    } else if (delimType.type === "stack") {
47775bd8deadSopenharmony_ci        return makeStackedDelim(delim, height, center, options, mode, classes);
47785bd8deadSopenharmony_ci    }
47795bd8deadSopenharmony_ci};
47805bd8deadSopenharmony_ci
47815bd8deadSopenharmony_ci/**
47825bd8deadSopenharmony_ci * Make a delimiter for use with `\left` and `\right`, given a height and depth
47835bd8deadSopenharmony_ci * of an expression that the delimiters surround.
47845bd8deadSopenharmony_ci */
47855bd8deadSopenharmony_civar makeLeftRightDelim = function(delim, height, depth, options, mode,
47865bd8deadSopenharmony_ci                                  classes) {
47875bd8deadSopenharmony_ci    // We always center \left/\right delimiters, so the axis is always shifted
47885bd8deadSopenharmony_ci    var axisHeight =
47895bd8deadSopenharmony_ci        options.style.metrics.axisHeight * options.style.sizeMultiplier;
47905bd8deadSopenharmony_ci
47915bd8deadSopenharmony_ci    // Taken from TeX source, tex.web, function make_left_right
47925bd8deadSopenharmony_ci    var delimiterFactor = 901;
47935bd8deadSopenharmony_ci    var delimiterExtend = 5.0 / fontMetrics.metrics.ptPerEm;
47945bd8deadSopenharmony_ci
47955bd8deadSopenharmony_ci    var maxDistFromAxis = Math.max(
47965bd8deadSopenharmony_ci        height - axisHeight, depth + axisHeight);
47975bd8deadSopenharmony_ci
47985bd8deadSopenharmony_ci    var totalHeight = Math.max(
47995bd8deadSopenharmony_ci        // In real TeX, calculations are done using integral values which are
48005bd8deadSopenharmony_ci        // 65536 per pt, or 655360 per em. So, the division here truncates in
48015bd8deadSopenharmony_ci        // TeX but doesn't here, producing different results. If we wanted to
48025bd8deadSopenharmony_ci        // exactly match TeX's calculation, we could do
48035bd8deadSopenharmony_ci        //   Math.floor(655360 * maxDistFromAxis / 500) *
48045bd8deadSopenharmony_ci        //    delimiterFactor / 655360
48055bd8deadSopenharmony_ci        // (To see the difference, compare
48065bd8deadSopenharmony_ci        //    x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
48075bd8deadSopenharmony_ci        // in TeX and KaTeX)
48085bd8deadSopenharmony_ci        maxDistFromAxis / 500 * delimiterFactor,
48095bd8deadSopenharmony_ci        2 * maxDistFromAxis - delimiterExtend);
48105bd8deadSopenharmony_ci
48115bd8deadSopenharmony_ci    // Finally, we defer to `makeCustomSizedDelim` with our calculated total
48125bd8deadSopenharmony_ci    // height
48135bd8deadSopenharmony_ci    return makeCustomSizedDelim(delim, totalHeight, true, options, mode,
48145bd8deadSopenharmony_ci                                classes);
48155bd8deadSopenharmony_ci};
48165bd8deadSopenharmony_ci
48175bd8deadSopenharmony_cimodule.exports = {
48185bd8deadSopenharmony_ci    sizedDelim: makeSizedDelim,
48195bd8deadSopenharmony_ci    customSizedDelim: makeCustomSizedDelim,
48205bd8deadSopenharmony_ci    leftRightDelim: makeLeftRightDelim
48215bd8deadSopenharmony_ci};
48225bd8deadSopenharmony_ci
48235bd8deadSopenharmony_ci},{"./ParseError":6,"./Style":9,"./buildCommon":10,"./fontMetrics":17,"./symbols":23,"./utils":25}],15:[function(require,module,exports){
48245bd8deadSopenharmony_ci/**
48255bd8deadSopenharmony_ci * These objects store the data about the DOM nodes we create, as well as some
48265bd8deadSopenharmony_ci * extra data. They can then be transformed into real DOM nodes with the
48275bd8deadSopenharmony_ci * `toNode` function or HTML markup using `toMarkup`. They are useful for both
48285bd8deadSopenharmony_ci * storing extra properties on the nodes, as well as providing a way to easily
48295bd8deadSopenharmony_ci * work with the DOM.
48305bd8deadSopenharmony_ci *
48315bd8deadSopenharmony_ci * Similar functions for working with MathML nodes exist in mathMLTree.js.
48325bd8deadSopenharmony_ci */
48335bd8deadSopenharmony_civar unicodeRegexes = require("./unicodeRegexes");
48345bd8deadSopenharmony_civar utils = require("./utils");
48355bd8deadSopenharmony_ci
48365bd8deadSopenharmony_ci/**
48375bd8deadSopenharmony_ci * Create an HTML className based on a list of classes. In addition to joining
48385bd8deadSopenharmony_ci * with spaces, we also remove null or empty classes.
48395bd8deadSopenharmony_ci */
48405bd8deadSopenharmony_civar createClass = function(classes) {
48415bd8deadSopenharmony_ci    classes = classes.slice();
48425bd8deadSopenharmony_ci    for (var i = classes.length - 1; i >= 0; i--) {
48435bd8deadSopenharmony_ci        if (!classes[i]) {
48445bd8deadSopenharmony_ci            classes.splice(i, 1);
48455bd8deadSopenharmony_ci        }
48465bd8deadSopenharmony_ci    }
48475bd8deadSopenharmony_ci
48485bd8deadSopenharmony_ci    return classes.join(" ");
48495bd8deadSopenharmony_ci};
48505bd8deadSopenharmony_ci
48515bd8deadSopenharmony_ci/**
48525bd8deadSopenharmony_ci * This node represents a span node, with a className, a list of children, and
48535bd8deadSopenharmony_ci * an inline style. It also contains information about its height, depth, and
48545bd8deadSopenharmony_ci * maxFontSize.
48555bd8deadSopenharmony_ci */
48565bd8deadSopenharmony_cifunction span(classes, children, options) {
48575bd8deadSopenharmony_ci    this.classes = classes || [];
48585bd8deadSopenharmony_ci    this.children = children || [];
48595bd8deadSopenharmony_ci    this.height = 0;
48605bd8deadSopenharmony_ci    this.depth = 0;
48615bd8deadSopenharmony_ci    this.maxFontSize = 0;
48625bd8deadSopenharmony_ci    this.style = {};
48635bd8deadSopenharmony_ci    this.attributes = {};
48645bd8deadSopenharmony_ci    if (options) {
48655bd8deadSopenharmony_ci        if (options.style.isTight()) {
48665bd8deadSopenharmony_ci            this.classes.push("mtight");
48675bd8deadSopenharmony_ci        }
48685bd8deadSopenharmony_ci        if (options.getColor()) {
48695bd8deadSopenharmony_ci            this.style.color = options.getColor();
48705bd8deadSopenharmony_ci        }
48715bd8deadSopenharmony_ci    }
48725bd8deadSopenharmony_ci}
48735bd8deadSopenharmony_ci
48745bd8deadSopenharmony_ci/**
48755bd8deadSopenharmony_ci * Sets an arbitrary attribute on the span. Warning: use this wisely. Not all
48765bd8deadSopenharmony_ci * browsers support attributes the same, and having too many custom attributes
48775bd8deadSopenharmony_ci * is probably bad.
48785bd8deadSopenharmony_ci */
48795bd8deadSopenharmony_cispan.prototype.setAttribute = function(attribute, value) {
48805bd8deadSopenharmony_ci    this.attributes[attribute] = value;
48815bd8deadSopenharmony_ci};
48825bd8deadSopenharmony_ci
48835bd8deadSopenharmony_cispan.prototype.tryCombine = function(sibling) {
48845bd8deadSopenharmony_ci    return false;
48855bd8deadSopenharmony_ci};
48865bd8deadSopenharmony_ci
48875bd8deadSopenharmony_ci/**
48885bd8deadSopenharmony_ci * Convert the span into an HTML node
48895bd8deadSopenharmony_ci */
48905bd8deadSopenharmony_cispan.prototype.toNode = function() {
48915bd8deadSopenharmony_ci    var span = document.createElement("span");
48925bd8deadSopenharmony_ci
48935bd8deadSopenharmony_ci    // Apply the class
48945bd8deadSopenharmony_ci    span.className = createClass(this.classes);
48955bd8deadSopenharmony_ci
48965bd8deadSopenharmony_ci    // Apply inline styles
48975bd8deadSopenharmony_ci    for (var style in this.style) {
48985bd8deadSopenharmony_ci        if (Object.prototype.hasOwnProperty.call(this.style, style)) {
48995bd8deadSopenharmony_ci            span.style[style] = this.style[style];
49005bd8deadSopenharmony_ci        }
49015bd8deadSopenharmony_ci    }
49025bd8deadSopenharmony_ci
49035bd8deadSopenharmony_ci    // Apply attributes
49045bd8deadSopenharmony_ci    for (var attr in this.attributes) {
49055bd8deadSopenharmony_ci        if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
49065bd8deadSopenharmony_ci            span.setAttribute(attr, this.attributes[attr]);
49075bd8deadSopenharmony_ci        }
49085bd8deadSopenharmony_ci    }
49095bd8deadSopenharmony_ci
49105bd8deadSopenharmony_ci    // Append the children, also as HTML nodes
49115bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
49125bd8deadSopenharmony_ci        span.appendChild(this.children[i].toNode());
49135bd8deadSopenharmony_ci    }
49145bd8deadSopenharmony_ci
49155bd8deadSopenharmony_ci    return span;
49165bd8deadSopenharmony_ci};
49175bd8deadSopenharmony_ci
49185bd8deadSopenharmony_ci/**
49195bd8deadSopenharmony_ci * Convert the span into an HTML markup string
49205bd8deadSopenharmony_ci */
49215bd8deadSopenharmony_cispan.prototype.toMarkup = function() {
49225bd8deadSopenharmony_ci    var markup = "<span";
49235bd8deadSopenharmony_ci
49245bd8deadSopenharmony_ci    // Add the class
49255bd8deadSopenharmony_ci    if (this.classes.length) {
49265bd8deadSopenharmony_ci        markup += " class=\"";
49275bd8deadSopenharmony_ci        markup += utils.escape(createClass(this.classes));
49285bd8deadSopenharmony_ci        markup += "\"";
49295bd8deadSopenharmony_ci    }
49305bd8deadSopenharmony_ci
49315bd8deadSopenharmony_ci    var styles = "";
49325bd8deadSopenharmony_ci
49335bd8deadSopenharmony_ci    // Add the styles, after hyphenation
49345bd8deadSopenharmony_ci    for (var style in this.style) {
49355bd8deadSopenharmony_ci        if (this.style.hasOwnProperty(style)) {
49365bd8deadSopenharmony_ci            styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
49375bd8deadSopenharmony_ci        }
49385bd8deadSopenharmony_ci    }
49395bd8deadSopenharmony_ci
49405bd8deadSopenharmony_ci    if (styles) {
49415bd8deadSopenharmony_ci        markup += " style=\"" + utils.escape(styles) + "\"";
49425bd8deadSopenharmony_ci    }
49435bd8deadSopenharmony_ci
49445bd8deadSopenharmony_ci    // Add the attributes
49455bd8deadSopenharmony_ci    for (var attr in this.attributes) {
49465bd8deadSopenharmony_ci        if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
49475bd8deadSopenharmony_ci            markup += " " + attr + "=\"";
49485bd8deadSopenharmony_ci            markup += utils.escape(this.attributes[attr]);
49495bd8deadSopenharmony_ci            markup += "\"";
49505bd8deadSopenharmony_ci        }
49515bd8deadSopenharmony_ci    }
49525bd8deadSopenharmony_ci
49535bd8deadSopenharmony_ci    markup += ">";
49545bd8deadSopenharmony_ci
49555bd8deadSopenharmony_ci    // Add the markup of the children, also as markup
49565bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
49575bd8deadSopenharmony_ci        markup += this.children[i].toMarkup();
49585bd8deadSopenharmony_ci    }
49595bd8deadSopenharmony_ci
49605bd8deadSopenharmony_ci    markup += "</span>";
49615bd8deadSopenharmony_ci
49625bd8deadSopenharmony_ci    return markup;
49635bd8deadSopenharmony_ci};
49645bd8deadSopenharmony_ci
49655bd8deadSopenharmony_ci/**
49665bd8deadSopenharmony_ci * This node represents a document fragment, which contains elements, but when
49675bd8deadSopenharmony_ci * placed into the DOM doesn't have any representation itself. Thus, it only
49685bd8deadSopenharmony_ci * contains children and doesn't have any HTML properties. It also keeps track
49695bd8deadSopenharmony_ci * of a height, depth, and maxFontSize.
49705bd8deadSopenharmony_ci */
49715bd8deadSopenharmony_cifunction documentFragment(children) {
49725bd8deadSopenharmony_ci    this.children = children || [];
49735bd8deadSopenharmony_ci    this.height = 0;
49745bd8deadSopenharmony_ci    this.depth = 0;
49755bd8deadSopenharmony_ci    this.maxFontSize = 0;
49765bd8deadSopenharmony_ci}
49775bd8deadSopenharmony_ci
49785bd8deadSopenharmony_ci/**
49795bd8deadSopenharmony_ci * Convert the fragment into a node
49805bd8deadSopenharmony_ci */
49815bd8deadSopenharmony_cidocumentFragment.prototype.toNode = function() {
49825bd8deadSopenharmony_ci    // Create a fragment
49835bd8deadSopenharmony_ci    var frag = document.createDocumentFragment();
49845bd8deadSopenharmony_ci
49855bd8deadSopenharmony_ci    // Append the children
49865bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
49875bd8deadSopenharmony_ci        frag.appendChild(this.children[i].toNode());
49885bd8deadSopenharmony_ci    }
49895bd8deadSopenharmony_ci
49905bd8deadSopenharmony_ci    return frag;
49915bd8deadSopenharmony_ci};
49925bd8deadSopenharmony_ci
49935bd8deadSopenharmony_ci/**
49945bd8deadSopenharmony_ci * Convert the fragment into HTML markup
49955bd8deadSopenharmony_ci */
49965bd8deadSopenharmony_cidocumentFragment.prototype.toMarkup = function() {
49975bd8deadSopenharmony_ci    var markup = "";
49985bd8deadSopenharmony_ci
49995bd8deadSopenharmony_ci    // Simply concatenate the markup for the children together
50005bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
50015bd8deadSopenharmony_ci        markup += this.children[i].toMarkup();
50025bd8deadSopenharmony_ci    }
50035bd8deadSopenharmony_ci
50045bd8deadSopenharmony_ci    return markup;
50055bd8deadSopenharmony_ci};
50065bd8deadSopenharmony_ci
50075bd8deadSopenharmony_civar iCombinations = {
50085bd8deadSopenharmony_ci    'î': '\u0131\u0302',
50095bd8deadSopenharmony_ci    'ï': '\u0131\u0308',
50105bd8deadSopenharmony_ci    'í': '\u0131\u0301',
50115bd8deadSopenharmony_ci    // 'ī': '\u0131\u0304', // enable when we add Extended Latin
50125bd8deadSopenharmony_ci    'ì': '\u0131\u0300'
50135bd8deadSopenharmony_ci};
50145bd8deadSopenharmony_ci
50155bd8deadSopenharmony_ci/**
50165bd8deadSopenharmony_ci * A symbol node contains information about a single symbol. It either renders
50175bd8deadSopenharmony_ci * to a single text node, or a span with a single text node in it, depending on
50185bd8deadSopenharmony_ci * whether it has CSS classes, styles, or needs italic correction.
50195bd8deadSopenharmony_ci */
50205bd8deadSopenharmony_cifunction symbolNode(value, height, depth, italic, skew, classes, style) {
50215bd8deadSopenharmony_ci    this.value = value || "";
50225bd8deadSopenharmony_ci    this.height = height || 0;
50235bd8deadSopenharmony_ci    this.depth = depth || 0;
50245bd8deadSopenharmony_ci    this.italic = italic || 0;
50255bd8deadSopenharmony_ci    this.skew = skew || 0;
50265bd8deadSopenharmony_ci    this.classes = classes || [];
50275bd8deadSopenharmony_ci    this.style = style || {};
50285bd8deadSopenharmony_ci    this.maxFontSize = 0;
50295bd8deadSopenharmony_ci
50305bd8deadSopenharmony_ci    // Mark CJK characters with specific classes so that we can specify which
50315bd8deadSopenharmony_ci    // fonts to use.  This allows us to render these characters with a serif
50325bd8deadSopenharmony_ci    // font in situations where the browser would either default to a sans serif
50335bd8deadSopenharmony_ci    // or render a placeholder character.
50345bd8deadSopenharmony_ci    if (unicodeRegexes.cjkRegex.test(value)) {
50355bd8deadSopenharmony_ci        // I couldn't find any fonts that contained Hangul as well as all of
50365bd8deadSopenharmony_ci        // the other characters we wanted to test there for it gets its own
50375bd8deadSopenharmony_ci        // CSS class.
50385bd8deadSopenharmony_ci        if (unicodeRegexes.hangulRegex.test(value)) {
50395bd8deadSopenharmony_ci            this.classes.push('hangul_fallback');
50405bd8deadSopenharmony_ci        } else {
50415bd8deadSopenharmony_ci            this.classes.push('cjk_fallback');
50425bd8deadSopenharmony_ci        }
50435bd8deadSopenharmony_ci    }
50445bd8deadSopenharmony_ci
50455bd8deadSopenharmony_ci    if (/[îïíì]/.test(this.value)) {    // add ī when we add Extended Latin
50465bd8deadSopenharmony_ci        this.value = iCombinations[this.value];
50475bd8deadSopenharmony_ci    }
50485bd8deadSopenharmony_ci}
50495bd8deadSopenharmony_ci
50505bd8deadSopenharmony_cisymbolNode.prototype.tryCombine = function(sibling) {
50515bd8deadSopenharmony_ci    if (!sibling
50525bd8deadSopenharmony_ci        || !(sibling instanceof symbolNode)
50535bd8deadSopenharmony_ci        || this.italic > 0
50545bd8deadSopenharmony_ci        || createClass(this.classes) !== createClass(sibling.classes)
50555bd8deadSopenharmony_ci        || this.skew !== sibling.skew
50565bd8deadSopenharmony_ci        || this.maxFontSize !== sibling.maxFontSize) {
50575bd8deadSopenharmony_ci        return false;
50585bd8deadSopenharmony_ci    }
50595bd8deadSopenharmony_ci    for (var style in this.style) {
50605bd8deadSopenharmony_ci        if (this.style.hasOwnProperty(style)
50615bd8deadSopenharmony_ci            && this.style[style] !== sibling.style[style]) {
50625bd8deadSopenharmony_ci            return false;
50635bd8deadSopenharmony_ci        }
50645bd8deadSopenharmony_ci    }
50655bd8deadSopenharmony_ci    for (style in sibling.style) {
50665bd8deadSopenharmony_ci        if (sibling.style.hasOwnProperty(style)
50675bd8deadSopenharmony_ci            && this.style[style] !== sibling.style[style]) {
50685bd8deadSopenharmony_ci            return false;
50695bd8deadSopenharmony_ci        }
50705bd8deadSopenharmony_ci    }
50715bd8deadSopenharmony_ci    this.value += sibling.value;
50725bd8deadSopenharmony_ci    this.height = Math.max(this.height, sibling.height);
50735bd8deadSopenharmony_ci    this.depth = Math.max(this.depth, sibling.depth);
50745bd8deadSopenharmony_ci    this.italic = sibling.italic;
50755bd8deadSopenharmony_ci    return true;
50765bd8deadSopenharmony_ci};
50775bd8deadSopenharmony_ci
50785bd8deadSopenharmony_ci/**
50795bd8deadSopenharmony_ci * Creates a text node or span from a symbol node. Note that a span is only
50805bd8deadSopenharmony_ci * created if it is needed.
50815bd8deadSopenharmony_ci */
50825bd8deadSopenharmony_cisymbolNode.prototype.toNode = function() {
50835bd8deadSopenharmony_ci    var node = document.createTextNode(this.value);
50845bd8deadSopenharmony_ci    var span = null;
50855bd8deadSopenharmony_ci
50865bd8deadSopenharmony_ci    if (this.italic > 0) {
50875bd8deadSopenharmony_ci        span = document.createElement("span");
50885bd8deadSopenharmony_ci        span.style.marginRight = this.italic + "em";
50895bd8deadSopenharmony_ci    }
50905bd8deadSopenharmony_ci
50915bd8deadSopenharmony_ci    if (this.classes.length > 0) {
50925bd8deadSopenharmony_ci        span = span || document.createElement("span");
50935bd8deadSopenharmony_ci        span.className = createClass(this.classes);
50945bd8deadSopenharmony_ci    }
50955bd8deadSopenharmony_ci
50965bd8deadSopenharmony_ci    for (var style in this.style) {
50975bd8deadSopenharmony_ci        if (this.style.hasOwnProperty(style)) {
50985bd8deadSopenharmony_ci            span = span || document.createElement("span");
50995bd8deadSopenharmony_ci            span.style[style] = this.style[style];
51005bd8deadSopenharmony_ci        }
51015bd8deadSopenharmony_ci    }
51025bd8deadSopenharmony_ci
51035bd8deadSopenharmony_ci    if (span) {
51045bd8deadSopenharmony_ci        span.appendChild(node);
51055bd8deadSopenharmony_ci        return span;
51065bd8deadSopenharmony_ci    } else {
51075bd8deadSopenharmony_ci        return node;
51085bd8deadSopenharmony_ci    }
51095bd8deadSopenharmony_ci};
51105bd8deadSopenharmony_ci
51115bd8deadSopenharmony_ci/**
51125bd8deadSopenharmony_ci * Creates markup for a symbol node.
51135bd8deadSopenharmony_ci */
51145bd8deadSopenharmony_cisymbolNode.prototype.toMarkup = function() {
51155bd8deadSopenharmony_ci    // TODO(alpert): More duplication than I'd like from
51165bd8deadSopenharmony_ci    // span.prototype.toMarkup and symbolNode.prototype.toNode...
51175bd8deadSopenharmony_ci    var needsSpan = false;
51185bd8deadSopenharmony_ci
51195bd8deadSopenharmony_ci    var markup = "<span";
51205bd8deadSopenharmony_ci
51215bd8deadSopenharmony_ci    if (this.classes.length) {
51225bd8deadSopenharmony_ci        needsSpan = true;
51235bd8deadSopenharmony_ci        markup += " class=\"";
51245bd8deadSopenharmony_ci        markup += utils.escape(createClass(this.classes));
51255bd8deadSopenharmony_ci        markup += "\"";
51265bd8deadSopenharmony_ci    }
51275bd8deadSopenharmony_ci
51285bd8deadSopenharmony_ci    var styles = "";
51295bd8deadSopenharmony_ci
51305bd8deadSopenharmony_ci    if (this.italic > 0) {
51315bd8deadSopenharmony_ci        styles += "margin-right:" + this.italic + "em;";
51325bd8deadSopenharmony_ci    }
51335bd8deadSopenharmony_ci    for (var style in this.style) {
51345bd8deadSopenharmony_ci        if (this.style.hasOwnProperty(style)) {
51355bd8deadSopenharmony_ci            styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
51365bd8deadSopenharmony_ci        }
51375bd8deadSopenharmony_ci    }
51385bd8deadSopenharmony_ci
51395bd8deadSopenharmony_ci    if (styles) {
51405bd8deadSopenharmony_ci        needsSpan = true;
51415bd8deadSopenharmony_ci        markup += " style=\"" + utils.escape(styles) + "\"";
51425bd8deadSopenharmony_ci    }
51435bd8deadSopenharmony_ci
51445bd8deadSopenharmony_ci    var escaped = utils.escape(this.value);
51455bd8deadSopenharmony_ci    if (needsSpan) {
51465bd8deadSopenharmony_ci        markup += ">";
51475bd8deadSopenharmony_ci        markup += escaped;
51485bd8deadSopenharmony_ci        markup += "</span>";
51495bd8deadSopenharmony_ci        return markup;
51505bd8deadSopenharmony_ci    } else {
51515bd8deadSopenharmony_ci        return escaped;
51525bd8deadSopenharmony_ci    }
51535bd8deadSopenharmony_ci};
51545bd8deadSopenharmony_ci
51555bd8deadSopenharmony_cimodule.exports = {
51565bd8deadSopenharmony_ci    span: span,
51575bd8deadSopenharmony_ci    documentFragment: documentFragment,
51585bd8deadSopenharmony_ci    symbolNode: symbolNode
51595bd8deadSopenharmony_ci};
51605bd8deadSopenharmony_ci
51615bd8deadSopenharmony_ci},{"./unicodeRegexes":24,"./utils":25}],16:[function(require,module,exports){
51625bd8deadSopenharmony_ci/* eslint no-constant-condition:0 */
51635bd8deadSopenharmony_civar parseData = require("./parseData");
51645bd8deadSopenharmony_civar ParseError = require("./ParseError");
51655bd8deadSopenharmony_civar Style = require("./Style");
51665bd8deadSopenharmony_ci
51675bd8deadSopenharmony_civar ParseNode = parseData.ParseNode;
51685bd8deadSopenharmony_ci
51695bd8deadSopenharmony_ci/**
51705bd8deadSopenharmony_ci * Parse the body of the environment, with rows delimited by \\ and
51715bd8deadSopenharmony_ci * columns delimited by &, and create a nested list in row-major order
51725bd8deadSopenharmony_ci * with one group per cell.
51735bd8deadSopenharmony_ci */
51745bd8deadSopenharmony_cifunction parseArray(parser, result) {
51755bd8deadSopenharmony_ci    var row = [];
51765bd8deadSopenharmony_ci    var body = [row];
51775bd8deadSopenharmony_ci    var rowGaps = [];
51785bd8deadSopenharmony_ci    while (true) {
51795bd8deadSopenharmony_ci        var cell = parser.parseExpression(false, null);
51805bd8deadSopenharmony_ci        row.push(new ParseNode("ordgroup", cell, parser.mode));
51815bd8deadSopenharmony_ci        var next = parser.nextToken.text;
51825bd8deadSopenharmony_ci        if (next === "&") {
51835bd8deadSopenharmony_ci            parser.consume();
51845bd8deadSopenharmony_ci        } else if (next === "\\end") {
51855bd8deadSopenharmony_ci            break;
51865bd8deadSopenharmony_ci        } else if (next === "\\\\" || next === "\\cr") {
51875bd8deadSopenharmony_ci            var cr = parser.parseFunction();
51885bd8deadSopenharmony_ci            rowGaps.push(cr.value.size);
51895bd8deadSopenharmony_ci            row = [];
51905bd8deadSopenharmony_ci            body.push(row);
51915bd8deadSopenharmony_ci        } else {
51925bd8deadSopenharmony_ci            throw new ParseError("Expected & or \\\\ or \\end",
51935bd8deadSopenharmony_ci                                 parser.nextToken);
51945bd8deadSopenharmony_ci        }
51955bd8deadSopenharmony_ci    }
51965bd8deadSopenharmony_ci    result.body = body;
51975bd8deadSopenharmony_ci    result.rowGaps = rowGaps;
51985bd8deadSopenharmony_ci    return new ParseNode(result.type, result, parser.mode);
51995bd8deadSopenharmony_ci}
52005bd8deadSopenharmony_ci
52015bd8deadSopenharmony_ci/*
52025bd8deadSopenharmony_ci * An environment definition is very similar to a function definition:
52035bd8deadSopenharmony_ci * it is declared with a name or a list of names, a set of properties
52045bd8deadSopenharmony_ci * and a handler containing the actual implementation.
52055bd8deadSopenharmony_ci *
52065bd8deadSopenharmony_ci * The properties include:
52075bd8deadSopenharmony_ci *  - numArgs: The number of arguments after the \begin{name} function.
52085bd8deadSopenharmony_ci *  - argTypes: (optional) Just like for a function
52095bd8deadSopenharmony_ci *  - allowedInText: (optional) Whether or not the environment is allowed inside
52105bd8deadSopenharmony_ci *                   text mode (default false) (not enforced yet)
52115bd8deadSopenharmony_ci *  - numOptionalArgs: (optional) Just like for a function
52125bd8deadSopenharmony_ci * A bare number instead of that object indicates the numArgs value.
52135bd8deadSopenharmony_ci *
52145bd8deadSopenharmony_ci * The handler function will receive two arguments
52155bd8deadSopenharmony_ci *  - context: information and references provided by the parser
52165bd8deadSopenharmony_ci *  - args: an array of arguments passed to \begin{name}
52175bd8deadSopenharmony_ci * The context contains the following properties:
52185bd8deadSopenharmony_ci *  - envName: the name of the environment, one of the listed names.
52195bd8deadSopenharmony_ci *  - parser: the parser object
52205bd8deadSopenharmony_ci *  - lexer: the lexer object
52215bd8deadSopenharmony_ci *  - positions: the positions associated with these arguments from args.
52225bd8deadSopenharmony_ci * The handler must return a ParseResult.
52235bd8deadSopenharmony_ci */
52245bd8deadSopenharmony_ci
52255bd8deadSopenharmony_cifunction defineEnvironment(names, props, handler) {
52265bd8deadSopenharmony_ci    if (typeof names === "string") {
52275bd8deadSopenharmony_ci        names = [names];
52285bd8deadSopenharmony_ci    }
52295bd8deadSopenharmony_ci    if (typeof props === "number") {
52305bd8deadSopenharmony_ci        props = { numArgs: props };
52315bd8deadSopenharmony_ci    }
52325bd8deadSopenharmony_ci    // Set default values of environments
52335bd8deadSopenharmony_ci    var data = {
52345bd8deadSopenharmony_ci        numArgs: props.numArgs || 0,
52355bd8deadSopenharmony_ci        argTypes: props.argTypes,
52365bd8deadSopenharmony_ci        greediness: 1,
52375bd8deadSopenharmony_ci        allowedInText: !!props.allowedInText,
52385bd8deadSopenharmony_ci        numOptionalArgs: props.numOptionalArgs || 0,
52395bd8deadSopenharmony_ci        handler: handler
52405bd8deadSopenharmony_ci    };
52415bd8deadSopenharmony_ci    for (var i = 0; i < names.length; ++i) {
52425bd8deadSopenharmony_ci        module.exports[names[i]] = data;
52435bd8deadSopenharmony_ci    }
52445bd8deadSopenharmony_ci}
52455bd8deadSopenharmony_ci
52465bd8deadSopenharmony_ci// Arrays are part of LaTeX, defined in lttab.dtx so its documentation
52475bd8deadSopenharmony_ci// is part of the source2e.pdf file of LaTeX2e source documentation.
52485bd8deadSopenharmony_cidefineEnvironment("array", {
52495bd8deadSopenharmony_ci    numArgs: 1
52505bd8deadSopenharmony_ci}, function(context, args) {
52515bd8deadSopenharmony_ci    var colalign = args[0];
52525bd8deadSopenharmony_ci    colalign = colalign.value.map ? colalign.value : [colalign];
52535bd8deadSopenharmony_ci    var cols = colalign.map(function(node) {
52545bd8deadSopenharmony_ci        var ca = node.value;
52555bd8deadSopenharmony_ci        if ("lcr".indexOf(ca) !== -1) {
52565bd8deadSopenharmony_ci            return {
52575bd8deadSopenharmony_ci                type: "align",
52585bd8deadSopenharmony_ci                align: ca
52595bd8deadSopenharmony_ci            };
52605bd8deadSopenharmony_ci        } else if (ca === "|") {
52615bd8deadSopenharmony_ci            return {
52625bd8deadSopenharmony_ci                type: "separator",
52635bd8deadSopenharmony_ci                separator: "|"
52645bd8deadSopenharmony_ci            };
52655bd8deadSopenharmony_ci        }
52665bd8deadSopenharmony_ci        throw new ParseError(
52675bd8deadSopenharmony_ci            "Unknown column alignment: " + node.value,
52685bd8deadSopenharmony_ci            node);
52695bd8deadSopenharmony_ci    });
52705bd8deadSopenharmony_ci    var res = {
52715bd8deadSopenharmony_ci        type: "array",
52725bd8deadSopenharmony_ci        cols: cols,
52735bd8deadSopenharmony_ci        hskipBeforeAndAfter: true // \@preamble in lttab.dtx
52745bd8deadSopenharmony_ci    };
52755bd8deadSopenharmony_ci    res = parseArray(context.parser, res);
52765bd8deadSopenharmony_ci    return res;
52775bd8deadSopenharmony_ci});
52785bd8deadSopenharmony_ci
52795bd8deadSopenharmony_ci// The matrix environments of amsmath builds on the array environment
52805bd8deadSopenharmony_ci// of LaTeX, which is discussed above.
52815bd8deadSopenharmony_cidefineEnvironment([
52825bd8deadSopenharmony_ci    "matrix",
52835bd8deadSopenharmony_ci    "pmatrix",
52845bd8deadSopenharmony_ci    "bmatrix",
52855bd8deadSopenharmony_ci    "Bmatrix",
52865bd8deadSopenharmony_ci    "vmatrix",
52875bd8deadSopenharmony_ci    "Vmatrix"
52885bd8deadSopenharmony_ci], {
52895bd8deadSopenharmony_ci}, function(context) {
52905bd8deadSopenharmony_ci    var delimiters = {
52915bd8deadSopenharmony_ci        "matrix": null,
52925bd8deadSopenharmony_ci        "pmatrix": ["(", ")"],
52935bd8deadSopenharmony_ci        "bmatrix": ["[", "]"],
52945bd8deadSopenharmony_ci        "Bmatrix": ["\\{", "\\}"],
52955bd8deadSopenharmony_ci        "vmatrix": ["|", "|"],
52965bd8deadSopenharmony_ci        "Vmatrix": ["\\Vert", "\\Vert"]
52975bd8deadSopenharmony_ci    }[context.envName];
52985bd8deadSopenharmony_ci    var res = {
52995bd8deadSopenharmony_ci        type: "array",
53005bd8deadSopenharmony_ci        hskipBeforeAndAfter: false // \hskip -\arraycolsep in amsmath
53015bd8deadSopenharmony_ci    };
53025bd8deadSopenharmony_ci    res = parseArray(context.parser, res);
53035bd8deadSopenharmony_ci    if (delimiters) {
53045bd8deadSopenharmony_ci        res = new ParseNode("leftright", {
53055bd8deadSopenharmony_ci            body: [res],
53065bd8deadSopenharmony_ci            left: delimiters[0],
53075bd8deadSopenharmony_ci            right: delimiters[1]
53085bd8deadSopenharmony_ci        }, context.mode);
53095bd8deadSopenharmony_ci    }
53105bd8deadSopenharmony_ci    return res;
53115bd8deadSopenharmony_ci});
53125bd8deadSopenharmony_ci
53135bd8deadSopenharmony_ci// A cases environment (in amsmath.sty) is almost equivalent to
53145bd8deadSopenharmony_ci// \def\arraystretch{1.2}%
53155bd8deadSopenharmony_ci// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right.
53165bd8deadSopenharmony_cidefineEnvironment("cases", {
53175bd8deadSopenharmony_ci}, function(context) {
53185bd8deadSopenharmony_ci    var res = {
53195bd8deadSopenharmony_ci        type: "array",
53205bd8deadSopenharmony_ci        arraystretch: 1.2,
53215bd8deadSopenharmony_ci        cols: [{
53225bd8deadSopenharmony_ci            type: "align",
53235bd8deadSopenharmony_ci            align: "l",
53245bd8deadSopenharmony_ci            pregap: 0,
53255bd8deadSopenharmony_ci            // TODO(kevinb) get the current style.
53265bd8deadSopenharmony_ci            // For now we use the metrics for TEXT style which is what we were
53275bd8deadSopenharmony_ci            // doing before.  Before attempting to get the current style we
53285bd8deadSopenharmony_ci            // should look at TeX's behavior especially for \over and matrices.
53295bd8deadSopenharmony_ci            postgap: Style.TEXT.metrics.quad
53305bd8deadSopenharmony_ci        }, {
53315bd8deadSopenharmony_ci            type: "align",
53325bd8deadSopenharmony_ci            align: "l",
53335bd8deadSopenharmony_ci            pregap: 0,
53345bd8deadSopenharmony_ci            postgap: 0
53355bd8deadSopenharmony_ci        }]
53365bd8deadSopenharmony_ci    };
53375bd8deadSopenharmony_ci    res = parseArray(context.parser, res);
53385bd8deadSopenharmony_ci    res = new ParseNode("leftright", {
53395bd8deadSopenharmony_ci        body: [res],
53405bd8deadSopenharmony_ci        left: "\\{",
53415bd8deadSopenharmony_ci        right: "."
53425bd8deadSopenharmony_ci    }, context.mode);
53435bd8deadSopenharmony_ci    return res;
53445bd8deadSopenharmony_ci});
53455bd8deadSopenharmony_ci
53465bd8deadSopenharmony_ci// An aligned environment is like the align* environment
53475bd8deadSopenharmony_ci// except it operates within math mode.
53485bd8deadSopenharmony_ci// Note that we assume \nomallineskiplimit to be zero,
53495bd8deadSopenharmony_ci// so that \strut@ is the same as \strut.
53505bd8deadSopenharmony_cidefineEnvironment("aligned", {
53515bd8deadSopenharmony_ci}, function(context) {
53525bd8deadSopenharmony_ci    var res = {
53535bd8deadSopenharmony_ci        type: "array",
53545bd8deadSopenharmony_ci        cols: []
53555bd8deadSopenharmony_ci    };
53565bd8deadSopenharmony_ci    res = parseArray(context.parser, res);
53575bd8deadSopenharmony_ci    var emptyGroup = new ParseNode("ordgroup", [], context.mode);
53585bd8deadSopenharmony_ci    var numCols = 0;
53595bd8deadSopenharmony_ci    res.value.body.forEach(function(row) {
53605bd8deadSopenharmony_ci        var i;
53615bd8deadSopenharmony_ci        for (i = 1; i < row.length; i += 2) {
53625bd8deadSopenharmony_ci            row[i].value.unshift(emptyGroup);
53635bd8deadSopenharmony_ci        }
53645bd8deadSopenharmony_ci        if (numCols < row.length) {
53655bd8deadSopenharmony_ci            numCols = row.length;
53665bd8deadSopenharmony_ci        }
53675bd8deadSopenharmony_ci    });
53685bd8deadSopenharmony_ci    for (var i = 0; i < numCols; ++i) {
53695bd8deadSopenharmony_ci        var align = "r";
53705bd8deadSopenharmony_ci        var pregap = 0;
53715bd8deadSopenharmony_ci        if (i % 2 === 1) {
53725bd8deadSopenharmony_ci            align = "l";
53735bd8deadSopenharmony_ci        } else if (i > 0) {
53745bd8deadSopenharmony_ci            pregap = 2; // one \qquad between columns
53755bd8deadSopenharmony_ci        }
53765bd8deadSopenharmony_ci        res.value.cols[i] = {
53775bd8deadSopenharmony_ci            type: "align",
53785bd8deadSopenharmony_ci            align: align,
53795bd8deadSopenharmony_ci            pregap: pregap,
53805bd8deadSopenharmony_ci            postgap: 0
53815bd8deadSopenharmony_ci        };
53825bd8deadSopenharmony_ci    }
53835bd8deadSopenharmony_ci    return res;
53845bd8deadSopenharmony_ci});
53855bd8deadSopenharmony_ci
53865bd8deadSopenharmony_ci},{"./ParseError":6,"./Style":9,"./parseData":21}],17:[function(require,module,exports){
53875bd8deadSopenharmony_ci/* eslint no-unused-vars:0 */
53885bd8deadSopenharmony_ci
53895bd8deadSopenharmony_civar Style = require("./Style");
53905bd8deadSopenharmony_civar cjkRegex = require("./unicodeRegexes").cjkRegex;
53915bd8deadSopenharmony_ci
53925bd8deadSopenharmony_ci/**
53935bd8deadSopenharmony_ci * This file contains metrics regarding fonts and individual symbols. The sigma
53945bd8deadSopenharmony_ci * and xi variables, as well as the metricMap map contain data extracted from
53955bd8deadSopenharmony_ci * TeX, TeX font metrics, and the TTF files. These data are then exposed via the
53965bd8deadSopenharmony_ci * `metrics` variable and the getCharacterMetrics function.
53975bd8deadSopenharmony_ci */
53985bd8deadSopenharmony_ci
53995bd8deadSopenharmony_ci// In TeX, there are actually three sets of dimensions, one for each of
54005bd8deadSopenharmony_ci// textstyle, scriptstyle, and scriptscriptstyle.  These are provided in the
54015bd8deadSopenharmony_ci// the arrays below, in that order.
54025bd8deadSopenharmony_ci//
54035bd8deadSopenharmony_ci// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.
54045bd8deadSopenharmony_ci// This was determined by running the folllowing script:
54055bd8deadSopenharmony_ci//
54065bd8deadSopenharmony_ci//     latex -interaction=nonstopmode \
54075bd8deadSopenharmony_ci//     '\documentclass{article}\usepackage{amsmath}\begin{document}' \
54085bd8deadSopenharmony_ci//     '$a$ \expandafter\show\the\textfont2' \
54095bd8deadSopenharmony_ci//     '\expandafter\show\the\scriptfont2' \
54105bd8deadSopenharmony_ci//     '\expandafter\show\the\scriptscriptfont2' \
54115bd8deadSopenharmony_ci//     '\stop'
54125bd8deadSopenharmony_ci//
54135bd8deadSopenharmony_ci// The metrics themselves were retreived using the following commands:
54145bd8deadSopenharmony_ci//
54155bd8deadSopenharmony_ci//     tftopl cmsy10
54165bd8deadSopenharmony_ci//     tftopl cmsy7
54175bd8deadSopenharmony_ci//     tftopl cmsy5
54185bd8deadSopenharmony_ci//
54195bd8deadSopenharmony_ci// The output of each of these commands is quite lengthy.  The only part we
54205bd8deadSopenharmony_ci// care about is the FONTDIMEN section. Each value is measured in EMs.
54215bd8deadSopenharmony_civar sigmas = {
54225bd8deadSopenharmony_ci    slant: [0.250, 0.250, 0.250],       // sigma1
54235bd8deadSopenharmony_ci    space: [0.000, 0.000, 0.000],       // sigma2
54245bd8deadSopenharmony_ci    stretch: [0.000, 0.000, 0.000],     // sigma3
54255bd8deadSopenharmony_ci    shrink: [0.000, 0.000, 0.000],      // sigma4
54265bd8deadSopenharmony_ci    xHeight: [0.431, 0.431, 0.431],     // sigma5
54275bd8deadSopenharmony_ci    quad: [1.000, 1.171, 1.472],        // sigma6
54285bd8deadSopenharmony_ci    extraSpace: [0.000, 0.000, 0.000],  // sigma7
54295bd8deadSopenharmony_ci    num1: [0.677, 0.732, 0.925],        // sigma8
54305bd8deadSopenharmony_ci    num2: [0.394, 0.384, 0.387],        // sigma9
54315bd8deadSopenharmony_ci    num3: [0.444, 0.471, 0.504],        // sigma10
54325bd8deadSopenharmony_ci    denom1: [0.686, 0.752, 1.025],      // sigma11
54335bd8deadSopenharmony_ci    denom2: [0.345, 0.344, 0.532],      // sigma12
54345bd8deadSopenharmony_ci    sup1: [0.413, 0.503, 0.504],        // sigma13
54355bd8deadSopenharmony_ci    sup2: [0.363, 0.431, 0.404],        // sigma14
54365bd8deadSopenharmony_ci    sup3: [0.289, 0.286, 0.294],        // sigma15
54375bd8deadSopenharmony_ci    sub1: [0.150, 0.143, 0.200],        // sigma16
54385bd8deadSopenharmony_ci    sub2: [0.247, 0.286, 0.400],        // sigma17
54395bd8deadSopenharmony_ci    supDrop: [0.386, 0.353, 0.494],     // sigma18
54405bd8deadSopenharmony_ci    subDrop: [0.050, 0.071, 0.100],     // sigma19
54415bd8deadSopenharmony_ci    delim1: [2.390, 1.700, 1.980],      // sigma20
54425bd8deadSopenharmony_ci    delim2: [1.010, 1.157, 1.420],      // sigma21
54435bd8deadSopenharmony_ci    axisHeight: [0.250, 0.250, 0.250]  // sigma22
54445bd8deadSopenharmony_ci};
54455bd8deadSopenharmony_ci
54465bd8deadSopenharmony_ci// These font metrics are extracted from TeX by using
54475bd8deadSopenharmony_ci// \font\a=cmex10
54485bd8deadSopenharmony_ci// \showthe\fontdimenX\a
54495bd8deadSopenharmony_ci// where X is the corresponding variable number. These correspond to the font
54505bd8deadSopenharmony_ci// parameters of the extension fonts (family 3). See the TeXbook, page 441.
54515bd8deadSopenharmony_civar xi1 = 0;
54525bd8deadSopenharmony_civar xi2 = 0;
54535bd8deadSopenharmony_civar xi3 = 0;
54545bd8deadSopenharmony_civar xi4 = 0;
54555bd8deadSopenharmony_civar xi5 = 0.431;
54565bd8deadSopenharmony_civar xi6 = 1;
54575bd8deadSopenharmony_civar xi7 = 0;
54585bd8deadSopenharmony_civar xi8 = 0.04;
54595bd8deadSopenharmony_civar xi9 = 0.111;
54605bd8deadSopenharmony_civar xi10 = 0.166;
54615bd8deadSopenharmony_civar xi11 = 0.2;
54625bd8deadSopenharmony_civar xi12 = 0.6;
54635bd8deadSopenharmony_civar xi13 = 0.1;
54645bd8deadSopenharmony_ci
54655bd8deadSopenharmony_ci// This value determines how large a pt is, for metrics which are defined in
54665bd8deadSopenharmony_ci// terms of pts.
54675bd8deadSopenharmony_ci// This value is also used in katex.less; if you change it make sure the values
54685bd8deadSopenharmony_ci// match.
54695bd8deadSopenharmony_civar ptPerEm = 10.0;
54705bd8deadSopenharmony_ci
54715bd8deadSopenharmony_ci// The space between adjacent `|` columns in an array definition. From
54725bd8deadSopenharmony_ci// `\showthe\doublerulesep` in LaTeX.
54735bd8deadSopenharmony_civar doubleRuleSep = 2.0 / ptPerEm;
54745bd8deadSopenharmony_ci
54755bd8deadSopenharmony_ci/**
54765bd8deadSopenharmony_ci * This is just a mapping from common names to real metrics
54775bd8deadSopenharmony_ci */
54785bd8deadSopenharmony_civar metrics = {
54795bd8deadSopenharmony_ci    defaultRuleThickness: xi8,
54805bd8deadSopenharmony_ci    bigOpSpacing1: xi9,
54815bd8deadSopenharmony_ci    bigOpSpacing2: xi10,
54825bd8deadSopenharmony_ci    bigOpSpacing3: xi11,
54835bd8deadSopenharmony_ci    bigOpSpacing4: xi12,
54845bd8deadSopenharmony_ci    bigOpSpacing5: xi13,
54855bd8deadSopenharmony_ci    ptPerEm: ptPerEm,
54865bd8deadSopenharmony_ci    doubleRuleSep: doubleRuleSep
54875bd8deadSopenharmony_ci};
54885bd8deadSopenharmony_ci
54895bd8deadSopenharmony_ci// This map contains a mapping from font name and character code to character
54905bd8deadSopenharmony_ci// metrics, including height, depth, italic correction, and skew (kern from the
54915bd8deadSopenharmony_ci// character to the corresponding \skewchar)
54925bd8deadSopenharmony_ci// This map is generated via `make metrics`. It should not be changed manually.
54935bd8deadSopenharmony_civar metricMap = require("./fontMetricsData");
54945bd8deadSopenharmony_ci
54955bd8deadSopenharmony_ci// These are very rough approximations.  We default to Times New Roman which
54965bd8deadSopenharmony_ci// should have Latin-1 and Cyrillic characters, but may not depending on the
54975bd8deadSopenharmony_ci// operating system.  The metrics do not account for extra height from the
54985bd8deadSopenharmony_ci// accents.  In the case of Cyrillic characters which have both ascenders and
54995bd8deadSopenharmony_ci// descenders we prefer approximations with ascenders, primarily to prevent
55005bd8deadSopenharmony_ci// the fraction bar or root line from intersecting the glyph.
55015bd8deadSopenharmony_ci// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.
55025bd8deadSopenharmony_civar extraCharacterMap = {
55035bd8deadSopenharmony_ci    // Latin-1
55045bd8deadSopenharmony_ci    'À': 'A',
55055bd8deadSopenharmony_ci    'Á': 'A',
55065bd8deadSopenharmony_ci    'Â': 'A',
55075bd8deadSopenharmony_ci    'Ã': 'A',
55085bd8deadSopenharmony_ci    'Ä': 'A',
55095bd8deadSopenharmony_ci    'Å': 'A',
55105bd8deadSopenharmony_ci    'Æ': 'A',
55115bd8deadSopenharmony_ci    'Ç': 'C',
55125bd8deadSopenharmony_ci    'È': 'E',
55135bd8deadSopenharmony_ci    'É': 'E',
55145bd8deadSopenharmony_ci    'Ê': 'E',
55155bd8deadSopenharmony_ci    'Ë': 'E',
55165bd8deadSopenharmony_ci    'Ì': 'I',
55175bd8deadSopenharmony_ci    'Í': 'I',
55185bd8deadSopenharmony_ci    'Î': 'I',
55195bd8deadSopenharmony_ci    'Ï': 'I',
55205bd8deadSopenharmony_ci    'Ð': 'D',
55215bd8deadSopenharmony_ci    'Ñ': 'N',
55225bd8deadSopenharmony_ci    'Ò': 'O',
55235bd8deadSopenharmony_ci    'Ó': 'O',
55245bd8deadSopenharmony_ci    'Ô': 'O',
55255bd8deadSopenharmony_ci    'Õ': 'O',
55265bd8deadSopenharmony_ci    'Ö': 'O',
55275bd8deadSopenharmony_ci    'Ø': 'O',
55285bd8deadSopenharmony_ci    'Ù': 'U',
55295bd8deadSopenharmony_ci    'Ú': 'U',
55305bd8deadSopenharmony_ci    'Û': 'U',
55315bd8deadSopenharmony_ci    'Ü': 'U',
55325bd8deadSopenharmony_ci    'Ý': 'Y',
55335bd8deadSopenharmony_ci    'Þ': 'o',
55345bd8deadSopenharmony_ci    'ß': 'B',
55355bd8deadSopenharmony_ci    'à': 'a',
55365bd8deadSopenharmony_ci    'á': 'a',
55375bd8deadSopenharmony_ci    'â': 'a',
55385bd8deadSopenharmony_ci    'ã': 'a',
55395bd8deadSopenharmony_ci    'ä': 'a',
55405bd8deadSopenharmony_ci    'å': 'a',
55415bd8deadSopenharmony_ci    'æ': 'a',
55425bd8deadSopenharmony_ci    'ç': 'c',
55435bd8deadSopenharmony_ci    'è': 'e',
55445bd8deadSopenharmony_ci    'é': 'e',
55455bd8deadSopenharmony_ci    'ê': 'e',
55465bd8deadSopenharmony_ci    'ë': 'e',
55475bd8deadSopenharmony_ci    'ì': 'i',
55485bd8deadSopenharmony_ci    'í': 'i',
55495bd8deadSopenharmony_ci    'î': 'i',
55505bd8deadSopenharmony_ci    'ï': 'i',
55515bd8deadSopenharmony_ci    'ð': 'd',
55525bd8deadSopenharmony_ci    'ñ': 'n',
55535bd8deadSopenharmony_ci    'ò': 'o',
55545bd8deadSopenharmony_ci    'ó': 'o',
55555bd8deadSopenharmony_ci    'ô': 'o',
55565bd8deadSopenharmony_ci    'õ': 'o',
55575bd8deadSopenharmony_ci    'ö': 'o',
55585bd8deadSopenharmony_ci    'ø': 'o',
55595bd8deadSopenharmony_ci    'ù': 'u',
55605bd8deadSopenharmony_ci    'ú': 'u',
55615bd8deadSopenharmony_ci    'û': 'u',
55625bd8deadSopenharmony_ci    'ü': 'u',
55635bd8deadSopenharmony_ci    'ý': 'y',
55645bd8deadSopenharmony_ci    'þ': 'o',
55655bd8deadSopenharmony_ci    'ÿ': 'y',
55665bd8deadSopenharmony_ci
55675bd8deadSopenharmony_ci    // Cyrillic
55685bd8deadSopenharmony_ci    'А': 'A',
55695bd8deadSopenharmony_ci    'Б': 'B',
55705bd8deadSopenharmony_ci    'В': 'B',
55715bd8deadSopenharmony_ci    'Г': 'F',
55725bd8deadSopenharmony_ci    'Д': 'A',
55735bd8deadSopenharmony_ci    'Е': 'E',
55745bd8deadSopenharmony_ci    'Ж': 'K',
55755bd8deadSopenharmony_ci    'З': '3',
55765bd8deadSopenharmony_ci    'И': 'N',
55775bd8deadSopenharmony_ci    'Й': 'N',
55785bd8deadSopenharmony_ci    'К': 'K',
55795bd8deadSopenharmony_ci    'Л': 'N',
55805bd8deadSopenharmony_ci    'М': 'M',
55815bd8deadSopenharmony_ci    'Н': 'H',
55825bd8deadSopenharmony_ci    'О': 'O',
55835bd8deadSopenharmony_ci    'П': 'N',
55845bd8deadSopenharmony_ci    'Р': 'P',
55855bd8deadSopenharmony_ci    'С': 'C',
55865bd8deadSopenharmony_ci    'Т': 'T',
55875bd8deadSopenharmony_ci    'У': 'y',
55885bd8deadSopenharmony_ci    'Ф': 'O',
55895bd8deadSopenharmony_ci    'Х': 'X',
55905bd8deadSopenharmony_ci    'Ц': 'U',
55915bd8deadSopenharmony_ci    'Ч': 'h',
55925bd8deadSopenharmony_ci    'Ш': 'W',
55935bd8deadSopenharmony_ci    'Щ': 'W',
55945bd8deadSopenharmony_ci    'Ъ': 'B',
55955bd8deadSopenharmony_ci    'Ы': 'X',
55965bd8deadSopenharmony_ci    'Ь': 'B',
55975bd8deadSopenharmony_ci    'Э': '3',
55985bd8deadSopenharmony_ci    'Ю': 'X',
55995bd8deadSopenharmony_ci    'Я': 'R',
56005bd8deadSopenharmony_ci    'а': 'a',
56015bd8deadSopenharmony_ci    'б': 'b',
56025bd8deadSopenharmony_ci    'в': 'a',
56035bd8deadSopenharmony_ci    'г': 'r',
56045bd8deadSopenharmony_ci    'д': 'y',
56055bd8deadSopenharmony_ci    'е': 'e',
56065bd8deadSopenharmony_ci    'ж': 'm',
56075bd8deadSopenharmony_ci    'з': 'e',
56085bd8deadSopenharmony_ci    'и': 'n',
56095bd8deadSopenharmony_ci    'й': 'n',
56105bd8deadSopenharmony_ci    'к': 'n',
56115bd8deadSopenharmony_ci    'л': 'n',
56125bd8deadSopenharmony_ci    'м': 'm',
56135bd8deadSopenharmony_ci    'н': 'n',
56145bd8deadSopenharmony_ci    'о': 'o',
56155bd8deadSopenharmony_ci    'п': 'n',
56165bd8deadSopenharmony_ci    'р': 'p',
56175bd8deadSopenharmony_ci    'с': 'c',
56185bd8deadSopenharmony_ci    'т': 'o',
56195bd8deadSopenharmony_ci    'у': 'y',
56205bd8deadSopenharmony_ci    'ф': 'b',
56215bd8deadSopenharmony_ci    'х': 'x',
56225bd8deadSopenharmony_ci    'ц': 'n',
56235bd8deadSopenharmony_ci    'ч': 'n',
56245bd8deadSopenharmony_ci    'ш': 'w',
56255bd8deadSopenharmony_ci    'щ': 'w',
56265bd8deadSopenharmony_ci    'ъ': 'a',
56275bd8deadSopenharmony_ci    'ы': 'm',
56285bd8deadSopenharmony_ci    'ь': 'a',
56295bd8deadSopenharmony_ci    'э': 'e',
56305bd8deadSopenharmony_ci    'ю': 'm',
56315bd8deadSopenharmony_ci    'я': 'r'
56325bd8deadSopenharmony_ci};
56335bd8deadSopenharmony_ci
56345bd8deadSopenharmony_ci/**
56355bd8deadSopenharmony_ci * This function is a convenience function for looking up information in the
56365bd8deadSopenharmony_ci * metricMap table. It takes a character as a string, and a style.
56375bd8deadSopenharmony_ci *
56385bd8deadSopenharmony_ci * Note: the `width` property may be undefined if fontMetricsData.js wasn't
56395bd8deadSopenharmony_ci * built using `Make extended_metrics`.
56405bd8deadSopenharmony_ci */
56415bd8deadSopenharmony_civar getCharacterMetrics = function(character, style) {
56425bd8deadSopenharmony_ci    var ch = character.charCodeAt(0);
56435bd8deadSopenharmony_ci    if (character[0] in extraCharacterMap) {
56445bd8deadSopenharmony_ci        ch = extraCharacterMap[character[0]].charCodeAt(0);
56455bd8deadSopenharmony_ci    } else if (cjkRegex.test(character[0])) {
56465bd8deadSopenharmony_ci        ch = 'M'.charCodeAt(0);
56475bd8deadSopenharmony_ci    }
56485bd8deadSopenharmony_ci    var metrics = metricMap[style][ch];
56495bd8deadSopenharmony_ci    if (metrics) {
56505bd8deadSopenharmony_ci        return {
56515bd8deadSopenharmony_ci            depth: metrics[0],
56525bd8deadSopenharmony_ci            height: metrics[1],
56535bd8deadSopenharmony_ci            italic: metrics[2],
56545bd8deadSopenharmony_ci            skew: metrics[3],
56555bd8deadSopenharmony_ci            width: metrics[4]
56565bd8deadSopenharmony_ci        };
56575bd8deadSopenharmony_ci    }
56585bd8deadSopenharmony_ci};
56595bd8deadSopenharmony_ci
56605bd8deadSopenharmony_cimodule.exports = {
56615bd8deadSopenharmony_ci    metrics: metrics,
56625bd8deadSopenharmony_ci    sigmas: sigmas,
56635bd8deadSopenharmony_ci    getCharacterMetrics: getCharacterMetrics
56645bd8deadSopenharmony_ci};
56655bd8deadSopenharmony_ci
56665bd8deadSopenharmony_ci},{"./Style":9,"./fontMetricsData":18,"./unicodeRegexes":24}],18:[function(require,module,exports){
56675bd8deadSopenharmony_cimodule.exports = {
56685bd8deadSopenharmony_ci    "AMS-Regular": {
56695bd8deadSopenharmony_ci        "65": [0, 0.68889, 0, 0],
56705bd8deadSopenharmony_ci        "66": [0, 0.68889, 0, 0],
56715bd8deadSopenharmony_ci        "67": [0, 0.68889, 0, 0],
56725bd8deadSopenharmony_ci        "68": [0, 0.68889, 0, 0],
56735bd8deadSopenharmony_ci        "69": [0, 0.68889, 0, 0],
56745bd8deadSopenharmony_ci        "70": [0, 0.68889, 0, 0],
56755bd8deadSopenharmony_ci        "71": [0, 0.68889, 0, 0],
56765bd8deadSopenharmony_ci        "72": [0, 0.68889, 0, 0],
56775bd8deadSopenharmony_ci        "73": [0, 0.68889, 0, 0],
56785bd8deadSopenharmony_ci        "74": [0.16667, 0.68889, 0, 0],
56795bd8deadSopenharmony_ci        "75": [0, 0.68889, 0, 0],
56805bd8deadSopenharmony_ci        "76": [0, 0.68889, 0, 0],
56815bd8deadSopenharmony_ci        "77": [0, 0.68889, 0, 0],
56825bd8deadSopenharmony_ci        "78": [0, 0.68889, 0, 0],
56835bd8deadSopenharmony_ci        "79": [0.16667, 0.68889, 0, 0],
56845bd8deadSopenharmony_ci        "80": [0, 0.68889, 0, 0],
56855bd8deadSopenharmony_ci        "81": [0.16667, 0.68889, 0, 0],
56865bd8deadSopenharmony_ci        "82": [0, 0.68889, 0, 0],
56875bd8deadSopenharmony_ci        "83": [0, 0.68889, 0, 0],
56885bd8deadSopenharmony_ci        "84": [0, 0.68889, 0, 0],
56895bd8deadSopenharmony_ci        "85": [0, 0.68889, 0, 0],
56905bd8deadSopenharmony_ci        "86": [0, 0.68889, 0, 0],
56915bd8deadSopenharmony_ci        "87": [0, 0.68889, 0, 0],
56925bd8deadSopenharmony_ci        "88": [0, 0.68889, 0, 0],
56935bd8deadSopenharmony_ci        "89": [0, 0.68889, 0, 0],
56945bd8deadSopenharmony_ci        "90": [0, 0.68889, 0, 0],
56955bd8deadSopenharmony_ci        "107": [0, 0.68889, 0, 0],
56965bd8deadSopenharmony_ci        "165": [0, 0.675, 0.025, 0],
56975bd8deadSopenharmony_ci        "174": [0.15559, 0.69224, 0, 0],
56985bd8deadSopenharmony_ci        "240": [0, 0.68889, 0, 0],
56995bd8deadSopenharmony_ci        "295": [0, 0.68889, 0, 0],
57005bd8deadSopenharmony_ci        "710": [0, 0.825, 0, 0],
57015bd8deadSopenharmony_ci        "732": [0, 0.9, 0, 0],
57025bd8deadSopenharmony_ci        "770": [0, 0.825, 0, 0],
57035bd8deadSopenharmony_ci        "771": [0, 0.9, 0, 0],
57045bd8deadSopenharmony_ci        "989": [0.08167, 0.58167, 0, 0],
57055bd8deadSopenharmony_ci        "1008": [0, 0.43056, 0.04028, 0],
57065bd8deadSopenharmony_ci        "8245": [0, 0.54986, 0, 0],
57075bd8deadSopenharmony_ci        "8463": [0, 0.68889, 0, 0],
57085bd8deadSopenharmony_ci        "8487": [0, 0.68889, 0, 0],
57095bd8deadSopenharmony_ci        "8498": [0, 0.68889, 0, 0],
57105bd8deadSopenharmony_ci        "8502": [0, 0.68889, 0, 0],
57115bd8deadSopenharmony_ci        "8503": [0, 0.68889, 0, 0],
57125bd8deadSopenharmony_ci        "8504": [0, 0.68889, 0, 0],
57135bd8deadSopenharmony_ci        "8513": [0, 0.68889, 0, 0],
57145bd8deadSopenharmony_ci        "8592": [-0.03598, 0.46402, 0, 0],
57155bd8deadSopenharmony_ci        "8594": [-0.03598, 0.46402, 0, 0],
57165bd8deadSopenharmony_ci        "8602": [-0.13313, 0.36687, 0, 0],
57175bd8deadSopenharmony_ci        "8603": [-0.13313, 0.36687, 0, 0],
57185bd8deadSopenharmony_ci        "8606": [0.01354, 0.52239, 0, 0],
57195bd8deadSopenharmony_ci        "8608": [0.01354, 0.52239, 0, 0],
57205bd8deadSopenharmony_ci        "8610": [0.01354, 0.52239, 0, 0],
57215bd8deadSopenharmony_ci        "8611": [0.01354, 0.52239, 0, 0],
57225bd8deadSopenharmony_ci        "8619": [0, 0.54986, 0, 0],
57235bd8deadSopenharmony_ci        "8620": [0, 0.54986, 0, 0],
57245bd8deadSopenharmony_ci        "8621": [-0.13313, 0.37788, 0, 0],
57255bd8deadSopenharmony_ci        "8622": [-0.13313, 0.36687, 0, 0],
57265bd8deadSopenharmony_ci        "8624": [0, 0.69224, 0, 0],
57275bd8deadSopenharmony_ci        "8625": [0, 0.69224, 0, 0],
57285bd8deadSopenharmony_ci        "8630": [0, 0.43056, 0, 0],
57295bd8deadSopenharmony_ci        "8631": [0, 0.43056, 0, 0],
57305bd8deadSopenharmony_ci        "8634": [0.08198, 0.58198, 0, 0],
57315bd8deadSopenharmony_ci        "8635": [0.08198, 0.58198, 0, 0],
57325bd8deadSopenharmony_ci        "8638": [0.19444, 0.69224, 0, 0],
57335bd8deadSopenharmony_ci        "8639": [0.19444, 0.69224, 0, 0],
57345bd8deadSopenharmony_ci        "8642": [0.19444, 0.69224, 0, 0],
57355bd8deadSopenharmony_ci        "8643": [0.19444, 0.69224, 0, 0],
57365bd8deadSopenharmony_ci        "8644": [0.1808, 0.675, 0, 0],
57375bd8deadSopenharmony_ci        "8646": [0.1808, 0.675, 0, 0],
57385bd8deadSopenharmony_ci        "8647": [0.1808, 0.675, 0, 0],
57395bd8deadSopenharmony_ci        "8648": [0.19444, 0.69224, 0, 0],
57405bd8deadSopenharmony_ci        "8649": [0.1808, 0.675, 0, 0],
57415bd8deadSopenharmony_ci        "8650": [0.19444, 0.69224, 0, 0],
57425bd8deadSopenharmony_ci        "8651": [0.01354, 0.52239, 0, 0],
57435bd8deadSopenharmony_ci        "8652": [0.01354, 0.52239, 0, 0],
57445bd8deadSopenharmony_ci        "8653": [-0.13313, 0.36687, 0, 0],
57455bd8deadSopenharmony_ci        "8654": [-0.13313, 0.36687, 0, 0],
57465bd8deadSopenharmony_ci        "8655": [-0.13313, 0.36687, 0, 0],
57475bd8deadSopenharmony_ci        "8666": [0.13667, 0.63667, 0, 0],
57485bd8deadSopenharmony_ci        "8667": [0.13667, 0.63667, 0, 0],
57495bd8deadSopenharmony_ci        "8669": [-0.13313, 0.37788, 0, 0],
57505bd8deadSopenharmony_ci        "8672": [-0.064, 0.437, 0, 0],
57515bd8deadSopenharmony_ci        "8674": [-0.064, 0.437, 0, 0],
57525bd8deadSopenharmony_ci        "8705": [0, 0.825, 0, 0],
57535bd8deadSopenharmony_ci        "8708": [0, 0.68889, 0, 0],
57545bd8deadSopenharmony_ci        "8709": [0.08167, 0.58167, 0, 0],
57555bd8deadSopenharmony_ci        "8717": [0, 0.43056, 0, 0],
57565bd8deadSopenharmony_ci        "8722": [-0.03598, 0.46402, 0, 0],
57575bd8deadSopenharmony_ci        "8724": [0.08198, 0.69224, 0, 0],
57585bd8deadSopenharmony_ci        "8726": [0.08167, 0.58167, 0, 0],
57595bd8deadSopenharmony_ci        "8733": [0, 0.69224, 0, 0],
57605bd8deadSopenharmony_ci        "8736": [0, 0.69224, 0, 0],
57615bd8deadSopenharmony_ci        "8737": [0, 0.69224, 0, 0],
57625bd8deadSopenharmony_ci        "8738": [0.03517, 0.52239, 0, 0],
57635bd8deadSopenharmony_ci        "8739": [0.08167, 0.58167, 0, 0],
57645bd8deadSopenharmony_ci        "8740": [0.25142, 0.74111, 0, 0],
57655bd8deadSopenharmony_ci        "8741": [0.08167, 0.58167, 0, 0],
57665bd8deadSopenharmony_ci        "8742": [0.25142, 0.74111, 0, 0],
57675bd8deadSopenharmony_ci        "8756": [0, 0.69224, 0, 0],
57685bd8deadSopenharmony_ci        "8757": [0, 0.69224, 0, 0],
57695bd8deadSopenharmony_ci        "8764": [-0.13313, 0.36687, 0, 0],
57705bd8deadSopenharmony_ci        "8765": [-0.13313, 0.37788, 0, 0],
57715bd8deadSopenharmony_ci        "8769": [-0.13313, 0.36687, 0, 0],
57725bd8deadSopenharmony_ci        "8770": [-0.03625, 0.46375, 0, 0],
57735bd8deadSopenharmony_ci        "8774": [0.30274, 0.79383, 0, 0],
57745bd8deadSopenharmony_ci        "8776": [-0.01688, 0.48312, 0, 0],
57755bd8deadSopenharmony_ci        "8778": [0.08167, 0.58167, 0, 0],
57765bd8deadSopenharmony_ci        "8782": [0.06062, 0.54986, 0, 0],
57775bd8deadSopenharmony_ci        "8783": [0.06062, 0.54986, 0, 0],
57785bd8deadSopenharmony_ci        "8785": [0.08198, 0.58198, 0, 0],
57795bd8deadSopenharmony_ci        "8786": [0.08198, 0.58198, 0, 0],
57805bd8deadSopenharmony_ci        "8787": [0.08198, 0.58198, 0, 0],
57815bd8deadSopenharmony_ci        "8790": [0, 0.69224, 0, 0],
57825bd8deadSopenharmony_ci        "8791": [0.22958, 0.72958, 0, 0],
57835bd8deadSopenharmony_ci        "8796": [0.08198, 0.91667, 0, 0],
57845bd8deadSopenharmony_ci        "8806": [0.25583, 0.75583, 0, 0],
57855bd8deadSopenharmony_ci        "8807": [0.25583, 0.75583, 0, 0],
57865bd8deadSopenharmony_ci        "8808": [0.25142, 0.75726, 0, 0],
57875bd8deadSopenharmony_ci        "8809": [0.25142, 0.75726, 0, 0],
57885bd8deadSopenharmony_ci        "8812": [0.25583, 0.75583, 0, 0],
57895bd8deadSopenharmony_ci        "8814": [0.20576, 0.70576, 0, 0],
57905bd8deadSopenharmony_ci        "8815": [0.20576, 0.70576, 0, 0],
57915bd8deadSopenharmony_ci        "8816": [0.30274, 0.79383, 0, 0],
57925bd8deadSopenharmony_ci        "8817": [0.30274, 0.79383, 0, 0],
57935bd8deadSopenharmony_ci        "8818": [0.22958, 0.72958, 0, 0],
57945bd8deadSopenharmony_ci        "8819": [0.22958, 0.72958, 0, 0],
57955bd8deadSopenharmony_ci        "8822": [0.1808, 0.675, 0, 0],
57965bd8deadSopenharmony_ci        "8823": [0.1808, 0.675, 0, 0],
57975bd8deadSopenharmony_ci        "8828": [0.13667, 0.63667, 0, 0],
57985bd8deadSopenharmony_ci        "8829": [0.13667, 0.63667, 0, 0],
57995bd8deadSopenharmony_ci        "8830": [0.22958, 0.72958, 0, 0],
58005bd8deadSopenharmony_ci        "8831": [0.22958, 0.72958, 0, 0],
58015bd8deadSopenharmony_ci        "8832": [0.20576, 0.70576, 0, 0],
58025bd8deadSopenharmony_ci        "8833": [0.20576, 0.70576, 0, 0],
58035bd8deadSopenharmony_ci        "8840": [0.30274, 0.79383, 0, 0],
58045bd8deadSopenharmony_ci        "8841": [0.30274, 0.79383, 0, 0],
58055bd8deadSopenharmony_ci        "8842": [0.13597, 0.63597, 0, 0],
58065bd8deadSopenharmony_ci        "8843": [0.13597, 0.63597, 0, 0],
58075bd8deadSopenharmony_ci        "8847": [0.03517, 0.54986, 0, 0],
58085bd8deadSopenharmony_ci        "8848": [0.03517, 0.54986, 0, 0],
58095bd8deadSopenharmony_ci        "8858": [0.08198, 0.58198, 0, 0],
58105bd8deadSopenharmony_ci        "8859": [0.08198, 0.58198, 0, 0],
58115bd8deadSopenharmony_ci        "8861": [0.08198, 0.58198, 0, 0],
58125bd8deadSopenharmony_ci        "8862": [0, 0.675, 0, 0],
58135bd8deadSopenharmony_ci        "8863": [0, 0.675, 0, 0],
58145bd8deadSopenharmony_ci        "8864": [0, 0.675, 0, 0],
58155bd8deadSopenharmony_ci        "8865": [0, 0.675, 0, 0],
58165bd8deadSopenharmony_ci        "8872": [0, 0.69224, 0, 0],
58175bd8deadSopenharmony_ci        "8873": [0, 0.69224, 0, 0],
58185bd8deadSopenharmony_ci        "8874": [0, 0.69224, 0, 0],
58195bd8deadSopenharmony_ci        "8876": [0, 0.68889, 0, 0],
58205bd8deadSopenharmony_ci        "8877": [0, 0.68889, 0, 0],
58215bd8deadSopenharmony_ci        "8878": [0, 0.68889, 0, 0],
58225bd8deadSopenharmony_ci        "8879": [0, 0.68889, 0, 0],
58235bd8deadSopenharmony_ci        "8882": [0.03517, 0.54986, 0, 0],
58245bd8deadSopenharmony_ci        "8883": [0.03517, 0.54986, 0, 0],
58255bd8deadSopenharmony_ci        "8884": [0.13667, 0.63667, 0, 0],
58265bd8deadSopenharmony_ci        "8885": [0.13667, 0.63667, 0, 0],
58275bd8deadSopenharmony_ci        "8888": [0, 0.54986, 0, 0],
58285bd8deadSopenharmony_ci        "8890": [0.19444, 0.43056, 0, 0],
58295bd8deadSopenharmony_ci        "8891": [0.19444, 0.69224, 0, 0],
58305bd8deadSopenharmony_ci        "8892": [0.19444, 0.69224, 0, 0],
58315bd8deadSopenharmony_ci        "8901": [0, 0.54986, 0, 0],
58325bd8deadSopenharmony_ci        "8903": [0.08167, 0.58167, 0, 0],
58335bd8deadSopenharmony_ci        "8905": [0.08167, 0.58167, 0, 0],
58345bd8deadSopenharmony_ci        "8906": [0.08167, 0.58167, 0, 0],
58355bd8deadSopenharmony_ci        "8907": [0, 0.69224, 0, 0],
58365bd8deadSopenharmony_ci        "8908": [0, 0.69224, 0, 0],
58375bd8deadSopenharmony_ci        "8909": [-0.03598, 0.46402, 0, 0],
58385bd8deadSopenharmony_ci        "8910": [0, 0.54986, 0, 0],
58395bd8deadSopenharmony_ci        "8911": [0, 0.54986, 0, 0],
58405bd8deadSopenharmony_ci        "8912": [0.03517, 0.54986, 0, 0],
58415bd8deadSopenharmony_ci        "8913": [0.03517, 0.54986, 0, 0],
58425bd8deadSopenharmony_ci        "8914": [0, 0.54986, 0, 0],
58435bd8deadSopenharmony_ci        "8915": [0, 0.54986, 0, 0],
58445bd8deadSopenharmony_ci        "8916": [0, 0.69224, 0, 0],
58455bd8deadSopenharmony_ci        "8918": [0.0391, 0.5391, 0, 0],
58465bd8deadSopenharmony_ci        "8919": [0.0391, 0.5391, 0, 0],
58475bd8deadSopenharmony_ci        "8920": [0.03517, 0.54986, 0, 0],
58485bd8deadSopenharmony_ci        "8921": [0.03517, 0.54986, 0, 0],
58495bd8deadSopenharmony_ci        "8922": [0.38569, 0.88569, 0, 0],
58505bd8deadSopenharmony_ci        "8923": [0.38569, 0.88569, 0, 0],
58515bd8deadSopenharmony_ci        "8926": [0.13667, 0.63667, 0, 0],
58525bd8deadSopenharmony_ci        "8927": [0.13667, 0.63667, 0, 0],
58535bd8deadSopenharmony_ci        "8928": [0.30274, 0.79383, 0, 0],
58545bd8deadSopenharmony_ci        "8929": [0.30274, 0.79383, 0, 0],
58555bd8deadSopenharmony_ci        "8934": [0.23222, 0.74111, 0, 0],
58565bd8deadSopenharmony_ci        "8935": [0.23222, 0.74111, 0, 0],
58575bd8deadSopenharmony_ci        "8936": [0.23222, 0.74111, 0, 0],
58585bd8deadSopenharmony_ci        "8937": [0.23222, 0.74111, 0, 0],
58595bd8deadSopenharmony_ci        "8938": [0.20576, 0.70576, 0, 0],
58605bd8deadSopenharmony_ci        "8939": [0.20576, 0.70576, 0, 0],
58615bd8deadSopenharmony_ci        "8940": [0.30274, 0.79383, 0, 0],
58625bd8deadSopenharmony_ci        "8941": [0.30274, 0.79383, 0, 0],
58635bd8deadSopenharmony_ci        "8994": [0.19444, 0.69224, 0, 0],
58645bd8deadSopenharmony_ci        "8995": [0.19444, 0.69224, 0, 0],
58655bd8deadSopenharmony_ci        "9416": [0.15559, 0.69224, 0, 0],
58665bd8deadSopenharmony_ci        "9484": [0, 0.69224, 0, 0],
58675bd8deadSopenharmony_ci        "9488": [0, 0.69224, 0, 0],
58685bd8deadSopenharmony_ci        "9492": [0, 0.37788, 0, 0],
58695bd8deadSopenharmony_ci        "9496": [0, 0.37788, 0, 0],
58705bd8deadSopenharmony_ci        "9585": [0.19444, 0.68889, 0, 0],
58715bd8deadSopenharmony_ci        "9586": [0.19444, 0.74111, 0, 0],
58725bd8deadSopenharmony_ci        "9632": [0, 0.675, 0, 0],
58735bd8deadSopenharmony_ci        "9633": [0, 0.675, 0, 0],
58745bd8deadSopenharmony_ci        "9650": [0, 0.54986, 0, 0],
58755bd8deadSopenharmony_ci        "9651": [0, 0.54986, 0, 0],
58765bd8deadSopenharmony_ci        "9654": [0.03517, 0.54986, 0, 0],
58775bd8deadSopenharmony_ci        "9660": [0, 0.54986, 0, 0],
58785bd8deadSopenharmony_ci        "9661": [0, 0.54986, 0, 0],
58795bd8deadSopenharmony_ci        "9664": [0.03517, 0.54986, 0, 0],
58805bd8deadSopenharmony_ci        "9674": [0.11111, 0.69224, 0, 0],
58815bd8deadSopenharmony_ci        "9733": [0.19444, 0.69224, 0, 0],
58825bd8deadSopenharmony_ci        "10003": [0, 0.69224, 0, 0],
58835bd8deadSopenharmony_ci        "10016": [0, 0.69224, 0, 0],
58845bd8deadSopenharmony_ci        "10731": [0.11111, 0.69224, 0, 0],
58855bd8deadSopenharmony_ci        "10846": [0.19444, 0.75583, 0, 0],
58865bd8deadSopenharmony_ci        "10877": [0.13667, 0.63667, 0, 0],
58875bd8deadSopenharmony_ci        "10878": [0.13667, 0.63667, 0, 0],
58885bd8deadSopenharmony_ci        "10885": [0.25583, 0.75583, 0, 0],
58895bd8deadSopenharmony_ci        "10886": [0.25583, 0.75583, 0, 0],
58905bd8deadSopenharmony_ci        "10887": [0.13597, 0.63597, 0, 0],
58915bd8deadSopenharmony_ci        "10888": [0.13597, 0.63597, 0, 0],
58925bd8deadSopenharmony_ci        "10889": [0.26167, 0.75726, 0, 0],
58935bd8deadSopenharmony_ci        "10890": [0.26167, 0.75726, 0, 0],
58945bd8deadSopenharmony_ci        "10891": [0.48256, 0.98256, 0, 0],
58955bd8deadSopenharmony_ci        "10892": [0.48256, 0.98256, 0, 0],
58965bd8deadSopenharmony_ci        "10901": [0.13667, 0.63667, 0, 0],
58975bd8deadSopenharmony_ci        "10902": [0.13667, 0.63667, 0, 0],
58985bd8deadSopenharmony_ci        "10933": [0.25142, 0.75726, 0, 0],
58995bd8deadSopenharmony_ci        "10934": [0.25142, 0.75726, 0, 0],
59005bd8deadSopenharmony_ci        "10935": [0.26167, 0.75726, 0, 0],
59015bd8deadSopenharmony_ci        "10936": [0.26167, 0.75726, 0, 0],
59025bd8deadSopenharmony_ci        "10937": [0.26167, 0.75726, 0, 0],
59035bd8deadSopenharmony_ci        "10938": [0.26167, 0.75726, 0, 0],
59045bd8deadSopenharmony_ci        "10949": [0.25583, 0.75583, 0, 0],
59055bd8deadSopenharmony_ci        "10950": [0.25583, 0.75583, 0, 0],
59065bd8deadSopenharmony_ci        "10955": [0.28481, 0.79383, 0, 0],
59075bd8deadSopenharmony_ci        "10956": [0.28481, 0.79383, 0, 0],
59085bd8deadSopenharmony_ci        "57350": [0.08167, 0.58167, 0, 0],
59095bd8deadSopenharmony_ci        "57351": [0.08167, 0.58167, 0, 0],
59105bd8deadSopenharmony_ci        "57352": [0.08167, 0.58167, 0, 0],
59115bd8deadSopenharmony_ci        "57353": [0, 0.43056, 0.04028, 0],
59125bd8deadSopenharmony_ci        "57356": [0.25142, 0.75726, 0, 0],
59135bd8deadSopenharmony_ci        "57357": [0.25142, 0.75726, 0, 0],
59145bd8deadSopenharmony_ci        "57358": [0.41951, 0.91951, 0, 0],
59155bd8deadSopenharmony_ci        "57359": [0.30274, 0.79383, 0, 0],
59165bd8deadSopenharmony_ci        "57360": [0.30274, 0.79383, 0, 0],
59175bd8deadSopenharmony_ci        "57361": [0.41951, 0.91951, 0, 0],
59185bd8deadSopenharmony_ci        "57366": [0.25142, 0.75726, 0, 0],
59195bd8deadSopenharmony_ci        "57367": [0.25142, 0.75726, 0, 0],
59205bd8deadSopenharmony_ci        "57368": [0.25142, 0.75726, 0, 0],
59215bd8deadSopenharmony_ci        "57369": [0.25142, 0.75726, 0, 0],
59225bd8deadSopenharmony_ci        "57370": [0.13597, 0.63597, 0, 0],
59235bd8deadSopenharmony_ci        "57371": [0.13597, 0.63597, 0, 0]
59245bd8deadSopenharmony_ci    },
59255bd8deadSopenharmony_ci    "Caligraphic-Regular": {
59265bd8deadSopenharmony_ci        "48": [0, 0.43056, 0, 0],
59275bd8deadSopenharmony_ci        "49": [0, 0.43056, 0, 0],
59285bd8deadSopenharmony_ci        "50": [0, 0.43056, 0, 0],
59295bd8deadSopenharmony_ci        "51": [0.19444, 0.43056, 0, 0],
59305bd8deadSopenharmony_ci        "52": [0.19444, 0.43056, 0, 0],
59315bd8deadSopenharmony_ci        "53": [0.19444, 0.43056, 0, 0],
59325bd8deadSopenharmony_ci        "54": [0, 0.64444, 0, 0],
59335bd8deadSopenharmony_ci        "55": [0.19444, 0.43056, 0, 0],
59345bd8deadSopenharmony_ci        "56": [0, 0.64444, 0, 0],
59355bd8deadSopenharmony_ci        "57": [0.19444, 0.43056, 0, 0],
59365bd8deadSopenharmony_ci        "65": [0, 0.68333, 0, 0.19445],
59375bd8deadSopenharmony_ci        "66": [0, 0.68333, 0.03041, 0.13889],
59385bd8deadSopenharmony_ci        "67": [0, 0.68333, 0.05834, 0.13889],
59395bd8deadSopenharmony_ci        "68": [0, 0.68333, 0.02778, 0.08334],
59405bd8deadSopenharmony_ci        "69": [0, 0.68333, 0.08944, 0.11111],
59415bd8deadSopenharmony_ci        "70": [0, 0.68333, 0.09931, 0.11111],
59425bd8deadSopenharmony_ci        "71": [0.09722, 0.68333, 0.0593, 0.11111],
59435bd8deadSopenharmony_ci        "72": [0, 0.68333, 0.00965, 0.11111],
59445bd8deadSopenharmony_ci        "73": [0, 0.68333, 0.07382, 0],
59455bd8deadSopenharmony_ci        "74": [0.09722, 0.68333, 0.18472, 0.16667],
59465bd8deadSopenharmony_ci        "75": [0, 0.68333, 0.01445, 0.05556],
59475bd8deadSopenharmony_ci        "76": [0, 0.68333, 0, 0.13889],
59485bd8deadSopenharmony_ci        "77": [0, 0.68333, 0, 0.13889],
59495bd8deadSopenharmony_ci        "78": [0, 0.68333, 0.14736, 0.08334],
59505bd8deadSopenharmony_ci        "79": [0, 0.68333, 0.02778, 0.11111],
59515bd8deadSopenharmony_ci        "80": [0, 0.68333, 0.08222, 0.08334],
59525bd8deadSopenharmony_ci        "81": [0.09722, 0.68333, 0, 0.11111],
59535bd8deadSopenharmony_ci        "82": [0, 0.68333, 0, 0.08334],
59545bd8deadSopenharmony_ci        "83": [0, 0.68333, 0.075, 0.13889],
59555bd8deadSopenharmony_ci        "84": [0, 0.68333, 0.25417, 0],
59565bd8deadSopenharmony_ci        "85": [0, 0.68333, 0.09931, 0.08334],
59575bd8deadSopenharmony_ci        "86": [0, 0.68333, 0.08222, 0],
59585bd8deadSopenharmony_ci        "87": [0, 0.68333, 0.08222, 0.08334],
59595bd8deadSopenharmony_ci        "88": [0, 0.68333, 0.14643, 0.13889],
59605bd8deadSopenharmony_ci        "89": [0.09722, 0.68333, 0.08222, 0.08334],
59615bd8deadSopenharmony_ci        "90": [0, 0.68333, 0.07944, 0.13889]
59625bd8deadSopenharmony_ci    },
59635bd8deadSopenharmony_ci    "Fraktur-Regular": {
59645bd8deadSopenharmony_ci        "33": [0, 0.69141, 0, 0],
59655bd8deadSopenharmony_ci        "34": [0, 0.69141, 0, 0],
59665bd8deadSopenharmony_ci        "38": [0, 0.69141, 0, 0],
59675bd8deadSopenharmony_ci        "39": [0, 0.69141, 0, 0],
59685bd8deadSopenharmony_ci        "40": [0.24982, 0.74947, 0, 0],
59695bd8deadSopenharmony_ci        "41": [0.24982, 0.74947, 0, 0],
59705bd8deadSopenharmony_ci        "42": [0, 0.62119, 0, 0],
59715bd8deadSopenharmony_ci        "43": [0.08319, 0.58283, 0, 0],
59725bd8deadSopenharmony_ci        "44": [0, 0.10803, 0, 0],
59735bd8deadSopenharmony_ci        "45": [0.08319, 0.58283, 0, 0],
59745bd8deadSopenharmony_ci        "46": [0, 0.10803, 0, 0],
59755bd8deadSopenharmony_ci        "47": [0.24982, 0.74947, 0, 0],
59765bd8deadSopenharmony_ci        "48": [0, 0.47534, 0, 0],
59775bd8deadSopenharmony_ci        "49": [0, 0.47534, 0, 0],
59785bd8deadSopenharmony_ci        "50": [0, 0.47534, 0, 0],
59795bd8deadSopenharmony_ci        "51": [0.18906, 0.47534, 0, 0],
59805bd8deadSopenharmony_ci        "52": [0.18906, 0.47534, 0, 0],
59815bd8deadSopenharmony_ci        "53": [0.18906, 0.47534, 0, 0],
59825bd8deadSopenharmony_ci        "54": [0, 0.69141, 0, 0],
59835bd8deadSopenharmony_ci        "55": [0.18906, 0.47534, 0, 0],
59845bd8deadSopenharmony_ci        "56": [0, 0.69141, 0, 0],
59855bd8deadSopenharmony_ci        "57": [0.18906, 0.47534, 0, 0],
59865bd8deadSopenharmony_ci        "58": [0, 0.47534, 0, 0],
59875bd8deadSopenharmony_ci        "59": [0.12604, 0.47534, 0, 0],
59885bd8deadSopenharmony_ci        "61": [-0.13099, 0.36866, 0, 0],
59895bd8deadSopenharmony_ci        "63": [0, 0.69141, 0, 0],
59905bd8deadSopenharmony_ci        "65": [0, 0.69141, 0, 0],
59915bd8deadSopenharmony_ci        "66": [0, 0.69141, 0, 0],
59925bd8deadSopenharmony_ci        "67": [0, 0.69141, 0, 0],
59935bd8deadSopenharmony_ci        "68": [0, 0.69141, 0, 0],
59945bd8deadSopenharmony_ci        "69": [0, 0.69141, 0, 0],
59955bd8deadSopenharmony_ci        "70": [0.12604, 0.69141, 0, 0],
59965bd8deadSopenharmony_ci        "71": [0, 0.69141, 0, 0],
59975bd8deadSopenharmony_ci        "72": [0.06302, 0.69141, 0, 0],
59985bd8deadSopenharmony_ci        "73": [0, 0.69141, 0, 0],
59995bd8deadSopenharmony_ci        "74": [0.12604, 0.69141, 0, 0],
60005bd8deadSopenharmony_ci        "75": [0, 0.69141, 0, 0],
60015bd8deadSopenharmony_ci        "76": [0, 0.69141, 0, 0],
60025bd8deadSopenharmony_ci        "77": [0, 0.69141, 0, 0],
60035bd8deadSopenharmony_ci        "78": [0, 0.69141, 0, 0],
60045bd8deadSopenharmony_ci        "79": [0, 0.69141, 0, 0],
60055bd8deadSopenharmony_ci        "80": [0.18906, 0.69141, 0, 0],
60065bd8deadSopenharmony_ci        "81": [0.03781, 0.69141, 0, 0],
60075bd8deadSopenharmony_ci        "82": [0, 0.69141, 0, 0],
60085bd8deadSopenharmony_ci        "83": [0, 0.69141, 0, 0],
60095bd8deadSopenharmony_ci        "84": [0, 0.69141, 0, 0],
60105bd8deadSopenharmony_ci        "85": [0, 0.69141, 0, 0],
60115bd8deadSopenharmony_ci        "86": [0, 0.69141, 0, 0],
60125bd8deadSopenharmony_ci        "87": [0, 0.69141, 0, 0],
60135bd8deadSopenharmony_ci        "88": [0, 0.69141, 0, 0],
60145bd8deadSopenharmony_ci        "89": [0.18906, 0.69141, 0, 0],
60155bd8deadSopenharmony_ci        "90": [0.12604, 0.69141, 0, 0],
60165bd8deadSopenharmony_ci        "91": [0.24982, 0.74947, 0, 0],
60175bd8deadSopenharmony_ci        "93": [0.24982, 0.74947, 0, 0],
60185bd8deadSopenharmony_ci        "94": [0, 0.69141, 0, 0],
60195bd8deadSopenharmony_ci        "97": [0, 0.47534, 0, 0],
60205bd8deadSopenharmony_ci        "98": [0, 0.69141, 0, 0],
60215bd8deadSopenharmony_ci        "99": [0, 0.47534, 0, 0],
60225bd8deadSopenharmony_ci        "100": [0, 0.62119, 0, 0],
60235bd8deadSopenharmony_ci        "101": [0, 0.47534, 0, 0],
60245bd8deadSopenharmony_ci        "102": [0.18906, 0.69141, 0, 0],
60255bd8deadSopenharmony_ci        "103": [0.18906, 0.47534, 0, 0],
60265bd8deadSopenharmony_ci        "104": [0.18906, 0.69141, 0, 0],
60275bd8deadSopenharmony_ci        "105": [0, 0.69141, 0, 0],
60285bd8deadSopenharmony_ci        "106": [0, 0.69141, 0, 0],
60295bd8deadSopenharmony_ci        "107": [0, 0.69141, 0, 0],
60305bd8deadSopenharmony_ci        "108": [0, 0.69141, 0, 0],
60315bd8deadSopenharmony_ci        "109": [0, 0.47534, 0, 0],
60325bd8deadSopenharmony_ci        "110": [0, 0.47534, 0, 0],
60335bd8deadSopenharmony_ci        "111": [0, 0.47534, 0, 0],
60345bd8deadSopenharmony_ci        "112": [0.18906, 0.52396, 0, 0],
60355bd8deadSopenharmony_ci        "113": [0.18906, 0.47534, 0, 0],
60365bd8deadSopenharmony_ci        "114": [0, 0.47534, 0, 0],
60375bd8deadSopenharmony_ci        "115": [0, 0.47534, 0, 0],
60385bd8deadSopenharmony_ci        "116": [0, 0.62119, 0, 0],
60395bd8deadSopenharmony_ci        "117": [0, 0.47534, 0, 0],
60405bd8deadSopenharmony_ci        "118": [0, 0.52396, 0, 0],
60415bd8deadSopenharmony_ci        "119": [0, 0.52396, 0, 0],
60425bd8deadSopenharmony_ci        "120": [0.18906, 0.47534, 0, 0],
60435bd8deadSopenharmony_ci        "121": [0.18906, 0.47534, 0, 0],
60445bd8deadSopenharmony_ci        "122": [0.18906, 0.47534, 0, 0],
60455bd8deadSopenharmony_ci        "8216": [0, 0.69141, 0, 0],
60465bd8deadSopenharmony_ci        "8217": [0, 0.69141, 0, 0],
60475bd8deadSopenharmony_ci        "58112": [0, 0.62119, 0, 0],
60485bd8deadSopenharmony_ci        "58113": [0, 0.62119, 0, 0],
60495bd8deadSopenharmony_ci        "58114": [0.18906, 0.69141, 0, 0],
60505bd8deadSopenharmony_ci        "58115": [0.18906, 0.69141, 0, 0],
60515bd8deadSopenharmony_ci        "58116": [0.18906, 0.47534, 0, 0],
60525bd8deadSopenharmony_ci        "58117": [0, 0.69141, 0, 0],
60535bd8deadSopenharmony_ci        "58118": [0, 0.62119, 0, 0],
60545bd8deadSopenharmony_ci        "58119": [0, 0.47534, 0, 0]
60555bd8deadSopenharmony_ci    },
60565bd8deadSopenharmony_ci    "Main-Bold": {
60575bd8deadSopenharmony_ci        "33": [0, 0.69444, 0, 0],
60585bd8deadSopenharmony_ci        "34": [0, 0.69444, 0, 0],
60595bd8deadSopenharmony_ci        "35": [0.19444, 0.69444, 0, 0],
60605bd8deadSopenharmony_ci        "36": [0.05556, 0.75, 0, 0],
60615bd8deadSopenharmony_ci        "37": [0.05556, 0.75, 0, 0],
60625bd8deadSopenharmony_ci        "38": [0, 0.69444, 0, 0],
60635bd8deadSopenharmony_ci        "39": [0, 0.69444, 0, 0],
60645bd8deadSopenharmony_ci        "40": [0.25, 0.75, 0, 0],
60655bd8deadSopenharmony_ci        "41": [0.25, 0.75, 0, 0],
60665bd8deadSopenharmony_ci        "42": [0, 0.75, 0, 0],
60675bd8deadSopenharmony_ci        "43": [0.13333, 0.63333, 0, 0],
60685bd8deadSopenharmony_ci        "44": [0.19444, 0.15556, 0, 0],
60695bd8deadSopenharmony_ci        "45": [0, 0.44444, 0, 0],
60705bd8deadSopenharmony_ci        "46": [0, 0.15556, 0, 0],
60715bd8deadSopenharmony_ci        "47": [0.25, 0.75, 0, 0],
60725bd8deadSopenharmony_ci        "48": [0, 0.64444, 0, 0],
60735bd8deadSopenharmony_ci        "49": [0, 0.64444, 0, 0],
60745bd8deadSopenharmony_ci        "50": [0, 0.64444, 0, 0],
60755bd8deadSopenharmony_ci        "51": [0, 0.64444, 0, 0],
60765bd8deadSopenharmony_ci        "52": [0, 0.64444, 0, 0],
60775bd8deadSopenharmony_ci        "53": [0, 0.64444, 0, 0],
60785bd8deadSopenharmony_ci        "54": [0, 0.64444, 0, 0],
60795bd8deadSopenharmony_ci        "55": [0, 0.64444, 0, 0],
60805bd8deadSopenharmony_ci        "56": [0, 0.64444, 0, 0],
60815bd8deadSopenharmony_ci        "57": [0, 0.64444, 0, 0],
60825bd8deadSopenharmony_ci        "58": [0, 0.44444, 0, 0],
60835bd8deadSopenharmony_ci        "59": [0.19444, 0.44444, 0, 0],
60845bd8deadSopenharmony_ci        "60": [0.08556, 0.58556, 0, 0],
60855bd8deadSopenharmony_ci        "61": [-0.10889, 0.39111, 0, 0],
60865bd8deadSopenharmony_ci        "62": [0.08556, 0.58556, 0, 0],
60875bd8deadSopenharmony_ci        "63": [0, 0.69444, 0, 0],
60885bd8deadSopenharmony_ci        "64": [0, 0.69444, 0, 0],
60895bd8deadSopenharmony_ci        "65": [0, 0.68611, 0, 0],
60905bd8deadSopenharmony_ci        "66": [0, 0.68611, 0, 0],
60915bd8deadSopenharmony_ci        "67": [0, 0.68611, 0, 0],
60925bd8deadSopenharmony_ci        "68": [0, 0.68611, 0, 0],
60935bd8deadSopenharmony_ci        "69": [0, 0.68611, 0, 0],
60945bd8deadSopenharmony_ci        "70": [0, 0.68611, 0, 0],
60955bd8deadSopenharmony_ci        "71": [0, 0.68611, 0, 0],
60965bd8deadSopenharmony_ci        "72": [0, 0.68611, 0, 0],
60975bd8deadSopenharmony_ci        "73": [0, 0.68611, 0, 0],
60985bd8deadSopenharmony_ci        "74": [0, 0.68611, 0, 0],
60995bd8deadSopenharmony_ci        "75": [0, 0.68611, 0, 0],
61005bd8deadSopenharmony_ci        "76": [0, 0.68611, 0, 0],
61015bd8deadSopenharmony_ci        "77": [0, 0.68611, 0, 0],
61025bd8deadSopenharmony_ci        "78": [0, 0.68611, 0, 0],
61035bd8deadSopenharmony_ci        "79": [0, 0.68611, 0, 0],
61045bd8deadSopenharmony_ci        "80": [0, 0.68611, 0, 0],
61055bd8deadSopenharmony_ci        "81": [0.19444, 0.68611, 0, 0],
61065bd8deadSopenharmony_ci        "82": [0, 0.68611, 0, 0],
61075bd8deadSopenharmony_ci        "83": [0, 0.68611, 0, 0],
61085bd8deadSopenharmony_ci        "84": [0, 0.68611, 0, 0],
61095bd8deadSopenharmony_ci        "85": [0, 0.68611, 0, 0],
61105bd8deadSopenharmony_ci        "86": [0, 0.68611, 0.01597, 0],
61115bd8deadSopenharmony_ci        "87": [0, 0.68611, 0.01597, 0],
61125bd8deadSopenharmony_ci        "88": [0, 0.68611, 0, 0],
61135bd8deadSopenharmony_ci        "89": [0, 0.68611, 0.02875, 0],
61145bd8deadSopenharmony_ci        "90": [0, 0.68611, 0, 0],
61155bd8deadSopenharmony_ci        "91": [0.25, 0.75, 0, 0],
61165bd8deadSopenharmony_ci        "92": [0.25, 0.75, 0, 0],
61175bd8deadSopenharmony_ci        "93": [0.25, 0.75, 0, 0],
61185bd8deadSopenharmony_ci        "94": [0, 0.69444, 0, 0],
61195bd8deadSopenharmony_ci        "95": [0.31, 0.13444, 0.03194, 0],
61205bd8deadSopenharmony_ci        "96": [0, 0.69444, 0, 0],
61215bd8deadSopenharmony_ci        "97": [0, 0.44444, 0, 0],
61225bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
61235bd8deadSopenharmony_ci        "99": [0, 0.44444, 0, 0],
61245bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0],
61255bd8deadSopenharmony_ci        "101": [0, 0.44444, 0, 0],
61265bd8deadSopenharmony_ci        "102": [0, 0.69444, 0.10903, 0],
61275bd8deadSopenharmony_ci        "103": [0.19444, 0.44444, 0.01597, 0],
61285bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
61295bd8deadSopenharmony_ci        "105": [0, 0.69444, 0, 0],
61305bd8deadSopenharmony_ci        "106": [0.19444, 0.69444, 0, 0],
61315bd8deadSopenharmony_ci        "107": [0, 0.69444, 0, 0],
61325bd8deadSopenharmony_ci        "108": [0, 0.69444, 0, 0],
61335bd8deadSopenharmony_ci        "109": [0, 0.44444, 0, 0],
61345bd8deadSopenharmony_ci        "110": [0, 0.44444, 0, 0],
61355bd8deadSopenharmony_ci        "111": [0, 0.44444, 0, 0],
61365bd8deadSopenharmony_ci        "112": [0.19444, 0.44444, 0, 0],
61375bd8deadSopenharmony_ci        "113": [0.19444, 0.44444, 0, 0],
61385bd8deadSopenharmony_ci        "114": [0, 0.44444, 0, 0],
61395bd8deadSopenharmony_ci        "115": [0, 0.44444, 0, 0],
61405bd8deadSopenharmony_ci        "116": [0, 0.63492, 0, 0],
61415bd8deadSopenharmony_ci        "117": [0, 0.44444, 0, 0],
61425bd8deadSopenharmony_ci        "118": [0, 0.44444, 0.01597, 0],
61435bd8deadSopenharmony_ci        "119": [0, 0.44444, 0.01597, 0],
61445bd8deadSopenharmony_ci        "120": [0, 0.44444, 0, 0],
61455bd8deadSopenharmony_ci        "121": [0.19444, 0.44444, 0.01597, 0],
61465bd8deadSopenharmony_ci        "122": [0, 0.44444, 0, 0],
61475bd8deadSopenharmony_ci        "123": [0.25, 0.75, 0, 0],
61485bd8deadSopenharmony_ci        "124": [0.25, 0.75, 0, 0],
61495bd8deadSopenharmony_ci        "125": [0.25, 0.75, 0, 0],
61505bd8deadSopenharmony_ci        "126": [0.35, 0.34444, 0, 0],
61515bd8deadSopenharmony_ci        "168": [0, 0.69444, 0, 0],
61525bd8deadSopenharmony_ci        "172": [0, 0.44444, 0, 0],
61535bd8deadSopenharmony_ci        "175": [0, 0.59611, 0, 0],
61545bd8deadSopenharmony_ci        "176": [0, 0.69444, 0, 0],
61555bd8deadSopenharmony_ci        "177": [0.13333, 0.63333, 0, 0],
61565bd8deadSopenharmony_ci        "180": [0, 0.69444, 0, 0],
61575bd8deadSopenharmony_ci        "215": [0.13333, 0.63333, 0, 0],
61585bd8deadSopenharmony_ci        "247": [0.13333, 0.63333, 0, 0],
61595bd8deadSopenharmony_ci        "305": [0, 0.44444, 0, 0],
61605bd8deadSopenharmony_ci        "567": [0.19444, 0.44444, 0, 0],
61615bd8deadSopenharmony_ci        "710": [0, 0.69444, 0, 0],
61625bd8deadSopenharmony_ci        "711": [0, 0.63194, 0, 0],
61635bd8deadSopenharmony_ci        "713": [0, 0.59611, 0, 0],
61645bd8deadSopenharmony_ci        "714": [0, 0.69444, 0, 0],
61655bd8deadSopenharmony_ci        "715": [0, 0.69444, 0, 0],
61665bd8deadSopenharmony_ci        "728": [0, 0.69444, 0, 0],
61675bd8deadSopenharmony_ci        "729": [0, 0.69444, 0, 0],
61685bd8deadSopenharmony_ci        "730": [0, 0.69444, 0, 0],
61695bd8deadSopenharmony_ci        "732": [0, 0.69444, 0, 0],
61705bd8deadSopenharmony_ci        "768": [0, 0.69444, 0, 0],
61715bd8deadSopenharmony_ci        "769": [0, 0.69444, 0, 0],
61725bd8deadSopenharmony_ci        "770": [0, 0.69444, 0, 0],
61735bd8deadSopenharmony_ci        "771": [0, 0.69444, 0, 0],
61745bd8deadSopenharmony_ci        "772": [0, 0.59611, 0, 0],
61755bd8deadSopenharmony_ci        "774": [0, 0.69444, 0, 0],
61765bd8deadSopenharmony_ci        "775": [0, 0.69444, 0, 0],
61775bd8deadSopenharmony_ci        "776": [0, 0.69444, 0, 0],
61785bd8deadSopenharmony_ci        "778": [0, 0.69444, 0, 0],
61795bd8deadSopenharmony_ci        "779": [0, 0.69444, 0, 0],
61805bd8deadSopenharmony_ci        "780": [0, 0.63194, 0, 0],
61815bd8deadSopenharmony_ci        "824": [0.19444, 0.69444, 0, 0],
61825bd8deadSopenharmony_ci        "915": [0, 0.68611, 0, 0],
61835bd8deadSopenharmony_ci        "916": [0, 0.68611, 0, 0],
61845bd8deadSopenharmony_ci        "920": [0, 0.68611, 0, 0],
61855bd8deadSopenharmony_ci        "923": [0, 0.68611, 0, 0],
61865bd8deadSopenharmony_ci        "926": [0, 0.68611, 0, 0],
61875bd8deadSopenharmony_ci        "928": [0, 0.68611, 0, 0],
61885bd8deadSopenharmony_ci        "931": [0, 0.68611, 0, 0],
61895bd8deadSopenharmony_ci        "933": [0, 0.68611, 0, 0],
61905bd8deadSopenharmony_ci        "934": [0, 0.68611, 0, 0],
61915bd8deadSopenharmony_ci        "936": [0, 0.68611, 0, 0],
61925bd8deadSopenharmony_ci        "937": [0, 0.68611, 0, 0],
61935bd8deadSopenharmony_ci        "8211": [0, 0.44444, 0.03194, 0],
61945bd8deadSopenharmony_ci        "8212": [0, 0.44444, 0.03194, 0],
61955bd8deadSopenharmony_ci        "8216": [0, 0.69444, 0, 0],
61965bd8deadSopenharmony_ci        "8217": [0, 0.69444, 0, 0],
61975bd8deadSopenharmony_ci        "8220": [0, 0.69444, 0, 0],
61985bd8deadSopenharmony_ci        "8221": [0, 0.69444, 0, 0],
61995bd8deadSopenharmony_ci        "8224": [0.19444, 0.69444, 0, 0],
62005bd8deadSopenharmony_ci        "8225": [0.19444, 0.69444, 0, 0],
62015bd8deadSopenharmony_ci        "8242": [0, 0.55556, 0, 0],
62025bd8deadSopenharmony_ci        "8407": [0, 0.72444, 0.15486, 0],
62035bd8deadSopenharmony_ci        "8463": [0, 0.69444, 0, 0],
62045bd8deadSopenharmony_ci        "8465": [0, 0.69444, 0, 0],
62055bd8deadSopenharmony_ci        "8467": [0, 0.69444, 0, 0],
62065bd8deadSopenharmony_ci        "8472": [0.19444, 0.44444, 0, 0],
62075bd8deadSopenharmony_ci        "8476": [0, 0.69444, 0, 0],
62085bd8deadSopenharmony_ci        "8501": [0, 0.69444, 0, 0],
62095bd8deadSopenharmony_ci        "8592": [-0.10889, 0.39111, 0, 0],
62105bd8deadSopenharmony_ci        "8593": [0.19444, 0.69444, 0, 0],
62115bd8deadSopenharmony_ci        "8594": [-0.10889, 0.39111, 0, 0],
62125bd8deadSopenharmony_ci        "8595": [0.19444, 0.69444, 0, 0],
62135bd8deadSopenharmony_ci        "8596": [-0.10889, 0.39111, 0, 0],
62145bd8deadSopenharmony_ci        "8597": [0.25, 0.75, 0, 0],
62155bd8deadSopenharmony_ci        "8598": [0.19444, 0.69444, 0, 0],
62165bd8deadSopenharmony_ci        "8599": [0.19444, 0.69444, 0, 0],
62175bd8deadSopenharmony_ci        "8600": [0.19444, 0.69444, 0, 0],
62185bd8deadSopenharmony_ci        "8601": [0.19444, 0.69444, 0, 0],
62195bd8deadSopenharmony_ci        "8636": [-0.10889, 0.39111, 0, 0],
62205bd8deadSopenharmony_ci        "8637": [-0.10889, 0.39111, 0, 0],
62215bd8deadSopenharmony_ci        "8640": [-0.10889, 0.39111, 0, 0],
62225bd8deadSopenharmony_ci        "8641": [-0.10889, 0.39111, 0, 0],
62235bd8deadSopenharmony_ci        "8656": [-0.10889, 0.39111, 0, 0],
62245bd8deadSopenharmony_ci        "8657": [0.19444, 0.69444, 0, 0],
62255bd8deadSopenharmony_ci        "8658": [-0.10889, 0.39111, 0, 0],
62265bd8deadSopenharmony_ci        "8659": [0.19444, 0.69444, 0, 0],
62275bd8deadSopenharmony_ci        "8660": [-0.10889, 0.39111, 0, 0],
62285bd8deadSopenharmony_ci        "8661": [0.25, 0.75, 0, 0],
62295bd8deadSopenharmony_ci        "8704": [0, 0.69444, 0, 0],
62305bd8deadSopenharmony_ci        "8706": [0, 0.69444, 0.06389, 0],
62315bd8deadSopenharmony_ci        "8707": [0, 0.69444, 0, 0],
62325bd8deadSopenharmony_ci        "8709": [0.05556, 0.75, 0, 0],
62335bd8deadSopenharmony_ci        "8711": [0, 0.68611, 0, 0],
62345bd8deadSopenharmony_ci        "8712": [0.08556, 0.58556, 0, 0],
62355bd8deadSopenharmony_ci        "8715": [0.08556, 0.58556, 0, 0],
62365bd8deadSopenharmony_ci        "8722": [0.13333, 0.63333, 0, 0],
62375bd8deadSopenharmony_ci        "8723": [0.13333, 0.63333, 0, 0],
62385bd8deadSopenharmony_ci        "8725": [0.25, 0.75, 0, 0],
62395bd8deadSopenharmony_ci        "8726": [0.25, 0.75, 0, 0],
62405bd8deadSopenharmony_ci        "8727": [-0.02778, 0.47222, 0, 0],
62415bd8deadSopenharmony_ci        "8728": [-0.02639, 0.47361, 0, 0],
62425bd8deadSopenharmony_ci        "8729": [-0.02639, 0.47361, 0, 0],
62435bd8deadSopenharmony_ci        "8730": [0.18, 0.82, 0, 0],
62445bd8deadSopenharmony_ci        "8733": [0, 0.44444, 0, 0],
62455bd8deadSopenharmony_ci        "8734": [0, 0.44444, 0, 0],
62465bd8deadSopenharmony_ci        "8736": [0, 0.69224, 0, 0],
62475bd8deadSopenharmony_ci        "8739": [0.25, 0.75, 0, 0],
62485bd8deadSopenharmony_ci        "8741": [0.25, 0.75, 0, 0],
62495bd8deadSopenharmony_ci        "8743": [0, 0.55556, 0, 0],
62505bd8deadSopenharmony_ci        "8744": [0, 0.55556, 0, 0],
62515bd8deadSopenharmony_ci        "8745": [0, 0.55556, 0, 0],
62525bd8deadSopenharmony_ci        "8746": [0, 0.55556, 0, 0],
62535bd8deadSopenharmony_ci        "8747": [0.19444, 0.69444, 0.12778, 0],
62545bd8deadSopenharmony_ci        "8764": [-0.10889, 0.39111, 0, 0],
62555bd8deadSopenharmony_ci        "8768": [0.19444, 0.69444, 0, 0],
62565bd8deadSopenharmony_ci        "8771": [0.00222, 0.50222, 0, 0],
62575bd8deadSopenharmony_ci        "8776": [0.02444, 0.52444, 0, 0],
62585bd8deadSopenharmony_ci        "8781": [0.00222, 0.50222, 0, 0],
62595bd8deadSopenharmony_ci        "8801": [0.00222, 0.50222, 0, 0],
62605bd8deadSopenharmony_ci        "8804": [0.19667, 0.69667, 0, 0],
62615bd8deadSopenharmony_ci        "8805": [0.19667, 0.69667, 0, 0],
62625bd8deadSopenharmony_ci        "8810": [0.08556, 0.58556, 0, 0],
62635bd8deadSopenharmony_ci        "8811": [0.08556, 0.58556, 0, 0],
62645bd8deadSopenharmony_ci        "8826": [0.08556, 0.58556, 0, 0],
62655bd8deadSopenharmony_ci        "8827": [0.08556, 0.58556, 0, 0],
62665bd8deadSopenharmony_ci        "8834": [0.08556, 0.58556, 0, 0],
62675bd8deadSopenharmony_ci        "8835": [0.08556, 0.58556, 0, 0],
62685bd8deadSopenharmony_ci        "8838": [0.19667, 0.69667, 0, 0],
62695bd8deadSopenharmony_ci        "8839": [0.19667, 0.69667, 0, 0],
62705bd8deadSopenharmony_ci        "8846": [0, 0.55556, 0, 0],
62715bd8deadSopenharmony_ci        "8849": [0.19667, 0.69667, 0, 0],
62725bd8deadSopenharmony_ci        "8850": [0.19667, 0.69667, 0, 0],
62735bd8deadSopenharmony_ci        "8851": [0, 0.55556, 0, 0],
62745bd8deadSopenharmony_ci        "8852": [0, 0.55556, 0, 0],
62755bd8deadSopenharmony_ci        "8853": [0.13333, 0.63333, 0, 0],
62765bd8deadSopenharmony_ci        "8854": [0.13333, 0.63333, 0, 0],
62775bd8deadSopenharmony_ci        "8855": [0.13333, 0.63333, 0, 0],
62785bd8deadSopenharmony_ci        "8856": [0.13333, 0.63333, 0, 0],
62795bd8deadSopenharmony_ci        "8857": [0.13333, 0.63333, 0, 0],
62805bd8deadSopenharmony_ci        "8866": [0, 0.69444, 0, 0],
62815bd8deadSopenharmony_ci        "8867": [0, 0.69444, 0, 0],
62825bd8deadSopenharmony_ci        "8868": [0, 0.69444, 0, 0],
62835bd8deadSopenharmony_ci        "8869": [0, 0.69444, 0, 0],
62845bd8deadSopenharmony_ci        "8900": [-0.02639, 0.47361, 0, 0],
62855bd8deadSopenharmony_ci        "8901": [-0.02639, 0.47361, 0, 0],
62865bd8deadSopenharmony_ci        "8902": [-0.02778, 0.47222, 0, 0],
62875bd8deadSopenharmony_ci        "8968": [0.25, 0.75, 0, 0],
62885bd8deadSopenharmony_ci        "8969": [0.25, 0.75, 0, 0],
62895bd8deadSopenharmony_ci        "8970": [0.25, 0.75, 0, 0],
62905bd8deadSopenharmony_ci        "8971": [0.25, 0.75, 0, 0],
62915bd8deadSopenharmony_ci        "8994": [-0.13889, 0.36111, 0, 0],
62925bd8deadSopenharmony_ci        "8995": [-0.13889, 0.36111, 0, 0],
62935bd8deadSopenharmony_ci        "9651": [0.19444, 0.69444, 0, 0],
62945bd8deadSopenharmony_ci        "9657": [-0.02778, 0.47222, 0, 0],
62955bd8deadSopenharmony_ci        "9661": [0.19444, 0.69444, 0, 0],
62965bd8deadSopenharmony_ci        "9667": [-0.02778, 0.47222, 0, 0],
62975bd8deadSopenharmony_ci        "9711": [0.19444, 0.69444, 0, 0],
62985bd8deadSopenharmony_ci        "9824": [0.12963, 0.69444, 0, 0],
62995bd8deadSopenharmony_ci        "9825": [0.12963, 0.69444, 0, 0],
63005bd8deadSopenharmony_ci        "9826": [0.12963, 0.69444, 0, 0],
63015bd8deadSopenharmony_ci        "9827": [0.12963, 0.69444, 0, 0],
63025bd8deadSopenharmony_ci        "9837": [0, 0.75, 0, 0],
63035bd8deadSopenharmony_ci        "9838": [0.19444, 0.69444, 0, 0],
63045bd8deadSopenharmony_ci        "9839": [0.19444, 0.69444, 0, 0],
63055bd8deadSopenharmony_ci        "10216": [0.25, 0.75, 0, 0],
63065bd8deadSopenharmony_ci        "10217": [0.25, 0.75, 0, 0],
63075bd8deadSopenharmony_ci        "10815": [0, 0.68611, 0, 0],
63085bd8deadSopenharmony_ci        "10927": [0.19667, 0.69667, 0, 0],
63095bd8deadSopenharmony_ci        "10928": [0.19667, 0.69667, 0, 0]
63105bd8deadSopenharmony_ci    },
63115bd8deadSopenharmony_ci    "Main-Italic": {
63125bd8deadSopenharmony_ci        "33": [0, 0.69444, 0.12417, 0],
63135bd8deadSopenharmony_ci        "34": [0, 0.69444, 0.06961, 0],
63145bd8deadSopenharmony_ci        "35": [0.19444, 0.69444, 0.06616, 0],
63155bd8deadSopenharmony_ci        "37": [0.05556, 0.75, 0.13639, 0],
63165bd8deadSopenharmony_ci        "38": [0, 0.69444, 0.09694, 0],
63175bd8deadSopenharmony_ci        "39": [0, 0.69444, 0.12417, 0],
63185bd8deadSopenharmony_ci        "40": [0.25, 0.75, 0.16194, 0],
63195bd8deadSopenharmony_ci        "41": [0.25, 0.75, 0.03694, 0],
63205bd8deadSopenharmony_ci        "42": [0, 0.75, 0.14917, 0],
63215bd8deadSopenharmony_ci        "43": [0.05667, 0.56167, 0.03694, 0],
63225bd8deadSopenharmony_ci        "44": [0.19444, 0.10556, 0, 0],
63235bd8deadSopenharmony_ci        "45": [0, 0.43056, 0.02826, 0],
63245bd8deadSopenharmony_ci        "46": [0, 0.10556, 0, 0],
63255bd8deadSopenharmony_ci        "47": [0.25, 0.75, 0.16194, 0],
63265bd8deadSopenharmony_ci        "48": [0, 0.64444, 0.13556, 0],
63275bd8deadSopenharmony_ci        "49": [0, 0.64444, 0.13556, 0],
63285bd8deadSopenharmony_ci        "50": [0, 0.64444, 0.13556, 0],
63295bd8deadSopenharmony_ci        "51": [0, 0.64444, 0.13556, 0],
63305bd8deadSopenharmony_ci        "52": [0.19444, 0.64444, 0.13556, 0],
63315bd8deadSopenharmony_ci        "53": [0, 0.64444, 0.13556, 0],
63325bd8deadSopenharmony_ci        "54": [0, 0.64444, 0.13556, 0],
63335bd8deadSopenharmony_ci        "55": [0.19444, 0.64444, 0.13556, 0],
63345bd8deadSopenharmony_ci        "56": [0, 0.64444, 0.13556, 0],
63355bd8deadSopenharmony_ci        "57": [0, 0.64444, 0.13556, 0],
63365bd8deadSopenharmony_ci        "58": [0, 0.43056, 0.0582, 0],
63375bd8deadSopenharmony_ci        "59": [0.19444, 0.43056, 0.0582, 0],
63385bd8deadSopenharmony_ci        "61": [-0.13313, 0.36687, 0.06616, 0],
63395bd8deadSopenharmony_ci        "63": [0, 0.69444, 0.1225, 0],
63405bd8deadSopenharmony_ci        "64": [0, 0.69444, 0.09597, 0],
63415bd8deadSopenharmony_ci        "65": [0, 0.68333, 0, 0],
63425bd8deadSopenharmony_ci        "66": [0, 0.68333, 0.10257, 0],
63435bd8deadSopenharmony_ci        "67": [0, 0.68333, 0.14528, 0],
63445bd8deadSopenharmony_ci        "68": [0, 0.68333, 0.09403, 0],
63455bd8deadSopenharmony_ci        "69": [0, 0.68333, 0.12028, 0],
63465bd8deadSopenharmony_ci        "70": [0, 0.68333, 0.13305, 0],
63475bd8deadSopenharmony_ci        "71": [0, 0.68333, 0.08722, 0],
63485bd8deadSopenharmony_ci        "72": [0, 0.68333, 0.16389, 0],
63495bd8deadSopenharmony_ci        "73": [0, 0.68333, 0.15806, 0],
63505bd8deadSopenharmony_ci        "74": [0, 0.68333, 0.14028, 0],
63515bd8deadSopenharmony_ci        "75": [0, 0.68333, 0.14528, 0],
63525bd8deadSopenharmony_ci        "76": [0, 0.68333, 0, 0],
63535bd8deadSopenharmony_ci        "77": [0, 0.68333, 0.16389, 0],
63545bd8deadSopenharmony_ci        "78": [0, 0.68333, 0.16389, 0],
63555bd8deadSopenharmony_ci        "79": [0, 0.68333, 0.09403, 0],
63565bd8deadSopenharmony_ci        "80": [0, 0.68333, 0.10257, 0],
63575bd8deadSopenharmony_ci        "81": [0.19444, 0.68333, 0.09403, 0],
63585bd8deadSopenharmony_ci        "82": [0, 0.68333, 0.03868, 0],
63595bd8deadSopenharmony_ci        "83": [0, 0.68333, 0.11972, 0],
63605bd8deadSopenharmony_ci        "84": [0, 0.68333, 0.13305, 0],
63615bd8deadSopenharmony_ci        "85": [0, 0.68333, 0.16389, 0],
63625bd8deadSopenharmony_ci        "86": [0, 0.68333, 0.18361, 0],
63635bd8deadSopenharmony_ci        "87": [0, 0.68333, 0.18361, 0],
63645bd8deadSopenharmony_ci        "88": [0, 0.68333, 0.15806, 0],
63655bd8deadSopenharmony_ci        "89": [0, 0.68333, 0.19383, 0],
63665bd8deadSopenharmony_ci        "90": [0, 0.68333, 0.14528, 0],
63675bd8deadSopenharmony_ci        "91": [0.25, 0.75, 0.1875, 0],
63685bd8deadSopenharmony_ci        "93": [0.25, 0.75, 0.10528, 0],
63695bd8deadSopenharmony_ci        "94": [0, 0.69444, 0.06646, 0],
63705bd8deadSopenharmony_ci        "95": [0.31, 0.12056, 0.09208, 0],
63715bd8deadSopenharmony_ci        "97": [0, 0.43056, 0.07671, 0],
63725bd8deadSopenharmony_ci        "98": [0, 0.69444, 0.06312, 0],
63735bd8deadSopenharmony_ci        "99": [0, 0.43056, 0.05653, 0],
63745bd8deadSopenharmony_ci        "100": [0, 0.69444, 0.10333, 0],
63755bd8deadSopenharmony_ci        "101": [0, 0.43056, 0.07514, 0],
63765bd8deadSopenharmony_ci        "102": [0.19444, 0.69444, 0.21194, 0],
63775bd8deadSopenharmony_ci        "103": [0.19444, 0.43056, 0.08847, 0],
63785bd8deadSopenharmony_ci        "104": [0, 0.69444, 0.07671, 0],
63795bd8deadSopenharmony_ci        "105": [0, 0.65536, 0.1019, 0],
63805bd8deadSopenharmony_ci        "106": [0.19444, 0.65536, 0.14467, 0],
63815bd8deadSopenharmony_ci        "107": [0, 0.69444, 0.10764, 0],
63825bd8deadSopenharmony_ci        "108": [0, 0.69444, 0.10333, 0],
63835bd8deadSopenharmony_ci        "109": [0, 0.43056, 0.07671, 0],
63845bd8deadSopenharmony_ci        "110": [0, 0.43056, 0.07671, 0],
63855bd8deadSopenharmony_ci        "111": [0, 0.43056, 0.06312, 0],
63865bd8deadSopenharmony_ci        "112": [0.19444, 0.43056, 0.06312, 0],
63875bd8deadSopenharmony_ci        "113": [0.19444, 0.43056, 0.08847, 0],
63885bd8deadSopenharmony_ci        "114": [0, 0.43056, 0.10764, 0],
63895bd8deadSopenharmony_ci        "115": [0, 0.43056, 0.08208, 0],
63905bd8deadSopenharmony_ci        "116": [0, 0.61508, 0.09486, 0],
63915bd8deadSopenharmony_ci        "117": [0, 0.43056, 0.07671, 0],
63925bd8deadSopenharmony_ci        "118": [0, 0.43056, 0.10764, 0],
63935bd8deadSopenharmony_ci        "119": [0, 0.43056, 0.10764, 0],
63945bd8deadSopenharmony_ci        "120": [0, 0.43056, 0.12042, 0],
63955bd8deadSopenharmony_ci        "121": [0.19444, 0.43056, 0.08847, 0],
63965bd8deadSopenharmony_ci        "122": [0, 0.43056, 0.12292, 0],
63975bd8deadSopenharmony_ci        "126": [0.35, 0.31786, 0.11585, 0],
63985bd8deadSopenharmony_ci        "163": [0, 0.69444, 0, 0],
63995bd8deadSopenharmony_ci        "305": [0, 0.43056, 0, 0.02778],
64005bd8deadSopenharmony_ci        "567": [0.19444, 0.43056, 0, 0.08334],
64015bd8deadSopenharmony_ci        "768": [0, 0.69444, 0, 0],
64025bd8deadSopenharmony_ci        "769": [0, 0.69444, 0.09694, 0],
64035bd8deadSopenharmony_ci        "770": [0, 0.69444, 0.06646, 0],
64045bd8deadSopenharmony_ci        "771": [0, 0.66786, 0.11585, 0],
64055bd8deadSopenharmony_ci        "772": [0, 0.56167, 0.10333, 0],
64065bd8deadSopenharmony_ci        "774": [0, 0.69444, 0.10806, 0],
64075bd8deadSopenharmony_ci        "775": [0, 0.66786, 0.11752, 0],
64085bd8deadSopenharmony_ci        "776": [0, 0.66786, 0.10474, 0],
64095bd8deadSopenharmony_ci        "778": [0, 0.69444, 0, 0],
64105bd8deadSopenharmony_ci        "779": [0, 0.69444, 0.1225, 0],
64115bd8deadSopenharmony_ci        "780": [0, 0.62847, 0.08295, 0],
64125bd8deadSopenharmony_ci        "915": [0, 0.68333, 0.13305, 0],
64135bd8deadSopenharmony_ci        "916": [0, 0.68333, 0, 0],
64145bd8deadSopenharmony_ci        "920": [0, 0.68333, 0.09403, 0],
64155bd8deadSopenharmony_ci        "923": [0, 0.68333, 0, 0],
64165bd8deadSopenharmony_ci        "926": [0, 0.68333, 0.15294, 0],
64175bd8deadSopenharmony_ci        "928": [0, 0.68333, 0.16389, 0],
64185bd8deadSopenharmony_ci        "931": [0, 0.68333, 0.12028, 0],
64195bd8deadSopenharmony_ci        "933": [0, 0.68333, 0.11111, 0],
64205bd8deadSopenharmony_ci        "934": [0, 0.68333, 0.05986, 0],
64215bd8deadSopenharmony_ci        "936": [0, 0.68333, 0.11111, 0],
64225bd8deadSopenharmony_ci        "937": [0, 0.68333, 0.10257, 0],
64235bd8deadSopenharmony_ci        "8211": [0, 0.43056, 0.09208, 0],
64245bd8deadSopenharmony_ci        "8212": [0, 0.43056, 0.09208, 0],
64255bd8deadSopenharmony_ci        "8216": [0, 0.69444, 0.12417, 0],
64265bd8deadSopenharmony_ci        "8217": [0, 0.69444, 0.12417, 0],
64275bd8deadSopenharmony_ci        "8220": [0, 0.69444, 0.1685, 0],
64285bd8deadSopenharmony_ci        "8221": [0, 0.69444, 0.06961, 0],
64295bd8deadSopenharmony_ci        "8463": [0, 0.68889, 0, 0]
64305bd8deadSopenharmony_ci    },
64315bd8deadSopenharmony_ci    "Main-Regular": {
64325bd8deadSopenharmony_ci        "32": [0, 0, 0, 0],
64335bd8deadSopenharmony_ci        "33": [0, 0.69444, 0, 0],
64345bd8deadSopenharmony_ci        "34": [0, 0.69444, 0, 0],
64355bd8deadSopenharmony_ci        "35": [0.19444, 0.69444, 0, 0],
64365bd8deadSopenharmony_ci        "36": [0.05556, 0.75, 0, 0],
64375bd8deadSopenharmony_ci        "37": [0.05556, 0.75, 0, 0],
64385bd8deadSopenharmony_ci        "38": [0, 0.69444, 0, 0],
64395bd8deadSopenharmony_ci        "39": [0, 0.69444, 0, 0],
64405bd8deadSopenharmony_ci        "40": [0.25, 0.75, 0, 0],
64415bd8deadSopenharmony_ci        "41": [0.25, 0.75, 0, 0],
64425bd8deadSopenharmony_ci        "42": [0, 0.75, 0, 0],
64435bd8deadSopenharmony_ci        "43": [0.08333, 0.58333, 0, 0],
64445bd8deadSopenharmony_ci        "44": [0.19444, 0.10556, 0, 0],
64455bd8deadSopenharmony_ci        "45": [0, 0.43056, 0, 0],
64465bd8deadSopenharmony_ci        "46": [0, 0.10556, 0, 0],
64475bd8deadSopenharmony_ci        "47": [0.25, 0.75, 0, 0],
64485bd8deadSopenharmony_ci        "48": [0, 0.64444, 0, 0],
64495bd8deadSopenharmony_ci        "49": [0, 0.64444, 0, 0],
64505bd8deadSopenharmony_ci        "50": [0, 0.64444, 0, 0],
64515bd8deadSopenharmony_ci        "51": [0, 0.64444, 0, 0],
64525bd8deadSopenharmony_ci        "52": [0, 0.64444, 0, 0],
64535bd8deadSopenharmony_ci        "53": [0, 0.64444, 0, 0],
64545bd8deadSopenharmony_ci        "54": [0, 0.64444, 0, 0],
64555bd8deadSopenharmony_ci        "55": [0, 0.64444, 0, 0],
64565bd8deadSopenharmony_ci        "56": [0, 0.64444, 0, 0],
64575bd8deadSopenharmony_ci        "57": [0, 0.64444, 0, 0],
64585bd8deadSopenharmony_ci        "58": [0, 0.43056, 0, 0],
64595bd8deadSopenharmony_ci        "59": [0.19444, 0.43056, 0, 0],
64605bd8deadSopenharmony_ci        "60": [0.0391, 0.5391, 0, 0],
64615bd8deadSopenharmony_ci        "61": [-0.13313, 0.36687, 0, 0],
64625bd8deadSopenharmony_ci        "62": [0.0391, 0.5391, 0, 0],
64635bd8deadSopenharmony_ci        "63": [0, 0.69444, 0, 0],
64645bd8deadSopenharmony_ci        "64": [0, 0.69444, 0, 0],
64655bd8deadSopenharmony_ci        "65": [0, 0.68333, 0, 0],
64665bd8deadSopenharmony_ci        "66": [0, 0.68333, 0, 0],
64675bd8deadSopenharmony_ci        "67": [0, 0.68333, 0, 0],
64685bd8deadSopenharmony_ci        "68": [0, 0.68333, 0, 0],
64695bd8deadSopenharmony_ci        "69": [0, 0.68333, 0, 0],
64705bd8deadSopenharmony_ci        "70": [0, 0.68333, 0, 0],
64715bd8deadSopenharmony_ci        "71": [0, 0.68333, 0, 0],
64725bd8deadSopenharmony_ci        "72": [0, 0.68333, 0, 0],
64735bd8deadSopenharmony_ci        "73": [0, 0.68333, 0, 0],
64745bd8deadSopenharmony_ci        "74": [0, 0.68333, 0, 0],
64755bd8deadSopenharmony_ci        "75": [0, 0.68333, 0, 0],
64765bd8deadSopenharmony_ci        "76": [0, 0.68333, 0, 0],
64775bd8deadSopenharmony_ci        "77": [0, 0.68333, 0, 0],
64785bd8deadSopenharmony_ci        "78": [0, 0.68333, 0, 0],
64795bd8deadSopenharmony_ci        "79": [0, 0.68333, 0, 0],
64805bd8deadSopenharmony_ci        "80": [0, 0.68333, 0, 0],
64815bd8deadSopenharmony_ci        "81": [0.19444, 0.68333, 0, 0],
64825bd8deadSopenharmony_ci        "82": [0, 0.68333, 0, 0],
64835bd8deadSopenharmony_ci        "83": [0, 0.68333, 0, 0],
64845bd8deadSopenharmony_ci        "84": [0, 0.68333, 0, 0],
64855bd8deadSopenharmony_ci        "85": [0, 0.68333, 0, 0],
64865bd8deadSopenharmony_ci        "86": [0, 0.68333, 0.01389, 0],
64875bd8deadSopenharmony_ci        "87": [0, 0.68333, 0.01389, 0],
64885bd8deadSopenharmony_ci        "88": [0, 0.68333, 0, 0],
64895bd8deadSopenharmony_ci        "89": [0, 0.68333, 0.025, 0],
64905bd8deadSopenharmony_ci        "90": [0, 0.68333, 0, 0],
64915bd8deadSopenharmony_ci        "91": [0.25, 0.75, 0, 0],
64925bd8deadSopenharmony_ci        "92": [0.25, 0.75, 0, 0],
64935bd8deadSopenharmony_ci        "93": [0.25, 0.75, 0, 0],
64945bd8deadSopenharmony_ci        "94": [0, 0.69444, 0, 0],
64955bd8deadSopenharmony_ci        "95": [0.31, 0.12056, 0.02778, 0],
64965bd8deadSopenharmony_ci        "96": [0, 0.69444, 0, 0],
64975bd8deadSopenharmony_ci        "97": [0, 0.43056, 0, 0],
64985bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
64995bd8deadSopenharmony_ci        "99": [0, 0.43056, 0, 0],
65005bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0],
65015bd8deadSopenharmony_ci        "101": [0, 0.43056, 0, 0],
65025bd8deadSopenharmony_ci        "102": [0, 0.69444, 0.07778, 0],
65035bd8deadSopenharmony_ci        "103": [0.19444, 0.43056, 0.01389, 0],
65045bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
65055bd8deadSopenharmony_ci        "105": [0, 0.66786, 0, 0],
65065bd8deadSopenharmony_ci        "106": [0.19444, 0.66786, 0, 0],
65075bd8deadSopenharmony_ci        "107": [0, 0.69444, 0, 0],
65085bd8deadSopenharmony_ci        "108": [0, 0.69444, 0, 0],
65095bd8deadSopenharmony_ci        "109": [0, 0.43056, 0, 0],
65105bd8deadSopenharmony_ci        "110": [0, 0.43056, 0, 0],
65115bd8deadSopenharmony_ci        "111": [0, 0.43056, 0, 0],
65125bd8deadSopenharmony_ci        "112": [0.19444, 0.43056, 0, 0],
65135bd8deadSopenharmony_ci        "113": [0.19444, 0.43056, 0, 0],
65145bd8deadSopenharmony_ci        "114": [0, 0.43056, 0, 0],
65155bd8deadSopenharmony_ci        "115": [0, 0.43056, 0, 0],
65165bd8deadSopenharmony_ci        "116": [0, 0.61508, 0, 0],
65175bd8deadSopenharmony_ci        "117": [0, 0.43056, 0, 0],
65185bd8deadSopenharmony_ci        "118": [0, 0.43056, 0.01389, 0],
65195bd8deadSopenharmony_ci        "119": [0, 0.43056, 0.01389, 0],
65205bd8deadSopenharmony_ci        "120": [0, 0.43056, 0, 0],
65215bd8deadSopenharmony_ci        "121": [0.19444, 0.43056, 0.01389, 0],
65225bd8deadSopenharmony_ci        "122": [0, 0.43056, 0, 0],
65235bd8deadSopenharmony_ci        "123": [0.25, 0.75, 0, 0],
65245bd8deadSopenharmony_ci        "124": [0.25, 0.75, 0, 0],
65255bd8deadSopenharmony_ci        "125": [0.25, 0.75, 0, 0],
65265bd8deadSopenharmony_ci        "126": [0.35, 0.31786, 0, 0],
65275bd8deadSopenharmony_ci        "160": [0, 0, 0, 0],
65285bd8deadSopenharmony_ci        "168": [0, 0.66786, 0, 0],
65295bd8deadSopenharmony_ci        "172": [0, 0.43056, 0, 0],
65305bd8deadSopenharmony_ci        "175": [0, 0.56778, 0, 0],
65315bd8deadSopenharmony_ci        "176": [0, 0.69444, 0, 0],
65325bd8deadSopenharmony_ci        "177": [0.08333, 0.58333, 0, 0],
65335bd8deadSopenharmony_ci        "180": [0, 0.69444, 0, 0],
65345bd8deadSopenharmony_ci        "215": [0.08333, 0.58333, 0, 0],
65355bd8deadSopenharmony_ci        "247": [0.08333, 0.58333, 0, 0],
65365bd8deadSopenharmony_ci        "305": [0, 0.43056, 0, 0],
65375bd8deadSopenharmony_ci        "567": [0.19444, 0.43056, 0, 0],
65385bd8deadSopenharmony_ci        "710": [0, 0.69444, 0, 0],
65395bd8deadSopenharmony_ci        "711": [0, 0.62847, 0, 0],
65405bd8deadSopenharmony_ci        "713": [0, 0.56778, 0, 0],
65415bd8deadSopenharmony_ci        "714": [0, 0.69444, 0, 0],
65425bd8deadSopenharmony_ci        "715": [0, 0.69444, 0, 0],
65435bd8deadSopenharmony_ci        "728": [0, 0.69444, 0, 0],
65445bd8deadSopenharmony_ci        "729": [0, 0.66786, 0, 0],
65455bd8deadSopenharmony_ci        "730": [0, 0.69444, 0, 0],
65465bd8deadSopenharmony_ci        "732": [0, 0.66786, 0, 0],
65475bd8deadSopenharmony_ci        "768": [0, 0.69444, 0, 0],
65485bd8deadSopenharmony_ci        "769": [0, 0.69444, 0, 0],
65495bd8deadSopenharmony_ci        "770": [0, 0.69444, 0, 0],
65505bd8deadSopenharmony_ci        "771": [0, 0.66786, 0, 0],
65515bd8deadSopenharmony_ci        "772": [0, 0.56778, 0, 0],
65525bd8deadSopenharmony_ci        "774": [0, 0.69444, 0, 0],
65535bd8deadSopenharmony_ci        "775": [0, 0.66786, 0, 0],
65545bd8deadSopenharmony_ci        "776": [0, 0.66786, 0, 0],
65555bd8deadSopenharmony_ci        "778": [0, 0.69444, 0, 0],
65565bd8deadSopenharmony_ci        "779": [0, 0.69444, 0, 0],
65575bd8deadSopenharmony_ci        "780": [0, 0.62847, 0, 0],
65585bd8deadSopenharmony_ci        "824": [0.19444, 0.69444, 0, 0],
65595bd8deadSopenharmony_ci        "915": [0, 0.68333, 0, 0],
65605bd8deadSopenharmony_ci        "916": [0, 0.68333, 0, 0],
65615bd8deadSopenharmony_ci        "920": [0, 0.68333, 0, 0],
65625bd8deadSopenharmony_ci        "923": [0, 0.68333, 0, 0],
65635bd8deadSopenharmony_ci        "926": [0, 0.68333, 0, 0],
65645bd8deadSopenharmony_ci        "928": [0, 0.68333, 0, 0],
65655bd8deadSopenharmony_ci        "931": [0, 0.68333, 0, 0],
65665bd8deadSopenharmony_ci        "933": [0, 0.68333, 0, 0],
65675bd8deadSopenharmony_ci        "934": [0, 0.68333, 0, 0],
65685bd8deadSopenharmony_ci        "936": [0, 0.68333, 0, 0],
65695bd8deadSopenharmony_ci        "937": [0, 0.68333, 0, 0],
65705bd8deadSopenharmony_ci        "8211": [0, 0.43056, 0.02778, 0],
65715bd8deadSopenharmony_ci        "8212": [0, 0.43056, 0.02778, 0],
65725bd8deadSopenharmony_ci        "8216": [0, 0.69444, 0, 0],
65735bd8deadSopenharmony_ci        "8217": [0, 0.69444, 0, 0],
65745bd8deadSopenharmony_ci        "8220": [0, 0.69444, 0, 0],
65755bd8deadSopenharmony_ci        "8221": [0, 0.69444, 0, 0],
65765bd8deadSopenharmony_ci        "8224": [0.19444, 0.69444, 0, 0],
65775bd8deadSopenharmony_ci        "8225": [0.19444, 0.69444, 0, 0],
65785bd8deadSopenharmony_ci        "8230": [0, 0.12, 0, 0],
65795bd8deadSopenharmony_ci        "8242": [0, 0.55556, 0, 0],
65805bd8deadSopenharmony_ci        "8407": [0, 0.71444, 0.15382, 0],
65815bd8deadSopenharmony_ci        "8463": [0, 0.68889, 0, 0],
65825bd8deadSopenharmony_ci        "8465": [0, 0.69444, 0, 0],
65835bd8deadSopenharmony_ci        "8467": [0, 0.69444, 0, 0.11111],
65845bd8deadSopenharmony_ci        "8472": [0.19444, 0.43056, 0, 0.11111],
65855bd8deadSopenharmony_ci        "8476": [0, 0.69444, 0, 0],
65865bd8deadSopenharmony_ci        "8501": [0, 0.69444, 0, 0],
65875bd8deadSopenharmony_ci        "8592": [-0.13313, 0.36687, 0, 0],
65885bd8deadSopenharmony_ci        "8593": [0.19444, 0.69444, 0, 0],
65895bd8deadSopenharmony_ci        "8594": [-0.13313, 0.36687, 0, 0],
65905bd8deadSopenharmony_ci        "8595": [0.19444, 0.69444, 0, 0],
65915bd8deadSopenharmony_ci        "8596": [-0.13313, 0.36687, 0, 0],
65925bd8deadSopenharmony_ci        "8597": [0.25, 0.75, 0, 0],
65935bd8deadSopenharmony_ci        "8598": [0.19444, 0.69444, 0, 0],
65945bd8deadSopenharmony_ci        "8599": [0.19444, 0.69444, 0, 0],
65955bd8deadSopenharmony_ci        "8600": [0.19444, 0.69444, 0, 0],
65965bd8deadSopenharmony_ci        "8601": [0.19444, 0.69444, 0, 0],
65975bd8deadSopenharmony_ci        "8614": [0.011, 0.511, 0, 0],
65985bd8deadSopenharmony_ci        "8617": [0.011, 0.511, 0, 0],
65995bd8deadSopenharmony_ci        "8618": [0.011, 0.511, 0, 0],
66005bd8deadSopenharmony_ci        "8636": [-0.13313, 0.36687, 0, 0],
66015bd8deadSopenharmony_ci        "8637": [-0.13313, 0.36687, 0, 0],
66025bd8deadSopenharmony_ci        "8640": [-0.13313, 0.36687, 0, 0],
66035bd8deadSopenharmony_ci        "8641": [-0.13313, 0.36687, 0, 0],
66045bd8deadSopenharmony_ci        "8652": [0.011, 0.671, 0, 0],
66055bd8deadSopenharmony_ci        "8656": [-0.13313, 0.36687, 0, 0],
66065bd8deadSopenharmony_ci        "8657": [0.19444, 0.69444, 0, 0],
66075bd8deadSopenharmony_ci        "8658": [-0.13313, 0.36687, 0, 0],
66085bd8deadSopenharmony_ci        "8659": [0.19444, 0.69444, 0, 0],
66095bd8deadSopenharmony_ci        "8660": [-0.13313, 0.36687, 0, 0],
66105bd8deadSopenharmony_ci        "8661": [0.25, 0.75, 0, 0],
66115bd8deadSopenharmony_ci        "8704": [0, 0.69444, 0, 0],
66125bd8deadSopenharmony_ci        "8706": [0, 0.69444, 0.05556, 0.08334],
66135bd8deadSopenharmony_ci        "8707": [0, 0.69444, 0, 0],
66145bd8deadSopenharmony_ci        "8709": [0.05556, 0.75, 0, 0],
66155bd8deadSopenharmony_ci        "8711": [0, 0.68333, 0, 0],
66165bd8deadSopenharmony_ci        "8712": [0.0391, 0.5391, 0, 0],
66175bd8deadSopenharmony_ci        "8715": [0.0391, 0.5391, 0, 0],
66185bd8deadSopenharmony_ci        "8722": [0.08333, 0.58333, 0, 0],
66195bd8deadSopenharmony_ci        "8723": [0.08333, 0.58333, 0, 0],
66205bd8deadSopenharmony_ci        "8725": [0.25, 0.75, 0, 0],
66215bd8deadSopenharmony_ci        "8726": [0.25, 0.75, 0, 0],
66225bd8deadSopenharmony_ci        "8727": [-0.03472, 0.46528, 0, 0],
66235bd8deadSopenharmony_ci        "8728": [-0.05555, 0.44445, 0, 0],
66245bd8deadSopenharmony_ci        "8729": [-0.05555, 0.44445, 0, 0],
66255bd8deadSopenharmony_ci        "8730": [0.2, 0.8, 0, 0],
66265bd8deadSopenharmony_ci        "8733": [0, 0.43056, 0, 0],
66275bd8deadSopenharmony_ci        "8734": [0, 0.43056, 0, 0],
66285bd8deadSopenharmony_ci        "8736": [0, 0.69224, 0, 0],
66295bd8deadSopenharmony_ci        "8739": [0.25, 0.75, 0, 0],
66305bd8deadSopenharmony_ci        "8741": [0.25, 0.75, 0, 0],
66315bd8deadSopenharmony_ci        "8743": [0, 0.55556, 0, 0],
66325bd8deadSopenharmony_ci        "8744": [0, 0.55556, 0, 0],
66335bd8deadSopenharmony_ci        "8745": [0, 0.55556, 0, 0],
66345bd8deadSopenharmony_ci        "8746": [0, 0.55556, 0, 0],
66355bd8deadSopenharmony_ci        "8747": [0.19444, 0.69444, 0.11111, 0],
66365bd8deadSopenharmony_ci        "8764": [-0.13313, 0.36687, 0, 0],
66375bd8deadSopenharmony_ci        "8768": [0.19444, 0.69444, 0, 0],
66385bd8deadSopenharmony_ci        "8771": [-0.03625, 0.46375, 0, 0],
66395bd8deadSopenharmony_ci        "8773": [-0.022, 0.589, 0, 0],
66405bd8deadSopenharmony_ci        "8776": [-0.01688, 0.48312, 0, 0],
66415bd8deadSopenharmony_ci        "8781": [-0.03625, 0.46375, 0, 0],
66425bd8deadSopenharmony_ci        "8784": [-0.133, 0.67, 0, 0],
66435bd8deadSopenharmony_ci        "8800": [0.215, 0.716, 0, 0],
66445bd8deadSopenharmony_ci        "8801": [-0.03625, 0.46375, 0, 0],
66455bd8deadSopenharmony_ci        "8804": [0.13597, 0.63597, 0, 0],
66465bd8deadSopenharmony_ci        "8805": [0.13597, 0.63597, 0, 0],
66475bd8deadSopenharmony_ci        "8810": [0.0391, 0.5391, 0, 0],
66485bd8deadSopenharmony_ci        "8811": [0.0391, 0.5391, 0, 0],
66495bd8deadSopenharmony_ci        "8826": [0.0391, 0.5391, 0, 0],
66505bd8deadSopenharmony_ci        "8827": [0.0391, 0.5391, 0, 0],
66515bd8deadSopenharmony_ci        "8834": [0.0391, 0.5391, 0, 0],
66525bd8deadSopenharmony_ci        "8835": [0.0391, 0.5391, 0, 0],
66535bd8deadSopenharmony_ci        "8838": [0.13597, 0.63597, 0, 0],
66545bd8deadSopenharmony_ci        "8839": [0.13597, 0.63597, 0, 0],
66555bd8deadSopenharmony_ci        "8846": [0, 0.55556, 0, 0],
66565bd8deadSopenharmony_ci        "8849": [0.13597, 0.63597, 0, 0],
66575bd8deadSopenharmony_ci        "8850": [0.13597, 0.63597, 0, 0],
66585bd8deadSopenharmony_ci        "8851": [0, 0.55556, 0, 0],
66595bd8deadSopenharmony_ci        "8852": [0, 0.55556, 0, 0],
66605bd8deadSopenharmony_ci        "8853": [0.08333, 0.58333, 0, 0],
66615bd8deadSopenharmony_ci        "8854": [0.08333, 0.58333, 0, 0],
66625bd8deadSopenharmony_ci        "8855": [0.08333, 0.58333, 0, 0],
66635bd8deadSopenharmony_ci        "8856": [0.08333, 0.58333, 0, 0],
66645bd8deadSopenharmony_ci        "8857": [0.08333, 0.58333, 0, 0],
66655bd8deadSopenharmony_ci        "8866": [0, 0.69444, 0, 0],
66665bd8deadSopenharmony_ci        "8867": [0, 0.69444, 0, 0],
66675bd8deadSopenharmony_ci        "8868": [0, 0.69444, 0, 0],
66685bd8deadSopenharmony_ci        "8869": [0, 0.69444, 0, 0],
66695bd8deadSopenharmony_ci        "8872": [0.249, 0.75, 0, 0],
66705bd8deadSopenharmony_ci        "8900": [-0.05555, 0.44445, 0, 0],
66715bd8deadSopenharmony_ci        "8901": [-0.05555, 0.44445, 0, 0],
66725bd8deadSopenharmony_ci        "8902": [-0.03472, 0.46528, 0, 0],
66735bd8deadSopenharmony_ci        "8904": [0.005, 0.505, 0, 0],
66745bd8deadSopenharmony_ci        "8942": [0.03, 0.9, 0, 0],
66755bd8deadSopenharmony_ci        "8943": [-0.19, 0.31, 0, 0],
66765bd8deadSopenharmony_ci        "8945": [-0.1, 0.82, 0, 0],
66775bd8deadSopenharmony_ci        "8968": [0.25, 0.75, 0, 0],
66785bd8deadSopenharmony_ci        "8969": [0.25, 0.75, 0, 0],
66795bd8deadSopenharmony_ci        "8970": [0.25, 0.75, 0, 0],
66805bd8deadSopenharmony_ci        "8971": [0.25, 0.75, 0, 0],
66815bd8deadSopenharmony_ci        "8994": [-0.14236, 0.35764, 0, 0],
66825bd8deadSopenharmony_ci        "8995": [-0.14236, 0.35764, 0, 0],
66835bd8deadSopenharmony_ci        "9136": [0.244, 0.744, 0, 0],
66845bd8deadSopenharmony_ci        "9137": [0.244, 0.744, 0, 0],
66855bd8deadSopenharmony_ci        "9651": [0.19444, 0.69444, 0, 0],
66865bd8deadSopenharmony_ci        "9657": [-0.03472, 0.46528, 0, 0],
66875bd8deadSopenharmony_ci        "9661": [0.19444, 0.69444, 0, 0],
66885bd8deadSopenharmony_ci        "9667": [-0.03472, 0.46528, 0, 0],
66895bd8deadSopenharmony_ci        "9711": [0.19444, 0.69444, 0, 0],
66905bd8deadSopenharmony_ci        "9824": [0.12963, 0.69444, 0, 0],
66915bd8deadSopenharmony_ci        "9825": [0.12963, 0.69444, 0, 0],
66925bd8deadSopenharmony_ci        "9826": [0.12963, 0.69444, 0, 0],
66935bd8deadSopenharmony_ci        "9827": [0.12963, 0.69444, 0, 0],
66945bd8deadSopenharmony_ci        "9837": [0, 0.75, 0, 0],
66955bd8deadSopenharmony_ci        "9838": [0.19444, 0.69444, 0, 0],
66965bd8deadSopenharmony_ci        "9839": [0.19444, 0.69444, 0, 0],
66975bd8deadSopenharmony_ci        "10216": [0.25, 0.75, 0, 0],
66985bd8deadSopenharmony_ci        "10217": [0.25, 0.75, 0, 0],
66995bd8deadSopenharmony_ci        "10222": [0.244, 0.744, 0, 0],
67005bd8deadSopenharmony_ci        "10223": [0.244, 0.744, 0, 0],
67015bd8deadSopenharmony_ci        "10229": [0.011, 0.511, 0, 0],
67025bd8deadSopenharmony_ci        "10230": [0.011, 0.511, 0, 0],
67035bd8deadSopenharmony_ci        "10231": [0.011, 0.511, 0, 0],
67045bd8deadSopenharmony_ci        "10232": [0.024, 0.525, 0, 0],
67055bd8deadSopenharmony_ci        "10233": [0.024, 0.525, 0, 0],
67065bd8deadSopenharmony_ci        "10234": [0.024, 0.525, 0, 0],
67075bd8deadSopenharmony_ci        "10236": [0.011, 0.511, 0, 0],
67085bd8deadSopenharmony_ci        "10815": [0, 0.68333, 0, 0],
67095bd8deadSopenharmony_ci        "10927": [0.13597, 0.63597, 0, 0],
67105bd8deadSopenharmony_ci        "10928": [0.13597, 0.63597, 0, 0]
67115bd8deadSopenharmony_ci    },
67125bd8deadSopenharmony_ci    "Math-BoldItalic": {
67135bd8deadSopenharmony_ci        "47": [0.19444, 0.69444, 0, 0],
67145bd8deadSopenharmony_ci        "65": [0, 0.68611, 0, 0],
67155bd8deadSopenharmony_ci        "66": [0, 0.68611, 0.04835, 0],
67165bd8deadSopenharmony_ci        "67": [0, 0.68611, 0.06979, 0],
67175bd8deadSopenharmony_ci        "68": [0, 0.68611, 0.03194, 0],
67185bd8deadSopenharmony_ci        "69": [0, 0.68611, 0.05451, 0],
67195bd8deadSopenharmony_ci        "70": [0, 0.68611, 0.15972, 0],
67205bd8deadSopenharmony_ci        "71": [0, 0.68611, 0, 0],
67215bd8deadSopenharmony_ci        "72": [0, 0.68611, 0.08229, 0],
67225bd8deadSopenharmony_ci        "73": [0, 0.68611, 0.07778, 0],
67235bd8deadSopenharmony_ci        "74": [0, 0.68611, 0.10069, 0],
67245bd8deadSopenharmony_ci        "75": [0, 0.68611, 0.06979, 0],
67255bd8deadSopenharmony_ci        "76": [0, 0.68611, 0, 0],
67265bd8deadSopenharmony_ci        "77": [0, 0.68611, 0.11424, 0],
67275bd8deadSopenharmony_ci        "78": [0, 0.68611, 0.11424, 0],
67285bd8deadSopenharmony_ci        "79": [0, 0.68611, 0.03194, 0],
67295bd8deadSopenharmony_ci        "80": [0, 0.68611, 0.15972, 0],
67305bd8deadSopenharmony_ci        "81": [0.19444, 0.68611, 0, 0],
67315bd8deadSopenharmony_ci        "82": [0, 0.68611, 0.00421, 0],
67325bd8deadSopenharmony_ci        "83": [0, 0.68611, 0.05382, 0],
67335bd8deadSopenharmony_ci        "84": [0, 0.68611, 0.15972, 0],
67345bd8deadSopenharmony_ci        "85": [0, 0.68611, 0.11424, 0],
67355bd8deadSopenharmony_ci        "86": [0, 0.68611, 0.25555, 0],
67365bd8deadSopenharmony_ci        "87": [0, 0.68611, 0.15972, 0],
67375bd8deadSopenharmony_ci        "88": [0, 0.68611, 0.07778, 0],
67385bd8deadSopenharmony_ci        "89": [0, 0.68611, 0.25555, 0],
67395bd8deadSopenharmony_ci        "90": [0, 0.68611, 0.06979, 0],
67405bd8deadSopenharmony_ci        "97": [0, 0.44444, 0, 0],
67415bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
67425bd8deadSopenharmony_ci        "99": [0, 0.44444, 0, 0],
67435bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0],
67445bd8deadSopenharmony_ci        "101": [0, 0.44444, 0, 0],
67455bd8deadSopenharmony_ci        "102": [0.19444, 0.69444, 0.11042, 0],
67465bd8deadSopenharmony_ci        "103": [0.19444, 0.44444, 0.03704, 0],
67475bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
67485bd8deadSopenharmony_ci        "105": [0, 0.69326, 0, 0],
67495bd8deadSopenharmony_ci        "106": [0.19444, 0.69326, 0.0622, 0],
67505bd8deadSopenharmony_ci        "107": [0, 0.69444, 0.01852, 0],
67515bd8deadSopenharmony_ci        "108": [0, 0.69444, 0.0088, 0],
67525bd8deadSopenharmony_ci        "109": [0, 0.44444, 0, 0],
67535bd8deadSopenharmony_ci        "110": [0, 0.44444, 0, 0],
67545bd8deadSopenharmony_ci        "111": [0, 0.44444, 0, 0],
67555bd8deadSopenharmony_ci        "112": [0.19444, 0.44444, 0, 0],
67565bd8deadSopenharmony_ci        "113": [0.19444, 0.44444, 0.03704, 0],
67575bd8deadSopenharmony_ci        "114": [0, 0.44444, 0.03194, 0],
67585bd8deadSopenharmony_ci        "115": [0, 0.44444, 0, 0],
67595bd8deadSopenharmony_ci        "116": [0, 0.63492, 0, 0],
67605bd8deadSopenharmony_ci        "117": [0, 0.44444, 0, 0],
67615bd8deadSopenharmony_ci        "118": [0, 0.44444, 0.03704, 0],
67625bd8deadSopenharmony_ci        "119": [0, 0.44444, 0.02778, 0],
67635bd8deadSopenharmony_ci        "120": [0, 0.44444, 0, 0],
67645bd8deadSopenharmony_ci        "121": [0.19444, 0.44444, 0.03704, 0],
67655bd8deadSopenharmony_ci        "122": [0, 0.44444, 0.04213, 0],
67665bd8deadSopenharmony_ci        "915": [0, 0.68611, 0.15972, 0],
67675bd8deadSopenharmony_ci        "916": [0, 0.68611, 0, 0],
67685bd8deadSopenharmony_ci        "920": [0, 0.68611, 0.03194, 0],
67695bd8deadSopenharmony_ci        "923": [0, 0.68611, 0, 0],
67705bd8deadSopenharmony_ci        "926": [0, 0.68611, 0.07458, 0],
67715bd8deadSopenharmony_ci        "928": [0, 0.68611, 0.08229, 0],
67725bd8deadSopenharmony_ci        "931": [0, 0.68611, 0.05451, 0],
67735bd8deadSopenharmony_ci        "933": [0, 0.68611, 0.15972, 0],
67745bd8deadSopenharmony_ci        "934": [0, 0.68611, 0, 0],
67755bd8deadSopenharmony_ci        "936": [0, 0.68611, 0.11653, 0],
67765bd8deadSopenharmony_ci        "937": [0, 0.68611, 0.04835, 0],
67775bd8deadSopenharmony_ci        "945": [0, 0.44444, 0, 0],
67785bd8deadSopenharmony_ci        "946": [0.19444, 0.69444, 0.03403, 0],
67795bd8deadSopenharmony_ci        "947": [0.19444, 0.44444, 0.06389, 0],
67805bd8deadSopenharmony_ci        "948": [0, 0.69444, 0.03819, 0],
67815bd8deadSopenharmony_ci        "949": [0, 0.44444, 0, 0],
67825bd8deadSopenharmony_ci        "950": [0.19444, 0.69444, 0.06215, 0],
67835bd8deadSopenharmony_ci        "951": [0.19444, 0.44444, 0.03704, 0],
67845bd8deadSopenharmony_ci        "952": [0, 0.69444, 0.03194, 0],
67855bd8deadSopenharmony_ci        "953": [0, 0.44444, 0, 0],
67865bd8deadSopenharmony_ci        "954": [0, 0.44444, 0, 0],
67875bd8deadSopenharmony_ci        "955": [0, 0.69444, 0, 0],
67885bd8deadSopenharmony_ci        "956": [0.19444, 0.44444, 0, 0],
67895bd8deadSopenharmony_ci        "957": [0, 0.44444, 0.06898, 0],
67905bd8deadSopenharmony_ci        "958": [0.19444, 0.69444, 0.03021, 0],
67915bd8deadSopenharmony_ci        "959": [0, 0.44444, 0, 0],
67925bd8deadSopenharmony_ci        "960": [0, 0.44444, 0.03704, 0],
67935bd8deadSopenharmony_ci        "961": [0.19444, 0.44444, 0, 0],
67945bd8deadSopenharmony_ci        "962": [0.09722, 0.44444, 0.07917, 0],
67955bd8deadSopenharmony_ci        "963": [0, 0.44444, 0.03704, 0],
67965bd8deadSopenharmony_ci        "964": [0, 0.44444, 0.13472, 0],
67975bd8deadSopenharmony_ci        "965": [0, 0.44444, 0.03704, 0],
67985bd8deadSopenharmony_ci        "966": [0.19444, 0.44444, 0, 0],
67995bd8deadSopenharmony_ci        "967": [0.19444, 0.44444, 0, 0],
68005bd8deadSopenharmony_ci        "968": [0.19444, 0.69444, 0.03704, 0],
68015bd8deadSopenharmony_ci        "969": [0, 0.44444, 0.03704, 0],
68025bd8deadSopenharmony_ci        "977": [0, 0.69444, 0, 0],
68035bd8deadSopenharmony_ci        "981": [0.19444, 0.69444, 0, 0],
68045bd8deadSopenharmony_ci        "982": [0, 0.44444, 0.03194, 0],
68055bd8deadSopenharmony_ci        "1009": [0.19444, 0.44444, 0, 0],
68065bd8deadSopenharmony_ci        "1013": [0, 0.44444, 0, 0]
68075bd8deadSopenharmony_ci    },
68085bd8deadSopenharmony_ci    "Math-Italic": {
68095bd8deadSopenharmony_ci        "47": [0.19444, 0.69444, 0, 0],
68105bd8deadSopenharmony_ci        "65": [0, 0.68333, 0, 0.13889],
68115bd8deadSopenharmony_ci        "66": [0, 0.68333, 0.05017, 0.08334],
68125bd8deadSopenharmony_ci        "67": [0, 0.68333, 0.07153, 0.08334],
68135bd8deadSopenharmony_ci        "68": [0, 0.68333, 0.02778, 0.05556],
68145bd8deadSopenharmony_ci        "69": [0, 0.68333, 0.05764, 0.08334],
68155bd8deadSopenharmony_ci        "70": [0, 0.68333, 0.13889, 0.08334],
68165bd8deadSopenharmony_ci        "71": [0, 0.68333, 0, 0.08334],
68175bd8deadSopenharmony_ci        "72": [0, 0.68333, 0.08125, 0.05556],
68185bd8deadSopenharmony_ci        "73": [0, 0.68333, 0.07847, 0.11111],
68195bd8deadSopenharmony_ci        "74": [0, 0.68333, 0.09618, 0.16667],
68205bd8deadSopenharmony_ci        "75": [0, 0.68333, 0.07153, 0.05556],
68215bd8deadSopenharmony_ci        "76": [0, 0.68333, 0, 0.02778],
68225bd8deadSopenharmony_ci        "77": [0, 0.68333, 0.10903, 0.08334],
68235bd8deadSopenharmony_ci        "78": [0, 0.68333, 0.10903, 0.08334],
68245bd8deadSopenharmony_ci        "79": [0, 0.68333, 0.02778, 0.08334],
68255bd8deadSopenharmony_ci        "80": [0, 0.68333, 0.13889, 0.08334],
68265bd8deadSopenharmony_ci        "81": [0.19444, 0.68333, 0, 0.08334],
68275bd8deadSopenharmony_ci        "82": [0, 0.68333, 0.00773, 0.08334],
68285bd8deadSopenharmony_ci        "83": [0, 0.68333, 0.05764, 0.08334],
68295bd8deadSopenharmony_ci        "84": [0, 0.68333, 0.13889, 0.08334],
68305bd8deadSopenharmony_ci        "85": [0, 0.68333, 0.10903, 0.02778],
68315bd8deadSopenharmony_ci        "86": [0, 0.68333, 0.22222, 0],
68325bd8deadSopenharmony_ci        "87": [0, 0.68333, 0.13889, 0],
68335bd8deadSopenharmony_ci        "88": [0, 0.68333, 0.07847, 0.08334],
68345bd8deadSopenharmony_ci        "89": [0, 0.68333, 0.22222, 0],
68355bd8deadSopenharmony_ci        "90": [0, 0.68333, 0.07153, 0.08334],
68365bd8deadSopenharmony_ci        "97": [0, 0.43056, 0, 0],
68375bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
68385bd8deadSopenharmony_ci        "99": [0, 0.43056, 0, 0.05556],
68395bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0.16667],
68405bd8deadSopenharmony_ci        "101": [0, 0.43056, 0, 0.05556],
68415bd8deadSopenharmony_ci        "102": [0.19444, 0.69444, 0.10764, 0.16667],
68425bd8deadSopenharmony_ci        "103": [0.19444, 0.43056, 0.03588, 0.02778],
68435bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
68445bd8deadSopenharmony_ci        "105": [0, 0.65952, 0, 0],
68455bd8deadSopenharmony_ci        "106": [0.19444, 0.65952, 0.05724, 0],
68465bd8deadSopenharmony_ci        "107": [0, 0.69444, 0.03148, 0],
68475bd8deadSopenharmony_ci        "108": [0, 0.69444, 0.01968, 0.08334],
68485bd8deadSopenharmony_ci        "109": [0, 0.43056, 0, 0],
68495bd8deadSopenharmony_ci        "110": [0, 0.43056, 0, 0],
68505bd8deadSopenharmony_ci        "111": [0, 0.43056, 0, 0.05556],
68515bd8deadSopenharmony_ci        "112": [0.19444, 0.43056, 0, 0.08334],
68525bd8deadSopenharmony_ci        "113": [0.19444, 0.43056, 0.03588, 0.08334],
68535bd8deadSopenharmony_ci        "114": [0, 0.43056, 0.02778, 0.05556],
68545bd8deadSopenharmony_ci        "115": [0, 0.43056, 0, 0.05556],
68555bd8deadSopenharmony_ci        "116": [0, 0.61508, 0, 0.08334],
68565bd8deadSopenharmony_ci        "117": [0, 0.43056, 0, 0.02778],
68575bd8deadSopenharmony_ci        "118": [0, 0.43056, 0.03588, 0.02778],
68585bd8deadSopenharmony_ci        "119": [0, 0.43056, 0.02691, 0.08334],
68595bd8deadSopenharmony_ci        "120": [0, 0.43056, 0, 0.02778],
68605bd8deadSopenharmony_ci        "121": [0.19444, 0.43056, 0.03588, 0.05556],
68615bd8deadSopenharmony_ci        "122": [0, 0.43056, 0.04398, 0.05556],
68625bd8deadSopenharmony_ci        "915": [0, 0.68333, 0.13889, 0.08334],
68635bd8deadSopenharmony_ci        "916": [0, 0.68333, 0, 0.16667],
68645bd8deadSopenharmony_ci        "920": [0, 0.68333, 0.02778, 0.08334],
68655bd8deadSopenharmony_ci        "923": [0, 0.68333, 0, 0.16667],
68665bd8deadSopenharmony_ci        "926": [0, 0.68333, 0.07569, 0.08334],
68675bd8deadSopenharmony_ci        "928": [0, 0.68333, 0.08125, 0.05556],
68685bd8deadSopenharmony_ci        "931": [0, 0.68333, 0.05764, 0.08334],
68695bd8deadSopenharmony_ci        "933": [0, 0.68333, 0.13889, 0.05556],
68705bd8deadSopenharmony_ci        "934": [0, 0.68333, 0, 0.08334],
68715bd8deadSopenharmony_ci        "936": [0, 0.68333, 0.11, 0.05556],
68725bd8deadSopenharmony_ci        "937": [0, 0.68333, 0.05017, 0.08334],
68735bd8deadSopenharmony_ci        "945": [0, 0.43056, 0.0037, 0.02778],
68745bd8deadSopenharmony_ci        "946": [0.19444, 0.69444, 0.05278, 0.08334],
68755bd8deadSopenharmony_ci        "947": [0.19444, 0.43056, 0.05556, 0],
68765bd8deadSopenharmony_ci        "948": [0, 0.69444, 0.03785, 0.05556],
68775bd8deadSopenharmony_ci        "949": [0, 0.43056, 0, 0.08334],
68785bd8deadSopenharmony_ci        "950": [0.19444, 0.69444, 0.07378, 0.08334],
68795bd8deadSopenharmony_ci        "951": [0.19444, 0.43056, 0.03588, 0.05556],
68805bd8deadSopenharmony_ci        "952": [0, 0.69444, 0.02778, 0.08334],
68815bd8deadSopenharmony_ci        "953": [0, 0.43056, 0, 0.05556],
68825bd8deadSopenharmony_ci        "954": [0, 0.43056, 0, 0],
68835bd8deadSopenharmony_ci        "955": [0, 0.69444, 0, 0],
68845bd8deadSopenharmony_ci        "956": [0.19444, 0.43056, 0, 0.02778],
68855bd8deadSopenharmony_ci        "957": [0, 0.43056, 0.06366, 0.02778],
68865bd8deadSopenharmony_ci        "958": [0.19444, 0.69444, 0.04601, 0.11111],
68875bd8deadSopenharmony_ci        "959": [0, 0.43056, 0, 0.05556],
68885bd8deadSopenharmony_ci        "960": [0, 0.43056, 0.03588, 0],
68895bd8deadSopenharmony_ci        "961": [0.19444, 0.43056, 0, 0.08334],
68905bd8deadSopenharmony_ci        "962": [0.09722, 0.43056, 0.07986, 0.08334],
68915bd8deadSopenharmony_ci        "963": [0, 0.43056, 0.03588, 0],
68925bd8deadSopenharmony_ci        "964": [0, 0.43056, 0.1132, 0.02778],
68935bd8deadSopenharmony_ci        "965": [0, 0.43056, 0.03588, 0.02778],
68945bd8deadSopenharmony_ci        "966": [0.19444, 0.43056, 0, 0.08334],
68955bd8deadSopenharmony_ci        "967": [0.19444, 0.43056, 0, 0.05556],
68965bd8deadSopenharmony_ci        "968": [0.19444, 0.69444, 0.03588, 0.11111],
68975bd8deadSopenharmony_ci        "969": [0, 0.43056, 0.03588, 0],
68985bd8deadSopenharmony_ci        "977": [0, 0.69444, 0, 0.08334],
68995bd8deadSopenharmony_ci        "981": [0.19444, 0.69444, 0, 0.08334],
69005bd8deadSopenharmony_ci        "982": [0, 0.43056, 0.02778, 0],
69015bd8deadSopenharmony_ci        "1009": [0.19444, 0.43056, 0, 0.08334],
69025bd8deadSopenharmony_ci        "1013": [0, 0.43056, 0, 0.05556]
69035bd8deadSopenharmony_ci    },
69045bd8deadSopenharmony_ci    "Math-Regular": {
69055bd8deadSopenharmony_ci        "65": [0, 0.68333, 0, 0.13889],
69065bd8deadSopenharmony_ci        "66": [0, 0.68333, 0.05017, 0.08334],
69075bd8deadSopenharmony_ci        "67": [0, 0.68333, 0.07153, 0.08334],
69085bd8deadSopenharmony_ci        "68": [0, 0.68333, 0.02778, 0.05556],
69095bd8deadSopenharmony_ci        "69": [0, 0.68333, 0.05764, 0.08334],
69105bd8deadSopenharmony_ci        "70": [0, 0.68333, 0.13889, 0.08334],
69115bd8deadSopenharmony_ci        "71": [0, 0.68333, 0, 0.08334],
69125bd8deadSopenharmony_ci        "72": [0, 0.68333, 0.08125, 0.05556],
69135bd8deadSopenharmony_ci        "73": [0, 0.68333, 0.07847, 0.11111],
69145bd8deadSopenharmony_ci        "74": [0, 0.68333, 0.09618, 0.16667],
69155bd8deadSopenharmony_ci        "75": [0, 0.68333, 0.07153, 0.05556],
69165bd8deadSopenharmony_ci        "76": [0, 0.68333, 0, 0.02778],
69175bd8deadSopenharmony_ci        "77": [0, 0.68333, 0.10903, 0.08334],
69185bd8deadSopenharmony_ci        "78": [0, 0.68333, 0.10903, 0.08334],
69195bd8deadSopenharmony_ci        "79": [0, 0.68333, 0.02778, 0.08334],
69205bd8deadSopenharmony_ci        "80": [0, 0.68333, 0.13889, 0.08334],
69215bd8deadSopenharmony_ci        "81": [0.19444, 0.68333, 0, 0.08334],
69225bd8deadSopenharmony_ci        "82": [0, 0.68333, 0.00773, 0.08334],
69235bd8deadSopenharmony_ci        "83": [0, 0.68333, 0.05764, 0.08334],
69245bd8deadSopenharmony_ci        "84": [0, 0.68333, 0.13889, 0.08334],
69255bd8deadSopenharmony_ci        "85": [0, 0.68333, 0.10903, 0.02778],
69265bd8deadSopenharmony_ci        "86": [0, 0.68333, 0.22222, 0],
69275bd8deadSopenharmony_ci        "87": [0, 0.68333, 0.13889, 0],
69285bd8deadSopenharmony_ci        "88": [0, 0.68333, 0.07847, 0.08334],
69295bd8deadSopenharmony_ci        "89": [0, 0.68333, 0.22222, 0],
69305bd8deadSopenharmony_ci        "90": [0, 0.68333, 0.07153, 0.08334],
69315bd8deadSopenharmony_ci        "97": [0, 0.43056, 0, 0],
69325bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
69335bd8deadSopenharmony_ci        "99": [0, 0.43056, 0, 0.05556],
69345bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0.16667],
69355bd8deadSopenharmony_ci        "101": [0, 0.43056, 0, 0.05556],
69365bd8deadSopenharmony_ci        "102": [0.19444, 0.69444, 0.10764, 0.16667],
69375bd8deadSopenharmony_ci        "103": [0.19444, 0.43056, 0.03588, 0.02778],
69385bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
69395bd8deadSopenharmony_ci        "105": [0, 0.65952, 0, 0],
69405bd8deadSopenharmony_ci        "106": [0.19444, 0.65952, 0.05724, 0],
69415bd8deadSopenharmony_ci        "107": [0, 0.69444, 0.03148, 0],
69425bd8deadSopenharmony_ci        "108": [0, 0.69444, 0.01968, 0.08334],
69435bd8deadSopenharmony_ci        "109": [0, 0.43056, 0, 0],
69445bd8deadSopenharmony_ci        "110": [0, 0.43056, 0, 0],
69455bd8deadSopenharmony_ci        "111": [0, 0.43056, 0, 0.05556],
69465bd8deadSopenharmony_ci        "112": [0.19444, 0.43056, 0, 0.08334],
69475bd8deadSopenharmony_ci        "113": [0.19444, 0.43056, 0.03588, 0.08334],
69485bd8deadSopenharmony_ci        "114": [0, 0.43056, 0.02778, 0.05556],
69495bd8deadSopenharmony_ci        "115": [0, 0.43056, 0, 0.05556],
69505bd8deadSopenharmony_ci        "116": [0, 0.61508, 0, 0.08334],
69515bd8deadSopenharmony_ci        "117": [0, 0.43056, 0, 0.02778],
69525bd8deadSopenharmony_ci        "118": [0, 0.43056, 0.03588, 0.02778],
69535bd8deadSopenharmony_ci        "119": [0, 0.43056, 0.02691, 0.08334],
69545bd8deadSopenharmony_ci        "120": [0, 0.43056, 0, 0.02778],
69555bd8deadSopenharmony_ci        "121": [0.19444, 0.43056, 0.03588, 0.05556],
69565bd8deadSopenharmony_ci        "122": [0, 0.43056, 0.04398, 0.05556],
69575bd8deadSopenharmony_ci        "915": [0, 0.68333, 0.13889, 0.08334],
69585bd8deadSopenharmony_ci        "916": [0, 0.68333, 0, 0.16667],
69595bd8deadSopenharmony_ci        "920": [0, 0.68333, 0.02778, 0.08334],
69605bd8deadSopenharmony_ci        "923": [0, 0.68333, 0, 0.16667],
69615bd8deadSopenharmony_ci        "926": [0, 0.68333, 0.07569, 0.08334],
69625bd8deadSopenharmony_ci        "928": [0, 0.68333, 0.08125, 0.05556],
69635bd8deadSopenharmony_ci        "931": [0, 0.68333, 0.05764, 0.08334],
69645bd8deadSopenharmony_ci        "933": [0, 0.68333, 0.13889, 0.05556],
69655bd8deadSopenharmony_ci        "934": [0, 0.68333, 0, 0.08334],
69665bd8deadSopenharmony_ci        "936": [0, 0.68333, 0.11, 0.05556],
69675bd8deadSopenharmony_ci        "937": [0, 0.68333, 0.05017, 0.08334],
69685bd8deadSopenharmony_ci        "945": [0, 0.43056, 0.0037, 0.02778],
69695bd8deadSopenharmony_ci        "946": [0.19444, 0.69444, 0.05278, 0.08334],
69705bd8deadSopenharmony_ci        "947": [0.19444, 0.43056, 0.05556, 0],
69715bd8deadSopenharmony_ci        "948": [0, 0.69444, 0.03785, 0.05556],
69725bd8deadSopenharmony_ci        "949": [0, 0.43056, 0, 0.08334],
69735bd8deadSopenharmony_ci        "950": [0.19444, 0.69444, 0.07378, 0.08334],
69745bd8deadSopenharmony_ci        "951": [0.19444, 0.43056, 0.03588, 0.05556],
69755bd8deadSopenharmony_ci        "952": [0, 0.69444, 0.02778, 0.08334],
69765bd8deadSopenharmony_ci        "953": [0, 0.43056, 0, 0.05556],
69775bd8deadSopenharmony_ci        "954": [0, 0.43056, 0, 0],
69785bd8deadSopenharmony_ci        "955": [0, 0.69444, 0, 0],
69795bd8deadSopenharmony_ci        "956": [0.19444, 0.43056, 0, 0.02778],
69805bd8deadSopenharmony_ci        "957": [0, 0.43056, 0.06366, 0.02778],
69815bd8deadSopenharmony_ci        "958": [0.19444, 0.69444, 0.04601, 0.11111],
69825bd8deadSopenharmony_ci        "959": [0, 0.43056, 0, 0.05556],
69835bd8deadSopenharmony_ci        "960": [0, 0.43056, 0.03588, 0],
69845bd8deadSopenharmony_ci        "961": [0.19444, 0.43056, 0, 0.08334],
69855bd8deadSopenharmony_ci        "962": [0.09722, 0.43056, 0.07986, 0.08334],
69865bd8deadSopenharmony_ci        "963": [0, 0.43056, 0.03588, 0],
69875bd8deadSopenharmony_ci        "964": [0, 0.43056, 0.1132, 0.02778],
69885bd8deadSopenharmony_ci        "965": [0, 0.43056, 0.03588, 0.02778],
69895bd8deadSopenharmony_ci        "966": [0.19444, 0.43056, 0, 0.08334],
69905bd8deadSopenharmony_ci        "967": [0.19444, 0.43056, 0, 0.05556],
69915bd8deadSopenharmony_ci        "968": [0.19444, 0.69444, 0.03588, 0.11111],
69925bd8deadSopenharmony_ci        "969": [0, 0.43056, 0.03588, 0],
69935bd8deadSopenharmony_ci        "977": [0, 0.69444, 0, 0.08334],
69945bd8deadSopenharmony_ci        "981": [0.19444, 0.69444, 0, 0.08334],
69955bd8deadSopenharmony_ci        "982": [0, 0.43056, 0.02778, 0],
69965bd8deadSopenharmony_ci        "1009": [0.19444, 0.43056, 0, 0.08334],
69975bd8deadSopenharmony_ci        "1013": [0, 0.43056, 0, 0.05556]
69985bd8deadSopenharmony_ci    },
69995bd8deadSopenharmony_ci    "SansSerif-Regular": {
70005bd8deadSopenharmony_ci        "33": [0, 0.69444, 0, 0],
70015bd8deadSopenharmony_ci        "34": [0, 0.69444, 0, 0],
70025bd8deadSopenharmony_ci        "35": [0.19444, 0.69444, 0, 0],
70035bd8deadSopenharmony_ci        "36": [0.05556, 0.75, 0, 0],
70045bd8deadSopenharmony_ci        "37": [0.05556, 0.75, 0, 0],
70055bd8deadSopenharmony_ci        "38": [0, 0.69444, 0, 0],
70065bd8deadSopenharmony_ci        "39": [0, 0.69444, 0, 0],
70075bd8deadSopenharmony_ci        "40": [0.25, 0.75, 0, 0],
70085bd8deadSopenharmony_ci        "41": [0.25, 0.75, 0, 0],
70095bd8deadSopenharmony_ci        "42": [0, 0.75, 0, 0],
70105bd8deadSopenharmony_ci        "43": [0.08333, 0.58333, 0, 0],
70115bd8deadSopenharmony_ci        "44": [0.125, 0.08333, 0, 0],
70125bd8deadSopenharmony_ci        "45": [0, 0.44444, 0, 0],
70135bd8deadSopenharmony_ci        "46": [0, 0.08333, 0, 0],
70145bd8deadSopenharmony_ci        "47": [0.25, 0.75, 0, 0],
70155bd8deadSopenharmony_ci        "48": [0, 0.65556, 0, 0],
70165bd8deadSopenharmony_ci        "49": [0, 0.65556, 0, 0],
70175bd8deadSopenharmony_ci        "50": [0, 0.65556, 0, 0],
70185bd8deadSopenharmony_ci        "51": [0, 0.65556, 0, 0],
70195bd8deadSopenharmony_ci        "52": [0, 0.65556, 0, 0],
70205bd8deadSopenharmony_ci        "53": [0, 0.65556, 0, 0],
70215bd8deadSopenharmony_ci        "54": [0, 0.65556, 0, 0],
70225bd8deadSopenharmony_ci        "55": [0, 0.65556, 0, 0],
70235bd8deadSopenharmony_ci        "56": [0, 0.65556, 0, 0],
70245bd8deadSopenharmony_ci        "57": [0, 0.65556, 0, 0],
70255bd8deadSopenharmony_ci        "58": [0, 0.44444, 0, 0],
70265bd8deadSopenharmony_ci        "59": [0.125, 0.44444, 0, 0],
70275bd8deadSopenharmony_ci        "61": [-0.13, 0.37, 0, 0],
70285bd8deadSopenharmony_ci        "63": [0, 0.69444, 0, 0],
70295bd8deadSopenharmony_ci        "64": [0, 0.69444, 0, 0],
70305bd8deadSopenharmony_ci        "65": [0, 0.69444, 0, 0],
70315bd8deadSopenharmony_ci        "66": [0, 0.69444, 0, 0],
70325bd8deadSopenharmony_ci        "67": [0, 0.69444, 0, 0],
70335bd8deadSopenharmony_ci        "68": [0, 0.69444, 0, 0],
70345bd8deadSopenharmony_ci        "69": [0, 0.69444, 0, 0],
70355bd8deadSopenharmony_ci        "70": [0, 0.69444, 0, 0],
70365bd8deadSopenharmony_ci        "71": [0, 0.69444, 0, 0],
70375bd8deadSopenharmony_ci        "72": [0, 0.69444, 0, 0],
70385bd8deadSopenharmony_ci        "73": [0, 0.69444, 0, 0],
70395bd8deadSopenharmony_ci        "74": [0, 0.69444, 0, 0],
70405bd8deadSopenharmony_ci        "75": [0, 0.69444, 0, 0],
70415bd8deadSopenharmony_ci        "76": [0, 0.69444, 0, 0],
70425bd8deadSopenharmony_ci        "77": [0, 0.69444, 0, 0],
70435bd8deadSopenharmony_ci        "78": [0, 0.69444, 0, 0],
70445bd8deadSopenharmony_ci        "79": [0, 0.69444, 0, 0],
70455bd8deadSopenharmony_ci        "80": [0, 0.69444, 0, 0],
70465bd8deadSopenharmony_ci        "81": [0.125, 0.69444, 0, 0],
70475bd8deadSopenharmony_ci        "82": [0, 0.69444, 0, 0],
70485bd8deadSopenharmony_ci        "83": [0, 0.69444, 0, 0],
70495bd8deadSopenharmony_ci        "84": [0, 0.69444, 0, 0],
70505bd8deadSopenharmony_ci        "85": [0, 0.69444, 0, 0],
70515bd8deadSopenharmony_ci        "86": [0, 0.69444, 0.01389, 0],
70525bd8deadSopenharmony_ci        "87": [0, 0.69444, 0.01389, 0],
70535bd8deadSopenharmony_ci        "88": [0, 0.69444, 0, 0],
70545bd8deadSopenharmony_ci        "89": [0, 0.69444, 0.025, 0],
70555bd8deadSopenharmony_ci        "90": [0, 0.69444, 0, 0],
70565bd8deadSopenharmony_ci        "91": [0.25, 0.75, 0, 0],
70575bd8deadSopenharmony_ci        "93": [0.25, 0.75, 0, 0],
70585bd8deadSopenharmony_ci        "94": [0, 0.69444, 0, 0],
70595bd8deadSopenharmony_ci        "95": [0.35, 0.09444, 0.02778, 0],
70605bd8deadSopenharmony_ci        "97": [0, 0.44444, 0, 0],
70615bd8deadSopenharmony_ci        "98": [0, 0.69444, 0, 0],
70625bd8deadSopenharmony_ci        "99": [0, 0.44444, 0, 0],
70635bd8deadSopenharmony_ci        "100": [0, 0.69444, 0, 0],
70645bd8deadSopenharmony_ci        "101": [0, 0.44444, 0, 0],
70655bd8deadSopenharmony_ci        "102": [0, 0.69444, 0.06944, 0],
70665bd8deadSopenharmony_ci        "103": [0.19444, 0.44444, 0.01389, 0],
70675bd8deadSopenharmony_ci        "104": [0, 0.69444, 0, 0],
70685bd8deadSopenharmony_ci        "105": [0, 0.67937, 0, 0],
70695bd8deadSopenharmony_ci        "106": [0.19444, 0.67937, 0, 0],
70705bd8deadSopenharmony_ci        "107": [0, 0.69444, 0, 0],
70715bd8deadSopenharmony_ci        "108": [0, 0.69444, 0, 0],
70725bd8deadSopenharmony_ci        "109": [0, 0.44444, 0, 0],
70735bd8deadSopenharmony_ci        "110": [0, 0.44444, 0, 0],
70745bd8deadSopenharmony_ci        "111": [0, 0.44444, 0, 0],
70755bd8deadSopenharmony_ci        "112": [0.19444, 0.44444, 0, 0],
70765bd8deadSopenharmony_ci        "113": [0.19444, 0.44444, 0, 0],
70775bd8deadSopenharmony_ci        "114": [0, 0.44444, 0.01389, 0],
70785bd8deadSopenharmony_ci        "115": [0, 0.44444, 0, 0],
70795bd8deadSopenharmony_ci        "116": [0, 0.57143, 0, 0],
70805bd8deadSopenharmony_ci        "117": [0, 0.44444, 0, 0],
70815bd8deadSopenharmony_ci        "118": [0, 0.44444, 0.01389, 0],
70825bd8deadSopenharmony_ci        "119": [0, 0.44444, 0.01389, 0],
70835bd8deadSopenharmony_ci        "120": [0, 0.44444, 0, 0],
70845bd8deadSopenharmony_ci        "121": [0.19444, 0.44444, 0.01389, 0],
70855bd8deadSopenharmony_ci        "122": [0, 0.44444, 0, 0],
70865bd8deadSopenharmony_ci        "126": [0.35, 0.32659, 0, 0],
70875bd8deadSopenharmony_ci        "305": [0, 0.44444, 0, 0],
70885bd8deadSopenharmony_ci        "567": [0.19444, 0.44444, 0, 0],
70895bd8deadSopenharmony_ci        "768": [0, 0.69444, 0, 0],
70905bd8deadSopenharmony_ci        "769": [0, 0.69444, 0, 0],
70915bd8deadSopenharmony_ci        "770": [0, 0.69444, 0, 0],
70925bd8deadSopenharmony_ci        "771": [0, 0.67659, 0, 0],
70935bd8deadSopenharmony_ci        "772": [0, 0.60889, 0, 0],
70945bd8deadSopenharmony_ci        "774": [0, 0.69444, 0, 0],
70955bd8deadSopenharmony_ci        "775": [0, 0.67937, 0, 0],
70965bd8deadSopenharmony_ci        "776": [0, 0.67937, 0, 0],
70975bd8deadSopenharmony_ci        "778": [0, 0.69444, 0, 0],
70985bd8deadSopenharmony_ci        "779": [0, 0.69444, 0, 0],
70995bd8deadSopenharmony_ci        "780": [0, 0.63194, 0, 0],
71005bd8deadSopenharmony_ci        "915": [0, 0.69444, 0, 0],
71015bd8deadSopenharmony_ci        "916": [0, 0.69444, 0, 0],
71025bd8deadSopenharmony_ci        "920": [0, 0.69444, 0, 0],
71035bd8deadSopenharmony_ci        "923": [0, 0.69444, 0, 0],
71045bd8deadSopenharmony_ci        "926": [0, 0.69444, 0, 0],
71055bd8deadSopenharmony_ci        "928": [0, 0.69444, 0, 0],
71065bd8deadSopenharmony_ci        "931": [0, 0.69444, 0, 0],
71075bd8deadSopenharmony_ci        "933": [0, 0.69444, 0, 0],
71085bd8deadSopenharmony_ci        "934": [0, 0.69444, 0, 0],
71095bd8deadSopenharmony_ci        "936": [0, 0.69444, 0, 0],
71105bd8deadSopenharmony_ci        "937": [0, 0.69444, 0, 0],
71115bd8deadSopenharmony_ci        "8211": [0, 0.44444, 0.02778, 0],
71125bd8deadSopenharmony_ci        "8212": [0, 0.44444, 0.02778, 0],
71135bd8deadSopenharmony_ci        "8216": [0, 0.69444, 0, 0],
71145bd8deadSopenharmony_ci        "8217": [0, 0.69444, 0, 0],
71155bd8deadSopenharmony_ci        "8220": [0, 0.69444, 0, 0],
71165bd8deadSopenharmony_ci        "8221": [0, 0.69444, 0, 0]
71175bd8deadSopenharmony_ci    },
71185bd8deadSopenharmony_ci    "Script-Regular": {
71195bd8deadSopenharmony_ci        "65": [0, 0.7, 0.22925, 0],
71205bd8deadSopenharmony_ci        "66": [0, 0.7, 0.04087, 0],
71215bd8deadSopenharmony_ci        "67": [0, 0.7, 0.1689, 0],
71225bd8deadSopenharmony_ci        "68": [0, 0.7, 0.09371, 0],
71235bd8deadSopenharmony_ci        "69": [0, 0.7, 0.18583, 0],
71245bd8deadSopenharmony_ci        "70": [0, 0.7, 0.13634, 0],
71255bd8deadSopenharmony_ci        "71": [0, 0.7, 0.17322, 0],
71265bd8deadSopenharmony_ci        "72": [0, 0.7, 0.29694, 0],
71275bd8deadSopenharmony_ci        "73": [0, 0.7, 0.19189, 0],
71285bd8deadSopenharmony_ci        "74": [0.27778, 0.7, 0.19189, 0],
71295bd8deadSopenharmony_ci        "75": [0, 0.7, 0.31259, 0],
71305bd8deadSopenharmony_ci        "76": [0, 0.7, 0.19189, 0],
71315bd8deadSopenharmony_ci        "77": [0, 0.7, 0.15981, 0],
71325bd8deadSopenharmony_ci        "78": [0, 0.7, 0.3525, 0],
71335bd8deadSopenharmony_ci        "79": [0, 0.7, 0.08078, 0],
71345bd8deadSopenharmony_ci        "80": [0, 0.7, 0.08078, 0],
71355bd8deadSopenharmony_ci        "81": [0, 0.7, 0.03305, 0],
71365bd8deadSopenharmony_ci        "82": [0, 0.7, 0.06259, 0],
71375bd8deadSopenharmony_ci        "83": [0, 0.7, 0.19189, 0],
71385bd8deadSopenharmony_ci        "84": [0, 0.7, 0.29087, 0],
71395bd8deadSopenharmony_ci        "85": [0, 0.7, 0.25815, 0],
71405bd8deadSopenharmony_ci        "86": [0, 0.7, 0.27523, 0],
71415bd8deadSopenharmony_ci        "87": [0, 0.7, 0.27523, 0],
71425bd8deadSopenharmony_ci        "88": [0, 0.7, 0.26006, 0],
71435bd8deadSopenharmony_ci        "89": [0, 0.7, 0.2939, 0],
71445bd8deadSopenharmony_ci        "90": [0, 0.7, 0.24037, 0]
71455bd8deadSopenharmony_ci    },
71465bd8deadSopenharmony_ci    "Size1-Regular": {
71475bd8deadSopenharmony_ci        "40": [0.35001, 0.85, 0, 0],
71485bd8deadSopenharmony_ci        "41": [0.35001, 0.85, 0, 0],
71495bd8deadSopenharmony_ci        "47": [0.35001, 0.85, 0, 0],
71505bd8deadSopenharmony_ci        "91": [0.35001, 0.85, 0, 0],
71515bd8deadSopenharmony_ci        "92": [0.35001, 0.85, 0, 0],
71525bd8deadSopenharmony_ci        "93": [0.35001, 0.85, 0, 0],
71535bd8deadSopenharmony_ci        "123": [0.35001, 0.85, 0, 0],
71545bd8deadSopenharmony_ci        "125": [0.35001, 0.85, 0, 0],
71555bd8deadSopenharmony_ci        "710": [0, 0.72222, 0, 0],
71565bd8deadSopenharmony_ci        "732": [0, 0.72222, 0, 0],
71575bd8deadSopenharmony_ci        "770": [0, 0.72222, 0, 0],
71585bd8deadSopenharmony_ci        "771": [0, 0.72222, 0, 0],
71595bd8deadSopenharmony_ci        "8214": [-0.00099, 0.601, 0, 0],
71605bd8deadSopenharmony_ci        "8593": [1e-05, 0.6, 0, 0],
71615bd8deadSopenharmony_ci        "8595": [1e-05, 0.6, 0, 0],
71625bd8deadSopenharmony_ci        "8657": [1e-05, 0.6, 0, 0],
71635bd8deadSopenharmony_ci        "8659": [1e-05, 0.6, 0, 0],
71645bd8deadSopenharmony_ci        "8719": [0.25001, 0.75, 0, 0],
71655bd8deadSopenharmony_ci        "8720": [0.25001, 0.75, 0, 0],
71665bd8deadSopenharmony_ci        "8721": [0.25001, 0.75, 0, 0],
71675bd8deadSopenharmony_ci        "8730": [0.35001, 0.85, 0, 0],
71685bd8deadSopenharmony_ci        "8739": [-0.00599, 0.606, 0, 0],
71695bd8deadSopenharmony_ci        "8741": [-0.00599, 0.606, 0, 0],
71705bd8deadSopenharmony_ci        "8747": [0.30612, 0.805, 0.19445, 0],
71715bd8deadSopenharmony_ci        "8748": [0.306, 0.805, 0.19445, 0],
71725bd8deadSopenharmony_ci        "8749": [0.306, 0.805, 0.19445, 0],
71735bd8deadSopenharmony_ci        "8750": [0.30612, 0.805, 0.19445, 0],
71745bd8deadSopenharmony_ci        "8896": [0.25001, 0.75, 0, 0],
71755bd8deadSopenharmony_ci        "8897": [0.25001, 0.75, 0, 0],
71765bd8deadSopenharmony_ci        "8898": [0.25001, 0.75, 0, 0],
71775bd8deadSopenharmony_ci        "8899": [0.25001, 0.75, 0, 0],
71785bd8deadSopenharmony_ci        "8968": [0.35001, 0.85, 0, 0],
71795bd8deadSopenharmony_ci        "8969": [0.35001, 0.85, 0, 0],
71805bd8deadSopenharmony_ci        "8970": [0.35001, 0.85, 0, 0],
71815bd8deadSopenharmony_ci        "8971": [0.35001, 0.85, 0, 0],
71825bd8deadSopenharmony_ci        "9168": [-0.00099, 0.601, 0, 0],
71835bd8deadSopenharmony_ci        "10216": [0.35001, 0.85, 0, 0],
71845bd8deadSopenharmony_ci        "10217": [0.35001, 0.85, 0, 0],
71855bd8deadSopenharmony_ci        "10752": [0.25001, 0.75, 0, 0],
71865bd8deadSopenharmony_ci        "10753": [0.25001, 0.75, 0, 0],
71875bd8deadSopenharmony_ci        "10754": [0.25001, 0.75, 0, 0],
71885bd8deadSopenharmony_ci        "10756": [0.25001, 0.75, 0, 0],
71895bd8deadSopenharmony_ci        "10758": [0.25001, 0.75, 0, 0]
71905bd8deadSopenharmony_ci    },
71915bd8deadSopenharmony_ci    "Size2-Regular": {
71925bd8deadSopenharmony_ci        "40": [0.65002, 1.15, 0, 0],
71935bd8deadSopenharmony_ci        "41": [0.65002, 1.15, 0, 0],
71945bd8deadSopenharmony_ci        "47": [0.65002, 1.15, 0, 0],
71955bd8deadSopenharmony_ci        "91": [0.65002, 1.15, 0, 0],
71965bd8deadSopenharmony_ci        "92": [0.65002, 1.15, 0, 0],
71975bd8deadSopenharmony_ci        "93": [0.65002, 1.15, 0, 0],
71985bd8deadSopenharmony_ci        "123": [0.65002, 1.15, 0, 0],
71995bd8deadSopenharmony_ci        "125": [0.65002, 1.15, 0, 0],
72005bd8deadSopenharmony_ci        "710": [0, 0.75, 0, 0],
72015bd8deadSopenharmony_ci        "732": [0, 0.75, 0, 0],
72025bd8deadSopenharmony_ci        "770": [0, 0.75, 0, 0],
72035bd8deadSopenharmony_ci        "771": [0, 0.75, 0, 0],
72045bd8deadSopenharmony_ci        "8719": [0.55001, 1.05, 0, 0],
72055bd8deadSopenharmony_ci        "8720": [0.55001, 1.05, 0, 0],
72065bd8deadSopenharmony_ci        "8721": [0.55001, 1.05, 0, 0],
72075bd8deadSopenharmony_ci        "8730": [0.65002, 1.15, 0, 0],
72085bd8deadSopenharmony_ci        "8747": [0.86225, 1.36, 0.44445, 0],
72095bd8deadSopenharmony_ci        "8748": [0.862, 1.36, 0.44445, 0],
72105bd8deadSopenharmony_ci        "8749": [0.862, 1.36, 0.44445, 0],
72115bd8deadSopenharmony_ci        "8750": [0.86225, 1.36, 0.44445, 0],
72125bd8deadSopenharmony_ci        "8896": [0.55001, 1.05, 0, 0],
72135bd8deadSopenharmony_ci        "8897": [0.55001, 1.05, 0, 0],
72145bd8deadSopenharmony_ci        "8898": [0.55001, 1.05, 0, 0],
72155bd8deadSopenharmony_ci        "8899": [0.55001, 1.05, 0, 0],
72165bd8deadSopenharmony_ci        "8968": [0.65002, 1.15, 0, 0],
72175bd8deadSopenharmony_ci        "8969": [0.65002, 1.15, 0, 0],
72185bd8deadSopenharmony_ci        "8970": [0.65002, 1.15, 0, 0],
72195bd8deadSopenharmony_ci        "8971": [0.65002, 1.15, 0, 0],
72205bd8deadSopenharmony_ci        "10216": [0.65002, 1.15, 0, 0],
72215bd8deadSopenharmony_ci        "10217": [0.65002, 1.15, 0, 0],
72225bd8deadSopenharmony_ci        "10752": [0.55001, 1.05, 0, 0],
72235bd8deadSopenharmony_ci        "10753": [0.55001, 1.05, 0, 0],
72245bd8deadSopenharmony_ci        "10754": [0.55001, 1.05, 0, 0],
72255bd8deadSopenharmony_ci        "10756": [0.55001, 1.05, 0, 0],
72265bd8deadSopenharmony_ci        "10758": [0.55001, 1.05, 0, 0]
72275bd8deadSopenharmony_ci    },
72285bd8deadSopenharmony_ci    "Size3-Regular": {
72295bd8deadSopenharmony_ci        "40": [0.95003, 1.45, 0, 0],
72305bd8deadSopenharmony_ci        "41": [0.95003, 1.45, 0, 0],
72315bd8deadSopenharmony_ci        "47": [0.95003, 1.45, 0, 0],
72325bd8deadSopenharmony_ci        "91": [0.95003, 1.45, 0, 0],
72335bd8deadSopenharmony_ci        "92": [0.95003, 1.45, 0, 0],
72345bd8deadSopenharmony_ci        "93": [0.95003, 1.45, 0, 0],
72355bd8deadSopenharmony_ci        "123": [0.95003, 1.45, 0, 0],
72365bd8deadSopenharmony_ci        "125": [0.95003, 1.45, 0, 0],
72375bd8deadSopenharmony_ci        "710": [0, 0.75, 0, 0],
72385bd8deadSopenharmony_ci        "732": [0, 0.75, 0, 0],
72395bd8deadSopenharmony_ci        "770": [0, 0.75, 0, 0],
72405bd8deadSopenharmony_ci        "771": [0, 0.75, 0, 0],
72415bd8deadSopenharmony_ci        "8730": [0.95003, 1.45, 0, 0],
72425bd8deadSopenharmony_ci        "8968": [0.95003, 1.45, 0, 0],
72435bd8deadSopenharmony_ci        "8969": [0.95003, 1.45, 0, 0],
72445bd8deadSopenharmony_ci        "8970": [0.95003, 1.45, 0, 0],
72455bd8deadSopenharmony_ci        "8971": [0.95003, 1.45, 0, 0],
72465bd8deadSopenharmony_ci        "10216": [0.95003, 1.45, 0, 0],
72475bd8deadSopenharmony_ci        "10217": [0.95003, 1.45, 0, 0]
72485bd8deadSopenharmony_ci    },
72495bd8deadSopenharmony_ci    "Size4-Regular": {
72505bd8deadSopenharmony_ci        "40": [1.25003, 1.75, 0, 0],
72515bd8deadSopenharmony_ci        "41": [1.25003, 1.75, 0, 0],
72525bd8deadSopenharmony_ci        "47": [1.25003, 1.75, 0, 0],
72535bd8deadSopenharmony_ci        "91": [1.25003, 1.75, 0, 0],
72545bd8deadSopenharmony_ci        "92": [1.25003, 1.75, 0, 0],
72555bd8deadSopenharmony_ci        "93": [1.25003, 1.75, 0, 0],
72565bd8deadSopenharmony_ci        "123": [1.25003, 1.75, 0, 0],
72575bd8deadSopenharmony_ci        "125": [1.25003, 1.75, 0, 0],
72585bd8deadSopenharmony_ci        "710": [0, 0.825, 0, 0],
72595bd8deadSopenharmony_ci        "732": [0, 0.825, 0, 0],
72605bd8deadSopenharmony_ci        "770": [0, 0.825, 0, 0],
72615bd8deadSopenharmony_ci        "771": [0, 0.825, 0, 0],
72625bd8deadSopenharmony_ci        "8730": [1.25003, 1.75, 0, 0],
72635bd8deadSopenharmony_ci        "8968": [1.25003, 1.75, 0, 0],
72645bd8deadSopenharmony_ci        "8969": [1.25003, 1.75, 0, 0],
72655bd8deadSopenharmony_ci        "8970": [1.25003, 1.75, 0, 0],
72665bd8deadSopenharmony_ci        "8971": [1.25003, 1.75, 0, 0],
72675bd8deadSopenharmony_ci        "9115": [0.64502, 1.155, 0, 0],
72685bd8deadSopenharmony_ci        "9116": [1e-05, 0.6, 0, 0],
72695bd8deadSopenharmony_ci        "9117": [0.64502, 1.155, 0, 0],
72705bd8deadSopenharmony_ci        "9118": [0.64502, 1.155, 0, 0],
72715bd8deadSopenharmony_ci        "9119": [1e-05, 0.6, 0, 0],
72725bd8deadSopenharmony_ci        "9120": [0.64502, 1.155, 0, 0],
72735bd8deadSopenharmony_ci        "9121": [0.64502, 1.155, 0, 0],
72745bd8deadSopenharmony_ci        "9122": [-0.00099, 0.601, 0, 0],
72755bd8deadSopenharmony_ci        "9123": [0.64502, 1.155, 0, 0],
72765bd8deadSopenharmony_ci        "9124": [0.64502, 1.155, 0, 0],
72775bd8deadSopenharmony_ci        "9125": [-0.00099, 0.601, 0, 0],
72785bd8deadSopenharmony_ci        "9126": [0.64502, 1.155, 0, 0],
72795bd8deadSopenharmony_ci        "9127": [1e-05, 0.9, 0, 0],
72805bd8deadSopenharmony_ci        "9128": [0.65002, 1.15, 0, 0],
72815bd8deadSopenharmony_ci        "9129": [0.90001, 0, 0, 0],
72825bd8deadSopenharmony_ci        "9130": [0, 0.3, 0, 0],
72835bd8deadSopenharmony_ci        "9131": [1e-05, 0.9, 0, 0],
72845bd8deadSopenharmony_ci        "9132": [0.65002, 1.15, 0, 0],
72855bd8deadSopenharmony_ci        "9133": [0.90001, 0, 0, 0],
72865bd8deadSopenharmony_ci        "9143": [0.88502, 0.915, 0, 0],
72875bd8deadSopenharmony_ci        "10216": [1.25003, 1.75, 0, 0],
72885bd8deadSopenharmony_ci        "10217": [1.25003, 1.75, 0, 0],
72895bd8deadSopenharmony_ci        "57344": [-0.00499, 0.605, 0, 0],
72905bd8deadSopenharmony_ci        "57345": [-0.00499, 0.605, 0, 0],
72915bd8deadSopenharmony_ci        "57680": [0, 0.12, 0, 0],
72925bd8deadSopenharmony_ci        "57681": [0, 0.12, 0, 0],
72935bd8deadSopenharmony_ci        "57682": [0, 0.12, 0, 0],
72945bd8deadSopenharmony_ci        "57683": [0, 0.12, 0, 0]
72955bd8deadSopenharmony_ci    },
72965bd8deadSopenharmony_ci    "Typewriter-Regular": {
72975bd8deadSopenharmony_ci        "33": [0, 0.61111, 0, 0],
72985bd8deadSopenharmony_ci        "34": [0, 0.61111, 0, 0],
72995bd8deadSopenharmony_ci        "35": [0, 0.61111, 0, 0],
73005bd8deadSopenharmony_ci        "36": [0.08333, 0.69444, 0, 0],
73015bd8deadSopenharmony_ci        "37": [0.08333, 0.69444, 0, 0],
73025bd8deadSopenharmony_ci        "38": [0, 0.61111, 0, 0],
73035bd8deadSopenharmony_ci        "39": [0, 0.61111, 0, 0],
73045bd8deadSopenharmony_ci        "40": [0.08333, 0.69444, 0, 0],
73055bd8deadSopenharmony_ci        "41": [0.08333, 0.69444, 0, 0],
73065bd8deadSopenharmony_ci        "42": [0, 0.52083, 0, 0],
73075bd8deadSopenharmony_ci        "43": [-0.08056, 0.53055, 0, 0],
73085bd8deadSopenharmony_ci        "44": [0.13889, 0.125, 0, 0],
73095bd8deadSopenharmony_ci        "45": [-0.08056, 0.53055, 0, 0],
73105bd8deadSopenharmony_ci        "46": [0, 0.125, 0, 0],
73115bd8deadSopenharmony_ci        "47": [0.08333, 0.69444, 0, 0],
73125bd8deadSopenharmony_ci        "48": [0, 0.61111, 0, 0],
73135bd8deadSopenharmony_ci        "49": [0, 0.61111, 0, 0],
73145bd8deadSopenharmony_ci        "50": [0, 0.61111, 0, 0],
73155bd8deadSopenharmony_ci        "51": [0, 0.61111, 0, 0],
73165bd8deadSopenharmony_ci        "52": [0, 0.61111, 0, 0],
73175bd8deadSopenharmony_ci        "53": [0, 0.61111, 0, 0],
73185bd8deadSopenharmony_ci        "54": [0, 0.61111, 0, 0],
73195bd8deadSopenharmony_ci        "55": [0, 0.61111, 0, 0],
73205bd8deadSopenharmony_ci        "56": [0, 0.61111, 0, 0],
73215bd8deadSopenharmony_ci        "57": [0, 0.61111, 0, 0],
73225bd8deadSopenharmony_ci        "58": [0, 0.43056, 0, 0],
73235bd8deadSopenharmony_ci        "59": [0.13889, 0.43056, 0, 0],
73245bd8deadSopenharmony_ci        "60": [-0.05556, 0.55556, 0, 0],
73255bd8deadSopenharmony_ci        "61": [-0.19549, 0.41562, 0, 0],
73265bd8deadSopenharmony_ci        "62": [-0.05556, 0.55556, 0, 0],
73275bd8deadSopenharmony_ci        "63": [0, 0.61111, 0, 0],
73285bd8deadSopenharmony_ci        "64": [0, 0.61111, 0, 0],
73295bd8deadSopenharmony_ci        "65": [0, 0.61111, 0, 0],
73305bd8deadSopenharmony_ci        "66": [0, 0.61111, 0, 0],
73315bd8deadSopenharmony_ci        "67": [0, 0.61111, 0, 0],
73325bd8deadSopenharmony_ci        "68": [0, 0.61111, 0, 0],
73335bd8deadSopenharmony_ci        "69": [0, 0.61111, 0, 0],
73345bd8deadSopenharmony_ci        "70": [0, 0.61111, 0, 0],
73355bd8deadSopenharmony_ci        "71": [0, 0.61111, 0, 0],
73365bd8deadSopenharmony_ci        "72": [0, 0.61111, 0, 0],
73375bd8deadSopenharmony_ci        "73": [0, 0.61111, 0, 0],
73385bd8deadSopenharmony_ci        "74": [0, 0.61111, 0, 0],
73395bd8deadSopenharmony_ci        "75": [0, 0.61111, 0, 0],
73405bd8deadSopenharmony_ci        "76": [0, 0.61111, 0, 0],
73415bd8deadSopenharmony_ci        "77": [0, 0.61111, 0, 0],
73425bd8deadSopenharmony_ci        "78": [0, 0.61111, 0, 0],
73435bd8deadSopenharmony_ci        "79": [0, 0.61111, 0, 0],
73445bd8deadSopenharmony_ci        "80": [0, 0.61111, 0, 0],
73455bd8deadSopenharmony_ci        "81": [0.13889, 0.61111, 0, 0],
73465bd8deadSopenharmony_ci        "82": [0, 0.61111, 0, 0],
73475bd8deadSopenharmony_ci        "83": [0, 0.61111, 0, 0],
73485bd8deadSopenharmony_ci        "84": [0, 0.61111, 0, 0],
73495bd8deadSopenharmony_ci        "85": [0, 0.61111, 0, 0],
73505bd8deadSopenharmony_ci        "86": [0, 0.61111, 0, 0],
73515bd8deadSopenharmony_ci        "87": [0, 0.61111, 0, 0],
73525bd8deadSopenharmony_ci        "88": [0, 0.61111, 0, 0],
73535bd8deadSopenharmony_ci        "89": [0, 0.61111, 0, 0],
73545bd8deadSopenharmony_ci        "90": [0, 0.61111, 0, 0],
73555bd8deadSopenharmony_ci        "91": [0.08333, 0.69444, 0, 0],
73565bd8deadSopenharmony_ci        "92": [0.08333, 0.69444, 0, 0],
73575bd8deadSopenharmony_ci        "93": [0.08333, 0.69444, 0, 0],
73585bd8deadSopenharmony_ci        "94": [0, 0.61111, 0, 0],
73595bd8deadSopenharmony_ci        "95": [0.09514, 0, 0, 0],
73605bd8deadSopenharmony_ci        "96": [0, 0.61111, 0, 0],
73615bd8deadSopenharmony_ci        "97": [0, 0.43056, 0, 0],
73625bd8deadSopenharmony_ci        "98": [0, 0.61111, 0, 0],
73635bd8deadSopenharmony_ci        "99": [0, 0.43056, 0, 0],
73645bd8deadSopenharmony_ci        "100": [0, 0.61111, 0, 0],
73655bd8deadSopenharmony_ci        "101": [0, 0.43056, 0, 0],
73665bd8deadSopenharmony_ci        "102": [0, 0.61111, 0, 0],
73675bd8deadSopenharmony_ci        "103": [0.22222, 0.43056, 0, 0],
73685bd8deadSopenharmony_ci        "104": [0, 0.61111, 0, 0],
73695bd8deadSopenharmony_ci        "105": [0, 0.61111, 0, 0],
73705bd8deadSopenharmony_ci        "106": [0.22222, 0.61111, 0, 0],
73715bd8deadSopenharmony_ci        "107": [0, 0.61111, 0, 0],
73725bd8deadSopenharmony_ci        "108": [0, 0.61111, 0, 0],
73735bd8deadSopenharmony_ci        "109": [0, 0.43056, 0, 0],
73745bd8deadSopenharmony_ci        "110": [0, 0.43056, 0, 0],
73755bd8deadSopenharmony_ci        "111": [0, 0.43056, 0, 0],
73765bd8deadSopenharmony_ci        "112": [0.22222, 0.43056, 0, 0],
73775bd8deadSopenharmony_ci        "113": [0.22222, 0.43056, 0, 0],
73785bd8deadSopenharmony_ci        "114": [0, 0.43056, 0, 0],
73795bd8deadSopenharmony_ci        "115": [0, 0.43056, 0, 0],
73805bd8deadSopenharmony_ci        "116": [0, 0.55358, 0, 0],
73815bd8deadSopenharmony_ci        "117": [0, 0.43056, 0, 0],
73825bd8deadSopenharmony_ci        "118": [0, 0.43056, 0, 0],
73835bd8deadSopenharmony_ci        "119": [0, 0.43056, 0, 0],
73845bd8deadSopenharmony_ci        "120": [0, 0.43056, 0, 0],
73855bd8deadSopenharmony_ci        "121": [0.22222, 0.43056, 0, 0],
73865bd8deadSopenharmony_ci        "122": [0, 0.43056, 0, 0],
73875bd8deadSopenharmony_ci        "123": [0.08333, 0.69444, 0, 0],
73885bd8deadSopenharmony_ci        "124": [0.08333, 0.69444, 0, 0],
73895bd8deadSopenharmony_ci        "125": [0.08333, 0.69444, 0, 0],
73905bd8deadSopenharmony_ci        "126": [0, 0.61111, 0, 0],
73915bd8deadSopenharmony_ci        "127": [0, 0.61111, 0, 0],
73925bd8deadSopenharmony_ci        "305": [0, 0.43056, 0, 0],
73935bd8deadSopenharmony_ci        "567": [0.22222, 0.43056, 0, 0],
73945bd8deadSopenharmony_ci        "768": [0, 0.61111, 0, 0],
73955bd8deadSopenharmony_ci        "769": [0, 0.61111, 0, 0],
73965bd8deadSopenharmony_ci        "770": [0, 0.61111, 0, 0],
73975bd8deadSopenharmony_ci        "771": [0, 0.61111, 0, 0],
73985bd8deadSopenharmony_ci        "772": [0, 0.56555, 0, 0],
73995bd8deadSopenharmony_ci        "774": [0, 0.61111, 0, 0],
74005bd8deadSopenharmony_ci        "776": [0, 0.61111, 0, 0],
74015bd8deadSopenharmony_ci        "778": [0, 0.61111, 0, 0],
74025bd8deadSopenharmony_ci        "780": [0, 0.56597, 0, 0],
74035bd8deadSopenharmony_ci        "915": [0, 0.61111, 0, 0],
74045bd8deadSopenharmony_ci        "916": [0, 0.61111, 0, 0],
74055bd8deadSopenharmony_ci        "920": [0, 0.61111, 0, 0],
74065bd8deadSopenharmony_ci        "923": [0, 0.61111, 0, 0],
74075bd8deadSopenharmony_ci        "926": [0, 0.61111, 0, 0],
74085bd8deadSopenharmony_ci        "928": [0, 0.61111, 0, 0],
74095bd8deadSopenharmony_ci        "931": [0, 0.61111, 0, 0],
74105bd8deadSopenharmony_ci        "933": [0, 0.61111, 0, 0],
74115bd8deadSopenharmony_ci        "934": [0, 0.61111, 0, 0],
74125bd8deadSopenharmony_ci        "936": [0, 0.61111, 0, 0],
74135bd8deadSopenharmony_ci        "937": [0, 0.61111, 0, 0],
74145bd8deadSopenharmony_ci        "2018": [0, 0.61111, 0, 0],
74155bd8deadSopenharmony_ci        "2019": [0, 0.61111, 0, 0],
74165bd8deadSopenharmony_ci        "8242": [0, 0.61111, 0, 0]
74175bd8deadSopenharmony_ci    }
74185bd8deadSopenharmony_ci};
74195bd8deadSopenharmony_ci
74205bd8deadSopenharmony_ci},{}],19:[function(require,module,exports){
74215bd8deadSopenharmony_civar utils = require("./utils");
74225bd8deadSopenharmony_civar ParseError = require("./ParseError");
74235bd8deadSopenharmony_civar parseData = require("./parseData");
74245bd8deadSopenharmony_civar ParseNode = parseData.ParseNode;
74255bd8deadSopenharmony_ci
74265bd8deadSopenharmony_ci/* This file contains a list of functions that we parse, identified by
74275bd8deadSopenharmony_ci * the calls to defineFunction.
74285bd8deadSopenharmony_ci *
74295bd8deadSopenharmony_ci * The first argument to defineFunction is a single name or a list of names.
74305bd8deadSopenharmony_ci * All functions named in such a list will share a single implementation.
74315bd8deadSopenharmony_ci *
74325bd8deadSopenharmony_ci * Each declared function can have associated properties, which
74335bd8deadSopenharmony_ci * include the following:
74345bd8deadSopenharmony_ci *
74355bd8deadSopenharmony_ci *  - numArgs: The number of arguments the function takes.
74365bd8deadSopenharmony_ci *             If this is the only property, it can be passed as a number
74375bd8deadSopenharmony_ci *             instead of an element of a properties object.
74385bd8deadSopenharmony_ci *  - argTypes: (optional) An array corresponding to each argument of the
74395bd8deadSopenharmony_ci *              function, giving the type of argument that should be parsed. Its
74405bd8deadSopenharmony_ci *              length should be equal to `numArgs + numOptionalArgs`. Valid
74415bd8deadSopenharmony_ci *              types:
74425bd8deadSopenharmony_ci *               - "size": A size-like thing, such as "1em" or "5ex"
74435bd8deadSopenharmony_ci *               - "color": An html color, like "#abc" or "blue"
74445bd8deadSopenharmony_ci *               - "original": The same type as the environment that the
74455bd8deadSopenharmony_ci *                             function being parsed is in (e.g. used for the
74465bd8deadSopenharmony_ci *                             bodies of functions like \color where the first
74475bd8deadSopenharmony_ci *                             argument is special and the second argument is
74485bd8deadSopenharmony_ci *                             parsed normally)
74495bd8deadSopenharmony_ci *              Other possible types (probably shouldn't be used)
74505bd8deadSopenharmony_ci *               - "text": Text-like (e.g. \text)
74515bd8deadSopenharmony_ci *               - "math": Normal math
74525bd8deadSopenharmony_ci *              If undefined, this will be treated as an appropriate length
74535bd8deadSopenharmony_ci *              array of "original" strings
74545bd8deadSopenharmony_ci *  - greediness: (optional) The greediness of the function to use ungrouped
74555bd8deadSopenharmony_ci *                arguments.
74565bd8deadSopenharmony_ci *
74575bd8deadSopenharmony_ci *                E.g. if you have an expression
74585bd8deadSopenharmony_ci *                  \sqrt \frac 1 2
74595bd8deadSopenharmony_ci *                since \frac has greediness=2 vs \sqrt's greediness=1, \frac
74605bd8deadSopenharmony_ci *                will use the two arguments '1' and '2' as its two arguments,
74615bd8deadSopenharmony_ci *                then that whole function will be used as the argument to
74625bd8deadSopenharmony_ci *                \sqrt. On the other hand, the expressions
74635bd8deadSopenharmony_ci *                  \frac \frac 1 2 3
74645bd8deadSopenharmony_ci *                and
74655bd8deadSopenharmony_ci *                  \frac \sqrt 1 2
74665bd8deadSopenharmony_ci *                will fail because \frac and \frac have equal greediness
74675bd8deadSopenharmony_ci *                and \sqrt has a lower greediness than \frac respectively. To
74685bd8deadSopenharmony_ci *                make these parse, we would have to change them to:
74695bd8deadSopenharmony_ci *                  \frac {\frac 1 2} 3
74705bd8deadSopenharmony_ci *                and
74715bd8deadSopenharmony_ci *                  \frac {\sqrt 1} 2
74725bd8deadSopenharmony_ci *
74735bd8deadSopenharmony_ci *                The default value is `1`
74745bd8deadSopenharmony_ci *  - allowedInText: (optional) Whether or not the function is allowed inside
74755bd8deadSopenharmony_ci *                   text mode (default false)
74765bd8deadSopenharmony_ci *  - numOptionalArgs: (optional) The number of optional arguments the function
74775bd8deadSopenharmony_ci *                     should parse. If the optional arguments aren't found,
74785bd8deadSopenharmony_ci *                     `null` will be passed to the handler in their place.
74795bd8deadSopenharmony_ci *                     (default 0)
74805bd8deadSopenharmony_ci *  - infix: (optional) Must be true if the function is an infix operator.
74815bd8deadSopenharmony_ci *
74825bd8deadSopenharmony_ci * The last argument is that implementation, the handler for the function(s).
74835bd8deadSopenharmony_ci * It is called to handle these functions and their arguments.
74845bd8deadSopenharmony_ci * It receives two arguments:
74855bd8deadSopenharmony_ci *  - context contains information and references provided by the parser
74865bd8deadSopenharmony_ci *  - args is an array of arguments obtained from TeX input
74875bd8deadSopenharmony_ci * The context contains the following properties:
74885bd8deadSopenharmony_ci *  - funcName: the text (i.e. name) of the function, including \
74895bd8deadSopenharmony_ci *  - parser: the parser object
74905bd8deadSopenharmony_ci *  - lexer: the lexer object
74915bd8deadSopenharmony_ci *  - positions: the positions in the overall string of the function
74925bd8deadSopenharmony_ci *               and the arguments.
74935bd8deadSopenharmony_ci * The latter three should only be used to produce error messages.
74945bd8deadSopenharmony_ci *
74955bd8deadSopenharmony_ci * The function should return an object with the following keys:
74965bd8deadSopenharmony_ci *  - type: The type of element that this is. This is then used in
74975bd8deadSopenharmony_ci *          buildHTML/buildMathML to determine which function
74985bd8deadSopenharmony_ci *          should be called to build this node into a DOM node
74995bd8deadSopenharmony_ci * Any other data can be added to the object, which will be passed
75005bd8deadSopenharmony_ci * in to the function in buildHTML/buildMathML as `group.value`.
75015bd8deadSopenharmony_ci */
75025bd8deadSopenharmony_ci
75035bd8deadSopenharmony_cifunction defineFunction(names, props, handler) {
75045bd8deadSopenharmony_ci    if (typeof names === "string") {
75055bd8deadSopenharmony_ci        names = [names];
75065bd8deadSopenharmony_ci    }
75075bd8deadSopenharmony_ci    if (typeof props === "number") {
75085bd8deadSopenharmony_ci        props = { numArgs: props };
75095bd8deadSopenharmony_ci    }
75105bd8deadSopenharmony_ci    // Set default values of functions
75115bd8deadSopenharmony_ci    var data = {
75125bd8deadSopenharmony_ci        numArgs: props.numArgs,
75135bd8deadSopenharmony_ci        argTypes: props.argTypes,
75145bd8deadSopenharmony_ci        greediness: (props.greediness === undefined) ? 1 : props.greediness,
75155bd8deadSopenharmony_ci        allowedInText: !!props.allowedInText,
75165bd8deadSopenharmony_ci        numOptionalArgs: props.numOptionalArgs || 0,
75175bd8deadSopenharmony_ci        infix: !!props.infix,
75185bd8deadSopenharmony_ci        handler: handler
75195bd8deadSopenharmony_ci    };
75205bd8deadSopenharmony_ci    for (var i = 0; i < names.length; ++i) {
75215bd8deadSopenharmony_ci        module.exports[names[i]] = data;
75225bd8deadSopenharmony_ci    }
75235bd8deadSopenharmony_ci}
75245bd8deadSopenharmony_ci
75255bd8deadSopenharmony_ci// Since the corresponding buildHTML/buildMathML function expects a
75265bd8deadSopenharmony_ci// list of elements, we normalize for different kinds of arguments
75275bd8deadSopenharmony_civar ordargument = function(arg) {
75285bd8deadSopenharmony_ci    if (arg.type === "ordgroup") {
75295bd8deadSopenharmony_ci        return arg.value;
75305bd8deadSopenharmony_ci    } else {
75315bd8deadSopenharmony_ci        return [arg];
75325bd8deadSopenharmony_ci    }
75335bd8deadSopenharmony_ci};
75345bd8deadSopenharmony_ci
75355bd8deadSopenharmony_ci// A normal square root
75365bd8deadSopenharmony_cidefineFunction("\\sqrt", {
75375bd8deadSopenharmony_ci    numArgs: 1,
75385bd8deadSopenharmony_ci    numOptionalArgs: 1
75395bd8deadSopenharmony_ci}, function(context, args) {
75405bd8deadSopenharmony_ci    var index = args[0];
75415bd8deadSopenharmony_ci    var body = args[1];
75425bd8deadSopenharmony_ci    return {
75435bd8deadSopenharmony_ci        type: "sqrt",
75445bd8deadSopenharmony_ci        body: body,
75455bd8deadSopenharmony_ci        index: index
75465bd8deadSopenharmony_ci    };
75475bd8deadSopenharmony_ci});
75485bd8deadSopenharmony_ci
75495bd8deadSopenharmony_ci// Non-mathy text, possibly in a font
75505bd8deadSopenharmony_civar textFunctionStyles = {
75515bd8deadSopenharmony_ci    "\\text": undefined, "\\textrm": "mathrm", "\\textsf": "mathsf",
75525bd8deadSopenharmony_ci    "\\texttt": "mathtt", "\\textnormal": "mathrm", "\\textbf": "mathbf",
75535bd8deadSopenharmony_ci    "\\textit": "textit"
75545bd8deadSopenharmony_ci};
75555bd8deadSopenharmony_ci
75565bd8deadSopenharmony_cidefineFunction([
75575bd8deadSopenharmony_ci    "\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal",
75585bd8deadSopenharmony_ci    "\\textbf", "\\textit"
75595bd8deadSopenharmony_ci], {
75605bd8deadSopenharmony_ci    numArgs: 1,
75615bd8deadSopenharmony_ci    argTypes: ["text"],
75625bd8deadSopenharmony_ci    greediness: 2,
75635bd8deadSopenharmony_ci    allowedInText: true
75645bd8deadSopenharmony_ci}, function(context, args) {
75655bd8deadSopenharmony_ci    var body = args[0];
75665bd8deadSopenharmony_ci    return {
75675bd8deadSopenharmony_ci        type: "text",
75685bd8deadSopenharmony_ci        body: ordargument(body),
75695bd8deadSopenharmony_ci        style: textFunctionStyles[context.funcName]
75705bd8deadSopenharmony_ci    };
75715bd8deadSopenharmony_ci});
75725bd8deadSopenharmony_ci
75735bd8deadSopenharmony_ci// A two-argument custom color
75745bd8deadSopenharmony_cidefineFunction("\\color", {
75755bd8deadSopenharmony_ci    numArgs: 2,
75765bd8deadSopenharmony_ci    allowedInText: true,
75775bd8deadSopenharmony_ci    greediness: 3,
75785bd8deadSopenharmony_ci    argTypes: ["color", "original"]
75795bd8deadSopenharmony_ci}, function(context, args) {
75805bd8deadSopenharmony_ci    var color = args[0];
75815bd8deadSopenharmony_ci    var body = args[1];
75825bd8deadSopenharmony_ci    return {
75835bd8deadSopenharmony_ci        type: "color",
75845bd8deadSopenharmony_ci        color: color.value,
75855bd8deadSopenharmony_ci        value: ordargument(body)
75865bd8deadSopenharmony_ci    };
75875bd8deadSopenharmony_ci});
75885bd8deadSopenharmony_ci
75895bd8deadSopenharmony_ci// An overline
75905bd8deadSopenharmony_cidefineFunction("\\overline", {
75915bd8deadSopenharmony_ci    numArgs: 1
75925bd8deadSopenharmony_ci}, function(context, args) {
75935bd8deadSopenharmony_ci    var body = args[0];
75945bd8deadSopenharmony_ci    return {
75955bd8deadSopenharmony_ci        type: "overline",
75965bd8deadSopenharmony_ci        body: body
75975bd8deadSopenharmony_ci    };
75985bd8deadSopenharmony_ci});
75995bd8deadSopenharmony_ci
76005bd8deadSopenharmony_ci// An underline
76015bd8deadSopenharmony_cidefineFunction("\\underline", {
76025bd8deadSopenharmony_ci    numArgs: 1
76035bd8deadSopenharmony_ci}, function(context, args) {
76045bd8deadSopenharmony_ci    var body = args[0];
76055bd8deadSopenharmony_ci    return {
76065bd8deadSopenharmony_ci        type: "underline",
76075bd8deadSopenharmony_ci        body: body
76085bd8deadSopenharmony_ci    };
76095bd8deadSopenharmony_ci});
76105bd8deadSopenharmony_ci
76115bd8deadSopenharmony_ci// A box of the width and height
76125bd8deadSopenharmony_cidefineFunction("\\rule", {
76135bd8deadSopenharmony_ci    numArgs: 2,
76145bd8deadSopenharmony_ci    numOptionalArgs: 1,
76155bd8deadSopenharmony_ci    argTypes: ["size", "size", "size"]
76165bd8deadSopenharmony_ci}, function(context, args) {
76175bd8deadSopenharmony_ci    var shift = args[0];
76185bd8deadSopenharmony_ci    var width = args[1];
76195bd8deadSopenharmony_ci    var height = args[2];
76205bd8deadSopenharmony_ci    return {
76215bd8deadSopenharmony_ci        type: "rule",
76225bd8deadSopenharmony_ci        shift: shift && shift.value,
76235bd8deadSopenharmony_ci        width: width.value,
76245bd8deadSopenharmony_ci        height: height.value
76255bd8deadSopenharmony_ci    };
76265bd8deadSopenharmony_ci});
76275bd8deadSopenharmony_ci
76285bd8deadSopenharmony_ci// TODO: In TeX, \mkern only accepts mu-units, and \kern does not accept
76295bd8deadSopenharmony_ci// mu-units. In current KaTeX we relax this; both commands accept any unit.
76305bd8deadSopenharmony_cidefineFunction(["\\kern", "\\mkern"], {
76315bd8deadSopenharmony_ci    numArgs: 1,
76325bd8deadSopenharmony_ci    argTypes: ["size"]
76335bd8deadSopenharmony_ci}, function(context, args) {
76345bd8deadSopenharmony_ci    return {
76355bd8deadSopenharmony_ci        type: "kern",
76365bd8deadSopenharmony_ci        dimension: args[0].value
76375bd8deadSopenharmony_ci    };
76385bd8deadSopenharmony_ci});
76395bd8deadSopenharmony_ci
76405bd8deadSopenharmony_ci// A KaTeX logo
76415bd8deadSopenharmony_cidefineFunction("\\KaTeX", {
76425bd8deadSopenharmony_ci    numArgs: 0
76435bd8deadSopenharmony_ci}, function(context) {
76445bd8deadSopenharmony_ci    return {
76455bd8deadSopenharmony_ci        type: "katex"
76465bd8deadSopenharmony_ci    };
76475bd8deadSopenharmony_ci});
76485bd8deadSopenharmony_ci
76495bd8deadSopenharmony_cidefineFunction("\\phantom", {
76505bd8deadSopenharmony_ci    numArgs: 1
76515bd8deadSopenharmony_ci}, function(context, args) {
76525bd8deadSopenharmony_ci    var body = args[0];
76535bd8deadSopenharmony_ci    return {
76545bd8deadSopenharmony_ci        type: "phantom",
76555bd8deadSopenharmony_ci        value: ordargument(body)
76565bd8deadSopenharmony_ci    };
76575bd8deadSopenharmony_ci});
76585bd8deadSopenharmony_ci
76595bd8deadSopenharmony_ci// Math class commands except \mathop
76605bd8deadSopenharmony_cidefineFunction([
76615bd8deadSopenharmony_ci    "\\mathord", "\\mathbin", "\\mathrel", "\\mathopen",
76625bd8deadSopenharmony_ci    "\\mathclose", "\\mathpunct", "\\mathinner"
76635bd8deadSopenharmony_ci], {
76645bd8deadSopenharmony_ci    numArgs: 1
76655bd8deadSopenharmony_ci}, function(context, args) {
76665bd8deadSopenharmony_ci    var body = args[0];
76675bd8deadSopenharmony_ci    return {
76685bd8deadSopenharmony_ci        type: "mclass",
76695bd8deadSopenharmony_ci        mclass: "m" + context.funcName.substr(5),
76705bd8deadSopenharmony_ci        value: ordargument(body)
76715bd8deadSopenharmony_ci    };
76725bd8deadSopenharmony_ci});
76735bd8deadSopenharmony_ci
76745bd8deadSopenharmony_ci// Build a relation by placing one symbol on top of another
76755bd8deadSopenharmony_cidefineFunction("\\stackrel", {
76765bd8deadSopenharmony_ci    numArgs: 2
76775bd8deadSopenharmony_ci}, function(context, args) {
76785bd8deadSopenharmony_ci    var top = args[0];
76795bd8deadSopenharmony_ci    var bottom = args[1];
76805bd8deadSopenharmony_ci
76815bd8deadSopenharmony_ci    var bottomop = new ParseNode("op", {
76825bd8deadSopenharmony_ci        type: "op",
76835bd8deadSopenharmony_ci        limits: true,
76845bd8deadSopenharmony_ci        alwaysHandleSupSub: true,
76855bd8deadSopenharmony_ci        symbol: false,
76865bd8deadSopenharmony_ci        value: ordargument(bottom)
76875bd8deadSopenharmony_ci    }, bottom.mode);
76885bd8deadSopenharmony_ci
76895bd8deadSopenharmony_ci    var supsub = new ParseNode("supsub", {
76905bd8deadSopenharmony_ci        base: bottomop,
76915bd8deadSopenharmony_ci        sup: top,
76925bd8deadSopenharmony_ci        sub: null
76935bd8deadSopenharmony_ci    }, top.mode);
76945bd8deadSopenharmony_ci
76955bd8deadSopenharmony_ci    return {
76965bd8deadSopenharmony_ci        type: "mclass",
76975bd8deadSopenharmony_ci        mclass: "mrel",
76985bd8deadSopenharmony_ci        value: [supsub]
76995bd8deadSopenharmony_ci    };
77005bd8deadSopenharmony_ci});
77015bd8deadSopenharmony_ci
77025bd8deadSopenharmony_ci// \mod-type functions
77035bd8deadSopenharmony_cidefineFunction("\\bmod", {
77045bd8deadSopenharmony_ci    numArgs: 0
77055bd8deadSopenharmony_ci}, function(context, args) {
77065bd8deadSopenharmony_ci    return {
77075bd8deadSopenharmony_ci        type: "mod",
77085bd8deadSopenharmony_ci        modType: "bmod",
77095bd8deadSopenharmony_ci        value: null
77105bd8deadSopenharmony_ci    };
77115bd8deadSopenharmony_ci});
77125bd8deadSopenharmony_ci
77135bd8deadSopenharmony_cidefineFunction(["\\pod", "\\pmod", "\\mod"], {
77145bd8deadSopenharmony_ci    numArgs: 1
77155bd8deadSopenharmony_ci}, function(context, args) {
77165bd8deadSopenharmony_ci    var body = args[0];
77175bd8deadSopenharmony_ci    return {
77185bd8deadSopenharmony_ci        type: "mod",
77195bd8deadSopenharmony_ci        modType: context.funcName.substr(1),
77205bd8deadSopenharmony_ci        value: ordargument(body)
77215bd8deadSopenharmony_ci    };
77225bd8deadSopenharmony_ci});
77235bd8deadSopenharmony_ci
77245bd8deadSopenharmony_ci// Extra data needed for the delimiter handler down below
77255bd8deadSopenharmony_civar delimiterSizes = {
77265bd8deadSopenharmony_ci    "\\bigl" : {mclass: "mopen",    size: 1},
77275bd8deadSopenharmony_ci    "\\Bigl" : {mclass: "mopen",    size: 2},
77285bd8deadSopenharmony_ci    "\\biggl": {mclass: "mopen",    size: 3},
77295bd8deadSopenharmony_ci    "\\Biggl": {mclass: "mopen",    size: 4},
77305bd8deadSopenharmony_ci    "\\bigr" : {mclass: "mclose",   size: 1},
77315bd8deadSopenharmony_ci    "\\Bigr" : {mclass: "mclose",   size: 2},
77325bd8deadSopenharmony_ci    "\\biggr": {mclass: "mclose",   size: 3},
77335bd8deadSopenharmony_ci    "\\Biggr": {mclass: "mclose",   size: 4},
77345bd8deadSopenharmony_ci    "\\bigm" : {mclass: "mrel",     size: 1},
77355bd8deadSopenharmony_ci    "\\Bigm" : {mclass: "mrel",     size: 2},
77365bd8deadSopenharmony_ci    "\\biggm": {mclass: "mrel",     size: 3},
77375bd8deadSopenharmony_ci    "\\Biggm": {mclass: "mrel",     size: 4},
77385bd8deadSopenharmony_ci    "\\big"  : {mclass: "mord",     size: 1},
77395bd8deadSopenharmony_ci    "\\Big"  : {mclass: "mord",     size: 2},
77405bd8deadSopenharmony_ci    "\\bigg" : {mclass: "mord",     size: 3},
77415bd8deadSopenharmony_ci    "\\Bigg" : {mclass: "mord",     size: 4}
77425bd8deadSopenharmony_ci};
77435bd8deadSopenharmony_ci
77445bd8deadSopenharmony_civar delimiters = [
77455bd8deadSopenharmony_ci    "(", ")", "[", "\\lbrack", "]", "\\rbrack",
77465bd8deadSopenharmony_ci    "\\{", "\\lbrace", "\\}", "\\rbrace",
77475bd8deadSopenharmony_ci    "\\lfloor", "\\rfloor", "\\lceil", "\\rceil",
77485bd8deadSopenharmony_ci    "<", ">", "\\langle", "\\rangle", "\\lt", "\\gt",
77495bd8deadSopenharmony_ci    "\\lvert", "\\rvert", "\\lVert", "\\rVert",
77505bd8deadSopenharmony_ci    "\\lgroup", "\\rgroup", "\\lmoustache", "\\rmoustache",
77515bd8deadSopenharmony_ci    "/", "\\backslash",
77525bd8deadSopenharmony_ci    "|", "\\vert", "\\|", "\\Vert",
77535bd8deadSopenharmony_ci    "\\uparrow", "\\Uparrow",
77545bd8deadSopenharmony_ci    "\\downarrow", "\\Downarrow",
77555bd8deadSopenharmony_ci    "\\updownarrow", "\\Updownarrow",
77565bd8deadSopenharmony_ci    "."
77575bd8deadSopenharmony_ci];
77585bd8deadSopenharmony_ci
77595bd8deadSopenharmony_civar fontAliases = {
77605bd8deadSopenharmony_ci    "\\Bbb": "\\mathbb",
77615bd8deadSopenharmony_ci    "\\bold": "\\mathbf",
77625bd8deadSopenharmony_ci    "\\frak": "\\mathfrak"
77635bd8deadSopenharmony_ci};
77645bd8deadSopenharmony_ci
77655bd8deadSopenharmony_ci// Single-argument color functions
77665bd8deadSopenharmony_cidefineFunction([
77675bd8deadSopenharmony_ci    "\\blue", "\\orange", "\\pink", "\\red",
77685bd8deadSopenharmony_ci    "\\green", "\\gray", "\\purple",
77695bd8deadSopenharmony_ci    "\\blueA", "\\blueB", "\\blueC", "\\blueD", "\\blueE",
77705bd8deadSopenharmony_ci    "\\tealA", "\\tealB", "\\tealC", "\\tealD", "\\tealE",
77715bd8deadSopenharmony_ci    "\\greenA", "\\greenB", "\\greenC", "\\greenD", "\\greenE",
77725bd8deadSopenharmony_ci    "\\goldA", "\\goldB", "\\goldC", "\\goldD", "\\goldE",
77735bd8deadSopenharmony_ci    "\\redA", "\\redB", "\\redC", "\\redD", "\\redE",
77745bd8deadSopenharmony_ci    "\\maroonA", "\\maroonB", "\\maroonC", "\\maroonD", "\\maroonE",
77755bd8deadSopenharmony_ci    "\\purpleA", "\\purpleB", "\\purpleC", "\\purpleD", "\\purpleE",
77765bd8deadSopenharmony_ci    "\\mintA", "\\mintB", "\\mintC",
77775bd8deadSopenharmony_ci    "\\grayA", "\\grayB", "\\grayC", "\\grayD", "\\grayE",
77785bd8deadSopenharmony_ci    "\\grayF", "\\grayG", "\\grayH", "\\grayI",
77795bd8deadSopenharmony_ci    "\\kaBlue", "\\kaGreen"
77805bd8deadSopenharmony_ci], {
77815bd8deadSopenharmony_ci    numArgs: 1,
77825bd8deadSopenharmony_ci    allowedInText: true,
77835bd8deadSopenharmony_ci    greediness: 3
77845bd8deadSopenharmony_ci}, function(context, args) {
77855bd8deadSopenharmony_ci    var body = args[0];
77865bd8deadSopenharmony_ci    return {
77875bd8deadSopenharmony_ci        type: "color",
77885bd8deadSopenharmony_ci        color: "katex-" + context.funcName.slice(1),
77895bd8deadSopenharmony_ci        value: ordargument(body)
77905bd8deadSopenharmony_ci    };
77915bd8deadSopenharmony_ci});
77925bd8deadSopenharmony_ci
77935bd8deadSopenharmony_ci// There are 2 flags for operators; whether they produce limits in
77945bd8deadSopenharmony_ci// displaystyle, and whether they are symbols and should grow in
77955bd8deadSopenharmony_ci// displaystyle. These four groups cover the four possible choices.
77965bd8deadSopenharmony_ci
77975bd8deadSopenharmony_ci// No limits, not symbols
77985bd8deadSopenharmony_cidefineFunction([
77995bd8deadSopenharmony_ci    "\\arcsin", "\\arccos", "\\arctan", "\\arg", "\\cos", "\\cosh",
78005bd8deadSopenharmony_ci    "\\cot", "\\coth", "\\csc", "\\deg", "\\dim", "\\exp", "\\hom",
78015bd8deadSopenharmony_ci    "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh",
78025bd8deadSopenharmony_ci    "\\tan", "\\tanh"
78035bd8deadSopenharmony_ci], {
78045bd8deadSopenharmony_ci    numArgs: 0
78055bd8deadSopenharmony_ci}, function(context) {
78065bd8deadSopenharmony_ci    return {
78075bd8deadSopenharmony_ci        type: "op",
78085bd8deadSopenharmony_ci        limits: false,
78095bd8deadSopenharmony_ci        symbol: false,
78105bd8deadSopenharmony_ci        body: context.funcName
78115bd8deadSopenharmony_ci    };
78125bd8deadSopenharmony_ci});
78135bd8deadSopenharmony_ci
78145bd8deadSopenharmony_ci// Limits, not symbols
78155bd8deadSopenharmony_cidefineFunction([
78165bd8deadSopenharmony_ci    "\\det", "\\gcd", "\\inf", "\\lim", "\\liminf", "\\limsup", "\\max",
78175bd8deadSopenharmony_ci    "\\min", "\\Pr", "\\sup"
78185bd8deadSopenharmony_ci], {
78195bd8deadSopenharmony_ci    numArgs: 0
78205bd8deadSopenharmony_ci}, function(context) {
78215bd8deadSopenharmony_ci    return {
78225bd8deadSopenharmony_ci        type: "op",
78235bd8deadSopenharmony_ci        limits: true,
78245bd8deadSopenharmony_ci        symbol: false,
78255bd8deadSopenharmony_ci        body: context.funcName
78265bd8deadSopenharmony_ci    };
78275bd8deadSopenharmony_ci});
78285bd8deadSopenharmony_ci
78295bd8deadSopenharmony_ci// No limits, symbols
78305bd8deadSopenharmony_cidefineFunction([
78315bd8deadSopenharmony_ci    "\\int", "\\iint", "\\iiint", "\\oint"
78325bd8deadSopenharmony_ci], {
78335bd8deadSopenharmony_ci    numArgs: 0
78345bd8deadSopenharmony_ci}, function(context) {
78355bd8deadSopenharmony_ci    return {
78365bd8deadSopenharmony_ci        type: "op",
78375bd8deadSopenharmony_ci        limits: false,
78385bd8deadSopenharmony_ci        symbol: true,
78395bd8deadSopenharmony_ci        body: context.funcName
78405bd8deadSopenharmony_ci    };
78415bd8deadSopenharmony_ci});
78425bd8deadSopenharmony_ci
78435bd8deadSopenharmony_ci// Limits, symbols
78445bd8deadSopenharmony_cidefineFunction([
78455bd8deadSopenharmony_ci    "\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap",
78465bd8deadSopenharmony_ci    "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes",
78475bd8deadSopenharmony_ci    "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint"
78485bd8deadSopenharmony_ci], {
78495bd8deadSopenharmony_ci    numArgs: 0
78505bd8deadSopenharmony_ci}, function(context) {
78515bd8deadSopenharmony_ci    return {
78525bd8deadSopenharmony_ci        type: "op",
78535bd8deadSopenharmony_ci        limits: true,
78545bd8deadSopenharmony_ci        symbol: true,
78555bd8deadSopenharmony_ci        body: context.funcName
78565bd8deadSopenharmony_ci    };
78575bd8deadSopenharmony_ci});
78585bd8deadSopenharmony_ci
78595bd8deadSopenharmony_ci// \mathop class command
78605bd8deadSopenharmony_cidefineFunction("\\mathop", {
78615bd8deadSopenharmony_ci    numArgs: 1
78625bd8deadSopenharmony_ci}, function(context, args) {
78635bd8deadSopenharmony_ci    var body = args[0];
78645bd8deadSopenharmony_ci    return {
78655bd8deadSopenharmony_ci        type: "op",
78665bd8deadSopenharmony_ci        limits: false,
78675bd8deadSopenharmony_ci        symbol: false,
78685bd8deadSopenharmony_ci        value: ordargument(body)
78695bd8deadSopenharmony_ci    };
78705bd8deadSopenharmony_ci});
78715bd8deadSopenharmony_ci
78725bd8deadSopenharmony_ci// Fractions
78735bd8deadSopenharmony_cidefineFunction([
78745bd8deadSopenharmony_ci    "\\dfrac", "\\frac", "\\tfrac",
78755bd8deadSopenharmony_ci    "\\dbinom", "\\binom", "\\tbinom",
78765bd8deadSopenharmony_ci    "\\\\atopfrac" // can’t be entered directly
78775bd8deadSopenharmony_ci], {
78785bd8deadSopenharmony_ci    numArgs: 2,
78795bd8deadSopenharmony_ci    greediness: 2
78805bd8deadSopenharmony_ci}, function(context, args) {
78815bd8deadSopenharmony_ci    var numer = args[0];
78825bd8deadSopenharmony_ci    var denom = args[1];
78835bd8deadSopenharmony_ci    var hasBarLine;
78845bd8deadSopenharmony_ci    var leftDelim = null;
78855bd8deadSopenharmony_ci    var rightDelim = null;
78865bd8deadSopenharmony_ci    var size = "auto";
78875bd8deadSopenharmony_ci
78885bd8deadSopenharmony_ci    switch (context.funcName) {
78895bd8deadSopenharmony_ci        case "\\dfrac":
78905bd8deadSopenharmony_ci        case "\\frac":
78915bd8deadSopenharmony_ci        case "\\tfrac":
78925bd8deadSopenharmony_ci            hasBarLine = true;
78935bd8deadSopenharmony_ci            break;
78945bd8deadSopenharmony_ci        case "\\\\atopfrac":
78955bd8deadSopenharmony_ci            hasBarLine = false;
78965bd8deadSopenharmony_ci            break;
78975bd8deadSopenharmony_ci        case "\\dbinom":
78985bd8deadSopenharmony_ci        case "\\binom":
78995bd8deadSopenharmony_ci        case "\\tbinom":
79005bd8deadSopenharmony_ci            hasBarLine = false;
79015bd8deadSopenharmony_ci            leftDelim = "(";
79025bd8deadSopenharmony_ci            rightDelim = ")";
79035bd8deadSopenharmony_ci            break;
79045bd8deadSopenharmony_ci        default:
79055bd8deadSopenharmony_ci            throw new Error("Unrecognized genfrac command");
79065bd8deadSopenharmony_ci    }
79075bd8deadSopenharmony_ci
79085bd8deadSopenharmony_ci    switch (context.funcName) {
79095bd8deadSopenharmony_ci        case "\\dfrac":
79105bd8deadSopenharmony_ci        case "\\dbinom":
79115bd8deadSopenharmony_ci            size = "display";
79125bd8deadSopenharmony_ci            break;
79135bd8deadSopenharmony_ci        case "\\tfrac":
79145bd8deadSopenharmony_ci        case "\\tbinom":
79155bd8deadSopenharmony_ci            size = "text";
79165bd8deadSopenharmony_ci            break;
79175bd8deadSopenharmony_ci    }
79185bd8deadSopenharmony_ci
79195bd8deadSopenharmony_ci    return {
79205bd8deadSopenharmony_ci        type: "genfrac",
79215bd8deadSopenharmony_ci        numer: numer,
79225bd8deadSopenharmony_ci        denom: denom,
79235bd8deadSopenharmony_ci        hasBarLine: hasBarLine,
79245bd8deadSopenharmony_ci        leftDelim: leftDelim,
79255bd8deadSopenharmony_ci        rightDelim: rightDelim,
79265bd8deadSopenharmony_ci        size: size
79275bd8deadSopenharmony_ci    };
79285bd8deadSopenharmony_ci});
79295bd8deadSopenharmony_ci
79305bd8deadSopenharmony_ci// Left and right overlap functions
79315bd8deadSopenharmony_cidefineFunction(["\\llap", "\\rlap"], {
79325bd8deadSopenharmony_ci    numArgs: 1,
79335bd8deadSopenharmony_ci    allowedInText: true
79345bd8deadSopenharmony_ci}, function(context, args) {
79355bd8deadSopenharmony_ci    var body = args[0];
79365bd8deadSopenharmony_ci    return {
79375bd8deadSopenharmony_ci        type: context.funcName.slice(1),
79385bd8deadSopenharmony_ci        body: body
79395bd8deadSopenharmony_ci    };
79405bd8deadSopenharmony_ci});
79415bd8deadSopenharmony_ci
79425bd8deadSopenharmony_ci// Delimiter functions
79435bd8deadSopenharmony_civar checkDelimiter = function(delim, context) {
79445bd8deadSopenharmony_ci    if (utils.contains(delimiters, delim.value)) {
79455bd8deadSopenharmony_ci        return delim;
79465bd8deadSopenharmony_ci    } else {
79475bd8deadSopenharmony_ci        throw new ParseError(
79485bd8deadSopenharmony_ci            "Invalid delimiter: '" + delim.value + "' after '" +
79495bd8deadSopenharmony_ci            context.funcName + "'", delim);
79505bd8deadSopenharmony_ci    }
79515bd8deadSopenharmony_ci};
79525bd8deadSopenharmony_ci
79535bd8deadSopenharmony_cidefineFunction([
79545bd8deadSopenharmony_ci    "\\bigl", "\\Bigl", "\\biggl", "\\Biggl",
79555bd8deadSopenharmony_ci    "\\bigr", "\\Bigr", "\\biggr", "\\Biggr",
79565bd8deadSopenharmony_ci    "\\bigm", "\\Bigm", "\\biggm", "\\Biggm",
79575bd8deadSopenharmony_ci    "\\big",  "\\Big",  "\\bigg",  "\\Bigg"
79585bd8deadSopenharmony_ci], {
79595bd8deadSopenharmony_ci    numArgs: 1
79605bd8deadSopenharmony_ci}, function(context, args) {
79615bd8deadSopenharmony_ci    var delim = checkDelimiter(args[0], context);
79625bd8deadSopenharmony_ci
79635bd8deadSopenharmony_ci    return {
79645bd8deadSopenharmony_ci        type: "delimsizing",
79655bd8deadSopenharmony_ci        size: delimiterSizes[context.funcName].size,
79665bd8deadSopenharmony_ci        mclass: delimiterSizes[context.funcName].mclass,
79675bd8deadSopenharmony_ci        value: delim.value
79685bd8deadSopenharmony_ci    };
79695bd8deadSopenharmony_ci});
79705bd8deadSopenharmony_ci
79715bd8deadSopenharmony_cidefineFunction([
79725bd8deadSopenharmony_ci    "\\left", "\\right"
79735bd8deadSopenharmony_ci], {
79745bd8deadSopenharmony_ci    numArgs: 1
79755bd8deadSopenharmony_ci}, function(context, args) {
79765bd8deadSopenharmony_ci    var delim = checkDelimiter(args[0], context);
79775bd8deadSopenharmony_ci
79785bd8deadSopenharmony_ci    // \left and \right are caught somewhere in Parser.js, which is
79795bd8deadSopenharmony_ci    // why this data doesn't match what is in buildHTML.
79805bd8deadSopenharmony_ci    return {
79815bd8deadSopenharmony_ci        type: "leftright",
79825bd8deadSopenharmony_ci        value: delim.value
79835bd8deadSopenharmony_ci    };
79845bd8deadSopenharmony_ci});
79855bd8deadSopenharmony_ci
79865bd8deadSopenharmony_cidefineFunction("\\middle", {
79875bd8deadSopenharmony_ci    numArgs: 1
79885bd8deadSopenharmony_ci}, function(context, args) {
79895bd8deadSopenharmony_ci    var delim = checkDelimiter(args[0], context);
79905bd8deadSopenharmony_ci    if (!context.parser.leftrightDepth) {
79915bd8deadSopenharmony_ci        throw new ParseError("\\middle without preceding \\left", delim);
79925bd8deadSopenharmony_ci    }
79935bd8deadSopenharmony_ci
79945bd8deadSopenharmony_ci    return {
79955bd8deadSopenharmony_ci        type: "middle",
79965bd8deadSopenharmony_ci        value: delim.value
79975bd8deadSopenharmony_ci    };
79985bd8deadSopenharmony_ci});
79995bd8deadSopenharmony_ci
80005bd8deadSopenharmony_ci// Sizing functions (handled in Parser.js explicitly, hence no handler)
80015bd8deadSopenharmony_cidefineFunction([
80025bd8deadSopenharmony_ci    "\\tiny", "\\scriptsize", "\\footnotesize", "\\small",
80035bd8deadSopenharmony_ci    "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"
80045bd8deadSopenharmony_ci], 0, null);
80055bd8deadSopenharmony_ci
80065bd8deadSopenharmony_ci// Style changing functions (handled in Parser.js explicitly, hence no
80075bd8deadSopenharmony_ci// handler)
80085bd8deadSopenharmony_cidefineFunction([
80095bd8deadSopenharmony_ci    "\\displaystyle", "\\textstyle", "\\scriptstyle",
80105bd8deadSopenharmony_ci    "\\scriptscriptstyle"
80115bd8deadSopenharmony_ci], 0, null);
80125bd8deadSopenharmony_ci
80135bd8deadSopenharmony_cidefineFunction([
80145bd8deadSopenharmony_ci    // styles
80155bd8deadSopenharmony_ci    "\\mathrm", "\\mathit", "\\mathbf",
80165bd8deadSopenharmony_ci
80175bd8deadSopenharmony_ci    // families
80185bd8deadSopenharmony_ci    "\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf",
80195bd8deadSopenharmony_ci    "\\mathtt",
80205bd8deadSopenharmony_ci
80215bd8deadSopenharmony_ci    // aliases
80225bd8deadSopenharmony_ci    "\\Bbb", "\\bold", "\\frak"
80235bd8deadSopenharmony_ci], {
80245bd8deadSopenharmony_ci    numArgs: 1,
80255bd8deadSopenharmony_ci    greediness: 2
80265bd8deadSopenharmony_ci}, function(context, args) {
80275bd8deadSopenharmony_ci    var body = args[0];
80285bd8deadSopenharmony_ci    var func = context.funcName;
80295bd8deadSopenharmony_ci    if (func in fontAliases) {
80305bd8deadSopenharmony_ci        func = fontAliases[func];
80315bd8deadSopenharmony_ci    }
80325bd8deadSopenharmony_ci    return {
80335bd8deadSopenharmony_ci        type: "font",
80345bd8deadSopenharmony_ci        font: func.slice(1),
80355bd8deadSopenharmony_ci        body: body
80365bd8deadSopenharmony_ci    };
80375bd8deadSopenharmony_ci});
80385bd8deadSopenharmony_ci
80395bd8deadSopenharmony_ci// Accents
80405bd8deadSopenharmony_cidefineFunction([
80415bd8deadSopenharmony_ci    "\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve",
80425bd8deadSopenharmony_ci    "\\check", "\\hat", "\\vec", "\\dot"
80435bd8deadSopenharmony_ci    // We don't support expanding accents yet
80445bd8deadSopenharmony_ci    // "\\widetilde", "\\widehat"
80455bd8deadSopenharmony_ci], {
80465bd8deadSopenharmony_ci    numArgs: 1
80475bd8deadSopenharmony_ci}, function(context, args) {
80485bd8deadSopenharmony_ci    var base = args[0];
80495bd8deadSopenharmony_ci    return {
80505bd8deadSopenharmony_ci        type: "accent",
80515bd8deadSopenharmony_ci        accent: context.funcName,
80525bd8deadSopenharmony_ci        base: base
80535bd8deadSopenharmony_ci    };
80545bd8deadSopenharmony_ci});
80555bd8deadSopenharmony_ci
80565bd8deadSopenharmony_ci// Infix generalized fractions
80575bd8deadSopenharmony_cidefineFunction(["\\over", "\\choose", "\\atop"], {
80585bd8deadSopenharmony_ci    numArgs: 0,
80595bd8deadSopenharmony_ci    infix: true
80605bd8deadSopenharmony_ci}, function(context) {
80615bd8deadSopenharmony_ci    var replaceWith;
80625bd8deadSopenharmony_ci    switch (context.funcName) {
80635bd8deadSopenharmony_ci        case "\\over":
80645bd8deadSopenharmony_ci            replaceWith = "\\frac";
80655bd8deadSopenharmony_ci            break;
80665bd8deadSopenharmony_ci        case "\\choose":
80675bd8deadSopenharmony_ci            replaceWith = "\\binom";
80685bd8deadSopenharmony_ci            break;
80695bd8deadSopenharmony_ci        case "\\atop":
80705bd8deadSopenharmony_ci            replaceWith = "\\\\atopfrac";
80715bd8deadSopenharmony_ci            break;
80725bd8deadSopenharmony_ci        default:
80735bd8deadSopenharmony_ci            throw new Error("Unrecognized infix genfrac command");
80745bd8deadSopenharmony_ci    }
80755bd8deadSopenharmony_ci    return {
80765bd8deadSopenharmony_ci        type: "infix",
80775bd8deadSopenharmony_ci        replaceWith: replaceWith,
80785bd8deadSopenharmony_ci        token: context.token
80795bd8deadSopenharmony_ci    };
80805bd8deadSopenharmony_ci});
80815bd8deadSopenharmony_ci
80825bd8deadSopenharmony_ci// Row breaks for aligned data
80835bd8deadSopenharmony_cidefineFunction(["\\\\", "\\cr"], {
80845bd8deadSopenharmony_ci    numArgs: 0,
80855bd8deadSopenharmony_ci    numOptionalArgs: 1,
80865bd8deadSopenharmony_ci    argTypes: ["size"]
80875bd8deadSopenharmony_ci}, function(context, args) {
80885bd8deadSopenharmony_ci    var size = args[0];
80895bd8deadSopenharmony_ci    return {
80905bd8deadSopenharmony_ci        type: "cr",
80915bd8deadSopenharmony_ci        size: size
80925bd8deadSopenharmony_ci    };
80935bd8deadSopenharmony_ci});
80945bd8deadSopenharmony_ci
80955bd8deadSopenharmony_ci// Environment delimiters
80965bd8deadSopenharmony_cidefineFunction(["\\begin", "\\end"], {
80975bd8deadSopenharmony_ci    numArgs: 1,
80985bd8deadSopenharmony_ci    argTypes: ["text"]
80995bd8deadSopenharmony_ci}, function(context, args) {
81005bd8deadSopenharmony_ci    var nameGroup = args[0];
81015bd8deadSopenharmony_ci    if (nameGroup.type !== "ordgroup") {
81025bd8deadSopenharmony_ci        throw new ParseError("Invalid environment name", nameGroup);
81035bd8deadSopenharmony_ci    }
81045bd8deadSopenharmony_ci    var name = "";
81055bd8deadSopenharmony_ci    for (var i = 0; i < nameGroup.value.length; ++i) {
81065bd8deadSopenharmony_ci        name += nameGroup.value[i].value;
81075bd8deadSopenharmony_ci    }
81085bd8deadSopenharmony_ci    return {
81095bd8deadSopenharmony_ci        type: "environment",
81105bd8deadSopenharmony_ci        name: name,
81115bd8deadSopenharmony_ci        nameGroup: nameGroup
81125bd8deadSopenharmony_ci    };
81135bd8deadSopenharmony_ci});
81145bd8deadSopenharmony_ci
81155bd8deadSopenharmony_ci},{"./ParseError":6,"./parseData":21,"./utils":25}],20:[function(require,module,exports){
81165bd8deadSopenharmony_ci/**
81175bd8deadSopenharmony_ci * These objects store data about MathML nodes. This is the MathML equivalent
81185bd8deadSopenharmony_ci * of the types in domTree.js. Since MathML handles its own rendering, and
81195bd8deadSopenharmony_ci * since we're mainly using MathML to improve accessibility, we don't manage
81205bd8deadSopenharmony_ci * any of the styling state that the plain DOM nodes do.
81215bd8deadSopenharmony_ci *
81225bd8deadSopenharmony_ci * The `toNode` and `toMarkup` functions work simlarly to how they do in
81235bd8deadSopenharmony_ci * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.
81245bd8deadSopenharmony_ci */
81255bd8deadSopenharmony_ci
81265bd8deadSopenharmony_civar utils = require("./utils");
81275bd8deadSopenharmony_ci
81285bd8deadSopenharmony_ci/**
81295bd8deadSopenharmony_ci * This node represents a general purpose MathML node of any type. The
81305bd8deadSopenharmony_ci * constructor requires the type of node to create (for example, `"mo"` or
81315bd8deadSopenharmony_ci * `"mspace"`, corresponding to `<mo>` and `<mspace>` tags).
81325bd8deadSopenharmony_ci */
81335bd8deadSopenharmony_cifunction MathNode(type, children) {
81345bd8deadSopenharmony_ci    this.type = type;
81355bd8deadSopenharmony_ci    this.attributes = {};
81365bd8deadSopenharmony_ci    this.children = children || [];
81375bd8deadSopenharmony_ci}
81385bd8deadSopenharmony_ci
81395bd8deadSopenharmony_ci/**
81405bd8deadSopenharmony_ci * Sets an attribute on a MathML node. MathML depends on attributes to convey a
81415bd8deadSopenharmony_ci * semantic content, so this is used heavily.
81425bd8deadSopenharmony_ci */
81435bd8deadSopenharmony_ciMathNode.prototype.setAttribute = function(name, value) {
81445bd8deadSopenharmony_ci    this.attributes[name] = value;
81455bd8deadSopenharmony_ci};
81465bd8deadSopenharmony_ci
81475bd8deadSopenharmony_ci/**
81485bd8deadSopenharmony_ci * Converts the math node into a MathML-namespaced DOM element.
81495bd8deadSopenharmony_ci */
81505bd8deadSopenharmony_ciMathNode.prototype.toNode = function() {
81515bd8deadSopenharmony_ci    var node = document.createElementNS(
81525bd8deadSopenharmony_ci        "http://www.w3.org/1998/Math/MathML", this.type);
81535bd8deadSopenharmony_ci
81545bd8deadSopenharmony_ci    for (var attr in this.attributes) {
81555bd8deadSopenharmony_ci        if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
81565bd8deadSopenharmony_ci            node.setAttribute(attr, this.attributes[attr]);
81575bd8deadSopenharmony_ci        }
81585bd8deadSopenharmony_ci    }
81595bd8deadSopenharmony_ci
81605bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
81615bd8deadSopenharmony_ci        node.appendChild(this.children[i].toNode());
81625bd8deadSopenharmony_ci    }
81635bd8deadSopenharmony_ci
81645bd8deadSopenharmony_ci    return node;
81655bd8deadSopenharmony_ci};
81665bd8deadSopenharmony_ci
81675bd8deadSopenharmony_ci/**
81685bd8deadSopenharmony_ci * Converts the math node into an HTML markup string.
81695bd8deadSopenharmony_ci */
81705bd8deadSopenharmony_ciMathNode.prototype.toMarkup = function() {
81715bd8deadSopenharmony_ci    var markup = "<" + this.type;
81725bd8deadSopenharmony_ci
81735bd8deadSopenharmony_ci    // Add the attributes
81745bd8deadSopenharmony_ci    for (var attr in this.attributes) {
81755bd8deadSopenharmony_ci        if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
81765bd8deadSopenharmony_ci            markup += " " + attr + "=\"";
81775bd8deadSopenharmony_ci            markup += utils.escape(this.attributes[attr]);
81785bd8deadSopenharmony_ci            markup += "\"";
81795bd8deadSopenharmony_ci        }
81805bd8deadSopenharmony_ci    }
81815bd8deadSopenharmony_ci
81825bd8deadSopenharmony_ci    markup += ">";
81835bd8deadSopenharmony_ci
81845bd8deadSopenharmony_ci    for (var i = 0; i < this.children.length; i++) {
81855bd8deadSopenharmony_ci        markup += this.children[i].toMarkup();
81865bd8deadSopenharmony_ci    }
81875bd8deadSopenharmony_ci
81885bd8deadSopenharmony_ci    markup += "</" + this.type + ">";
81895bd8deadSopenharmony_ci
81905bd8deadSopenharmony_ci    return markup;
81915bd8deadSopenharmony_ci};
81925bd8deadSopenharmony_ci
81935bd8deadSopenharmony_ci/**
81945bd8deadSopenharmony_ci * This node represents a piece of text.
81955bd8deadSopenharmony_ci */
81965bd8deadSopenharmony_cifunction TextNode(text) {
81975bd8deadSopenharmony_ci    this.text = text;
81985bd8deadSopenharmony_ci}
81995bd8deadSopenharmony_ci
82005bd8deadSopenharmony_ci/**
82015bd8deadSopenharmony_ci * Converts the text node into a DOM text node.
82025bd8deadSopenharmony_ci */
82035bd8deadSopenharmony_ciTextNode.prototype.toNode = function() {
82045bd8deadSopenharmony_ci    return document.createTextNode(this.text);
82055bd8deadSopenharmony_ci};
82065bd8deadSopenharmony_ci
82075bd8deadSopenharmony_ci/**
82085bd8deadSopenharmony_ci * Converts the text node into HTML markup (which is just the text itself).
82095bd8deadSopenharmony_ci */
82105bd8deadSopenharmony_ciTextNode.prototype.toMarkup = function() {
82115bd8deadSopenharmony_ci    return utils.escape(this.text);
82125bd8deadSopenharmony_ci};
82135bd8deadSopenharmony_ci
82145bd8deadSopenharmony_cimodule.exports = {
82155bd8deadSopenharmony_ci    MathNode: MathNode,
82165bd8deadSopenharmony_ci    TextNode: TextNode
82175bd8deadSopenharmony_ci};
82185bd8deadSopenharmony_ci
82195bd8deadSopenharmony_ci},{"./utils":25}],21:[function(require,module,exports){
82205bd8deadSopenharmony_ci/**
82215bd8deadSopenharmony_ci * The resulting parse tree nodes of the parse tree.
82225bd8deadSopenharmony_ci *
82235bd8deadSopenharmony_ci * It is possible to provide position information, so that a ParseNode can
82245bd8deadSopenharmony_ci * fulfil a role similar to a Token in error reporting.
82255bd8deadSopenharmony_ci * For details on the corresponding properties see Token constructor.
82265bd8deadSopenharmony_ci * Providing such information can lead to better error reporting.
82275bd8deadSopenharmony_ci *
82285bd8deadSopenharmony_ci * @param {string}  type       type of node, like e.g. "ordgroup"
82295bd8deadSopenharmony_ci * @param {?object} value      type-specific representation of the node
82305bd8deadSopenharmony_ci * @param {string}  mode       parse mode in action for this node,
82315bd8deadSopenharmony_ci *                             "math" or "text"
82325bd8deadSopenharmony_ci * @param {Token=} firstToken  first token of the input for this node,
82335bd8deadSopenharmony_ci *                             will omit position information if unset
82345bd8deadSopenharmony_ci * @param {Token=} lastToken   last token of the input for this node,
82355bd8deadSopenharmony_ci *                             will default to firstToken if unset
82365bd8deadSopenharmony_ci */
82375bd8deadSopenharmony_cifunction ParseNode(type, value, mode, firstToken, lastToken) {
82385bd8deadSopenharmony_ci    this.type = type;
82395bd8deadSopenharmony_ci    this.value = value;
82405bd8deadSopenharmony_ci    this.mode = mode;
82415bd8deadSopenharmony_ci    if (firstToken && (!lastToken || lastToken.lexer === firstToken.lexer)) {
82425bd8deadSopenharmony_ci        this.lexer = firstToken.lexer;
82435bd8deadSopenharmony_ci        this.start = firstToken.start;
82445bd8deadSopenharmony_ci        this.end = (lastToken || firstToken).end;
82455bd8deadSopenharmony_ci    }
82465bd8deadSopenharmony_ci}
82475bd8deadSopenharmony_ci
82485bd8deadSopenharmony_cimodule.exports = {
82495bd8deadSopenharmony_ci    ParseNode: ParseNode
82505bd8deadSopenharmony_ci};
82515bd8deadSopenharmony_ci
82525bd8deadSopenharmony_ci
82535bd8deadSopenharmony_ci},{}],22:[function(require,module,exports){
82545bd8deadSopenharmony_ci/**
82555bd8deadSopenharmony_ci * Provides a single function for parsing an expression using a Parser
82565bd8deadSopenharmony_ci * TODO(emily): Remove this
82575bd8deadSopenharmony_ci */
82585bd8deadSopenharmony_ci
82595bd8deadSopenharmony_civar Parser = require("./Parser");
82605bd8deadSopenharmony_ci
82615bd8deadSopenharmony_ci/**
82625bd8deadSopenharmony_ci * Parses an expression using a Parser, then returns the parsed result.
82635bd8deadSopenharmony_ci */
82645bd8deadSopenharmony_civar parseTree = function(toParse, settings) {
82655bd8deadSopenharmony_ci    if (!(typeof toParse === 'string' || toParse instanceof String)) {
82665bd8deadSopenharmony_ci        throw new TypeError('KaTeX can only parse string typed expression');
82675bd8deadSopenharmony_ci    }
82685bd8deadSopenharmony_ci    var parser = new Parser(toParse, settings);
82695bd8deadSopenharmony_ci
82705bd8deadSopenharmony_ci    return parser.parse();
82715bd8deadSopenharmony_ci};
82725bd8deadSopenharmony_ci
82735bd8deadSopenharmony_cimodule.exports = parseTree;
82745bd8deadSopenharmony_ci
82755bd8deadSopenharmony_ci},{"./Parser":7}],23:[function(require,module,exports){
82765bd8deadSopenharmony_ci/**
82775bd8deadSopenharmony_ci * This file holds a list of all no-argument functions and single-character
82785bd8deadSopenharmony_ci * symbols (like 'a' or ';').
82795bd8deadSopenharmony_ci *
82805bd8deadSopenharmony_ci * For each of the symbols, there are three properties they can have:
82815bd8deadSopenharmony_ci * - font (required): the font to be used for this symbol. Either "main" (the
82825bd8deadSopenharmony_ci     normal font), or "ams" (the ams fonts).
82835bd8deadSopenharmony_ci * - group (required): the ParseNode group type the symbol should have (i.e.
82845bd8deadSopenharmony_ci     "textord", "mathord", etc).
82855bd8deadSopenharmony_ci     See https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types
82865bd8deadSopenharmony_ci * - replace: the character that this symbol or function should be
82875bd8deadSopenharmony_ci *   replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi
82885bd8deadSopenharmony_ci *   character in the main font).
82895bd8deadSopenharmony_ci *
82905bd8deadSopenharmony_ci * The outermost map in the table indicates what mode the symbols should be
82915bd8deadSopenharmony_ci * accepted in (e.g. "math" or "text").
82925bd8deadSopenharmony_ci */
82935bd8deadSopenharmony_ci
82945bd8deadSopenharmony_cimodule.exports = {
82955bd8deadSopenharmony_ci    math: {},
82965bd8deadSopenharmony_ci    text: {}
82975bd8deadSopenharmony_ci};
82985bd8deadSopenharmony_ci
82995bd8deadSopenharmony_cifunction defineSymbol(mode, font, group, replace, name) {
83005bd8deadSopenharmony_ci    module.exports[mode][name] = {
83015bd8deadSopenharmony_ci        font: font,
83025bd8deadSopenharmony_ci        group: group,
83035bd8deadSopenharmony_ci        replace: replace
83045bd8deadSopenharmony_ci    };
83055bd8deadSopenharmony_ci}
83065bd8deadSopenharmony_ci
83075bd8deadSopenharmony_ci// Some abbreviations for commonly used strings.
83085bd8deadSopenharmony_ci// This helps minify the code, and also spotting typos using jshint.
83095bd8deadSopenharmony_ci
83105bd8deadSopenharmony_ci// modes:
83115bd8deadSopenharmony_civar math = "math";
83125bd8deadSopenharmony_civar text = "text";
83135bd8deadSopenharmony_ci
83145bd8deadSopenharmony_ci// fonts:
83155bd8deadSopenharmony_civar main = "main";
83165bd8deadSopenharmony_civar ams = "ams";
83175bd8deadSopenharmony_ci
83185bd8deadSopenharmony_ci// groups:
83195bd8deadSopenharmony_civar accent = "accent";
83205bd8deadSopenharmony_civar bin = "bin";
83215bd8deadSopenharmony_civar close = "close";
83225bd8deadSopenharmony_civar inner = "inner";
83235bd8deadSopenharmony_civar mathord = "mathord";
83245bd8deadSopenharmony_civar op = "op";
83255bd8deadSopenharmony_civar open = "open";
83265bd8deadSopenharmony_civar punct = "punct";
83275bd8deadSopenharmony_civar rel = "rel";
83285bd8deadSopenharmony_civar spacing = "spacing";
83295bd8deadSopenharmony_civar textord = "textord";
83305bd8deadSopenharmony_ci
83315bd8deadSopenharmony_ci// Now comes the symbol table
83325bd8deadSopenharmony_ci
83335bd8deadSopenharmony_ci// Relation Symbols
83345bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2261", "\\equiv");
83355bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u227a", "\\prec");
83365bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u227b", "\\succ");
83375bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u223c", "\\sim");
83385bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22a5", "\\perp");
83395bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2aaf", "\\preceq");
83405bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2ab0", "\\succeq");
83415bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2243", "\\simeq");
83425bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2223", "\\mid");
83435bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u226a", "\\ll");
83445bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u226b", "\\gg");
83455bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u224d", "\\asymp");
83465bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2225", "\\parallel");
83475bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22c8", "\\bowtie");
83485bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2323", "\\smile");
83495bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2291", "\\sqsubseteq");
83505bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2292", "\\sqsupseteq");
83515bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2250", "\\doteq");
83525bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2322", "\\frown");
83535bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u220b", "\\ni");
83545bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u221d", "\\propto");
83555bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22a2", "\\vdash");
83565bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22a3", "\\dashv");
83575bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u220b", "\\owns");
83585bd8deadSopenharmony_ci
83595bd8deadSopenharmony_ci// Punctuation
83605bd8deadSopenharmony_cidefineSymbol(math, main, punct, "\u002e", "\\ldotp");
83615bd8deadSopenharmony_cidefineSymbol(math, main, punct, "\u22c5", "\\cdotp");
83625bd8deadSopenharmony_ci
83635bd8deadSopenharmony_ci// Misc Symbols
83645bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u0023", "\\#");
83655bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u0023", "\\#");
83665bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u0026", "\\&");
83675bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u0026", "\\&");
83685bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2135", "\\aleph");
83695bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2200", "\\forall");
83705bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u210f", "\\hbar");
83715bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2203", "\\exists");
83725bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2207", "\\nabla");
83735bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u266d", "\\flat");
83745bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2113", "\\ell");
83755bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u266e", "\\natural");
83765bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2663", "\\clubsuit");
83775bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2118", "\\wp");
83785bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u266f", "\\sharp");
83795bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2662", "\\diamondsuit");
83805bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u211c", "\\Re");
83815bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2661", "\\heartsuit");
83825bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2111", "\\Im");
83835bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2660", "\\spadesuit");
83845bd8deadSopenharmony_ci
83855bd8deadSopenharmony_ci// Math and Text
83865bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2020", "\\dag");
83875bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2021", "\\ddag");
83885bd8deadSopenharmony_ci
83895bd8deadSopenharmony_ci// Large Delimiters
83905bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u23b1", "\\rmoustache");
83915bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u23b0", "\\lmoustache");
83925bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u27ef", "\\rgroup");
83935bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u27ee", "\\lgroup");
83945bd8deadSopenharmony_ci
83955bd8deadSopenharmony_ci// Binary Operators
83965bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2213", "\\mp");
83975bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2296", "\\ominus");
83985bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u228e", "\\uplus");
83995bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2293", "\\sqcap");
84005bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2217", "\\ast");
84015bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2294", "\\sqcup");
84025bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u25ef", "\\bigcirc");
84035bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2219", "\\bullet");
84045bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2021", "\\ddagger");
84055bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2240", "\\wr");
84065bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2a3f", "\\amalg");
84075bd8deadSopenharmony_ci
84085bd8deadSopenharmony_ci// Arrow Symbols
84095bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27f5", "\\longleftarrow");
84105bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d0", "\\Leftarrow");
84115bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27f8", "\\Longleftarrow");
84125bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27f6", "\\longrightarrow");
84135bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d2", "\\Rightarrow");
84145bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27f9", "\\Longrightarrow");
84155bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2194", "\\leftrightarrow");
84165bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27f7", "\\longleftrightarrow");
84175bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d4", "\\Leftrightarrow");
84185bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27fa", "\\Longleftrightarrow");
84195bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21a6", "\\mapsto");
84205bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u27fc", "\\longmapsto");
84215bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2197", "\\nearrow");
84225bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21a9", "\\hookleftarrow");
84235bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21aa", "\\hookrightarrow");
84245bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2198", "\\searrow");
84255bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21bc", "\\leftharpoonup");
84265bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21c0", "\\rightharpoonup");
84275bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2199", "\\swarrow");
84285bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21bd", "\\leftharpoondown");
84295bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown");
84305bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2196", "\\nwarrow");
84315bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons");
84325bd8deadSopenharmony_ci
84335bd8deadSopenharmony_ci// AMS Negated Binary Relations
84345bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u226e", "\\nless");
84355bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue010", "\\nleqslant");
84365bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue011", "\\nleqq");
84375bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a87", "\\lneq");
84385bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2268", "\\lneqq");
84395bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue00c", "\\lvertneqq");
84405bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e6", "\\lnsim");
84415bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a89", "\\lnapprox");
84425bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2280", "\\nprec");
84435bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e0", "\\npreceq");
84445bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e8", "\\precnsim");
84455bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox");
84465bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2241", "\\nsim");
84475bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue006", "\\nshortmid");
84485bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2224", "\\nmid");
84495bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ac", "\\nvdash");
84505bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ad", "\\nvDash");
84515bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft");
84525bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq");
84535bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u228a", "\\subsetneq");
84545bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue01a", "\\varsubsetneq");
84555bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq");
84565bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue017", "\\varsubsetneqq");
84575bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u226f", "\\ngtr");
84585bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue00f", "\\ngeqslant");
84595bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue00e", "\\ngeqq");
84605bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a88", "\\gneq");
84615bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2269", "\\gneqq");
84625bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue00d", "\\gvertneqq");
84635bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e7", "\\gnsim");
84645bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox");
84655bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2281", "\\nsucc");
84665bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e1", "\\nsucceq");
84675bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22e9", "\\succnsim");
84685bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2aba", "\\succnapprox");
84695bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2246", "\\ncong");
84705bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue007", "\\nshortparallel");
84715bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2226", "\\nparallel");
84725bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22af", "\\nVDash");
84735bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright");
84745bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq");
84755bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue018", "\\nsupseteqq");
84765bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u228b", "\\supsetneq");
84775bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue01b", "\\varsupsetneq");
84785bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq");
84795bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue019", "\\varsupsetneqq");
84805bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22ae", "\\nVdash");
84815bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ab5", "\\precneqq");
84825bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ab6", "\\succneqq");
84835bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\ue016", "\\nsubseteqq");
84845bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22b4", "\\unlhd");
84855bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22b5", "\\unrhd");
84865bd8deadSopenharmony_ci
84875bd8deadSopenharmony_ci// AMS Negated Arrows
84885bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u219a", "\\nleftarrow");
84895bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u219b", "\\nrightarrow");
84905bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21cd", "\\nLeftarrow");
84915bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21cf", "\\nRightarrow");
84925bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ae", "\\nleftrightarrow");
84935bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ce", "\\nLeftrightarrow");
84945bd8deadSopenharmony_ci
84955bd8deadSopenharmony_ci// AMS Misc
84965bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u25b3", "\\vartriangle");
84975bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u210f", "\\hslash");
84985bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25bd", "\\triangledown");
84995bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25ca", "\\lozenge");
85005bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u24c8", "\\circledS");
85015bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u00ae", "\\circledR");
85025bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2221", "\\measuredangle");
85035bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2204", "\\nexists");
85045bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2127", "\\mho");
85055bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2132", "\\Finv");
85065bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2141", "\\Game");
85075bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u006b", "\\Bbbk");
85085bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2035", "\\backprime");
85095bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle");
85105bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown");
85115bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25a0", "\\blacksquare");
85125bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge");
85135bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2605", "\\bigstar");
85145bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2222", "\\sphericalangle");
85155bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2201", "\\complement");
85165bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u00f0", "\\eth");
85175bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2571", "\\diagup");
85185bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2572", "\\diagdown");
85195bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25a1", "\\square");
85205bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25a1", "\\Box");
85215bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u25ca", "\\Diamond");
85225bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u00a5", "\\yen");
85235bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2713", "\\checkmark");
85245bd8deadSopenharmony_ci
85255bd8deadSopenharmony_ci// AMS Hebrew
85265bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2136", "\\beth");
85275bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2138", "\\daleth");
85285bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2137", "\\gimel");
85295bd8deadSopenharmony_ci
85305bd8deadSopenharmony_ci// AMS Greek
85315bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u03dd", "\\digamma");
85325bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u03f0", "\\varkappa");
85335bd8deadSopenharmony_ci
85345bd8deadSopenharmony_ci// AMS Delimiters
85355bd8deadSopenharmony_cidefineSymbol(math, ams, open, "\u250c", "\\ulcorner");
85365bd8deadSopenharmony_cidefineSymbol(math, ams, close, "\u2510", "\\urcorner");
85375bd8deadSopenharmony_cidefineSymbol(math, ams, open, "\u2514", "\\llcorner");
85385bd8deadSopenharmony_cidefineSymbol(math, ams, close, "\u2518", "\\lrcorner");
85395bd8deadSopenharmony_ci
85405bd8deadSopenharmony_ci// AMS Binary Relations
85415bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2266", "\\leqq");
85425bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a7d", "\\leqslant");
85435bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a95", "\\eqslantless");
85445bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2272", "\\lesssim");
85455bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a85", "\\lessapprox");
85465bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u224a", "\\approxeq");
85475bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d6", "\\lessdot");
85485bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d8", "\\lll");
85495bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2276", "\\lessgtr");
85505bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr");
85515bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr");
85525bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2251", "\\doteqdot");
85535bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2253", "\\risingdotseq");
85545bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq");
85555bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u223d", "\\backsim");
85565bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22cd", "\\backsimeq");
85575bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ac5", "\\subseteqq");
85585bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d0", "\\Subset");
85595bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u228f", "\\sqsubset");
85605bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u227c", "\\preccurlyeq");
85615bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22de", "\\curlyeqprec");
85625bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u227e", "\\precsim");
85635bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ab7", "\\precapprox");
85645bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22b2", "\\vartriangleleft");
85655bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22b4", "\\trianglelefteq");
85665bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22a8", "\\vDash");
85675bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22aa", "\\Vvdash");
85685bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2323", "\\smallsmile");
85695bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2322", "\\smallfrown");
85705bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u224f", "\\bumpeq");
85715bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u224e", "\\Bumpeq");
85725bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2267", "\\geqq");
85735bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a7e", "\\geqslant");
85745bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a96", "\\eqslantgtr");
85755bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2273", "\\gtrsim");
85765bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a86", "\\gtrapprox");
85775bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d7", "\\gtrdot");
85785bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d9", "\\ggg");
85795bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2277", "\\gtrless");
85805bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22db", "\\gtreqless");
85815bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2a8c", "\\gtreqqless");
85825bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2256", "\\eqcirc");
85835bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2257", "\\circeq");
85845bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u225c", "\\triangleq");
85855bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u223c", "\\thicksim");
85865bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2248", "\\thickapprox");
85875bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ac6", "\\supseteqq");
85885bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d1", "\\Supset");
85895bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2290", "\\sqsupset");
85905bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u227d", "\\succcurlyeq");
85915bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22df", "\\curlyeqsucc");
85925bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u227f", "\\succsim");
85935bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2ab8", "\\succapprox");
85945bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22b3", "\\vartriangleright");
85955bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22b5", "\\trianglerighteq");
85965bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22a9", "\\Vdash");
85975bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2223", "\\shortmid");
85985bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2225", "\\shortparallel");
85995bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u226c", "\\between");
86005bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d4", "\\pitchfork");
86015bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u221d", "\\varpropto");
86025bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u25c0", "\\blacktriangleleft");
86035bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2234", "\\therefore");
86045bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u220d", "\\backepsilon");
86055bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u25b6", "\\blacktriangleright");
86065bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2235", "\\because");
86075bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d8", "\\llless");
86085bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22d9", "\\gggtr");
86095bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22b2", "\\lhd");
86105bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22b3", "\\rhd");
86115bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2242", "\\eqsim");
86125bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22c8", "\\Join");
86135bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2251", "\\Doteq");
86145bd8deadSopenharmony_ci
86155bd8deadSopenharmony_ci// AMS Binary Operators
86165bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u2214", "\\dotplus");
86175bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u2216", "\\smallsetminus");
86185bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d2", "\\Cap");
86195bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d3", "\\Cup");
86205bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u2a5e", "\\doublebarwedge");
86215bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u229f", "\\boxminus");
86225bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u229e", "\\boxplus");
86235bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22c7", "\\divideontimes");
86245bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22c9", "\\ltimes");
86255bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22ca", "\\rtimes");
86265bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22cb", "\\leftthreetimes");
86275bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22cc", "\\rightthreetimes");
86285bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22cf", "\\curlywedge");
86295bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22ce", "\\curlyvee");
86305bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u229d", "\\circleddash");
86315bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u229b", "\\circledast");
86325bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22c5", "\\centerdot");
86335bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22ba", "\\intercal");
86345bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d2", "\\doublecap");
86355bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22d3", "\\doublecup");
86365bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22a0", "\\boxtimes");
86375bd8deadSopenharmony_ci
86385bd8deadSopenharmony_ci// AMS Arrows
86395bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21e2", "\\dashrightarrow");
86405bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21e0", "\\dashleftarrow");
86415bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c7", "\\leftleftarrows");
86425bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c6", "\\leftrightarrows");
86435bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21da", "\\Lleftarrow");
86445bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u219e", "\\twoheadleftarrow");
86455bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21a2", "\\leftarrowtail");
86465bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ab", "\\looparrowleft");
86475bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21cb", "\\leftrightharpoons");
86485bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21b6", "\\curvearrowleft");
86495bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ba", "\\circlearrowleft");
86505bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21b0", "\\Lsh");
86515bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c8", "\\upuparrows");
86525bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21bf", "\\upharpoonleft");
86535bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c3", "\\downharpoonleft");
86545bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u22b8", "\\multimap");
86555bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ad", "\\leftrightsquigarrow");
86565bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c9", "\\rightrightarrows");
86575bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c4", "\\rightleftarrows");
86585bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21a0", "\\twoheadrightarrow");
86595bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21a3", "\\rightarrowtail");
86605bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ac", "\\looparrowright");
86615bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21b7", "\\curvearrowright");
86625bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21bb", "\\circlearrowright");
86635bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21b1", "\\Rsh");
86645bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21ca", "\\downdownarrows");
86655bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21be", "\\upharpoonright");
86665bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21c2", "\\downharpoonright");
86675bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21dd", "\\rightsquigarrow");
86685bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21dd", "\\leadsto");
86695bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21db", "\\Rrightarrow");
86705bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u21be", "\\restriction");
86715bd8deadSopenharmony_ci
86725bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2018", "`");
86735bd8deadSopenharmony_cidefineSymbol(math, main, textord, "$", "\\$");
86745bd8deadSopenharmony_cidefineSymbol(text, main, textord, "$", "\\$");
86755bd8deadSopenharmony_cidefineSymbol(math, main, textord, "%", "\\%");
86765bd8deadSopenharmony_cidefineSymbol(text, main, textord, "%", "\\%");
86775bd8deadSopenharmony_cidefineSymbol(math, main, textord, "_", "\\_");
86785bd8deadSopenharmony_cidefineSymbol(text, main, textord, "_", "\\_");
86795bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2220", "\\angle");
86805bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u221e", "\\infty");
86815bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2032", "\\prime");
86825bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u25b3", "\\triangle");
86835bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u0393", "\\Gamma");
86845bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u0394", "\\Delta");
86855bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u0398", "\\Theta");
86865bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u039b", "\\Lambda");
86875bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u039e", "\\Xi");
86885bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a0", "\\Pi");
86895bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a3", "\\Sigma");
86905bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a5", "\\Upsilon");
86915bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a6", "\\Phi");
86925bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a8", "\\Psi");
86935bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u03a9", "\\Omega");
86945bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u00ac", "\\neg");
86955bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u00ac", "\\lnot");
86965bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u22a4", "\\top");
86975bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u22a5", "\\bot");
86985bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2205", "\\emptyset");
86995bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2205", "\\varnothing");
87005bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b1", "\\alpha");
87015bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b2", "\\beta");
87025bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b3", "\\gamma");
87035bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b4", "\\delta");
87045bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03f5", "\\epsilon");
87055bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b6", "\\zeta");
87065bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b7", "\\eta");
87075bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b8", "\\theta");
87085bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b9", "\\iota");
87095bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03ba", "\\kappa");
87105bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03bb", "\\lambda");
87115bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03bc", "\\mu");
87125bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03bd", "\\nu");
87135bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03be", "\\xi");
87145bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "o", "\\omicron");
87155bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c0", "\\pi");
87165bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c1", "\\rho");
87175bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c3", "\\sigma");
87185bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c4", "\\tau");
87195bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c5", "\\upsilon");
87205bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03d5", "\\phi");
87215bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c7", "\\chi");
87225bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c8", "\\psi");
87235bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c9", "\\omega");
87245bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03b5", "\\varepsilon");
87255bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03d1", "\\vartheta");
87265bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03d6", "\\varpi");
87275bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03f1", "\\varrho");
87285bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c2", "\\varsigma");
87295bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u03c6", "\\varphi");
87305bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2217", "*");
87315bd8deadSopenharmony_cidefineSymbol(math, main, bin, "+", "+");
87325bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2212", "-");
87335bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u22c5", "\\cdot");
87345bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2218", "\\circ");
87355bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u00f7", "\\div");
87365bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u00b1", "\\pm");
87375bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u00d7", "\\times");
87385bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2229", "\\cap");
87395bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u222a", "\\cup");
87405bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2216", "\\setminus");
87415bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2227", "\\land");
87425bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2228", "\\lor");
87435bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2227", "\\wedge");
87445bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2228", "\\vee");
87455bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u221a", "\\surd");
87465bd8deadSopenharmony_cidefineSymbol(math, main, open, "(", "(");
87475bd8deadSopenharmony_cidefineSymbol(math, main, open, "[", "[");
87485bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u27e8", "\\langle");
87495bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u2223", "\\lvert");
87505bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u2225", "\\lVert");
87515bd8deadSopenharmony_cidefineSymbol(math, main, close, ")", ")");
87525bd8deadSopenharmony_cidefineSymbol(math, main, close, "]", "]");
87535bd8deadSopenharmony_cidefineSymbol(math, main, close, "?", "?");
87545bd8deadSopenharmony_cidefineSymbol(math, main, close, "!", "!");
87555bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u27e9", "\\rangle");
87565bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u2223", "\\rvert");
87575bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u2225", "\\rVert");
87585bd8deadSopenharmony_cidefineSymbol(math, main, rel, "=", "=");
87595bd8deadSopenharmony_cidefineSymbol(math, main, rel, "<", "<");
87605bd8deadSopenharmony_cidefineSymbol(math, main, rel, ">", ">");
87615bd8deadSopenharmony_cidefineSymbol(math, main, rel, ":", ":");
87625bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2248", "\\approx");
87635bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2245", "\\cong");
87645bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2265", "\\ge");
87655bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2265", "\\geq");
87665bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2190", "\\gets");
87675bd8deadSopenharmony_cidefineSymbol(math, main, rel, ">", "\\gt");
87685bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2208", "\\in");
87695bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2209", "\\notin");
87705bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2282", "\\subset");
87715bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2283", "\\supset");
87725bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2286", "\\subseteq");
87735bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2287", "\\supseteq");
87745bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2288", "\\nsubseteq");
87755bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2289", "\\nsupseteq");
87765bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u22a8", "\\models");
87775bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2190", "\\leftarrow");
87785bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2264", "\\le");
87795bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2264", "\\leq");
87805bd8deadSopenharmony_cidefineSymbol(math, main, rel, "<", "\\lt");
87815bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2260", "\\ne");
87825bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2260", "\\neq");
87835bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2192", "\\rightarrow");
87845bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2192", "\\to");
87855bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2271", "\\ngeq");
87865bd8deadSopenharmony_cidefineSymbol(math, ams, rel, "\u2270", "\\nleq");
87875bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\!");
87885bd8deadSopenharmony_cidefineSymbol(math, main, spacing, "\u00a0", "\\ ");
87895bd8deadSopenharmony_cidefineSymbol(math, main, spacing, "\u00a0", "~");
87905bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\,");
87915bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\:");
87925bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\;");
87935bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\enspace");
87945bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\qquad");
87955bd8deadSopenharmony_cidefineSymbol(math, main, spacing, null, "\\quad");
87965bd8deadSopenharmony_cidefineSymbol(math, main, spacing, "\u00a0", "\\space");
87975bd8deadSopenharmony_cidefineSymbol(math, main, punct, ",", ",");
87985bd8deadSopenharmony_cidefineSymbol(math, main, punct, ";", ";");
87995bd8deadSopenharmony_cidefineSymbol(math, main, punct, ":", "\\colon");
88005bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22bc", "\\barwedge");
88015bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22bb", "\\veebar");
88025bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2299", "\\odot");
88035bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2295", "\\oplus");
88045bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2297", "\\otimes");
88055bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2202", "\\partial");
88065bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2298", "\\oslash");
88075bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u229a", "\\circledcirc");
88085bd8deadSopenharmony_cidefineSymbol(math, ams, bin, "\u22a1", "\\boxdot");
88095bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u25b3", "\\bigtriangleup");
88105bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u25bd", "\\bigtriangledown");
88115bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u2020", "\\dagger");
88125bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u22c4", "\\diamond");
88135bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u22c6", "\\star");
88145bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u25c3", "\\triangleleft");
88155bd8deadSopenharmony_cidefineSymbol(math, main, bin, "\u25b9", "\\triangleright");
88165bd8deadSopenharmony_cidefineSymbol(math, main, open, "{", "\\{");
88175bd8deadSopenharmony_cidefineSymbol(text, main, textord, "{", "\\{");
88185bd8deadSopenharmony_cidefineSymbol(math, main, close, "}", "\\}");
88195bd8deadSopenharmony_cidefineSymbol(text, main, textord, "}", "\\}");
88205bd8deadSopenharmony_cidefineSymbol(math, main, open, "{", "\\lbrace");
88215bd8deadSopenharmony_cidefineSymbol(math, main, close, "}", "\\rbrace");
88225bd8deadSopenharmony_cidefineSymbol(math, main, open, "[", "\\lbrack");
88235bd8deadSopenharmony_cidefineSymbol(math, main, close, "]", "\\rbrack");
88245bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u230a", "\\lfloor");
88255bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u230b", "\\rfloor");
88265bd8deadSopenharmony_cidefineSymbol(math, main, open, "\u2308", "\\lceil");
88275bd8deadSopenharmony_cidefineSymbol(math, main, close, "\u2309", "\\rceil");
88285bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\\", "\\backslash");
88295bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2223", "|");
88305bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2223", "\\vert");
88315bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2225", "\\|");
88325bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u2225", "\\Vert");
88335bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2191", "\\uparrow");
88345bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d1", "\\Uparrow");
88355bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2193", "\\downarrow");
88365bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d3", "\\Downarrow");
88375bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u2195", "\\updownarrow");
88385bd8deadSopenharmony_cidefineSymbol(math, main, rel, "\u21d5", "\\Updownarrow");
88395bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2210", "\\coprod");
88405bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u22c1", "\\bigvee");
88415bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u22c0", "\\bigwedge");
88425bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2a04", "\\biguplus");
88435bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u22c2", "\\bigcap");
88445bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u22c3", "\\bigcup");
88455bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222b", "\\int");
88465bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222b", "\\intop");
88475bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222c", "\\iint");
88485bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222d", "\\iiint");
88495bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u220f", "\\prod");
88505bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2211", "\\sum");
88515bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2a02", "\\bigotimes");
88525bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2a01", "\\bigoplus");
88535bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2a00", "\\bigodot");
88545bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222e", "\\oint");
88555bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u2a06", "\\bigsqcup");
88565bd8deadSopenharmony_cidefineSymbol(math, math, op, "\u222b", "\\smallint");
88575bd8deadSopenharmony_cidefineSymbol(text, main, inner, "\u2026", "\\textellipsis");
88585bd8deadSopenharmony_cidefineSymbol(math, main, inner, "\u2026", "\\mathellipsis");
88595bd8deadSopenharmony_cidefineSymbol(text, main, inner, "\u2026", "\\ldots");
88605bd8deadSopenharmony_cidefineSymbol(math, main, inner, "\u2026", "\\ldots");
88615bd8deadSopenharmony_cidefineSymbol(math, main, inner, "\u22ef", "\\cdots");
88625bd8deadSopenharmony_cidefineSymbol(math, main, inner, "\u22f1", "\\ddots");
88635bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u22ee", "\\vdots");
88645bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u00b4", "\\acute");
88655bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u0060", "\\grave");
88665bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u00a8", "\\ddot");
88675bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u007e", "\\tilde");
88685bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u00af", "\\bar");
88695bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u02d8", "\\breve");
88705bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u02c7", "\\check");
88715bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u005e", "\\hat");
88725bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u20d7", "\\vec");
88735bd8deadSopenharmony_cidefineSymbol(math, main, accent, "\u02d9", "\\dot");
88745bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u0131", "\\imath");
88755bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u0237", "\\jmath");
88765bd8deadSopenharmony_ci
88775bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2013", "--");
88785bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2014", "---");
88795bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2018", "`");
88805bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2019", "'");
88815bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u201c", "``");
88825bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u201d", "''");
88835bd8deadSopenharmony_cidefineSymbol(math, main, textord, "\u00b0", "\\degree");
88845bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u00b0", "\\degree");
88855bd8deadSopenharmony_cidefineSymbol(math, main, mathord, "\u00a3", "\\pounds");
88865bd8deadSopenharmony_cidefineSymbol(math, ams, textord, "\u2720", "\\maltese");
88875bd8deadSopenharmony_cidefineSymbol(text, ams, textord, "\u2720", "\\maltese");
88885bd8deadSopenharmony_ci
88895bd8deadSopenharmony_cidefineSymbol(text, main, spacing, "\u00a0", "\\ ");
88905bd8deadSopenharmony_cidefineSymbol(text, main, spacing, "\u00a0", " ");
88915bd8deadSopenharmony_cidefineSymbol(text, main, spacing, "\u00a0", "~");
88925bd8deadSopenharmony_ci
88935bd8deadSopenharmony_ci// There are lots of symbols which are the same, so we add them in afterwards.
88945bd8deadSopenharmony_civar i;
88955bd8deadSopenharmony_civar ch;
88965bd8deadSopenharmony_ci
88975bd8deadSopenharmony_ci// All of these are textords in math mode
88985bd8deadSopenharmony_civar mathTextSymbols = "0123456789/@.\"";
88995bd8deadSopenharmony_cifor (i = 0; i < mathTextSymbols.length; i++) {
89005bd8deadSopenharmony_ci    ch = mathTextSymbols.charAt(i);
89015bd8deadSopenharmony_ci    defineSymbol(math, main, textord, ch, ch);
89025bd8deadSopenharmony_ci}
89035bd8deadSopenharmony_ci
89045bd8deadSopenharmony_ci// All of these are textords in text mode
89055bd8deadSopenharmony_civar textSymbols = "0123456789!@*()-=+[]\";:?/.,";
89065bd8deadSopenharmony_cifor (i = 0; i < textSymbols.length; i++) {
89075bd8deadSopenharmony_ci    ch = textSymbols.charAt(i);
89085bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89095bd8deadSopenharmony_ci}
89105bd8deadSopenharmony_ci
89115bd8deadSopenharmony_ci// All of these are textords in text mode, and mathords in math mode
89125bd8deadSopenharmony_civar letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
89135bd8deadSopenharmony_cifor (i = 0; i < letters.length; i++) {
89145bd8deadSopenharmony_ci    ch = letters.charAt(i);
89155bd8deadSopenharmony_ci    defineSymbol(math, main, mathord, ch, ch);
89165bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89175bd8deadSopenharmony_ci}
89185bd8deadSopenharmony_ci
89195bd8deadSopenharmony_ci// Latin-1 letters
89205bd8deadSopenharmony_cifor (i = 0x00C0; i <= 0x00D6; i++) {
89215bd8deadSopenharmony_ci    ch = String.fromCharCode(i);
89225bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89235bd8deadSopenharmony_ci}
89245bd8deadSopenharmony_ci
89255bd8deadSopenharmony_cifor (i = 0x00D8; i <= 0x00F6; i++) {
89265bd8deadSopenharmony_ci    ch = String.fromCharCode(i);
89275bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89285bd8deadSopenharmony_ci}
89295bd8deadSopenharmony_ci
89305bd8deadSopenharmony_cifor (i = 0x00F8; i <= 0x00FF; i++) {
89315bd8deadSopenharmony_ci    ch = String.fromCharCode(i);
89325bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89335bd8deadSopenharmony_ci}
89345bd8deadSopenharmony_ci
89355bd8deadSopenharmony_ci// Cyrillic
89365bd8deadSopenharmony_cifor (i = 0x0410; i <= 0x044F; i++) {
89375bd8deadSopenharmony_ci    ch = String.fromCharCode(i);
89385bd8deadSopenharmony_ci    defineSymbol(text, main, textord, ch, ch);
89395bd8deadSopenharmony_ci}
89405bd8deadSopenharmony_ci
89415bd8deadSopenharmony_ci// Unicode versions of existing characters
89425bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2013", "–");
89435bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2014", "—");
89445bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2018", "‘");
89455bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u2019", "’");
89465bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u201c", "“");
89475bd8deadSopenharmony_cidefineSymbol(text, main, textord, "\u201d", "”");
89485bd8deadSopenharmony_ci
89495bd8deadSopenharmony_ci},{}],24:[function(require,module,exports){
89505bd8deadSopenharmony_civar hangulRegex = /[\uAC00-\uD7AF]/;
89515bd8deadSopenharmony_ci
89525bd8deadSopenharmony_ci// This regex combines
89535bd8deadSopenharmony_ci// - Hiragana: [\u3040-\u309F]
89545bd8deadSopenharmony_ci// - Katakana: [\u30A0-\u30FF]
89555bd8deadSopenharmony_ci// - CJK ideograms: [\u4E00-\u9FAF]
89565bd8deadSopenharmony_ci// - Hangul syllables: [\uAC00-\uD7AF]
89575bd8deadSopenharmony_ci// Notably missing are halfwidth Katakana and Romanji glyphs.
89585bd8deadSopenharmony_civar cjkRegex =
89595bd8deadSopenharmony_ci    /[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/;
89605bd8deadSopenharmony_ci
89615bd8deadSopenharmony_cimodule.exports = {
89625bd8deadSopenharmony_ci    cjkRegex: cjkRegex,
89635bd8deadSopenharmony_ci    hangulRegex: hangulRegex
89645bd8deadSopenharmony_ci};
89655bd8deadSopenharmony_ci
89665bd8deadSopenharmony_ci},{}],25:[function(require,module,exports){
89675bd8deadSopenharmony_ci/**
89685bd8deadSopenharmony_ci * This file contains a list of utility functions which are useful in other
89695bd8deadSopenharmony_ci * files.
89705bd8deadSopenharmony_ci */
89715bd8deadSopenharmony_ci
89725bd8deadSopenharmony_ci/**
89735bd8deadSopenharmony_ci * Provide an `indexOf` function which works in IE8, but defers to native if
89745bd8deadSopenharmony_ci * possible.
89755bd8deadSopenharmony_ci */
89765bd8deadSopenharmony_civar nativeIndexOf = Array.prototype.indexOf;
89775bd8deadSopenharmony_civar indexOf = function(list, elem) {
89785bd8deadSopenharmony_ci    if (list == null) {
89795bd8deadSopenharmony_ci        return -1;
89805bd8deadSopenharmony_ci    }
89815bd8deadSopenharmony_ci    if (nativeIndexOf && list.indexOf === nativeIndexOf) {
89825bd8deadSopenharmony_ci        return list.indexOf(elem);
89835bd8deadSopenharmony_ci    }
89845bd8deadSopenharmony_ci    var i = 0;
89855bd8deadSopenharmony_ci    var l = list.length;
89865bd8deadSopenharmony_ci    for (; i < l; i++) {
89875bd8deadSopenharmony_ci        if (list[i] === elem) {
89885bd8deadSopenharmony_ci            return i;
89895bd8deadSopenharmony_ci        }
89905bd8deadSopenharmony_ci    }
89915bd8deadSopenharmony_ci    return -1;
89925bd8deadSopenharmony_ci};
89935bd8deadSopenharmony_ci
89945bd8deadSopenharmony_ci/**
89955bd8deadSopenharmony_ci * Return whether an element is contained in a list
89965bd8deadSopenharmony_ci */
89975bd8deadSopenharmony_civar contains = function(list, elem) {
89985bd8deadSopenharmony_ci    return indexOf(list, elem) !== -1;
89995bd8deadSopenharmony_ci};
90005bd8deadSopenharmony_ci
90015bd8deadSopenharmony_ci/**
90025bd8deadSopenharmony_ci * Provide a default value if a setting is undefined
90035bd8deadSopenharmony_ci */
90045bd8deadSopenharmony_civar deflt = function(setting, defaultIfUndefined) {
90055bd8deadSopenharmony_ci    return setting === undefined ? defaultIfUndefined : setting;
90065bd8deadSopenharmony_ci};
90075bd8deadSopenharmony_ci
90085bd8deadSopenharmony_ci// hyphenate and escape adapted from Facebook's React under Apache 2 license
90095bd8deadSopenharmony_ci
90105bd8deadSopenharmony_civar uppercase = /([A-Z])/g;
90115bd8deadSopenharmony_civar hyphenate = function(str) {
90125bd8deadSopenharmony_ci    return str.replace(uppercase, "-$1").toLowerCase();
90135bd8deadSopenharmony_ci};
90145bd8deadSopenharmony_ci
90155bd8deadSopenharmony_civar ESCAPE_LOOKUP = {
90165bd8deadSopenharmony_ci    "&": "&amp;",
90175bd8deadSopenharmony_ci    ">": "&gt;",
90185bd8deadSopenharmony_ci    "<": "&lt;",
90195bd8deadSopenharmony_ci    "\"": "&quot;",
90205bd8deadSopenharmony_ci    "'": "&#x27;"
90215bd8deadSopenharmony_ci};
90225bd8deadSopenharmony_ci
90235bd8deadSopenharmony_civar ESCAPE_REGEX = /[&><"']/g;
90245bd8deadSopenharmony_ci
90255bd8deadSopenharmony_cifunction escaper(match) {
90265bd8deadSopenharmony_ci    return ESCAPE_LOOKUP[match];
90275bd8deadSopenharmony_ci}
90285bd8deadSopenharmony_ci
90295bd8deadSopenharmony_ci/**
90305bd8deadSopenharmony_ci * Escapes text to prevent scripting attacks.
90315bd8deadSopenharmony_ci *
90325bd8deadSopenharmony_ci * @param {*} text Text value to escape.
90335bd8deadSopenharmony_ci * @return {string} An escaped string.
90345bd8deadSopenharmony_ci */
90355bd8deadSopenharmony_cifunction escape(text) {
90365bd8deadSopenharmony_ci    return ("" + text).replace(ESCAPE_REGEX, escaper);
90375bd8deadSopenharmony_ci}
90385bd8deadSopenharmony_ci
90395bd8deadSopenharmony_ci/**
90405bd8deadSopenharmony_ci * A function to set the text content of a DOM element in all supported
90415bd8deadSopenharmony_ci * browsers. Note that we don't define this if there is no document.
90425bd8deadSopenharmony_ci */
90435bd8deadSopenharmony_civar setTextContent;
90445bd8deadSopenharmony_ciif (typeof document !== "undefined") {
90455bd8deadSopenharmony_ci    var testNode = document.createElement("span");
90465bd8deadSopenharmony_ci    if ("textContent" in testNode) {
90475bd8deadSopenharmony_ci        setTextContent = function(node, text) {
90485bd8deadSopenharmony_ci            node.textContent = text;
90495bd8deadSopenharmony_ci        };
90505bd8deadSopenharmony_ci    } else {
90515bd8deadSopenharmony_ci        setTextContent = function(node, text) {
90525bd8deadSopenharmony_ci            node.innerText = text;
90535bd8deadSopenharmony_ci        };
90545bd8deadSopenharmony_ci    }
90555bd8deadSopenharmony_ci}
90565bd8deadSopenharmony_ci
90575bd8deadSopenharmony_ci/**
90585bd8deadSopenharmony_ci * A function to clear a node.
90595bd8deadSopenharmony_ci */
90605bd8deadSopenharmony_cifunction clearNode(node) {
90615bd8deadSopenharmony_ci    setTextContent(node, "");
90625bd8deadSopenharmony_ci}
90635bd8deadSopenharmony_ci
90645bd8deadSopenharmony_cimodule.exports = {
90655bd8deadSopenharmony_ci    contains: contains,
90665bd8deadSopenharmony_ci    deflt: deflt,
90675bd8deadSopenharmony_ci    escape: escape,
90685bd8deadSopenharmony_ci    hyphenate: hyphenate,
90695bd8deadSopenharmony_ci    indexOf: indexOf,
90705bd8deadSopenharmony_ci    setTextContent: setTextContent,
90715bd8deadSopenharmony_ci    clearNode: clearNode
90725bd8deadSopenharmony_ci};
90735bd8deadSopenharmony_ci
90745bd8deadSopenharmony_ci},{}]},{},[1])(1)
90755bd8deadSopenharmony_ci});