{"version":3,"sources":["webpack:///./node_modules/katex/src/domTree.js","webpack:///./node_modules/katex/src/mathMLTree.js","webpack:///./node_modules/katex/src/functions.js","webpack:///./node_modules/katex/src/environments.js","webpack:///./node_modules/katex/src/parseData.js","webpack:///./node_modules/katex/src/fontMetrics.js","webpack:///./node_modules/katex/src/parseTree.js"],"names":["utils","createClass","classes","slice","i","length","splice","join","span","children","height","depth","maxFontSize","style","this","attributes","documentFragment","symbolNode","value","italic","skew","prototype","setAttribute","attribute","toNode","document","createElement","className","Object","hasOwnProperty","call","attr","appendChild","toMarkup","markup","escape","styles","hyphenate","frag","createDocumentFragment","node","createTextNode","marginRight","needsSpan","escaped","module","exports","MathNode","type","TextNode","text","name","createElementNS","ParseError","defineFunction","names","props","handler","numArgs","data","argTypes","greediness","undefined","allowedInText","numOptionalArgs","context","args","index","body","inner","color","shift","width","delimiterSizes","size","delimiters","fontAliases","atoms","funcName","limits","symbol","hasBarLine","numer","denom","leftDelim","rightDelim","Error","delim","contains","lexer","positions","delimType","func","font","base","accent","replaceWith","nameGroup","namepos","fontMetrics","parseData","ParseNode","parseArray","parser","result","row","rowGaps","cell","parseExpression","push","mode","next","nextToken","consume","pos","Math","min","_input","cr","parseFunction","defineEnvironment","colalign","map","cols","ca","indexOf","align","separator","res","hskipBeforeAndAfter","envName","left","right","arraystretch","pregap","postgap","metrics","quad","emptyGroup","numCols","forEach","unshift","Style","sigma5","sigma6","sigma8","sigma9","sigma10","sigma11","sigma12","sigma13","sigma14","sigma15","sigma16","sigma17","sigma18","sigma19","sigma20","sigma21","sigma21Script","sigma21ScriptScript","sigma22","xi8","xi9","xi10","xi11","xi12","xi13","ptPerEm","doubleRuleSep","xHeight","num1","num2","num3","denom1","denom2","sup1","sup2","sup3","sub1","sub2","supDrop","subDrop","axisHeight","defaultRuleThickness","bigOpSpacing1","bigOpSpacing2","bigOpSpacing3","bigOpSpacing4","bigOpSpacing5","emPerEx","delim1","getDelim2","TEXT","SCRIPT","SCRIPTSCRIPT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AOsF,EAEX,MAAM,IAAI1E,MAAM,0BAA4BzE,EAAM6D,QAQtD0H,EAAY,EAAQ,QASpBC,EAAsB,SAASC,EAAWzL,GAC1C,IAAI2H,EAAU4D,EAAUvL,GAAOyL,EAAUC,WAAW,IACpD,GAAI/D,EACA,MAAO,CACH7H,MAAO6H,EAAQ,GACf9H,OAAQ8H,EAAQ,GAChBrH,OAAQqH,EAAQ,GAChBpH,KAAMoH,EAAQ,GACdhE,MAAOgE,EAAQ,KAK3B3F,EAAOC,QAAU,CACb0F,QAASA,EACT6D,oBAAqBA,I,qBC5IzB,IAAIG,EAAS,EAAQ,QAKjBC,EAAY,SAASC,EAASC,GAC9B,IAAIpG,EAAS,IAAIiG,EAAOE,EAASC,GAEjC,OAAOpG,EAAOqG,SAGlB/J,EAAOC,QAAU2J","file":"js/chunk-104ee6be.f4fb22d8.js","sourcesContent":["/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n */\n\nvar utils = require(\"./utils\");\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove null or empty classes.\n */\nvar createClass = function(classes) {\n classes = classes.slice();\n for (var i = classes.length - 1; i >= 0; i--) {\n if (!classes[i]) {\n classes.splice(i, 1);\n }\n }\n\n return classes.join(\" \");\n};\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style. It also contains information about its height, depth, and\n * maxFontSize.\n */\nfunction span(classes, children, height, depth, maxFontSize, style) {\n this.classes = classes || [];\n this.children = children || [];\n this.height = height || 0;\n this.depth = depth || 0;\n this.maxFontSize = maxFontSize || 0;\n this.style = style || {};\n this.attributes = {};\n}\n\n/**\n * Sets an arbitrary attribute on the span. Warning: use this wisely. Not all\n * browsers support attributes the same, and having too many custom attributes\n * is probably bad.\n */\nspan.prototype.setAttribute = function(attribute, value) {\n this.attributes[attribute] = value;\n};\n\n/**\n * Convert the span into an HTML node\n */\nspan.prototype.toNode = function() {\n var span = document.createElement(\"span\");\n\n // Apply the class\n span.className = createClass(this.classes);\n\n // Apply inline styles\n for (var style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style)) {\n span.style[style] = this.style[style];\n }\n }\n\n // Apply attributes\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n span.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n // Append the children, also as HTML nodes\n for (var i = 0; i < this.children.length; i++) {\n span.appendChild(this.children[i].toNode());\n }\n\n return span;\n};\n\n/**\n * Convert the span into an HTML markup string\n */\nspan.prototype.toMarkup = function() {\n var markup = \"\";\n\n // Add the markup of the children, also as markup\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n\n return markup;\n};\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. Thus, it only\n * contains children and doesn't have any HTML properties. It also keeps track\n * of a height, depth, and maxFontSize.\n */\nfunction documentFragment(children, height, depth, maxFontSize) {\n this.children = children || [];\n this.height = height || 0;\n this.depth = depth || 0;\n this.maxFontSize = maxFontSize || 0;\n}\n\n/**\n * Convert the fragment into a node\n */\ndocumentFragment.prototype.toNode = function() {\n // Create a fragment\n var frag = document.createDocumentFragment();\n\n // Append the children\n for (var i = 0; i < this.children.length; i++) {\n frag.appendChild(this.children[i].toNode());\n }\n\n return frag;\n};\n\n/**\n * Convert the fragment into HTML markup\n */\ndocumentFragment.prototype.toMarkup = function() {\n var markup = \"\";\n\n // Simply concatenate the markup for the children together\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n return markup;\n};\n\n/**\n * A symbol node contains information about a single symbol. It either renders\n * to a single text node, or a span with a single text node in it, depending on\n * whether it has CSS classes, styles, or needs italic correction.\n */\nfunction symbolNode(value, height, depth, italic, skew, classes, style) {\n this.value = value || \"\";\n this.height = height || 0;\n this.depth = depth || 0;\n this.italic = italic || 0;\n this.skew = skew || 0;\n this.classes = classes || [];\n this.style = style || {};\n this.maxFontSize = 0;\n}\n\n/**\n * Creates a text node or span from a symbol node. Note that a span is only\n * created if it is needed.\n */\nsymbolNode.prototype.toNode = function() {\n var node = document.createTextNode(this.value);\n var span = null;\n\n if (this.italic > 0) {\n span = document.createElement(\"span\");\n span.style.marginRight = this.italic + \"em\";\n }\n\n if (this.classes.length > 0) {\n span = span || document.createElement(\"span\");\n span.className = createClass(this.classes);\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n span = span || document.createElement(\"span\");\n span.style[style] = this.style[style];\n }\n }\n\n if (span) {\n span.appendChild(node);\n return span;\n } else {\n return node;\n }\n};\n\n/**\n * Creates markup for a symbol node.\n */\nsymbolNode.prototype.toMarkup = function() {\n // TODO(alpert): More duplication than I'd like from\n // span.prototype.toMarkup and symbolNode.prototype.toNode...\n var needsSpan = false;\n\n var markup = \" 0) {\n styles += \"margin-right:\" + this.italic + \"em;\";\n }\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n needsSpan = true;\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n }\n\n var escaped = utils.escape(this.value);\n if (needsSpan) {\n markup += \">\";\n markup += escaped;\n markup += \"\";\n return markup;\n } else {\n return escaped;\n }\n};\n\nmodule.exports = {\n span: span,\n documentFragment: documentFragment,\n symbolNode: symbolNode,\n};\n","/**\n * These objects store data about MathML nodes. This is the MathML equivalent\n * of the types in domTree.js. Since MathML handles its own rendering, and\n * since we're mainly using MathML to improve accessibility, we don't manage\n * any of the styling state that the plain DOM nodes do.\n *\n * The `toNode` and `toMarkup` functions work simlarly to how they do in\n * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.\n */\n\nvar utils = require(\"./utils\");\n\n/**\n * This node represents a general purpose MathML node of any type. The\n * constructor requires the type of node to create (for example, `\"mo\"` or\n * `\"mspace\"`, corresponding to `` and `` tags).\n */\nfunction MathNode(type, children) {\n this.type = type;\n this.attributes = {};\n this.children = children || [];\n}\n\n/**\n * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n * semantic content, so this is used heavily.\n */\nMathNode.prototype.setAttribute = function(name, value) {\n this.attributes[name] = value;\n};\n\n/**\n * Converts the math node into a MathML-namespaced DOM element.\n */\nMathNode.prototype.toNode = function() {\n var node = document.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\", this.type);\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n};\n\n/**\n * Converts the math node into an HTML markup string.\n */\nMathNode.prototype.toMarkup = function() {\n var markup = \"<\" + this.type;\n\n // Add the attributes\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n markup += \" \" + attr + \"=\\\"\";\n markup += utils.escape(this.attributes[attr]);\n markup += \"\\\"\";\n }\n }\n\n markup += \">\";\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n\n return markup;\n};\n\n/**\n * This node represents a piece of text.\n */\nfunction TextNode(text) {\n this.text = text;\n}\n\n/**\n * Converts the text node into a DOM text node.\n */\nTextNode.prototype.toNode = function() {\n return document.createTextNode(this.text);\n};\n\n/**\n * Converts the text node into HTML markup (which is just the text itself).\n */\nTextNode.prototype.toMarkup = function() {\n return utils.escape(this.text);\n};\n\nmodule.exports = {\n MathNode: MathNode,\n TextNode: TextNode,\n};\n","var utils = require(\"./utils\");\nvar ParseError = require(\"./ParseError\");\n\n/* This file contains a list of functions that we parse, identified by\n * the calls to defineFunction.\n *\n * The first argument to defineFunction is a single name or a list of names.\n * All functions named in such a list will share a single implementation.\n *\n * Each declared function can have associated properties, which\n * include the following:\n *\n * - numArgs: The number of arguments the function takes.\n * If this is the only property, it can be passed as a number\n * instead of an element of a properties object.\n * - argTypes: (optional) An array corresponding to each argument of the\n * function, giving the type of argument that should be parsed. Its\n * length should be equal to `numArgs + numOptionalArgs`. Valid\n * types:\n * - \"size\": A size-like thing, such as \"1em\" or \"5ex\"\n * - \"color\": An html color, like \"#abc\" or \"blue\"\n * - \"original\": The same type as the environment that the\n * function being parsed is in (e.g. used for the\n * bodies of functions like \\color where the first\n * argument is special and the second argument is\n * parsed normally)\n * Other possible types (probably shouldn't be used)\n * - \"text\": Text-like (e.g. \\text)\n * - \"math\": Normal math\n * If undefined, this will be treated as an appropriate length\n * array of \"original\" strings\n * - greediness: (optional) The greediness of the function to use ungrouped\n * arguments.\n *\n * E.g. if you have an expression\n * \\sqrt \\frac 1 2\n * since \\frac has greediness=2 vs \\sqrt's greediness=1, \\frac\n * will use the two arguments '1' and '2' as its two arguments,\n * then that whole function will be used as the argument to\n * \\sqrt. On the other hand, the expressions\n * \\frac \\frac 1 2 3\n * and\n * \\frac \\sqrt 1 2\n * will fail because \\frac and \\frac have equal greediness\n * and \\sqrt has a lower greediness than \\frac respectively. To\n * make these parse, we would have to change them to:\n * \\frac {\\frac 1 2} 3\n * and\n * \\frac {\\sqrt 1} 2\n *\n * The default value is `1`\n * - allowedInText: (optional) Whether or not the function is allowed inside\n * text mode (default false)\n * - numOptionalArgs: (optional) The number of optional arguments the function\n * should parse. If the optional arguments aren't found,\n * `null` will be passed to the handler in their place.\n * (default 0)\n *\n * The last argument is that implementation, the handler for the function(s).\n * It is called to handle these functions and their arguments.\n * It receives two arguments:\n * - context contains information and references provided by the parser\n * - args is an array of arguments obtained from TeX input\n * The context contains the following properties:\n * - funcName: the text (i.e. name) of the function, including \\\n * - parser: the parser object\n * - lexer: the lexer object\n * - positions: the positions in the overall string of the function\n * and the arguments.\n * The latter three should only be used to produce error messages.\n *\n * The function should return an object with the following keys:\n * - type: The type of element that this is. This is then used in\n * buildHTML/buildMathML to determine which function\n * should be called to build this node into a DOM node\n * Any other data can be added to the object, which will be passed\n * in to the function in buildHTML/buildMathML as `group.value`.\n */\n\nfunction defineFunction(names, props, handler) {\n if (typeof names === \"string\") {\n names = [names];\n }\n if (typeof props === \"number\") {\n props = { numArgs: props };\n }\n // Set default values of functions\n var data = {\n numArgs: props.numArgs,\n argTypes: props.argTypes,\n greediness: (props.greediness === undefined) ? 1 : props.greediness,\n allowedInText: !!props.allowedInText,\n numOptionalArgs: props.numOptionalArgs || 0,\n handler: handler,\n };\n for (var i = 0; i < names.length; ++i) {\n module.exports[names[i]] = data;\n }\n}\n\n// A normal square root\ndefineFunction(\"\\\\sqrt\", {\n numArgs: 1,\n numOptionalArgs: 1,\n}, function(context, args) {\n var index = args[0];\n var body = args[1];\n return {\n type: \"sqrt\",\n body: body,\n index: index,\n };\n});\n\n// Some non-mathy text\ndefineFunction(\"\\\\text\", {\n numArgs: 1,\n argTypes: [\"text\"],\n greediness: 2,\n}, function(context, args) {\n var body = args[0];\n // Since the corresponding buildHTML/buildMathML function expects a\n // list of elements, we normalize for different kinds of arguments\n // TODO(emily): maybe this should be done somewhere else\n var inner;\n if (body.type === \"ordgroup\") {\n inner = body.value;\n } else {\n inner = [body];\n }\n\n return {\n type: \"text\",\n body: inner,\n };\n});\n\n// A two-argument custom color\ndefineFunction(\"\\\\color\", {\n numArgs: 2,\n allowedInText: true,\n greediness: 3,\n argTypes: [\"color\", \"original\"],\n}, function(context, args) {\n var color = args[0];\n var body = args[1];\n // Normalize the different kinds of bodies (see \\text above)\n var inner;\n if (body.type === \"ordgroup\") {\n inner = body.value;\n } else {\n inner = [body];\n }\n\n return {\n type: \"color\",\n color: color.value,\n value: inner,\n };\n});\n\n// An overline\ndefineFunction(\"\\\\overline\", {\n numArgs: 1,\n}, function(context, args) {\n var body = args[0];\n return {\n type: \"overline\",\n body: body,\n };\n});\n\n// An underline\ndefineFunction(\"\\\\underline\", {\n numArgs: 1,\n}, function(context, args) {\n var body = args[0];\n return {\n type: \"underline\",\n body: body,\n };\n});\n\n// A box of the width and height\ndefineFunction(\"\\\\rule\", {\n numArgs: 2,\n numOptionalArgs: 1,\n argTypes: [\"size\", \"size\", \"size\"],\n}, function(context, args) {\n var shift = args[0];\n var width = args[1];\n var height = args[2];\n return {\n type: \"rule\",\n shift: shift && shift.value,\n width: width.value,\n height: height.value,\n };\n});\n\n// A KaTeX logo\ndefineFunction(\"\\\\KaTeX\", {\n numArgs: 0,\n}, function(context) {\n return {\n type: \"katex\",\n };\n});\n\ndefineFunction(\"\\\\phantom\", {\n numArgs: 1,\n}, function(context, args) {\n var body = args[0];\n var inner;\n if (body.type === \"ordgroup\") {\n inner = body.value;\n } else {\n inner = [body];\n }\n\n return {\n type: \"phantom\",\n value: inner,\n };\n});\n\n// Extra data needed for the delimiter handler down below\nvar delimiterSizes = {\n \"\\\\bigl\" : {type: \"open\", size: 1},\n \"\\\\Bigl\" : {type: \"open\", size: 2},\n \"\\\\biggl\": {type: \"open\", size: 3},\n \"\\\\Biggl\": {type: \"open\", size: 4},\n \"\\\\bigr\" : {type: \"close\", size: 1},\n \"\\\\Bigr\" : {type: \"close\", size: 2},\n \"\\\\biggr\": {type: \"close\", size: 3},\n \"\\\\Biggr\": {type: \"close\", size: 4},\n \"\\\\bigm\" : {type: \"rel\", size: 1},\n \"\\\\Bigm\" : {type: \"rel\", size: 2},\n \"\\\\biggm\": {type: \"rel\", size: 3},\n \"\\\\Biggm\": {type: \"rel\", size: 4},\n \"\\\\big\" : {type: \"textord\", size: 1},\n \"\\\\Big\" : {type: \"textord\", size: 2},\n \"\\\\bigg\" : {type: \"textord\", size: 3},\n \"\\\\Bigg\" : {type: \"textord\", size: 4},\n};\n\nvar delimiters = [\n \"(\", \")\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\",\n \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\",\n \"\\\\lfloor\", \"\\\\rfloor\", \"\\\\lceil\", \"\\\\rceil\",\n \"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"\\\\lt\", \"\\\\gt\",\n \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\",\n \"\\\\lgroup\", \"\\\\rgroup\", \"\\\\lmoustache\", \"\\\\rmoustache\",\n \"/\", \"\\\\backslash\",\n \"|\", \"\\\\vert\", \"\\\\|\", \"\\\\Vert\",\n \"\\\\uparrow\", \"\\\\Uparrow\",\n \"\\\\downarrow\", \"\\\\Downarrow\",\n \"\\\\updownarrow\", \"\\\\Updownarrow\",\n \".\",\n];\n\nvar fontAliases = {\n \"\\\\Bbb\": \"\\\\mathbb\",\n \"\\\\bold\": \"\\\\mathbf\",\n \"\\\\frak\": \"\\\\mathfrak\",\n};\n\n// Single-argument color functions\ndefineFunction([\n \"\\\\blue\", \"\\\\orange\", \"\\\\pink\", \"\\\\red\",\n \"\\\\green\", \"\\\\gray\", \"\\\\purple\",\n \"\\\\blueA\", \"\\\\blueB\", \"\\\\blueC\", \"\\\\blueD\", \"\\\\blueE\",\n \"\\\\tealA\", \"\\\\tealB\", \"\\\\tealC\", \"\\\\tealD\", \"\\\\tealE\",\n \"\\\\greenA\", \"\\\\greenB\", \"\\\\greenC\", \"\\\\greenD\", \"\\\\greenE\",\n \"\\\\goldA\", \"\\\\goldB\", \"\\\\goldC\", \"\\\\goldD\", \"\\\\goldE\",\n \"\\\\redA\", \"\\\\redB\", \"\\\\redC\", \"\\\\redD\", \"\\\\redE\",\n \"\\\\maroonA\", \"\\\\maroonB\", \"\\\\maroonC\", \"\\\\maroonD\", \"\\\\maroonE\",\n \"\\\\purpleA\", \"\\\\purpleB\", \"\\\\purpleC\", \"\\\\purpleD\", \"\\\\purpleE\",\n \"\\\\mintA\", \"\\\\mintB\", \"\\\\mintC\",\n \"\\\\grayA\", \"\\\\grayB\", \"\\\\grayC\", \"\\\\grayD\", \"\\\\grayE\",\n \"\\\\grayF\", \"\\\\grayG\", \"\\\\grayH\", \"\\\\grayI\",\n \"\\\\kaBlue\", \"\\\\kaGreen\",\n], {\n numArgs: 1,\n allowedInText: true,\n greediness: 3,\n}, function(context, args) {\n var body = args[0];\n var atoms;\n if (body.type === \"ordgroup\") {\n atoms = body.value;\n } else {\n atoms = [body];\n }\n\n return {\n type: \"color\",\n color: \"katex-\" + context.funcName.slice(1),\n value: atoms,\n };\n});\n\n// There are 2 flags for operators; whether they produce limits in\n// displaystyle, and whether they are symbols and should grow in\n// displaystyle. These four groups cover the four possible choices.\n\n// No limits, not symbols\ndefineFunction([\n \"\\\\arcsin\", \"\\\\arccos\", \"\\\\arctan\", \"\\\\arg\", \"\\\\cos\", \"\\\\cosh\",\n \"\\\\cot\", \"\\\\coth\", \"\\\\csc\", \"\\\\deg\", \"\\\\dim\", \"\\\\exp\", \"\\\\hom\",\n \"\\\\ker\", \"\\\\lg\", \"\\\\ln\", \"\\\\log\", \"\\\\sec\", \"\\\\sin\", \"\\\\sinh\",\n \"\\\\tan\", \"\\\\tanh\",\n], {\n numArgs: 0,\n}, function(context) {\n return {\n type: \"op\",\n limits: false,\n symbol: false,\n body: context.funcName,\n };\n});\n\n// Limits, not symbols\ndefineFunction([\n \"\\\\det\", \"\\\\gcd\", \"\\\\inf\", \"\\\\lim\", \"\\\\liminf\", \"\\\\limsup\", \"\\\\max\",\n \"\\\\min\", \"\\\\Pr\", \"\\\\sup\",\n], {\n numArgs: 0,\n}, function(context) {\n return {\n type: \"op\",\n limits: true,\n symbol: false,\n body: context.funcName,\n };\n});\n\n// No limits, symbols\ndefineFunction([\n \"\\\\int\", \"\\\\iint\", \"\\\\iiint\", \"\\\\oint\",\n], {\n numArgs: 0,\n}, function(context) {\n return {\n type: \"op\",\n limits: false,\n symbol: true,\n body: context.funcName,\n };\n});\n\n// Limits, symbols\ndefineFunction([\n \"\\\\coprod\", \"\\\\bigvee\", \"\\\\bigwedge\", \"\\\\biguplus\", \"\\\\bigcap\",\n \"\\\\bigcup\", \"\\\\intop\", \"\\\\prod\", \"\\\\sum\", \"\\\\bigotimes\",\n \"\\\\bigoplus\", \"\\\\bigodot\", \"\\\\bigsqcup\", \"\\\\smallint\",\n], {\n numArgs: 0,\n}, function(context) {\n return {\n type: \"op\",\n limits: true,\n symbol: true,\n body: context.funcName,\n };\n});\n\n// Fractions\ndefineFunction([\n \"\\\\dfrac\", \"\\\\frac\", \"\\\\tfrac\",\n \"\\\\dbinom\", \"\\\\binom\", \"\\\\tbinom\",\n], {\n numArgs: 2,\n greediness: 2,\n}, function(context, args) {\n var numer = args[0];\n var denom = args[1];\n var hasBarLine;\n var leftDelim = null;\n var rightDelim = null;\n var size = \"auto\";\n\n switch (context.funcName) {\n case \"\\\\dfrac\":\n case \"\\\\frac\":\n case \"\\\\tfrac\":\n hasBarLine = true;\n break;\n case \"\\\\dbinom\":\n case \"\\\\binom\":\n case \"\\\\tbinom\":\n hasBarLine = false;\n leftDelim = \"(\";\n rightDelim = \")\";\n break;\n default:\n throw new Error(\"Unrecognized genfrac command\");\n }\n\n switch (context.funcName) {\n case \"\\\\dfrac\":\n case \"\\\\dbinom\":\n size = \"display\";\n break;\n case \"\\\\tfrac\":\n case \"\\\\tbinom\":\n size = \"text\";\n break;\n }\n\n return {\n type: \"genfrac\",\n numer: numer,\n denom: denom,\n hasBarLine: hasBarLine,\n leftDelim: leftDelim,\n rightDelim: rightDelim,\n size: size,\n };\n});\n\n// Left and right overlap functions\ndefineFunction([\"\\\\llap\", \"\\\\rlap\"], {\n numArgs: 1,\n allowedInText: true,\n}, function(context, args) {\n var body = args[0];\n return {\n type: context.funcName.slice(1),\n body: body,\n };\n});\n\n// Delimiter functions\ndefineFunction([\n \"\\\\bigl\", \"\\\\Bigl\", \"\\\\biggl\", \"\\\\Biggl\",\n \"\\\\bigr\", \"\\\\Bigr\", \"\\\\biggr\", \"\\\\Biggr\",\n \"\\\\bigm\", \"\\\\Bigm\", \"\\\\biggm\", \"\\\\Biggm\",\n \"\\\\big\", \"\\\\Big\", \"\\\\bigg\", \"\\\\Bigg\",\n \"\\\\left\", \"\\\\right\",\n], {\n numArgs: 1,\n}, function(context, args) {\n var delim = args[0];\n if (!utils.contains(delimiters, delim.value)) {\n throw new ParseError(\n \"Invalid delimiter: '\" + delim.value + \"' after '\" +\n context.funcName + \"'\",\n context.lexer, context.positions[1]);\n }\n\n // \\left and \\right are caught somewhere in Parser.js, which is\n // why this data doesn't match what is in buildHTML.\n if (context.funcName === \"\\\\left\" || context.funcName === \"\\\\right\") {\n return {\n type: \"leftright\",\n value: delim.value,\n };\n } else {\n return {\n type: \"delimsizing\",\n size: delimiterSizes[context.funcName].size,\n delimType: delimiterSizes[context.funcName].type,\n value: delim.value,\n };\n }\n});\n\n// Sizing functions (handled in Parser.js explicitly, hence no handler)\ndefineFunction([\n \"\\\\tiny\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\",\n \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\",\n], 0, null);\n\n// Style changing functions (handled in Parser.js explicitly, hence no\n// handler)\ndefineFunction([\n \"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\",\n \"\\\\scriptscriptstyle\",\n], 0, null);\n\ndefineFunction([\n // styles\n \"\\\\mathrm\", \"\\\\mathit\", \"\\\\mathbf\",\n\n // families\n \"\\\\mathbb\", \"\\\\mathcal\", \"\\\\mathfrak\", \"\\\\mathscr\", \"\\\\mathsf\",\n \"\\\\mathtt\",\n\n // aliases\n \"\\\\Bbb\", \"\\\\bold\", \"\\\\frak\",\n], {\n numArgs: 1,\n greediness: 2,\n}, function(context, args) {\n var body = args[0];\n var func = context.funcName;\n if (func in fontAliases) {\n func = fontAliases[func];\n }\n return {\n type: \"font\",\n font: func.slice(1),\n body: body,\n };\n});\n\n// Accents\ndefineFunction([\n \"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\",\n \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\",\n // We don't support expanding accents yet\n // \"\\\\widetilde\", \"\\\\widehat\"\n], {\n numArgs: 1,\n}, function(context, args) {\n var base = args[0];\n return {\n type: \"accent\",\n accent: context.funcName,\n base: base,\n };\n});\n\n// Infix generalized fractions\ndefineFunction([\"\\\\over\", \"\\\\choose\"], {\n numArgs: 0,\n}, function(context) {\n var replaceWith;\n switch (context.funcName) {\n case \"\\\\over\":\n replaceWith = \"\\\\frac\";\n break;\n case \"\\\\choose\":\n replaceWith = \"\\\\binom\";\n break;\n default:\n throw new Error(\"Unrecognized infix genfrac command\");\n }\n return {\n type: \"infix\",\n replaceWith: replaceWith,\n };\n});\n\n// Row breaks for aligned data\ndefineFunction([\"\\\\\\\\\", \"\\\\cr\"], {\n numArgs: 0,\n numOptionalArgs: 1,\n argTypes: [\"size\"],\n}, function(context, args) {\n var size = args[0];\n return {\n type: \"cr\",\n size: size,\n };\n});\n\n// Environment delimiters\ndefineFunction([\"\\\\begin\", \"\\\\end\"], {\n numArgs: 1,\n argTypes: [\"text\"],\n}, function(context, args) {\n var nameGroup = args[0];\n if (nameGroup.type !== \"ordgroup\") {\n throw new ParseError(\n \"Invalid environment name\",\n context.lexer, context.positions[1]);\n }\n var name = \"\";\n for (var i = 0; i < nameGroup.value.length; ++i) {\n name += nameGroup.value[i].value;\n }\n return {\n type: \"environment\",\n name: name,\n namepos: context.positions[1],\n };\n});\n","/* eslint no-constant-condition:0 */\nvar fontMetrics = require(\"./fontMetrics\");\nvar parseData = require(\"./parseData\");\nvar ParseError = require(\"./ParseError\");\n\nvar ParseNode = parseData.ParseNode;\n\n/**\n * Parse the body of the environment, with rows delimited by \\\\ and\n * columns delimited by &, and create a nested list in row-major order\n * with one group per cell.\n */\nfunction parseArray(parser, result) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n var cell = parser.parseExpression(false, null);\n row.push(new ParseNode(\"ordgroup\", cell, parser.mode));\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n // TODO: Clean up the following hack once #385 got merged\n var pos = Math.min(parser.pos + 1, parser.lexer._input.length);\n throw new ParseError(\"Expected & or \\\\\\\\ or \\\\end\",\n parser.lexer, pos);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new ParseNode(result.type, result, parser.mode);\n}\n\n/*\n * An environment definition is very similar to a function definition:\n * it is declared with a name or a list of names, a set of properties\n * and a handler containing the actual implementation.\n *\n * The properties include:\n * - numArgs: The number of arguments after the \\begin{name} function.\n * - argTypes: (optional) Just like for a function\n * - allowedInText: (optional) Whether or not the environment is allowed inside\n * text mode (default false) (not enforced yet)\n * - numOptionalArgs: (optional) Just like for a function\n * A bare number instead of that object indicates the numArgs value.\n *\n * The handler function will receive two arguments\n * - context: information and references provided by the parser\n * - args: an array of arguments passed to \\begin{name}\n * The context contains the following properties:\n * - envName: the name of the environment, one of the listed names.\n * - parser: the parser object\n * - lexer: the lexer object\n * - positions: the positions associated with these arguments from args.\n * The handler must return a ParseResult.\n */\n\nfunction defineEnvironment(names, props, handler) {\n if (typeof names === \"string\") {\n names = [names];\n }\n if (typeof props === \"number\") {\n props = { numArgs: props };\n }\n // Set default values of environments\n var data = {\n numArgs: props.numArgs || 0,\n argTypes: props.argTypes,\n greediness: 1,\n allowedInText: !!props.allowedInText,\n numOptionalArgs: props.numOptionalArgs || 0,\n handler: handler,\n };\n for (var i = 0; i < names.length; ++i) {\n module.exports[names[i]] = data;\n }\n}\n\n// Arrays are part of LaTeX, defined in lttab.dtx so its documentation\n// is part of the source2e.pdf file of LaTeX2e source documentation.\ndefineEnvironment(\"array\", {\n numArgs: 1,\n}, function(context, args) {\n var colalign = args[0];\n colalign = colalign.value.map ? colalign.value : [colalign];\n var cols = colalign.map(function(node) {\n var ca = node.value;\n if (\"lcr\".indexOf(ca) !== -1) {\n return {\n type: \"align\",\n align: ca,\n };\n } else if (ca === \"|\") {\n return {\n type: \"separator\",\n separator: \"|\",\n };\n }\n throw new ParseError(\n \"Unknown column alignment: \" + node.value,\n context.lexer, context.positions[1]);\n });\n var res = {\n type: \"array\",\n cols: cols,\n hskipBeforeAndAfter: true, // \\@preamble in lttab.dtx\n };\n res = parseArray(context.parser, res);\n return res;\n});\n\n// The matrix environments of amsmath builds on the array environment\n// of LaTeX, which is discussed above.\ndefineEnvironment([\n \"matrix\",\n \"pmatrix\",\n \"bmatrix\",\n \"Bmatrix\",\n \"vmatrix\",\n \"Vmatrix\",\n], {\n}, function(context) {\n var delimiters = {\n \"matrix\": null,\n \"pmatrix\": [\"(\", \")\"],\n \"bmatrix\": [\"[\", \"]\"],\n \"Bmatrix\": [\"\\\\{\", \"\\\\}\"],\n \"vmatrix\": [\"|\", \"|\"],\n \"Vmatrix\": [\"\\\\Vert\", \"\\\\Vert\"],\n }[context.envName];\n var res = {\n type: \"array\",\n hskipBeforeAndAfter: false, // \\hskip -\\arraycolsep in amsmath\n };\n res = parseArray(context.parser, res);\n if (delimiters) {\n res = new ParseNode(\"leftright\", {\n body: [res],\n left: delimiters[0],\n right: delimiters[1],\n }, context.mode);\n }\n return res;\n});\n\n// A cases environment (in amsmath.sty) is almost equivalent to\n// \\def\\arraystretch{1.2}%\n// \\left\\{\\begin{array}{@{}l@{\\quad}l@{}} … \\end{array}\\right.\ndefineEnvironment(\"cases\", {\n}, function(context) {\n var res = {\n type: \"array\",\n arraystretch: 1.2,\n cols: [{\n type: \"align\",\n align: \"l\",\n pregap: 0,\n postgap: fontMetrics.metrics.quad,\n }, {\n type: \"align\",\n align: \"l\",\n pregap: 0,\n postgap: 0,\n }],\n };\n res = parseArray(context.parser, res);\n res = new ParseNode(\"leftright\", {\n body: [res],\n left: \"\\\\{\",\n right: \".\",\n }, context.mode);\n return res;\n});\n\n// An aligned environment is like the align* environment\n// except it operates within math mode.\n// Note that we assume \\nomallineskiplimit to be zero,\n// so that \\strut@ is the same as \\strut.\ndefineEnvironment(\"aligned\", {\n}, function(context) {\n var res = {\n type: \"array\",\n cols: [],\n };\n res = parseArray(context.parser, res);\n var emptyGroup = new ParseNode(\"ordgroup\", [], context.mode);\n var numCols = 0;\n res.value.body.forEach(function(row) {\n var i;\n for (i = 1; i < row.length; i += 2) {\n row[i].value.unshift(emptyGroup);\n }\n if (numCols < row.length) {\n numCols = row.length;\n }\n });\n for (var i = 0; i < numCols; ++i) {\n var align = \"r\";\n var pregap = 0;\n if (i % 2 === 1) {\n align = \"l\";\n } else if (i > 0) {\n pregap = 2; // one \\qquad between columns\n }\n res.value.cols[i] = {\n type: \"align\",\n align: align,\n pregap: pregap,\n postgap: 0,\n };\n }\n return res;\n});\n","/**\n * The resulting parse tree nodes of the parse tree.\n */\nfunction ParseNode(type, value, mode) {\n this.type = type;\n this.value = value;\n this.mode = mode;\n}\n\nmodule.exports = {\n ParseNode: ParseNode,\n};\n\n","/* eslint no-unused-vars:0 */\n\nvar Style = require(\"./Style\");\n\n/**\n * This file contains metrics regarding fonts and individual symbols. The sigma\n * and xi variables, as well as the metricMap map contain data extracted from\n * TeX, TeX font metrics, and the TTF files. These data are then exposed via the\n * `metrics` variable and the getCharacterMetrics function.\n */\n\n// These font metrics are extracted from TeX by using\n// \\font\\a=cmmi10\n// \\showthe\\fontdimenX\\a\n// where X is the corresponding variable number. These correspond to the font\n// parameters of the symbol fonts. In TeX, there are actually three sets of\n// dimensions, one for each of textstyle, scriptstyle, and scriptscriptstyle,\n// but we only use the textstyle ones, and scale certain dimensions accordingly.\n// See the TeXbook, page 441.\nvar sigma1 = 0.025;\nvar sigma2 = 0;\nvar sigma3 = 0;\nvar sigma4 = 0;\nvar sigma5 = 0.431;\nvar sigma6 = 1;\nvar sigma7 = 0;\nvar sigma8 = 0.677;\nvar sigma9 = 0.394;\nvar sigma10 = 0.444;\nvar sigma11 = 0.686;\nvar sigma12 = 0.345;\nvar sigma13 = 0.413;\nvar sigma14 = 0.363;\nvar sigma15 = 0.289;\nvar sigma16 = 0.150;\nvar sigma17 = 0.247;\nvar sigma18 = 0.386;\nvar sigma19 = 0.050;\nvar sigma20 = 2.390;\nvar sigma21 = 1.01;\nvar sigma21Script = 0.81;\nvar sigma21ScriptScript = 0.71;\nvar sigma22 = 0.250;\n\n// These font metrics are extracted from TeX by using\n// \\font\\a=cmex10\n// \\showthe\\fontdimenX\\a\n// where X is the corresponding variable number. These correspond to the font\n// parameters of the extension fonts (family 3). See the TeXbook, page 441.\nvar xi1 = 0;\nvar xi2 = 0;\nvar xi3 = 0;\nvar xi4 = 0;\nvar xi5 = 0.431;\nvar xi6 = 1;\nvar xi7 = 0;\nvar xi8 = 0.04;\nvar xi9 = 0.111;\nvar xi10 = 0.166;\nvar xi11 = 0.2;\nvar xi12 = 0.6;\nvar xi13 = 0.1;\n\n// This value determines how large a pt is, for metrics which are defined in\n// terms of pts.\n// This value is also used in katex.less; if you change it make sure the values\n// match.\nvar ptPerEm = 10.0;\n\n// The space between adjacent `|` columns in an array definition. From\n// `\\showthe\\doublerulesep` in LaTeX.\nvar doubleRuleSep = 2.0 / ptPerEm;\n\n/**\n * This is just a mapping from common names to real metrics\n */\nvar metrics = {\n xHeight: sigma5,\n quad: sigma6,\n num1: sigma8,\n num2: sigma9,\n num3: sigma10,\n denom1: sigma11,\n denom2: sigma12,\n sup1: sigma13,\n sup2: sigma14,\n sup3: sigma15,\n sub1: sigma16,\n sub2: sigma17,\n supDrop: sigma18,\n subDrop: sigma19,\n axisHeight: sigma22,\n defaultRuleThickness: xi8,\n bigOpSpacing1: xi9,\n bigOpSpacing2: xi10,\n bigOpSpacing3: xi11,\n bigOpSpacing4: xi12,\n bigOpSpacing5: xi13,\n ptPerEm: ptPerEm,\n emPerEx: sigma5 / sigma6,\n doubleRuleSep: doubleRuleSep,\n\n // TODO(alpert): Missing parallel structure here. We should probably add\n // style-specific metrics for all of these.\n delim1: sigma20,\n getDelim2: function(style) {\n if (style.size === Style.TEXT.size) {\n return sigma21;\n } else if (style.size === Style.SCRIPT.size) {\n return sigma21Script;\n } else if (style.size === Style.SCRIPTSCRIPT.size) {\n return sigma21ScriptScript;\n }\n throw new Error(\"Unexpected style size: \" + style.size);\n },\n};\n\n// This map contains a mapping from font name and character code to character\n// metrics, including height, depth, italic correction, and skew (kern from the\n// character to the corresponding \\skewchar)\n// This map is generated via `make metrics`. It should not be changed manually.\nvar metricMap = require(\"./fontMetricsData\");\n\n/**\n * This function is a convenience function for looking up information in the\n * metricMap table. It takes a character as a string, and a style.\n *\n * Note: the `width` property may be undefined if fontMetricsData.js wasn't\n * built using `Make extended_metrics`.\n */\nvar getCharacterMetrics = function(character, style) {\n var metrics = metricMap[style][character.charCodeAt(0)];\n if (metrics) {\n return {\n depth: metrics[0],\n height: metrics[1],\n italic: metrics[2],\n skew: metrics[3],\n width: metrics[4],\n };\n }\n};\n\nmodule.exports = {\n metrics: metrics,\n getCharacterMetrics: getCharacterMetrics,\n};\n","/**\n * Provides a single function for parsing an expression using a Parser\n * TODO(emily): Remove this\n */\n\nvar Parser = require(\"./Parser\");\n\n/**\n * Parses an expression using a Parser, then returns the parsed result.\n */\nvar parseTree = function(toParse, settings) {\n var parser = new Parser(toParse, settings);\n\n return parser.parse();\n};\n\nmodule.exports = parseTree;\n"],"sourceRoot":""}