File "mathlive.min.js"
Path: /ThinkIB/englisha/mathlive@0930/dist/mathliveminjs
File size: 678.03 KB
MIME-type: text/plain
Charset: utf-8
/** MathLive 0.93.0 */
(function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MathLive = {}));})(this, (function (exports) { 'use strict';
var MathLive=(()=>{var so=Object.defineProperty,Cl=Object.defineProperties,El=Object.getOwnPropertyDescriptor,Tl=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertyNames,ao=Object.getOwnPropertySymbols;var nn=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable;var va=(t,e,r)=>e in t?so(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,g=(t,e)=>{for(var r in e||(e={}))nn.call(e,r)&&va(t,r,e[r]);if(ao)for(var r of ao(e))wa.call(e,r)&&va(t,r,e[r]);return t},T=(t,e)=>Cl(t,Tl(e));var an=t=>typeof t=="symbol"?t:t+"",Ir=(t,e)=>{var r={};for(var i in t)nn.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&ao)for(var i of ao(t))e.indexOf(i)<0&&wa.call(t,i)&&(r[i]=t[i]);return r};var Bl=(t,e)=>{for(var r in e)so(t,r,{get:e[r],enumerable:!0})},Dl=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Pl(e))!nn.call(t,o)&&o!==r&&so(t,o,{get:()=>e[o],enumerable:!(i=El(e,o))||i.enumerable});return t};var Kl=t=>Dl(so({},"__esModule",{value:!0}),t);var Pd={};Bl(Pd,{MathfieldElement:()=>ue,autoRenderMathInElement:()=>xa,convertAsciiMathToLatex:()=>xd,convertLatexToAsciiMath:()=>bd,convertLatexToMarkup:()=>fa,convertLatexToMathMl:()=>ga,convertLatexToSpeakableText:()=>ya,globalMathLive:()=>vt,makeSharedVirtualKeyboard:()=>Ld,renderMathInDocument:()=>Cd,renderMathInElement:()=>Ll,serializeMathJsonToLatex:()=>ba,validateLatex:()=>yd,version:()=>Td});function oe(t){return Array.isArray(t)}var ka={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.alphabetic":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.cut to clipboard":"Cut to Clipboard","tooltip.paste from clipboard":"Paste from Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo","menu.insert matrix":"Insert Matrix","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"Matrix Delimiters","menu.array.add row above":"Add Row After","menu.array.add row below":"Add Row Before","menu.array.add column after":"Add Column After","menu.array.add column before":"Add Column Before","menu.array.delete row":"Delete Row","menu.array.delete rows":"Delete Selected Rows","menu.array.delete column":"Delete Column","menu.array.delete columns":"Delete Selected Columns","submenu.array.insert separator":"Insert Separator","menu.insert table":"Insert Table","submenu.table style":"Table Style"},ar:{"keyboard.tooltip.functions":"\u0645\u0647\u0627\u0645","keyboard.tooltip.symbols":"\u062D\u0631\u0641 \u0627\u0648 \u0631\u0645\u0632","keyboard.tooltip.greek":"\u062D\u0631\u0648\u0641 \u064A\u0648\u0646\u0627\u0646\u064A\u0629","keyboard.tooltip.command":"\u062D\u0627\u0644\u0629 \u062A\u0644\u0642\u064A \u0627\u0644\u0623\u0648\u0627\u0645\u0631 \u0627\u0644\u0644\u0627\u062A\u0643","keyboard.tooltip.numeric":"\u0627\u0644\u0631\u0642\u0645\u064A\u0629","keyboard.tooltip.alphabetic":"\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u062D\u0631\u0641 \u0627\u0644\u0631\u0648\u0645\u0627\u0646\u064A\u0629","tooltip.copy to clipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.cut to clipboard":"\u0642\u0635 \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.paste from clipboard":"\u0644\u0635\u0642 \u0645\u0646 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.redo":"\u0627\u0644\u0625\u0639\u0627\u062F\u0629","tooltip.toggle virtual keyboard":"\u062A\u0628\u062F\u064A\u0644 \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D \u0627\u0644\u0625\u0641\u062A\u0631\u0627\u0636\u064A\u0629","tooltip.undo":"\u0625\u0644\u063A\u0627\u0621","menu.insert matrix":"\u0623\u062F\u062E\u0644 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.insert vector":"\u0623\u062F\u062E\u0644 \u0645\u062A\u062C\u0647","submenu.array.matrix delimiters":"\u0645\u062D\u062F\u062F\u0627\u062A \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.array.add row above":"\u0623\u0636\u0641 \u0635\u0641\u064B\u0627 \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add row below":"\u0623\u0636\u0641 \u0627\u0644\u0635\u0641 \u0642\u0628\u0644","menu.array.add column after":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add column before":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0642\u0628\u0644","menu.array.delete row":"\u0627\u062D\u0630\u0641 \u0635\u0641","menu.array.delete rows":"\u062D\u0630\u0641 \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","menu.array.delete column":"\u062D\u0630\u0641 \u0627\u0644\u0639\u0645\u0648\u062F","menu.array.delete columns":"\u062D\u0630\u0641 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","submenu.array.insert separator":"\u0623\u062F\u062E\u0644 \u0641\u0627\u0635\u0644","menu.insert table":"\u0625\u062F\u0631\u0627\u062C \u062C\u062F\u0648\u0644","submenu.table style":"\u0646\u0645\u0637 \u0627\u0644\u062C\u062F\u0648\u0644"},bg:{"keyboard.tooltip.functions":"\u0424\u0443\u043D\u043A\u0446\u0438\u0438","keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0432\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u044A\u0446\u043A\u0438 \u0431\u0443\u043A\u0432\u0438","keyboard.tooltip.command":"\u041A\u043E\u043C\u0430\u043D\u0434\u0435\u043D \u0440\u0435\u0436\u0438\u043C \u043D\u0430 \u043B\u0430\u0442\u0435\u043A\u0441","keyboard.tooltip.numeric":"\u0427\u0438\u0441\u043B\u043E\u0432\u0438","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u043A\u0438 \u0431\u0443\u043A\u0432\u0438","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u0435 \u0432 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434\u0430","tooltip.redo":"\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E","tooltip.toggle virtual keyboard":"\u041F\u0440\u0435\u0432\u043A\u043B\u044E\u0447\u0432\u0430\u043D\u0435 \u043D\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043B\u043D\u0430 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430","tooltip.undo":"\u041E\u0442\u043C\u044F\u043D\u0430","menu.insert matrix":"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435 \u043D\u0430 \u043C\u0430\u0442\u0440\u0438\u0446\u0430","menu.insert vector":"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435 \u043D\u0430 \u0432\u0435\u043A\u0442\u043E\u0440","submenu.array.matrix delimiters":"\u041C\u0430\u0442\u0440\u0438\u0447\u043D\u0438 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u0438","menu.array.add row above":"\u0414\u043E\u0431\u0430\u0432\u044F\u043D\u0435 \u043D\u0430 \u0440\u0435\u0434 \u0441\u043B\u0435\u0434","menu.array.add row below":"\u0414\u043E\u0431\u0430\u0432\u044F\u043D\u0435 \u043D\u0430 \u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u0438","menu.array.add column after":"\u0414\u043E\u0431\u0430\u0432\u044F\u043D\u0435 \u043D\u0430 \u043A\u043E\u043B\u043E\u043D\u0430 \u0441\u043B\u0435\u0434","menu.array.add column before":"\u0414\u043E\u0431\u0430\u0432\u044F\u043D\u0435 \u043D\u0430 \u043A\u043E\u043B\u043E\u043D\u0430 \u043F\u0440\u0435\u0434\u0438","menu.array.delete row":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u0440\u0435\u0434\u0430","menu.array.delete rows":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u0442\u0435 \u0440\u0435\u0434\u043E\u0432\u0435","menu.array.delete column":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u043A\u043E\u043B\u043E\u043D\u0430","menu.array.delete columns":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u0442\u0435 \u043A\u043E\u043B\u043E\u043D\u0438","submenu.array.insert separator":"\u041F\u043E\u0441\u0442\u0430\u0432\u0435\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B","menu.insert table":"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435 \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430","submenu.table style":"\u0422\u0430\u0431\u043B\u0438\u0447\u0435\u043D \u0441\u0442\u0438\u043B"},bs:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Gr\u010Dka slova","keyboard.tooltip.command":"LaTeX naredbeni na\u010Din","keyboard.tooltip.numeric":"Numeri\u010Dki","keyboard.tooltip.alphabetic":"Rimska slova","tooltip.copy to clipboard":"Kopirati u clipboard","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Uklju\u010Di / isklju\u010Di virtualnu tipkovnicu","tooltip.undo":"Poni\u0161ti","menu.insert matrix":"Umetni matricu","menu.insert vector":"Umetni vektor","submenu.array.matrix delimiters":"Matri\u010Dni razdjelnici","menu.array.add row above":"Dodaj redak nakon","menu.array.add row below":"Dodaj red prije","menu.array.add column after":"Dodaj stupac nakon","menu.array.add column before":"Dodaj stupac prije","menu.array.delete row":"Izbri\u0161i red","menu.array.delete rows":"Izbri\u0161i odabrane redove","menu.array.delete column":"Izbri\u0161i stupac","menu.array.delete columns":"Izbri\u0161i odabrane stupce","submenu.array.insert separator":"Umetni separator","menu.insert table":"Ubaci tabelu","submenu.table style":"Stil tabele"},cs:{"keyboard.tooltip.functions":"Funkce","keyboard.tooltip.symbols":"Symboly","keyboard.tooltip.greek":"\u0158eck\xE9 dopisy","keyboard.tooltip.command":"P\u0159\xEDkazov\xFD re\u017Eim LaTeX","keyboard.tooltip.numeric":"\u010C\xEDseln\xE9","keyboard.tooltip.alphabetic":"\u0158\xEDmsk\xE9 dopisy","tooltip.copy to clipboard":"Zkop\xEDrovat do schr\xE1nky","tooltip.redo":"P\u0159ed\u011Blat","tooltip.toggle virtual keyboard":"P\u0159epnout virtu\xE1ln\xED kl\xE1vesnici","tooltip.undo":"Vr\xE1tit","menu.insert matrix":"Vlo\u017Ete matici","menu.insert vector":"Vlo\u017Eit vektor","submenu.array.matrix delimiters":"Odd\u011Blova\u010De matic","menu.array.add row above":"P\u0159idat \u0159\xE1dek za","menu.array.add row below":"P\u0159idat \u0159\xE1dek p\u0159ed","menu.array.add column after":"P\u0159idat sloupec za","menu.array.add column before":"P\u0159idat sloupec d\u0159\xEDve","menu.array.delete row":"Odstranit \u0159\xE1dek","menu.array.delete rows":"Odstranit vybran\xE9 \u0159\xE1dky","menu.array.delete column":"Odstranit sloupec","menu.array.delete columns":"Odstranit vybran\xE9 sloupce","submenu.array.insert separator":"Vlo\u017Ete odd\u011Blova\u010D","menu.insert table":"Vlo\u017Eit tabulku","submenu.table style":"Styl tabulky"},da:{"keyboard.tooltip.functions":"Funktioner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Gr\xE6ske bogstaver","keyboard.tooltip.command":"LaTeX kommandotilstand","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.alphabetic":"Romerske breve","tooltip.copy to clipboard":"Kopier til udklipsholder","tooltip.redo":"Gentag igen","tooltip.toggle virtual keyboard":"Skift virtuelt tastatur","tooltip.undo":"Fortryd","menu.insert matrix":"Inds\xE6t matrix","menu.insert vector":"Inds\xE6t vektor","submenu.array.matrix delimiters":"Matrixafgr\xE6nsere","menu.array.add row above":"Tilf\xF8j r\xE6kke efter","menu.array.add row below":"Tilf\xF8j r\xE6kke f\xF8r","menu.array.add column after":"Tilf\xF8j kolonne efter","menu.array.add column before":"Tilf\xF8j kolonne f\xF8r","menu.array.delete row":"Slet r\xE6kke","menu.array.delete rows":"Slet valgte r\xE6kker","menu.array.delete column":"Slet kolonne","menu.array.delete columns":"Slet valgte kolonner","submenu.array.insert separator":"Inds\xE6t separator","menu.insert table":"Inds\xE6t tabel","submenu.table style":"Tabelstil"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.alphabetic":"R\xF6mische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen","menu.insert matrix":"Matrix einf\xFCgen","menu.insert vector":"Vektor einf\xFCgen","submenu.array.matrix delimiters":"Matrixtrennzeichen","menu.array.add row above":"Zeile hinzuf\xFCgen nach","menu.array.add row below":"Zeile hinzuf\xFCgen vor","menu.array.add column after":"Spalte hinzuf\xFCgen nach","menu.array.add column before":"Spalte hinzuf\xFCgen vor","menu.array.delete row":"Zeile l\xF6schen","menu.array.delete rows":"Ausgew\xE4hlte Zeilen l\xF6schen","menu.array.delete column":"Spalte l\xF6schen","menu.array.delete columns":"Ausgew\xE4hlte Spalten l\xF6schen","submenu.array.insert separator":"Trennzeichen einf\xFCgen","menu.insert table":"Tabelle einf\xFCgen","submenu.table style":"Tabellenstil"},el:{"keyboard.tooltip.functions":"\u03C3\u03C5\u03BD\u03B1\u03C1\u03C4\u03AE\u03C3\u03B5\u03B9\u03C2","keyboard.tooltip.symbols":"\u03C3\u03CD\u03BC\u03B2\u03BF\u03BB\u03B1","keyboard.tooltip.greek":"\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","keyboard.tooltip.command":"\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 \u03B5\u03BD\u03C4\u03BF\u03BB\u03CE\u03BD LaTeX","keyboard.tooltip.numeric":"\u0391\u03C1\u03B9\u03B8\u03BC\u03B7\u03C4\u03B9\u03BA\u03CC\u03C2","keyboard.tooltip.alphabetic":"\u03A1\u03C9\u03BC\u03B1\u03CA\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","tooltip.copy to clipboard":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03BF \u03C0\u03C1\u03CC\u03C7\u03B5\u03B9\u03C1\u03BF","tooltip.redo":"\u039E\u03B1\u03BD\u03B1\u03BA\u03AC\u03BD\u03C9","tooltip.toggle virtual keyboard":"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03B5\u03B9\u03BA\u03BF\u03BD\u03B9\u03BA\u03BF\u03CD \u03C0\u03BB\u03B7\u03BA\u03C4\u03C1\u03BF\u03BB\u03BF\u03B3\u03AF\u03BF\u03C5","tooltip.undo":"\u039E\u03B5\u03BA\u03AC\u03BD\u03C9","menu.insert matrix":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE Matrix","menu.insert vector":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B4\u03B9\u03B1\u03BD\u03CD\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2","submenu.array.matrix delimiters":"\u039F\u03C1\u03B9\u03BF\u03B8\u03AD\u03C4\u03B5\u03C2 Matrix","menu.array.add row above":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add row below":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.add column after":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add column before":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.delete row":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2","menu.array.delete rows":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03B5\u03B9\u03C1\u03CE\u03BD","menu.array.delete column":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2","menu.array.delete columns":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03C4\u03B7\u03BB\u03CE\u03BD","submenu.array.insert separator":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03BF\u03CD","menu.insert table":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1","submenu.table style":"\u03A3\u03C4\u03C5\u03BB \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Num\xE9rico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer","menu.insert matrix":"A\xF1adir Matriz","menu.insert vector":"A\xF1adir vector","submenu.array.matrix delimiters":"Delimitadores de Matriz","menu.array.add row above":"A\xF1adir L\xEDnea Antes","menu.array.add row below":"A\xF1adir L\xEDnea Despues","menu.array.add column after":"A\xF1adir Columna Despues","menu.array.add column before":"A\xF1adir Columna Antes","menu.array.delete row":"Borrar L\xEDnea","menu.array.delete rows":"Borrar L\xEDneas Seleccionadas","menu.array.delete column":"Borrar Columna","menu.array.delete columns":"Borrar Columnas Seleccionadas","submenu.array.insert separator":"Insertar un Separador","menu.insert table":"Insertar Tabla","submenu.table style":"Estilo de Tabla"},et:{"keyboard.tooltip.functions":"Funktsioonid","keyboard.tooltip.symbols":"S\xFCmbolid","keyboard.tooltip.greek":"Kreeka kirjad","keyboard.tooltip.command":"LaTeXi k\xE4sure\u017Eiim","keyboard.tooltip.numeric":"Numbriline","keyboard.tooltip.alphabetic":"Rooma kirjad","tooltip.copy to clipboard":"Kopeerida l\xF5ikelauale","tooltip.redo":"Tee uuesti","tooltip.toggle virtual keyboard":"L\xFClitage sisse virtuaalne klaviatuur","tooltip.undo":"V\xF5ta tagasi","menu.insert matrix":"Sisesta maatriks","menu.insert vector":"Sisesta vektor","submenu.array.matrix delimiters":"Maatriksi eraldajad","menu.array.add row above":"Lisa rida p\xE4rast","menu.array.add row below":"Lisa rida enne","menu.array.add column after":"Lisa veerg p\xE4rast","menu.array.add column before":"Lisa veerg enne","menu.array.delete row":"Kustuta rida","menu.array.delete rows":"Kustuta valitud read","menu.array.delete column":"Kustuta veerg","menu.array.delete columns":"Kustuta valitud veerud","submenu.array.insert separator":"Sisestage eraldaja","menu.insert table":"Sisesta tabeli","submenu.table style":"Tabeli stiilis"},fa:{"keyboard.tooltip.functions":"\u062A\u0648\u0627\u0628\u0639","keyboard.tooltip.symbols":"\u0646\u0645\u0627\u062F\u0647\u0627","keyboard.tooltip.greek":"\u062D\u0631\u0648\u0641 \u06CC\u0648\u0646\u0627\u0646\u06CC","keyboard.tooltip.command":"\u062D\u0627\u0644\u062A \u062F\u0633\u062A\u0648\u0631 \u0644\u0627\u062A\u06A9","keyboard.tooltip.numeric":"\u0639\u062F\u062F\u06CC","keyboard.tooltip.alphabetic":"\u062D\u0631\u0648\u0641 \u0631\u0648\u0645\u06CC","tooltip.copy to clipboard":"\u06A9\u067E\u06CC \u0628\u0647 \u06A9\u0644\u06CC\u067E\u0628\u0648\u0631\u062F","tooltip.redo":"\u0628\u0627\u0632\u06AF\u0634\u062A \u0628\u0647 \u0628\u0639\u062F","tooltip.toggle virtual keyboard":"\u0646\u0645\u0627\u06CC\u0634/\u0646\u0647\u0641\u062A\u0646 \u06A9\u06CC\u0628\u0648\u0631\u062F \u0645\u062C\u0627\u0632\u06CC","tooltip.undo":"\u0628\u0627\u0632\u06AF\u0634\u062A \u0628\u0647 \u0642\u0628\u0644","menu.insert matrix":"\u0645\u0627\u062A\u0631\u06CC\u0633 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F","menu.insert vector":"\u062F\u0631\u062C \u0628\u0631\u062F\u0627\u0631","submenu.array.matrix delimiters":"\u0645\u0631\u0632\u0647\u0627\u06CC \u0645\u0627\u062A\u0631\u06CC\u0633","menu.array.add row above":"\u0628\u0639\u062F \u0627\u0632 \u0622\u0646 \u0631\u062F\u06CC\u0641 \u0627\u0636\u0627\u0641\u0647 \u06A9\u0646\u06CC\u062F","menu.array.add row below":"\u0631\u062F\u06CC\u0641 \u0631\u0627 \u0642\u0628\u0644 \u0627\u0636\u0627\u0641\u0647 \u06A9\u0646\u06CC\u062F","menu.array.add column after":"\u0627\u0636\u0627\u0641\u0647 \u06A9\u0631\u062F\u0646 \u0633\u062A\u0648\u0646 \u0628\u0639\u062F","menu.array.add column before":"\u0633\u062A\u0648\u0646 \u0642\u0628\u0644 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06A9\u0646\u06CC\u062F","menu.array.delete row":"\u0631\u062F\u06CC\u0641 \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F","menu.array.delete rows":"\u0631\u062F\u06CC\u0641 \u0647\u0627\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F","menu.array.delete column":"\u062D\u0630\u0641 \u0633\u062A\u0648\u0646","menu.array.delete columns":"\u0633\u062A\u0648\u0646 \u0647\u0627\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F","submenu.array.insert separator":"\u062F\u0631\u062C \u062C\u062F\u0627 \u06A9\u0646\u0646\u062F\u0647","menu.insert table":"\u0642\u0631\u0627\u0631 \u062F\u0627\u062F\u0646 \u062C\u062F\u0648\u0644","submenu.table style":"\u0633\u0628\u06A9 \u0645\u06CC\u0632"},fi:{"keyboard.tooltip.functions":"Toiminnot","keyboard.tooltip.symbols":"Symbolit","keyboard.tooltip.greek":"Kreikkalaiset kirjeet","keyboard.tooltip.command":"LaTeX-komentotila","keyboard.tooltip.numeric":"Numeerinen","keyboard.tooltip.alphabetic":"Roomalaiset kirjeet","tooltip.copy to clipboard":"Kopioi leikep\xF6yd\xE4lle","tooltip.redo":"Tee uudelleen","tooltip.toggle virtual keyboard":"Vaihda virtuaalin\xE4pp\xE4imist\xF6","tooltip.undo":"Kumoa","menu.insert matrix":"Lis\xE4\xE4 matriisi","menu.insert vector":"Lis\xE4\xE4 vektori","submenu.array.matrix delimiters":"Matriisin erottimet","menu.array.add row above":"Lis\xE4\xE4 rivi j\xE4lkeen","menu.array.add row below":"Lis\xE4\xE4 rivi ennen","menu.array.add column after":"Lis\xE4\xE4 sarake j\xE4lkeen","menu.array.add column before":"Lis\xE4\xE4 sarake ennen","menu.array.delete row":"Poista rivi","menu.array.delete rows":"Poista valitut rivit","menu.array.delete column":"Poista sarake","menu.array.delete columns":"Poista valitut sarakkeet","submenu.array.insert separator":"Aseta erotin","menu.insert table":"Lis\xE4\xE4 taulukko","submenu.table style":"Taulukon tyyli"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Num\xE9rique","keyboard.tooltip.alphabetic":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"R\xE9tablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler","menu.insert matrix":"Ins\xE9rer une Matrice","menu.insert vector":"Ins\xE9rer un Vecteur","submenu.array.matrix delimiters":"D\xE9limiteurs de la Matrice","menu.array.add row above":"Ajouter une Ligne Avant","menu.array.add row below":"Ajouter une Ligne Apr\xE8s","menu.array.add column before":"Ajouter une Colonne Avant","menu.array.add column after":"Ajouter une Colonne Apr\xE8s","menu.array.delete row":"Enlever une Ligne","menu.array.delete rows":"Enlever les Lignes S\xE9lection\xE9es","menu.array.delete column":"Enlever une Colone","menu.array.delete columns":"Enlever les Colonnes S\xE9lection\xE9es","submenu.array.insert separator":"Ins\xE9rer un S\xE9parateur","menu.insert table":"Ins\xE9rer une Table","submenu.table style":"Style de la Table"},ga:{"keyboard.tooltip.functions":"Feidhmeanna","keyboard.tooltip.symbols":"Siombail\xED","keyboard.tooltip.greek":"Litreacha na Gr\xE9ige","keyboard.tooltip.command":"M\xF3d Ord\xFA LaTeX","keyboard.tooltip.numeric":"Uimhri\xFAil","keyboard.tooltip.alphabetic":"Litreacha R\xF3mh\xE1nacha","tooltip.copy to clipboard":"C\xF3ipe\xE1il chuig an Ghearrthaisce","tooltip.redo":"Athdh\xE9an","tooltip.toggle virtual keyboard":"M\xE9archl\xE1ir F\xEDor\xFAil a Fh\xE1il","tooltip.undo":"Cealaigh","menu.insert matrix":"Cuir isteach Maitr\xEDs","menu.insert vector":"Cuir isteach Veicteoir","submenu.array.matrix delimiters":"Delimiters Maitr\xEDs","menu.array.add row above":"Cuir Rae Tar \xE9is","menu.array.add row below":"Cuir Rae Roimh","menu.array.add column after":"Cuir Col\xFAn Tar \xE9is","menu.array.add column before":"Cuir Col\xFAn Roimh","menu.array.delete row":"Scrios Rae","menu.array.delete rows":"Scrios Sraitheanna Roghnaithe","menu.array.delete column":"Scrios Col\xFAn","menu.array.delete columns":"Scrios Col\xFAin Roghnaithe","submenu.array.insert separator":"Cuir Deighilteoir isteach","menu.insert table":"Ions\xE1igh T\xE1bla","submenu.table style":"St\xEDl T\xE1bla"},he:{"keyboard.tooltip.functions":"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D5\u05EA","keyboard.tooltip.symbols":"\u05E1\u05DE\u05DC\u05D9\u05DD","keyboard.tooltip.greek":"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05D9\u05D5\u05D5\u05E0\u05D9\u05D5\u05EA","keyboard.tooltip.command":"\u05DE\u05E6\u05D1 \u05E4\u05E7\u05D5\u05D3\u05D4 \u05DC\u05D8\u05E7\u05E1","keyboard.tooltip.numeric":"\u05DE\u05E1\u05E4\u05E8\u05D9","keyboard.tooltip.alphabetic":"\u05DE\u05DB\u05EA\u05D1\u05D9\u05DD \u05E8\u05D5\u05DE\u05D9\u05D9\u05DD","tooltip.copy to clipboard":"\u05D4\u05E2\u05EA\u05E7 \u05DC\u05DC\u05D5\u05D7","tooltip.redo":"\u05DC\u05B7\u05E2\u05B2\u05E9\u05C2\u05D5\u05B9\u05EA \u05E9\u05C1\u05D5\u05BC\u05D1","tooltip.toggle virtual keyboard":"\u05D4\u05D7\u05DC\u05E3 \u05D0\u05EA \u05D4\u05DE\u05E7\u05DC\u05D3\u05EA \u05D4\u05D5\u05D5\u05D9\u05E8\u05D8\u05D5\u05D0\u05DC\u05D9\u05EA","tooltip.undo":"\u05DC\u05D1\u05D8\u05DC","menu.insert matrix":"\u05D4\u05DB\u05E0\u05E1 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.insert vector":"\u05D4\u05DB\u05E0\u05E1 \u05D5\u05E7\u05D8\u05D5\u05E8","submenu.array.matrix delimiters":"\u05DE\u05E4\u05E8\u05D9\u05D3\u05D9 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.array.add row above":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add row below":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.add column after":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add column before":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.delete row":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D4","menu.array.delete rows":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","menu.array.delete column":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D4","menu.array.delete columns":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","submenu.array.insert separator":"\u05D4\u05DB\u05E0\u05E1 \u05DE\u05E4\u05E8\u05D9\u05D3","menu.insert table":"\u05D4\u05DB\u05E0\u05E1 \u05D8\u05D1\u05DC\u05D4","submenu.table style":"\u05D8\u05D1\u05DC\u05D4 \u05E1\u05B4\u05D2\u05B0\u05E0\u05D5\u05B9\u05DF"},hr:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Gr\u010Dka slova","keyboard.tooltip.command":"LaTeX naredbeni na\u010Din","keyboard.tooltip.numeric":"Numeri\u010Dki","keyboard.tooltip.alphabetic":"Rimska slova","tooltip.copy to clipboard":"Kopirati u me\u0111uspremnik","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Uklju\u010Di / isklju\u010Di virtualnu tipkovnicu","tooltip.undo":"Poni\u0161ti","menu.insert matrix":"Umetni matricu","menu.insert vector":"Umetni vektor","submenu.array.matrix delimiters":"Matri\u010Dni razdjelnici","menu.array.add row above":"Dodaj redak nakon","menu.array.add row below":"Dodaj redak prije","menu.array.add column after":"Dodaj stupac nakon","menu.array.add column before":"Dodaj stupac prije","menu.array.delete row":"Izbri\u0161i redak","menu.array.delete rows":"Izbri\u0161i odabrane retke","menu.array.delete column":"Izbri\u0161i stupac","menu.array.delete columns":"Izbri\u0161i odabrane stupce","submenu.array.insert separator":"Umetni separator","menu.insert table":"Umetni tablicu","submenu.table style":"Stil tabele"},id:{"keyboard.tooltip.functions":"Fungsi","keyboard.tooltip.symbols":"Simbol","keyboard.tooltip.greek":"Huruf Yunani","keyboard.tooltip.command":"Mode Perintah LaTeX","keyboard.tooltip.numeric":"Numerik","keyboard.tooltip.alphabetic":"Surat Romawi","tooltip.copy to clipboard":"Menyalin ke clipboard","tooltip.redo":"Mengulangi","tooltip.toggle virtual keyboard":"Alihkan Keyboard Virtual","tooltip.undo":"Membuka","menu.insert matrix":"Sisipkan Matriks","menu.insert vector":"Sisipkan Vektor","submenu.array.matrix delimiters":"Pembatas Matriks","menu.array.add row above":"Tambahkan Baris Setelah","menu.array.add row below":"Tambahkan Baris Sebelumnya","menu.array.add column after":"Tambahkan Kolom Setelah","menu.array.add column before":"Tambahkan Kolom Sebelumnya","menu.array.delete row":"Hapus Baris","menu.array.delete rows":"Hapus Baris yang Dipilih","menu.array.delete column":"Hapus Kolom","menu.array.delete columns":"Hapus Kolom yang Dipilih","submenu.array.insert separator":"Sisipkan Pemisah","menu.insert table":"Sisipkan Tabel","submenu.table style":"Gaya Tabel"},hi:{"keyboard.tooltip.functions":"\u0915\u093E\u0930\u094D\u092F\u094B\u0902","keyboard.tooltip.symbols":"\u092A\u094D\u0930\u0924\u0940\u0915","keyboard.tooltip.greek":"\u0917\u094D\u0930\u0940\u0915 \u0905\u0915\u094D\u0937\u0930","keyboard.tooltip.command":"\u0932\u093E\u091F\u0947\u0915\u094D\u0938 \u0915\u092E\u093E\u0902\u0921 \u092E\u094B\u0921","keyboard.tooltip.numeric":"\u0938\u0902\u0916\u094D\u092F\u093E\u0924\u094D\u092E\u0915","keyboard.tooltip.alphabetic":"\u0930\u094B\u092E\u0928 \u092A\u0924\u094D\u0930","tooltip.copy to clipboard":"\u0915\u094D\u0932\u093F\u092A\u092C\u094B\u0930\u094D\u0921 \u092A\u0930 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902","tooltip.redo":"\u092B\u093F\u0930 \u0938\u0947 \u0915\u0930\u0947\u0902","tooltip.toggle virtual keyboard":"\u0935\u0930\u094D\u091A\u0941\u0905\u0932 \u0915\u0940\u092C\u094B\u0930\u094D\u0921 \u091F\u0949\u0917\u0932 \u0915\u0930\u0947\u0902","tooltip.undo":"\u092A\u0942\u0930\u094D\u0935\u0935\u0924","menu.insert matrix":"\u092E\u0948\u091F\u094D\u0930\u093F\u0915\u094D\u0938 \u0921\u093E\u0932\u0947\u0902","menu.insert vector":"\u0935\u0947\u0915\u094D\u091F\u0930 \u0921\u093E\u0932\u0947\u0902","submenu.array.matrix delimiters":"\u092E\u0948\u091F\u094D\u0930\u093F\u0915\u094D\u0938 \u0938\u0940\u092E\u093E\u0902\u0915\u0915","menu.array.add row above":"\u092C\u093E\u0926 \u092E\u0947\u0902 \u092A\u0902\u0915\u094D\u0924\u093F \u091C\u094B\u0921\u093C\u0947\u0902","menu.array.add row below":"\u092A\u0939\u0932\u0947 \u092A\u0902\u0915\u094D\u0924\u093F \u091C\u094B\u0921\u093C\u0947\u0902","menu.array.add column after":"\u092C\u093E\u0926 \u092E\u0947\u0902 \u0915\u0949\u0932\u092E \u091C\u094B\u0921\u093C\u0947\u0902","menu.array.add column before":"\u092A\u0939\u0932\u0947 \u0915\u0949\u0932\u092E \u091C\u094B\u0921\u093C\u0947\u0902","menu.array.delete row":"\u092A\u0902\u0915\u094D\u0924\u093F \u0915\u094B \u0939\u091F\u093E\u090F\u0902","menu.array.delete rows":"\u091A\u092F\u0928\u093F\u0924 \u092A\u0902\u0915\u094D\u0924\u093F\u092F\u094B\u0902 \u0915\u094B \u0939\u091F\u093E\u090F\u0902","menu.array.delete column":"\u0915\u0949\u0932\u092E \u0939\u091F\u093E\u090F\u0902","menu.array.delete columns":"\u091A\u092F\u0928\u093F\u0924 \u0915\u0949\u0932\u092E \u0939\u091F\u093E\u090F\u0902","submenu.array.insert separator":"\u0935\u093F\u092D\u093E\u091C\u0915 \u0921\u093E\u0932\u0947\u0902","menu.insert table":"\u091F\u0947\u092C\u0932 \u0907\u0902\u0938\u0930\u094D\u091F \u0915\u0930\u0947\u0902","submenu.table style":"\u091F\u0947\u092C\u0932 \u0938\u094D\u091F\u093E\u0907\u0932"},hu:{"keyboard.tooltip.functions":"Funkci\xF3k","keyboard.tooltip.symbols":"Szimb\xF3lumok","keyboard.tooltip.greek":"G\xF6r\xF6g levelek","keyboard.tooltip.command":"LaTeX Parancs m\xF3d","keyboard.tooltip.numeric":"Numerikus","keyboard.tooltip.alphabetic":"R\xF3mai levelek","tooltip.copy to clipboard":"M\xE1solja a v\xE1g\xF3lapra","tooltip.redo":"\xDAjra","tooltip.toggle virtual keyboard":"V\xE1lt\xE1s a virtu\xE1lis billenty\u0171zetre","tooltip.undo":"Visszavon\xE1s","menu.insert matrix":"Helyezze be a M\xE1trixot","menu.insert vector":"Vektor besz\xFAr\xE1sa","submenu.array.matrix delimiters":"M\xE1trixhat\xE1rol\xF3k","menu.array.add row above":"Sor hozz\xE1ad\xE1sa ut\xE1n","menu.array.add row below":"Add Add Sor el\u0151tt","menu.array.add column after":"Oszlop hozz\xE1ad\xE1sa ut\xE1n","menu.array.add column before":"Add oszlop el\u0151tt","menu.array.delete row":"Sor t\xF6rl\xE9se","menu.array.delete rows":"Kijel\xF6lt sorok t\xF6rl\xE9se","menu.array.delete column":"Oszlop t\xF6rl\xE9se","menu.array.delete columns":"A kijel\xF6lt oszlopok t\xF6rl\xE9se","submenu.array.insert separator":"Helyezze be az elv\xE1laszt\xF3t","menu.insert table":"Helyezze be a t\xE1bl\xE1zatot","submenu.table style":"T\xE1bl\xE1zatos st\xEDlus"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalit\xE0 di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.alphabetic":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare","menu.insert matrix":"Inserisci una Matrice","menu.insert vector":"Inserisci Vettore","submenu.array.matrix delimiters":"Delimitatori di Matrice","menu.array.add row above":"Aggiungi una Riga Prima","menu.array.add row below":"Aggiungi una Riga Dopo","menu.array.add column before":"Aggiungi una Colonna Prima","menu.array.add column after":"Aggiungi una Colonna Dopo","menu.array.delete row":"Rimuovi una Riga","menu.array.delete rows":"Rimuovi le Righe Selezionate","menu.array.delete column":"Rimuovi una Colonna","menu.array.delete columns":"Rimuovi le Colonne Selezionate","submenu.array.insert separator":"Inserisci un Separatore","menu.insert table":"Inserisci Tabella","submenu.table style":"Stile tabella"},is:{"keyboard.tooltip.functions":"A\xF0ger\xF0ir","keyboard.tooltip.symbols":"T\xE1kn","keyboard.tooltip.greek":"Gr\xEDsk br\xE9f","keyboard.tooltip.command":"LaTeX stj\xF3rnunarstilling","keyboard.tooltip.numeric":"T\xF6lulegt","keyboard.tooltip.alphabetic":"R\xF3mversk br\xE9f","tooltip.copy to clipboard":"Afrita\xF0u \xE1 klemmuspjald","tooltip.redo":"Endurtaka","tooltip.toggle virtual keyboard":"Skiptu um s\xFDndarlyklabor\xF0","tooltip.undo":"Afturkalla","menu.insert matrix":"Settu fylki inn","menu.insert vector":"Settu inn Vector","submenu.array.matrix delimiters":"Matrix afm\xF6rkun","menu.array.add row above":"B\xE6ta vi\xF0 r\xF6\xF0 \xE1 eftir","menu.array.add row below":"B\xE6ta vi\xF0 r\xF6\xF0 \xE1\xF0ur","menu.array.add column after":"B\xE6ta vi\xF0 d\xE1lki \xE1 eftir","menu.array.add column before":"B\xE6ta vi\xF0 d\xE1lki \xE1\xF0ur","menu.array.delete row":"Ey\xF0a r\xF6\xF0","menu.array.delete rows":"Ey\xF0a v\xF6ldum l\xEDnum","menu.array.delete column":"Ey\xF0a d\xE1lki","menu.array.delete columns":"Ey\xF0a v\xF6ldum d\xE1lkum","submenu.array.insert separator":"Settu skiljuna \xED","menu.insert table":"Settu inn t\xF6flu","submenu.table style":"T\xF6flu st\xEDl"},ja:{"keyboard.tooltip.functions":"\u95A2\u6570","keyboard.tooltip.symbols":"\u30B7\u30F3\u30DC\u30EB","keyboard.tooltip.greek":"\u30AE\u30EA\u30B7\u30E3\u6587\u5B57","keyboard.tooltip.command":"\u30E9\u30C6\u30C3\u30AF\u30B9\u30B3\u30DE\u30F3\u30C9\u30E2\u30FC\u30C9","keyboard.tooltip.numeric":"\u6570\u5024","keyboard.tooltip.alphabetic":"\u30ED\u30FC\u30DE\u5B57","tooltip.copy to clipboard":"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC","tooltip.redo":"\u3084\u308A\u76F4\u3057","tooltip.toggle virtual keyboard":"\u4EEE\u60F3\u30AD\u30FC\u30DC\u30FC\u30C9\u306E\u5207\u308A\u66FF\u3048","tooltip.undo":"\u5143\u306B\u623B\u3059","menu.insert matrix":"\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9\u3092\u633F\u5165","menu.insert vector":"\u30D9\u30AF\u30C8\u30EB\u3092\u633F\u5165","submenu.array.matrix delimiters":"\u884C\u5217\u533A\u5207\u308A\u6587\u5B57","menu.array.add row above":"\u5F8C\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add row below":"\u524D\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add column after":"\u5F8C\u306B\u5217\u3092\u8FFD\u52A0","menu.array.add column before":"\u524D\u306B\u5217\u3092\u8FFD\u52A0","menu.array.delete row":"\u884C\u3092\u524A\u9664","menu.array.delete rows":"\u9078\u629E\u3057\u305F\u884C\u3092\u524A\u9664\u3059\u308B","menu.array.delete column":"\u5217\u3092\u524A\u9664","menu.array.delete columns":"\u9078\u629E\u3057\u305F\u5217\u3092\u524A\u9664\u3059\u308B","submenu.array.insert separator":"\u30BB\u30D1\u30EC\u30FC\u30BF\u30FC\u3092\u633F\u5165","menu.insert table":"\u30C6\u30FC\u30D6\u30EB\u3092\u633F\u5165","submenu.table style":"\u30C6\u30FC\u30D6\u30EB\u30B9\u30BF\u30A4\u30EB"},ko:{"keyboard.tooltip.functions":"\uAE30\uB2A5","keyboard.tooltip.symbols":"\uAE30\uD638","keyboard.tooltip.greek":"\uADF8\uB9AC\uC2A4 \uBB38\uC790","keyboard.tooltip.command":"\uC720\uC561 \uBA85\uB839 \uBAA8\uB4DC","keyboard.tooltip.numeric":"\uC22B\uC790","keyboard.tooltip.alphabetic":"\uB85C\uB9C8 \uBB38\uC790","tooltip.copy to clipboard":"\uD074\uB9BD \uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC","tooltip.redo":"\uB2E4\uC2DC \uD558\uB2E4","tooltip.toggle virtual keyboard":"\uAC00\uC0C1 \uD0A4\uBCF4\uB4DC \uC804\uD658","tooltip.undo":"\uC2E4\uD589 \uCDE8\uC18C","menu.insert matrix":"\uB9E4\uD2B8\uB9AD\uC2A4 \uC0BD\uC785","menu.insert vector":"\uBCA1\uD130 \uC0BD\uC785","submenu.array.matrix delimiters":"\uD589\uB82C \uAD6C\uBD84 \uAE30\uD638","menu.array.add row above":"\uB4A4\uC5D0 \uD589 \uCD94\uAC00","menu.array.add row below":"\uC55E\uC5D0 \uD589 \uCD94\uAC00","menu.array.add column after":"\uB4A4\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.add column before":"\uC55E\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.delete row":"\uD589 \uC0AD\uC81C","menu.array.delete rows":"\uC120\uD0DD\uD55C \uD589 \uC0AD\uC81C","menu.array.delete column":"\uC5F4 \uC0AD\uC81C","menu.array.delete columns":"\uC120\uD0DD\uD55C \uC5F4 \uC0AD\uC81C","submenu.array.insert separator":"\uAD6C\uBD84\uC790 \uC0BD\uC785","menu.insert table":"\uD45C \uC0BD\uC785","submenu.table style":"\uD14C\uC774\uBE14 \uC2A4\uD0C0\uC77C"},lv:{"keyboard.tooltip.functions":"Funkcijas","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Grie\u0137u burti","keyboard.tooltip.command":"LaTeX komandu re\u017E\u012Bms","keyboard.tooltip.numeric":"Ciparu skaitlis","keyboard.tooltip.alphabetic":"Romie\u0161u v\u0113stules","tooltip.copy to clipboard":"Kop\u0113t starpliktuv\u0113","tooltip.redo":"P\u0101rtais\u012Bt","tooltip.toggle virtual keyboard":"P\u0101rsl\u0113gt virtu\u0101lo tastat\u016Bru","tooltip.undo":"Atsaukt","menu.insert matrix":"Ievietojiet matricu","menu.insert vector":"Ievietot vektoru","submenu.array.matrix delimiters":"Matricas norobe\u017Eot\u0101ji","menu.array.add row above":"Pievienot rindu p\u0113c","menu.array.add row below":"Pievienot rindu pirms","menu.array.add column after":"Pievienot kolonnu p\u0113c","menu.array.add column before":"Pievienot kolonnu pirms","menu.array.delete row":"Dz\u0113st rindu","menu.array.delete rows":"Dz\u0113st atlas\u012Bt\u0101s rindas","menu.array.delete column":"Dz\u0113st kolonnu","menu.array.delete columns":"Dz\u0113st atlas\u012Bt\u0101s kolonnas","submenu.array.insert separator":"Ievietojiet atdal\u012Bt\u0101ju","menu.insert table":"Ievietojiet tabulu","submenu.table style":"Galda stils"},lt:{"keyboard.tooltip.functions":"Funkcijos","keyboard.tooltip.symbols":"Simboliai","keyboard.tooltip.greek":"Graiki\u0161kos raid\u0117s","keyboard.tooltip.command":"LaTeX komand\u0173 re\u017Eimas","keyboard.tooltip.numeric":"Skaitmeninis","keyboard.tooltip.alphabetic":"Romos lai\u0161kai","tooltip.copy to clipboard":"Nukopijuoti \u012F i\u0161karpin\u0119","tooltip.redo":"Perdaryti","tooltip.toggle virtual keyboard":"Perjungti virtuali\u0105j\u0105 klaviat\u016Br\u0105","tooltip.undo":"At\u0161aukti","menu.insert matrix":"Ievietojiet matricu","menu.insert vector":"Ievietot vektoru","submenu.array.matrix delimiters":"Matricas norobe\u017Eot\u0101ji","menu.array.add row above":"Pievienot rindu p\u0113c","menu.array.add row below":"Pievienot rindu pirms","menu.array.add column after":"Pievienot kolonnu p\u0113c","menu.array.add column before":"Pievienot kolonnu pirms","menu.array.delete row":"Dz\u0113st rindu","menu.array.delete rows":"Dz\u0113st atlas\u012Bt\u0101s rindas","menu.array.delete column":"Dz\u0113st kolonnu","menu.array.delete columns":"Dz\u0113st atlas\u012Bt\u0101s kolonnas","submenu.array.insert separator":"Ievietojiet atdal\u012Bt\u0101ju","menu.insert table":"Ievietojiet tabulu","submenu.table style":"Tabulas stili"},lu:{"keyboard.tooltip.functions":"Funktiounen","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Griichesch Br\xE9iwer","keyboard.tooltip.command":"LaTeX Kommando Modus","keyboard.tooltip.numeric":"Numeresch","keyboard.tooltip.alphabetic":"R\xE9imesch Br\xE9iwer","tooltip.copy to clipboard":"Kop\xE9iert op Clipboard","tooltip.redo":"Nees nei maachen","tooltip.toggle virtual keyboard":"Wiesselt Virtuell Tastatur","tooltip.undo":"Undoen","menu.insert matrix":"Matrix asetzen","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"Matrix Ofgrenzer","menu.array.add row above":"Dob\xE4izemaachen Rei No","menu.array.add row below":"F\xFC\xFCgt Rei vir","menu.array.add column after":"Dob\xE4izemaachen Kolonn No","menu.array.add column before":"Kolonn derb\xE4i Virun","menu.array.delete row":"Rad l\xE4schen","menu.array.delete rows":"L\xE4scht Ausgewielte Reien","menu.array.delete column":"L\xE4scht Kolonn","menu.array.delete columns":"L\xE4scht Ausgewielte Kolonnen","submenu.array.insert separator":"Insert Separator","menu.insert table":"D\xEBsch anzeginn","submenu.table style":"D\xEBsch Style"},nl:{"keyboard.tooltip.functions":"Functies","keyboard.tooltip.symbols":"Symbolen","keyboard.tooltip.greek":"Griekse letters","keyboard.tooltip.command":"LaTeX commando mode","keyboard.tooltip.numeric":"Numeriek","keyboard.tooltip.alphabetic":"Romeinse letters","tooltip.copy to clipboard":"Kopi\xEBren naar klembord","tooltip.redo":"Opnieuw","tooltip.toggle virtual keyboard":"Schakel naar virtueel toetsenbord","tooltip.undo":"Ongedaan maken","menu.insert matrix":"Matrix invoegen","menu.insert vector":"Vector invoegen","submenu.array.matrix delimiters":"Matrixscheidingstekens","menu.array.add row above":"Rij toevoegen na","menu.array.add row below":"Rij toevoegen eerder","menu.array.add column after":"Kolom toevoegen na","menu.array.add column before":"Kolom toevoegen voor","menu.array.delete row":"Verwijder rij","menu.array.delete rows":"Geselecteerde rijen verwijderen","menu.array.delete column":"Kolom verwijderen","menu.array.delete columns":"Geselecteerde kolommen verwijderen","submenu.array.insert separator":"Scheidingsteken invoegen","menu.insert table":"Tabel invoegen","submenu.table style":"Tabelstijl"},no:{"keyboard.tooltip.functions":"Funksjoner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Greske bokstaver","keyboard.tooltip.command":"LaTeX kommandomodus","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.alphabetic":"Romerske bokstaver","tooltip.copy to clipboard":"Kopiere til utklippstavle","tooltip.redo":"Gj\xF8re om","tooltip.toggle virtual keyboard":"Bytt virtuelt tastatur","tooltip.undo":"Angre","menu.insert matrix":"Sett inn matrise","menu.insert vector":"Sett inn vektor","submenu.array.matrix delimiters":"Matrix avgrensere","menu.array.add row above":"Legg til rad etter","menu.array.add row below":"Legg til rad f\xF8r","menu.array.add column after":"Legg til kolonne etter","menu.array.add column before":"Legg til kolonne f\xF8r","menu.array.delete row":"Slett rad","menu.array.delete rows":"Slett valgte rader","menu.array.delete column":"Slett kolonne","menu.array.delete columns":"Slett valgte kolonner","submenu.array.insert separator":"Sett inn skilletegn","menu.insert table":"Sett inn tabell","submenu.table style":"Tabellstil"},mk:{"keyboard.tooltip.functions":"\u0424\u0443\u043D\u043A\u0446\u0438\u0438","keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0431\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u0447\u043A\u0438 \u0431\u0443\u043A\u0432\u0438","keyboard.tooltip.command":"\u0420\u0435\u0436\u0438\u043C \u043D\u0430 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0432\u043E \u043B\u0430\u0442\u0435\u043A\u0441","keyboard.tooltip.numeric":"\u041D\u0443\u043C\u0435\u0440\u0438\u0447\u043A\u0438","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u043A\u0438 \u043F\u0438\u0441\u043C\u0430","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0438\u0440\u0430\u0458\u0442\u0435 \u0432\u043E \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434","tooltip.redo":"\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E","tooltip.toggle virtual keyboard":"\u0412\u043A\u043B\u0443\u0447\u0435\u0442\u0435 \u0458\u0430 \u0432\u0438\u0440\u0442\u0443\u0435\u043B\u043D\u0430\u0442\u0430 \u0442\u0430\u0441\u0442\u0430\u0442\u0443\u0440\u0430","tooltip.undo":"\u0412\u0440\u0430\u0442\u0438","menu.insert matrix":"\u0412\u043C\u0435\u0442\u043D\u0435\u0442\u0435 \u043C\u0430\u0442\u0440\u0438\u0446\u0430","menu.insert vector":"\u0412\u043C\u0435\u0442\u043D\u0438 \u0432\u0435\u043A\u0442\u043E\u0440","submenu.array.matrix delimiters":"\u0420\u0430\u0437\u0433\u0440\u0430\u043D\u0438\u0447\u0443\u0432\u0430\u0447\u0438 \u043D\u0430 \u043C\u0430\u0442\u0440\u0438\u0446\u0430","menu.array.add row above":"\u0414\u043E\u0434\u0430\u0434\u0435\u0442\u0435 \u0440\u0435\u0434 \u043F\u043E\u0441\u043B\u0435","menu.array.add row below":"\u0414\u043E\u0434\u0430\u0434\u0438 \u0440\u0435\u0434 \u043F\u0440\u0435\u0434 \u0442\u043E\u0430","menu.array.add column after":"\u0414\u043E\u0434\u0430\u0434\u0435\u0442\u0435 \u043A\u043E\u043B\u043E\u043D\u0430 \u043F\u043E\u0441\u043B\u0435","menu.array.add column before":"\u0414\u043E\u0434\u0430\u0434\u0435\u0442\u0435 \u043A\u043E\u043B\u043E\u043D\u0430 \u043F\u0440\u0435\u0434 \u0442\u043E\u0430","menu.array.delete row":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0433\u043E \u0440\u0435\u0434\u043E\u0442","menu.array.delete rows":"\u0418\u0437\u0431\u0440\u0438\u0448\u0435\u0442\u0435 \u0433\u0438 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u0442\u0435 \u0440\u0435\u0434\u043E\u0432\u0438","menu.array.delete column":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0458\u0430 \u043A\u043E\u043B\u043E\u043D\u0430\u0442\u0430","menu.array.delete columns":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0458\u0430 \u043A\u043E\u043B\u043E\u043D\u0430\u0442\u0430","submenu.array.insert separator":"\u0412\u043C\u0435\u0442\u043D\u0435\u0442\u0435 \u0441\u0435\u043F\u0430\u0440\u0430\u0442\u043E\u0440","menu.insert table":"\u0412\u043C\u0435\u0442\u043D\u0438 \u0442\u0430\u0431\u0435\u043B\u0430","submenu.table style":"\u0422\u0430\u0431\u0435\u043B\u0430 \u0441\u0442\u0438\u043B"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb polece\u0144 LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.alphabetic":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywr\xF3\u0107","tooltip.toggle virtual keyboard":"Prze\u0142\u0105cz wirtualn\u0105 klawiatur\u0119","tooltip.undo":"Cofnij","menu.insert matrix":"Wstaw macierz","menu.insert vector":"Wstaw wektor","submenu.array.matrix delimiters":"Ograniczniki macierzy","menu.array.add row above":"Dodaj wiersz po","menu.array.add row below":"Dodaj wiersz przed","menu.array.add column after":"Dodaj kolumn\u0119 po","menu.array.add column before":"Dodaj kolumn\u0119 przed","menu.array.delete row":"Usu\u0144 wiersz","menu.array.delete rows":"Usu\u0144 wybrane wiersze","menu.array.delete column":"Usu\u0144 kolumn\u0119","menu.array.delete columns":"Usu\u0144 wybrane kolumny","submenu.array.insert separator":"Wstaw separator","menu.insert table":"Wype\u0142nij tabel\u0119","submenu.table style":"Styl tabel\u0119"},pt:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras gregas","keyboard.tooltip.command":"Modo de Comando LaTeX","keyboard.tooltip.numeric":"Num\xE9rico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar para \xE1rea de transfer\xEAncia","tooltip.redo":"Refazer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Desfazer","menu.insert matrix":"Inserir Matriz","menu.insert vector":"Inserir vetor","submenu.array.matrix delimiters":"Delimitadores de matriz","menu.array.add row above":"Adicionar linha depois","menu.array.add row below":"Adicionar linha antes","menu.array.add column after":"Adicionar coluna depois","menu.array.add column before":"Adicionar coluna antes","menu.array.delete row":"Excluir linha","menu.array.delete rows":"Excluir linhas selecionadas","menu.array.delete column":"Apagar Coluna","menu.array.delete columns":"Excluir Colunas Selecionadas","submenu.array.insert separator":"Inserir Separador","menu.insert table":"Insira a tabela","submenu.table style":"Estilo tabela"},ro:{"keyboard.tooltip.functions":"Func\u021Bii","keyboard.tooltip.symbols":"Simboluri","keyboard.tooltip.greek":"Scrisori grece\u0219ti","keyboard.tooltip.command":"Modul de comand\u0103 latex","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.alphabetic":"Scrisori romane","tooltip.copy to clipboard":"Copia\u021Bi \xEEn clipboard","tooltip.redo":"A reface","tooltip.toggle virtual keyboard":"Comuta\u021Bi tastatura virtual\u0103","tooltip.undo":"Anula","menu.insert matrix":"Introduce\u021Bi Matrix","menu.insert vector":"Insera\u021Bi Vector","submenu.array.matrix delimiters":"Delimitatori de matrice","menu.array.add row above":"Ad\u0103uga\u021Bi r\xE2ndul dup\u0103","menu.array.add row below":"Ad\u0103uga\u021Bi r\xE2ndul \xEEnainte","menu.array.add column after":"Ad\u0103uga\u021Bi o coloan\u0103 dup\u0103","menu.array.add column before":"Ad\u0103uga\u021Bi o coloan\u0103 \xEEnainte","menu.array.delete row":"\u0218terge\u021Bi r\xE2ndul","menu.array.delete rows":"\u0218terge\u021Bi r\xE2ndurile selectate","menu.array.delete column":"\u0218terge\u021Bi coloana","menu.array.delete columns":"\u0218terge\u021Bi coloanele selectate","submenu.array.insert separator":"Introduce\u021Bi separatorul","menu.insert table":"Introduce\u021Bi tabelul","submenu.table style":"Table style"},ru:{"keyboard.tooltip.functions":"\u0424\u0443\u043D\u043A\u0446\u0438\u0438","keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0432\u043E\u043B\u044B","keyboard.tooltip.greek":"\u0413\u0440\u0435\u0447\u0435\u0441\u043A\u0438\u0435 \u0431\u0443\u043A\u0432\u044B","keyboard.tooltip.command":"\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u041B\u0430\u0442\u0435\u043A\u0441","keyboard.tooltip.numeric":"\u0447\u0438\u0441\u043B\u043E\u0432\u043E\u0439","keyboard.tooltip.alphabetic":"\u041B\u0430\u0442\u0438\u043D\u0441\u043A\u0438\u0435 \u0431\u0443\u043A\u0432\u044B","tooltip.copy to clipboard":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430","tooltip.redo":"\u043F\u0435\u0440\u0435\u0434\u0435\u043B\u044B\u0432\u0430\u0442\u044C","tooltip.toggle virtual keyboard":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0438\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0443\u044E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443","tooltip.undo":"\u0440\u0430\u0441\u0441\u0442\u0435\u0433\u0438\u0432\u0430\u0442\u044C","menu.insert matrix":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043C\u0430\u0442\u0440\u0438\u0446\u0443","menu.insert vector":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0432\u0435\u043A\u0442\u043E\u0440","submenu.array.matrix delimiters":"\u041C\u0430\u0442\u0440\u0438\u0447\u043D\u044B\u0435 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u0438","menu.array.add row above":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0441\u043B\u0435","menu.array.add row below":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u0435\u0440\u0435\u0434","menu.array.add column after":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u043F\u043E\u0441\u043B\u0435","menu.array.add column before":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u043F\u0435\u0440\u0435\u0434","menu.array.delete row":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","menu.array.delete rows":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438","menu.array.delete column":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446","menu.array.delete columns":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0442\u043E\u043B\u0431\u0446\u044B","submenu.array.insert separator":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C","menu.insert table":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443","submenu.table style":"\u0422\u0430\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u0441\u0442\u0438\u043B\u044C"},sk:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symboly","keyboard.tooltip.greek":"Gr\xE9cke listy","keyboard.tooltip.command":"Pr\xEDkazov\xFD re\u017Eim LaTeX","keyboard.tooltip.numeric":"Numerick\xE9","keyboard.tooltip.alphabetic":"R\xEDmske listy","tooltip.copy to clipboard":"Skop\xEDrova\u0165 do schr\xE1nky","tooltip.redo":"Znova","tooltip.toggle virtual keyboard":"Prepn\xFA\u0165 virtu\xE1lnu kl\xE1vesnicu","tooltip.undo":"Vr\xE1tenie sp\xE4\u0165","menu.insert matrix":"Vlo\u017Ete maticu","menu.insert vector":"Vlo\u017Ete vektor","submenu.array.matrix delimiters":"Odde\u013Eova\u010De mat\xEDc","menu.array.add row above":"Pridajte riadok za","menu.array.add row below":"Pridajte riadok pred","menu.array.add column after":"Prida\u0165 st\u013Apec za","menu.array.add column before":"Pridajte st\u013Apec predt\xFDm","menu.array.delete row":"Odstr\xE1ni\u0165 riadok","menu.array.delete rows":"Odstr\xE1ni\u0165 vybrat\xE9 riadky","menu.array.delete column":"Odstr\xE1ni\u0165 st\u013Apec","menu.array.delete columns":"Odstr\xE1ni\u0165 vybrat\xE9 st\u013Apce","submenu.array.insert separator":"Vlo\u017Ete odde\u013Eova\u010D","menu.insert table":"Vlo\u017Ete tabu\u013Eku","submenu.table style":"\u0160t\xFDl tabu\u013Eky"},sl:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Gr\u0161ka pisma","keyboard.tooltip.command":"Ukazni na\u010Din LaTeX","keyboard.tooltip.numeric":"\u0160tevilsko","keyboard.tooltip.alphabetic":"Rimska pisma","tooltip.copy to clipboard":"Kopirati v odlo\u017Ei\u0161\u010De","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Preklop navidezne tipkovnice","tooltip.undo":"Razveljavi","menu.insert matrix":"Vstavi matrico","menu.insert vector":"Vstavi vektor","submenu.array.matrix delimiters":"Matri\u010Dni lo\u010Devalniki","menu.array.add row above":"Dodaj vrstico po","menu.array.add row below":"Dodaj vrstico prej","menu.array.add column after":"Dodaj stolpec po","menu.array.add column before":"Dodaj stolpec prej","menu.array.delete row":"Izbri\u0161i vrstico","menu.array.delete rows":"Izbri\u0161i izbrane vrstice","menu.array.delete column":"Izbri\u0161i stolpec","menu.array.delete columns":"Izbri\u0161i izbrane stolpce","submenu.array.insert separator":"Vstavi lo\u010Dilo","menu.insert table":"Vstavi tabelo","submenu.table style":"Tabela slog"},sq:{"keyboard.tooltip.functions":"Funksione","keyboard.tooltip.symbols":"Simbolet","keyboard.tooltip.greek":"Letrat Greke","keyboard.tooltip.command":"Modaliteti i komand\xEBs latex","keyboard.tooltip.numeric":"Numerike","keyboard.tooltip.alphabetic":"Letrat romake","tooltip.copy to clipboard":"Kopjoni n\xEB Clipboard","tooltip.redo":"Riparo","tooltip.toggle virtual keyboard":"Aktivizo tastier\xEBn virtuale","tooltip.undo":"Zhb\xEBj","menu.insert matrix":"Vendosni Matric\xEBn","menu.insert vector":"Vendos vektorin","submenu.array.matrix delimiters":"P\xEBrcaktuesit e matric\xEBs","menu.array.add row above":"Shto Rreshtin Pas","menu.array.add row below":"Shto Rreshtin Para","menu.array.add column after":"Shto kolon\xEBn pas","menu.array.add column before":"Shto kolon\xEBn para","menu.array.delete row":"Fshi Rreshtin","menu.array.delete rows":"Fshi rreshtat e zgjedhur","menu.array.delete column":"Fshi kolon\xEBn","menu.array.delete columns":"Fshi kolonat e zgjedhura","submenu.array.insert separator":"Vendos Ndar\xEBsin","menu.insert table":"Vendos tabel\xEBn","submenu.table style":"Stili tabel\xEBn"},sr:{"keyboard.tooltip.functions":"\u0424\u0443\u043D\u043A\u0446\u0438\u0458\u0435","keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0431\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u0435\u0435\u043A \u041B\u0435\u0442\u0442\u0435\u0440\u0441","keyboard.tooltip.command":"\u041B\u0430\u0422\u0435\u041A\u0441 \u043A\u043E\u043C\u0430\u043D\u0434\u043D\u0438 \u0440\u0435\u0436\u0438\u043C","keyboard.tooltip.numeric":"\u041D\u0443\u043C\u0435\u0440\u0438\u0447\u043A\u0438","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u043A\u0430 \u043F\u0438\u0441\u043C\u0430","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0438\u0440\u0430\u0458\u0442\u0435 \u0443 \u043C\u0435\u0452\u0443\u0441\u043F\u0440\u0435\u043C\u043D\u0438\u043A","tooltip.redo":"\u041F\u043E\u043D\u043E\u0432\u0438","tooltip.toggle virtual keyboard":"\u0423\u043A\u0459\u0443\u0447\u0438 / \u0438\u0441\u043A\u0459\u0443\u0447\u0438 \u0432\u0438\u0440\u0442\u0443\u0435\u043B\u043D\u0443 \u0442\u0430\u0441\u0442\u0430\u0442\u0443\u0440\u0443","tooltip.undo":"\u041E\u043F\u043E\u0437\u043E\u0432\u0438","menu.insert matrix":"\u0423\u043C\u0435\u0442\u043D\u0438 \u043C\u0430\u0442\u0440\u0438\u0446\u0443","menu.insert vector":"\u0423\u043C\u0435\u0442\u043D\u0438 \u0432\u0435\u043A\u0442\u043E\u0440","submenu.array.matrix delimiters":"\u041C\u0430\u0442\u0440\u0438\u043A \u0414\u0435\u043B\u0438\u043C\u0438\u0442\u0435\u0440\u0441","menu.array.add row above":"\u0414\u043E\u0434\u0430\u0458 \u0440\u0435\u0434 \u043F\u043E\u0441\u043B\u0435","menu.array.add row below":"\u0414\u043E\u0434\u0430\u0458 \u0440\u0435\u0434 \u043F\u0440\u0435","menu.array.add column after":"\u0414\u043E\u0434\u0430\u0458 \u043A\u043E\u043B\u043E\u043D\u0443 \u043F\u043E\u0441\u043B\u0435","menu.array.add column before":"\u0414\u043E\u0434\u0430\u0458 \u043A\u043E\u043B\u043E\u043D\u0443 \u043F\u0440\u0435","menu.array.delete row":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0440\u0435\u0434","menu.array.delete rows":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0438\u0437\u0430\u0431\u0440\u0430\u043D\u0435 \u0440\u0435\u0434\u043E\u0432\u0435","menu.array.delete column":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u043A\u043E\u043B\u043E\u043D\u0443","menu.array.delete columns":"\u0418\u0437\u0431\u0440\u0438\u0448\u0438 \u0438\u0437\u0430\u0431\u0440\u0430\u043D\u0435 \u043A\u043E\u043B\u043E\u043D\u0435","submenu.array.insert separator":"\u0423\u043C\u0435\u0442\u043D\u0438 \u0441\u0435\u043F\u0430\u0440\u0430\u0442\u043E\u0440","menu.insert table":"\u0423\u0431\u0430\u0446\u0438 \u0442\u0430\u0431\u0435\u043B\u0443","submenu.table style":"\u0422\u0430\u0431\u0435\u043B\u0430\u0440\u043D\u0438 \u0441\u0442\u0438\u043B"},sv:{"keyboard.tooltip.functions":"Funktioner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Grekiska bokst\xE4ver","keyboard.tooltip.command":"LaTeX kommandol\xE4ge","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.alphabetic":"Romerska bokst\xE4ver","tooltip.copy to clipboard":"Kopiera till Urklipp","tooltip.redo":"G\xF6ra om","tooltip.toggle virtual keyboard":"V\xE4xla virtuellt tangentbord","tooltip.undo":"\xC5ngra","menu.insert matrix":"S\xE4tt in matris","menu.insert vector":"Infoga vektor","submenu.array.matrix delimiters":"Matrisavgr\xE4nsare","menu.array.add row above":"L\xE4gg till rad efter","menu.array.add row below":"L\xE4gg till rad f\xF6re","menu.array.add column after":"L\xE4gg till kolumn efter","menu.array.add column before":"L\xE4gg till kolumn f\xF6re","menu.array.delete row":"Radera rad","menu.array.delete rows":"Ta bort valda rader","menu.array.delete column":"Ta bort kolumn","menu.array.delete columns":"Ta bort valda kolumner","submenu.array.insert separator":"S\xE4tt i separator","menu.insert table":"Infoga tabell","submenu.table style":"Tabellstil"},th:{"keyboard.tooltip.functions":"\u0E1F\u0E31\u0E07\u0E01\u0E4C\u0E0A\u0E31\u0E48\u0E19","keyboard.tooltip.symbols":"\u0E2A\u0E31\u0E0D\u0E25\u0E31\u0E01\u0E29\u0E13\u0E4C","keyboard.tooltip.greek":"\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E01\u0E23\u0E35\u0E01","keyboard.tooltip.command":"\u0E42\u0E2B\u0E21\u0E14\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 \u0E19\u0E49\u0E33\u0E22\u0E32\u0E07","keyboard.tooltip.numeric":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02","keyboard.tooltip.alphabetic":"\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E42\u0E23\u0E21\u0E31\u0E19","tooltip.copy to clipboard":"\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E04\u0E25\u0E34\u0E1B\u0E1A\u0E2D\u0E23\u0E4C\u0E14","tooltip.redo":"\u0E17\u0E33\u0E0B\u0E49\u0E33","tooltip.toggle virtual keyboard":"\u0E2A\u0E25\u0E31\u0E1A\u0E41\u0E1B\u0E49\u0E19\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E2A\u0E21\u0E37\u0E2D\u0E19","tooltip.undo":"\u0E40\u0E25\u0E34\u0E01\u0E17\u0E33","menu.insert matrix":"\u0E41\u0E17\u0E23\u0E01\u0E40\u0E21\u0E17\u0E23\u0E34\u0E01\u0E0B\u0E4C","menu.insert vector":"\u0E41\u0E17\u0E23\u0E01\u0E40\u0E27\u0E01\u0E40\u0E15\u0E2D\u0E23\u0E4C","submenu.array.matrix delimiters":"\u0E15\u0E31\u0E27\u0E04\u0E31\u0E48\u0E19\u0E40\u0E21\u0E17\u0E23\u0E34\u0E01\u0E0B\u0E4C","menu.array.add row above":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E41\u0E16\u0E27\u0E2B\u0E25\u0E31\u0E07","menu.array.add row below":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E41\u0E16\u0E27\u0E01\u0E48\u0E2D\u0E19","menu.array.add column after":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E2B\u0E25\u0E31\u0E07","menu.array.add column before":"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E01\u0E48\u0E2D\u0E19","menu.array.delete row":"\u0E25\u0E1A\u0E41\u0E16\u0E27","menu.array.delete rows":"\u0E25\u0E1A\u0E41\u0E16\u0E27\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01","menu.array.delete column":"\u0E25\u0E1A\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C","menu.array.delete columns":"\u0E25\u0E1A\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01","submenu.array.insert separator":"\u0E15\u0E31\u0E27\u0E04\u0E31\u0E48\u0E19\u0E41\u0E17\u0E23\u0E01","menu.insert table":"\u0E41\u0E17\u0E23\u0E01\u0E15\u0E32\u0E23\u0E32\u0E07","submenu.table style":"\u0E2A\u0E44\u0E15\u0E25\u0E4C\u0E15\u0E32\u0E23\u0E32\u0E07"},tr:{"keyboard.tooltip.functions":"Fonksiyonlar","keyboard.tooltip.symbols":"Semboller","keyboard.tooltip.greek":"Yunan harfleri","keyboard.tooltip.command":"LaTeX Komut Modu","keyboard.tooltip.numeric":"Say\u0131sal","keyboard.tooltip.alphabetic":"Roma Harfleri","tooltip.copy to clipboard":"Panoya kopyala","tooltip.redo":"Yeniden yap","tooltip.toggle virtual keyboard":"Sanal Klavyeyi A\xE7/Kapat","tooltip.undo":"Geri alma","menu.insert matrix":"Matris Ekle","menu.insert vector":"Vekt\xF6r Ekle","submenu.array.matrix delimiters":"Matris S\u0131n\u0131rlay\u0131c\u0131lar","menu.array.add row above":"Sat\u0131rdan Sonra Ekle","menu.array.add row below":"\xD6nce Sat\u0131r Ekle","menu.array.add column after":"Sonra S\xFCtun Ekle","menu.array.add column before":"\xD6nce S\xFCtun Ekle","menu.array.delete row":"S\u0131ray\u0131 sil","menu.array.delete rows":"Se\xE7ili Sat\u0131rlar\u0131 Sil","menu.array.delete column":"S\xFCtunu Sil","menu.array.delete columns":"Se\xE7ili S\xFCtunlar\u0131 Sil","submenu.array.insert separator":"Ay\u0131r\u0131c\u0131 Ekle","menu.insert table":"Tablo Ekle","submenu.table style":"Tablo Stili"},uk:{"keyboard.tooltip.functions":"\u0424\u0443\u043D\u043A\u0446\u0456\u0457","keyboard.tooltip.symbols":"\u0421\u0438\u043C\u0432\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u0435\u0446\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","keyboard.tooltip.command":"\u041A\u043E\u043C\u0430\u043D\u0434\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C \u043B\u0430\u0442\u0435\u043A\u0441\u0443","keyboard.tooltip.numeric":"\u0427\u0438\u0441\u043B\u043E\u0432\u0438\u0439","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.redo":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438","tooltip.toggle virtual keyboard":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0438 \u0432\u0456\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0443 \u043A\u043B\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443","tooltip.undo":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","menu.insert matrix":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043C\u0430\u0442\u0440\u0438\u0446\u044E","menu.insert vector":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0432\u0435\u043A\u0442\u043E\u0440","submenu.array.matrix delimiters":"\u041C\u0430\u0442\u0440\u0438\u0447\u043D\u0456 \u0440\u043E\u0437\u0434\u0456\u043B\u044C\u043D\u0438\u043A\u0438","menu.array.add row above":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u043F\u0456\u0441\u043B\u044F","menu.array.add row below":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u0434\u043E","menu.array.add column after":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0456\u0441\u043B\u044F","menu.array.add column before":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0435\u0440\u0435\u0434","menu.array.delete row":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0440\u044F\u0434\u043E\u043A","menu.array.delete rows":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0440\u044F\u0434\u043A\u0438","menu.array.delete column":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C","menu.array.delete columns":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0441\u0442\u043E\u0432\u043F\u0446\u0456","submenu.array.insert separator":"\u0412\u0441\u0442\u0430\u0432\u0442\u0435 \u0440\u043E\u0437\u0434\u0456\u043B\u044C\u043D\u0438\u043A","menu.insert table":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044E","submenu.table style":"\u0421\u0442\u0438\u043B\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0456"},vi:{"keyboard.tooltip.functions":"Ch\u1EE9c n\u0103ng","keyboard.tooltip.symbols":"K\xFD hi\u1EC7u","keyboard.tooltip.greek":"Ch\u1EEF Hy L\u1EA1p","keyboard.tooltip.command":"Ch\u1EBF \u0111\u1ED9 l\u1EC7nh LaTeX","keyboard.tooltip.numeric":"S\u1ED1","keyboard.tooltip.alphabetic":"Ch\u1EEF c\xE1i La m\xE3","tooltip.copy to clipboard":"Sao ch\xE9p v\xE0o clipboard","tooltip.redo":"L\xE0m l\u1EA1i","tooltip.toggle virtual keyboard":"Chuy\u1EC3n \u0111\u1ED5i b\xE0n ph\xEDm \u1EA3o","tooltip.undo":"Ho\xE0n t\xE1c","menu.insert matrix":"Ch\xE8n ma tr\u1EADn","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"D\u1EA5u ph\xE2n c\xE1ch ma tr\u1EADn","menu.array.add row above":"Th\xEAm h\xE0ng sau","menu.array.add row below":"Th\xEAm h\xE0ng tr\u01B0\u1EDBc","menu.array.add column after":"Th\xEAm c\u1ED9t sau","menu.array.add column before":"Th\xEAm c\u1ED9t tr\u01B0\u1EDBc","menu.array.delete row":"X\xF3a h\xE0ng","menu.array.delete rows":"X\xF3a h\xE0ng \u0111\xE3 ch\u1ECDn","menu.array.delete column":"X\xF3a c\u1ED9t","menu.array.delete columns":"X\xF3a c\xE1c c\u1ED9t \u0111\xE3 ch\u1ECDn","submenu.array.insert separator":"Ch\xE8n d\u1EA5u ph\xE2n c\xE1ch","menu.insert table":"Ch\xE8n b\u1EA3ng","submenu.table style":"Ki\u1EC3u b\u1EA3ng"},zh_cn:{"keyboard.tooltip.functions":"\u804C\u80FD","keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.command":"\u4E73\u80F6 \u547D\u4EE4\u6A21\u5F0F","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.insert vector":"\u63D2\u5165\u5411\u91CF","submenu.array.matrix delimiters":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","submenu.array.insert separator":"\u63D2\u5165\u5206\u9694\u7B26","menu.insert table":"\u63D2\u5165\u8868\u683C","submenu.table style":"\u8868\u683C\u6837\u5F0F"},zh_tw:{"keyboard.tooltip.functions":"\u8077\u80FD","keyboard.tooltip.symbols":"\u7B26\u865F","keyboard.tooltip.greek":"\u5E0C\u81D8\u5B57\u6BCD","keyboard.tooltip.command":"\u4E73\u81A0\u547D\u4EE4\u6A21\u5F0F","keyboard.tooltip.numeric":"\u6578\u5B57","keyboard.tooltip.alphabetic":"\u7F85\u99AC\u5B57\u6BCD","tooltip.copy to clipboard":"\u8907\u88FD\u5230\u526A\u8CBC\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u63DB\u865B\u64EC\u9375\u76E4","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9663","menu.insert vector":"\u63D2\u5165\u5411\u91CF","submenu.array.matrix delimiters":"\u77E9\u9663\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u5F8C\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u5F8C\u9762\u6DFB\u52A0\u5217","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u522A\u9664\u884C","menu.array.delete rows":"\u522A\u9664\u9078\u5B9A\u884C","menu.array.delete column":"\u522A\u9664\u5217","menu.array.delete columns":"\u522A\u9664\u9078\u5B9A\u7684\u5217","submenu.array.insert separator":"\u63D2\u5165\u5206\u9694\u7B26","menu.insert table":"\u63D2\u5165\u8868\u683C","submenu.table style":"\u8868\u683C\u6A23\u5F0F"}};function fe(){return"window"in globalThis&&"document"in globalThis}function Sa(){return"matchMedia"in window?window.matchMedia("(any-pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function lo(){return typeof navigator.vibrate=="function"}function jt(){var e,r;if(!fe())return"other";let t=(r=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?r:navigator.platform;return/^mac/i.test(t)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(t)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Ma(){if(!fe())return!0;if(/firefox/i.test(navigator.userAgent)){let t=navigator.userAgent.match(/firefox\/(\d+)/i);return t?parseInt(t[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){let t=navigator.userAgent.match(/edg\/(\d+)/i);return t?parseInt(t[1])>=79:!1}return!0}var Z={strings:ka,_locale:"",get locale(){return Z._locale||(Z._locale=fe()?navigator.language.slice(0,5):"en"),Z._locale},set locale(t){Z._locale=t},merge(t,e){if(t&&e){let r=Z._locale;Z.locale=t,Z.strings[t]=g(g({},Z.strings[t]),e),Z.locale=r}else if(t&&!e)for(let r of Object.keys(t))Z.merge(r,t[r])}};function mt(t){if(t===void 0)return;let e=Z.locale.slice(0,2),r="";if(Z.strings[Z.locale]&&(r=Z.strings[Z.locale][t]),!r&&Z.strings[e]&&(r=Z.strings[e][t]),r||(r=Z.strings.en[t]),!!r)return r}var Ol={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},zl={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},vi={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},wi={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},_a={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},Rl={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function fr(t){var u,d,m,h,y,b;let e=t.split("!"),r,i,o,n=255,a=255,s=255,l=-1,c=e.length>0&&e[0].startsWith("-");c&&(e[0]=e[0].slice(1));for(let M=0;M<e.length;M++){r=n,i=a,o=s;let k=(u=e[M].trim().match(/^([A-Za-z\d]+)/))==null?void 0:u[1],w=k==null?void 0:k.toLowerCase(),L=k&&(b=(y=(h=(m=(d=wi[w])!=null?d:wi[_a[k]])!=null?m:zl[k])!=null?h:Rl[k])!=null?y:Ol[k])!=null?b:e[M].trim(),E=L.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(E!=null&&E[1]&&E[2]&&E[3])n=Math.max(0,Math.min(255,Number.parseInt(E[1],16))),a=Math.max(0,Math.min(255,Number.parseInt(E[2],16))),s=Math.max(0,Math.min(255,Number.parseInt(E[3],16)));else if(E=L.match(/^#([\da-f]{3})$/i),E!=null&&E[1]){let B=Number.parseInt(E[1][0],16),_=Number.parseInt(E[1][1],16),O=Number.parseInt(E[1][2],16);n=Math.max(0,Math.min(255,B*16+B)),a=Math.max(0,Math.min(255,_*16+_)),s=Math.max(0,Math.min(255,O*16+O))}else if(E=L.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),E!=null&&E[1]&&E[2]&&E[3])n=Math.max(0,Math.min(255,Number.parseInt(E[1]))),a=Math.max(0,Math.min(255,Number.parseInt(E[2]))),s=Math.max(0,Math.min(255,Number.parseInt(E[3])));else return;l>=0&&(n=(1-l)*n+l*r,a=(1-l)*a+l*i,s=(1-l)*s+l*o,l=-1),M+1<e.length&&(l=Math.max(0,Math.min(100,Number.parseInt(e[++M])))/100)}return l>=0&&(n=l*n+(1-l)*r,a=l*a+(1-l)*i,s=l*s+(1-l)*o),c&&(n=255-n,a=255-a,s=255-s),"#"+("00"+Math.round(n).toString(16)).slice(-2)+("00"+Math.round(a).toString(16)).slice(-2)+("00"+Math.round(s).toString(16)).slice(-2)}function Vr(t){var e,r;return t=t.trim(),(r=(e=vi[t.toLowerCase()])!=null?e:vi[_a[t]])!=null?r:fr(t)}function Fl(t){if(!t||t[0]!=="#")return;t=t.slice(1);let e;return t.length<=4?(e={r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16)},t.length===4&&(e.a=parseInt(t[3]+t[3],16)/255)):(e={r:parseInt(t[0]+t[1],16),g:parseInt(t[2]+t[3],16),b:parseInt(t[4]+t[5],16)},t.length===8&&(e.a=parseInt(t[6]+t[7],16)/255)),e&&e.a===void 0&&(e.a=1),e}function sn(t,e,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(e-t)*r+t:r<3?e:r<4?(e-t)*(4-r)+t:t}function Nl(t){let[e,r,i]=[t.h,t.s,t.l];e=(e+360)%360/60,i=Math.max(0,Math.min(i,1)),r=Math.max(0,Math.min(r,1));let o=i<=.5?i*(r+1):i+r-i*r,n=i*2-o;return{r:Math.round(255*sn(n,o,e+2)),g:Math.round(255*sn(n,o,e)),b:Math.round(255*sn(n,o,e-2))}}function ln(t){return t<0?0:t>255?255:Math.round(t)}function Il(t){let{r:e,g:r,b:i}=t,o=((1<<24)+(ln(e)<<16)+(ln(r)<<8)+ln(i)).toString(16).slice(1);return o[0]===o[1]&&o[2]===o[3]&&o[4]===o[5]&&o[6]===o[7]&&(o=o[0]+o[2]+o[4]),"#"+o}function Vl(t){let{r:e,g:r,b:i}=t;e=e/255,r=r/255,i=i/255;let o=Math.min(e,r,i),n=Math.max(e,r,i),a=n-o,s,l;n===o?s=0:e===n?s=(r-i)/a:r===n?s=2+(i-e)/a:i===n&&(s=4+(e-r)/a),s=Math.min(s*60,360),s<0&&(s+=360);let c=(o+n)/2;return n===o?l=0:c<=.5?l=a/(n+o):l=a/(2-n-o),{h:s,s:l,l:c}}function Aa(t){let e=Fl(t);if(!e)return t;let{h:r,s:i,l:o}=Vl(e);return i+=.1,o-=.1,Il(Nl({h:r,s:i,l:o}))}var p=[0,.69444,0,0],C=[0,.61111,0,0],D=[.25,.75,0,0],K=[0,.44444,0,0],z=[0,.68611,0,0],F=[.19444,.69444,0,0],N=[0,.68333,0,0],$=[0,.68889,0,0],U=[0,.69141,0,0],J=[0,0,0,0],se=[0,.64444,0,0],ge=[0,.69224,0,0],ye=[.19444,.44444,0,0],Le=[.65002,1.15,0,0],Ee=[0,.55556,0,0],Pe=[.35001,.85,0,0],Be=[1.25003,1.75,0,0],De=[.95003,1.45,0,0],Ne=[0,.75,0,0],Ie=[0,.47534,0,0],Ze=[.25001,.75,0,0],Ye=[.55001,1.05,0,0],cn=[.16667,.68889,0,0],Qe=[.08167,.58167,0,0],La={"AMS-Regular":{32:J,65:$,66:$,67:$,68:$,69:$,70:$,71:$,72:$,73:$,74:cn,75:$,76:$,77:$,78:$,79:cn,80:$,81:cn,82:$,83:$,84:$,85:$,86:$,87:$,88:$,89:$,90:$,107:$,160:J,165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:$,295:$,710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:Qe,1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:$,8487:$,8498:$,8502:$,8503:$,8504:$,8513:$,8592:[-.03598,.46402,0,0],8594:[-.03598,.46402,0,0],8602:[-.13313,.36687,0,0],8603:[-.13313,.36687,0,0],8606:[.01354,.52239,0,0],8608:[.01354,.52239,0,0],8610:[.01354,.52239,0,0],8611:[.01354,.52239,0,0],8619:[0,.54986,0,0],8620:[0,.54986,0,0],8621:[-.13313,.37788,0,0],8622:[-.13313,.36687,0,0],8624:ge,8625:ge,8630:[0,.43056,0,0],8631:[0,.43056,0,0],8634:[.08198,.58198,0,0],8635:[.08198,.58198,0,0],8638:[.19444,.69224,0,0],8639:[.19444,.69224,0,0],8642:[.19444,.69224,0,0],8643:[.19444,.69224,0,0],8644:[.1808,.675,0,0],8646:[.1808,.675,0,0],8647:[.1808,.675,0,0],8648:[.19444,.69224,0,0],8649:[.1808,.675,0,0],8650:[.19444,.69224,0,0],8651:[.01354,.52239,0,0],8652:[.01354,.52239,0,0],8653:[-.13313,.36687,0,0],8654:[-.13313,.36687,0,0],8655:[-.13313,.36687,0,0],8666:[.13667,.63667,0,0],8667:[.13667,.63667,0,0],8669:[-.13313,.37788,0,0],8672:[-.064,.437,0,0],8674:[-.064,.437,0,0],8705:[0,.825,0,0],8708:$,8709:Qe,8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:Qe,8733:ge,8736:ge,8737:ge,8738:[.03517,.52239,0,0],8739:Qe,8740:[.25142,.74111,0,0],8741:Qe,8742:[.25142,.74111,0,0],8756:ge,8757:ge,8764:[-.13313,.36687,0,0],8765:[-.13313,.37788,0,0],8769:[-.13313,.36687,0,0],8770:[-.03625,.46375,0,0],8774:[.30274,.79383,0,0],8776:[-.01688,.48312,0,0],8778:Qe,8782:[.06062,.54986,0,0],8783:[.06062,.54986,0,0],8785:[.08198,.58198,0,0],8786:[.08198,.58198,0,0],8787:[.08198,.58198,0,0],8790:ge,8791:[.22958,.72958,0,0],8796:[.08198,.91667,0,0],8806:[.25583,.75583,0,0],8807:[.25583,.75583,0,0],8808:[.25142,.75726,0,0],8809:[.25142,.75726,0,0],8812:[.25583,.75583,0,0],8814:[.20576,.70576,0,0],8815:[.20576,.70576,0,0],8816:[.30274,.79383,0,0],8817:[.30274,.79383,0,0],8818:[.22958,.72958,0,0],8819:[.22958,.72958,0,0],8822:[.1808,.675,0,0],8823:[.1808,.675,0,0],8828:[.13667,.63667,0,0],8829:[.13667,.63667,0,0],8830:[.22958,.72958,0,0],8831:[.22958,.72958,0,0],8832:[.20576,.70576,0,0],8833:[.20576,.70576,0,0],8840:[.30274,.79383,0,0],8841:[.30274,.79383,0,0],8842:[.13597,.63597,0,0],8843:[.13597,.63597,0,0],8847:[.03517,.54986,0,0],8848:[.03517,.54986,0,0],8858:[.08198,.58198,0,0],8859:[.08198,.58198,0,0],8861:[.08198,.58198,0,0],8862:[0,.675,0,0],8863:[0,.675,0,0],8864:[0,.675,0,0],8865:[0,.675,0,0],8872:ge,8873:ge,8874:ge,8876:$,8877:$,8878:$,8879:$,8882:[.03517,.54986,0,0],8883:[.03517,.54986,0,0],8884:[.13667,.63667,0,0],8885:[.13667,.63667,0,0],8888:[0,.54986,0,0],8890:[.19444,.43056,0,0],8891:[.19444,.69224,0,0],8892:[.19444,.69224,0,0],8901:[0,.54986,0,0],8903:Qe,8905:Qe,8906:Qe,8907:ge,8908:ge,8909:[-.03598,.46402,0,0],8910:[0,.54986,0,0],8911:[0,.54986,0,0],8912:[.03517,.54986,0,0],8913:[.03517,.54986,0,0],8914:[0,.54986,0,0],8915:[0,.54986,0,0],8916:ge,8918:[.0391,.5391,0,0],8919:[.0391,.5391,0,0],8920:[.03517,.54986,0,0],8921:[.03517,.54986,0,0],8922:[.38569,.88569,0,0],8923:[.38569,.88569,0,0],8926:[.13667,.63667,0,0],8927:[.13667,.63667,0,0],8928:[.30274,.79383,0,0],8929:[.30274,.79383,0,0],8934:[.23222,.74111,0,0],8935:[.23222,.74111,0,0],8936:[.23222,.74111,0,0],8937:[.23222,.74111,0,0],8938:[.20576,.70576,0,0],8939:[.20576,.70576,0,0],8940:[.30274,.79383,0,0],8941:[.30274,.79383,0,0],8994:[.19444,.69224,0,0],8995:[.19444,.69224,0,0],9416:[.15559,.69224,0,0],9484:ge,9488:ge,9492:[0,.37788,0,0],9496:[0,.37788,0,0],9585:[.19444,.68889,0,0],9586:[.19444,.74111,0,0],9632:[0,.675,0,0],9633:[0,.675,0,0],9650:[0,.54986,0,0],9651:[0,.54986,0,0],9654:[.03517,.54986,0,0],9660:[0,.54986,0,0],9661:[0,.54986,0,0],9664:[.03517,.54986,0,0],9674:[.11111,.69224,0,0],9733:[.19444,.69224,0,0],10003:ge,10016:ge,10731:[.11111,.69224,0,0],10846:[.19444,.75583,0,0],10877:[.13667,.63667,0,0],10878:[.13667,.63667,0,0],10885:[.25583,.75583,0,0],10886:[.25583,.75583,0,0],10887:[.13597,.63597,0,0],10888:[.13597,.63597,0,0],10889:[.26167,.75726,0,0],10890:[.26167,.75726,0,0],10891:[.48256,.98256,0,0],10892:[.48256,.98256,0,0],10901:[.13667,.63667,0,0],10902:[.13667,.63667,0,0],10933:[.25142,.75726,0,0],10934:[.25142,.75726,0,0],10935:[.26167,.75726,0,0],10936:[.26167,.75726,0,0],10937:[.26167,.75726,0,0],10938:[.26167,.75726,0,0],10949:[.25583,.75583,0,0],10950:[.25583,.75583,0,0],10955:[.28481,.79383,0,0],10956:[.28481,.79383,0,0],57350:Qe,57351:Qe,57352:Qe,57353:[0,.43056,.04028,0],57356:[.25142,.75726,0,0],57357:[.25142,.75726,0,0],57358:[.41951,.91951,0,0],57359:[.30274,.79383,0,0],57360:[.30274,.79383,0,0],57361:[.41951,.91951,0,0],57366:[.25142,.75726,0,0],57367:[.25142,.75726,0,0],57368:[.25142,.75726,0,0],57369:[.25142,.75726,0,0],57370:[.13597,.63597,0,0],57371:[.13597,.63597,0,0]},"Caligraphic-Regular":{32:J,65:[0,.68333,0,.19445],66:[0,.68333,.03041,.13889],67:[0,.68333,.05834,.13889],68:[0,.68333,.02778,.08334],69:[0,.68333,.08944,.11111],70:[0,.68333,.09931,.11111],71:[.09722,.68333,.0593,.11111],72:[0,.68333,.00965,.11111],73:[0,.68333,.07382,0],74:[.09722,.68333,.18472,.16667],75:[0,.68333,.01445,.05556],76:[0,.68333,0,.13889],77:[0,.68333,0,.13889],78:[0,.68333,.14736,.08334],79:[0,.68333,.02778,.11111],80:[0,.68333,.08222,.08334],81:[.09722,.68333,0,.11111],82:[0,.68333,0,.08334],83:[0,.68333,.075,.13889],84:[0,.68333,.25417,0],85:[0,.68333,.09931,.08334],86:[0,.68333,.08222,0],87:[0,.68333,.08222,.08334],88:[0,.68333,.14643,.13889],89:[.09722,.68333,.08222,.08334],90:[0,.68333,.07944,.13889],160:J},"Fraktur-Regular":{32:J,33:U,34:U,38:U,39:U,40:[.24982,.74947,0,0],41:[.24982,.74947,0,0],42:[0,.62119,0,0],43:[.08319,.58283,0,0],44:[0,.10803,0,0],45:[.08319,.58283,0,0],46:[0,.10803,0,0],47:[.24982,.74947,0,0],48:Ie,49:Ie,50:Ie,51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:U,55:[.18906,.47534,0,0],56:U,57:[.18906,.47534,0,0],58:Ie,59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:U,65:U,66:U,67:U,68:U,69:U,70:[.12604,.69141,0,0],71:U,72:[.06302,.69141,0,0],73:U,74:[.12604,.69141,0,0],75:U,76:U,77:U,78:U,79:U,80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:U,83:U,84:U,85:U,86:U,87:U,88:U,89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:U,97:Ie,98:U,99:Ie,100:[0,.62119,0,0],101:Ie,102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:U,106:U,107:U,108:U,109:Ie,110:Ie,111:Ie,112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:Ie,115:Ie,116:[0,.62119,0,0],117:Ie,118:[0,.52396,0,0],119:[0,.52396,0,0],120:[.18906,.47534,0,0],121:[.18906,.47534,0,0],122:[.18906,.47534,0,0],160:J,8216:U,8217:U,58112:[0,.62119,0,0],58113:[0,.62119,0,0],58114:[.18906,.69141,0,0],58115:[.18906,.69141,0,0],58116:[.18906,.47534,0,0],58117:U,58118:[0,.62119,0,0],58119:Ie},"Main-Bold":{32:J,33:p,34:p,35:F,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:p,39:p,40:D,41:D,42:Ne,43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:K,46:[0,.15556,0,0],47:D,48:se,49:se,50:se,51:se,52:se,53:se,54:se,55:se,56:se,57:se,58:K,59:ye,60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:p,64:p,65:z,66:z,67:z,68:z,69:z,70:z,71:z,72:z,73:z,74:z,75:z,76:z,77:z,78:z,79:z,80:z,81:[.19444,.68611,0,0],82:z,83:z,84:z,85:z,86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:z,89:[0,.68611,.02875,0],90:z,91:D,92:D,93:D,94:p,95:[.31,.13444,.03194,0],97:K,98:p,99:K,100:p,101:K,102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:p,105:p,106:F,107:p,108:p,109:K,110:K,111:K,112:ye,113:ye,114:K,115:K,116:[0,.63492,0,0],117:K,118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:K,121:[.19444,.44444,.01597,0],122:K,123:D,124:D,125:D,126:[.35,.34444,0,0],160:J,163:p,168:p,172:K,176:p,177:[.13333,.63333,0,0],184:[.17014,0,0,0],198:z,215:[.13333,.63333,0,0],216:[.04861,.73472,0,0],223:p,230:K,247:[.13333,.63333,0,0],248:[.09722,.54167,0,0],305:K,338:z,339:K,567:ye,710:p,711:[0,.63194,0,0],713:[0,.59611,0,0],714:p,715:p,728:p,729:p,730:p,732:p,733:p,915:z,916:z,920:z,923:z,926:z,928:z,931:z,933:z,934:z,936:z,937:z,8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:p,8217:p,8220:p,8221:p,8224:F,8225:F,8242:Ee,8407:[0,.72444,.15486,0],8463:p,8465:p,8467:p,8472:ye,8476:p,8501:p,8592:[-.10889,.39111,0,0],8593:F,8594:[-.10889,.39111,0,0],8595:F,8596:[-.10889,.39111,0,0],8597:D,8598:F,8599:F,8600:F,8601:F,8636:[-.10889,.39111,0,0],8637:[-.10889,.39111,0,0],8640:[-.10889,.39111,0,0],8641:[-.10889,.39111,0,0],8656:[-.10889,.39111,0,0],8657:F,8658:[-.10889,.39111,0,0],8659:F,8660:[-.10889,.39111,0,0],8661:D,8704:p,8706:[0,.69444,.06389,0],8707:p,8709:[.05556,.75,0,0],8711:z,8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:D,8726:D,8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:K,8734:K,8736:ge,8739:D,8741:D,8743:Ee,8744:Ee,8745:Ee,8746:Ee,8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:F,8771:[.00222,.50222,0,0],8776:[.02444,.52444,0,0],8781:[.00222,.50222,0,0],8801:[.00222,.50222,0,0],8804:[.19667,.69667,0,0],8805:[.19667,.69667,0,0],8810:[.08556,.58556,0,0],8811:[.08556,.58556,0,0],8826:[.08556,.58556,0,0],8827:[.08556,.58556,0,0],8834:[.08556,.58556,0,0],8835:[.08556,.58556,0,0],8838:[.19667,.69667,0,0],8839:[.19667,.69667,0,0],8846:Ee,8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:Ee,8852:Ee,8853:[.13333,.63333,0,0],8854:[.13333,.63333,0,0],8855:[.13333,.63333,0,0],8856:[.13333,.63333,0,0],8857:[.13333,.63333,0,0],8866:p,8867:p,8868:p,8869:p,8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:D,8969:D,8970:D,8971:D,8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:F,9657:[-.02778,.47222,0,0],9661:F,9667:[-.02778,.47222,0,0],9711:F,9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:Ne,9838:F,9839:F,10216:D,10217:D,10815:z,10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0],57376:F},"Main-BoldItalic":{32:J,33:[0,.69444,.11417,0],34:[0,.69444,.07939,0],35:[.19444,.69444,.06833,0],37:[.05556,.75,.12861,0],38:[0,.69444,.08528,0],39:[0,.69444,.12945,0],40:[.25,.75,.15806,0],41:[.25,.75,.03306,0],42:[0,.75,.14333,0],43:[.10333,.60333,.03306,0],44:[.19444,.14722,0,0],45:[0,.44444,.02611,0],46:[0,.14722,0,0],47:[.25,.75,.15806,0],48:[0,.64444,.13167,0],49:[0,.64444,.13167,0],50:[0,.64444,.13167,0],51:[0,.64444,.13167,0],52:[.19444,.64444,.13167,0],53:[0,.64444,.13167,0],54:[0,.64444,.13167,0],55:[.19444,.64444,.13167,0],56:[0,.64444,.13167,0],57:[0,.64444,.13167,0],58:[0,.44444,.06695,0],59:[.19444,.44444,.06695,0],61:[-.10889,.39111,.06833,0],63:[0,.69444,.11472,0],64:[0,.69444,.09208,0],65:z,66:[0,.68611,.0992,0],67:[0,.68611,.14208,0],68:[0,.68611,.09062,0],69:[0,.68611,.11431,0],70:[0,.68611,.12903,0],71:[0,.68611,.07347,0],72:[0,.68611,.17208,0],73:[0,.68611,.15681,0],74:[0,.68611,.145,0],75:[0,.68611,.14208,0],76:z,77:[0,.68611,.17208,0],78:[0,.68611,.17208,0],79:[0,.68611,.09062,0],80:[0,.68611,.0992,0],81:[.19444,.68611,.09062,0],82:[0,.68611,.02559,0],83:[0,.68611,.11264,0],84:[0,.68611,.12903,0],85:[0,.68611,.17208,0],86:[0,.68611,.18625,0],87:[0,.68611,.18625,0],88:[0,.68611,.15681,0],89:[0,.68611,.19803,0],90:[0,.68611,.14208,0],91:[.25,.75,.1875,0],93:[.25,.75,.09972,0],94:[0,.69444,.06709,0],95:[.31,.13444,.09811,0],97:[0,.44444,.09426,0],98:[0,.69444,.07861,0],99:[0,.44444,.05222,0],100:[0,.69444,.10861,0],101:[0,.44444,.085,0],102:[.19444,.69444,.21778,0],103:[.19444,.44444,.105,0],104:[0,.69444,.09426,0],105:[0,.69326,.11387,0],106:[.19444,.69326,.1672,0],107:[0,.69444,.11111,0],108:[0,.69444,.10861,0],109:[0,.44444,.09426,0],110:[0,.44444,.09426,0],111:[0,.44444,.07861,0],112:[.19444,.44444,.07861,0],113:[.19444,.44444,.105,0],114:[0,.44444,.11111,0],115:[0,.44444,.08167,0],116:[0,.63492,.09639,0],117:[0,.44444,.09426,0],118:[0,.44444,.11111,0],119:[0,.44444,.11111,0],120:[0,.44444,.12583,0],121:[.19444,.44444,.105,0],122:[0,.44444,.13889,0],126:[.35,.34444,.11472,0],160:J,168:[0,.69444,.11473,0],176:p,184:[.17014,0,0,0],198:[0,.68611,.11431,0],216:[.04861,.73472,.09062,0],223:[.19444,.69444,.09736,0],230:[0,.44444,.085,0],248:[.09722,.54167,.09458,0],305:[0,.44444,.09426,0],338:[0,.68611,.11431,0],339:[0,.44444,.085,0],567:[.19444,.44444,.04611,0],710:[0,.69444,.06709,0],711:[0,.63194,.08271,0],713:[0,.59444,.10444,0],714:[0,.69444,.08528,0],715:p,728:[0,.69444,.10333,0],729:[0,.69444,.12945,0],730:p,732:[0,.69444,.11472,0],733:[0,.69444,.11472,0],915:[0,.68611,.12903,0],916:z,920:[0,.68611,.09062,0],923:z,926:[0,.68611,.15092,0],928:[0,.68611,.17208,0],931:[0,.68611,.11431,0],933:[0,.68611,.10778,0],934:[0,.68611,.05632,0],936:[0,.68611,.10778,0],937:[0,.68611,.0992,0],8211:[0,.44444,.09811,0],8212:[0,.44444,.09811,0],8216:[0,.69444,.12945,0],8217:[0,.69444,.12945,0],8220:[0,.69444,.16772,0],8221:[0,.69444,.07939,0]},"Main-Italic":{32:J,33:[0,.69444,.12417,0],34:[0,.69444,.06961,0],35:[.19444,.69444,.06616,0],37:[.05556,.75,.13639,0],38:[0,.69444,.09694,0],39:[0,.69444,.12417,0],40:[.25,.75,.16194,0],41:[.25,.75,.03694,0],42:[0,.75,.14917,0],43:[.05667,.56167,.03694,0],44:[.19444,.10556,0,0],45:[0,.43056,.02826,0],46:[0,.10556,0,0],47:[.25,.75,.16194,0],48:[0,.64444,.13556,0],49:[0,.64444,.13556,0],50:[0,.64444,.13556,0],51:[0,.64444,.13556,0],52:[.19444,.64444,.13556,0],53:[0,.64444,.13556,0],54:[0,.64444,.13556,0],55:[.19444,.64444,.13556,0],56:[0,.64444,.13556,0],57:[0,.64444,.13556,0],58:[0,.43056,.0582,0],59:[.19444,.43056,.0582,0],61:[-.13313,.36687,.06616,0],63:[0,.69444,.1225,0],64:[0,.69444,.09597,0],65:N,66:[0,.68333,.10257,0],67:[0,.68333,.14528,0],68:[0,.68333,.09403,0],69:[0,.68333,.12028,0],70:[0,.68333,.13305,0],71:[0,.68333,.08722,0],72:[0,.68333,.16389,0],73:[0,.68333,.15806,0],74:[0,.68333,.14028,0],75:[0,.68333,.14528,0],76:N,77:[0,.68333,.16389,0],78:[0,.68333,.16389,0],79:[0,.68333,.09403,0],80:[0,.68333,.10257,0],81:[.19444,.68333,.09403,0],82:[0,.68333,.03868,0],83:[0,.68333,.11972,0],84:[0,.68333,.13305,0],85:[0,.68333,.16389,0],86:[0,.68333,.18361,0],87:[0,.68333,.18361,0],88:[0,.68333,.15806,0],89:[0,.68333,.19383,0],90:[0,.68333,.14528,0],91:[.25,.75,.1875,0],93:[.25,.75,.10528,0],94:[0,.69444,.06646,0],95:[.31,.12056,.09208,0],97:[0,.43056,.07671,0],98:[0,.69444,.06312,0],99:[0,.43056,.05653,0],100:[0,.69444,.10333,0],101:[0,.43056,.07514,0],102:[.19444,.69444,.21194,0],103:[.19444,.43056,.08847,0],104:[0,.69444,.07671,0],105:[0,.65536,.1019,0],106:[.19444,.65536,.14467,0],107:[0,.69444,.10764,0],108:[0,.69444,.10333,0],109:[0,.43056,.07671,0],110:[0,.43056,.07671,0],111:[0,.43056,.06312,0],112:[.19444,.43056,.06312,0],113:[.19444,.43056,.08847,0],114:[0,.43056,.10764,0],115:[0,.43056,.08208,0],116:[0,.61508,.09486,0],117:[0,.43056,.07671,0],118:[0,.43056,.10764,0],119:[0,.43056,.10764,0],120:[0,.43056,.12042,0],121:[.19444,.43056,.08847,0],122:[0,.43056,.12292,0],126:[.35,.31786,.11585,0],160:J,168:[0,.66786,.10474,0],176:p,184:[.17014,0,0,0],198:[0,.68333,.12028,0],216:[.04861,.73194,.09403,0],223:[.19444,.69444,.10514,0],230:[0,.43056,.07514,0],248:[.09722,.52778,.09194,0],338:[0,.68333,.12028,0],339:[0,.43056,.07514,0],710:[0,.69444,.06646,0],711:[0,.62847,.08295,0],713:[0,.56167,.10333,0],714:[0,.69444,.09694,0],715:p,728:[0,.69444,.10806,0],729:[0,.66786,.11752,0],730:p,732:[0,.66786,.11585,0],733:[0,.69444,.1225,0],915:[0,.68333,.13305,0],916:N,920:[0,.68333,.09403,0],923:N,926:[0,.68333,.15294,0],928:[0,.68333,.16389,0],931:[0,.68333,.12028,0],933:[0,.68333,.11111,0],934:[0,.68333,.05986,0],936:[0,.68333,.11111,0],937:[0,.68333,.10257,0],8211:[0,.43056,.09208,0],8212:[0,.43056,.09208,0],8216:[0,.69444,.12417,0],8217:[0,.69444,.12417,0],8220:[0,.69444,.1685,0],8221:[0,.69444,.06961,0],8463:$},"Main-Regular":{32:J,33:p,34:p,35:F,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:p,39:p,40:D,41:D,42:Ne,43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:D,48:se,49:se,50:se,51:se,52:se,53:se,54:se,55:se,56:se,57:se,58:[0,.43056,0,0],59:[.19444,.43056,0,0],60:[.0391,.5391,0,0],61:[-.13313,.36687,0,0],62:[.0391,.5391,0,0],63:p,64:p,65:N,66:N,67:N,68:N,69:N,70:N,71:N,72:N,73:N,74:N,75:N,76:N,77:N,78:N,79:N,80:N,81:[.19444,.68333,0,0],82:N,83:N,84:N,85:N,86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:N,89:[0,.68333,.025,0],90:N,91:D,92:D,93:D,94:p,95:[.31,.12056,.02778,0],97:[0,.43056,0,0],98:p,99:[0,.43056,0,0],100:p,101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:p,105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:p,108:p,109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.19444,.43056,0,0],113:[.19444,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.61508,0,0],117:[0,.43056,0,0],118:[0,.43056,.01389,0],119:[0,.43056,.01389,0],120:[0,.43056,0,0],121:[.19444,.43056,.01389,0],122:[0,.43056,0,0],123:D,124:D,125:D,126:[.35,.31786,0,0],160:J,163:p,167:F,168:[0,.66786,0,0],172:[0,.43056,0,0],176:p,177:[.08333,.58333,0,0],182:F,184:[.17014,0,0,0],198:N,215:[.08333,.58333,0,0],216:[.04861,.73194,0,0],223:p,230:[0,.43056,0,0],247:[.08333,.58333,0,0],248:[.09722,.52778,0,0],305:[0,.43056,0,0],338:N,339:[0,.43056,0,0],567:[.19444,.43056,0,0],710:p,711:[0,.62847,0,0],713:[0,.56778,0,0],714:p,715:p,728:p,729:[0,.66786,0,0],730:p,732:[0,.66786,0,0],733:p,915:N,916:N,920:N,923:N,926:N,928:N,931:N,933:N,934:N,936:N,937:N,8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:p,8217:p,8220:p,8221:p,8224:F,8225:F,8230:[0,.12,0,0],8242:Ee,8407:[0,.71444,.15382,0],8463:$,8465:p,8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:p,8501:p,8592:[-.13313,.36687,0,0],8593:F,8594:[-.13313,.36687,0,0],8595:F,8596:[-.13313,.36687,0,0],8597:D,8598:F,8599:F,8600:F,8601:F,8614:[.011,.511,0,0],8617:[.011,.511,0,0],8618:[.011,.511,0,0],8636:[-.13313,.36687,0,0],8637:[-.13313,.36687,0,0],8640:[-.13313,.36687,0,0],8641:[-.13313,.36687,0,0],8652:[.011,.671,0,0],8656:[-.13313,.36687,0,0],8657:F,8658:[-.13313,.36687,0,0],8659:F,8660:[-.13313,.36687,0,0],8661:D,8704:p,8706:[0,.69444,.05556,.08334],8707:p,8709:[.05556,.75,0,0],8711:N,8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:D,8726:D,8727:[-.03472,.46528,0,0],8728:[-.05555,.44445,0,0],8729:[-.05555,.44445,0,0],8730:[.2,.8,0,0],8733:[0,.43056,0,0],8734:[0,.43056,0,0],8736:ge,8739:D,8741:D,8743:Ee,8744:Ee,8745:Ee,8746:Ee,8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:F,8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:Ee,8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:Ee,8852:Ee,8853:[.08333,.58333,0,0],8854:[.08333,.58333,0,0],8855:[.08333,.58333,0,0],8856:[.08333,.58333,0,0],8857:[.08333,.58333,0,0],8866:p,8867:p,8868:p,8869:p,8872:[.249,.75,0,0],8900:[-.05555,.44445,0,0],8901:[-.05555,.44445,0,0],8902:[-.03472,.46528,0,0],8904:[.005,.505,0,0],8942:[.03,.9,0,0],8943:[-.19,.31,0,0],8945:[-.1,.82,0,0],8968:D,8969:D,8970:D,8971:D,8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:F,9657:[-.03472,.46528,0,0],9661:F,9667:[-.03472,.46528,0,0],9711:F,9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:Ne,9838:F,9839:F,10216:D,10217:D,10222:[.244,.744,0,0],10223:[.244,.744,0,0],10229:[.011,.511,0,0],10230:[.011,.511,0,0],10231:[.011,.511,0,0],10232:[.024,.525,0,0],10233:[.024,.525,0,0],10234:[.024,.525,0,0],10236:[.011,.511,0,0],10815:N,10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0],57376:F},"Math-BoldItalic":{32:J,48:K,49:K,50:K,51:ye,52:ye,53:ye,54:se,55:ye,56:se,57:ye,65:z,66:[0,.68611,.04835,0],67:[0,.68611,.06979,0],68:[0,.68611,.03194,0],69:[0,.68611,.05451,0],70:[0,.68611,.15972,0],71:z,72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:z,77:[0,.68611,.11424,0],78:[0,.68611,.11424,0],79:[0,.68611,.03194,0],80:[0,.68611,.15972,0],81:[.19444,.68611,0,0],82:[0,.68611,.00421,0],83:[0,.68611,.05382,0],84:[0,.68611,.15972,0],85:[0,.68611,.11424,0],86:[0,.68611,.25555,0],87:[0,.68611,.15972,0],88:[0,.68611,.07778,0],89:[0,.68611,.25555,0],90:[0,.68611,.06979,0],97:K,98:p,99:K,100:p,101:K,102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:p,105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:K,110:K,111:K,112:ye,113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:K,116:[0,.63492,0,0],117:K,118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:K,121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],160:J,915:[0,.68611,.15972,0],916:z,920:[0,.68611,.03194,0],923:z,926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:z,936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:K,946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:K,950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:K,954:K,955:p,956:ye,957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:K,960:[0,.44444,.03704,0],961:ye,962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:ye,967:ye,968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:p,981:F,982:[0,.44444,.03194,0],1009:ye,1013:K,57649:K,57911:ye},"Math-Italic":{32:J,48:[0,.43056,0,0],49:[0,.43056,0,0],50:[0,.43056,0,0],51:[.19444,.43056,0,0],52:[.19444,.43056,0,0],53:[.19444,.43056,0,0],54:se,55:[.19444,.43056,0,0],56:se,57:[.19444,.43056,0,0],65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:p,99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:p,105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],160:J,915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:p,956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556],57649:[0,.43056,0,.02778],57911:[.19444,.43056,0,.08334]},"SansSerif-Bold":{32:J,33:p,34:p,35:F,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:p,39:p,40:D,41:D,42:Ne,43:[.11667,.61667,0,0],44:[.10556,.13056,0,0],45:[0,.45833,0,0],46:[0,.13056,0,0],47:D,48:p,49:p,50:p,51:p,52:p,53:p,54:p,55:p,56:p,57:p,58:[0,.45833,0,0],59:[.10556,.45833,0,0],61:[-.09375,.40625,0,0],63:p,64:p,65:p,66:p,67:p,68:p,69:p,70:p,71:p,72:p,73:p,74:p,75:p,76:p,77:p,78:p,79:p,80:p,81:[.10556,.69444,0,0],82:p,83:p,84:p,85:p,86:[0,.69444,.01528,0],87:[0,.69444,.01528,0],88:p,89:[0,.69444,.0275,0],90:p,91:D,93:D,94:p,95:[.35,.10833,.03056,0],97:[0,.45833,0,0],98:p,99:[0,.45833,0,0],100:p,101:[0,.45833,0,0],102:[0,.69444,.07639,0],103:[.19444,.45833,.01528,0],104:p,105:p,106:F,107:p,108:p,109:[0,.45833,0,0],110:[0,.45833,0,0],111:[0,.45833,0,0],112:[.19444,.45833,0,0],113:[.19444,.45833,0,0],114:[0,.45833,.01528,0],115:[0,.45833,0,0],116:[0,.58929,0,0],117:[0,.45833,0,0],118:[0,.45833,.01528,0],119:[0,.45833,.01528,0],120:[0,.45833,0,0],121:[.19444,.45833,.01528,0],122:[0,.45833,0,0],126:[.35,.34444,0,0],160:J,168:p,176:p,180:p,184:[.17014,0,0,0],305:[0,.45833,0,0],567:[.19444,.45833,0,0],710:p,711:[0,.63542,0,0],713:[0,.63778,0,0],728:p,729:p,730:p,732:p,733:p,915:p,916:p,920:p,923:p,926:p,928:p,931:p,933:p,934:p,936:p,937:p,8211:[0,.45833,.03056,0],8212:[0,.45833,.03056,0],8216:p,8217:p,8220:p,8221:p},"SansSerif-Italic":{32:J,33:[0,.69444,.05733,0],34:[0,.69444,.00316,0],35:[.19444,.69444,.05087,0],36:[.05556,.75,.11156,0],37:[.05556,.75,.03126,0],38:[0,.69444,.03058,0],39:[0,.69444,.07816,0],40:[.25,.75,.13164,0],41:[.25,.75,.02536,0],42:[0,.75,.11775,0],43:[.08333,.58333,.02536,0],44:[.125,.08333,0,0],45:[0,.44444,.01946,0],46:[0,.08333,0,0],47:[.25,.75,.13164,0],48:[0,.65556,.11156,0],49:[0,.65556,.11156,0],50:[0,.65556,.11156,0],51:[0,.65556,.11156,0],52:[0,.65556,.11156,0],53:[0,.65556,.11156,0],54:[0,.65556,.11156,0],55:[0,.65556,.11156,0],56:[0,.65556,.11156,0],57:[0,.65556,.11156,0],58:[0,.44444,.02502,0],59:[.125,.44444,.02502,0],61:[-.13,.37,.05087,0],63:[0,.69444,.11809,0],64:[0,.69444,.07555,0],65:p,66:[0,.69444,.08293,0],67:[0,.69444,.11983,0],68:[0,.69444,.07555,0],69:[0,.69444,.11983,0],70:[0,.69444,.13372,0],71:[0,.69444,.11983,0],72:[0,.69444,.08094,0],73:[0,.69444,.13372,0],74:[0,.69444,.08094,0],75:[0,.69444,.11983,0],76:p,77:[0,.69444,.08094,0],78:[0,.69444,.08094,0],79:[0,.69444,.07555,0],80:[0,.69444,.08293,0],81:[.125,.69444,.07555,0],82:[0,.69444,.08293,0],83:[0,.69444,.09205,0],84:[0,.69444,.13372,0],85:[0,.69444,.08094,0],86:[0,.69444,.1615,0],87:[0,.69444,.1615,0],88:[0,.69444,.13372,0],89:[0,.69444,.17261,0],90:[0,.69444,.11983,0],91:[.25,.75,.15942,0],93:[.25,.75,.08719,0],94:[0,.69444,.0799,0],95:[.35,.09444,.08616,0],97:[0,.44444,.00981,0],98:[0,.69444,.03057,0],99:[0,.44444,.08336,0],100:[0,.69444,.09483,0],101:[0,.44444,.06778,0],102:[0,.69444,.21705,0],103:[.19444,.44444,.10836,0],104:[0,.69444,.01778,0],105:[0,.67937,.09718,0],106:[.19444,.67937,.09162,0],107:[0,.69444,.08336,0],108:[0,.69444,.09483,0],109:[0,.44444,.01778,0],110:[0,.44444,.01778,0],111:[0,.44444,.06613,0],112:[.19444,.44444,.0389,0],113:[.19444,.44444,.04169,0],114:[0,.44444,.10836,0],115:[0,.44444,.0778,0],116:[0,.57143,.07225,0],117:[0,.44444,.04169,0],118:[0,.44444,.10836,0],119:[0,.44444,.10836,0],120:[0,.44444,.09169,0],121:[.19444,.44444,.10836,0],122:[0,.44444,.08752,0],126:[.35,.32659,.08826,0],160:J,168:[0,.67937,.06385,0],176:p,184:[.17014,0,0,0],305:[0,.44444,.04169,0],567:[.19444,.44444,.04169,0],710:[0,.69444,.0799,0],711:[0,.63194,.08432,0],713:[0,.60889,.08776,0],714:[0,.69444,.09205,0],715:p,728:[0,.69444,.09483,0],729:[0,.67937,.07774,0],730:p,732:[0,.67659,.08826,0],733:[0,.69444,.09205,0],915:[0,.69444,.13372,0],916:p,920:[0,.69444,.07555,0],923:p,926:[0,.69444,.12816,0],928:[0,.69444,.08094,0],931:[0,.69444,.11983,0],933:[0,.69444,.09031,0],934:[0,.69444,.04603,0],936:[0,.69444,.09031,0],937:[0,.69444,.08293,0],8211:[0,.44444,.08616,0],8212:[0,.44444,.08616,0],8216:[0,.69444,.07816,0],8217:[0,.69444,.07816,0],8220:[0,.69444,.14205,0],8221:[0,.69444,.00316,0]},"SansSerif-Regular":{32:J,33:p,34:p,35:F,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:p,39:p,40:D,41:D,42:Ne,43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:K,46:[0,.08333,0,0],47:D,48:[0,.65556,0,0],49:[0,.65556,0,0],50:[0,.65556,0,0],51:[0,.65556,0,0],52:[0,.65556,0,0],53:[0,.65556,0,0],54:[0,.65556,0,0],55:[0,.65556,0,0],56:[0,.65556,0,0],57:[0,.65556,0,0],58:K,59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:p,64:p,65:p,66:p,67:p,68:p,69:p,70:p,71:p,72:p,73:p,74:p,75:p,76:p,77:p,78:p,79:p,80:p,81:[.125,.69444,0,0],82:p,83:p,84:p,85:p,86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:p,89:[0,.69444,.025,0],90:p,91:D,93:D,94:p,95:[.35,.09444,.02778,0],97:K,98:p,99:K,100:p,101:K,102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:p,105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:p,108:p,109:K,110:K,111:K,112:ye,113:ye,114:[0,.44444,.01389,0],115:K,116:[0,.57143,0,0],117:K,118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:K,121:[.19444,.44444,.01389,0],122:K,126:[.35,.32659,0,0],160:J,168:[0,.67937,0,0],176:p,184:[.17014,0,0,0],305:K,567:ye,710:p,711:[0,.63194,0,0],713:[0,.60889,0,0],714:p,715:p,728:p,729:[0,.67937,0,0],730:p,732:[0,.67659,0,0],733:p,915:p,916:p,920:p,923:p,926:p,928:p,931:p,933:p,934:p,936:p,937:p,8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:p,8217:p,8220:p,8221:p},"Script-Regular":{32:J,65:[0,.7,.22925,0],66:[0,.7,.04087,0],67:[0,.7,.1689,0],68:[0,.7,.09371,0],69:[0,.7,.18583,0],70:[0,.7,.13634,0],71:[0,.7,.17322,0],72:[0,.7,.29694,0],73:[0,.7,.19189,0],74:[.27778,.7,.19189,0],75:[0,.7,.31259,0],76:[0,.7,.19189,0],77:[0,.7,.15981,0],78:[0,.7,.3525,0],79:[0,.7,.08078,0],80:[0,.7,.08078,0],81:[0,.7,.03305,0],82:[0,.7,.06259,0],83:[0,.7,.19189,0],84:[0,.7,.29087,0],85:[0,.7,.25815,0],86:[0,.7,.27523,0],87:[0,.7,.27523,0],88:[0,.7,.26006,0],89:[0,.7,.2939,0],90:[0,.7,.24037,0],160:J},"Size1-Regular":{32:J,40:Pe,41:Pe,47:Pe,91:Pe,92:Pe,93:Pe,123:Pe,125:Pe,160:J,710:[0,.72222,0,0],732:[0,.72222,0,0],770:[0,.72222,0,0],771:[0,.72222,0,0],8214:[-99e-5,.601,0,0],8593:[1e-5,.6,0,0],8595:[1e-5,.6,0,0],8657:[1e-5,.6,0,0],8659:[1e-5,.6,0,0],8719:Ze,8720:Ze,8721:Ze,8730:Pe,8739:[-.00599,.606,0,0],8741:[-.00599,.606,0,0],8747:[.30612,.805,.19445,0],8748:[.306,.805,.19445,0],8749:[.306,.805,.19445,0],8750:[.30612,.805,.19445,0],8896:Ze,8897:Ze,8898:Ze,8899:Ze,8968:Pe,8969:Pe,8970:Pe,8971:Pe,9168:[-99e-5,.601,0,0],10216:Pe,10217:Pe,10752:Ze,10753:Ze,10754:Ze,10756:Ze,10758:Ze},"Size2-Regular":{32:J,40:Le,41:Le,47:Le,91:Le,92:Le,93:Le,123:Le,125:Le,160:J,710:Ne,732:Ne,770:Ne,771:Ne,8719:Ye,8720:Ye,8721:Ye,8730:Le,8747:[.86225,1.36,.44445,0],8748:[.862,1.36,.44445,0],8749:[.862,1.36,.44445,0],8750:[.86225,1.36,.44445,0],8896:Ye,8897:Ye,8898:Ye,8899:Ye,8968:Le,8969:Le,8970:Le,8971:Le,10216:Le,10217:Le,10752:Ye,10753:Ye,10754:Ye,10756:Ye,10758:Ye},"Size3-Regular":{32:J,40:De,41:De,47:De,91:De,92:De,93:De,123:De,125:De,160:J,710:Ne,732:Ne,770:Ne,771:Ne,8730:De,8968:De,8969:De,8970:De,8971:De,10216:De,10217:De},"Size4-Regular":{32:J,40:Be,41:Be,47:Be,91:Be,92:Be,93:Be,123:Be,125:Be,160:J,710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:Be,8968:Be,8969:Be,8970:Be,8971:Be,9115:[.64502,1.155,0,0],9116:[1e-5,.6,0,0],9117:[.64502,1.155,0,0],9118:[.64502,1.155,0,0],9119:[1e-5,.6,0,0],9120:[.64502,1.155,0,0],9121:[.64502,1.155,0,0],9122:[-99e-5,.601,0,0],9123:[.64502,1.155,0,0],9124:[.64502,1.155,0,0],9125:[-99e-5,.601,0,0],9126:[.64502,1.155,0,0],9127:[1e-5,.9,0,0],9128:Le,9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:Le,9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:Be,10217:Be,57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{32:J,33:C,34:C,35:C,36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:C,39:C,40:[.08333,.69444,0,0],41:[.08333,.69444,0,0],42:[0,.52083,0,0],43:[-.08056,.53055,0,0],44:[.13889,.125,0,0],45:[-.08056,.53055,0,0],46:[0,.125,0,0],47:[.08333,.69444,0,0],48:C,49:C,50:C,51:C,52:C,53:C,54:C,55:C,56:C,57:C,58:[0,.43056,0,0],59:[.13889,.43056,0,0],60:[-.05556,.55556,0,0],61:[-.19549,.41562,0,0],62:[-.05556,.55556,0,0],63:C,64:C,65:C,66:C,67:C,68:C,69:C,70:C,71:C,72:C,73:C,74:C,75:C,76:C,77:C,78:C,79:C,80:C,81:[.13889,.61111,0,0],82:C,83:C,84:C,85:C,86:C,87:C,88:C,89:C,90:C,91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:C,95:[.09514,0,0,0],96:C,97:[0,.43056,0,0],98:C,99:[0,.43056,0,0],100:C,101:[0,.43056,0,0],102:C,103:[.22222,.43056,0,0],104:C,105:C,106:[.22222,.61111,0,0],107:C,108:C,109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.22222,.43056,0,0],113:[.22222,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.55358,0,0],117:[0,.43056,0,0],118:[0,.43056,0,0],119:[0,.43056,0,0],120:[0,.43056,0,0],121:[.22222,.43056,0,0],122:[0,.43056,0,0],123:[.08333,.69444,0,0],124:[.08333,.69444,0,0],125:[.08333,.69444,0,0],126:C,127:C,160:J,176:C,184:[.19445,0,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],711:[0,.56597,0,0],713:[0,.56555,0,0],714:C,715:C,728:C,730:C,770:C,771:C,776:C,915:C,916:C,920:C,923:C,926:C,928:C,931:C,933:C,934:C,936:C,937:C,8216:C,8217:C,8242:C,9251:[.11111,.21944,0,0]}};var $l=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,Mt=10,Ke=.25,Ea=1.2,St=.431,un={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[St,St,St],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[Ke,Ke,Ke],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},ki=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],$r=5,Ca={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Ot(t,e){t===void 0&&(t=77);let r=La[e][t];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3]};if(t===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0};let i=String.fromCodePoint(t);if(i in Ca)t=Ca[i].codePointAt(0);else if($l.test(i))return t=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}var dn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},mn={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Ta={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
c -179 0 -524 -115 -524 -115
c -5 -1 -9 -5 -9 -10
c 0 -1 1 -2 1 -3
l 4 -22
c 1 -5 5 -9 11 -9
h 2
s 338 93 512 92
c 174 0 513 -92 513 -92
h 2
c 5 0 9 4 11 9
l 5 22
c 1 6 -2 12 -8 13
c 0 0 -342 115 -520 115
z
`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function Pa(t){if(mn[t]){let[c,u,d]=mn[t],m=`<span class="stretchy" style="height:${d}em"><svg width="100%" height="${d}em" viewBox="0 0 ${c} ${u}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Ta[t]}"></path></svg></span>`;return`<span style="display:inline-block;height:${d/2}em;min-width:0">${m}</span>`}let[e,r,i,o]=dn[t],n,a,s=i/1e3;e.length===3?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],a=["xMinYMin","xMidYMin","xMaxYMin"]):e.length===2?(n=["slice-1-of-2","slice-2-of-2"],a=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],a=[o]);let l=e.map((c,u)=>`<span class="${n[u]}" style=height:${s}em><svg width=400em height=${s}em viewBox="0 0 400000 ${i}" preserveAspectRatio="${a[u]} slice"><path fill="currentcolor" d="${Ta[c]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${s}em;min-width:${r}em;">${l}</span>`}function Ba(t){return dn[t]?dn[t][2]/1e3:mn[t][2]}var qr=class{constructor(e){qr._registry[e]=this}static createAtom(e,r,i){return qr._registry[e].createAtom(r,et(r,e),i)}static serialize(e,r){return e.length>0,qr._registry[e[0].mode].serialize(e,r)}static getFont(e,r,i){return qr._registry[e].getFont(r,i)}},_e=qr;_e._registry={};function Da(t){let e=[],r=[],i="NONE";for(let o of t)o.type!=="first"&&(o.mode!==i?(r.length>0&&e.push(r),r=[o],i=o.mode):r.push(o));return r.length>0&&e.push(r),e}function Ve(t,e){let r=[],i=[],o;for(let n of t)if(n.type!=="first"&&n.style){let a;e==="variant"?(a=n.style.variant,n.style.variantStyle&&n.style.variantStyle!=="up"&&(a+="-"+n.style.variantStyle)):a=n.style[e],a===o?i.push(n):(i.length>0&&r.push(i),i=[n],o=a)}return i.length>0&&r.push(i),r}function co(t){return t?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"skip",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"skip"}[t]:void 0}function gr(t){if(t.length===0)return"ord";let e=co(t[0].type),r=co(t[t.length-1].type);return e&&e===r?e:"ord"}function Si(t,e){if(typeof t=="string")return t;if(typeof t=="number"){Number.isFinite(t);let r=Math.ceil(100*t)/100;return r===0?"0":r.toString()+(e!=null?e:"")}return""}var x=class{constructor(e,r){var o,n,a,s,l;if(typeof e=="number"?this.value=String.fromCodePoint(e):typeof e=="string"?this.value=e:oe(e)?this.children=e.filter(c=>c!==null):e&&e instanceof x&&(this.children=[e]),this.type=(o=r==null?void 0:r.type)!=null?o:"skip",this.isSelected=(r==null?void 0:r.isSelected)===!0,r!=null&&r.caret&&(this.caret=r.caret),this.classes=(n=r==null?void 0:r.classes)!=null?n:"",this.isSelected&&(this.classes+=" ML__selected"),this.isTight=(a=r==null?void 0:r.isTight)!=null?a:!1,r!=null&&r.properties)for(let c of Object.keys(r.properties))this.setStyle(c,r.properties[c]);r!=null&&r.attributes&&(this.attributes=r.attributes);let i=(r==null?void 0:r.fontFamily)||"Main-Regular";if(r!=null&&r.style&&this.value&&(i=_e.getFont((s=r.mode)!=null?s:"math",this,T(g({},r.style),{letterShapeStyle:r.letterShapeStyle}))||"Main-Regular"),this.height=0,this.depth=0,this.skew=0,this.italic=0,this.maxFontSize=0,this.type==="latex")this.height=.8,this.depth=.2;else if(typeof e=="number"){let c=Ot(e,i);this.height=c.height,this.depth=c.depth,this.skew=c.skew,this.italic=c.italic}else if(this.value){this.height=-1/0,this.depth=-1/0,this.skew=-1/0,this.italic=-1/0;for(let c=0;c<this.value.length;c++){let u=Ot(this.value.codePointAt(c),i||"Main-Regular");this.height=Math.max(this.height,u.height),this.depth=Math.max(this.depth,u.depth),this.skew=u.skew,this.italic=u.italic}}else if(this.children&&this.children.length>0)if(this.children.length===1){let c=this.children[0];this.height=c.height,this.depth=c.depth,this.maxFontSize=c.maxFontSize,this.skew=c.skew,this.italic=c.italic}else{let c=-1/0,u=-1/0,d=0;for(let m of this.children)m.height>c&&(c=m.height),m.depth>u&&(u=m.depth),d=Math.max(d,(l=m.maxFontSize)!=null?l:0);this.height=c,this.depth=u,this.maxFontSize=d}(r==null?void 0:r.height)!==void 0&&(this.height=r.height),(r==null?void 0:r.depth)!==void 0&&(this.depth=r.depth),(r==null?void 0:r.maxFontSize)!==void 0&&(this.maxFontSize=r.maxFontSize)}set atomID(e){e===void 0||e.length===0||(this.attributes||(this.attributes={}),this.attributes["data-atom-id"]=e)}selected(e){if(this.isSelected!==e&&(this.isSelected=e,this.children))for(let r of this.children)r.selected(e)}setStyle(e,r,i){if(r===void 0)return;let o=Si(r,i);o.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[e]=o)}setTop(e){Number.isFinite(e)&&Math.abs(e)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=Si(e,"em"),this.height-=e,this.depth+=e)}get left(){var e;return(e=this.cssProperties)!=null&&e["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(e){Number.isFinite(e)&&(e===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=Si(e,"em")))}set right(e){Number.isFinite(e)&&(e===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=Si(e,"em")))}set width(e){Number.isFinite(e)&&(e===0?this.cssProperties&&delete this.cssProperties.width:(this.cssProperties||(this.cssProperties={}),this.cssProperties.width=Si(e,"em")))}wrap(e,r){let i=e.parent;if(!i)return this;e.isPhantom&&this.setStyle("opacity",0);let o=e.color;o===i.color&&(o=""),this.setStyle("color",o);let n=e.effectiveFontSize===i.effectiveFontSize?void 0:e.effectiveFontSize,a=e.backgroundColor;if(this.isSelected&&(a=Aa(a)),a===i.backgroundColor&&(a=""),!n&&!a&&!(r&&(r.classes||r.type)))return this;let s;a?(s=zt(this,r),s.selected(this.isSelected),s.setStyle("background-color",a),s.setStyle("display","inline-block")):s=new x(this,r);let l=e.scalingFactor;return l!==1&&s.setStyle("font-size",l*100,"%"),s}toMarkup(){var n,a,s;let e=(n=this.value)!=null?n:"";if(this.children)for(let l of this.children)e+=l.toMarkup();let r=this.classes.split(" ");r.push((a={latex:"ML__latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?a:""),this.caret==="latex"&&r.push("ML__latex-caret");let i=r.length===1?r[0]:r.filter((l,c,u)=>l.length>0&&u.indexOf(l)===c).join(" "),o="";if(e.length>0&&e!=="\u200B"||i.length>0||this.cssId||this.htmlData||this.htmlStyle||this.attributes||this.cssProperties||this.svgBody||this.svgOverlay){let l="";if(this.cssId&&(l+=` id="${this.cssId.replace(/ /g,"-")}" `),this.htmlData){let d=this.htmlData.split(",");for(let m of d){let h=m.match(/([^=]+)=(.+$)/);if(h){let y=h[1].trim().replace(/ /g,"-");y&&(l+=` data-${y}="${h[2]}" `)}else{let y=m.trim().replace(/ /g,"-");y&&(l+=` data-${y} `)}}}if(this.htmlStyle){let d=this.htmlStyle.split(";"),m="";for(let h of d){let y=h.match(/([^=]+):(.+$)/);if(y){let b=y[1].trim().replace(/ /g,"-");b&&(m+=`${b}:${y[2]};`)}}m&&(l+=` style="${m}"`)}this.attributes&&(l+=" "+Object.keys(this.attributes).map(d=>`${d}="${this.attributes[d]}"`).join(" ")),i.length>0&&(l+=` class="${i}"`);let c=this.cssProperties;if(c){let d=Object.keys(c).map(m=>`${m}:${c[m]}`).join(";");d.length>0&&(l+=` style="${d}"`)}let u="";this.svgBody?u=Pa(this.svgBody):this.svgOverlay&&(u='<span style="',u+="display: inline-block;",u+=`height:${this.height+this.depth}em;`,u+=`vertical-align:${this.depth}em;`,u+='">',u+=e,u+="</span>",u+='<svg style="position:absolute;overflow:overlay;',u+=`height:${this.height+this.depth}em;`,(s=this.cssProperties)!=null&&s.padding?(u+=`top:${this.cssProperties.padding}em;`,u+=`left:${this.cssProperties.padding}em;`,u+=`width:calc(100% - 2 * ${this.cssProperties.padding}em );`):u+="top:0;left:0;width:100%;",u+="z-index:2;",u+='"',this.svgStyle&&(u+=` style="${this.svgStyle}"`),u+=`>${this.svgOverlay}</svg>`),o=`<span${l}>${e}${u}</span>`}return this.caret==="text"?o+='<span class="ML__text-caret"></span>':this.caret==="math"&&(o+='<span class="ML__caret"></span>'),o}tryCoalesceWith(e){if(this.svgBody||!this.value||e.svgBody||!e.value)return!1;let r=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(r||i)return!1;if(e.cssProperties||this.cssProperties){for(let l of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(e.cssProperties&&l in e.cssProperties||this.cssProperties&&l in this.cssProperties)return!1}let o=this.cssProperties?Object.keys(this.cssProperties).length:0,n=e.cssProperties?Object.keys(e.cssProperties).length:0;if(o!==n)return!1;if(o>0){for(let l of Object.keys(this.cssProperties))if(this.cssProperties[l]!==e.cssProperties[l])return!1}let a=this.classes.trim().replace(/\s+/g," ").split(" "),s=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==s.length)return!1;a.sort(),s.sort();for(let[l,c]of a.entries())if(c==="vertical-separator"||c!==s[l])return!1;return this.value+=e.value,this.height=Math.max(this.height,e.height),this.depth=Math.max(this.depth,e.depth),this.maxFontSize=Math.max(this.maxFontSize,e.maxFontSize),this.italic=e.italic,!0}};function pn(t){if(t=t==null?void 0:t.filter(r=>!(r.height===0&&r.depth===0&&!r.value&&!r.classes&&!r.cssProperties)),!t||t.length===0)return[];t[0].children=pn(t[0].children);let e=[t[0]];for(let r=1;r<t.length;r++)e[e.length-1].tryCoalesceWith(t[r])||(t[r].children=pn(t[r].children),e.push(t[r]));return e}function Gt(t){return t.children&&(t.children=pn(t.children)),t}function zt(t,e){if(!t)return new x(null,e);let r=new x(null,{classes:"ML__strut"});r.setStyle("height",Math.max(0,t.height),"em");let i=[r];if(t.depth!==0){let o=new x(null,{classes:"ML__strut--bottom"});o.setStyle("height",t.height+t.depth,"em"),o.setStyle("vertical-align",-t.depth,"em"),i.push(o)}return i.push(t),new x(i,e)}function uo(t,e,r){return t.svgOverlay=e,t.svgStyle=r,t}function Hr(t){let e=Ba(t)/2,r=new x(null,{height:e+.166,depth:e-.166,maxFontSize:0});return r.svgBody=t,r}function ql(t){if("individualShift"in t){let e=t.individualShift,r=e[0],i=[r],o=-r.shift-r.box.depth,n=o;for(let a=1;a<e.length;a++){let s=e[a],l=-s.shift-n-s.box.depth,c=l-(r.box.height+r.box.depth);n=n+l,i.push(c),i.push(s),r=s}return[i,o]}if("top"in t){let e=t.top;for(let r of t.children)e-=typeof r=="number"?r:r.box.height+r.box.depth;return[t.children,e]}else{if("bottom"in t)return[t.children,-t.bottom];if("firstBaseline"in t){let e=t.firstBaseline[0];if(typeof e=="number")throw new Error("First child must be an element.");return[t.firstBaseline,-e.box.depth]}else if("shift"in t){let e=t.children[0];if(typeof e=="number")throw new Error("First child must be an element.");return[t.children,-e.box.depth-t.shift]}}return[null,0]}function Hl(t){var m;let[e,r]=ql(t);if(!e)return[[],0,0];let i=0;for(let h of e)if(typeof h!="number"){let y=h.box;i=Math.max(i,y.maxFontSize,y.height)}i+=2;let o=new x(null,{classes:"pstrut",height:i});o.setStyle("height",i,"em");let n=[],a=r,s=r,l=r;for(let h of e){if(typeof h=="number")l+=h;else{let y=h.box,b=(m=h.classes)!=null?m:[],M=new x([o,y],{classes:b.join(" "),style:h.style});y.setStyle("height",y.height+y.depth,"em"),y.setStyle("display","inline-block"),M.setStyle("top",-i-l-y.depth,"em"),h.marginLeft&&M.setStyle("margin-left",h.marginLeft,"em"),h.marginRight&&M.setStyle("margin-right",h.marginRight,"em"),n.push(M),l+=y.height+y.depth}a=Math.min(a,l),s=Math.max(s,l)}let c=new x(n,{classes:"vlist"});if(c.setStyle("height",s,"em"),a>=0)return[[new x(c,{classes:"vlist-r"})],s,-a];let u=new x(new x(null),{classes:"vlist"});u.setStyle("height",-a,"em");let d=new x(8203,{classes:"vlist-s",maxFontSize:0,height:0,depth:0});return[[new x([c,d],{classes:"vlist-r"}),new x(u,{classes:"vlist-r"})],s,-a]}var Y=class extends x{constructor(e,r){var a;let[i,o,n]=Hl(e);super(i.length===1?i[0]:i,{classes:((a=r==null?void 0:r.classes)!=null?a:"")+" vlist-t"+(i.length===2?" vlist-t2":""),height:o,depth:n,type:r==null?void 0:r.type})}};function Ka(t,e){var c,u,d,m,h;let r=t.metrics,i=new x(e.base),o=(c=e.baseShift)!=null?c:0,n=(u=e.slant)!=null?u:0,a=0,s=0;e.above&&(a=(d=e.aboveShift)!=null?d:Math.max(r.bigOpSpacing1,r.bigOpSpacing3-e.above.depth)),e.below&&(s=(m=e.belowShift)!=null?m:Math.max(r.bigOpSpacing2,r.bigOpSpacing4-e.below.height));let l=null;if(e.below&&e.above){let y=r.bigOpSpacing5+e.below.height+e.below.depth+s+i.depth+o;l=new Y({bottom:y,children:[r.bigOpSpacing5,{box:e.below,marginLeft:-n,classes:["ML__center"]},s,{box:i,classes:["ML__center"]},a,{box:e.above,marginLeft:n,classes:["ML__center"]},r.bigOpSpacing5]}).wrap(t)}else if(e.below&&!e.above)l=new Y({top:i.height-o,children:[r.bigOpSpacing5,{box:e.below,marginLeft:-n,classes:["ML__center"]},s,{box:i,classes:["ML__center"]}]}).wrap(t);else if(!e.below&&e.above){let y=i.depth+o;l=new Y({bottom:y,children:[{box:i,classes:["ML__center"]},a,{box:e.above,marginLeft:n,classes:["ML__center"]},r.bigOpSpacing5]}).wrap(t)}else{let y=i.depth+o;l=new Y({bottom:y,children:[{box:i},r.bigOpSpacing5]}).wrap(t)}return new x(l,{type:(h=e.type)!=null?h:"op"})}function Jl(t){let e=[];for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);if(i===13&&t.charCodeAt(r+1)===10&&(i=10,r++),(i===13||i===12)&&(i=10),i===0&&(i=65533),i>=55296&&i<=56319){let o=t.charCodeAt(r+1);if(o>=56320&&o<=57343){let n=i-55296,a=o-56320;i=2**16+n*2**10+a,r++}}e.push(i)}return e}var po=8205,Wl=[[po,1],[65038,2],[127995,5],[129456,4],[917536,96]],mo,Oa=[127462,127487];function za(t){var e;if(mo===void 0){mo={};for(let r of Wl)for(let i=r[0];i<=r[0]+r[1]-1;i++)mo[i]=!0}return(e=mo[t])!=null?e:!1}function Ul(t){return t>=Oa[0]&&t<=Oa[1]}function ho(t){if(/^[\u0020-\u00FF]*$/.test(t))return t;let e=[],r=Jl(t),i=0;for(;i<r.length;){let o=r[i++],n=r[i];if(n===po){let a=i-1;for(i+=2;r[i]===po;)i+=2;e.push(String.fromCodePoint(...r.slice(a,i-a+1)))}else if(za(n)){let a=i-1;for(;za(r[i]);)i+=r[i]===po?2:1;e.push(String.fromCodePoint(...r.slice(a,2*i-a-1)))}else Ul(o)?(i+=1,e.push(String.fromCodePoint(...r.slice(i-2,2)))):e.push(String.fromCodePoint(o))}return e}var hn=class{constructor(e){this.s=ho(e),this.pos=0,this.obeyspaces=!1}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){let r=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return r!=null&&r[0]?(this.pos+=r[0].length,r[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";let e=this.get();if(e==="\\"){if(!this.end()){let r=this.match(/^[a-zA-Z\*]+/);return r?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):r=this.get(),"\\"+r}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();let r=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(r)return String.fromCodePoint(Number.parseInt(r.slice(r.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let r=!1;if(/[\d?@]/.test(this.peek())&&(r=!0,this.pos+1<this.s.length)){let i=this.s[this.pos+1];r=/[^\dA-Za-z]/.test(i)}return r?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function jl(t,e){var o,n,a,s;let r=[],i=t.next();if(i&&i!=="\\relax"){if(i==="\\noexpand")i=t.next(),i&&r.push(i);else if(i==="\\obeyspaces")t.obeyspaces=!0;else if(i==="\\bgroup")r.push("<{>");else if(i==="\\egroup")r.push("<}>");else if(i==="\\string"){if(i=t.next(),i)if(i.startsWith("\\"))for(let l of i)r.push(l==="\\"?"\\backslash":l);else i==="<{>"?r.push("\\{"):i==="<space>"?r.push("~"):i==="<}>"&&r.push("\\}")}else if(i==="\\csname"){for(;t.peek()==="<space>";)t.next();let l="",c=!1,u=[];do{if(u.length===0)if(/^#[\d?@]$/.test(t.peek())){let d=t.get().slice(1);u=Mi((n=(o=e==null?void 0:e(d))!=null?o:e==null?void 0:e("?"))!=null?n:"\\placeholder{}",e),i=u[0]}else i=t.next(),u=i?[i]:[];c=u.length===0,!c&&i==="\\endcsname"&&(c=!0,u.shift()),c||(c=i==="<$>"||i==="<$$>"||i==="<{>"||i==="<}>"||typeof i=="string"&&i.length>1&&i.startsWith("\\")),c||(l+=u.shift())}while(!c);l&&r.push("\\"+l),r.push(...u)}else if(i!=="\\endcsname")if(i.length>1&&i.startsWith("#")){let l=i.slice(1);r.push(...Mi((s=(a=e==null?void 0:e(l))!=null?a:e==null?void 0:e("?"))!=null?s:"\\placeholder{}",e))}else r.push(i)}return r}function Mi(t,e=null){let r=[],i="";for(let a of t.toString().split(/\r?\n/)){i&&r.push(i),i=" ";let s=a.match(/((?:\\%)|[^%])*/);s!==null&&r.push(s[0])}let o=new hn(r.join("")),n=[];do n.push(...jl(o,e));while(!o.end());return n}function j(t){let e="",r=[];for(let i of t)i&&(e&&/^[a-zA-Z\*]/.test(i)&&r.push(e),r.push(i),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(i)&&r.push(" "),e=/\\[a-zA-Z]+\*?$/.test(i)?" ":"");return r.join("")}function R(t,...e){return t.startsWith("\\"),e.length===0?t:j([t,...e.map(r=>`{${r}}`)])}function yr(t){return j(t.map(e=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])!=null?r:e}))}var fo=7,Li=6,fn=5,Jr=4,Ai=3,tt=2,Wr=1,Oe=0,_t=class{constructor(e,r,i){this.id=e,this.sizeDelta=r,this.cramped=i;let o={"-4":2,"-3":1,0:0}[r];this.metrics=Object.keys(un).reduce((n,a)=>T(g({},n),{[a]:un[a][o]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return pt[[Oe,Wr,Oe,Wr,tt,Ai,tt,Ai][this.id]]}get sub(){return pt[[Oe,Oe,Oe,Oe,tt,tt,tt,tt][this.id]]}get fracNum(){return pt[[Oe,Wr,Oe,Wr,tt,Ai,Jr,fn][this.id]]}get fracDen(){return pt[[Oe,Oe,Oe,Oe,tt,tt,Jr,Jr][this.id]]}get cramp(){return pt[[Oe,Oe,tt,tt,Jr,Jr,Li,Li][this.id]]}get isTight(){return this.sizeDelta<0}},_i={7:new _t(fo,0,!1),6:new _t(Li,0,!0),5:new _t(fn,0,!1),4:new _t(Jr,0,!0),3:new _t(Ai,-3,!1),2:new _t(tt,-3,!0),1:new _t(Wr,-4,!1),0:new _t(Oe,-4,!0)},pt=T(g({},_i),{displaystyle:_i[fo],textstyle:_i[fn],scriptstyle:_i[Ai],scriptscriptstyle:_i[Wr]});function yn(t,e){var i;if(!t)return 0;let r={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:Mt,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(i=t.unit)!=null?i:"pt"];if(Number.isFinite(e)){let o=10**e;return Math.round(t.dimension/Mt*r*o)/o}return t.dimension*r}function Ur(t,e){return t===null?0:yn(t,e)/Mt}function gn(t){var e;return`${t.dimension}${(e=t.unit)!=null?e:"pt"}`}function Gl(t){let e=gn(t.glue);return t.grow&&t.grow.dimension!==0&&(e+=` plus ${gn(t.grow)}`),t.shrink&&t.shrink.dimension!==0&&(e+=` minus ${gn(t.shrink)}`),e}function be(t){var r,i;if(t==null)return null;let e="";if("dimension"in t&&(e=`${t.dimension}${(r=t.unit)!=null?r:"pt"}`),"glue"in t&&(e=Gl(t)),"number"in t)if(!("base"in t)||t.base==="decimal")e=Number(t.number).toString();else if(t.base==="alpha")e=`\`${String.fromCodePoint(t.number)}`;else{let o=Math.round(t.number)>>>0,n="00000000";t.base==="hexadecimal"?(o<=255?n="00":o<=65535&&(n="0000"),e=`"${`${n}${Number(o).toString(16)}`.slice(-n.length).toUpperCase()}`):t.base==="octal"&&(o<=63?n="00":o<=30583&&(n="0000"),e=`'${`${n}${Number(o).toString(8)}`.slice(-n.length)}`)}return"register"in t&&("factor"in t&&(t.factor===-1?e="-":t.factor!==1&&(e=Number(t.factor).toString())),"global"in t&&t.global&&(e+="\\global"),e+=`\\${t.register}`),"string"in t&&(e=t.string),(i=t.relax)!=null&&i&&(e+="\\relax"),e}var Xl={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function go(){return g({},Xl)}function Ci(){return{registers:go(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Z.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:fr,backgroundColorMap:Vr,getMacro:t=>yo(t,jr())}}var P=class{constructor(e,r){var n,a,s,l,c,u,d,m,h,y,b,M,k,w,L;let i;e!=null&&e.parent?(this.parent=e.parent,i=e.parent,this.registers={}):(i=g(g({},Ci()),(n=e==null?void 0:e.from)!=null?n:{}),this.registers=i.registers),i.atomIdsSettings&&(this.atomIdsSettings=g({},i.atomIdsSettings)),this.renderPlaceholder=i.renderPlaceholder,this.isPhantom=(l=(s=e==null?void 0:e.isPhantom)!=null?s:(a=this.parent)==null?void 0:a.isPhantom)!=null?l:!1,this.letterShapeStyle=i.letterShapeStyle,this.minFontScale=i.minFontScale,r!=null&&r.color&&r.color!=="none"?this.color=r.color:this.color=(u=(c=this.parent)==null?void 0:c.color)!=null?u:"",r!=null&&r.backgroundColor&&r.backgroundColor!=="none"?this.backgroundColor=r.backgroundColor:this.backgroundColor=(m=(d=this.parent)==null?void 0:d.backgroundColor)!=null?m:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((h=this.parent)==null?void 0:h.size)?this.size=r.fontSize:this.size=(b=(y=this.parent)==null?void 0:y.size)!=null?b:$r;let o=(k=(M=this.parent)==null?void 0:M.mathstyle)!=null?k:pt.displaystyle;if(typeof(e==null?void 0:e.mathstyle)=="string"){if(i instanceof P)switch(e.mathstyle){case"cramp":o=o.cramp;break;case"superscript":o=o.sup;break;case"subscript":o=o.sub;break;case"numerator":o=o.fracNum;break;case"denominator":o=o.fracDen;break}switch(e.mathstyle){case"textstyle":o=pt.textstyle;break;case"displaystyle":o=pt.displaystyle;break;case"scriptstyle":o=pt.scriptstyle;break;case"scriptscriptstyle":o=pt.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=o,this.smartFence=i.smartFence,this.placeholderSymbol=i.placeholderSymbol,this.colorMap=(w=i.colorMap)!=null?w:E=>E,this.backgroundColorMap=(L=i.backgroundColorMap)!=null?L:E=>E,this.getMacro=i.getMacro,this.parent!==void 0||this.registers}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);let e=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,e}scale(e){return e*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===fo||this.mathstyle.id===Li}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(ki[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(e){var r;if((r=this.registers)!=null&&r[e])return this.registers[e];if(this.parent)return this.parent.getRegister(e)}getRegisterAsNumber(e){let r=this.getRegister(e);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(e){var r;if((r=this.registers)!=null&&r[e]){let i=this.registers[e];return typeof i=="object"&&"glue"in i?i:typeof i=="object"&&"dimension"in i?{glue:{dimension:i.dimension}}:typeof i=="number"?{glue:{dimension:i}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(e)}getRegisterAsEm(e,r){return Ur(this.getRegisterAsDimension(e),r)}getRegisterAsDimension(e){var r;if((r=this.registers)!=null&&r[e]){let i=this.registers[e];return typeof i=="object"&&"glue"in i?i.glue:typeof i=="object"&&"dimension"in i?i:typeof i=="number"?{dimension:i}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(e)}setRegister(e,r){if(r===void 0){delete this.registers[e];return}this.registers[e]=r}evaluate(e){if(!e||!("register"in e))return e;let r=this;if("global"in e&&e.global)for(;r.parent;)r=r.parent;let i=1;"factor"in e&&e.factor!==1&&e.factor!==void 0&&(i=e.factor);let o=r.getRegister(e.register);if(o===void 0)return;if(typeof o=="string")return{string:Number(o).toString()+o};if(typeof o=="number")return{number:i*o};let n=r.evaluate(o);if(n!==void 0)return"string"in n?{string:Number(o).toString()+n.string}:"number"in n?{number:i*n.number}:"dimension"in n?T(g({},n),{dimension:i*n.dimension}):"glue"in n?T(g({},n),{glue:T(g({},n.glue),{dimension:i*n.glue.dimension}),shrink:n.shrink?T(g({},n.shrink),{dimension:i*n.shrink.dimension}):void 0,grow:n.grow?T(g({},n.grow),{dimension:i*n.grow.dimension}):void 0}):e}toDimension(e){let r=this.evaluate(e);return r===void 0?null:"dimension"in r?r:"glue"in r?r.glue:"number"in r?{dimension:r.number}:null}toEm(e,r){if(e===null)return 0;let i=this.toDimension(e);return i===null?0:yn(i,r)/Mt}toNumber(e){if(e===null)return null;let r=this.evaluate(e);return r===void 0?null:"number"in r?r.number:"dimension"in r?r.dimension:"glue"in r?r.glue.dimension:"string"in r?Number(r.string):null}toColor(e){var i,o;if(e===null)return null;let r=this.evaluate(e);return r===void 0?null:"string"in r?(o=(i=this.colorMap)==null?void 0:i.call(this,r.string))!=null?o:r.string:null}toBackgroundColor(e){var i,o;if(e===null)return null;let r=this.evaluate(e);return r===void 0?null:"string"in r?(o=(i=this.backgroundColorMap)==null?void 0:i.call(this,r.string))!=null?o:r.string:null}};var Zt=["above","body","below","superscript","subscript"];function Xt(t){return typeof t=="string"&&Zt.includes(t)}function Ei(t){return t!==void 0&&Array.isArray(t)&&t.length===2}var f=class{constructor(e){this.id=void 0;this.verbatimLatex=void 0;this._isDirty=!1;this._changeCounter=0;this.subsupPlacement=void 0;this.explicitSubsupPlacement=!1;var r,i,o,n,a,s,l,c,u,d;this.type=e==null?void 0:e.type,typeof(e==null?void 0:e.value)=="string"&&(this.value=e.value),this.command=(i=(r=e==null?void 0:e.command)!=null?r:this.value)!=null?i:"",this.mode=(o=e==null?void 0:e.mode)!=null?o:"math",this.isFunction=(n=e==null?void 0:e.isFunction)!=null?n:!1,this.subsupPlacement=e==null?void 0:e.limits,this.style=(a=g({},e==null?void 0:e.style))!=null?a:{},this.displayContainsHighlight=(s=e==null?void 0:e.displayContainsHighlight)!=null?s:!1,this.captureSelection=(l=e==null?void 0:e.captureSelection)!=null?l:!1,this.skipBoundary=(c=e==null?void 0:e.skipBoundary)!=null?c:!1,this.verbatimLatex=(u=e==null?void 0:e.verbatimLatex)!=null?u:void 0,this.args=(d=e==null?void 0:e.args)!=null?d:void 0,e!=null&&e.body&&(this.body=e.body)}static createBox(e,r,i){var s,l,c,u;if(!r)return null;let o=((s=i==null?void 0:i.classes)!=null?s:"").trim(),n=Zl(r);if(n.length===1){let d=n[0];return d[0].style?bn(e,d,T(g({},i),{style:{color:d[0].style.color,backgroundColor:d[0].style.backgroundColor,fontSize:d[0].style.fontSize}})):bn(e,d,i)}let a=[];for(let d of n){let m=new P({parent:e},{color:(l=d[0].style)==null?void 0:l.color,backgroundColor:(c=d[0].style)==null?void 0:c.backgroundColor,fontSize:(u=d[0].style)==null?void 0:u.fontSize}),h=bn(m,d);h&&a.push(h)}return a.length===0?null:a.length===1&&!o&&!(i!=null&&i.type)?a[0].wrap(e):new x(a,{classes:o,type:i==null?void 0:i.type}).wrap(e)}static serialize(e,r){if(oe(e))return ht(e,r);if(typeof e=="number"||typeof e=="boolean")return e.toString();if(typeof e=="string")return e;if(e===void 0)return"";if(!r.expandMacro&&typeof e.verbatimLatex=="string")return e.verbatimLatex;let i=et(e.command,e.mode);return i!=null&&i.serialize?i.serialize(e,r):e.serialize(r)}static commonAncestor(e,r){if(e===r||e.parent===r.parent)return e.parent;let i=new WeakSet,{parent:o}=e;for(;o;)i.add(o),o=o.parent;for(o=r.parent;o;){if(i.has(o))return o;o=o.parent}}static fromJson(e){return typeof e=="string"?new f({type:"mord",value:e}):new f(e)}toJson(){let e={};if(this.type&&(e.type=this.type),this.mode!=="math"&&(e.mode=this.mode),this.command&&this.command!==this.value&&(e.command=this.command),this.value!==void 0&&(e.value=this.value),this.style&&Object.keys(this.style).length>0&&(e.style=g({},this.style)),this.verbatimLatex!==void 0&&(e.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(e.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(e.explicitSubsupPlacement=!0),this.isFunction&&(e.isFunction=!0),this.displayContainsHighlight&&(e.displayContainsHighlight=!0),this.isExtensibleSymbol&&(e.isExtensibleSymbol=!0),this.skipBoundary&&(e.skipBoundary=!0),this.captureSelection&&(e.captureSelection=!0),this.args&&(e.args=Fa(this.args)),this._branches)for(let r of Object.keys(this._branches))this._branches[r]&&(e[r]=this._branches[r].filter(i=>i.type!=="first").map(i=>i.toJson()));return e.type==="mord"&&Object.keys(e).length===2&&"value"in e?e.value:e}get changeCounter(){return this._changeCounter}get isDirty(){return this._isDirty}set isDirty(e){if(this._isDirty=e,e){this._changeCounter++,this.verbatimLatex=void 0,this._children=void 0;let{parent:r}=this;for(;r;)r._isDirty=!0,r._changeCounter++,r.verbatimLatex=void 0,r._children=void 0,r=r.parent}}serialize(e){var r;return this.body&&this.command?j([R(this.command,this.bodyToLatex(e)),this.supsubToLatex(e)]):this.body?j([this.bodyToLatex(e),this.supsubToLatex(e)]):this.value&&this.value!=="\u200B"?(r=this.command)!=null?r:Ra(this.mode,this.value):""}bodyToLatex(e){return ht(this.body,e)}aboveToLatex(e){return ht(this.above,e)}belowToLatex(e){return ht(this.below,e)}supsubToLatex(e){let r="";if(this.branch("subscript")!==void 0){let i=ht(this.subscript,e);i.length===0?r+="_{}":i.length===1?/^[0-9]$/.test(i)?r+=`_${i}`:r+=`_{${i}}`:r+=`_{${i}}`}if(this.branch("superscript")!==void 0){let i=ht(this.superscript,e);i.length===0?r+="^{}":i.length===1?i==="\u2032"?r+="^\\prime ":i==="\u2033"?r+="^\\doubleprime ":/^[0-9]$/.test(i)?r+=`^${i}`:r+=`^{${i}}`:r+=`^{${i}}`}return r}get treeDepth(){let e=1,r=this.parent;for(;r;)r=r.parent,e+=1;return e}get inCaptureSelection(){let e=this;for(;e;){if(e.captureSelection)return!0;e=e.parent}return!1}get parentPrompt(){let e=this.parent;for(;e;){if(e.type==="prompt"&&!e.captureSelection)return e;e=e.parent}return null}branch(e){if(Xt(e)&&this._branches)return this._branches[e]}get branches(){if(!this._branches)return[];let e=[];for(let r of Zt)this._branches[r]&&e.push(r);return e}createBranch(e){return Xt(e),Xt(e)?(this._branches?this._branches[e]||(this._branches[e]=[this.makeFirstAtom(e)]):this._branches={[e]:[this.makeFirstAtom(e)]},this.isDirty=!0,this._branches[e]):[]}get row(){return Ei(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Ei(this.parentBranch)?this.parentBranch[1]:-1}get body(){var e;return(e=this._branches)==null?void 0:e.body}set body(e){this.setChildren(e,"body")}get superscript(){var e;return(e=this._branches)==null?void 0:e.superscript}set superscript(e){this.setChildren(e,"superscript")}get subscript(){var e;return(e=this._branches)==null?void 0:e.subscript}set subscript(e){this.setChildren(e,"subscript")}get above(){var e;return(e=this._branches)==null?void 0:e.above}set above(e){this.setChildren(e,"above")}get below(){var e;return(e=this._branches)==null?void 0:e.below}set below(e){this.setChildren(e,"below")}get computedStyle(){var o,n;let e=typeof this.style.verbatimColor=="string",r=typeof this.style.verbatimBackgroundColor=="string",i=g(g({},(n=(o=this.parent)==null?void 0:o.computedStyle)!=null?n:{}),this.style);return delete i.variant,delete i.variantStyle,r||delete i.verbatimBackgroundColor,e||delete i.verbatimColor,i}applyStyle(e){this.isDirty=!0,this.style=g(g({},this.style),e),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(let r of this.children)r.applyStyle(e)}getInitialBaseElement(){var e,r,i;return this.hasEmptyBranch("body")?this:((e=this.body)==null||e[0].type,(i=(r=this.body[1])==null?void 0:r.getInitialBaseElement())!=null?i:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(e){let r=this.branch(e);return r?(r.length>0,r[0].type,r.length===1):!0}setChildren(e,r){var o;if(!e||(Xt(r),!Xt(r)))return;(o=e[0])==null||o.type;let i=[this.makeFirstAtom(r),...e];this._branches?this._branches[r]=i:this._branches={[r]:i};for(let n of e)n.parent=this,n.parentBranch=r;this.isDirty=!0}makeFirstAtom(e){let r=new f({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=e,r}addChild(e,r){e.type,this.createBranch(r).push(e),this.isDirty=!0,e.parent=this,e.parentBranch=r}addChildBefore(e,r){r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r),0,e),this.isDirty=!0,e.parent=this,e.parentBranch=r.parentBranch}addChildAfter(e,r){r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r)+1,0,e),this.isDirty=!0,e.parent=this,e.parentBranch=r.parentBranch}addChildren(e,r){let i=this.createBranch(r);for(let o of e)o.parent=this,o.parentBranch=r,i.push(o);this.isDirty=!0}addChildrenAfter(e,r){e.length===0||e[0].type,r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r)+1,0,...e),this.isDirty=!0;for(let o of e)o.parent=this,o.parentBranch=r.parentBranch;return e[e.length-1]}removeBranch(e){let r=this.branch(e);if(Xt(e)&&(this._branches[e]=void 0),!r)return[];for(let i of r)i.parent=void 0,i.parentBranch=void 0;return r[0].type,r.shift(),this.isDirty=!0,r}removeChild(e){if(e.parent,e.type==="first")return;let r=this.branch(e.parentBranch),i=r.indexOf(e);i>=0,r.splice(i,1),this.isDirty=!0,e.parent=void 0,e.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){let{siblings:e}=this;return e[e.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){this.parent;let e=this.parent.branch(this.parentBranch);return e[e.indexOf(this)-1]}get rightSibling(){this.parent;let e=this.parent.branch(this.parentBranch);return e[e.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return this.hasChildren,this.children[0]}get lastChild(){this.hasChildren;let{children:e}=this;return e[e.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];let e=[];for(let r of Zt)if(this._branches[r])for(let i of this._branches[r])e.push(...i.children),e.push(i);return this._children=e,e}render(e){if(this.type==="first"&&!e.atomIdsSettings)return null;let r=et(this.command,this.mode);if(r!=null&&r.render)return r.render(this,e);let i=new P({parent:e},this.style),o=this.createBox(i,{classes:this.parent?"":"ML__base"});return o?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(o=this.attachSupsub(i,{base:o})),o.wrap(i)):null}attachSupsub(e,r){var y;let i=r.base,o=this.superscript,n=this.subscript;if(!o&&!n)return i;let a=null,s=null,l=(y=r.isCharacterBox)!=null?y:this.isCharacterBox(),c=0;if(o){let b=new P({parent:e,mathstyle:"superscript"});a=f.createBox(b,o),l||(c=i.height-e.metrics.supDrop*b.scalingFactor)}let u=0;if(n){let b=new P({parent:e,mathstyle:"subscript"});s=f.createBox(b,n),l||(u=i.depth+e.metrics.subDrop*b.scalingFactor)}let d;e.isDisplayStyle?d=e.metrics.sup1:e.isCramped?d=e.metrics.sup3:d=e.metrics.sup2;let m=.5/Mt/e.scalingFactor,h=null;if(s&&a){c=Math.max(c,d,a.depth+.25*e.metrics.xHeight),u=Math.max(u,e.metrics.sub2);let b=e.metrics.defaultRuleThickness;if(c-a.depth-(s.height-u)<4*b){u=4*b-(c-a.depth)+s.height;let k=.8*e.metrics.xHeight-(c-a.depth);k>0&&(c+=k,u-=k)}let M=this.isExtensibleSymbol&&i.italic?-i.italic:0;h=new Y({individualShift:[{box:s,shift:u,marginLeft:M},{box:a,shift:-c}]}).wrap(e)}else s&&!a?(u=Math.max(u,e.metrics.sub1,s.height-.8*St),h=new Y({shift:u,children:[{box:s,marginRight:m,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!s&&a&&(c=Math.max(c,d,a.depth+.25*St),h=new Y({shift:-c,children:[{box:a,marginRight:m}]}),h.wrap(e));return new x([i,new x(h,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(e,r){let i=this.superscript?f.createBox(new P({parent:e,mathstyle:"superscript"},this.style),this.superscript):null,o=this.subscript?f.createBox(new P({parent:e,mathstyle:"subscript"},this.style),this.subscript):null;return!i&&!o?r.base.wrap(e):Ka(e,T(g({},r),{above:i,below:o}))}bind(e,r){if(!r||e.isPhantom||this.value==="\u200B")return r;let i=this.parent;for(;i&&!i.captureSelection;)i=i.parent;return i!=null&&i.captureSelection||(this.id||(this.id=e.makeID()),r.atomID=this.id),r}createBox(e,r){var s,l,c,u;let i=(s=this.value)!=null?s:this.body,o=(l=r==null?void 0:r.boxType)!=null?l:co(this.type),n=(c=r==null?void 0:r.classes)!=null?c:"";this.mode==="text"&&(n+=" ML__text");let a=typeof i=="string"||i===void 0?new x(i!=null?i:null,{type:o,isSelected:this.isSelected,mode:this.mode,maxFontSize:e.scalingFactor,style:T(g({variant:"normal"},this.style),{fontSize:Math.max(1,e.size+e.mathstyle.sizeDelta)}),letterShapeStyle:e.letterShapeStyle,classes:n}):(u=f.createBox(e,i,{type:o,mode:this.mode,style:this.style,classes:n}))!=null?u:new x(null);return e.isTight&&(a.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(a.italic=0),a.right=a.italic,this.bind(e,a),this.caret&&!this.superscript&&!this.subscript&&(a.caret=this.caret),a}isDigit(){var e;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((e=this.body)==null?void 0:e.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var e;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((e=this.body)==null?void 0:e.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function ht(t,e){if(!t||t.length===0)return"";if(t[0].type==="first"){if(t.length===1)return"";t=t.slice(1)}if(t.length===0)return"";let r=[];for(let i of Ve(t,"color"))for(let o of Da(i))r.push(..._e.serialize(o,e));return j(r)}function Zl(t){let e,r=[],i=[];for(let o of t)if(!e&&!o.style)i.push(o);else{let n=o.computedStyle;e&&n.color===e.color&&n.backgroundColor===e.backgroundColor&&n.fontSize===e.fontSize?i.push(o):(i.length>0&&r.push(i),i=[o],e=n)}return i.length>0&&r.push(i),r}function bn(t,e,r){var l,c,u,d;function i(m){return m.mode==="text"}if(!e||e.length===0)return null;let o=new P({parent:t},r==null?void 0:r.style),n=!((l=o.atomIdsSettings)!=null&&l.groupNumbers),a=[];if(e.length===1){let m=e[0],h=m.render(o);h&&(n&&m.isSelected&&h.selected(!0),a=[h])}else{let m="",h=!0;for(let y of e){(c=o.atomIdsSettings)!=null&&c.groupNumbers&&m&&(h&&y.isDigit()||!h&&i(y))&&(o.atomIdsSettings.overrideID=m);let b=y.render(o);o.atomIdsSettings&&(o.atomIdsSettings.overrideID=void 0),b&&((u=o.atomIdsSettings)!=null&&u.groupNumbers&&((y.isDigit()||i(y))&&(!m||h!==y.isDigit())&&(h=y.isDigit(),m=(d=y.id)!=null?d:""),m&&(!(y.isDigit()||i(y))||!y.hasEmptyBranch("superscript")||!y.hasEmptyBranch("subscript"))&&(m="")),n&&y.isSelected&&b.selected(!0),a.push(b))}}if(a.length===0)return null;let s;return r||o.isTight||a.length>1?(s=new x(a,g({type:"lift",isTight:o.isTight},r!=null?r:{})),s.isSelected=a.every(m=>m.isSelected)):s=a[0],s.wrap(o).wrap(t)}var xn={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Na=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Ia(t,e,r){if(!/[A-Za-z\d]/.test(t)||!e&&!r)return t;let i=t.codePointAt(0);if(i===void 0)return t;for(let o of Na)if((!e||o.variant===e)&&(!r||o.style===r)&&i>=o.offset&&i<o.offset+o.len){let n=o.start+i-o.offset;return String.fromCodePoint(xn[n]||n)}return t}function Va(t){var e;if((t<119808||t>120831)&&(t<8448||t>8527))return{char:String.fromCodePoint(t)};for(let r in xn)if(xn[r]===t){t=(e=r.codePointAt(0))!=null?e:0;break}for(let r of Na)if(t>=r.start&&t<r.start+r.len)return{char:String.fromCodePoint(t-r.start+r.offset),variant:r.variant,style:r.style};return{char:String.fromCodePoint(t)}}function A(t){return t?Array.isArray(t)?t:typeof t=="object"&&"group"in t?t.group:[]:[]}var Ti={},xo={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},Gr={},wn={},Yl={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},Ql={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},ec={bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace"},tc={iff:"\\;\u27FA\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",expand:!1},tripledash:"\\vphantom{-}\\raisebox{2mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}","braket.sty":{package:ec},"amsmath.sty":{package:Ql,expand:!1},"texvc.sty":{package:Yl,expand:!1}},Yt={" ":32,"\\#":35,"\\&":38,"\\$":36,"\\%":37,"\\_":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbraceleft":123,"\\textbraceright":125,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},Ha=/[\w!@*()-=+{}[\]\\';:?/.,~<>`|$%#&^" ]/,vo,Qt;Ma()?(vo=new RegExp("\\p{Letter}","u"),Qt=new RegExp("[0-9\\p{Letter}]","u")):(vo=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,Qt=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function vn(t,e,r="mord",i){e!==void 0&&(Ti[t]={definitionType:"symbol",type:r,variant:i,codepoint:e},xo[e]||(xo[e]=t),Yt[t]||(Yt[t]=e))}function ke(t,e,r){if(typeof t=="string"){for(let i=0;i<t.length;i++){let o=t.charAt(i);vn(o,o.codePointAt(0))}return}for(let[i,o,n,a]of t)vn(i,o,n!=null?n:e,a!=null?a:r)}function kn(t,e){for(let r=t;r<=e;r++)vn(String.fromCodePoint(r),r)}function Ja(t){var e;return(e=wn[t])!=null?e:null}function Wa(t,e){var o,n;if(e.length===0||e==="\\"||!e.startsWith("\\"))return[];let r=[];for(let a in Gr)a.startsWith(e)&&!Gr[a].infix&&r.push({match:a,frequency:(o=Gr[a].frequency)!=null?o:0});for(let a in Ti)a.startsWith(e)&&r.push({match:a,frequency:(n=Ti[a].frequency)!=null?n:0});let i=e.substring(1);for(let a of Object.keys(t.options.macros))a.startsWith(i)&&r.push({match:"\\"+a,frequency:0});return r.sort((a,s)=>{var l,c;return a.frequency===s.frequency?a.match.length===s.match.length?a.match<s.match?-1:1:a.match.length-s.match.length:((l=s.frequency)!=null?l:0)-((c=a.frequency)!=null?c:0)}),r.map(a=>a.match)}function $a(t){let e="auto",r=t.match(/:([^=]+)/);return r&&(e=r[1].trim()),e}function wo(t){if(!t)return[];let e=[],r=t.split("]");if(r[0].startsWith("[")){e.push({isOptional:!0,type:$a(r[0].slice(1))});for(let i=1;i<=r.length;i++)e.push(...wo(r[i]))}else if(r=t.split("}"),r[0].startsWith("{")){e.push({isOptional:!1,type:$a(r[0].slice(1))});for(let i=1;i<=r.length;i++)e.push(...wo(r[i]))}return e}function Sn(t){if(!t)return"";let e="",r=!0;for(let i of t)typeof i.value=="string"?e+=i.value:r=!1;return r?e:""}function Mn(t,e){typeof t=="string"&&(t=[t]);let r={tabular:!1,params:[],createAtom:e};for(let i of t)wn[i]=r}function At(t,e,r){typeof t=="string"&&(t=[t]);let o={tabular:!0,params:wo(e),createAtom:r};for(let n of t)wn[n]=o}function v(t,e,r){var o,n;r||(r={});let i={definitionType:"function",params:wo(e),ifMode:r.ifMode,isFunction:(o=r.isFunction)!=null?o:!1,applyMode:r.applyMode,infix:(n=r.infix)!=null?n:!1,createAtom:r.createAtom,applyStyle:r.applyStyle,serialize:r.serialize,render:r.render};if(typeof t=="string")Gr["\\"+t]=i;else for(let a of t)Gr["\\"+a]=i}var bo;function jr(t){return bo||(bo=ko(tc)),t?ko(g(g({},bo),t)):bo}function qa(t,e){var r,i,o,n;if(typeof t=="string"){let a=0,s=t;return/(^|[^\\])#1/.test(s)&&(a=1),/(^|[^\\])#2/.test(s)&&(a=2),/(^|[^\\])#3/.test(s)&&(a=3),/(^|[^\\])#4/.test(s)&&(a=4),/(^|[^\\])#5/.test(s)&&(a=5),/(^|[^\\])#6/.test(s)&&(a=6),/(^|[^\\])#7/.test(s)&&(a=7),/(^|[^\\])#8/.test(s)&&(a=8),/(^|[^\\])#9/.test(s)&&(a=9),{expand:(r=e==null?void 0:e.expand)!=null?r:!0,captureSelection:(i=e==null?void 0:e.captureSelection)!=null?i:!0,args:a,def:s}}return g({expand:(o=e==null?void 0:e.expand)!=null?o:!0,captureSelection:(n=e==null?void 0:e.captureSelection)!=null?n:!0,args:0},t)}function ko(t){if(!t)return{};let e={};for(let r of Object.keys(t)){let i=t[r];if(i==null)delete e[r];else if(typeof i=="object"&&"package"in i)for(let o of Object.keys(i.package))e[o]=qa(i.package[o],{expand:i.expand,captureSelection:i.captureSelection});else e[r]=qa(i)}return e}function et(t,e="math"){if(!t||t.length===0)return null;let r=null;if(t.startsWith("\\")){if(r=Gr[t],r)return!r.ifMode||r.ifMode===e?r:null;e==="math"?r=Ti[t]:Yt[t]&&(r={definitionType:"symbol",type:"mord",codepoint:Yt[t]})}else if(e==="math"){if(r=Ti[t],!r&&t.length===1){let i=Pi("math",t.codePointAt(0));return i.startsWith("\\")?T(g({},et(i,"math")),{command:i}):null}}else Yt[t]?r={definitionType:"symbol",type:"mord",codepoint:Yt[t]}:e==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:t.codePointAt(0)});return r&&r.definitionType==="symbol"&&r.type==="mord"&&(r.codepoint===102||r.codepoint===103||r.codepoint===104)&&(r.isFunction=!0),r!=null?r:null}function yo(t,e){if(!t.startsWith("\\"))return null;let r=t.slice(1);return e[r]}function Ra(t,e){var n;if(t==="text")return(n=Pi(t,e.codePointAt(0)))!=null?n:e;let r;if(r=Pi(t,e.codePointAt(0)),r)return r;let i=e.codePointAt(0),o=Va(i);return!o.style&&!o.variant?"":(r=o.char,o.variant&&(r="\\"+o.variant+"{"+r+"}"),o.style==="bold"?r="\\mathbf{"+r+"}":o.style==="italic"?r="\\mathit{"+r+"}":o.style==="bolditalic"&&(r="\\mathbfit{"+r+"}"),"\\mathord{"+r+"}")}function Pi(t,e){if(e===void 0)return"";if(t==="math"&&xo[e])return xo[e];if(t==="text"){let r=Object.keys(Yt).find(i=>Yt[i]===e);if(!r){let i=e.toString(16);r="^".repeat(i.length)+i}return r}return String.fromCodePoint(e)}function Fa(t){return t.map(e=>e===null?"<null>":Array.isArray(e)&&e[0]instanceof f?{atoms:e.map(r=>r.toJson())}:typeof e=="object"&&"group"in e?{group:e.group.map(r=>r.toJson())}:e)}function Ua(t){if(t&&Array.isArray(t))return t.map(e=>e==="<null>"?null:typeof e=="object"&&"group"in e?{group:e.group.map(r=>f.fromJson(r))}:"atoms"in e?e.atoms.map(r=>f.fromJson(r)):e)}var $e=class extends f{constructor(e,r,i){super({type:"text",command:e,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(i)}static fromJson(e){return new $e(e.command,e.value,e.style)}toJson(){return super.toJson()}render(e){let r=this.createBox(e);return this.caret&&(r.caret=this.caret),r}serialize(e){var r;return(r=this.verbatimLatex)!=null?r:Pi("text",this.value.codePointAt(0))}};function ja(t,e){if(t.direction===e.direction){let r=t.ranges.length;if(e.ranges.length===r){let i=0;for(;i<r&&rc(t.ranges[i],e.ranges[i])==="equal";)i++;return i===r?"equal":"different"}}return"different"}function rc(t,e){return t[0]===e[0]&&t[1]===e[1]?"equal":"different"}function xe(t){let e=1/0,r=-1/0;for(let i of t.ranges)e=Math.min(e,i[0],i[1]),r=Math.max(r,i[0],i[1]);return[e,r]}function ic(t,e){if(!e)return"";if(typeof e=="string")return e;if(!t||e.after===void 0)return e.value;let r=!1,i=!1,o=!1,n=!1,a=!1,s=!1,l=!1,c=!1,u=!1,d=!1,m=!1,h=!1,y=!1,b=!1,M=!1,k=t[0],w=0;for(;k!=null&&k.type&&/msubsup|placeholder/.test(k.type);)w+=1,k=t[w];return r=!k||k.type==="first",k&&(b=k.mode==="text",i=!b&&k.type==="mord"&&vo.test(k.value),o=!b&&k.type==="mord"&&/\d+$/.test(k.value),n=!b&&k.isFunction,a=k.type==="genfrac",s=k.type==="surd",l=k.type==="mbin",c=k.type==="mrel",u=k.type==="mop",d=k.type==="mpunct"||k.type==="minner",m=k.type==="array",h=k.type==="mopen",y=k.type==="mclose"||k.type==="leftright",M=k.type==="space"),e.after.includes("nothing")&&r||e.after.includes("letter")&&i||e.after.includes("digit")&&o||e.after.includes("function")&&n||e.after.includes("frac")&&a||e.after.includes("surd")&&s||e.after.includes("binop")&&l||e.after.includes("relop")&&c||e.after.includes("operator")&&u||e.after.includes("punct")&&d||e.after.includes("array")&&m||e.after.includes("openfence")&&h||e.after.includes("closefence")&&y||e.after.includes("text")&&b||e.after.includes("space")&&M?e.value:""}function Bi(t,e,r){return r?ic(t,r[e]):""}var So={"&":"\\&","%":"\\%","''":"^{\\doubleprime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\mod",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function xr(t,e){var i;let r=(i=e==null?void 0:e.format)!=null?i:"auto";return r==="auto"&&([r,t]=oc(t)),r==="ascii-math"?(t=t.replace(/\u2061/gu,""),t=t.replace(/\u3016/gu,"{"),t=t.replace(/\u3017/gu,"}"),t=t.replace(/([^\\])sinx/g,"$1\\sin x"),t=t.replace(/([^\\])cosx/g,"$1\\cos x "),t=t.replace(/\u2013/g,"-"),["ascii-math",ze(t,{inlineShortcuts:e==null?void 0:e.inlineShortcuts})]):["latex",t]}function ze(t,e){var n,a,s;if(!t)return"";let r=!1,i,o=(n=e.inlineShortcuts)!=null?n:So;if(!r&&(t.startsWith("^")||t.startsWith("_"))&&(i=br(t.slice(1),{inlineShortcuts:o,noWrap:!0}),t=t[0]+"{"+i.match+"}",t+=ze(i.rest,e),r=!0),r||(i=t.match(/^(sqrt|\u221A)(.*)/),i&&(i=br(i[2],{inlineShortcuts:o,noWrap:!0}),t="\\sqrt{"+((a=i.match)!=null?a:"\\placeholder{}")+"}",t+=ze(i.rest,e),r=!0)),r||(i=t.match(/^(\\cbrt|\u221B)(.*)/),i&&(i=br(i[2],{inlineShortcuts:o,noWrap:!0}),t="\\sqrt[3]{"+((s=i.match)!=null?s:"\\placeholder{}")+"}",t+=ze(i.rest,e),r=!0)),r||(i=t.match(/^abs(.*)/),i&&(i=br(i[1],{inlineShortcuts:o,noWrap:!0}),t="\\left|"+i.match+"\\right|",t+=ze(i.rest,e),r=!0)),r||(i=t.match(/^["”“](.*?)["”“](.*)/),i&&(t="\\text{"+i[1]+"}",t+=ze(i[2],e),r=!0)),r||(i=t.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),i&&(t=Ga(i[1],o),t+=ze(i[2],e),r=!0)),!r&&/^([fgh])[^a-zA-Z]/.test(t)&&(i=br(t.slice(1),{inlineShortcuts:o,noWrap:!0}),t=t[1]==="("?t[0]+"\\left("+i.match+"\\right)":t[0]+i.match,t+=ze(i.rest,e),r=!0),r||(i=t.match(/^([a-zA-Z]+)(.*)/),i&&(t=Ga(i[1],o),t+=ze(i[2],e),r=!0)),!r)if(i=br(t,{inlineShortcuts:o,noWrap:!0}),i.match&&i.rest[0]==="/"){let l=br(i.rest.slice(1),{inlineShortcuts:o,noWrap:!0});l.match&&(t="\\frac{"+i.match+"}{"+l.match+"}"+ze(l.rest,e)),r=!0}else i.match&&(t=t.startsWith("(")?"\\left("+i.match+"\\right)"+ze(i.rest,e):i.match+ze(i.rest,e),r=!0);return r||(i=t.match(/^(\s+)(.*)$/),i&&(t=" "+ze(i[2],e),r=!0)),t}function br(t,e){let r="";t=t.trim();let i=t,o=t.charAt(0),n={"(":")","{":"}","[":"]"}[o];if(n){let a=1,s=1;for(;s<t.length&&a>0;)t[s]===o&&a++,t[s]===n&&a--,s++;a===0?(e.noWrap&&o==="("?r=ze(t.substring(1,s-1),e):(o==="{"&&n==="}"&&(o="\\{",n="\\}"),r="\\left"+o+ze(t.substring(1,s-1),e)+"\\right"+n),i=t.slice(Math.max(0,s))):(r=t.substring(1,s),i="")}else{let a=t.match(/^([a-zA-Z]+)/);if(a){let s=Bi(null,t,e.inlineShortcuts);if(s)return s=s.replace("_{#?}",""),s=s.replace("^{#?}",""),{match:s,rest:t.slice(s.length)}}if(a=t.match(/^([a-zA-Z])/),a)return{match:a[1],rest:t.slice(1)};if(a=t.match(/^(-)?\d+(\.\d*)?/),a)return{match:a[0],rest:t.slice(a[0].length)};/^\\(left|right)/.test(t)||(a=t.match(/^(\\[a-zA-Z]+)/),a&&(i=t.slice(a[1].length),r=a[1]))}return{match:r,rest:i}}function Ga(t,e){let r=Bi(null,t,e);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=t,r}var _n=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Mo(t){let e=t.trim();for(let r of _n)if(e.startsWith(r[0])&&e.endsWith(r[1]))return[!0,e.substring(r[0].length,e.length-r[1].length)];return[!1,t]}function oc(t){if(t=t.trim(),t.length<=1)return["latex",t];let e;return[e,t]=Mo(t),e?["latex",t]:t.startsWith("`")&&t.endsWith("`")?(t=t.substring(1,t.length-1),["ascii-math",t]):t.includes("\\")?["latex",t]:/\$.+\$/.test(t)?["latex",`\\text{${t}}`]:[void 0,t]}var nc="$$",ac="$$",Xa=(t,e,r)=>(_n.some(i=>e.startsWith(i[0])&&e.endsWith(i[1]))||(e=`${nc} ${e} ${ac}`),e),Di=class{constructor(e){Di._modes[e]=this}static onPaste(e,r,i){var n;if(!r.contentEditable&&r.userSelect==="none")return r.model.announce("plonk"),!1;if(typeof i=="string"){let a=new DataTransfer;a.setData("text/plain",i),i=a}let o=new ClipboardEvent("paste",{clipboardData:i,cancelable:!0});return(n=r.host)!=null&&n.dispatchEvent(o)?Di._modes[e].onPaste(r,i):!1}static onCopy(e,r){var a;if(!r.clipboardData)return;if(!e.contentEditable&&e.userSelect==="none"){e.model.announce("plonk");return}let i=e.model,o=i.selectionIsCollapsed?[0,i.lastOffset]:xe(i.selection),n=i.getAtoms(o);if(n.every(s=>s.mode==="text"||!s.mode))r.clipboardData.setData("text/plain",n.filter(s=>s instanceof $e).map(s=>s.value).join(""));else if(n.every(s=>s.mode==="latex"))r.clipboardData.setData("text/plain",i.getAtoms(o,{includeChildren:!0}).map(s=>{var l;return(l=s.value)!=null?l:""}).join(""));else{let s;n.length===1&&n[0].verbatimLatex!==void 0?s=n[0].verbatimLatex:s=i.getValue(o,"latex-expanded"),r.clipboardData.setData("application/x-latex",s);try{r.clipboardData.setData("text/plain",e.options.onExport(e,s,o))}catch(l){}n.length===1&&(!n[0].parent||n[0].type==="group")&&(n=n[0].body.filter(l=>l.type!=="first"));try{r.clipboardData.setData("application/json+mathlive",JSON.stringify(n.map(l=>l.toJson())))}catch(l){}if((a=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&a.ComputeEngine){let l=window.MathfieldElement.computeEngine;if(l)try{l.jsonSerializationOptions={metadata:["latex"]};let c=l.parse(s),u=JSON.stringify(c.json);u&&r.clipboardData.setData("application/json",u)}catch(c){}}}r.preventDefault()}static insert(e,r,i={}){var n;let o=i.mode==="auto"?e.mode:(n=i.mode)!=null?n:e.mode;return Di._modes[o].insert(e,r,i)}onPaste(e,r){return!1}insert(e,r,i){return!1}},Q=Di;Q._modes={};var Za=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",command:"cutToClipboard"},{key:"cmd+x",command:"cutToClipboard"},{key:"ctrl+c",command:"copyToClipboard"},{key:"cmd+c",command:"copyToClipboard"},{key:"ctrl+v",command:"pasteFromClipboard"},{key:"cmd+v",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]}],Ya={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Xr(t,e,r,i){let o=e.split(" ");for(let n of o){let a=n.match(/(.*):(.*)/);if(a){let s=i!=null?i:{};a[2]==="active"?s.passive=!1:s[a[2]]=!0,t.addEventListener(a[1],r,s)}else t.addEventListener(n,r,i)}}function Ki(t,e,r,i){let o=e.split(" ");for(let n of o){let a=n.match(/(.*):(.*)/);if(a){let s=i!=null?i:{};a[2]==="active"?s.passive=!1:s[a[2]]=!0,t.removeEventListener(a[1],r,s)}else t.removeEventListener(n,r,i)}}function Rt(t){var e;return((e=t.element)==null?void 0:e.mathfield)===t}function sc(t){var e,r;return(r=(e=t.querySelector(".ML__caret"))!=null?e:t.querySelector(".ML__text-caret"))!=null?r:t.querySelector(".ML__latex-caret")}function Zr(t){let e=sc(t);if(!e)return null;let r=e.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function lc(t){var r;if(!t.parent)return"root";let e=(r=t.parent.id)!=null?r:"";return e+=typeof t.parentBranch=="string"?"-"+t.parentBranch:`-${t.parentBranch[0]}/${t.parentBranch[0]}`,e}function An(t,e,r){if(!e)return null;let i=t.field.getBoundingClientRect(),o=e.right-e.left,n=e.bottom-e.top,a=Math.ceil(e.left-i.left+t.field.scrollLeft*r),s=Math.ceil(e.top-i.top);return{left:a,right:a+o,top:s,bottom:s+n}}function Qa(t){let e=t.getBoundingClientRect(),r=parseInt(getComputedStyle(t).marginRight),i={top:e.top-1,bottom:e.bottom,left:e.left,right:e.right-1+r};if(t.children.length===0||t.tagName.toUpperCase()==="SVG")return i;for(let o of t.children)if(o.nodeType===1&&"atomId"in o.dataset&&!o.classList.contains("pstrut")){let n=Qa(o);i.left=Math.min(i.left,n.left),i.right=Math.max(i.right,n.right),i.top=Math.min(i.top,n.top),i.bottom=Math.max(i.bottom,n.bottom)}return i}function er(t,e){var o,n;if(!e.id)return null;let r=(n=(o=t.atomBoundsCache)==null?void 0:o.get(e.id))!=null?n:null;if(r!==null)return r;let i=t.field.querySelector(`[data-atom-id="${e.id}"]`);return r=i?Qa(i):null,t.atomBoundsCache&&(r?t.atomBoundsCache.set(e.id,r):t.atomBoundsCache.delete(e.id)),r!=null?r:null}function cc(t,e,r){let i=new Map;for(let o of t.model.getAtoms(e,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&o.style.backgroundColor)break;let n=t.field,a=parseFloat(getComputedStyle(n).width),l=n.getBoundingClientRect().width/a;l=isNaN(l)?1:l;let c=An(t,er(t,o),l);if(c){let u=lc(o);if(i.has(u)){let d=i.get(u);i.set(u,{left:Math.min(d.left,c.left),right:Math.max(d.right,c.right),top:Math.min(d.top,c.top),bottom:Math.max(d.bottom,c.bottom)})}else i.set(u,c)}}return[...i.values()]}function _o(t,e){return t.model.selection.ranges.reduce((r,i)=>r.concat(...cc(t,i,e)),[])}function Yr(t,e){return t==="*"||e==="none"?!0:e==="same-origin"?!window.origin||t===window.origin:typeof e=="function"?e(t):!1}function Ln(t){let e=0,r=0,i=t.offsetWidth,o=t.offsetHeight;for(;t instanceof HTMLElement;)e+=t.offsetTop,r+=t.offsetLeft,t=t.offsetParent;return new DOMRect(r,e,i,o)}function qe(t,e){var i;if(!e)return;let r=document.getElementById(t);if(r){let o=Number.parseInt((i=r.dataset.refcount)!=null?i:"0");r.dataset.refcount=Number(o+1).toString()}else{let o=document.createElement("style");o.id=t,o.dataset.refcount="1",o.append(document.createTextNode(e)),document.head.appendChild(o)}}function rt(t){var i;let e=document.getElementById(t);if(!e)return;let r=Number.parseInt((i=e.dataset.refcount)!=null?i:"0");r<=1?e.remove():e.dataset.refcount=Number(r-1).toString()}var Lt=class extends f{constructor(r,i,o){super({type:"accent",command:r,style:o.style});o.accentChar?this.accent=o.accentChar:this.svgAccent=o==null?void 0:o.svgAccent,this.body=i,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(r){return new Lt(r.command,r.body,{accentChar:r.accentChar,svgAccent:r.svgAccent,style:r.style})}toJson(){return T(g({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(r){var c;let i=new P({parent:r,mathstyle:"cramp"},this.style),o=(c=f.createBox(i,this.body))!=null?c:new x(null),n=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(n=o.skew);let a=Math.min(o.height,St),s;if(this.svgAccent)s=Hr(this.svgAccent),a=i.metrics.bigOpSpacing1-a;else if(this.accent){let u=new x(this.accent,{fontFamily:"Main-Regular"});u.italic=0;let d=this.accent===8407?" ML__accent-vec":"";s=new x(new x(u),{classes:"ML__accent-body"+d})}s=new Y({shift:0,children:[{box:new x(o)},-a,{box:s,marginLeft:o.left+2*n,classes:["ML__center"]}]});let l=new x(s,{type:"lift"});return this.caret&&(l.caret=this.caret),this.bind(i,l.wrap(i)),this.attachSupsub(i,{base:l})}};var Qr={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},Oi=Object.fromEntries(Object.entries(Qr).map(([t,e])=>[e,t]));function Ao(t){var e;return(e={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[t])!=null?e:t.codePointAt(0)}function uc(t,e,r,i){var a;let n=new x(Ao(t),{fontFamily:"Main-Regular",isSelected:i.isSelected}).wrap(e,{type:i.type,classes:"ML__small-delim "+((a=i.classes)!=null?a:"")});return r&&n.setTop((1-e.scalingFactor)*Ke),n}function es(t,e,r,i,o){var s,l;let n=new P({parent:i,mathstyle:"textstyle"},o==null?void 0:o.style),a=new x(Ao(t),{fontFamily:`Size${e}-Regular`,isSelected:o.isSelected,classes:((s=o.classes)!=null?s:"")+` ML__delim-size${e}`,type:(l=o.type)!=null?l:"skip"}).wrap(n);return r&&a.setTop((1-n.scalingFactor)*Ke),a}function ts(t,e,r,i,o){var Jt;let n,a,s,l;n=s=l=Ao(t),a=null;let c="Size1-Regular";t==="\\vert"||t==="\\lvert"||t==="\\rvert"||t==="\\mvert"||t==="\\mid"?s=n=l=8739:t==="\\Vert"||t==="\\lVert"||t==="\\rVert"||t==="\\mVert"||t==="\\|"?s=n=l=8741:t==="\\uparrow"?s=l=9168:t==="\\Uparrow"?s=l=8214:t==="\\downarrow"?n=s=9168:t==="\\Downarrow"?n=s=8214:t==="\\updownarrow"?(n=8593,s=9168,l=8595):t==="\\Updownarrow"?(n=8657,s=8214,l=8659):t==="["||t==="\\lbrack"?(n=9121,s=9122,l=9123,c="Size4-Regular"):t==="]"||t==="\\rbrack"?(n=9124,s=9125,l=9126,c="Size4-Regular"):t==="\\lfloor"||t==="\u230A"?(s=n=9122,l=9123,c="Size4-Regular"):t==="\\lceil"||t==="\u2308"?(n=9121,s=l=9122,c="Size4-Regular"):t==="\\rfloor"||t==="\u230B"?(s=n=9125,l=9126,c="Size4-Regular"):t==="\\rceil"||t==="\u2309"?(n=9124,s=l=9125,c="Size4-Regular"):t==="("||t==="\\lparen"?(n=9115,s=9116,l=9117,c="Size4-Regular"):t===")"||t==="\\rparen"?(n=9118,s=9119,l=9120,c="Size4-Regular"):t==="\\{"||t==="\\lbrace"?(n=9127,a=9128,l=9129,s=9130,c="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(n=9131,a=9132,l=9133,s=9130,c="Size4-Regular"):t==="\\lgroup"||t==="\u27EE"?(n=9127,l=9129,s=9130,c="Size4-Regular"):t==="\\rgroup"||t==="\u27EF"?(n=9131,l=9133,s=9130,c="Size4-Regular"):t==="\\lmoustache"||t==="\u23B0"?(n=9127,l=9133,s=9130,c="Size4-Regular"):t==="\\rmoustache"||t==="\u23B1"?(n=9131,l=9129,s=9130,c="Size4-Regular"):t==="\\surd"?(n=57345,l=9143,s=57344,c="Size4-Regular"):t==="\\ulcorner"?(n=9484,s=l=32):t==="\\urcorner"?(n=9488,s=l=32):t==="\\llcorner"?(l=9492,s=n=32):t==="\\lrcorner"&&(n=9496,s=n=32);let u=Ot(n,c),d=u.height+u.depth,m=Ot(s,c),h=m.height+m.depth,y=Ot(l,c),b=y.height+y.depth,M=0,k=1;if(a!==null){let Ae=Ot(a,c);M=Ae.height+Ae.depth,k=2}let w=d+b+M,L=Math.max(0,Math.ceil((e-w)/(k*h))),E=w+L*k*h,B=Ke;r&&(B=B*i.scalingFactor);let _=E/2-B,O=.008,V=[];V.push({box:new x(l,{fontFamily:c})}),V.push(-O);let Ce=new x(s,{fontFamily:c});if(a===null)for(let Ae=0;Ae<L;Ae++)V.push({box:Ce});else{for(let Ae=0;Ae<L;Ae++)V.push({box:Ce});V.push(-O),V.push({box:new x(a,{fontFamily:c})}),V.push(-O);for(let Ae=0;Ae<L;Ae++)V.push({box:Ce})}V.push(-O),V.push({box:new x(n,{fontFamily:c})});let ct="";c==="Size1-Regular"?ct=" delim-size1":c==="Size4-Regular"&&(ct=" delim-size4");let wt=new Y({bottom:_,children:V},{classes:ct});return new x(wt,T(g({},o!=null?o:{}),{classes:((Jt=o==null?void 0:o.classes)!=null?Jt:"")+" ML__delim-mult"}))}var rs=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),dc=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),is=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),mc=[0,1.2,1.8,2.4,3];function os(t,e,r,i){return t===void 0||t==="."?Ft(r,i.classes):(t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle"),rs.has(t)||is.has(t)?es(t,e,!1,r,i):dc.has(t)?ts(t,mc[e],!1,r,i):(""+t,null))}var pc=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],hc=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],fc=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function gc(t){return t.type==="small"?"Main-Regular":t.type==="large"?"Size"+t.size+"-Regular":(t.type,"Size4-Regular")}function yc(t,e,r,i){let o={"-4":0,"-3":1,0:2}[i.mathstyle.sizeDelta];for(let n=o;n<r.length&&r[n].type!=="stack";n++){let a=Ot(t,gc(r[n]));if(a.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let s=a.height+a.depth;if(r[n].type==="small"&&(r[n].mathstyle==="scriptscriptstyle"?s*=Math.max(ki[Math.max(1,i.size-2)],i.minFontScale):r[n].mathstyle==="scriptstyle"&&(s*=Math.max(ki[Math.max(1,i.size-1)],i.minFontScale))),s>e)return r[n]}return r[r.length-1]}function ei(t,e,r,i,o,n){if(!e||e.length===0||e===".")return Ft(o);e==="<"||e==="\\lt"?e="\\langle":(e===">"||e==="\\gt")&&(e="\\rangle");let a;is.has(e)?a=pc:rs.has(e)?a=fc:a=hc;let s=yc(Ao(e),r,a,o),l=new P({parent:o,mathstyle:s.mathstyle},n==null?void 0:n.style);return s.type==="small"?uc(e,l,i,T(g({},n),{type:t})):s.type==="large"?es(e,s.size,i,l,T(g({},n),{type:t})):(s.type,ts(e,r,i,l,T(g({},n),{type:t})))}function vr(t,e,r,i,o,n){if(e===".")return Ft(o,n==null?void 0:n.classes);let a=Ke*o.scalingFactor,s=901,l=5/Mt,c=Math.max(r-a,i+a),u=Math.max(c/500*s,2*c-l);return ei(t,e,u,!0,o,n)}function Ft(t,e){let r=new x(null,{classes:" nulldelimiter "+(e!=null?e:""),type:"skip"});return r.width=t.getRegisterAsEm("nulldelimiterspace"),r.wrap(new P({parent:t,mathstyle:"textstyle"}))}var he=class extends f{constructor(e){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=e==null?void 0:e.mode)!=null?r:"math",style:e==null?void 0:e.style}),this.captureSelection=!0}static fromJson(e){return new he(e)}toJson(){return super.toJson()}render(e){let r;return this.value=e.placeholderSymbol,typeof e.renderPlaceholder=="function"?r=e.renderPlaceholder(e):r=this.createBox(e),this.caret&&(r.classes+=" ML__placeholder-selected"),r}serialize(){return R("\\placeholder",this.value)}};var ns=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],as=["cases","dcases","rcases"],ss=["align","align*","aligned","gather","gathered","split"],bc=["array","subequations","eqnarray"];function ls(t){return bc.concat(ss).concat(as).concat(ns).includes(t)}function Lo(t){return ns.includes(t)}function cs(t){return as.includes(t)}function us(t){return ss.includes(t)}function xc(t,e,r){let i=0;for(let c of r)"align"in c&&(i+=1);let o=0,n=[];for(let c of e){let u=0;for(o=Math.max(o,Math.min(c.length,i));u<c.length;){let d=[],m=Math.min(c.length,u+i);for(;u<m;){let h=c[u];h.length===0?d.push([new f({type:"first",mode:t.mode})]):h[0].type!=="first"?d.push([new f({type:"first",mode:t.mode}),...h]):(h.slice(1).some(y=>y.type==="first"),d.push(h)),u+=1}n.push(d)}}n.length>0&&n[n.length-1].length===1&&n[n.length-1][0].length===1&&n[n.length-1][0][0].type==="first"&&n.pop();let a=[];for(let c of n){if(c.length!==o)for(let u=c.length;u<o;u++)c.push([new f({type:"first",mode:t.mode}),new he]);a.push(c)}let s=0,l=0;for(let c of a){l=0;for(let u of c){for(let d of u)d.parent=t,d.parentBranch=[s,l];l+=1}s+=1}return t.isDirty=!0,a}var I=class extends f{constructor(r,i,o,n={}){var a;super({type:"array"});this.environmentName=r,this.rowGaps=o,n.mathstyleName&&(this.mathstyleName=n.mathstyleName),n.columns&&(n.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=n.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=xc(this,i,this.colFormat),n.leftDelim&&(this.leftDelim=n.leftDelim),n.rightDelim&&(this.rightDelim=n.rightDelim),n.arraycolsep!==void 0&&(this.arraycolsep=n.arraycolsep),this.colSeparationType=n.colSeparationType,n.arraystretch!==void 0&&(this.arraystretch=n.arraystretch),this.minColumns=(a=n.minColumns)!=null?a:1}static fromJson(r){return new I(r.environmentName,r.array,r.rowGaps,r)}toJson(){let r=T(g({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(i=>i.map(o=>o.map(n=>n.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(r.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(r.arraycolsep=this.arraycolsep),this.leftDelim&&(r.leftDelim=this.leftDelim),this.rightDelim&&(r.rightDelim=this.rightDelim),r}branch(r){var i;if(Ei(r))return(i=this.array[r[0]][r[1]])!=null?i:void 0}createBranch(r){var i;return Ei(r)?(this.isDirty=!0,(i=this.branch(r))!=null?i:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(r=>!!r.align).length}removeBranch(r){if(Xt(r))return super.removeBranch(r);let i=this.branch(r);return this.array[r[0]][r[1]]=void 0,i.forEach(o=>{o.parent=void 0,o.parentBranch=void 0}),i[0].type,i.shift(),this.isDirty=!0,i}get hasChildren(){return this.children.length>0}get children(){let r=[];for(let i of this.array)for(let o of i)if(o)for(let n of o)r.push(...n.children),r.push(n);return[...r,...super.children]}render(r){var Ht,Jt,Ae,yi,bi,xi;let i=new P({parent:r,mathstyle:this.mathstyleName},this.style),o=i.getRegisterAsEm("arrayrulewidth"),n=i.getRegisterAsEm("arraycolsep"),a=i.getRegisterAsEm("doublerulesep"),s=(Jt=(Ht=this.arraystretch)!=null?Ht:i.getRegisterAsNumber("arraystretch"))!=null?Jt:1,l=typeof this.arraycolsep=="number"?this.arraycolsep:n;this.colSeparationType==="small"&&(l=.2778*(new P({parent:r,mathstyle:"scriptstyle"}).scalingFactor/r.scalingFactor));let c=s*Ea,u=.7*c,d=.3*c,m=0,h=[],y=0,b=this.array.length;for(let de=0;de<b;++de){let Me=this.array[de];y=Math.max(y,Me.length);let Te=new P({parent:i,mathstyle:this.mathstyleName},this.style),ut=u/Te.scalingFactor,kt=d/Te.scalingFactor,Wt={cells:[],height:0,depth:0,pos:0};for(let dt of Me){let Nr=(Ae=f.createBox(Te,dt,{type:"skip"}))!=null?Ae:new x(null,{type:"skip"});kt=Math.max(kt,Nr.depth),ut=Math.max(ut,Nr.height),Wt.cells.push(Nr)}let Ut=(yi=Ur(this.rowGaps[de]))!=null?yi:0;Ut>0&&(Ut+=d,kt=Math.max(kt,Ut),Ut=0),de<b-1&&!Lo(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(kt+=i.getRegisterAsEm("jot")),Wt.height=ut,Wt.depth=kt,m+=ut,Wt.pos=m,m+=kt+Ut,h.push(Wt)}let M=m/2+Ke,k=[];for(let de=0;de<y;de++){let Me=[];for(let Te of h){let ut=Te.cells[de];ut.depth=Te.depth,ut.height=Te.height,Me.push({box:ut,shift:Te.pos-M})}Me.length>0&&k.push(new Y({individualShift:Me}))}let w=[],L=!1,E=!1,B=0,_=!this.leftDelim,{colFormat:O}=this;for(let de of O){if("align"in de&&B>=k.length)break;if("align"in de)L?w.push(Eo(2*l)):(E||_)&&w.push(Eo(l)),w.push(new x(k[B],{classes:"col-align-"+de.align})),B++,L=!0,E=!1,_=!1;else if("gap"in de){if(typeof de.gap=="number")w.push(Eo(de.gap));else{let Me=vc(r,h,M,de.gap);Me&&w.push(Me)}L=!1,E=!1,_=!1}else if("separator"in de){let Me=new x(null,{classes:"vertical-separator"});Me.setStyle("height",m,"em"),Me.setStyle("border-right",`${o}em ${de.separator} currentColor`),Me.setStyle("vertical-align",-(m-M),"em");let Te=0;E?Te=a-o:L&&(Te=l-o),Me.left=Te,w.push(Me),L=!1,E=!0,_=!1}}L&&!this.rightDelim&&w.push(Eo(l));let V=new x(w,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(V.caret=this.caret),V;let Ce=V.height,ct=V.depth,wt=this.bind(r,new x([this.bind(r,vr("open",(bi=this.leftDelim)!=null?bi:".",Ce,ct,i,{isSelected:this.isSelected})),V,this.bind(r,vr("close",(xi=this.rightDelim)!=null?xi:".",Ce,ct,i,{isSelected:this.isSelected}))],{type:"ord"}));return wt?(this.caret&&(wt.caret=this.caret),this.attachSupsub(r,{base:wt})):null}serialize(r){var o;let i=[`\\begin{${this.environmentName}}`];if(this.environmentName==="array"){if(i.push("{"),this.colFormat!==void 0)for(let n of this.colFormat)"align"in n&&typeof n.align=="string"?i.push(n.align):"separator"in n&&n.separator==="solid"?i.push("|"):"separator"in n&&n.separator==="dashed"&&i.push(":");i.push("}")}for(let n=0;n<this.array.length;n++){for(let a=0;a<this.array[n].length;a++)a>0&&i.push(" & "),i.push(f.serialize(this.array[n][a],r));if(n<this.array.length-1){let a=this.rowGaps[n];a!=null&&a.dimension?i.push(`\\\\[${a.dimension} ${(o=a.unit)!=null?o:"pt"}] `):i.push("\\\\ ")}}return i.push(`\\end{${this.environmentName}}`),j(i)}getCell(r,i){return this.array[r][i]}setCell(r,i,o){this.type==="array"&&Array.isArray(this.array)&&this.array[r][i];for(let a of this.array[r][i])a.parent=void 0,a.parentBranch=void 0;let n=o;(o.length===0||o[0].type!=="first")&&(n=[new f({type:"first",mode:this.mode}),...o]),this.array[r][i]=n;for(let a of n)a.parent=this,a.parentBranch=[r,i];this.isDirty=!0}addRowBefore(r){this.type==="array"&&Array.isArray(this.array);let i=[];for(let o=0;o<this.colCount;o++)i.push(Co(this));this.array.splice(r,0,i);for(let o=r;o<this.rowCount;o++)for(let n=0;n<this.colCount;n++){let a=this.array[o][n];if(a)for(let s of a)s.parentBranch=[o,n]}this.isDirty=!0}addRowAfter(r){this.type==="array"&&Array.isArray(this.array);let i=[];for(let o=0;o<this.colCount;o++)i.push(Co(this));this.array.splice(r+1,0,i);for(let o=r+1;o<this.rowCount;o++)for(let n=0;n<this.colCount;n++){let a=this.array[o][n];if(a)for(let s of a)s.parentBranch=[o,n]}this.isDirty=!0}removeRow(r){this.type==="array"&&Array.isArray(this.array)&&this.rowCount>r;let i=this.array.splice(r,1);for(let o of i)for(let n of o)if(n)for(let a of n)a.parent=void 0,a.parentBranch=void 0;for(let o=r;o<this.rowCount;o++)for(let n=0;n<this.colCount;n++){let a=this.array[o][n];if(a)for(let s of a)s.parentBranch=[o,n]}this.isDirty=!0}addColumnBefore(r){this.type==="array"&&Array.isArray(this.array);for(let i of this.array)i.splice(r,0,Co(this));for(let i=0;i<this.rowCount;i++)for(let o=r;o<this.colCount;o++){let n=this.array[i][o];if(n)for(let a of n)a.parentBranch=[i,o]}this.isDirty=!0}addColumnAfter(r){this.type==="array"&&Array.isArray(this.array);for(let i of this.array)i.splice(r+1,0,Co(this));for(let i=0;i<this.rowCount;i++)for(let o=r+1;o<this.colCount;o++){let n=this.array[i][o];if(n)for(let a of n)a.parentBranch=[i,o]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(r){this.type==="array"&&Array.isArray(this.array)&&this.colCount>r;for(let i of this.array){let o=i.splice(r,1);for(let n of o)if(n)for(let a of n)a.parent=void 0,a.parentBranch=void 0}for(let i=0;i<this.rowCount;i++)for(let o=r;o<this.colCount;o++){let n=this.array[i][o];if(n)for(let a of n)a.parentBranch=[i,o]}this.isDirty=!0}get cells(){let r=[];for(let i of this.array)for(let o of i)o&&r.push(o.filter(n=>n.type!=="first"));return r}};function Co(t){let e=new f({type:"first",mode:t.mode});e.parent=t;let r=new he;return r.parent=t,[e,r]}function Eo(t){let e=new x(null,{classes:"arraycolsep"});return e.width=t,e}function vc(t,e,r,i){if(!i)return null;let o=[];for(let n of e){let a=f.createBox(t,i,{type:"skip"});a&&(a.depth=n.depth,a.height=n.height,o.push({box:a,shift:n.pos-r}))}return new Y({individualShift:o}).wrap(t)}var He=class extends f{constructor(r,i,o){super({type:"box",command:r,style:o.style});this.body=i,this.framecolor=o.framecolor,this.backgroundcolor=o.backgroundcolor,this.padding=o.padding,this.border=o.border}static fromJson(r){return new He(r.command,r.body,r)}toJson(){return T(g({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,raise:this.raise,border:this.border})}render(r){var u,d;let i=new P({parent:r},this.style),o=i.getRegisterAsEm("fboxsep"),n=this.padding?i.toEm(this.padding):o,a=f.createBox(r,this.body,{type:"ord"});if(!a)return null;let s="";this.framecolor?s=`${i.getRegisterAsEm("fboxrule")}em`:this.border&&(s=wc(this.border));let l=new x(null,{classes:"ML__box"});l.height=a.height+n,l.depth=a.depth+n,l.setStyle("box-sizing","border-box"),l.setStyle("position","absolute"),s?l.setStyle("bottom",`calc(${n}em - 2 * ${s})`):l.setStyle("bottom",n,"em"),l.setStyle("height",l.height+l.depth,"em"),n===0?l.setStyle("width","100%"):(l.setStyle("width",`calc(100% + ${2*n}em)`),l.setStyle("left",-n,"em")),this.backgroundcolor&&l.setStyle("background-color",(u=i.toColor(this.backgroundcolor))!=null?u:"transparent"),this.framecolor&&l.setStyle("border",`${i.getRegisterAsEm("fboxrule",2)}em solid ${(d=i.toColor(this.framecolor))!=null?d:"black"}`),this.border&&l.setStyle("border",this.border),a.setStyle("display","inline-block"),a.setStyle("position","relative"),a.setStyle("height",a.height+a.depth,"em"),a.setStyle("vertical-align",-a.height,"em");let c=new x([l,a]);return c.setStyle("display","inline-block"),c.setStyle("position","relative"),c.setStyle("line-height",0),c.height=a.height+n,c.depth=a.depth+n,c.left=n,c.right=n,c.setStyle("height",a.height+a.depth+2*n,"em"),c.setStyle("margin-top",-n,"em"),c.setStyle("top",a.depth-a.height+2*n,"em"),c.setStyle("vertical-align",a.depth+2*n,"em"),this.caret&&(c.caret=this.caret),this.attachSupsub(r,{base:c})}};function wc(t){let e=t.match(/[\d]+(\.[\d]+)?[a-zA-Z]+/);return e?e[0]:""}var tr=class extends f{constructor(e,r){var i;super({type:"composition",mode:(i=r==null?void 0:r.mode)!=null?i:"math",value:e})}static fromJson(e){return new tr(e.value,e)}toJson(){return super.toJson()}get computedStyle(){return{}}render(e){let r=new x(this.value,{classes:"ML__composition",type:"composition"});return this.bind(e,r),this.caret&&(r.caret=this.caret),r}serialize(e){return""}};var Ue=class extends f{constructor(e){super({type:"error",value:e,command:e,mode:"math"}),this.verbatimLatex=e}static fromJson(e){return new Ue(e.command)}toJson(){return super.toJson()}render(e){let r=this.createBox(e,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}};var Ct=class extends f{constructor(r,i){var o;super({type:"group",mode:(o=i==null?void 0:i.mode)!=null?o:"math"});this.body=r,this.mathstyleName=i==null?void 0:i.mathstyleName,this.latexOpen=i==null?void 0:i.latexOpen,this.latexClose=i==null?void 0:i.latexClose,this.boxType=i==null?void 0:i.boxType,this.skipBoundary=!0,this.displayContainsHighlight=!1,r&&r.length===1&&r[0].command===","&&(this.captureSelection=!0)}static fromJson(r){return new Ct(r.body,r)}toJson(){let r={};return this.mathstyleName&&(r.mathstyleName=this.mathstyleName),this.latexOpen&&(r.latexOpen=this.latexOpen),this.latexClose&&(r.latexClose=this.latexClose),this.boxType&&(r.boxType=this.boxType),g(g({},super.toJson()),r)}render(r){let i=new P({parent:r,mathstyle:this.mathstyleName},this.style),o=f.createBox(i,this.body,{type:this.boxType,mode:this.mode,style:{backgroundColor:this.style.backgroundColor}});return o?(this.caret&&(o.caret=this.caret),this.bind(r,o)):null}serialize(r){let i=super.serialize(r);return typeof this.latexOpen=="string"?this.latexOpen+i+this.latexClose:i}};var X=class extends f{constructor(r,i,o){super({type:"leftright",style:o.style,displayContainsHighlight:!0});this.variant=r,this.body=i,this.leftDelim=o.leftDelim,this.rightDelim=o.rightDelim}static fromJson(r){var i;return new X((i=r.variant)!=null?i:"",r.body,r)}toJson(){let r=super.toJson();return this.variant&&(r.variant=this.variant),this.leftDelim&&(r.leftDelim=this.leftDelim),this.rightDelim&&(r.rightDelim=this.rightDelim),r}serialize(r){var o,n;let i=this.matchingRightDelim();return this.variant==="left...right"?j(["\\left",(o=this.leftDelim)!=null?o:".",this.bodyToLatex(r),"\\right",i]):this.variant==="mleft...mright"?j(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(r),"\\mright",i]):j([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(r),i])}matchingRightDelim(){var i,o;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;let r=(i=this.leftDelim)!=null?i:".";return(o=Qr[r])!=null?o:r}render(r){var m,h,y,b,M;let i=new P({parent:r},this.style);this.body;let o=new P({parent:r,mathstyle:"textstyle"},this.style),n=(m=f.createBox(i,this.body,{type:"inner"}))!=null?m:new x(null,{type:"inner"}),a=n.height/o.scalingFactor,s=n.depth/o.scalingFactor,l=[];this.leftDelim&&l.push(this.bind(o,vr("open",this.leftDelim,a,s,o,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style})));let c=(y=(h=this.body)==null?void 0:h[this.body.length-1].style)!=null?y:{};if(n&&(ds(n.children,this,i,a,s),l.push(n)),this.rightDelim){let k=this.containsCaret?" ML__contains-caret":"",w=this.rightDelim;w==="?"&&(i.smartFence?(w=this.matchingRightDelim(),k+=" ML__smart-fence__close"):w="."),l.push(this.bind(o,vr("close",w,a,s,o,{isSelected:this.isSelected,classes:k+" ML__close",mode:this.mode,style:c})))}let u=(M=this.variant==="mleft...mright"||((b=this.leftSibling)==null?void 0:b.isFunction))!=null?M:!1,d=new x(l,{type:u?"close":"inner",classes:"left-right"});return this.caret&&(d.caret=this.caret),this.bind(i,d.wrap(i))}};function ds(t,e,r,i,o){if(t)for(let n=0;n<t.length;n++){let a=t[n];a.type==="middle"?(t[n]=e.bind(r,vr("inner",a.value,i,o,r,{isSelected:e.isSelected})),t[n].caret=a.caret,t[n].isSelected=a.isSelected,t[n].cssId=a.cssId,t[n].htmlData=a.htmlData,t[n].htmlStyle=a.htmlStyle,t[n].attributes=a.attributes,t[n].cssProperties=a.cssProperties):a.children&&ds(a.children,e,r,i,o)}}var rr=class extends f{constructor(r,i){var o;super({type:"macro",command:r,style:i.style});this.body=i.body,i.captureSelection===void 0?i.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=i.captureSelection,this.macroArgs=i.args,this.expand=(o=i.expand)!=null?o:!1}static fromJson(r){return new rr(r.command,r)}toJson(){let r=super.toJson();return this.expand&&(r.expand=!0),this.captureSelection!==void 0&&(r.captureSelection=this.captureSelection),this.macroArgs&&(r.args=this.macroArgs),r}serialize(r){var i;return r.expandMacro&&this.expand?this.bodyToLatex(r):this.command+((i=this.macroArgs)!=null?i:"")}render(r){let i=f.createBox(r,this.body);return i?(this.caret&&(i.caret=this.caret),this.bind(r,i)):null}},ti=class extends f{constructor(){super({type:"macro-argument"})}static fromJson(e){return new ti}toJson(){return super.toJson()}serialize(e){return""}render(e){return null}};var ir=class extends f{constructor(r,i,o=!1,n,a){var s;super({type:"prompt",mode:(s=a==null?void 0:a.mode)!=null?s:"math",style:a==null?void 0:a.style,command:"\\placeholder"});this.body=n,this.correctness=i,this.placeholderId=r,this.locked=o,this.captureSelection=this.locked}static fromJson(r){return new ir(r.placeholderId,r.correctness,r.locked,r.body,r)}toJson(){let r=super.toJson();return this.placeholderId&&(r.placeholderId=this.placeholderId),this.body||delete r.body,this.body&&(r.body=this.body.filter(i=>i.type!=="first").map(i=>i.toJson())),this.correctness&&(r.correctness=this.correctness),r.locked=this.locked,r}render(r){let i=new P({parent:r}),o=Ur(i.getRegisterAsDimension("fboxsep")),n=o,a=f.createBox(r,this.body);if(!a)return null;a.height||(a.height=.5),a.setStyle("vertical-align",-a.height,"em"),this.correctness==="correct"?a.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&a.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");let s=new x(a,{type:"ord"}),l="ML__prompt ";this.locked?l+=" ML__lockedPromptBox ":l+=" ML__editablePromptBox ",this.correctness==="correct"?l+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(l+=" ML__incorrectPromptBox "),this.containsCaret&&(l+=" ML__focusedPromptBox ");let c=new x(null,{classes:l});c.height=s.height+n,c.depth=s.depth+n,c.setStyle("box-sizing","border-box"),c.setStyle("position","absolute"),c.setStyle("height",s.height+s.depth+2*n,"em"),n===0?c.setStyle("width","100%"):(c.setStyle("width",`calc(100% + ${2*n}em)`),c.setStyle("top",o,"em"),c.setStyle("left",-n,"em")),(!this.body||this.body.length===1)&&(c.setStyle("width",`calc(100% + ${3*n}em)`),c.setStyle("left",-1.5*n,"em"));let u="";this.correctness==="incorrect"&&(u+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),u&&uo(c,u,""),s.setStyle("display","inline-block"),s.setStyle("height",a.height+a.depth,"em"),s.setStyle("vertical-align",-n,"em");let d=new x([c,s],{classes:"ML__prompt-atom"});return d.setStyle("position","relative"),d.setStyle("display","inline-block"),d.setStyle("line-height",0),d.height=s.height+n+.2,d.depth=s.depth+n,d.left=n,d.right=n,d.setStyle("height",s.height+n,"em"),d.setStyle("top",s.depth-s.height,"em"),d.setStyle("vertical-align",s.depth+n,"em"),d.setStyle("margin-left",.5,"em"),d.setStyle("margin-right",.5,"em"),this.caret&&(d.caret=this.caret),this.bind(i,this.attachSupsub(r,{base:d}))}serialize(r){var n;let i=(n=this.bodyToLatex(r))!=null?n:"",o="\\placeholder";return this.placeholderId&&(o+=`[${this.placeholderId}]`),this.correctness==="correct"?o+="[correct]":this.correctness==="incorrect"&&(o+="[incorrect]"),this.locked&&(o+="[locked]"),R(o,i)}};var ft=class extends f{constructor(e){super({type:"subsup",style:e==null?void 0:e.style}),this.subsupPlacement="auto"}static fromJson(e){let r=new ft(e);for(let i of Zt)e[i]&&r.setChildren(e[i],i);return r}render(e){var a;let r=new P({parent:e,isPhantom:!0}),i=this.leftSibling,o=(a=i.render(r))!=null?a:new x(null),n=new x(null,{height:o.height,depth:o.depth});return this.attachSupsub(e,{base:n,isCharacterBox:i.isCharacterBox(),type:"skip"})}serialize(e){return this.supsubToLatex(e)}};function ri(t){return t?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(t):!1}var To=class{constructor(e,r,i){this.errors=[];this.index=0;this.endCount=0;var o,n,a,s;i!=null||(i={}),this.tokens=e,this.context=r instanceof P&&!(i!=null&&i.parseMode)&&!i.mathstyle?r:new P({from:r,mathstyle:i.mathstyle},i.style),this.args=(o=i.args)!=null?o:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(n=i.style)!=null?n:{},parseMode:(a=i.parseMode)!=null?a:"math",mathstyle:(s=i.mathstyle)!=null?s:"displaystyle",tabular:!1}}beginContext(e){var o,n,a;let r=this.parsingContext,i={parent:r,mathlist:[],style:g({},r.style),parseMode:(o=e==null?void 0:e.mode)!=null?o:r.parseMode,mathstyle:(n=e==null?void 0:e.mathstyle)!=null?n:r.mathstyle,tabular:(a=e==null?void 0:e.tabular)!=null?a:!1};this.parsingContext=i}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(g({before:yr(this.tokens.slice(this.index,this.index+10)),after:yr(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return g({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new ft({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var r;let{index:e}=this;if(e<this.tokens.length&&this.tokens[e].startsWith("\\")){let i=et(this.tokens[e],this.parseMode);return!i||i.definitionType==="symbol"||i.ifMode&&!i.ifMode.includes(this.parseMode)?!1:(r=i.infix)!=null?r:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;let e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var r;let e=(r=this.args)==null?void 0:r.call(this,"?");return e?le(e,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new he({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let r=this.tokens[this.index];for(;r&&r!==e;)r=this.tokens[++this.index];r===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){let r=this.index,i=this.end(),o="";for(;!i;){let a=this.get();ri(a)?(o+=a,i=this.end()||o.length>=e.length):i=!0}let n=e.toUpperCase()===o.toUpperCase();return n||(this.index=r),n}scanString(){let e="";for(;!this.end();){let r=this.peek();if(r==="]")return e;if(r==="<space>")e+=" ";else if(r.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=r.substring(1);else if(ri(r))e+=r;else return e;this.next()}return e}scanBalancedString(){let e="",r=this.end(),i=1;for(;!r;){let o=this.get();o==="<space>"?e+=" ":o==="<{>"?(e+="{",i+=1):o==="<}>"?(i-=1,i>0?e+="}":this.index-=1):o==="<$>"?e+="$":o==="<$$>"?e+="$$":e+=o,r=i===0||this.end()}return e}scanLiteralGroup(){var i;if(!this.match("<{>"))return"";let e="",r=1;for(;r>0&&!this.end();){let o=this.get();o==="<}>"?(r-=1,r>0&&(e+="}")):o==="<{>"?(r+=1,e+="{"):(/\\[a-zA-Z]+$/.test(e)&&/^[a-zA-Z]/.test(o)&&(e+=" "),e+=(i={"<space>":" ","<$$>":"$$","<$>":"$"}[o])!=null?i:o)}return e}scanNumber(e=!0){var l,c;let r=!1,i=this.peek();for(;i==="<space>"||i==="+"||i==="-";)this.get(),i==="-"&&(r=!r),i=this.peek();e=!!e;let o=10,n=/\d/;if(this.match("'"))o=8,n=/[0-7]/,e=!0;else if(this.match('"'))o=16,n=/[\dA-F]/,e=!0;else if(this.match("x"))o=16,n=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return i=this.get(),i?i.length===2&&i.startsWith("\\")?{number:(r?-1:1)*((l=i.codePointAt(1))!=null?l:0),base:"alpha"}:{number:(r?-1:1)*((c=i.codePointAt(0))!=null?c:0),base:"alpha"}:null;let a="";for(;this.hasPattern(n);)a+=this.get();if(!e&&(this.match(".")||this.match(",")))for(a+=".";this.hasPattern(n);)a+=this.get();let s=e?Number.parseInt(a,o):Number.parseFloat(a);return Number.isNaN(s)?null:{number:r?-s:s,base:o===16?"hexadecimal":o===8?"octal":"decimal"}}scanRegister(){var n;let e=this.index,r=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return r;let i=!1;if(r===null)for(;;){let a=this.peek();if(a==="-")i=!i;else if(a!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();let a=this.get();return a.startsWith("\\")?r?{register:a,global:!0,factor:(i?-1:1)*r.number}:i?{register:a,global:!0,factor:-1}:{register:a,global:!0}:(this.index=e,null)}let o=this.get();return o!=null&&o.startsWith("\\")?(o=o.substring(1),this.context.registers[o]?!i||r!==null?{register:o,factor:(i?-1:1)*((n=r==null?void 0:r.number)!=null?n:1)}:{register:o}:null):(this.index=e,null)}scanValue(){let e=this.scanRegister();if(e)return e;let r=this.index,i=this.scanGlueOrDimen();if(i&&("unit"in i||"glue"in i&&"unit"in i.glue))return i;this.index=r;let o=this.scanNumber();if(o)return o;if(this.end()||!ri(this.peek()))return null;let n=this.scanString();return n.length>0?{string:n}:null}scanDimen(){let e=this.scanNumber(!1);if(e===null)return null;let r=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let i;return this.matchKeyword("pt")?i="pt":this.matchKeyword("mm")?i="mm":this.matchKeyword("cm")?i="cm":this.matchKeyword("ex")?i="ex":this.matchKeyword("px")?i="px":this.matchKeyword("em")?i="em":this.matchKeyword("bp")?i="bp":this.matchKeyword("dd")?i="dd":this.matchKeyword("pc")?i="pc":this.matchKeyword("in")?i="in":this.matchKeyword("mu")&&(i="mu"),i?{dimension:r,unit:i}:{dimension:r}}scanGlueOrDimen(){let e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;let r={glue:e};if(this.matchKeyword("plus")){let i=this.scanDimen();if(i)r.grow=i;else return r}if(this.skipWhitespace(),this.match("\\relax"))return r;if(this.skipWhitespace(),this.matchKeyword("minus")){let i=this.scanDimen();if(i)r.shrink=i;else return r}return!r.grow&&!r.shrink?e:r}scanColspec(){this.skipWhitespace();let e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){let r=this.get();r==="c"||r==="r"||r==="l"?e.push({align:r}):r==="|"?e.push({separator:"solid"}):r===":"?e.push({separator:"dashed"}):r==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(i=>i==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});let r=new Ct(this.scan(i=>i===(e==="displaystyle"?"\\]":"\\)")),{mathstyleName:e,latexOpen:e==="displaystyle"?"\\[":"\\(",latexClose:e==="displaystyle"?"\\]":"\\)",boxType:"inner"});return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),r.hasEmptyBranch("body")?null:r}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});let r=new Ct(this.scan(i=>i===e),{mathstyleName:e==="<$>"?"textstyle":"displaystyle",latexOpen:e==="<$>"?"$ ":"$$ ",latexClose:e==="<$>"?" $":" $$",boxType:"inner"});return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),r.hasEmptyBranch("body")?null:r}scanEnvironment(){if(!this.match("\\begin"))return null;let e=this.scanArgument("string");if(!e)return null;let r=Ja(e);if(!r)return this.onError({code:"unknown-environment",arg:e}),null;let i=[];if(r.params)for(let l of r.params)if(l.isOptional)i.push(this.scanOptionalArgument(l.type));else{let c=this.scanArgument(l.type);c||this.onError({code:"missing-argument",arg:e}),i.push(c)}this.beginContext({tabular:r.tabular});let o=[],n=[],a=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s)if(this.matchColumnSeparator())a.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){a.push(this.mathlist),this.mathlist=[];let l=null;this.skipWhitespace(),this.match("[")&&(l=this.scanDimen(),this.skipWhitespace(),this.match("]")),n.push(l!=null?l:{dimension:0}),o.push(a),a=[]}else this.mathlist.push(...this.scan(l=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(l)));while(!s);return a.push(this.mathlist),a.length>0&&o.push(a),this.endContext(),r.createAtom(e,o,n,i)}scanExpression(){let e=this.mathlist;if(this.mathlist=[],this.parseExpression()){let r=this.mathlist;return this.mathlist=e,r}return this.mathlist=e,null}scan(e){var l;this.beginContext(),e||(e=c=>c==="<}>");let r="",i=null,o=[],n=null;this.mathlist.length;let a=this.mathlist;for(this.mathlist=[];!this.end()&&!e((l=this.peek())!=null?l:"");)this.hasInfixCommand()&&!r?(r=this.get(),i=et(r,"math"),i&&(o=this.scanArguments(i)[1]),n=this.mathlist,this.mathlist=[]):this.parseExpression();let s;return r?(o.unshift(this.mathlist),this.mathlist=a,n&&o.unshift(n),s=[i.createAtom(r,o,this.style)]):(s=this.mathlist,this.mathlist=a),this.endContext(),s}scanGroup(){let e=this.index;if(this.parseMode==="text")return this.match("<{>")?new f({type:"text",value:"{",mode:"text",style:this.style}):this.match("<}>")?new f({type:"text",value:"}",mode:"text",style:this.style}):null;if(!this.match("<{>"))return null;let r=this.scan(o=>o==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});let i=new Ct(r,{boxType:r.length>1?"ord":"skip",mode:this.parseMode,latexOpen:"{",latexClose:"}"});return i.verbatimLatex=yr(this.tokens.slice(e,this.index)),i}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();e===0&&this.match(")");let r=new X("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),r}scanDelim(){this.skipWhitespace();let e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!ri(e)&&!e.startsWith("\\"))return null;this.next();let r=et(e,"math");return r?r.definitionType==="function"&&r.ifMode&&!r.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):r.definitionType==="symbol"&&(r.type==="mopen"||r.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var n;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new Ue("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Ue("\\mright");let e="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;e="\\mright"}let r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new Ue(e==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(e);)this.parseExpression();let i=this.mathlist;this.endContext();let o=(n=this.scanDelim())!=null?n:".";return new X(e==="\\right"?"left...right":"mleft...mright",i,{leftDelim:r,rightDelim:o,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?this.lastSubsupAtom().addChild(new f({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):this.lastSubsupAtom().addChild(new f({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&this.lastSubsupAtom().addChildren(A(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){let e=this.match("\\limits"),r=!e&&this.match("\\nolimits"),i=!r&&!e&&this.match("\\displaylimits");if(!e&&!r&&!i)return!1;let o=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return o===null||o.type!=="mop"?!1:e?(o.subsupPlacement="over-under",o.explicitSubsupPlacement=!0,!0):r?(o.subsupPlacement="adjacent",o.explicitSubsupPlacement=!0,!0):i?(o.subsupPlacement="auto",o.explicitSubsupPlacement=!0,!0):!1}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let r,i=[],o=e.infix?2:0;for(;o<e.params.length;){let n=e.params[o];n.type==="rest"?i.push(this.scan(a=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(a))):n.isOptional?i.push(this.scanOptionalArgument(n.type)):n.type.endsWith("*")?r=n.type.slice(0,-1):i.push(this.scanArgument(n.type)),o+=1}return[r,i]}scanSymbolOrLiteral(){let e=this.peek();if(!e)return null;this.next();let r;if(ri(e)){let i=_e.createAtom(this.parseMode,e,g({},this.style));return i?[i]:null}if(r=this.scanMacro(e),r)return[r];if(e.startsWith("\\")){let i=et(e,this.parseMode);if(!i)return this.onError({code:"unknown-command",arg:e}),[new Ue(e)];if(i.definitionType==="symbol"){let o=g({},this.style);i.variant&&(o.variant=i.variant),r=new f({type:i.type,command:e,style:o,value:String.fromCodePoint(i.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(i.applyMode||i.applyStyle||i.infix)return this.onError({code:"invalid-command",arg:e}),[new Ue(e)];i.createAtom&&(r=i.createAtom(e,[],this.style))}}return r?[r]:null}scanArgument(e){var i;if(this.skipFiller(),e==="auto"&&(e=this.parseMode),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(i=this.scanDelim())!=null?i:".";if(e==="expression")return this.scanExpression();if(e==="math")return this.scanSymbolOrLiteral();if(e==="text"){this.beginContext({mode:"text"});let o=this.scanSymbolOrLiteral();return this.endContext(),o}return null}if(e==="text"){this.beginContext({mode:e}),this.index-=1;let o=this.scanLiteralGroup(),n=le(o,{context:this.context,parseMode:"text",style:this.parsingContext.style});return this.endContext(),{group:n}}if(e==="math"){this.beginContext({mode:e});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let o=this.mathlist;return this.endContext(),{group:o}}let r=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let o=this.mathlist;return this.endContext(),{group:o}}return e==="string"?r=this.scanString():e==="balanced-string"?r=this.scanBalancedString():e==="colspec"?r=this.scanColspec():e==="value"&&(r=this.scanValue()),this.skipUntilToken("<}>"),r}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let r=null;for(;!this.end()&&!this.match("]");)if(e==="string")r=this.scanString();else if(e==="value")r=this.scanValue();else if(e==="colspec")r=this.scanColspec();else if(e==="bbox"){let i={},o=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let n of o){let a=n.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(a)i.padding={dimension:parseInt(a[1]),unit:a[2]};else{let s=n.match(/^\s*border\s*:\s*(.*)/);s?i.border=s[1]:i.backgroundcolor={string:n}}}r=i}else e==="math"&&(this.beginContext({mode:"math"}),r=this.mathlist.concat(this.scan(i=>i==="]")),this.endContext());return r}scanSymbolOrCommand(e){var n,a,s,l;if(e==="\\placeholder"){let c=this.scanOptionalArgument("string"),u=this.scanOptionalArgument("math"),d=ht(u,{defaultMode:"math"}),m=[],h;!h&&d==="correct"?h="correct":!h&&d==="incorrect"?h="incorrect":d!==""&&(m=u);let y=this.scanOptionalArgument("string")==="locked",b=this.scanArgument("auto"),M;return b&&Array.isArray(b)&&b.length>0?M=b:b&&typeof b=="object"&&"group"in b?M=b.group:M=m,c?[new ir(c,h,y,M!=null?M:m,{mode:this.parseMode,style:this.style})]:[new he({mode:this.parseMode,style:this.style})]}if(e==="\\char"){let c=this.index,u=(a=(n=this.scanNumber(!0))==null?void 0:n.number)!=null?a:NaN;return(!Number.isFinite(u)||u<0||u>1114111)&&(u=10067),[new f({type:this.parseMode==="math"?"mord":"text",command:"\\char",mode:this.parseMode,value:String.fromCodePoint(u),verbatimLatex:"\\char"+yr(this.tokens.slice(c,this.index))})]}let r=this.scanMacro(e);if(r)return[r];let i=et(e,this.parseMode);if(!i)return this.onError({code:"unknown-command",arg:e}),this.parseMode==="text"?[...e].map(c=>new f({type:"text",value:c,mode:"text",style:this.style})):[new Ue(e)];let o=this.index;if(i.definitionType==="symbol"){let c=g({},this.style);i.variant&&(c.variant=i.variant),r=new f({type:i.type,command:e,style:c,value:String.fromCodePoint(i.codepoint),mode:this.parseMode})}else{if(i.ifMode&&!i.ifMode.includes(this.parseMode))return[];let c=this.parseMode;i.applyMode&&(this.parseMode=i.applyMode);let[u,d]=this.scanArguments(i);if(this.parseMode=c,i.applyMode&&!i.applyStyle&&!i.createAtom)return A(d[0]);if(i.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof i.createAtom=="function")r=i.createAtom(e,d,this.style),u&&(r.body=A(this.scanArgument(u)));else if(typeof i.applyStyle=="function"){let m=g(g({},this.style),i.applyStyle(e,d,this.context)),h=this.parseMode;if(i.applyMode&&(this.parseMode=i.applyMode),u){let y=this.style;this.style=m;let b=this.scanArgument(u);return this.style=y,this.parseMode=h,A(b)}this.style=m}else r=new f({type:"mord",command:(s=i.command)!=null?s:e,style:g({},this.style),value:e,mode:(l=i.applyMode)!=null?l:this.parseMode})}if(!r)return null;if(r instanceof f&&r.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){let c=j([e,yr(this.tokens.slice(o,this.index))]);c&&(r.verbatimLatex=c)}if(r.verbatimLatex===null&&(r.verbatimLatex=void 0),r.isFunction&&this.smartFence){let c=this.scanSmartFence();if(c)return[r,c]}return[r]}scanSymbolCommandOrLiteral(){let e=this.get();if(!e)return null;if(ri(e)){let r=_e.createAtom(this.parseMode,e,g({},this.style));if(!r)return null;if(r.isFunction&&this.smartFence){let i=this.scanSmartFence();if(i)return[r,i]}return[r]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new $e(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var a;let r=this.context.getMacro(e);if(!r)return null;let i=this.index,o=r.args,n={"?":(a=this.args)==null?void 0:a.call(this,"?")};for(let s=1;s<=o;s++)n[s]=this.scanLiteralGroup();return new rr(e,{expand:r.expand,captureSelection:r.captureSelection,args:i===this.index?null:yr(this.tokens.slice(i,this.index)),style:this.parsingContext.style,body:le(r.def,{context:this.context,parseMode:this.parseMode,args:s=>n[s],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var r,i,o,n;let e=(n=(o=(i=(r=this.scanEnvironment())!=null?r:this.scanModeShift())!=null?i:this.scanModeSet())!=null?o:this.scanGroup())!=null?n:this.scanLeftRight();if(e===null){if(this.parseSupSub()||this.parseLimits())return!0;e=this.scanSymbolCommandOrLiteral()}return e?(Array.isArray(e)?this.mathlist.push(...e):this.mathlist.push(e),!0):!1}};function le(t,e){var n,a,s,l;let r=(n=e==null?void 0:e.args)!=null?n:void 0,i=new To(Mi(t,r),e==null?void 0:e.context,{args:r,mathstyle:(a=e==null?void 0:e.mathstyle)!=null?a:"displaystyle",parseMode:(s=e==null?void 0:e.parseMode)!=null?s:"math",style:(l=e==null?void 0:e.style)!=null?l:{}}),o=[];for(;!i.end();)o.push(...i.scan(()=>!1));return o}function Po(t,e){var i;let r=new To(Mi(t,null),e==null?void 0:e.context,{mathstyle:"displaystyle",parseMode:(i=e==null?void 0:e.parseMode)!=null?i:"math"});for(;!r.end();)r.scan();return r.errors}var wr=class extends f{constructor(r,i){super("chem",{command:r,mode:"math"});let o=ne.go(S.go(i,r==="\\pu"?"pu":"ce"),!1);this.body=le(o),this.verbatimLatex=r+"{"+i+"}",this.arg=i,this.captureSelection=!0}static fromJson(r){return new wr(r.command,r.arg)}toJson(){return T(g({},super.toJson()),{arg:this.arg})}render(r){let i=f.createBox(r,this.body,{type:"inner"});return this.caret&&(i.caret=this.caret),this.bind(r,i)}serialize(r){return this.verbatimLatex}};v(["ce","pu"],"{chemformula:balanced-string}",{createAtom:(t,e)=>{var r;return new wr(t,(r=e[0])!=null?r:"")}});var S={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");var r="0",i={};i.parenthesisLevel=0,t=t.replace(/\n/g," "),t=t.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),t=t.replace(/[\u2026]/g,"...");for(var o,n=10,a=[];;){o!==t?(n=10,o=t):n--;var s=S.stateMachines[e],l=s.transitions[r]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var u=S.patterns.match_(l[c].pattern,t);if(u){for(var d=l[c].task,m=0;m<d.action_.length;m++){var h;if(s.actions[d.action_[m].type_])h=s.actions[d.action_[m].type_](i,u.match_,d.action_[m].option);else if(S.actions[d.action_[m].type_])h=S.actions[d.action_[m].type_](i,u.match_,d.action_[m].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[m].type_+")"];S.concatArray(a,h)}if(r=d.nextState||r,t.length>0){if(d.revisit||(t=u.remainder),!d.toContinue)break e}else return a}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Object.prototype.toString.call(e)==="[object Array]")for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=S.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var r=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:t.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return S.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return S.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return S.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return S.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return S.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return S.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return S.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return S.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return S.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return S.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return S.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return S.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return S.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return S.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return S.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return S.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return S.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return S.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return S.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return S.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),e)return{match_:e[0],remainder:t.substr(e[0].length)};var r=S.patterns.findObserveGroups(t,"","$","$","");return r&&(e=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),e)?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,r,i,o,n,a,s,l,c){var u=function(k,w){if(typeof w=="string")return k.indexOf(w)!==0?null:w;var L=k.match(w);return L?L[0]:null},d=function(k,w,L){for(var E=0;w<k.length;){var B=k.charAt(w),_=u(k.substr(w),L);if(_!==null&&E===0)return{endMatchBegin:w,endMatchEnd:w+_.length};if(B==="{")E++;else if(B==="}"){if(E===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];E--}w++}return E>0,null},m=u(t,e);if(m===null||(t=t.substr(m.length),m=u(t,r),m===null))return null;var h=d(t,m.length,i||o);if(h===null)return null;var y=t.substring(0,i?h.endMatchEnd:h.endMatchBegin);if(n||a){var b=this.findObserveGroups(t.substr(h.endMatchEnd),n,a,s,l);if(b===null)return null;var M=[y,b.match_];return{match_:c?M.join(""):M,remainder:b.remainder}}else return{match_:y,remainder:t.substr(h.endMatchEnd)}},match_:function(t,e){var r=S.patterns.patterns[t];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof r=="function")return S.patterns.patterns[t](e);var i=e.match(r);if(i){var o;return i[2]?o=[i[1],i[2]]:i[1]?o=i[1]:o=i[0],{match_:o,remainder:e.substr(i[0].length)}}return null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,r){return{type_:r}},"insert+p1":function(t,e,r){return{type_:r,p1:e}},"insert+p1+p2":function(t,e,r){return{type_:r,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return S.go(e,"text")},"{text}":function(t,e){var r=["{"];return S.concatArray(r,S.go(e,"text")),r.push("}"),r},"tex-math":function(t,e){return S.go(e,"tex-math")},"tex-math tight":function(t,e){return S.go(e,"tex-math tight")},bond:function(t,e,r){return{type_:"bond",kind_:r||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return S.go(e)},"1/2":function(t,e){var r=[];e.match(/^[+\-]/)&&(r.push(e.substr(0,1)),e=e.substr(1));var i=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return i[1]=i[1].replace(/\$/g,""),r.push({type_:"frac",p1:i[1],p2:i[2]}),i[3]&&(i[3]=i[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:i[3]})),r},"9,9":function(t,e){return S.go(e,"9,9")}},createTransitions:function(t){var e,r,i,o,n={};for(e in t)for(r in t[e])for(i=r.split("|"),t[e][r].stateArray=i,o=0;o<i.length;o++)n[i[o]]=[];for(e in t)for(r in t[e])for(i=t[e][r].stateArray||[],o=0;o<i.length;o++){var a=t[e][r];if(a.action_){a.action_=[].concat(a.action_);for(var s=0;s<a.action_.length;s++)typeof a.action_[s]=="string"&&(a.action_[s]={type_:a.action_[s]})}else a.action_=[];for(var l=e.split("|"),c=0;c<l.length;c++)if(i[o]==="*")for(var u in n)n[u].push({pattern:l[c],task:a});else n[i[o]].push({pattern:l[c],task:a})}return n},stateMachines:{}};S.stateMachines={ce:{transitions:S.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var r;if((t.d||"").match(/^[0-9]+$/)){var i=t.d;t.d=void 0,r=this.output(t),t.b=i}else r=this.output(t);return S.actions["o="](t,e),r},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var r=[];return S.concatArray(r,this.output(t)),S.concatArray(r,S.actions.bond(t,e,"-")),r}else t.d=e},"- after o/d":function(t,e,r){var i=S.patterns.match_("orbital",t.o||""),o=S.patterns.match_("one lowercase greek letter $",t.o||""),n=S.patterns.match_("one lowercase latin letter $",t.o||""),a=S.patterns.match_("$one lowercase latin letter$ $",t.o||""),s=e==="-"&&(i&&i.remainder===""||o||n||a);s&&!t.a&&!t.b&&!t.p&&!t.d&&!t.q&&!i&&n&&(t.o="$"+t.o+"$");var l=[];return s?(S.concatArray(l,this.output(t)),l.push({type_:"hyphen"})):(i=S.patterns.match_("digits",t.d||""),r&&i&&i.remainder===""?(S.concatArray(l,S.actions["d="](t,e)),S.concatArray(l,this.output(t))):(S.concatArray(l,this.output(t)),S.concatArray(l,S.actions.bond(t,e,"-")))),l},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:S.go(e,"o")}},comma:function(t,e){var r=e.replace(/\s*$/,""),i=r!==e;return i&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(t,e,r){var i;if(!t.r)i=[],!t.a&&!t.b&&!t.p&&!t.o&&!t.q&&!t.d&&!r||(t.sb&&i.push({type_:"entitySkip"}),!t.o&&!t.q&&!t.d&&!t.b&&!t.p&&r!==2?(t.o=t.a,t.a=void 0):!t.o&&!t.q&&!t.d&&(t.b||t.p)?(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):t.o&&t.dType==="kv"&&S.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0),i.push({type_:"chemfive",a:S.go(t.a,"a"),b:S.go(t.b,"bd"),p:S.go(t.p,"pq"),o:S.go(t.o,"o"),q:S.go(t.q,"pq"),d:S.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType}));else{var o;t.rdt==="M"?o=S.go(t.rd,"tex-math"):t.rdt==="T"?o=[{type_:"text",p1:t.rd||""}]:o=S.go(t.rd);var n;t.rqt==="M"?n=S.go(t.rq,"tex-math"):t.rqt==="T"?n=[{type_:"text",p1:t.rq||""}]:n=S.go(t.rq),i={type_:"arrow",r:t.r,rd:o,rq:n}}for(var a in t)a!=="parenthesisLevel"&&a!=="beginsWithBond"&&delete t[a];return i},"oxidation-output":function(t,e){var r=["{"];return S.concatArray(r,S.go(e,"oxidation")),r.push("}"),r},"frac-output":function(t,e){return{type_:"frac-ce",p1:S.go(e[0]),p2:S.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:S.go(e[0]),p2:S.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:S.go(e[0]),p2:S.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:S.go(e[0]),p2:S.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:S.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,r){return{type_:"operator",kind_:r||e}}}},a:{transitions:S.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:S.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var r in t)delete t[r];return e}}}},pq:{transitions:S.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:S.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:S.go(e[1],"pq")}}}},bd:{transitions:S.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:S.go(e[1],"bd")}}}},oxidation:{transitions:S.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var r in t)delete t[r];return e}}}},"tex-math tight":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var r in t)delete t[r];return e}}}},"9,9":{transitions:S.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:S.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var r=[];return e[0]==="+-"||e[0]==="+/-"?r.push("\\pm "):e[0]&&r.push(e[0]),e[1]&&(S.concatArray(r,S.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?S.concatArray(r,S.go(e[2],"pu-9,9")):r.push(e[2])),(e[3]||e[4])&&(e[3]==="e"||e[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),e[5]&&r.push("10^{"+e[5]+"}"),r},"number^":function(t,e){var r=[];return e[0]==="+-"||e[0]==="+/-"?r.push("\\pm "):e[0]&&r.push(e[0]),S.concatArray(r,S.go(e[1],"pu-9,9")),r.push("^{"+e[2]+"}"),r},operator:function(t,e,r){return{type_:"operator",kind_:r||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,r=S.patterns.match_("{(...)}",t.d||"");r&&r.remainder===""&&(t.d=r.match_);var i=S.patterns.match_("{(...)}",t.q||"");if(i&&i.remainder===""&&(t.q=i.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:S.go(t.d,"pu"),q:S.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:o.d,p2:o.q}:(e=o.d,o.d.length>1||o.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),S.concatArray(e,o.q))}else e=S.go(t.d,"pu-2");for(var n in t)delete t[n];return e}}},"pu-2":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var r=S.patterns.match_("{(...)}",t.rm||"");r&&r.remainder===""?e=S.go(r.match_,"pu"):e={type_:"rm",p1:t.rm}}for(var i in t)delete t[i];return e}}},"pu-9,9":{transitions:S.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var r=t.text_.length%3;r===0&&(r=3);for(var i=t.text_.length-3;i>0;i-=3)e.push(t.text_.substr(i,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,r)),e.reverse()}else e.push(t.text_);for(var o in t)delete t[o];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var r=t.text_.length-3,i=0;i<r;i+=3)e.push(t.text_.substr(i,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(i))}else e.push(t.text_);for(var o in t)delete t[o];return e}}}};var ne={go:function(t,e){if(!t)return"";for(var r="",i=!1,o=0;o<t.length;o++){var n=t[o];typeof n=="string"?r+=n:(r+=ne._go2(n),n.type_==="1st-level escape"&&(i=!0))}return!e&&!i&&r&&(r="{"+r+"}"),r},_goInner:function(t){return t&&ne.go(t,!0)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var r={a:ne._goInner(t.a),b:ne._goInner(t.b),p:ne._goInner(t.p),o:ne._goInner(t.o),q:ne._goInner(t.q),d:ne._goInner(t.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),e+=r.a+"\\,"),(r.b||r.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",e+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),e+=r.o),t.dType==="kv"?((r.d||r.q)&&(e+="{\\vphantom{X}}"),r.d&&(e+="^{"+r.d+"}"),r.q&&(e+="_{\\smash[t]{"+r.q+"}}")):t.dType==="oxidation"?(r.d&&(e+="{\\vphantom{X}}",e+="^{"+r.d+"}"),r.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+r.q+"}}"),r.d&&(e+="{\\vphantom{X}}",e+="^{"+r.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+ne._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+ne._goInner(t.p1);break;case"bond":if(e=ne._getBond(t.kind_),!e)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var i="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"pu-frac":var o="\\frac{"+ne._goInner(t.p1)+"}{"+ne._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+ne._goInner(t.p1)+"}{"+ne._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+ne._goInner(t.p1)+"}{"+ne._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+ne._goInner(t.p1)+"}{"+ne._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+ne._goInner(t.p1)+"}_{"+ne._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+ne._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var n={rd:ne._goInner(t.rd),rq:ne._goInner(t.rq)},a=ne._getArrow(t.r);n.rd||n.rq?t.r==="<=>"||t.r==="<=>>"||t.r==="<<=>"||t.r==="<-->"?(a="\\long"+a,n.rd&&(a="\\overset{"+n.rd+"}{"+a+"}"),n.rq&&(t.r==="<-->"?a="\\underset{\\lower2mu{"+n.rq+"}}{"+a+"}":a="\\underset{\\lower6mu{"+n.rq+"}}{"+a+"}"),a=" {}\\mathrel{"+a+"}{} "):(n.rq&&(a+="[{"+n.rq+"}]"),a+="{"+n.rd+"}",a=" {}\\mathrel{\\x"+a+"}{} "):a=" {}\\mathrel{\\long"+a+"}{} ",e=a;break;case"operator":e=ne._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"entitySkip":e="~";break;case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};var or=class extends f{constructor(r){super({type:"choice"});this.choices=r,this.skipBoundary=!0}static fromJson(r){return new or([Je(r.choices[0]),Je(r.choices[1]),Je(r.choices[2]),Je(r.choices[3])])}toJson(){let r=[];for(let i of this.choices)r.push(i.filter(o=>o.type!=="first").map(o=>o.toJson()));return T(g({},super.toJson()),{choices:r})}render(r){let i=f.createBox(r,this.choices[Math.floor(r.mathstyle.id/2)]);return i?(this.caret&&(i.caret=this.caret),this.bind(r,i)):null}serialize(r){return R("\\mathchoice",f.serialize(this.choices[0],r),f.serialize(this.choices[1],r),f.serialize(this.choices[2],r),f.serialize(this.choices[3],r))}};var nr=class extends f{constructor(r,i,o){super({type:"delim",command:r,style:o==null?void 0:o.style});this.value=i,this.size=o==null?void 0:o.size}static fromJson(r){return new nr(r.command,r.delim,r)}toJson(){return T(g({},super.toJson()),{delim:this.value,size:this.size})}render(r){return new x(this.value,{type:"middle"})}serialize(r){return R(this.command,this.value)}},ar=class extends f{constructor(r,i,o){super({type:"sizeddelim",command:r,style:o.style});this.value=i,this.delimType=o.delimType,this.size=o.size}static fromJson(r){return new ar(r.command,r.delim,r)}toJson(){return T(g({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(r){let i=os(this.value,this.size,r,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return i?(i=this.bind(r,i),this.caret&&(i.caret=this.caret),i):null}serialize(r){return R(this.command,this.value)}};var gt=class extends f{constructor(r,i,o,n){super({type:"enclose",command:r,style:n.style});this.body=i,this.backgroundcolor=n.backgroundcolor,o.updiagonalarrow&&(o.updiagonalstrike=!1),o.box&&(o.left=!1,o.right=!1,o.bottom=!1,o.top=!1),this.notation=o,this.shadow=n.shadow,this.strokeWidth=n.strokeWidth,this.strokeStyle=n.strokeStyle,this.svgStrokeStyle=n.svgStrokeStyle,this.strokeColor=n.strokeColor,this.borderStyle=n.borderStyle,this.padding=n.padding,this.captureSelection=!0}static fromJson(r){return new gt(r.command,r.body,r.notation,r)}toJson(){return T(g({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}serialize(r){var o;let i=(o=this.command)!=null?o:"";if(this.command==="\\enclose"){i+="{"+Object.keys(this.notation).join(" ")+"}";let n="",a="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(n+=a+'mathbackground="'+this.backgroundcolor+'"',a=","),this.shadow&&this.shadow!=="auto"&&(n+=a+'shadow="'+this.shadow+'"',a=","),this.strokeWidth||this.strokeStyle!=="solid"?(n+=a+this.borderStyle,a=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(n+=a+'mathcolor="'+this.strokeColor+'"',a=","),n&&(i+=`[${n}]`)}return R(i,this.bodyToLatex(r))}render(r){var u;let i=new P({parent:r},this.style),o=f.createBox(i,this.body);if(!o)return null;let n=i.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding}),a=kc(this.borderStyle),s=new x(null,{classes:"ML__notation"});s.setStyle("box-sizing","border-box"),s.setStyle("left",`calc(-${a} / 2 - ${n}em)`),s.setStyle("height",`calc(${o.height+o.depth+2*n}em)`),s.height=o.height+n,s.depth=o.depth+n,s.setStyle("width",`calc(100% + ${2*n}em + 2 * ${a})`),this.backgroundcolor&&s.setStyle("background-color",(u=this.backgroundcolor)!=null?u:"transparent"),this.notation.box&&s.setStyle("border",this.borderStyle),this.notation.actuarial&&(s.setStyle("border-top",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(s.setStyle("border-bottom",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(s.setStyle("border-radius","8px"),s.setStyle("border",this.borderStyle)),this.notation.circle&&(s.setStyle("border-radius","50%"),s.setStyle("border",this.borderStyle)),this.notation.top&&s.setStyle("border-top",this.borderStyle),this.notation.left&&s.setStyle("border-left",this.borderStyle),this.notation.right&&s.setStyle("border-right",this.borderStyle),this.notation.bottom&&s.setStyle("border-bottom",this.borderStyle);let l="";if(this.notation.horizontalstrike&&(l+='<line x1="3%" y1="50%" x2="97%" y2="50%"',l+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,l+=' stroke-linecap="round"',this.svgStrokeStyle&&(l+=` stroke-dasharray="${this.svgStrokeStyle}"`),l+="/>"),this.notation.verticalstrike&&(l+='<line x1="50%" y1="3%" x2="50%" y2="97%"',l+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,l+=' stroke-linecap="round"',this.svgStrokeStyle&&(l+=` stroke-dasharray="${this.svgStrokeStyle}"`),l+="/>"),this.notation.updiagonalstrike&&(l+='<line x1="3%" y1="97%" x2="97%" y2="3%"',l+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,l+=' stroke-linecap="round"',this.svgStrokeStyle&&(l+=` stroke-dasharray="${this.svgStrokeStyle}"`),l+="/>"),this.notation.downdiagonalstrike&&(l+='<line x1="3%" y1="3%" x2="97%" y2="97%"',l+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,l+=' stroke-linecap="round"',this.svgStrokeStyle&&(l+=` stroke-dasharray="${this.svgStrokeStyle}"`),l+="/>"),l){let d;this.shadow!=="none"&&(d=this.shadow==="auto"?"filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)":"filter: drop-shadow("+this.shadow+")"),uo(s,l,d)}let c=new x([s,o]);return c.setStyle("position","relative"),c.setStyle("display","inline"),c.height=o.height+n,c.depth=o.depth+n,c.left=n,c.right=n,this.caret&&(c.caret=this.caret),c.wrap(i)}};function kc(t){if(!t)return"1px";let e=t.match(/([0-9][a-zA-Z\%]+)/);return e===null?"1px":e[1]}var it=class extends f{constructor(r,i,o,n){var a,s;super({type:"genfrac",style:n.style,command:r,displayContainsHighlight:!0});this.above=i,this.below=o,this.hasBarLine=(a=n==null?void 0:n.hasBarLine)!=null?a:!0,this.continuousFraction=(s=n==null?void 0:n.continuousFraction)!=null?s:!1,this.numerPrefix=n==null?void 0:n.numerPrefix,this.denomPrefix=n==null?void 0:n.denomPrefix,this.mathstyleName=n==null?void 0:n.mathstyleName,this.leftDelim=n==null?void 0:n.leftDelim,this.rightDelim=n==null?void 0:n.rightDelim,this.fractionNavigationOrder=n==null?void 0:n.fractionNavigationOrder}static fromJson(r){return new it(r.command,r.above,r.below,r)}toJson(){let r={};return this.continuousFraction&&(r.continuousFraction=!0),this.numerPrefix&&(r.numerPrefix=this.numerPrefix),this.denomPrefix&&(r.denomPrefix=this.denomPrefix),this.leftDelim&&(r.leftDelim=this.leftDelim),this.rightDelim&&(r.rightDelim=this.rightDelim),this.hasBarLine||(r.hasBarLine=!1),this.mathstyleName&&(r.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(r.fractionNavigationOrder=this.fractionNavigationOrder),g(g({},super.toJson()),r)}serialize(r){return R(this.command,this.aboveToLatex(r),this.belowToLatex(r))}get children(){if(this._children)return this._children;let r=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(let i of this.below)r.push(...i.children),r.push(i);for(let i of this.above)r.push(...i.children),r.push(i)}else{for(let i of this.above)r.push(...i.children),r.push(i);for(let i of this.below)r.push(...i.children),r.push(i)}return this._children=r,r}render(r){var B,_;let i=new P({parent:r,mathstyle:this.mathstyleName},this.style),o=i.metrics,n=new P({parent:i,mathstyle:this.continuousFraction?"":"numerator"},this.style),a=this.numerPrefix?new x([new x(this.numerPrefix),f.createBox(n,this.above)],{isTight:n.isTight,type:"skip"}):(B=f.createBox(n,this.above,{type:"skip"}))!=null?B:new x(null,{type:"skip"}),s=new P({parent:i,mathstyle:this.continuousFraction?"":"denominator"},this.style),l=this.denomPrefix?new x([new x(this.denomPrefix),f.createBox(s,this.below,{type:"skip"})]):(_=f.createBox(s,this.below,{type:"skip"}))!=null?_:new x(null,{type:"skip"}),c=this.hasBarLine?o.defaultRuleThickness:0,u,d=0,m;i.isDisplayStyle?(u=o.num1,d=c>0?3*c:7*c,m=o.denom1):(c>0?(u=o.num2,d=c):(u=o.num3,d=3*c),m=o.denom2);let h=[];this.isSelected&&h.push("ML__selected");let y=a.depth,b=l.height,M;if(c<=0){let O=u-y-(b-m);O<d&&(u+=(d-O)/2,m+=(d-O)/2),M=new Y({individualShift:[{box:a,shift:-u,classes:[...h,"ML__center"]},{box:l,shift:m,classes:[...h,"ML__center"]}]}).wrap(i)}else{let O=Ke+c/2,V=Ke-c/2;u<d+y+O&&(u=d+y+O),m<d+b-V&&(m=d+b-V);let Ce=new x(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Ce.height=c/2,Ce.depth=c/2,M=new Y({individualShift:[{box:l,shift:m,classes:[...h,"ML__center"]},{box:Ce,shift:-V+c/2,classes:h},{box:a,shift:-u,classes:[...h,"ML__center"]}]}).wrap(i)}let k=i.isDisplayStyle?o.delim1:o.delim2,w=this.leftDelim?this.bind(r,ei("open",this.leftDelim,k,!0,r,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Ft(i,"open"),L=null;this.continuousFraction?L=new x(null,{type:"close"}):this.rightDelim?L=this.bind(r,ei("close",this.rightDelim,k,!0,r,{style:this.style,mode:this.mode,isSelected:this.isSelected})):L=Ft(i,"close");let E=this.bind(r,new x([w,M,L],{isTight:i.isTight,type:"inner",classes:"mfrac"}));return E?(this.caret&&(E.caret=this.caret),this.attachSupsub(r,{base:E})):null}};var te=class extends f{constructor(r,i){var o;super({type:"latex",value:r,mode:"latex"});this.isSuggestion=(o=i==null?void 0:i.isSuggestion)!=null?o:!1,this.isError=!1}static fromJson(r){let i=new te(r.value);return r.isSuggestion&&(i.isSuggestion=!0),r.isError&&(i.isError=!0),i}toJson(){let r={};return this.isSuggestion&&(r.isSuggestion=!0),this.isError&&(r.isError=!0),g({type:"latex",value:this.value},r)}get computedStyle(){return{}}render(r){let i=new x(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return i?(this.caret&&(i.caret=this.caret),this.bind(r,i)):null}},We=class extends f{constructor(e){super({type:"latexgroup",mode:"latex"}),this.body=[...e].map(r=>new te(r)),this.skipBoundary=!1}static fromJson(e){return new We("")}toJson(){return super.toJson()}render(e){let r=f.createBox(e,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(e,r)):null}serialize(e){var r,i;return(i=(r=this.body)==null?void 0:r.map(o=>o.value).join(""))!=null?i:""}};var Nt=class extends f{constructor(r,i,o){super({type:"line",command:r,style:o.style});this.skipBoundary=!0,this.body=i,this.position=o.position}static fromJson(r){return new Nt(r.command,r.body,r)}toJson(){return T(g({},super.toJson()),{position:this.position})}render(r){let i=new P({parent:r,mathstyle:"cramp"},this.style),o=f.createBox(i,this.body);if(!o)return null;let n=i.metrics.defaultRuleThickness/i.scalingFactor,a=new x(null,{classes:this.position+"-line"});a.height=n,a.maxFontSize=n*1.125*i.scalingFactor;let s;return this.position==="overline"?s=new Y({shift:0,children:[{box:o},3*n,{box:a},n]}):s=new Y({top:o.height,children:[n,{box:a},3*n,{box:o}]}),this.caret&&(s.caret=this.caret),new x(s,{classes:this.position,type:"skip"})}};var Se=class extends f{constructor(r,i,o){var n,a,s,l;super({type:(n=o.type)!=null?n:"mop",command:r,style:o.style,isFunction:o==null?void 0:o.isFunction});typeof i=="string"?this.value=i:this.body=i,this.captureSelection=(a=o.captureSelection)!=null?a:!1,this.hasArgument=(s=o.hasArgument)!=null?s:!1,this.variant=o==null?void 0:o.variant,this.variantStyle=o==null?void 0:o.variantStyle,this.subsupPlacement=o==null?void 0:o.limits,this.isExtensibleSymbol=(l=o==null?void 0:o.isExtensibleSymbol)!=null?l:!1}static fromJson(r){return new Se(r.command,r.body?r.body:r.value,r)}toJson(){let r=super.toJson();return this.hasArgument&&(r.hasArgument=!0),this.variant&&(r.variant=this.variant),this.variantStyle&&(r.variantStyle=this.variantStyle),this.subsupPlacement&&(r.limits=this.subsupPlacement),this.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),this.value&&(r.symbol=this.value),r}render(r){var s;let i,o=0,n=0;if(this.isExtensibleSymbol){let l=r.isDisplayStyle&&this.value!=="\\smallint";if(i=new x(this.value,{fontFamily:l?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(l?"large-op":"small-op"),type:"op",maxFontSize:r.scalingFactor}),!i)return null;i.right=i.italic,o=(i.height-i.depth)/2-Ke*r.scalingFactor,n=i.italic,i.setStyle("color",this.style.color),i.setStyle("background-color",this.style.backgroundColor)}else if(this.body){if(i=f.createBox(r,this.body,{type:"inner"}),!i)return null;i.setStyle("color",this.style.color),i.setStyle("background-color",this.style.backgroundColor)}else this.type,i=new x(this.value,{type:"op",mode:"math",caret:this.caret,maxFontSize:r.scalingFactor,style:{color:this.style.color,backgroundColor:this.style.backgroundColor,variant:this.variant,variantStyle:this.variantStyle},letterShapeStyle:r.letterShapeStyle});this.isExtensibleSymbol&&i.setTop(o);let a=i;if(this.superscript||this.subscript){let l=(s=this.subsupPlacement)!=null?s:"auto";a=l==="over-under"||l==="auto"&&r.isDisplayStyle?this.attachLimits(r,{base:i,baseShift:o,slant:n}):this.attachSupsub(r,{base:i})}return new x(this.bind(r,a),{type:"op",isSelected:this.isSelected,classes:"op-group"})}serialize(r){if(this.value==="\u200B")return this.supsubToLatex(r);let i=[];return this.hasArgument?i.push(R(this.command,this.bodyToLatex(r))):i.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&i.push("\\limits"),this.subsupPlacement==="adjacent"&&i.push("\\nolimits"),this.subsupPlacement==="auto"&&i.push("\\displaylimits")),i.push(this.supsubToLatex(r)),j(i)}};var je=class extends f{constructor(r,i,o){super({type:"overlap",command:r,body:typeof i=="string"?[new f({value:i})]:i,style:o==null?void 0:o.style});this.skipBoundary=!0,this.align=o==null?void 0:o.align,this.boxType=o==null?void 0:o.boxType}static fromJson(r){return new je(r.command,r.body,r)}toJson(){let r={};return this.align&&(r.align=this.align),this.boxType&&(r.boxType=this.boxType),g(g({},super.toJson()),r)}render(r){let i=f.createBox(r,this.body,{classes:"inner"});return i?(this.caret&&(i.caret=this.caret),this.bind(r,new x([i,new x(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}};var ve=class extends f{constructor(r,i){var o,n,a,s;super({type:"overunder",command:r,style:i.style});this.skipBoundary=(o=i.skipBoundary)!=null?o:!0,this.subsupPlacement=i.supsubPlacement,this.body=i.body,this.svgAbove=i.svgAbove,this.svgBelow=i.svgBelow,this.svgBody=i.svgBody,this.above=i.above,this.below=i.below,this.boxType=(n=i.boxType)!=null?n:"ord",this.paddedBody=(a=i.paddedBody)!=null?a:!1,this.paddedLabels=(s=i.paddedLabels)!=null?s:!1}static fromJson(r){return new ve(r.command,r)}toJson(){let r={};return this.skipBoundary||(r.skipBoundary=!1),this.subsupPlacement&&(r.subsupPlacement=this.subsupPlacement),this.svgAbove&&(r.svgAbove=this.svgAbove),this.svgBelow&&(r.svgBelow=this.svgBelow),this.svgBody&&(r.svgBody=this.svgBody),this.boxType!=="ord"&&(r.boxType=this.boxType),this.paddedBody&&(r.paddedBody=!0),this.paddedLabels&&(r.paddedLabels=!0),g(g({},super.toJson()),r)}render(r){let i=this.svgBody?Hr(this.svgBody):f.createBox(r,this.body,{type:"skip"}),o=new P({parent:r,mathstyle:"scriptstyle"},this.style),n=null;this.svgAbove?n=Hr(this.svgAbove):this.above&&(n=f.createBox(o,this.above,{type:"skip"}));let a=null;this.svgBelow?a=Hr(this.svgBelow):this.below&&(a=f.createBox(o,this.below,{type:"skip"})),this.paddedBody&&(i=new x([Ft(r,"open"),i,Ft(r,"close")],{type:"skip"}));let s=Sc(r,{base:i,above:n,below:a,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return s?(this.subsupPlacement==="over-under"?s=this.attachLimits(r,{base:s,type:s.type}):s=this.attachSupsub(r,{base:s}),this.caret&&(s.caret=this.caret),this.bind(r,s)):null}};function Sc(t,e){if(!e.base)return null;if(!e.above&&!e.below){let s=new x(e.base,{type:e.type});return s.setStyle("position","relative"),s}let r=0;e.above&&(r=t.metrics.bigOpSpacing5);let i=null,o=e.base,n=0,a=["ML__center"];if(e.paddedAboveBelow&&a.push("ML__label_padding"),e.below&&e.above){let s=t.metrics.bigOpSpacing5+e.below.height+e.below.depth+o.depth+n;i=new Y({bottom:s,children:[t.metrics.bigOpSpacing5,{box:e.below,classes:a},{box:o,classes:["ML__center"]},r,{box:e.above,classes:a},t.metrics.bigOpSpacing5]})}else e.below?i=new Y({top:o.height-n,children:[t.metrics.bigOpSpacing5,{box:e.below,classes:a},{box:o,classes:["ML__center"]}]}):e.above&&(i=new Y({bottom:o.depth+n,children:[{box:o,classes:["ML__center"]},r,{box:e.above,classes:a},t.metrics.bigOpSpacing5]}));return new x(i,{type:e.type})}var yt=class extends f{constructor(r,i,o){var n,a,s,l;super({type:"phantom",command:r,style:o.style});this.captureSelection=!0,this.body=i,this.isInvisible=(n=o.isInvisible)!=null?n:!1,this.smashDepth=(a=o.smashDepth)!=null?a:!1,this.smashHeight=(s=o.smashHeight)!=null?s:!1,this.smashWidth=(l=o.smashWidth)!=null?l:!1}static fromJson(r){return new yt(r.command,r.body,r)}toJson(){let r={};return this.isInvisible&&(r.isInvisible=!0),this.smashDepth&&(r.smashDepth=!0),this.smashHeight&&(r.smashHeight=!0),this.smashWidth&&(r.smashWidth=!0),g(g({},super.toJson()),r)}render(r){let i=new P({parent:r,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return this.isInvisible,f.createBox(i,this.body,{classes:"inner"});let o=f.createBox(this.isInvisible?i:r,this.body);if(!o)return null;if(this.smashWidth){let n=new x(null,{classes:"fix"});return new x([o,n],{classes:"rlap"}).wrap(r)}if(!this.smashHeight&&!this.smashDepth)return o;if(this.smashHeight&&(o.height=0),this.smashDepth&&(o.depth=0),o.children)for(let n of o.children)this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0);return new Y({firstBaseline:[{box:o}]},{type:o.type}).wrap(r)}};var sr=class extends f{constructor(r,i){var o;super({type:"rule",command:r,style:i.style});this.shift=(o=i.shift)!=null?o:{dimension:0},this.height=i.height,this.width=i.width}static fromJson(r){return new sr(r.command,r)}toJson(){let r={height:this.height,width:this.width};return this.shift&&(r.shift=this.shift),g(g({},super.toJson()),r)}render(r){var l,c,u;let i=new P({parent:r,mathstyle:"textstyle"},this.style),o=(l=i.toEm(this.shift))!=null?l:1,n=(c=i.toEm(this.width))!=null?c:1,a=(u=i.toEm(this.height))!=null?u:1,s=new x(null,{classes:"rule",type:"ord"});return s.setStyle("border-right-width",n,"em"),s.setStyle("border-top-width",a,"em"),s.setStyle("border-color",this.style.color),s.setStyle("vertical-align",o,"em"),this.isSelected&&s.setStyle("opacity","50%"),s.width=n,s.height=a+o,s.depth=-o,this.bind(r,s),this.caret&&(s.caret=this.caret),s.wrap(i)}serialize(r){var o,n,a;let i=(o=this.command)!=null?o:"";return this.shift&&(i+=`[${be(this.shift)}]`),R(i,(n=be(this.width))!=null?n:"",(a=be(this.height))!=null?a:"")}};var ot=class extends f{constructor(r,i,o,n){var a;super({type:"spacing",command:r,style:i});this.width=o,this._braced=(a=n==null?void 0:n.braced)!=null?a:!1}static fromJson(r){return new ot(r.command,r.style,r.width,{braced:r.braced})}toJson(){let r={};return this.width!==void 0&&(r.width=this.width),this._braced&&(r.braced=!0),g(g({},super.toJson()),r)}render(r){var o,n;if(this.command==="space")return new x(this.mode==="math"?null:" ");let i;if(this.width!==void 0)i=new x(null,{classes:"mspace"}),i.left=(o=r.toEm(this.width))!=null?o:0;else{let a=(n={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?n:"mediumspace";i=new x(null,{classes:a})}return i=this.bind(r,i),this.caret&&(i.caret=this.caret),i}serialize(r){var o;let i=(o=this.command)!=null?o:"";return this.width===void 0?i:this._braced&&!("register"in this.width)?`${i}{${be(this.width)}}`:`${i}${be(this.width)}`}};var lr=class extends f{constructor(e,r){var i;super({type:"surd",command:e,mode:(i=r.mode)!=null?i:"math",style:r.style,displayContainsHighlight:!0}),this.body=r.body,this.above=r.index}static fromJson(e){return new lr(e.command,T(g({},e),{index:e.above}))}serialize(e){let r=this.command,i=this.bodyToLatex(e);return this.above&&!this.hasEmptyBranch("above")?R(`${r}[${this.aboveToLatex(e)}]`,i):/^[0-9]$/.test(i)?`${r}${i}`:R(r,i)}render(e){var w;let r=new P({parent:e,mathstyle:"cramp"},this.style),i=(w=f.createBox(r,this.body,{style:this.style,type:"inner"}))!=null?w:new x(null),o=r.scalingFactor,n=r.metrics.defaultRuleThickness/o,a=e.isDisplayStyle?St:n,s=new x(null,{classes:"ML__sqrt-line",style:this.style,height:n}),l=o*(n+a/4),u=Math.max(o*2*a,i.height+i.depth)+l+n,d=new P({parent:e},this.style),m=this.bind(d,new x(ei("inner","\\surd",u,!1,d,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!m)return null;let h=m.height+m.depth-n;h>i.height+i.depth+l&&(l=(l+h-(i.height+i.depth))/2),m.setTop(m.height-i.height-l);let y=this.bind(e,new Y({firstBaseline:[{box:new x(i)},l-2*n,{box:s},n]}).wrap(e)),b=f.createBox(new P({parent:e,mathstyle:"scriptscriptstyle"},this.style),this.above,{style:this.style,type:"skip"});if(!b){let L=new x([m,y],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return L.setStyle("display","inline-block"),L.setStyle("height",L.height+L.depth,"em"),this.caret&&(L.caret=this.caret),this.bind(e,L.wrap(e))}let M=new Y({shift:-.6*(Math.max(m.height,y.height)-Math.max(m.depth,y.depth)),children:[{box:b}]}),k=new x([new x(M,{classes:"ML__sqrt-index",type:"skip"}),m,y],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return k.height=m.height,k.depth=m.depth,this.caret&&(k.caret=this.caret),this.bind(e,k.wrap(e))}};var Mc={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},_c={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Ac(t){zi(t,(e,r)=>{r.type==="bin"&&(!e||/^(middle|bin|op|rel|open|punct)$/.test(e.type))&&(r.type="ord"),(e==null?void 0:e.type)==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(e.type="ord"),r.type!=="skip"&&(e=r)})}function Et(t,e){if(!t.children)return t;let r=t.children;Ac(r);let i=e.getRegisterAsEm("thinmuskip"),o=e.getRegisterAsEm("medmuskip"),n=e.getRegisterAsEm("thickmuskip");return zi(r,(a,s)=>{var d,m,h;if(!a)return;let l=a.type,c=s.isTight?(d=_c[l])!=null?d:null:(m=Mc[l])!=null?m:null,u=(h=c==null?void 0:c[s.type])!=null?h:null;u===3&&(s.left+=i),u===4&&(s.left+=o),u===5&&(s.left+=n)}),t}function zi(t,e,r=void 0){if(t){for(let i of t)i.type==="lift"?r=zi(i.children,e,r):i.type==="skip"?zi(i.children,e):(e(r,i),i.children&&zi(i.children,e),r=i);return r}}var It=class extends f{constructor(r,i,o){super({type:"tooltip",command:o==null?void 0:o.command,mode:"math",style:o==null?void 0:o.style,displayContainsHighlight:!0});this.body=r,this.tooltip=new f({type:"root",body:i,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(r){return new It(r.body,Je(r.tooltip),r)}toJson(){var i;let r=(i=this.tooltip.body)==null?void 0:i.filter(o=>o.type!=="first").map(o=>o.toJson());return T(g({},super.toJson()),{tooltip:r})}render(r){let i=f.createBox(new P,this.body,{style:this.style});if(!i)return null;let o=new P({parent:r,mathstyle:"displaystyle"},{fontSize:$r}),n=Gt(Et(new x(this.tooltip.render(o),{classes:"ML__tooltip-content"}),o)),a=new x([n,i],{classes:"ML__tooltip-container"});return this.caret&&(a.caret=this.caret),this.bind(r,a)}serialize(r){return R(this.command,this.bodyToLatex(r),f.serialize(this.tooltip.body,r))}};function Je(t){if(oe(t))return t.map(i=>Je(i));if(typeof t=="string")return f.fromJson(t);t=g({},t);for(let i of Zt)t[i]&&(t[i]=Je(t[i]));t.args&&(t.args=Ua(t.args)),t.array&&(t.array=Je(t.array));let e=t.type,r;e==="accent"&&(r=Lt.fromJson(t)),e==="array"&&(r=I.fromJson(t)),e==="box"&&(r=He.fromJson(t)),e==="chem"&&(r=wr.fromJson(t)),e==="choice"&&(r=or.fromJson(t)),e==="composition"&&(r=tr.fromJson(t)),e==="delim"&&(r=nr.fromJson(t)),e==="enclose"&&(r=gt.fromJson(t)),e==="error"&&(r=Ue.fromJson(t)),e==="genfrac"&&(r=it.fromJson(t)),e==="group"&&(r=Ct.fromJson(t)),e==="latex"&&(r=te.fromJson(t)),e==="latexgroup"&&(r=We.fromJson(t)),e==="leftright"&&(r=X.fromJson(t)),e==="line"&&(r=Nt.fromJson(t)),e==="macro"&&(r=rr.fromJson(t)),e==="macro-argument"&&(r=ti.fromJson(t)),e==="subsup"&&(r=ft.fromJson(t)),e==="overlap"&&(r=je.fromJson(t)),e==="overunder"&&(r=ve.fromJson(t)),e==="placeholder"&&(r=he.fromJson(t)),e==="prompt"&&(r=ir.fromJson(t)),e==="phantom"&&(r=yt.fromJson(t)),e==="rule"&&(r=sr.fromJson(t)),e==="sizeddelim"&&(r=ar.fromJson(t)),e==="spacing"&&(r=ot.fromJson(t)),e==="surd"&&(r=lr.fromJson(t)),e==="text"&&(r=$e.fromJson(t)),e==="tooltip"&&(r=It.fromJson(t)),e==="mop"&&(r=Se.fromJson(t)),r||(!e||["first","mbin","mrel","mclose","minner","mopen","mord","mpunct","root","space"].includes(e),`${e}`,r=f.fromJson(t));for(let i of Zt)t[i]&&r.setChildren(t[i],i);return t.verbatimLatex!==void 0&&(r.verbatimLatex=t.verbatimLatex),t.subsupPlacement&&(r.subsupPlacement=t.subsupPlacement),t.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),t.isFunction&&(r.isFunction=!0),t.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),t.skipBoundary&&(r.skipBoundary=!0),t.captureSelection&&(r.captureSelection=!0),r}var ms={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},ps={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},fs=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,Lc=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Cc=[/^[a-z]$/,/^[A-Z]$/,fs,Lc],Ec={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Cn=class extends _e{constructor(){super("math")}createAtom(e,r,i){var n,a,s,l,c;if(r===null)return new f({type:"mord",mode:"math",command:e,value:e,style:i});if(r.definitionType==="symbol"){let u=new f({type:(n=r.type)!=null?n:"mord",mode:"math",command:(a=r.command)!=null?a:e,value:String.fromCodePoint(r.codepoint),style:i});return(s=r.isFunction)!=null&&s&&(u.isFunction=!0),e.startsWith("\\")&&(u.verbatimLatex=e),u}let o=new f({type:"mord",mode:"math",command:(l=r.command)!=null?l:e,value:e,style:i});return(c=r.isFunction)!=null&&c&&(o.isFunction=!0),e.startsWith("\\")&&(o.verbatimLatex=e),o}serialize(e,r){let{parent:i}=e[0],o=i==null?void 0:i.computedStyle.fontSize;return Ve(e,"fontSize").map(n=>{let a=Bc(n,r),s=n[0].computedStyle.fontSize;return s&&s!=="auto"&&(!i||o!==s)?R(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][s],a):a})}getFont(e,r){r.variant;let{variant:i}=r,{variantStyle:o}=r;i==="normal"&&!o&&/[\u00A3\u0131\u0237]/.test(e.value)&&(i="main",o="italic"),i==="normal"&&!o&&e.value.length===1&&Cc.forEach((l,c)=>{var u;l.test(e.value)&&Ec[(u=r.letterShapeStyle)!=null?u:"tex"][c]==="it"&&(o="italic")}),o==="up"&&(o=void 0);let n=o?i+"-"+o:i;ms[n];let[a,s]=ms[n];return ps[i]&&!ps[i].test(e.value)?(e.value=Ia(e.value,i,o),null):(fs.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),a)}};function Tc(t,e){let{parent:r}=t[0],i=hs(r);return j(Ve(t,"variant").map(o=>{let n=hs(o[0]),a="";n&&n!==i&&(a={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[n]);let s=j(o.map(l=>f.serialize(l,e)));return a?R(a,s):s}))}function Pc(t,e){let{parent:r}=t[0],i=r==null?void 0:r.computedStyle.color;return j(Ve(t,"color").map(o=>{var s,l;let n=Tc(o,e),a=o[0].computedStyle;return!((s=e.skipStyles)!=null&&s)&&a.color&&(!r||i!==a.color)?R("\\textcolor",(l=a.verbatimColor)!=null?l:a.color,n):n}))}function Bc(t,e){let{parent:r}=t[0],i=r==null?void 0:r.computedStyle.backgroundColor;return j(Ve(t,"backgroundColor").map(o=>{var s,l;let n=Pc(o,e),a=o[0].computedStyle;return!((s=e.skipStyles)!=null&&s)&&n.trim()&&a.backgroundColor&&(!r||i!==a.backgroundColor)&&(o.length>0||!(o[0]instanceof He))&&(n=R("\\ensuremath",n),n=R("\\colorbox",(l=a.verbatimBackgroundColor)!=null?l:a.backgroundColor,n)),n}))}function hs(t){if(!t)return"";let{style:e}=t;if(e.variant===void 0)return"";let r=e.variant;return e.variantStyle&&e.variantStyle!=="up"&&(r+="-"+e.variantStyle),r}new Cn;function ii(t){return[t.reduce((e,r)=>[...e,...r[0]],[]),t.map(e=>e[1]).some(e=>e===!0)]}function Dc(t,e){return[t.map(r=>f.serialize(r,e)),!0]}function Kc(t,e){return ii(Ve(t,"fontShape").map(r=>{let[i,o]=Dc(r,e),{fontShape:n}=r[0].style,a="";return n==="it"&&(a="\\textit"),n==="sl"&&(a="\\textsl"),n==="sc"&&(a="\\textsc"),n==="n"&&(a="\\textup"),!a&&n?[["{",R("\\fontshape",n),...i,"}"],!1]:a?[[R(a,j(i))],!1]:[i,o]}))}function Oc(t,e){return ii(Ve(t,"fontSeries").map(r=>{let[i,o]=Kc(r,e),{fontSeries:n}=r[0].style,a="";return n==="b"&&(a="\\textbf"),n==="l"&&(a="\\textlf"),n==="m"&&(a="\\textmd"),n&&!a?[[R("\\fontseries",n),"{",...i,"}"],!1]:a?[[R(a,j(i))],!1]:[i,o]}))}function zc(t,e){return ii(Ve(t,"fontSize").map(r=>{var a,s;let[i,o]=Oc(r,e),n=(s=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(a=r[0].style.fontSize)!=null?a:""])!=null?s:"";return n?[["{",n,...i,"}"],o]:[i,o]}))}function Rc(t,e){return ii(Ve(t,"fontFamily").map(r=>{var a,s;let[i,o]=zc(r,e),n=(s={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(a=r[0].style.fontFamily)!=null?a:""])!=null?s:"";return n?[[`\\${n}`,"{",...i,"}"],!1]:r[0].style.fontFamily?[["\\fontfamily","{",r[0].style.fontFamily,"}","{",...i,"}"],o]:[i,o]}))}function Fc(t,e){return Rc(t,e)}function Nc(t,e){return ii(Ve(t,"backgroundColor").map(r=>{var a,s;let[i,o]=Ic(r,e),n=r[0].computedStyle;return!((a=e.skipStyles)!=null&&a)&&n.backgroundColor&&n.backgroundColor!=="none"?[["\\colorbox","{",(s=n.verbatimBackgroundColor)!=null?s:n.backgroundColor,"}","{",...i,"}"],!1]:[i,o]}))}function Ic(t,e){var i;if(!t||t.length===0)return[[],!1];let r=(i=t[0].parent)==null?void 0:i.style.color;return ii(Ve(t,"color").map(o=>{var s,l;let[n,a]=Fc(o,e);return!((s=e.skipStyles)!=null&&s)&&o[0].style.color&&o[0].style.color!=="none"&&r!==o[0].style.color?[["\\textcolor","{",(l=o[0].style.verbatimColor)!=null?l:o[0].style.color,"}","{",...n,"}"],!1]:[n,a]}))}var gs={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},En=class extends _e{constructor(){super("text")}createAtom(e,r,i){return r&&r.definitionType==="symbol"?new $e(e,String.fromCodePoint(r.codepoint),i!=null?i:{}):null}serialize(e,r){var n;let[i,o]=Nc(e,r);return((n=r.skipModeCommand)!=null?n:!1)===!0&&(o=!1),o&&(i=[R("\\text",j(i.map(a=>{var s;return(s={$:"\\$","{":"\\textbraceleft","}":"\\textbraceright","\\":"\\textbackslash"}[a])!=null?s:a})))]),i}getFont(e,r){var o,n,a,s,l;let{fontFamily:i}=r;if(gs[i]?e.classes+=" "+gs[i]:i&&e.setStyle("font-family",i),r.fontShape&&(e.classes+=" ",e.classes+=(o={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[r.fontShape])!=null?o:""),r.fontSeries){let c=r.fontSeries.match(/(.?[lbm])?(.?[cx])?/);c&&(e.classes+=" ",e.classes+=(a={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(n=c[1])!=null?n:""])!=null?a:"",e.classes+=" ",e.classes+=(l={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(s=c[2])!=null?s:""])!=null?l:"")}return"Main-Regular"}};new En;var Tn=class extends _e{constructor(){super("latex")}createAtom(e){return new te(e)}serialize(e,r){return[e.filter(i=>i instanceof te&&!i.isSuggestion).map(i=>i.value).join("")]}getFont(){return null}};new Tn;function Bn(t){let e=t.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:e.pop()};return e.includes("shift")&&(r.shift=!0),e.includes("alt")&&(r.alt=!0),e.includes("ctrl")&&(r.ctrl=!0),e.includes("cmd")&&(r.cmd=!0),e.includes("win")&&(r.win=!0),e.includes("meta")&&(r.meta=!0),r}function Fi(t){let e="";return t.shift&&(e+="shift+"),t.alt&&(e+="alt+"),t.ctrl&&(e+="ctrl+"),t.cmd&&(e+="cmd+"),t.win&&(e+="win+"),t.meta&&(e+="meta+"),e+t.key}var Dn=Pn()==="apple"?{id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:Pn()==="windows"?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Vc={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Ri=[],kr;function Pn(){switch(jt()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Tt(t){(!t.platform||t.platform===Pn())&&Ri.push(t)}function ys(t,e){var i;let r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!t)return r;for(let[o,n]of Object.entries(e.mapping)){if(n[0]===t)return r.key=`[${o}]`,r;if(n[1]===t)return r.shift=!0,r.key=`[${o}]`,r;if(n[2]===t)return r.alt=!0,r.key=`[${o}]`,r;if(n[3]===t)return r.shift=!0,r.alt=!0,r.key=`[${o}]`,r}return r.key=(i=Vc[t])!=null?i:"",r}function bs(t){if(t.code)return t;let e=Object.entries(cr().mapping),r=!1,i=!1,o="";for(let n=0;n<4;n++){for(let[a,s]of e)if(s[n]===t.key){o=a,n===3?(r=!0,i=!0):n===2?r=!0:n===1&&(i=!0);break}if(o)break}return new KeyboardEvent(t.type,T(g({},t),{altKey:r,shiftKey:i,code:o}))}function xs(t){var r,i;if(!t||t.key==="Unidentified"||t.key==="Dead")return;let e=t.shiftKey&&t.altKey?3:t.altKey?2:t.shiftKey?1:0;for(let o of Ri)((r=o.mapping[t.code])==null?void 0:r[e])===t.key?o.score+=1:(i=o.mapping[t.code])!=null&&i[e]&&(o.score=0);Ri.sort((o,n)=>n.score-o.score)}function vs(t){kr=Ri.find(e=>t.startsWith(e.locale))}function cr(){return kr!=null?kr:Ri[0]}Tt(Dn);Tt({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}});Tt({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}});Tt({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}});Tt({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}});Tt({id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}});Tt({id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}});Tt({id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}});Tt({id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}});Tt({id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}});function $c(t){if(fe()){let e=jt(),r=t.startsWith("!"),i=t.endsWith(e);if(r&&!i||!r&&i)return!0}return t==="!other"?!1:t==="other"}function ks(t,e,r){if(t.length===0)return"";let i=Fi(Bn(r));for(let o=t.length-1;o>=0;o--)if(t[o].key===i&&(!t[o].ifMode||t[o].ifMode===e))return t[o].command;return""}function ws(t){let e=t;return oe(e)&&(e=e.length>0?e[0]+"("+e.slice(1).join("")+")":""),e}function Ss(t,e){let r=[];if(typeof e=="string"){let n=Ya[e];oe(n)?r=n.slice():n&&r.push(n)}let i=ws(e),o=new RegExp("^"+i.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(let n of t)o.test(ws(n.command))&&r.push(n.key);return r.map(On)}function On(t){var o;let e=/macos|ios|/.test(jt()),r=t.split("+"),i="";for(let n of r)!e&&i&&(i+='<span class="ML__shortcut-join">+</span>'),n.startsWith("[Key")?i+=n.slice(4,5):n.startsWith("Key")?i+=n.slice(3,4):n.startsWith("[Digit")?i+=n.slice(6,7):n.startsWith("Digit")?i+=n.slice(5,6):i+=(o={cmd:"\u2318",meta:e?"\u2318":"command",shift:e?"\u21E7":"shift",alt:e?"\u2325":"alt",ctrl:e?"\u2303":"control","\n":e?"\u23CE":"return","[return]":e?"\u23CE":"return","[enter]":e?"\u2324":"enter","[tab]":e?"\u21E5":"tab","[escape]":"esc","[backspace]":e?"\u232B":"backspace","[delete]":e?"\u2326":"del","[pageup]":e?"\u21DE":"page up","[pagedown]":e?"\u21DF":"page down","[home]":e?"\u2912":"home","[end]":e?"\u2913":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[n.toLowerCase()])!=null?o:n.toUpperCase();return i}function qc(t,e){if(t.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(t.ifPlatform))throw new Error(`Unexpected platform "${t.ifPlatform}" for keybinding ${t.key}`);if(t.ifLayout!==void 0&&(e.score===0||!t.ifLayout.includes(e.id)))return;let r=Bn(t.key),i=t.ifPlatform;if(r.cmd){if(i&&i!=="macos"&&i!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+i+`"
"cmd" modifier can only be used with macOS or iOS platform.`);i||(i=jt()==="ios"?"ios":"macos"),r.win=!1,r.cmd=!1,r.meta=!0}if(r.win){if(i&&i!=="windows")throw new Error('Unexpected "win" modifier with platform "'+i+`"
"win" modifier can only be used with Windows platform.`);i="windows",r.win=!1,r.cmd=!1,r.meta=!0}if(i&&!$c(i))return;if(/^\[.+\]$/.test(r.key))return T(g({},t),{ifPlatform:i,key:Fi(r)});let o=ys(r.key,e);if(!o)throw new Error('Invalid keybinding key "'+t.key+'"');if(o.shift&&r.shift||o.alt&&r.alt)throw new Error(`The keybinding ${t.key} (${Kn(t.command)}) is conflicting with the key combination ${Fi(o)} using the ${e.displayName} keyboard layout`);return o.shift=o.shift||r.shift,o.alt=o.alt||r.alt,o.meta=r.meta,o.ctrl=r.ctrl,T(g({},t),{ifPlatform:i,key:Fi(o)})}function Kn(t){if(Array.isArray(t)){let e=[...t];return e.shift()+"("+e.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return t}function Ms(t,e){let r=[],i=[];for(let o of t)try{let n=qc(o,e);if(n){let a=r.filter(s=>s.key===n.key&&s.ifMode===n.ifMode);if(a.length>0)throw new Error(`Ambiguous key binding ${o.key} (${Kn(o.command)}) matches ${a[0].key} (${Kn(a[0].command)}) with the ${e.displayName} keyboard layout`);r.push(n)}}catch(n){n instanceof Error&&i.push(n.message)}return[r,i]}var _s=`/* The element that display info while in latex mode */
#mathlive-suggestion-popover {
background-color: rgba(97, 97, 97);
color: #fff;
text-align: center;
border-radius: 8px;
position: fixed;
z-index: 1;
display: none;
flex-direction: column;
justify-content: center;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
#mathlive-suggestion-popover.top-tip::after {
content: '';
position: absolute;
top: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-bottom: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.bottom-tip::after {
content: '';
position: absolute;
bottom: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.is-animated {
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
}
#mathlive-suggestion-popover.is-visible {
display: flex;
}
@keyframes ML__fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* The wrapper class for the entire content of the popover panel */
#mathlive-suggestion-popover ul {
display: flex;
flex-flow: column;
list-style: none;
margin: 0;
padding: 0;
align-items: flex-start;
max-height: 400px;
overflow-y: auto;
}
#mathlive-suggestion-popover li {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 8px;
padding: 8px;
width: calc(100% - 16px - 16px);
column-gap: 1em;
border-radius: 8px;
cursor: pointer;
/* Since the content can be clicked on, provide feedback on hover */
}
#mathlive-suggestion-popover li a {
color: #5ea6fd;
padding-top: 0.3em;
margin-top: 0.4em;
display: block;
}
#mathlive-suggestion-popover li a:hover {
color: #5ea6fd;
text-decoration: underline;
}
#mathlive-suggestion-popover li:hover,
#mathlive-suggestion-popover li.is-pressed,
#mathlive-suggestion-popover li.is-active {
background: rgba(255, 255, 255, 0.1);
}
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
.ML__popover__command {
font-size: 1.6rem;
font-family: KaTeX_Main;
}
.ML__popover__current {
background: #5ea6fd;
color: #fff;
}
.ML__popover__latex {
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
align-self: center;
}
/* The keyboard shortcuts for a symbol as displayed in the popover */
.ML__popover__keybinding {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 0.8em;
opacity: 0.7;
}
/* Style for the character that joins the modifiers of a keyboard shortcut
(usually a "+" sign)*/
.ML__shortcut-join {
opacity: 0.5;
}
`;var nt=`.ML__sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.ML__is-inline {
display: inline-block;
}
.ML__base {
visibility: inherit;
display: inline-block;
position: relative;
cursor: text;
padding: 0;
margin: 0;
box-sizing: content-box;
border: 0;
outline: 0;
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
text-decoration: none;
width: min-content;
}
.ML__strut,
.ML__strut--bottom {
display: inline-block;
min-height: 0.5em;
}
.ML__small-delim {
font-family: KaTeX_Main;
}
/* Text mode */
.ML__text {
font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
white-space: pre;
}
/* Use cmr for 'math upright' */
.ML__cmr {
font-family: KaTeX_Main;
font-style: normal;
}
.ML__mathit {
font-family: KaTeX_Math;
/* The KaTeX_Math font is italic by default, so the font-style below is only
useful when a fallback font is used
*/
font-style: italic;
}
.ML__mathbf {
font-family: KaTeX_Main;
font-weight: bold;
}
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
to match TeX idiosyncratic behavior */
.lcGreek.ML__mathbf {
font-family: KaTeX_Math;
font-weight: normal;
}
.ML__mathbfit {
font-family: KaTeX_Math;
font-weight: bold;
font-style: italic;
}
.ML__ams {
font-family: KaTeX_AMS;
}
/* Blackboard */
.ML__bb {
font-family: KaTeX_AMS;
}
.ML__cal {
font-family: KaTeX_Caligraphic;
}
.ML__frak {
font-family: KaTeX_Fraktur;
}
.ML__tt {
font-family: KaTeX_Typewriter;
}
.ML__script {
font-family: KaTeX_Script;
}
.ML__sans {
font-family: KaTeX_SansSerif;
}
.ML__series_ul {
font-weight: 100;
}
.ML__series_el {
font-weight: 100;
}
.ML__series_l {
font-weight: 200;
}
.ML__series_sl {
font-weight: 300;
}
.ML__series_sb {
font-weight: 500;
}
.ML__bold,
.ML__boldsymbol {
font-weight: 700;
}
.ML__series_eb {
font-weight: 800;
}
.ML__series_ub {
font-weight: 900;
}
.ML__series_uc {
font-stretch: ultra-condensed;
}
.ML__series_ec {
font-stretch: extra-condensed;
}
.ML__series_c {
font-stretch: condensed;
}
.ML__series_sc {
font-stretch: semi-condensed;
}
.ML__series_sx {
font-stretch: semi-expanded;
}
.ML__series_x {
font-stretch: expanded;
}
.ML__series_ex {
font-stretch: extra-expanded;
}
.ML__series_ux {
font-stretch: ultra-expanded;
}
.ML__it {
font-style: italic;
}
.ML__shape_ol {
-webkit-text-stroke: 1px black;
text-stroke: 1px black;
color: transparent;
}
.ML__shape_sc {
font-variant: small-caps;
}
.ML__shape_sl {
font-style: oblique;
}
/* First level emphasis */
.ML__emph {
color: #bc2612;
}
/* Second level emphasis */
.ML__emph .ML__emph {
color: #0c7f99;
}
.ML__highlight {
color: #007cb2;
background: #edd1b0;
}
.ML__center {
text-align: center;
}
.ML__label_padding {
padding: 0 0.5em;
}
.ML__frac-line {
width: 100%;
min-height: 1px;
}
.ML__frac-line:after {
content: '';
display: block;
margin-top: max(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
/* There's a bug since Chrome 62 where
sub-pixel border lines don't draw at some zoom
levels (110%, 90%).
Setting the min-height used to work around it, but that workaround
broke in Chrome 84 or so.
Setting the background (and the min-height) seems to work for now.
*/
background: currentColor;
box-sizing: content-box;
/* Vuetify sets the box-sizing to inherit
causes the fraction line to not draw at all sizes (see #26) */
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt {
display: inline-block;
}
.ML__sqrt-sign {
display: inline-block;
position: relative;
}
.ML__sqrt-line {
display: inline-block;
height: max(1px, 0.04em);
width: 100%;
}
.ML__sqrt-line:before {
content: '';
display: block;
margin-top: min(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
background: currentColor;
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt-line:after {
border-bottom-width: 1px;
content: ' ';
display: block;
margin-top: -0.1em;
}
.ML__sqrt-index {
margin-left: 0.27777778em;
margin-right: -0.55555556em;
}
.ML__delim-size1 {
font-family: KaTeX_Size1;
}
.ML__delim-size2 {
font-family: KaTeX_Size2;
}
.ML__delim-size3 {
font-family: KaTeX_Size3;
}
.ML__delim-size4 {
font-family: KaTeX_Size4;
}
.ML__delim-mult .delim-size1 > span {
font-family: KaTeX_Size1;
}
.ML__delim-mult .delim-size4 > span {
font-family: KaTeX_Size4;
}
.ML__accent-body > span {
font-family: KaTeX_Main;
width: 0;
}
.ML__accent-vec > span {
position: relative;
left: 0.24em;
}
.ML__mathlive {
display: inline-block;
direction: ltr;
text-align: left;
text-indent: 0;
text-rendering: auto;
font-family: KaTeX_Main, 'Times New Roman', serif;
font-style: normal;
font-size-adjust: none;
font-stretch: normal;
font-variant-caps: normal;
letter-spacing: normal;
line-height: 1.2;
word-wrap: normal;
word-spacing: normal;
white-space: nowrap;
text-shadow: none;
-webkit-user-select: none;
user-select: none;
width: min-content;
}
.ML__mathlive .style-wrap {
position: relative;
}
.ML__mathlive .mfrac,
.ML__mathlive .left-right {
display: inline-block;
}
.ML__mathlive .vlist-t {
display: inline-table;
table-layout: fixed;
border-collapse: collapse;
}
.ML__mathlive .vlist-r {
display: table-row;
}
.ML__mathlive .vlist {
display: table-cell;
vertical-align: bottom;
position: relative;
}
.ML__mathlive .vlist > span {
display: block;
height: 0;
position: relative;
}
.ML__mathlive .vlist > span > span {
display: inline-block;
}
.ML__mathlive .vlist > span > .pstrut {
overflow: hidden;
width: 0;
}
.ML__mathlive .vlist-t2 {
margin-right: -2px;
}
.ML__mathlive .vlist-s {
display: table-cell;
vertical-align: bottom;
font-size: 1px;
width: 2px;
min-width: 2px;
}
.ML__mathlive .msubsup {
text-align: left;
}
.ML__mathlive .negativethinspace {
display: inline-block;
margin-left: -0.16667em;
height: 0.71em;
}
.ML__mathlive .thinspace {
display: inline-block;
width: 0.16667em;
height: 0.71em;
}
.ML__mathlive .mediumspace {
display: inline-block;
width: 0.22222em;
height: 0.71em;
}
.ML__mathlive .thickspace {
display: inline-block;
width: 0.27778em;
height: 0.71em;
}
.ML__mathlive .enspace {
display: inline-block;
width: 0.5em;
height: 0.71em;
}
.ML__mathlive .quad {
display: inline-block;
width: 1em;
height: 0.71em;
}
.ML__mathlive .qquad {
display: inline-block;
width: 2em;
height: 0.71em;
}
.ML__mathlive .llap,
.ML__mathlive .rlap {
width: 0;
position: relative;
display: inline-block;
}
.ML__mathlive .llap > .inner,
.ML__mathlive .rlap > .inner {
position: absolute;
}
.ML__mathlive .llap > .fix,
.ML__mathlive .rlap > .fix {
display: inline-block;
}
.ML__mathlive .llap > .inner {
right: 0;
}
.ML__mathlive .rlap > .inner {
left: 0;
}
.ML__mathlive .rule {
display: inline-block;
border: solid 0;
position: relative;
box-sizing: border-box;
}
.ML__mathlive .overline .overline-line,
.ML__mathlive .underline .underline-line {
width: 100%;
}
.ML__mathlive .overline .overline-line:before,
.ML__mathlive .underline .underline-line:before {
content: '';
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
display: block;
}
.ML__mathlive .overline .overline-line:after,
.ML__mathlive .underline .underline-line:after {
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
content: '';
display: block;
margin-top: -1px;
}
.ML__mathlive .stretchy {
display: block;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__mathlive .stretchy:before,
.ML__mathlive .stretchy:after {
content: '';
}
.ML__mathlive .stretchy svg {
display: block;
position: absolute;
width: 100%;
height: inherit;
fill: currentColor;
stroke: currentColor;
fill-rule: nonzero;
fill-opacity: 1;
stroke-width: 1;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-miterlimit: 4;
stroke-dasharray: none;
stroke-dashoffset: 0;
stroke-opacity: 1;
}
.ML__mathlive .slice-1-of-2 {
display: inline-flex;
position: absolute;
left: 0;
width: 50.2%;
overflow: hidden;
}
.ML__mathlive .slice-2-of-2 {
display: inline-flex;
position: absolute;
right: 0;
width: 50.2%;
overflow: hidden;
}
.ML__mathlive .slice-1-of-3 {
display: inline-flex;
position: absolute;
left: 0;
width: 25.1%;
overflow: hidden;
}
.ML__mathlive .slice-2-of-3 {
display: inline-flex;
position: absolute;
left: 25%;
width: 50%;
overflow: hidden;
}
.ML__mathlive .slice-3-of-3 {
display: inline-flex;
position: absolute;
right: 0;
width: 25.1%;
overflow: hidden;
}
.ML__mathlive .slice-1-of-1 {
display: inline-flex;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__mathlive .nulldelimiter {
display: inline-block;
}
.ML__mathlive .op-group {
display: inline-block;
}
.ML__mathlive .op-symbol {
position: relative;
}
.ML__mathlive .op-symbol.small-op {
font-family: KaTeX_Size1;
}
.ML__mathlive .op-symbol.large-op {
font-family: KaTeX_Size2;
}
.ML__mathlive .accent > .vlist > span {
text-align: center;
}
.ML__mathlive .mtable .vertical-separator {
display: inline-block;
min-width: 1px;
box-sizing: border-box;
}
.ML__mathlive .mtable .arraycolsep {
display: inline-block;
}
.ML__mathlive .mtable .col-align-m > .vlist-t {
text-align: center;
}
.ML__mathlive .mtable .col-align-c > .vlist-t {
text-align: center;
}
.ML__mathlive .mtable .col-align-l > .vlist-t {
text-align: left;
}
.ML__mathlive .mtable .col-align-r > .vlist-t {
text-align: right;
}
.ML__error {
display: inline-block;
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
background-color: hsla(341, 100%, 40%, 0.1);
background-repeat: repeat-x;
background-size: 3px 3px;
padding-bottom: 3px;
background-position: 0 100%;
}
.ML__error > .ML__error {
background: transparent;
padding: 0;
}
.ML__composition {
background: #fff1c2;
color: black;
text-decoration: underline var(--caret-color-computed, var(--ML__caret-color));
}
.ML__placeholder {
color: var(--placeholder-color, var(--ML__placeholder-color));
opacity: var(--placeholder-opacity, 0.4);
padding-left: 0.4ex;
padding-right: 0.4ex;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}
.ML__notation {
position: absolute;
box-sizing: border-box;
line-height: 0;
}
.ML__container {
min-height: auto !important;
}
.ML__prompt {
border-radius: 2px;
}
.ML__editablePromptBox {
outline: 1px solid #acacac;
border-radius: 2px;
z-index: -1;
}
.ML__focusedPromptBox {
outline: highlight auto 1px;
}
.ML__lockedPromptBox {
background-color: rgba(142, 142, 141, 0.4);
z-index: -1;
}
.ML__correctPromptBox {
outline: 1px solid var(--correct-color, var(--ML__correct-color));
box-shadow: 0 0 5px var(--correct-color, var(--ML__correct-color));
}
.ML__incorrectPromptBox {
outline: 1px solid var(--incorrect-color, var(--ML__incorrect-color));
box-shadow: 0 0 5px var(--incorrect-color, var(--ML__incorrect-color));
}
`;function Pt(t){return{value:t.model.getValue(),selectionIsCollapsed:t.model.selectionIsCollapsed,canUndo:t.canUndo(),canRedo:t.canRedo(),style:t.selectionStyle,mode:t.model.mode}}function Bo(t){if(t.silenceNotifications)return;let e=t.silenceNotifications;t.silenceNotifications=!0,t.listeners.onSelectionDidChange(),t.silenceNotifications=e}function H(t,e={}){if(t.silenceNotifications)return!0;let r=t.silenceNotifications;t.silenceNotifications=!0;let i=t.listeners.onContentWillChange(e);return t.silenceNotifications=r,i}function q(t,e){var r;window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(t.mathfield)),!(t.silenceNotifications||!t.mathfield.host)&&(t.silenceNotifications=!0,t.mathfield.host.dispatchEvent(new InputEvent("input",T(g({},e),{data:e.data?e.data:(r=e.inputType)!=null?r:"",bubbles:!0,composed:!0}))),t.silenceNotifications=!1)}var zn=class extends Q{constructor(){super("latex")}createAtom(e){return new te(e)}onPaste(e,r){var o;if(!r)return!1;let i=typeof r=="string"?r:(o=r.getData("text/x-latex"))!=null?o:r.getData("text/plain");return i&&H(e.model,{inputType:"insertFromPaste",data:i})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i)&&(e.startRecording(),e.snapshot("paste"),q(e.model,{inputType:"insertFromPaste"}),re(e)),e.startRecording(),!0):!1}insert(e,r,i){if(!H(e,{data:r,inputType:"insertText"}))return!1;i||(i={}),i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder");let{silenceNotifications:o}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let n=e.silenceNotifications;e.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(xe(e.selection)):i.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward");let a=[];for(let c of r)Ha.test(c)&&a.push(new te(c));let s=e.at(e.position);if(s instanceof We&&(s=s.lastChild),!(s.parent instanceof We)){let c=new We("");s.parent.addChildAfter(c,s),s=c.firstChild}let l=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=n,i.selectionMode==="before"||(i.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),q(e,{data:r,inputType:"insertText"}),e.silenceNotifications=o,!0}};function As(t){return t.atoms.find(e=>e instanceof We)}function Sr(t){var r,i;let e=t.atoms.find(o=>o instanceof We);return e?(i=(r=e.body)==null?void 0:r.filter(o=>o instanceof te))!=null?i:[]:[]}function Do(t,e){var s;let r=0,i=!1,o=Number.isFinite(e==null?void 0:e.before)?(s=e==null?void 0:e.before)!=null?s:0:t.lastOffset;for(;r<=o&&!i;){let l=t.at(r);i=l instanceof te&&l.isSuggestion,i||r++}if(!i)return[void 0,void 0];let n=r,a=!1;for(;n<=o&&!a;){let l=t.at(n);a=!(l instanceof te&&l.isSuggestion),a||n++}return[r-1,n-1]}new zn;function Ni(t){let e=Sr(t.model).filter(r=>r.isSuggestion);if(e.length!==0){t.model.position=t.model.offsetOf(e[0].leftSibling);for(let r of e)r.parent.removeChild(r)}}function ni(t,e){var c;let{model:r}=t;Ni(t);for(let u of Sr(r))u.isError=!1;if(!r.selectionIsCollapsed||t.options.popoverPolicy==="off"){oi(t);return}let i=[],o=r.at(r.position);for(;o&&o instanceof te&&/^[a-zA-Z\*]$/.test(o.value);)o=o.leftSibling;if(o&&o instanceof te&&o.value==="\\")for(i.push(o),o=o.rightSibling;o&&o instanceof te&&/^[a-zA-Z\*]$/.test(o.value);)i.push(o),o=o.rightSibling;let n=i.map(u=>u.value).join(""),a=Wa(t,n);if(a.length===0){if(/^\\[a-zA-Z\*]+$/.test(n))for(let u of i)u.isError=!0;oi(t);return}let s=(c=e==null?void 0:e.atIndex)!=null?c:0;t.suggestionIndex=s<0?a.length-1:s%a.length;let l=a[t.suggestionIndex];if(l!==n){let u=i[i.length-1];u.parent.addChildrenAfter([...l.slice(n.length-l.length)].map(d=>new te(d,{isSuggestion:!0})),u),bt(t,{interactive:!0})}Ls(t,a)}function Rn(t){let[e,r]=Do(t,{before:t.position});if(e===void 0||r===void 0)return!1;let i=!1;return t.getAtoms([e,r]).forEach(o=>{o.isSuggestion&&(o.isSuggestion=!1,i=!0)}),i}function ur(t,e="accept",r){var s,l;oi(t);let i=As(t.model);if(!i)return!1;if(e==="accept-suggestion"){let c=Sr(t.model).filter(u=>u.isSuggestion);if(c.length===0)return!1;for(let u of c)u.isSuggestion=!1;return t.model.position=t.model.offsetOf(c[c.length-1]),!0}let n=Sr(t.model).filter(c=>!c.isSuggestion).map(c=>c.value).join(""),a=i.leftSibling;return i.parent.removeChild(i),t.model.position=t.model.offsetOf(a),t.model.mode=(s=r==null?void 0:r.mode)!=null?s:"math",e==="reject"||(Q.insert(t.model,n,{selectionMode:(l=r==null?void 0:r.selectItem)!=null&&l?"item":"placeholder",format:"latex",mode:"math"}),t.snapshot(),t.model.announce("replacement")),!0}function Mr(t){var r;let e=document.getElementById(t);return e?e.dataset.refcount=Number(Number.parseInt((r=e.dataset.refcount)!=null?r:"0")+1).toString():(e=document.createElement("div"),e.setAttribute("aria-hidden","true"),e.dataset.refcount="1",e.id=t,document.body.append(e)),e}function ai(t){var i;let e=document.getElementById(t);if(!e)return;let r=Number.parseInt((i=e.getAttribute("data-refcount"))!=null?i:"0");r<=1?e.remove():e.dataset.refcount=Number(r-1).toString()}function Wc(t,e){let r=new P({from:t.context}),i=new f({type:"root",body:le(e,{context:r})}),o=Gt(Et(new x(i.render(r),{classes:"ML__base"}),r));return zt(o,{classes:"ML__mathlive"}).toMarkup()}function Ls(t,e){var o;if(e.length===0){oi(t);return}let r="";for(let[n,a]of e.entries()){let s=a,l=Wc(t,a),c=Ss(t.keybindings,s).join("<br>");r+=`<li role="button" data-command="${s}" ${n===t.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${s}</span><span class="ML__popover__command">${l}</span>`,c&&(r+=`<span class="ML__popover__keybinding">${c}</span>`),r+="</li>"}let i=Uc(t,`<ul>${r}</ul>`);Fn()&&((o=i.querySelector(".ML__popover__current"))==null||o.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var n;i&&!Fn()&&(i.classList.add("is-visible"),si(t),(n=i.querySelector(".ML__popover__current"))==null||n.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function Fn(){let t=document.getElementById("mathlive-suggestion-popover");return t?t.classList.contains("is-visible"):!1}function si(t,e){var d;if(!t.element||t.element.mathfield!==t||!Fn())return;if(((d=t.model.at(t.model.position))==null?void 0:d.type)!=="latex"){oi(t);return}if(e!=null&&e.deferred){setTimeout(()=>si(t),32);return}let r=Zr(t.field);if(!r)return;let i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=window.innerWidth-document.documentElement.clientWidth,a=window.innerHeight-document.documentElement.clientHeight,s=window.mathVirtualKeyboard.boundingRect.height,l=document.getElementById("mathlive-suggestion-popover");r.x+l.offsetWidth/2>o-n?l.style.left=`${o-l.offsetWidth-n}px`:r.x-l.offsetWidth/2<0?l.style.left="0":l.style.left=`${r.x-l.offsetWidth/2}px`;let c=r.y-r.height;i-a-s-r.y<c?(l.classList.add("ML__popover--reverse-direction"),l.classList.remove("top-tip"),l.classList.add("bottom-tip"),l.style.top=`${r.y-r.height-l.offsetHeight-15}px`):(l.classList.remove("ML__popover--reverse-direction"),l.classList.add("top-tip"),l.classList.remove("bottom-tip"),l.style.top=`${r.y+15}px`)}function oi(t){t.suggestionIndex=0;let e=document.getElementById("mathlive-suggestion-popover");e&&(e.classList.remove("is-visible"),e.innerHTML="")}function Uc(t,e){let r=document.getElementById("mathlive-suggestion-popover");return r||(r=Mr("mathlive-suggestion-popover"),qe("mathlive-suggestion-popover-stylesheet",_s),qe("mathlive-core-stylesheet",nt),r.addEventListener("pointerdown",i=>i.preventDefault()),r.addEventListener("click",i=>{let o=i.target;for(;o&&!o.dataset.command;)o=o.parentElement;o&&(ur(t,"reject"),Q.insert(t.model,o.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),t.dirty=!0,t.focus())})),r.innerHTML=window.MathfieldElement.createHTML(e),r}function Cs(){ai("mathlive-suggestion-popover"),rt("mathlive-suggestion-popover-stylesheet"),rt("mathlive-core-stylesheet")}function jc(){let t=String(new Error().stack).replace(/^Error.*\n/,"").split(`
`);if(t.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let e=t[1],r=e.match(/http.*\.ts[\?:]/);return r&&(e=t[2]),r=e.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=e.match(/at (.*(\.ts))[\?:]/),r||(r=e.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[1]:(console.error(t),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${e}").`),"")}var Ii=null,Es,Ts,Nn=((Ts=(Es=globalThis==null?void 0:globalThis.document)==null?void 0:Es.currentScript)==null?void 0:Ts.src)||jc();async function Ko(t){if(/^(?:[a-z+]+:)?\/\//i.test(t))return new URL(t).href;if(Ii===null)try{let e=await fetch(Nn,{method:"HEAD"});e.status===200&&(Ii=e.url)}catch(e){console.error(`Invalid URL "${t}" (relative to "${Nn}")`)}return new URL(t,Ii!=null?Ii:Nn).href}function Gc(t,e,r={}){return new FontFace(t,`url(${e}.woff2) format('woff2')`,r)}var Re="not-loaded";async function Ps(){return Re="not-loaded",_r()}async function _r(){var e;if(Re!=="not-loaded")return;if(Re="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){Re="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){let r=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],i=Array.from(document.fonts).map(a=>a.family);if(r.every(a=>i.includes(a))){Re="ready";return}if(!window.MathfieldElement.fontsDirectory){Re="not-loaded";return}let o=await Ko(window.MathfieldElement.fontsDirectory);if(!o){document.body.classList.add("ML__fonts-did-not-load"),Re="error";return}let n=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(a=>Gc(a[0].replace(/-[a-zA-Z]+$/,""),o+"/"+a[0],a[1]));try{(await Promise.all(n.map(s=>{try{return s.load()}catch(l){}}))).forEach(s=>document.fonts.add(s)),Re="ready";return}catch(a){console.error(`MathLive 0.93.0: The math fonts could not be loaded from "${o}"`,{cause:a}),document.body.classList.add("ML__fonts-did-not-load")}Re="error"}}function Xc(t){let e=0;for(let r=0;r<t.length;r++)e=e*31+t.charCodeAt(r),e=e|0;return Math.abs(e)}function re(t,e){t.dirty||(t.dirty=!0,requestAnimationFrame(()=>{Rt(t)&&t.dirty&&(t.atomBoundsCache=new Map,bt(t,e),t.atomBoundsCache=void 0)}))}function Zc(t,e){var n;e=e!=null?e:{};let r=new P({from:T(g({},t.context),{atomIdsSettings:{seed:e.forHighlighting?Xc(f.serialize(t.model.root,{expandMacro:!1,defaultMode:t.options.defaultMode})):"random",groupNumbers:(n=e.forHighlighting)!=null?n:!1},letterShapeStyle:t.options.letterShapeStyle}),mathstyle:t.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),i=t.model.root.render(r);return zt(Et(i,r),{classes:t.hasEditablePrompts?"ML__mathlive ML__prompting":"ML__mathlive",attributes:{translate:"no","aria-hidden":"true"}})}function In(t,e){let{model:r}=t;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(let n of r.atoms)n.caret=void 0,n.isSelected=!1,n.containsCaret=!1;let i=t.isSelectionEditable&&t.hasFocus();if(r.selectionIsCollapsed)r.at(r.position).caret=i?t.model.mode:void 0;else{let n=r.getAtoms(r.selection,{includeChildren:!0});for(let a of n)a.isSelected=!0}if(i){let n=r.at(r.position).parent;for(;n;)n.containsCaret=!0,n=n.parent}return Zc(t,e).toMarkup()}function bt(t,e){var a;if(!Rt(t))return;e!=null||(e={});let r=(a=t.element)==null?void 0:a.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=t.hasEditableContent?"flex":"none");let i=t.field,o=t.isSelectionEditable&&t.hasFocus(),n=i.classList.contains("ML__focused");n&&!o?i.classList.remove("ML__focused"):!n&&o&&i.classList.add("ML__focused"),i.innerHTML=window.MathfieldElement.createHTML(In(t,e)),t.fieldContent=i.getElementsByClassName("ML__mathlive")[0],Vi(t,e.interactive),t.dirty=!1}function Vi(t,e){let r=t.field;if(!r)return;for(let s of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))s.remove();if(!t.hasFocus())return;!(e!=null&&e)&&Re!=="error"&&Re!=="ready"&&setTimeout(()=>{Re==="ready"?Vi(t):setTimeout(()=>Vi(t),128)},32);let i=t.model,o=parseFloat(getComputedStyle(r).width),a=r.getBoundingClientRect().width/o;if(a=isNaN(a)?1:a,i.selectionIsCollapsed){si(t,{deferred:!0});let s=i.at(i.position);for(;s&&!(s.containsCaret&&s.displayContainsHighlight);)s=s.parent;if(s!=null&&s.containsCaret&&s.displayContainsHighlight){let l=An(t,er(t,s),a);if(l){l.left/=a,l.right/=a,l.top/=a,l.bottom/=a;let c=document.createElement("div");c.classList.add("ML__contains-highlight"),c.style.position="absolute",c.style.left=`${l.left}px`,c.style.top=`${l.top}px`,c.style.width=`${Math.ceil(l.right-l.left)}px`,c.style.height=`${Math.ceil(l.bottom-l.top-1)}px`,r.insertBefore(c,r.childNodes[0])}}return}for(let s of Yc(_o(t,{excludeAtomsWithBackground:!0}))){s.left/=a,s.right/=a,s.top/=a,s.bottom/=a;let l=document.createElement("div");l.classList.add("ML__selection"),l.style.position="absolute",l.style.left=`${s.left}px`,l.style.top=`${s.top}px`,l.style.width=`${Math.ceil(s.right-s.left)}px`,l.style.height=`${Math.ceil(s.bottom-s.top-1)}px`,r.insertBefore(l,r.childNodes[0])}}function Yc(t){let e=[];for(let r of t){let i=!1;for(let o of e)if(r.left===o.left&&r.right===o.right&&r.top===o.top&&r.bottom===o.bottom){i=!0;break}i||e.push(r)}t=e,e=[];for(let r of t){let i=0;for(let o of t)if(r.left>=o.left&&r.right<=o.right&&r.top>=o.top&&r.bottom<=o.bottom&&(i+=1,i>1))break;i===1&&e.push(r)}return e}var Vn=3,xt;function me(t,e){e=g({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},e!=null?e:{}),xt||(xt={});for(let r of Object.keys(t))xt[r],xt[r]=T(g({},e),{fn:t[r]})}function Bs(t){let e;return Array.isArray(t)?t[0]==="performWithFeedback"||t[0]==="performVariant"?e=t[1]:e=t[0]:e=t,e=e.replace(/-\w/g,r=>r[1].toUpperCase()),xt[e]}function dr(t){var e;return(e=Bs(t))==null?void 0:e.target}function Ds(t,e){var l;if(!e)return!1;let r,i=[],o=!1,n=!1;oe(e)?(r=e[0],i=e.slice(1)):r=e,r=r.replace(/-\w/g,c=>c[1].toUpperCase());let a=xt[r],s=a==null?void 0:a.target;if(s==="model"){if(!t.isSelectionEditable&&(a!=null&&a.changeContent))return t.model.announce("plonk"),!1;/^(delete|add)/.test(r)&&(r!=="deleteBackward"&&t.flushInlineShortcutBuffer(),t.snapshot(r)),/^complete/.test(r)||Ni(t),xt[r].fn(t.model,...i),ni(t),n=!0,o=!0}else if(s==="virtual-keyboard")n=(l=window.mathVirtualKeyboard.executeCommand(e))!=null?l:!1,o=!0;else if(xt[r]){if(!t.isSelectionEditable&&(a!=null&&a.changeContent))return t.model.announce("plonk"),!1;/^(undo|redo)/.test(r)&&t.flushInlineShortcutBuffer(),n=xt[r].fn(t,...i),o=!0}else throw new Error(`Unknown command "${r}"`);return s!=="virtual-keyboard"&&(!t.model.selectionIsCollapsed||a!=null&&a.changeSelection)&&(t.flushInlineShortcutBuffer(),a!=null&&a.changeContent||t.stopCoalescingUndo(),t.style={}),n&&re(t),o}function Qc(t,e){var o;t.focus(),li.keypressVibration&&lo()&&navigator.vibrate(Vn);let r=Bs(e);window.MathfieldElement.playSound((o=r==null?void 0:r.audioFeedback)!=null?o:"keypress");let i=t.executeCommand(e);return t.scrollIntoView(),i}me({performWithFeedback:(t,e)=>Qc(t,e)});function eu(t){return ni(t,{atIndex:t.suggestionIndex+1}),!1}function tu(t){return ni(t,{atIndex:t.suggestionIndex-1}),!1}me({complete:ur},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0});me({nextSuggestion:eu,previousSuggestion:tu},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var $i="mathlive#virtual-keyboard-message";function qi(t){var r;return t.type!=="message"?!1:((r=t.data)==null?void 0:r.type)===$i}var Ar=class{constructor(){this.targetOrigin=window.origin;this.originValidator="none";window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new Ar),this._singleton}set alphabeticLayout(e){this.sendMessage("update-setting",{alphabeticLayout:e})}set layouts(e){this.sendMessage("update-setting",{layouts:e})}set editToolbar(e){this.sendMessage("update-setting",{editToolbar:e})}set actionKeycap(e){this.sendMessage("update-setting",{actionKeycap:e})}set shiftKeycap(e){this.sendMessage("update-setting",{shiftKeycap:e})}set backspaceKeycap(e){this.sendMessage("update-setting",{backspaceKeycap:e})}set tabKeycap(e){this.sendMessage("update-setting",{tabKeycap:e})}set container(e){throw new Error("Container inside an iframe cannot be changed")}show(e){this.sendMessage("show",e)}hide(e){this.sendMessage("hide",e)}get visible(){return this._boundingRect.height>0}set visible(e){e?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(e){return this.sendMessage("execute-command",{command:e}),!0}updateToolbar(e){this.sendMessage("update-toolbar",e)}update(e){this.sendMessage("update-setting",e)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(e,r,i){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].has(r)||this.listeners[e].add(r)}dispatchEvent(e){return!this.listeners[e.type]||this.listeners[e.type].size===0?!0:(this.listeners[e.type].forEach(r=>{typeof r=="function"?r(e):r==null||r.handleEvent(e)}),!e.defaultPrevented)}removeEventListener(e,r,i){this.listeners[e]&&this.listeners[e].delete(r)}handleEvent(e){if(qi(e)){if(!Yr(e.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");this.handleMessage(e.data)}}handleMessage(e){let{action:r}=e;if(r==="execute-command"){let{command:i}=e;dr(i)==="virtual-keyboard"&&this.executeCommand(i);return}if(r==="synchronize-proxy"){e.boundingRect,this._boundingRect=e.boundingRect;return}if(r==="geometry-changed"){e.boundingRect,this._boundingRect=e.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(e,r={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(g({type:$i,action:e},r),this.targetOrigin)}};var Ks=`:where(:root) {
--keyboard-height: 0;
--keyboard-accent-color: #0c75d8;
--keyboard-background: #cacfd7;
--keyboard-border: #ddd;
--keyboard-padding-horizontal: 0px;
--keyboard-padding-top: 5px;
--keyboard-padding-bottom: 0px;
--keyboard-toolbar-text: #2c2e2f;
--keyboard-toolbar-text-active: var(--keyboard-accent-color);
--keyboard-toolbar-background: transparent;
--keyboard-toolbar-background-hover: #eee;
--keyboard-toolbar-background-selected: transparent;
--keyboard-horizontal-rule: 1px solid #fff;
--keycap-background: white;
--keycap-background-hover: #f5f5f7;
--keycap-background-active: var(--keyboard-accent-color);
--keycap-background-pressed: var(--keyboard-accent-color);
--keycap-border: #e5e6e9;
--keycap-border-bottom: #8d8f92;
--keycap-text: #000;
--keycap-text-active: #fff;
--keycap-text-hover: var(--keycap-text);
--keycap-text-pressed: #fff;
--keycap-secondary-text: #333;
--keycap-shift-text: var(--keyboard-accent-color);
--keycap-primary-background: var(--keyboard-accent-color);
--keycap-primary-text: #ddd;
--keycap-primary-background-hover: #0d80f2;
--keycap-secondary-background: #a0a9b8;
--keycap-secondary-background-hover: #7d8795;
--keycap-secondary-text: #060707;
--keycap-secondary-border: #c5c9d0;
--keycap-secondary-border-bottom: #989da6;
--keycap-height: 60px;
/* Keycap width (incl. margin) */
--keycap-max-width: 100px;
--keycap-gap: 8px;
--keycap-font-size: clamp(16px, 4cqw, 24px);
--keycap-small-font-size: calc(var(--keycap-font-size) * 0.8);
--keycap-extra-small-font-size: calc(var(--keycap-font-size) / 1.42);
--variant-panel-background: #fff;
--variant-keycap-text: var(--keycap-text, #000);
--variant-keycap-text-active: var(--keycap-text-active, #fff);
--variant-keycap-background-active: var(--keyboard-accent-color);
--variant-keycap-length: 70px;
--variant-keycap-font-size: 30px;
--variant-keycap-aside-font-size: 12px;
--keycap-shift-font-size: 16px;
--keycap-shift-color: var(--keyboard-accent-color);
}
.if-can-undo,
.if-can-redo,
.if-can-copy,
.if-can-cut,
.if-can-paste {
opacity: 0.4;
pointer-events: none;
}
.can-undo .if-can-undo,
.can-redo .if-can-redo,
.can-copy .if-can-copy,
.can-cut .if-can-cut,
.can-paste .if-can-paste {
opacity: 1;
pointer-events: all;
}
body > .ML__keyboard {
position: fixed;
--keyboard-padding-bottom: calc(var(--keyboard-padding-bottom) + env(safe-area-inset-bottom, 0));
}
body > .ML__keyboard.is-visible > .MLK__backdrop {
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
border-top: 1px solid var(--keyboard-border);
}
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
box-shadow: none;
border: none;
}
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
transition-property: transform, opacity;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ML__keyboard {
position: relative;
overflow: hidden;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: var(--keyboard-zindex, 105);
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
opacity: 1;
transform: none;
pointer-events: none;
}
.ML__keyboard :where(div) {
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
transform: none;
}
.MLK__backdrop {
position: absolute;
bottom: calc(-1 * var(--keyboard-height));
width: 100%;
height: var(--keyboard-height);
box-sizing: border-box;
padding-top: var(--keyboard-padding-top);
padding-bottom: var(--keyboard-padding-bottom);
padding-left: var(--keyboard-padding-horizontal);
padding-right: var(--keyboard-padding-horizontal);
opacity: 0;
visibility: hidden;
transform: translate(0, 0);
background: var(--keyboard-background);
}
.backdrop-is-transparent .MLK__backdrop {
background: transparent;
}
/* If a custom layout has a custom container/backdrop
(backdrop-is-transparent), make sure to let pointer event go through. */
.backdrop-is-transparent .MLK__plate {
background: transparent;
pointer-events: none;
}
/* If a custom layout has a custom container/backdrop, make sure to
allow pointer events on it. */
.backdrop-is-transparent .MLK__layer > div > div {
pointer-events: all;
}
.ML__keyboard.is-visible > .MLK__backdrop {
transform: translate(0, calc(-1 * var(--keyboard-height)));
opacity: 1;
visibility: visible;
}
.caps-lock-indicator {
display: none;
width: 8px;
height: 8px;
background: #0cbc0c;
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
border-radius: 8px;
right: 8px;
top: 8px;
position: absolute;
}
.ML__keyboard.is-caps-lock .caps-lock-indicator {
display: block;
}
.ML__keyboard.is-caps-lock .shift {
background: var(--keycap-background-active);
color: var(--keycap-text-active);
}
.MLK__plate {
position: absolute;
top: 0;
left: var(--keyboard-padding-horizontal);
width: calc(100% - 2 * var(--keyboard-padding-horizontal));
margin: 0;
padding: 0;
box-sizing: border-box;
container-type: inline-size;
touch-action: none;
-webkit-user-select: none;
user-select: none;
pointer-events: all;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
/* Size of toolbar labels */
font-weight: 400;
text-shadow: none;
}
.ML__box-placeholder {
color: var(--box-placeholder-color, var(--keyboard-accent-color));
}
.MLK__tex {
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__tex-math {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
font-style: italic;
}
.MLK__layer {
display: none;
outline: none;
}
.MLK__layer.is-visible {
display: flex;
flex-flow: column;
}
/* Keyboard layouts are made or rows of keys... */
.MLK__rows {
--private-keycap-gap: var(--keycap-gap);
--private-keycap-height: var(--keycap-height);
--private-keycap-max-width: var(--keycap-max-width);
display: flex;
flex-flow: column;
align-items: center;
border-collapse: separate;
clear: both;
border: 0;
margin: 0;
margin-bottom: var(--private-keycap-gap);
gap: var(--private-keycap-gap);
/* If the styling include, e.g., some shadows, they will be
cut off by the overflow. In that case, set the padding to
compensate. */
padding-left: var(--keyboard-row-padding-left, 0);
padding-right: var(--keyboard-row-padding-right, 0);
overflow-x: auto;
touch-action: none;
}
.MLK__rows > .row {
display: flex;
flex-flow: row;
justify-content: center;
width: 100%;
gap: var(--private-keycap-gap);
margin: 0;
padding: 0;
/* For the alignment of the text on some modifiers (e.g. shift) */
/* Extra spacing between two adjacent keys */
/** A regular keycap */
}
.MLK__rows > .row .tex {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .row .tex-math {
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .row .big-op {
font-size: calc(1.25 * var(--keycap-font-size, 20px));
}
.MLK__rows > .row .small {
font-size: var(--keycap-small-font-size, 16px);
}
.MLK__rows > .row .bottom {
justify-content: flex-end;
}
.MLK__rows > .row .left {
align-items: flex-start;
padding-left: 12px;
}
.MLK__rows > .row .right {
align-items: flex-end;
padding-right: 12px;
}
.MLK__rows > .row .w0 {
width: 0;
}
.MLK__rows > .row .w5 {
width: calc(min(var(--private-keycap-max-width, 100px), 10cqw) / 2 - var(--private-keycap-gap));
}
.MLK__rows > .row .w15 {
width: calc(1.5 * min(var(--private-keycap-max-width, 100px), 10cqw) var(--private-keycap-gap));
}
.MLK__rows > .row .w20 {
width: calc(2 * min(var(--private-keycap-max-width, 100px), 10cqw) - var(--private-keycap-gap));
}
.MLK__rows > .row .w50 {
width: calc(5 * min(var(--private-keycap-max-width, 100px), 10cqw) - var(--private-keycap-gap));
}
.MLK__rows > .row .MLK__keycap.w50 {
font-size: 80%;
padding-top: 10px;
font-weight: 100;
}
.MLK__rows > .row .separator {
background: transparent;
border: none;
pointer-events: none;
}
.MLK__rows > .row .horizontal-rule {
height: 6px;
margin-top: 3px;
margin-bottom: 0;
width: 100%;
border-radius: 0;
border-top: var(--keyboard-horizontal-rule);
}
.MLK__rows > .row .ghost {
background: var(--keyboard-toolbar-background);
border: none;
color: var(--keyboard-toolbar-text);
}
.MLK__rows > .row .ghost:hover {
background: var(--keyboard-toolbar-background-hover);
}
.MLK__rows > .row .bigfnbutton {
font-size: var(--keycap-extra-small-font-size, 14px);
}
.MLK__rows > .row .shift,
.MLK__rows > .row .action {
color: var(--keycap-secondary-text);
background: var(--keycap-secondary-background);
border-color: var(--keycap-secondary-border);
border-bottom-color: var(--keycap-secondary-border-bottom);
line-height: 0.8;
font-size: min(1rem, var(--keycap-small-font-size, 16px));
font-weight: 600;
padding: 8px 12px 8px 12px;
}
.MLK__rows > .row .shift:hover,
.MLK__rows > .row .action:hover {
background: var(--keycap-secondary-background-hover);
}
.MLK__rows > .row .action.primary {
background: var(--keycap-primary-background);
color: var(--keycap-primary-text);
}
.MLK__rows > .row .action.primary:hover {
background: var(--keycap-primary-background-hover);
color: var(--keycap-primary-text);
}
.MLK__rows > .row .shift.selected,
.MLK__rows > .row .action.selected {
color: var(--keyboard-toolbar-text-active);
}
.MLK__rows > .row .shift.selected.is-pressed,
.MLK__rows > .row .action.selected.is-pressed,
.MLK__rows > .row .shift.selected.is-active,
.MLK__rows > .row .action.selected.is-active {
color: white;
}
.MLK__rows > .row .warning {
background: #cd0030;
color: white;
}
.MLK__rows > .row .warning svg.svg-glyph {
width: 24px;
height: 24px;
min-height: 24px;
}
.MLK__rows > .row div {
display: flex;
flex-flow: column;
align-items: center;
justify-content: space-evenly;
width: calc(min(var(--private-keycap-max-width), 10cqw) - var(--private-keycap-gap));
height: var(--private-keycap-height);
box-sizing: border-box;
padding: 0;
vertical-align: top;
text-align: center;
float: left;
color: var(--keycap-text);
fill: currentColor;
font-size: var(--keycap-font-size, 20px);
background: var(--keycap-background);
border: 1px solid var(--keycap-border);
border-bottom-color: var(--keycap-border-bottom);
border-radius: 6px;
cursor: pointer;
touch-action: none;
/* Keys with a variants panel */
position: relative;
overflow: hidden;
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.MLK__rows > .row div:hover {
background: var(--keycap-background-hover);
}
.MLK__rows > .row div .ML__mathlive {
pointer-events: none;
touch-action: none;
}
.MLK__rows > .row div svg.svg-glyph {
margin: 8px 0;
width: 20px;
height: 20px;
min-height: 20px;
}
.MLK__rows > .row div svg.svg-glyph-lg {
margin: 8px 0;
width: 24px;
height: 24px;
min-height: 24px;
}
.MLK__rows > .row div.MLK__tex-math {
font-size: 25px;
}
.MLK__rows > .row div.is-pressed {
background: var(--keycap-background-pressed);
color: var(--keycap-text-pressed);
}
.MLK__rows > .row div.MLK__keycap.is-active,
.MLK__rows > .row div.action.is-active,
.MLK__rows > .row div.MLK__keycap.is-pressed,
.MLK__rows > .row div.action.is-pressed {
z-index: calc(var(--keyboard-zindex, 105) - 5);
}
.MLK__rows > .row div.MLK__keycap.is-active aside,
.MLK__rows > .row div.action.is-active aside,
.MLK__rows > .row div.MLK__keycap.is-pressed aside,
.MLK__rows > .row div.action.is-pressed aside {
display: none;
}
.MLK__rows > .row div.MLK__keycap.is-active .MLK__shift,
.MLK__rows > .row div.action.is-active .MLK__shift,
.MLK__rows > .row div.MLK__keycap.is-pressed .MLK__shift,
.MLK__rows > .row div.action.is-pressed .MLK__shift {
display: none;
}
.MLK__rows > .row div.shift.is-pressed,
.MLK__rows > .row div.MLK__keycap.is-pressed,
.MLK__rows > .row div.action.is-pressed {
background: var(--keycap-background-pressed);
color: var(--keycap-text-pressed);
}
.MLK__rows > .row div.shift.is-active,
.MLK__rows > .row div.MLK__keycap.is-active,
.MLK__rows > .row div.action.is-active {
background: var(--keycap-background-active);
color: var(--keycap-text-active);
}
.MLK__rows > .row div small {
color: var(--keycap-secondary-text);
}
.MLK__rows > .row div aside {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 10px;
line-height: 10px;
color: var(--keycap-secondary-text);
}
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
Note there are a different set of tooltip rules for the keyboard toggle
(it's in a different CSS tree) */
.MLK__tooltip {
position: relative;
}
.MLK__tooltip::after {
position: absolute;
display: inline-table;
content: attr(data-tooltip);
top: inherit;
bottom: 100%;
width: max-content;
max-width: 200px;
padding: 8px 8px;
background: #616161;
color: #fff;
text-align: center;
z-index: 2;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
border-radius: 2px;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-weight: 400;
font-size: 12px;
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
opacity: 0;
transform: scale(0.5);
}
.MLK__tooltip:hover {
position: relative;
}
.MLK__tooltip:hover::after {
opacity: 1;
transform: scale(1);
}
.MLK__toolbar {
align-self: center;
display: flex;
flex-flow: row;
justify-content: space-between;
width: 100%;
max-width: 996px;
min-height: 32px;
/* Icons for undo/redo, etc. */
}
.MLK__toolbar svg {
height: 20px;
width: 20px;
}
.MLK__toolbar > .left {
position: relative;
display: flex;
justify-content: flex-start;
flex-flow: row;
}
.MLK__toolbar > .right {
display: flex;
justify-content: flex-end;
flex-flow: row;
}
.MLK__toolbar > div > div {
/* "button" in the toolbar */
display: flex;
align-items: center;
justify-content: center;
color: var(--keyboard-toolbar-text);
fill: currentColor;
background: var(--keyboard-toolbar-background);
font-size: 135%;
padding: 4px 15px;
cursor: pointer;
width: max-content;
min-width: 42px;
min-height: 22px;
border: none;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 8px;
padding-top: 8px;
margin-top: 7px;
margin-bottom: 8px;
margin-left: 4px;
margin-right: 4px;
border-radius: 8px;
box-shadow: none;
border-bottom: 2px solid transparent;
}
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
background: var(--keyboard-toolbar-background-hover);
}
.MLK__toolbar > div > div.disabled svg,
.MLK__toolbar > div > div.disabled:hover svg,
.MLK__toolbar > div > div.disabled.is-pressed svg {
color: var(--keyboard-toolbar-text);
opacity: 0.2;
}
.MLK__toolbar > div > div:hover,
.MLK__toolbar > div > div:active,
.MLK__toolbar > div > div.is-pressed,
.MLK__toolbar > div > div.is-active {
color: var(--keyboard-toolbar-text-active);
}
.MLK__toolbar > div > div.selected {
color: var(--keyboard-toolbar-text-active);
background: var(--keyboard-toolbar-background-selected);
border-radius: 0;
border-bottom-color: var(--keyboard-toolbar-text-active);
padding-bottom: 4px;
margin-bottom: 12px;
}
/* This is the element that displays variants on press+hold */
.MLK__variant-panel {
visibility: hidden;
position: fixed;
display: flex;
flex-flow: row wrap-reverse;
justify-content: center;
align-content: center;
margin: 0;
padding: 0;
bottom: auto;
top: 0;
box-sizing: content-box;
transform: none;
z-index: calc(var(--keyboard-zindex, 105) + 1);
touch-action: none;
max-width: 350px;
background: var(--variant-panel-background);
text-align: center;
border-radius: 6px;
padding: 6px;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
transition: none;
}
.MLK__variant-panel.is-visible {
visibility: visible;
}
.MLK__variant-panel.compact {
--variant-keycap-length: 50px;
--variant-keycap-font-size: 24px;
--variant-keycap-aside-font-size: 10px;
}
.MLK__variant-panel .item {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: var(--variant-keycap-font-size);
height: var(--variant-keycap-length);
width: var(--variant-keycap-length);
margin: 0;
box-sizing: border-box;
border-radius: 5px;
border: 1px solid transparent;
background: transparent;
pointer-events: all;
cursor: pointer;
color: var(--variant-keycap-text);
fill: currentColor;
}
@media (max-height: 412px) {
.MLK__variant-panel .item {
--variant-keycap-font-size: 24px;
--variant-keycap-length: 50px;
}
}
.MLK__variant-panel .item .ML__mathlive {
pointer-events: none;
}
.MLK__variant-panel .item.is-active {
background: var(--variant-keycap-background-active);
color: var(--variant-keycap-text-active);
}
.MLK__variant-panel .item.is-pressed {
background: var(--variant-keycap-background-pressed);
color: var(--variant-keycap-text-pressed);
}
.MLK__variant-panel .item.small {
font-size: var(--keycap-small-font-size, 16px);
}
.MLK__variant-panel .item.swatch-button {
box-sizing: border-box;
background: #fbfbfb;
}
.MLK__variant-panel .item.swatch-button > span {
display: inline-block;
margin: 6px;
width: calc(100% - 12px);
height: calc(100% - 12px);
border-radius: 50%;
}
.MLK__variant-panel .item.swatch-button:hover {
background: #f0f0f0;
}
.MLK__variant-panel .item.swatch-button:hover > span {
border-radius: 2px;
}
.MLK__variant-panel .item.box > div,
.MLK__variant-panel .item.box > span {
border: 1px dashed rgba(0, 0, 0, 0.24);
}
.MLK__variant-panel .item .warning {
min-height: 60px;
min-width: 60px;
background: #cd0030;
color: white;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
}
.MLK__variant-panel .item .warning.is-pressed,
.MLK__variant-panel .item .warning.is-active {
background: red;
}
.MLK__variant-panel .item .warning svg.svg-glyph {
width: 50px;
height: 50px;
}
.MLK__variant-panel .item aside {
font-size: var(--variant-keycap-aside-font-size);
line-height: 12px;
opacity: 0.78;
padding-top: 2px;
}
.MLK__keycap {
position: relative;
}
.MLK__shift {
display: block;
position: absolute;
right: 4px;
top: 4px;
font-size: var(--keycap-shift-font-size);
color: var(--keycap-shift-color);
}
.hide-shift .MLK__shift {
display: none;
}
@media (max-width: 414px) {
.MLK__variant-panel {
max-width: 350px;
--variant-keycap-font-size: 24px;
--variant-keycap-length: 50px;
}
}
/* @xs breakpoint: iPhone 5 */
@container (max-width: 414px) {
.MLK__rows {
--private-keycap-gap: min(var(--keycap-gap), 2px);
--private-keycap-height: min(var(--keycap-height), 42px);
--private-keycap-max-width: min(var(--keycap-max-width), 62px);
}
.MLK__toolbar > div > div {
font-size: 100%;
padding: 0;
margin-left: 2px;
margin-right: 2px;
}
.MLK__rows .shift,
.MLK__rows .action {
font-size: 65%;
}
.MLK__rows .warning svg.svg-glyph {
width: 14px;
height: 14px;
min-height: 14px;
}
}
@container (max-width: 744px) {
.MLK__rows {
--private-keycap-gap: min(var(--keycap-gap), 2px);
--private-keycap-height: min(var(--keycap-height), 52px);
--private-keycap-max-width: min(var(--keycap-max-width), 62px);
}
.MLK__toolbar > div > div {
padding-left: 0;
padding-right: 0;
}
.MLK__tooltip::after {
padding: 8px 16px;
font-size: 16px;
}
.MLK__rows > .row > div.fnbutton {
font-size: 16px;
}
.MLK__rows > .row > div.bigfnbutton {
font-size: calc(var(--keycap-extra-small-font-size, 14px) / 1.55);
}
.MLK__rows > .row > div.small {
font-size: 13px;
}
.MLK__rows > .row > div > aside {
display: none;
}
.MLK__shift {
display: none;
}
}
/* Medium breakpoint: larger phones */
@container (max-width: 768px) {
.MLK__rows {
--private-keycap-height: min(var(--keycap-height), 42px);
}
.MLK__rows > .row > div > small {
font-size: 14px;
}
}
@container (max-width: 1444px) {
.MLK__rows .if-wide {
display: none;
}
}
@media (prefers-color-scheme: dark) {
.ML__keyboard {
--keyboard-accent-color: #0b5c9c;
--keyboard-background: #151515;
--keyboard-border: transparent;
--keyboard-toolbar-text: #e3e4e8;
--keyboard-toolbar-text-active: var(--keyboard-accent-color);
--keyboard-toolbar-background: transparent;
--keyboard-toolbar-background-hover: #303030;
--keyboard-toolbar-background-selected: transparent;
--keyboard-horizontal-rule: 1px solid #303030;
--keycap-background: #1f2022;
--keycap-background-hover: #2f3032;
--keycap-border: transparent;
--keycap-border-bottom: transparent;
--keycap-text: #e3e4e8;
--keycap-secondary-background: #3d4144;
--keycap-secondary-background-hover: #4d5154;
--keycap-secondary-text: #e7ebee;
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--variant-panel-background: #303030;
--variant-keycap-text: var(--keycap-text);
--variant-keycap-text-active: #fff;
}
}
/* Same as the media query, but with a class */
[theme='dark'] .ML__keyboard {
--keyboard-accent-color: #0b5c9c;
--keyboard-background: #151515;
--keyboard-border: transparent;
--keyboard-toolbar-text: #e3e4e8;
--keyboard-toolbar-text-active: var(--keyboard-accent-color);
--keyboard-toolbar-background: transparent;
--keyboard-toolbar-background-hover: #303030;
--keyboard-toolbar-background-selected: transparent;
--keyboard-horizontal-rule: 1px solid #303030;
--keycap-background: #1f2022;
--keycap-background-hover: #2f3032;
--keycap-border: transparent;
--keycap-border-bottom: transparent;
--keycap-text: #e3e4e8;
--keycap-secondary-background: #3d4144;
--keycap-secondary-background-hover: #4d5154;
--keycap-secondary-text: #e7ebee;
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--variant-panel-background: #303030;
--variant-keycap-text: var(--keycap-text);
--variant-keycap-text-active: #fff;
}
[theme='light'] .ML__keyboard {
--keyboard-accent-color: #0c75d8;
--keyboard-background: #cacfd7;
--keyboard-border: #ddd;
--keyboard-toolbar-text: #2c2e2f;
--keyboard-toolbar-text-active: var(--keyboard-accent-color);
--keyboard-toolbar-background: transparent;
--keyboard-toolbar-background-hover: #eee;
--keyboard-toolbar-background-selected: transparent;
--keyboard-horizontal-rule: 1px solid #fff;
--keycap-background: white;
--keycap-background-hover: #f5f5f7;
--keycap-border: #e5e6e9;
--keycap-border-bottom: #8d8f92;
--keycap-text: #000;
--keycap-text-active: var(--keycap-text);
--keycap-text-pressed: #fff;
--keycap-secondary-text: #333;
--keycap-secondary-background: #a0a9b8;
--keycap-secondary-background-hover: #7d8795;
--keycap-secondary-text: #060707;
--keycap-secondary-border: #c5c9d0;
--keycap-secondary-border-bottom: #989da6;
--variant-panel-background: #fff;
--variant-keycap-text: var(--keycap-text, #000);
--variant-keycap-text-active: var(--keycap-text-active, #fff);
--variant-keycap-background-active: var(--keyboard-accent-color);
}
`;var $n={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"e",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\capitalDifferentialD","\\rd","\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},"\\lim_{#?}","\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\mathrm{exp}",insert:"\\mathrm{exp}\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\rd",shift:"\\partial",variants:[{latex:"\\dfrac{\\rd}{\\rd x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\capitalDifferentialD","\\rd","\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
.minimalist-backdrop {
display: flex;
justify-content: center;
}
.minimalist-container {
--keycap-height: 40px;
--keycap-max-width: 53px;
--keycap-small-font-size: 12px;
background: var(--keyboard-background);
padding: 20px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border: 1px solid var(--keyboard-border);
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
}
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}};var Bt=class{constructor(e){var r,i;this.preventOverlayClose=(r=e==null?void 0:e.preventOverlayClose)!=null?r:!1,this.translucent=(i=e==null?void 0:e.translucent)!=null?i:!1,this.state="closed"}get element(){if(this._element)return this._element;let e=document.createElement("div");return e.setAttribute("role","presentation"),e.style.position="fixed",e.style.contain="content",e.style.top="0",e.style.left="0",e.style.right="0",e.style.bottom="0",e.style.zIndex="var(--scrim-zindex, 10099)",e.style.outline="none",this.translucent?(e.style.background="rgba(255, 255, 255, .2)",e.style.backdropFilter="contrast(40%)"):e.style.background="transparent",this._element=e,e}open(e){var n;if(this.state!=="closed")return;this.state="opening",this.savedActiveElement=Os();let{element:r}=this;((n=e==null?void 0:e.root)!=null?n:document.body).appendChild(r),r.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);let i=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";let o=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${o+i}px`,e!=null&&e.child&&r.append(e.child),this.state="open"}close(){var r,i,o,n;if(this.state!=="open")return;this.state="closing",typeof this.onClose=="function"&&this.onClose();let{element:e}=this;e.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),e.remove(),document.body.style.overflow=(r=this.savedOverflow)!=null?r:"",document.body.style.marginRight=(i=this.savedMarginRight)!=null?i:"",Os()!==this.savedActiveElement&&((n=(o=this.savedActiveElement)==null?void 0:o.focus)==null||n.call(o)),e.innerHTML="",this.state="closed"}handleEvent(e){this.preventOverlayClose||(e.target===this._element&&e.type==="click"?(this.close(),e.preventDefault(),e.stopPropagation()):e.target===document&&(e.type==="touchmove"||e.type==="scroll")&&(this.close(),e.preventDefault(),e.stopPropagation()))}};function Os(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var Oo={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"}],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"}],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},at;function zo(t,e){var d,m,h;let r=we.singleton,i=Lr(t),o=(m=(d=r.getKeycap(i==null?void 0:i.id))==null?void 0:d.variants)!=null?m:"";if(typeof o=="string"&&!qn(o)||Array.isArray(o)&&o.length===0){e==null||e();return}let n={},a="";for(let y of ou(o)){let b=Hn(y),M=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);n[M]=b;let[k,w]=ci(b);a+=`<div id=${M} class="item ${w}">${k}</div>`}let s=document.createElement("div");s.setAttribute("aria-hidden","true"),s.className="MLK__variant-panel",s.style.height="auto";let l=Object.keys(n).length,c=5;l===1?c=1:l===2||l===4?c=2:l===3||l===5||l===6?c=3:l>=7&&l<14&&(c=4),s.style.width=`calc(var(--variant-keycap-length) * ${c} + 12px)`,s.innerHTML=li.createHTML(a),Bt.scrim||(Bt.scrim=new Bt),Bt.scrim.open({root:(h=r.container)==null?void 0:h.querySelector(".ML__keyboard"),child:s}),at==null||at.abort(),at=new AbortController,s.addEventListener("pointerup",y=>{let b=Lr(y.target);!(b!=null&&b.id)||!n[b.id]||(Ro(n[b.id]),Cr(),e==null||e(),y.preventDefault())},{capture:!0,passive:!1,signal:at.signal}),s.addEventListener("pointerenter",y=>{let b=Lr(y.target);!(b!=null&&b.id)||!n[b.id]||b.classList.add("is-active")},{capture:!0,signal:at.signal}),s.addEventListener("pointerleave",y=>{let b=Lr(y.target);!(b!=null&&b.id)||!n[b.id]||b.classList.remove("is-active")},{capture:!0,signal:at.signal}),window.addEventListener("pointercancel",()=>{Cr(),e==null||e()},{signal:at.signal}),window.addEventListener("pointerup",()=>{Cr(),e==null||e()},{signal:at.signal});let u=t==null?void 0:t.getBoundingClientRect();if(u){u.top-s.clientHeight<0&&(s.style.width="auto",l<=6?s.style.height="56px":l<=12?s.style.height="108px":l<=18?s.style.height="205px":s.classList.add("compact"));let y=Math.max(0,Math.min(window.innerWidth-s.offsetWidth,(u.left+u.right-s.offsetWidth)/2)),b=u.top-s.clientHeight+5;s.style.transform=`translate(${y}px, ${b}px)`,s.classList.add("is-visible")}}function Cr(){var t;at==null||at.abort(),(t=Bt.scrim)==null||t.close()}function iu(t){if(t==="foreground-color"){let e=[];for(let r of Object.keys(wi))e.push({class:"swatch-button",label:'<span style="border: 3px solid '+wi[r]+'"></span>',command:["applyStyle",{color:r}]});return e}if(t==="background-color"){let e=[];for(let r of Object.keys(vi))e.push({class:"swatch-button",label:'<span style="background:'+vi[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return e}}function qn(t){return Oo[t]!==void 0}function ou(t){var e;return typeof t!="string"?t:(Oo[t]||(Oo[t]=(e=iu(t))!=null?e:[]),Oo[t])}function nu(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r} !important`).join(";")}function au(t){return Object.keys(t).map(e=>`${e} {${nu(t[e])}}`).join("")}function Hi(t){if(!t)return"";let e=new P,r=new f({type:"root",body:le(t,{context:e,args:o=>o==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),i=Gt(Et(new x(r.render(e),{classes:"ML__base"}),e));return zt(i,{classes:"ML__mathlive"}).toMarkup()}function Ji(t){var r;if(Array.isArray(t))return t.map(i=>Ji(i)).flat();let e=typeof t=="string"?{markup:t}:t;return"rows"in e&&Array.isArray(e.rows)&&(e.rows=e.rows.map(i=>i.map(o=>Hn(o)))),(r=e.id)!=null||(e.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[e]}function su(){var n,a;let e=window.mathVirtualKeyboard.alphabeticLayout;if(e==="auto"){let s=cr();s&&(e=s.virtualLayout),(!e||e==="auto")&&(e=(n={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Z.locale.slice(0,2)])!=null?n:"qwerty")}let r={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},i=(a=r[e])!=null?a:r.qwerty,o=[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"4"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(let s of i){let l=[];for(let c of s)/[a-z]/.test(c)?l.push({label:c,class:"hide-shift",shift:{label:c.toUpperCase()},variants:qn(c)?c:void 0}):c==="~"?e!=="dvorak"?l.push("[backspace]"):l.push({label:"[backspace]",width:1}):c==="^"?l.push("[shift]"):c===" "&&l.push("[separator-5]");o.push(l)}return o.push(["[-]","[+]","[=]",{label:" ",width:1.5},",","[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Ji({rows:o})}}function Jn(t){if(t==="alphabetic")return su();if(typeof t=="string")return $n[t],`${t}`,Jn($n[t]);let e;if("rows"in t&&Array.isArray(t.rows)){"layers"in t||"markup"in t;let o=t,{rows:a}=o,s=Ir(o,["rows"]);e=T(g({},s),{layers:Ji({rows:t.rows})})}else if("markup"in t&&typeof t.markup=="string"){let n=t,{markup:a}=n,s=Ir(n,["markup"]);e=T(g({},s),{layers:Ji(t.markup)})}else e=g({},t),"layers"in t?e.layers=Ji(t.layers):console.error('MathLive 0.93.0: provide either a "rows", "markup" or "layers" property');let r=!1,i=!1;for(let a of e.layers)if(a.rows)for(let s of a.rows.flat()){ui(s)&&(r=!0);let l=s.command;typeof l=="string"&&["undo","redo","cut","copy","paste"].includes(l)&&(i=!0)}return(!("displayShiftedKeycaps"in t)||t.displayShiftedKeycaps===void 0)&&(e.displayShiftedKeycaps=r),(!("displayEditToolbar"in t)||t.displayEditToolbar===void 0)&&(e.displayEditToolbar=!i),e}function lu(t,e){var i,o;let r='<div class="left">';if(t.normalizedLayouts.length>1)for(let[n,a]of t.normalizedLayouts.entries()){let s=a,l=[n===e?"selected":"layer-switch"];s.tooltip&&l.push("MLK__tooltip"),s.labelClass&&l.push(...s.labelClass.split(" ")),r+=`<div class="${l.join(" ")}"`,s.tooltip&&(r+=" data-tooltip='"+((i=mt(s.tooltip))!=null?i:s.tooltip)+"' "),n!==e&&(r+=`data-layer="${s.layers[0].id}"`),r+=`>${(o=s.label)!=null?o:"untitled"}</div>`}return r+="</div>",r}function zs(t,e){let r="";if(t.editToolbar==="none")return"";let o=[];e.selectionIsCollapsed?o.push("undo","redo","pasteFromClipboard"):o.push("cutToClipboard","copyToClipboard","pasteFromClipboard");let n={undo:`<div class='action ${e.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${mt("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${e.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${mt("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${mt("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${mt("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${mt("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return r+=o.map(a=>n[a]).join(""),r}function cu(t){for(let e of t)uu(e)}function uu(t){let e={};if(!t.id){if(t.hasAttribute("data-label")&&(e.label=t.dataset.label),t.hasAttribute("data-latex")&&(e.latex=t.dataset.latex),t.hasAttribute("data-key")&&(e.key=t.dataset.key),t.hasAttribute("data-insert")&&(e.insert=t.dataset.insert),t.hasAttribute("data-variants")&&(e.variants=t.dataset.variants),t.hasAttribute("data-aside")&&(e.aside=t.dataset.aside),t.className&&(e.class=t.className),!e.label&&!e.latex&&!e.key&&!e.insert&&(e.latex=t.innerText,e.label=t.innerHTML),t.hasAttribute("data-command"))try{e.command=JSON.parse(t.dataset.command)}catch(r){}t.id=we.singleton.registerKeycap(e)}if(!t.innerHTML){let[r,i]=ci(e);t.innerHTML=window.MathfieldElement.createHTML(r)}}function du(){qe("mathlive-virtual-keyboard-stylesheet",Ks),qe("mathlive-core-stylesheet",nt),_r()}function Rs(){rt("mathlive-core-stylesheet"),rt("mathlive-virtual-keyboard-stylesheet")}var mu=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
</symbol>
<symbol id="svg-shift" viewBox="0 0 384 512">
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
</symbol>
<symbol id="svg-commit" viewBox="0 0 512 512">
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
</symbol>
<symbol id="svg-command" viewBox="0 0 640 512">
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
</symbol>
<symbol id="svg-undo" viewBox="0 0 512 512">
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
</symbol>
<symbol id="svg-redo" viewBox="0 0 512 512">
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
</symbol>
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
</symbol>
<symbol id="svg-tab" viewBox="0 0 448 512">
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
</symbol>
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
</symbol>
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
</symbol>
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
</symbol>
<symbol id="svg-trash" viewBox="0 0 448 512">
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
</symbol>
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
</svg>`;function Fs(t){t.resetKeycapRegistry(),du();let e=document.createElement("div");e.className="ML__keyboard";let r=document.createElement("div");r.className="MLK__plate",r.innerHTML=window.MathfieldElement.createHTML(mu+t.normalizedLayouts.map((a,s)=>pu(t,a,s)).join(""));let i=document.createElement("div");i.className="MLK__backdrop",i.appendChild(r),e.appendChild(i),e.addEventListener("pointerdown",fu,{passive:!1});let o=e.querySelectorAll(".ML__edit-toolbar");if(o)for(let a of o)a.addEventListener("click",s=>{var u,d;let l=s.target,c="";for(;l&&!c;)c=(u=l==null?void 0:l.getAttribute("data-command"))!=null?u:"",l=(d=l==null?void 0:l.parentElement)!=null?d:null;c&&t.executeCommand(JSON.parse(c))});cu(e.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));let n=e.querySelectorAll(".MLK__layer");n.length>0;for(let a of n)a.addEventListener("pointerdown",s=>s.preventDefault());return t.currentLayer=t.latentLayer,e}function pu(t,e,r){let i=[];if(!("layers"in e))return"";for(let o of e.layers)i.push(`<div tabindex="-1" class="MLK__layer" id="${o.id}">`),(t.normalizedLayouts.length>1||e.displayEditToolbar)&&(i.push("<div class='MLK__toolbar' role='toolbar'>"),i.push(lu(t,r)),e.displayEditToolbar&&i.push('<div class="ML__edit-toolbar right"></div>'),i.push("</div>")),i.push(hu(t,o)),i.push("</div>");return i.join("")}function hu(t,e){if(typeof e=="string")return e;let r="";if(typeof e.style=="string"?r+=`<style>${e.style}</style>`:typeof e.style=="object"&&(r+=`<style>${au(e.style)}</style>`),e.backdrop&&(r+=`<div class='${e.backdrop}'>`),e.container&&(r+=`<div class='${e.container}'>`),e.rows){r+="<div class='MLK__rows'>";for(let i of e.rows){r+="<div class=row>";for(let o of i)if(o){let n=t.registerKeycap(o),[a,s]=ci(o);/(^|\s)separator/.test(s)?r+=`<div class="${s}"`:r+=`<div tabindex="-1" id="${n}" class="${s}"`,o.tooltip&&(r+=` data-tooltip="${o.tooltip}"`),r+=`>${a}</div>`}r+="</div>"}r+="</div>"}else e.markup&&(r+=e.markup);return e.container&&(r+="</div>"),e.backdrop&&(r+="</div>"),r}function ci(t,e={shifted:!1}){var o,n,a,s,l,c,u;let r="",i=(o=t.class)!=null?o:"";if(e.shifted&&ui(t)&&(i+=" is-active"),e.shifted&&"shift"in t)typeof t.shift=="string"?r=Hi(t.shift):typeof t.shift=="object"&&(r=t.shift.label?t.shift.label:(n=Hi(t.shift.latex||t.shift.insert||"")||t.shift.key)!=null?n:""),typeof t.shift=="object"&&(i=(s=(a=t.shift.class)!=null?a:t.class)!=null?s:"");else{if(r=t.label?t.label:(l=Hi(t.latex||t.insert||"")||t.key)!=null?l:"",t.shift){let d;typeof t.shift=="string"?d=Hi(t.shift):t.shift.label?d=t.shift.label:d=(c=Hi(t.shift.latex||t.shift.insert||"")||t.shift.key)!=null?c:"",r+=`<span class="MLK__shift">${d}</span>`}t.aside&&(r+=`<aside>${t.aside}</aside>`)}return t.layer&&!/layer-switch/.test(i)&&(i+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(i)||(i+=" MLK__keycap"),!/\bw[0-9]+\b/.test(i)&&t.width&&(i+=(u={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[t.width])!=null?u:""),[r,i||"MLK__keycap"]}var Er={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[return]":{class:"action",command:["performWithFeedback","commit"],width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action",command:["performWithFeedback","commit"],width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["performWithFeedback","hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:"insertDecimalSeparator",shift:",",class:"big-op hide-shift"},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum_{#?}^{#?}",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes"],latex:"\\times",label:"×",shift:{latex:"\\prod",insert:"\\prod_{#?}^{#?}",class:"small"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:mt("tooltip.undo")},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:mt("tooltip.redo")},"[(]":{variants:["\\lbrack","\\langle","\\lfloor","\\lceil","\\lbrace"],latex:"(",label:"(",shift:{label:"[",latex:"\\lbrack"},class:"hide-shift"},"[)]":{variants:["\\rbrack","\\rangle","\\rfloor","\\rceil","\\rbrace"],latex:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function Hn(t){var r;if(typeof t=="string"){if(!Er[t])return{latex:t};t={label:t}}let e;return"label"in t&&t.label&&Er[t.label]&&(e=T(g(g({},Er[t.label]),t),{label:Er[t.label].label})),"key"in t&&t.key&&Er[t.key]&&(e=T(g(g({},Er[t.key]),t),{key:Er[t.key].key})),e?(e.command==="insertDecimalSeparator"&&(e.label=(r=window.MathfieldElement.decimalSeparator)!=null?r:"."),t.label==="[action]"&&(e=g(g({},e),window.mathVirtualKeyboard.actionKeycap)),t.label==="[shift]"&&(e=g(g({},e),window.mathVirtualKeyboard.shiftKeycap)),t.label==="[backspace]"&&(e=g(g({},e),window.mathVirtualKeyboard.backspaceKeycap)),t.label==="[tab]"&&(e=g(g({},e),window.mathVirtualKeyboard.tabKeycap)),e):t}var Wi;function fu(t){var a;if(t.button!==0)return;let e=we.singleton,r=t.target;for(;r&&!r.getAttribute("data-layer");)r=r.parentElement;if(r){e.currentLayer=(a=r.getAttribute("data-layer"))!=null?a:"",t.preventDefault();return}let i=Lr(t.target);if(!(i!=null&&i.id))return;let o=e.getKeycap(i.id);if(!o)return;t.type;let n=new AbortController;i.classList.add("is-pressed"),i.addEventListener("pointerenter",Fo(n),{capture:!0,signal:n.signal}),i.addEventListener("pointerleave",Fo(n),{capture:!0,signal:n.signal}),i.addEventListener("pointercancel",Fo(n),{signal:n.signal}),i.addEventListener("pointerup",Fo(n),{signal:n.signal}),ui(o)&&(i.classList.add("is-active"),e.isShifted=!0),o.variants&&(Wi&&clearTimeout(Wi),Wi=setTimeout(()=>{i.classList.contains("is-pressed")&&(i.classList.remove("is-pressed"),i.classList.add("is-active"),t.target&&"releasePointerCapture"in t.target&&t.target.releasePointerCapture(t.pointerId),zo(i,()=>{n.abort(),i==null||i.classList.remove("is-active")}))},200)),t.preventDefault()}function Fo(t){return e=>{let r=Lr(e.target);if(!(r!=null&&r.id))return;let i=we.singleton,o=i.getKeycap(r.id);if(o){if(e.type==="pointerenter"&&e.target===r&&e.isPrimary&&r.classList.add("is-pressed"),e.type==="pointercancel"){r.classList.remove("is-pressed"),ui(o)&&(i.isShifted=!1,r.classList.toggle("is-active",i.isShifted)),t.abort();return}if(e.type==="pointerleave"&&e.target===r){r.classList.remove("is-pressed"),ui(o)&&(i.isShifted=!1,r.classList.toggle("is-active",i.isShifted));return}if(e.type==="pointerup"){Wi&&clearTimeout(Wi),ui(o)?(i.isShifted=!1,r.classList.toggle("is-active",i.isShifted)):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),we.singleton.isShifted&&o.shift?typeof o.shift=="string"?we.singleton.executeCommand(["insert",o.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]):Ro(o.shift):Ro(o)),t.abort(),e.preventDefault();return}}}}function Ro(t){let e=t.command;!e&&t.insert&&(e=["insert",t.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]),!e&&t.latex&&(e=["insert",t.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]),e||(e=["typedText",t.key||t.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),we.singleton.executeCommand(e)}function gu(t){if(t.nodeType!==1)return!1;let e=t.classList;return e.contains("MLK__keycap")||e.contains("shift")||e.contains("action")||e.contains("fnbutton")||e.contains("bigfnbutton")}function Lr(t){if(!t)return;let e=t;for(;e&&!gu(e);)e=e.parentElement;return e!=null?e:void 0}function ui(t){return!!t.class&&/(^|\s)shift($|\s)/.test(t.class)}var we=class{constructor(){this.originalContainerBottomPadding=null;this.keycapRegistry={};this._isCapslock=!1;this._isShifted=!1;var e,r,i;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts="default",this._editToolbar="default",this._container=(r=(e=window.document)==null?void 0:e.body)!=null?r:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(o=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={},(i=window.top)==null||i.addEventListener("message",this),document.body.addEventListener("focusin",o=>{var a;let n=o.target;if(n!=null&&n.isConnected&&((a=n.tagName)==null?void 0:a.toLowerCase())==="math-field"&&Sa()){let s=n;s.mathVirtualKeyboardPolicy==="auto"&&!s.readOnly&&this.show({animate:!0})}}),document.addEventListener("focusout",o=>{o.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{var l,c,u;let a=document.activeElement,s=!1;for(;a;){if(((l=a.tagName)==null?void 0:l.toLowerCase())==="math-field"){s=!0;break}a=(u=(c=a.shadowRoot)==null?void 0:c.activeElement)!=null?u:null}s||this.hide()},300)})}get currentLayer(){var e,r,i;return(i=(r=(e=this._element)==null?void 0:e.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?i:""}set currentLayer(e){var i;if(!this._element){this.latentLayer=e;return}let r=e?this._element.querySelector(`#${e}.MLK__layer`):null;r||(r=this._element.querySelector(".MLK__layer")),r&&((i=this._element.querySelector(".MLK__layer.is-visible"))==null||i.classList.remove("is-visible"),r.classList.add("is-visible"))}get isCapslock(){return this._isCapslock}set isCapslock(e){var r;e!==this._isCapslock&&((r=this._element)==null||r.classList.toggle("is-caps-lock",e),this._isCapslock=e,this.isShifted=e)}get isShifted(){return this._isShifted}set isShifted(e){this._isCapslock&&(e=!0),this._isShifted!==e&&(this._isShifted=e,this.render())}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(e){let r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=e,r}getKeycap(e){return e?this.keycapRegistry[e]:void 0}getLayer(e){let r=this.normalizedLayouts;for(let i of r)for(let o of i.layers)if(o.id===e)return o}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(e){this._alphabeticLayout=e,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(e){this._actionKeycap=typeof e=="string"?{label:e}:e}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(e){this._shiftKeycap=typeof e=="string"?{label:e}:e}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(e){this._backspaceKeycap=typeof e=="string"?{label:e}:e}get tabKeycap(){return this._tabKeycap}set tabKeycap(e){this._tabKeycap=typeof e=="string"?{label:e}:e}get layouts(){return this._layouts}set layouts(e){this._layouts=e,this.updateNormalizedLayouts(),this.rebuild()}updateNormalizedLayouts(){let e=Array.isArray(this._layouts)?[...this._layouts]:[this._layouts],r=e.findIndex(i=>i==="default");r>=0&&e.splice(r,1,"numeric","symbols","alphabetic","greek"),this._normalizedLayouts=e.map(i=>Jn(i))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(e){this._editToolbar=e,this.rebuild()}get container(){return this._container}set container(e){this._container=e,this.rebuild()}static get singleton(){return this._singleton||(this._singleton=new we),this._singleton}get style(){return this._style}addEventListener(e,r,i){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].has(r)||this.listeners[e].add(r)}dispatchEvent(e){return!this.listeners[e.type]||this.listeners[e.type].size===0?!0:(this.listeners[e.type].forEach(r=>{typeof r=="function"?r(e):r==null||r.handleEvent(e)}),!e.defaultPrevented)}removeEventListener(e,r,i){this.listeners[e]&&this.listeners[e].delete(r)}get element(){return this._element}set element(e){var r;this._element!==e&&((r=this._element)==null||r.remove(),this._element=e)}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get boundingRect(){var r;if(!this._visible)return new DOMRect;let e=(r=this._element)==null?void 0:r.getElementsByClassName("MLK__plate")[0];return e?e.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var r,i;let e=this.boundingRect.height;if(this.container===document.body){(r=this._element)==null||r.style.setProperty("--keyboard-height",`calc(${e}px + env(safe-area-inset-bottom, 0))`);let o=e-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${o}px)`:`${o}px`}else(i=this._element)==null||i.style.setProperty("--keyboard-height",`${e}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;let e=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=e,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;let e=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(e&&(e.backdrop||e.container)));let r=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(r)for(let i of r){let o=this.getKeycap(i.id);if(o){let[n,a]=ci(o,{shifted:this.isShifted});i.innerHTML=window.MathfieldElement.createHTML(n),i.className=a}}}show(e){if(this._visible)return;let r=this.container;if(r&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){let i=this._element.getElementsByClassName("MLK__plate")[0];if(i&&this.observer.observe(i),r===window.document.body){let o=r.style.paddingBottom;this.originalContainerBottomPadding=o;let n=i.offsetHeight-1;r.style.paddingBottom=o?`calc(${o} + ${n}px)`:`${n}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),this.currentLayer=this.latentLayer,this.render()}this._visible=!0,e!=null&&e.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var i;return(i=this._element)==null?void 0:i.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(e){var i;let r=this.container;if(r&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;let o=this._element.getElementsByClassName("MLK__plate")[0];o&&this.observer.unobserve(o),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),Cr(),Rs(),(i=this._element)==null||i.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(r.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var e,r;return(r=(e=this.element)==null?void 0:e.offsetHeight)!=null?r:0}buildAndAttachElement(){var e;this.element,this.element=Fs(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&zo(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(e=this.container)==null||e.appendChild(this.element)}handleEvent(e){if(qi(e)){if(!Yr(e.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");e.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:e.data.action!=="update-setting"&&e.data.action!=="proxy-created"&&e.data.action!=="execute-command"&&(e.source,this.connectedMathfieldWindow=e.source),this.handleMessage(e.data,e.source)}if(this._element)switch(e.type){case"mouseup":case"blur":document.body.style.userSelect="",this.isShifted=!1;break;case"contextmenu":e.button!==2&&e.preventDefault();break;case"keydown":{let r=e;this.isCapslock=r.getModifierState("CapsLock"),r.key==="Shift"&&(this.isShifted=!0);break}case"keyup":{let r=e;r.key==="Shift"&&(this.isShifted=!1),this.isCapslock=r.getModifierState("CapsLock");break}}}handleMessage(e,r){let{action:i}=e;if(i==="execute-command"){let{command:o}=e;if(dr(o)!=="virtual-keyboard"&&window===window.parent)return;this.executeCommand(o);return}if(i==="connect"&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r),i!=="disconnect"&&window===window.top){if(i==="show"){typeof e.animate!="undefined"?this.show({animate:e.animate}):this.show();return}if(i==="hide"){typeof e.animate!="undefined"?this.hide({animate:e.animate}):this.hide();return}if(i==="update-setting"){e.alphabeticLayout&&(this.alphabeticLayout=e.alphabeticLayout),e.layouts&&(this.layouts=e.layouts),e.editToolbar&&(this.editToolbar=e.editToolbar);return}if(i==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r);return}}}sendMessage(e,r,i){if(i||(i=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||i===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:g({type:$i,action:e},r)}));return}if(i)i.postMessage(g({type:$i,action:e},r),{targetOrigin:this.targetOrigin});else if(e==="execute-command"&&Array.isArray(r.command)&&r.command[0]==="insert"){let o=r.command[1].split("");for(let n of o)this.dispatchEvent(new KeyboardEvent("keydown",{key:n,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:n,bubbles:!0}))}}stateWillChange(e){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:e},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(e){let r=this._element;if(!r)return;r.classList.toggle("can-undo",e.canUndo),r.classList.toggle("can-redo",e.canRedo),r.classList.toggle("can-copy",!e.selectionIsCollapsed),r.classList.toggle("can-copy",!e.selectionIsCollapsed),r.classList.toggle("can-paste",!0);let i=r.querySelectorAll(".ML__edit-toolbar");if(i)for(let o of i)o.innerHTML=zs(this,e)}update(e){this._style=e.style,this.updateToolbar(e)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(e){let r,i=[];return oe(e)?(r=e[0],i=e.slice(1)):r=e,r=r.replace(/-\w/g,o=>o[1].toUpperCase()),dr(e)==="virtual-keyboard"?xt[r].fn(...i):(this.sendMessage("execute-command",{command:e}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};if(fe()&&!("mathVirtualKeyboard"in window))if(window===window.top){let t=we.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>t})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>Ar.singleton,configurable:!0});function di(t){let e={};for(let r of Object.keys(t))switch(r){case"scriptDepth":if(oe(t.scriptDepth))e.scriptDepth=[t.scriptDepth[0],t.scriptDepth[1]];else if(typeof t.scriptDepth=="number")e.scriptDepth=[t.scriptDepth,t.scriptDepth];else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let i=t.mathVirtualKeyboardPolicy.toLowerCase();if(i==="sandboxed"){if(window!==window.top){let o=we.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>o})}i="manual"}e.mathVirtualKeyboardPolicy=i;break;case"letterShapeStyle":t.letterShapeStyle==="auto"?Z.locale.startsWith("fr")?e.letterShapeStyle="french":e.letterShapeStyle="tex":e.letterShapeStyle=t.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(t.defaultMode)?e.defaultMode=t.defaultMode:(console.error('MathLive 0.93.0: valid values for defaultMode are "text", "math" or "inline-math"'),e.defaultMode="math");break;case"macros":e.macros=ko(t.macros);break;default:oe(t[r])?e[r]=[...t[r]]:typeof t[r]=="object"&&!(t[r]instanceof Element)&&r!=="computeEngine"?e[r]=g({},t[r]):e[r]=t[r]}return e}function Vt(t,e){let r;typeof e=="string"?r=[e]:e===void 0?r=Object.keys(t):r=e;let i={};for(let o of r)t[o]===null?i[o]=null:oe(t[o])?i[o]=[...t[o]]:typeof t[o]=="object"&&!(t[o]instanceof Element)&&o!=="computeEngine"?i[o]=g({},t[o]):i[o]=t[o];return typeof e=="string"?i[e]:i}function mi(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:fr,backgroundColorMap:Vr,letterShapeStyle:Z.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,mathModeSpace:"",placeholderSymbol:"\u25A2",popoverPolicy:"auto",keybindings:Za,inlineShortcuts:So,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:Xa,value:""}}function Wn(t){return t.defaultMode==="inline-math"?"math":t.defaultMode}function Dt(t){return typeof t=="number"&&!Number.isNaN(t)}function Tr(t){return Array.isArray(t)&&t.length===2}function pi(t){return t!=null&&typeof t=="object"&&"ranges"in t&&Array.isArray(t.ranges)}var Ge={"\\ne":"<mo>≠</mo>","\\neq":"<mo>&neq;</mo>","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"},Ns="<mo>⁡</mo>",jn="<mo>⁢</mo>";function No(t){return t.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ae(t,e){return!t||!e.generateID?"":` extid="${t}"`}function yu(t,e,r){var s,l,c,u,d,m,h,y;let i=!1;e=e!=null?e:t.atoms.length;let o="",n="",a=t.atoms[t.index];if(a.command==="\\operatorname")n=Ui(a.body),t.index+=1;else{let b=(l=(s=a.style)==null?void 0:s.variant)!=null?l:"",M=(u=(c=a.style)==null?void 0:c.variantStyle)!=null?u:"";for(;t.index<e&&(a.type==="mord"||a.type==="macro")&&!a.isDigit()&&b===((m=(d=a.style)==null?void 0:d.variant)!=null?m:"")&&M===((y=(h=a.style)==null?void 0:h.variantStyle)!=null?y:"");)n+=Ui([a]),t.index+=1,a=t.atoms[t.index]}return n.length>0&&(i=!0,o=`<mi>${n}</mi>`,(t.lastType==="mi"||t.lastType==="mn"||t.lastType==="mtext"||t.lastType==="fence")&&!/^<mo>(.*)<\/mo>$/.test(o)&&(o=jn+o),n.endsWith(">f</mi>")||n.endsWith(">g</mi>")?(o+=Ns,t.lastType="applyfunction"):t.lastType=/^<mo>(.*)<\/mo>$/.test(o)?"mo":"mi",ji(n,t,r)||(t.mathML+=o)),i}function bu(t){return t.index<t.atoms.length&&t.atoms[t.index].superscript&&t.atoms[t.index].type==="subsup"}function xu(t){let e=-1,r=t.index,i=!1,o=!1;for(;r<t.atoms.length&&!i&&!o;){let n=t.atoms[r];i=!n.isDigit(),o=!i&&n.superscript!==void 0,r++}return o&&(e=r-1),e}function ji(t,e,r){var s;let i=e.atoms[e.index-1];if(!i)return!1;if(!i.superscript&&!i.subscript)if(((s=e.atoms[e.index])==null?void 0:s.type)==="subsup")i=e.atoms[e.index],e.index+=1;else return!1;let o=W(i.superscript,r),n=W(i.subscript,r);if(!o&&!n)return!1;let a="";return o&&n?a=`<msubsup>${t}${n}${o}</msubsup>`:o?a=`<msup>${t}${o}</msup>`:n&&(a=`<msub>${t}${n}</msub>`),e.mathML+=a,e.lastType="",!0}function vu(t,e,r){e=e!=null?e:t.atoms.length;let i=t.index,o="";for(;t.index<e&&t.atoms[t.index].mode==="text";)o+=t.atoms[t.index].value?t.atoms[t.index].value:" ",t.index+=1;return o.length>0?(t.mathML+=`<mtext ${ae(t.atoms[i].id,r)}
>${o}</mtext>`,t.lastType="mtext",!0):!1}function wu(t,e,r){e=e!=null?e:t.atoms.length;let i=t.index,o="",n=xu(t);for(n>=0&&n<e&&(e=n);t.index<e&&t.atoms[t.index].isDigit();)o+=t.atoms[t.index].asDigit(),t.index+=1;return o.length<=0?!1:(o="<mn"+ae(t.atoms[i].id,r)+">"+o+"</mn>",n<0&&bu(t)&&(n=t.index,t.index+=1),ji(o,t,r)||(t.mathML+=o,t.lastType="mn"),!0)}function ku(t,e,r){let i=!1;e=e!=null?e:t.atoms.length;let o="",n="";if(t.index<e&&t.atoms[t.index].type==="mopen"){let a=!1,s=0,l=t.index,c=-1,u=l+1;for(;u<e&&!a;)t.atoms[u].type==="mopen"?s+=1:t.atoms[u].type==="mclose"&&(s-=1),s===-1&&(a=!0,c=u),u+=1;a&&(o="<mrow>",o+=Pr(t.atoms[l],r),o+=W(t.atoms,r,l+1,c),o+=Pr(t.atoms[c],r),o+="</mrow>",t.index=c+1,(t.lastType==="mi"||t.lastType==="mn"||t.lastType==="mfrac"||t.lastType==="fence")&&(t.mathML+=jn),ji(o,t,r)&&(i=!0,t.lastType="",o=""),n="fence")}return o.length>0&&(i=!0,t.mathML+=o,t.lastType=n),i}function Su(t,e,r){let i=!1;e=e!=null?e:t.atoms.length;let o="",n="",a=t.atoms[t.index];if(t.index<e&&(a.type==="mbin"||a.type==="mrel"))o+=Un(t.atoms[t.index],r),t.index+=1,n="mo";else if(t.index<e&&a.type==="mop"){if(a.subsupPlacement==="over-under"&&(a.superscript||a.subscript)){let s=Pr(a,r);a.superscript&&a.subscript?(o+="<munderover>"+s,o+=W(a.subscript,r),o+=W(a.superscript,r),o+="</munderover>"):a.superscript?(o+="<mover>"+s,o+=W(a.superscript,r),o+="</mover>"):a.subscript&&(o+="<munder>"+s,o+=W(a.subscript,r),o+="</munder>"),n="mo"}else{let s=t.atoms[t.index],l=s.value==="\\operatorname",c=l?'<mi class="MathML-Unit"'+ae(s.id,r)+">"+Ui(s.value)+"</mi>":Pr(s,r);o+=c,!l&&!/^<mo>(.*)<\/mo>$/.test(c)?(o+=Ns,n="applyfunction"):n=l?"mi":"mo"}(t.lastType==="mi"||t.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(o)&&(o=jn+o),t.index+=1}return o.length>0&&(i=!0,ji(o,t,r)||(t.mathML+=o,t.lastType=n)),i}function W(t,e,r,i){e!=null||(e={});let o={atoms:[],index:r!=null?r:0,mathML:"",lastType:""};if(typeof t=="number"||typeof t=="boolean")o.mathML=t.toString();else if(typeof t=="string")o.mathML=t;else if(t instanceof f)o.mathML=Un(t,e);else if(Array.isArray(t)){o.atoms=t;let n=0;for(i=i||(t?t.length:0);o.index<i;)if(vu(o,i,e)||wu(o,i,e)||yu(o,i,e)||Su(o,i,e)||ku(o,i,e))n+=1;else if(o.index<i){let a=Un(o.atoms[o.index],e);o.lastType==="mn"&&a.length>0&&o.atoms[o.index].type==="genfrac"&&(a="<mo>⁤</mo>"+a),o.atoms[o.index].type==="genfrac"?o.lastType="mfrac":o.lastType="",o.index+=1,ji(a,o,e)?n+=1:a.length>0&&(o.mathML+=a,n+=1)}n>1&&(o.mathML="<mrow>"+o.mathML+"</mrow>")}return o.mathML}function Pr(t,e){let r="",i=Ui(t.value);return i&&(r="<mo"+ae(t.id,e)+">"+i+"</mo>"),r}function Ui(t){if(!t)return"";if(typeof t=="string")return No(t);if(!Array.isArray(t)&&typeof t.body=="string")return No(t.body);let e="";for(let r of t)typeof r.value=="string"&&(e+=r.value);return No(e)}function Un(t,e){var M,k,w,L,E,B,_,O,V,Ce,ct,wt,Ht,Jt,Ae,yi,bi,xi,de,Me,Te,ut,kt,Wt,Ut;let r={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},i={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."},o={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"},n={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5},a="",s="",l,c,u,d,m,h,y=(k=o[(M=t.fontFamily)!=null?M:t.font])!=null?k:"";y&&(y=` mathvariant="${y}"`);let{command:b}=t;if(t.mode==="text")a=`<mi${ae(t.id,e)}>${t.value}</mi>`;else switch(t.type){case"first":break;case"group":case"root":Ge[t.command]?a=Ge[t.command]:a=W(t.body,e);break;case"array":if((t.leftDelim&&t.leftDelim!=="."||t.rightDelim&&t.rightDelim!==".")&&(a+="<mrow>",t.leftDelim&&t.leftDelim!=="."&&(a+="<mo>"+(Ge[t.leftDelim]||t.leftDelim)+"</mo>")),a+="<mtable",t.colFormat){for(a+=' columnalign="',u=0;u<t.colFormat.length;u++)t.colFormat[u].align&&(a+={l:"left",c:"center",r:"right"}[t.colFormat[u].align]+" ");a+='"'}for(a+=">",c=0;c<t.array.length;c++){for(a+="<mtr>",l=0;l<t.array[c].length;l++)a+="<mtd>"+W(t.array[c][l],e)+"</mtd>";a+="</mtr>"}a+="</mtable>",(t.leftDelim&&t.leftDelim!=="."||t.rightDelim&&t.rightDelim!==".")&&(t.rightDelim&&t.rightDelim!=="."&&(a+="<mo>"+(Ge[t.leftDelim]||t.rightDelim)+"</mo>"),a+="</mrow>");break;case"genfrac":(t.leftDelim||t.rightDelim)&&(a+="<mrow>"),t.leftDelim&&t.leftDelim!=="."&&(a+="<mo"+ae(t.id,e)+">"+(Ge[t.leftDelim]||t.leftDelim)+"</mo>"),t.hasBarLine?(a+="<mfrac>",a+=W(t.above,e)||"<mi> </mi>",a+=W(t.below,e)||"<mi> </mi>",a+="</mfrac>"):(a+="<mtable"+ae(t.id,e)+">",a+="<mtr>"+W(t.above,e)+"</mtr>",a+="<mtr>"+W(t.below,e)+"</mtr>",a+="</mtable>"),t.rightDelim&&t.rightDelim!=="."&&(a+="<mo"+ae(t.id,e)+">"+(Ge[t.rightDelim]||t.rightDelim)+"</mo>"),(t.leftDelim||t.rightDelim)&&(a+="</mrow>");break;case"surd":t.hasEmptyBranch("above")?(a+="<msqrt"+ae(t.id,e)+">",a+=W(t.body,e),a+="</msqrt>"):(a+="<mroot"+ae(t.id,e)+">",a+=W(t.body,e),a+=W(t.above,e),a+="</mroot>");break;case"leftright":a="<mrow>",t.leftDelim&&t.leftDelim!=="."&&(a+="<mo"+ae(t.id,e)+">"+((w=Ge[t.leftDelim])!=null?w:t.leftDelim)+"</mo>"),t.body&&(a+=W(t.body,e)),t.rightDelim&&t.rightDelim!=="."&&(a+="<mo"+ae(t.id,e)+">"+((L=Ge[t.rightDelim])!=null?L:t.rightDelim)+"</mo>"),a+="</mrow>";break;case"sizeddelim":case"delim":a+='<mo separator="true"'+ae(t.id,e)+">"+(Ge[t.delim]||t.delim)+"</mo>";break;case"accent":a+='<mover accent="true"'+ae(t.id,e)+">",a+=W(t.body,e),a+="<mo>"+(Ge[b]||t.accent)+"</mo>",a+="</mover>";break;case"line":case"overlap":break;case"overunder":m=t.above,d=t.below,(t.svgAbove||m)&&(t.svgBelow||d)?h=t.body:m&&m.length>0?(h=t.body,(B=(E=t.body)==null?void 0:E[0])!=null&&B.below?(d=t.body[0].below,h=t.body[0].body):((O=(_=t.body)==null?void 0:_[0])==null?void 0:O.type)==="first"&&((Ce=(V=t.body)==null?void 0:V[1])!=null&&Ce.below)&&(d=t.body[1].below,h=t.body[1].body)):d&&d.length>0&&(h=t.body,(wt=(ct=t.body)==null?void 0:ct[0])!=null&&wt.above?(m=t.body[0].above,h=t.body[0].body):((Jt=(Ht=t.body)==null?void 0:Ht[0])==null?void 0:Jt.type)==="first"&&((yi=(Ae=t.body)==null?void 0:Ae[1])!=null&&yi.above)&&(m=t.body[1].overscript,h=t.body[1].body)),(t.svgAbove||m)&&(t.svgBelow||d)?(a+=`<munderover ${y} ${ae(t.id,e)}>`,a+=(bi=r[t.svgBody])!=null?bi:W(h,e),a+=(xi=r[t.svgBelow])!=null?xi:W(d,e),a+=(de=r[t.svgAbove])!=null?de:W(m,e),a+="</munderover>"):t.svgAbove||m?(a+=`<mover ${y} ${ae(t.id,e)}>`+((Me=r[t.svgBody])!=null?Me:W(h,e)),a+=(Te=r[t.svgAbove])!=null?Te:W(m,e),a+="</mover>"):(t.svgBelow||d)&&(a+=`<munder ${y} ${ae(t.id,e)}>`+((ut=r[t.svgBody])!=null?ut:W(h,e)),a+=(kt=r[t.svgBelow])!=null?kt:W(d,e),a+="</munder>");break;case"placeholder":a+="?";break;case"mord":{a=i[b]||b||(typeof t.value=="string"?t.value:"");let dt=b?b.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null;dt?a="&#x"+dt[1]+";":a.length>0&&a.startsWith("\\")&&(typeof t.value=="string"&&t.value.charCodeAt(0)>255?a="&#x"+("000000"+t.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof t.value=="string"?a=t.value.charAt(0):(console.error("Did not expect this"),a=""));let Nr=/\d/.test(a)?"mn":"mi";a=`<${Nr}${y}${ae(t.id,e)}>${No(a)}</${Nr}>`;break}case"mbin":case"mrel":case"minner":b&&i[b]?a="<mi"+ae(t.id,e)+">"+i[b]+"</mi>":b&&Ge[b]?a="<mo"+ae(t.id,e)+">"+Ge[b]+"</mo>":a=Pr(t,e);break;case"mpunct":a='<mo separator="true"'+ae(t.id,e)+">"+((Wt=Ge[b])!=null?Wt:b)+"</mo>";break;case"mop":t.body!=="\u200B"&&(a="<mo"+ae(t.id,e)+">",a+=b==="\\operatorname"?t.body:b||t.body,a+="</mo>");break;case"box":a='<menclose notation="box"',t.backgroundcolor&&(a+=' mathbackground="'+t.backgroundcolor+'"'),a+=ae(t.id,e)+">"+W(t.body,e)+"</menclose>";break;case"spacing":a+='<mspace width="'+((Ut=n[b])!=null?Ut:0)+'em"/>';break;case"enclose":a='<menclose notation="';for(let dt in t.notation)Object.prototype.hasOwnProperty.call(t.notation,dt)&&t.notation[dt]&&(a+=s+dt,s=" ");a+=ae(t.id,e)+'">'+W(t.body,e)+"</menclose>";break;case"prompt":a='<menclose notation="roundexbox""">'+W(t.body,e)+"</menclose>";break;case"space":a+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":""+t.type;break;case"chem":break;case"mopen":a+=Pr(t,e);break;case"mclose":a+=Pr(t,e);break;case"macro":{let dt=t.command+Ui(t.macroArgs);dt&&(a+=`<mo ${ae(t.id,e)}>${dt}</mo>`)}break;case"error":""+t.type;break;case"latexgroup":a+=W(t.body,e);break;case"latex":a+="<mtext"+ae(t.id,e)+">"+t.value+"</mtext>";break;case"tooltip":a+=W(t.body,e);break;default:""+t.type}return a}var Gi={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" "},Gn={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};function ce(t){var o,n,a,s,l,c,u,d,m,h,y,b,M;if(!t)return"";if(oe(t)){if(t.length===0||(t[0].type==="first"&&(t=t.slice(1)),t.length===0))return"";let k="";if(t[0].mode==="latex")for(let w of t)k+=ce(w);else if(t[0].mode==="text"){let w=0;for(k='"';((o=t[w])==null?void 0:o.mode)==="text";)k+=t[w].body?ce(t[w].body):t[w].value,w++;k+='"'+ce(t.slice(w))}else if(t[0].mode==="math"){let w=0;for(;t[w]&&t[w].mode==="math";)k+=ce(t[w]),w++;k+=ce(t.slice(w))}else console.warn("toASCIIMath: Unexpected mode");return k.trim()}if(t.mode==="text")return'"'+t.value+'"';let e="",{command:r}=t,i;switch(t.type){case"first":return"";case"group":case"root":e=(n=Gi[r])!=null?n:ce(t.body);break;case"genfrac":{let _=t;(_.leftDelim||_.rightDelim)&&(e+=_.leftDelim==="."||!_.leftDelim?"{:":_.leftDelim),_.hasBarLine?(e+="(",e+=ce(_.above),e+=")/(",e+=ce(_.below),e+=")"):(e+="("+ce(_.above)+"),",e+="("+ce(_.below)+")"),(_.leftDelim||_.rightDelim)&&(e+=_.rightDelim==="."||!_.rightDelim?"{:":_.rightDelim)}break;case"surd":e+=t.hasEmptyBranch("above")?"sqrt("+ce(t.body)+")":"root("+ce(t.above)+")("+ce(t.body)+")";break;case"latex":e=t.value;break;case"leftright":{let _=t;e+=_.leftDelim==="."||!_.leftDelim?"{:":_.leftDelim,e+=ce(_.body),e+=_.rightDelim==="."||!_.rightDelim?":}":_.rightDelim}break;case"sizeddelim":case"delim":break;case"overlap":break;case"overunder":break;case"mord":e=(s=(a=Gi[r])!=null?a:r)!=null?s:typeof t.value=="string"?t.value:"",e.startsWith("\\")&&(e+=" "),i=r?r.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null,i?e=String.fromCodePoint(Number.parseInt("0x"+i[1])):e.length>0&&e.startsWith("\\")&&(e=typeof t.value=="string"?t.value.charAt(0):t.command);break;case"mbin":case"mrel":case"minner":e=(c=(l=Gi[r])!=null?l:Gn[r])!=null?c:t.value;break;case"mopen":case"mclose":e+=t.value;break;case"mpunct":e=(u=Gn[r])!=null?u:r;break;case"mop":t.value!=="\u200B"&&(e="",e+=r==="\\operatorname"?ce(t.body):(d=t.value)!=null?d:r,e+=" ");break;case"array":let k=t.array,w=t.environmentName,L=(m={bmatrix:["[","]"],"bmatrix*":["[","]"]}[w])!=null?m:["(",")"],E=[];for(let _ of k){let O=[];for(let V of _)O.push(L[0]+ce(V)+L[1]);E.push(O.join(","))}let B=(h={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[w])!=null?h:["(",")"];e=B[0]+E.join(",")+B[1];break;case"box":break;case"spacing":e=(y=Gi[r])!=null?y:" ";break;case"enclose":e="("+ce(t.body)+")";break;case"space":e=" ";break;case"subsup":e="";break;case"macro":e=(M=(b=Gi[r])!=null?b:Gn[r])!=null?M:ce(t.body);break}if(!t.hasEmptyBranch("subscript")){e+="_";let k=ce(t.subscript);e+=k.length>1?"("+k+")":k}if(!t.hasEmptyBranch("superscript")){e+="^";let k=ce(t.superscript);e+=k.length>1?"("+k+")":k}return e}var hi={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Xn={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Mu(t){let e="";return t.startsWith("\\")&&(e=" "+t.replace("\\","")+" "),e}function Xi(t){let e=0;if(oe(t))for(let r of t)r.type!=="first"&&(e+=1);return e===1}function _u(t){if(oe(t)){for(let e of t)if(e.type!=="first"&&e.id)return e.id.toString()}return""}function Is(t){let e="";if(oe(t))for(let r of t)r.type!=="first"&&typeof r.value=="string"&&(e+=r.value);return e}function Au(t){return t?t.map(e=>e.value).join(""):""}function ee(t,e){var n,a,s,l,c;function r(u){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(u)?` <say-as interpret-as="character">${u}</say-as>`:/[A-Z]/.test(u)?`capital <say-as interpret-as="character">${u.toLowerCase()}</say-as>`:u:/[a-z]/.test(u)?" '"+u.toUpperCase()+"'":/[A-Z]/.test(u)?" 'capital "+u.toUpperCase()+"'":u}function i(u){return"<emphasis>"+u+"</emphasis>"}if(!e)return"";let o="";if(oe(e)){let u=!1,d=!1;for(let m=0;m<e.length;m++)e[m].type!=="first"&&(e[m].mode!=="text"&&(d=!1),m<e.length-2&&e[m].type==="mopen"&&e[m+2].type==="mclose"&&e[m+1].type==="mord"?(o+=" of ",o+=i(ee(t,e[m+1])),m+=2):e[m].mode==="text"?d?o+=(n=e[m].value)!=null?n:" ":(d=!0,o+=ee("text",e[m])):e[m].isDigit()?u?o+=e[m].asDigit():(u=!0,o+=ee(t,e[m])):(u=!1,o+=ee(t,e[m])))}else if(e.mode==="text")e.id&&t==="math"&&(o+='<mark name="'+e.id.toString()+'"/>'),o+=e.value;else{e.id&&t==="math"&&(o+='<mark name="'+e.id.toString()+'"/>');let u="",d="",m="",h=!1,{command:y}=e;switch(e.type){case"prompt":let b=e.body.length>1?'start input . <break time="500ms"/> '+ee(t,e.body)+'. <break time="500ms"/> end input':"blank";o+=' <break time="300ms"/> '+b+'. <break time="700ms"/>'+((a=e.correctness)!=null?a:"")+' . <break time="700ms"/> ';break;case"accent":y==="\\vec"&&(o+="vector "+ee(t,e.body));break;case"array":let M=e.array,k=e.environmentName;if(Object.keys(Xn).includes(k)){o+=` begin ${Xn[k]} `;for(let B=0;B<M.length;B++){B>0&&(o+=","),o+=` row ${B+1} `;for(let _=0;_<M[B].length;_++)_>0&&(o+=","),o+=` column ${_+1}: `,o+=ee("math",M[B][_])}o+=` end ${Xn[k]} `}break;case"group":y==="\\ne"?o+=" not equal ":(y==="\\not"&&(o+=" not "),o+=ee("math",e.body));break;case"root":o+=ee("math",e.body);break;case"genfrac":if(u=ee("math",e.above),d=ee("math",e.below),Xi(e.above)&&Xi(e.below)){let _={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[Is(e.above)+"/"+Is(e.below)];_?o=_:o+=u+" over "+d}else o+=' the fraction <break time="150ms"/>'+u+' over <break time="150ms"/>'+d+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(m=ee("math",e.body),e.hasEmptyBranch("above"))o+=Xi(e.body)?" the square root of "+m+" , ":' the square root of <break time="200ms"/>'+m+'. <break time="200ms"/> End square root';else{let B=ee("math",e.above);B=B.trim();let _=B.replace(/<mark([^/]*)\/>/g,"");_==="3"?o+=' the cube root of <break time="200ms"/>'+m+'. <break time="200ms"/> End cube root':_==="n"?o+=' the nth root of <break time="200ms"/>'+m+'. <break time="200ms"/> End root':o+=' the root with index: <break time="200ms"/>'+B+', of <break time="200ms"/>'+m+'. <break time="200ms"/> End root'}break;case"leftright":{let B=e;o+=(s=B.leftDelim?hi[B.leftDelim]:void 0)!=null?s:B.leftDelim,o+=ee("math",e.body),o+=(l=B.rightDelim?hi[B.rightDelim]:void 0)!=null?l:B.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"line":let w=e.position;o+=`${w} `,o+=ee("math",e.body),o+=` end ${w} `;break;case"macro":let L=y.replace(/^\\/g,""),E=jr()[L];E&&(E!=null&&E.expand?o+=ee("math",e.body):o+=`${L} `);break;case"placeholder":o+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(y==="\\mathbin"||y==="\\mathrel"||y==="\\mathopen"||y==="\\mathclose"||y==="\\mathpunct"||y==="\\mathord"||y==="\\mathinner"){o=ee(t,e.body);break}let B=e.isDigit()?e.asDigit():e.value,_=e.command;if((e.type==="delim"||e.type==="sizeddelim")&&(_=e.value,B=_),t==="text")o+=B;else{if(e.type==="mbin"&&(o+='<break time="150ms"/>'),B){let O=hi[B]||(_?hi[_.trim()]:"");if(O)o+=" "+O;else{let V=_?Mu(_.trim()):"";o+=V||r(B)}}else o+=ee("math",e.body);e.type==="mbin"&&(o+='<break time="150ms"/>')}break}case"mop":if(e.value!=="\u200B"){let B=e.command;if(B==="\\sum")if(!e.hasEmptyBranch("superscript")&&!e.hasEmptyBranch("subscript")){let _=ee("math",e.superscript);_=_.trim();let O=ee("math",e.subscript);O=O.trim(),o+=' the summation from <break time="200ms"/>'+O+'<break time="200ms"/> to <break time="200ms"/>'+_+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(e.hasEmptyBranch("subscript"))o+=" the summation of";else{let _=ee("math",e.subscript);_=_.trim(),o+=' the summation from <break time="200ms"/>'+_+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(B==="\\prod")if(!e.hasEmptyBranch("superscript")&&!e.hasEmptyBranch("subscript")){let _=ee("math",e.superscript);_=_.trim();let O=ee("math",e.subscript);O=O.trim(),o+=' the product from <break time="200ms"/>'+O+'<break time="200ms"/> to <break time="200ms"/>'+_+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(e.hasEmptyBranch("subscript"))o+=" the product of ";else{let _=ee("math",e.subscript);_=_.trim(),o+=' the product from <break time="200ms"/>'+_+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(B==="\\int")if(!e.hasEmptyBranch("superscript")&&!e.hasEmptyBranch("subscript")){let _=ee("math",e.superscript);_=_.trim();let O=ee("math",e.subscript);O=O.trim(),o+=' the integral from <break time="200ms"/>'+i(O)+'<break time="200ms"/> to <break time="200ms"/>'+i(_)+' <break time="200ms"/> of ',h=!0}else o+=' the integral of <break time="200ms"/> ';else if(typeof e.value=="string"){let _=(c=hi[e.value])!=null?c:e.command?hi[e.command]:void 0;o+=_||" "+e.value}else e.command&&(e.command==="\\mathop"?o+=ee("math",e.body):e.command==="\\operatorname"?o+=Au(e.body):o+=e.command.startsWith("\\")?" "+e.command.slice(1):" "+e.command)}break;case"enclose":m=ee("math",e.body),o+=" crossed out "+m+". End crossed out.";break;case"space":case"spacing":break}if(!h&&!e.hasEmptyBranch("superscript")){let b=ee(t,e.superscript);b=b.trim();let M=b.replace(/<[^>]*>/g,"");if(Xi(e.superscript)){if(t==="math"){let k=_u(e.superscript);k&&(o+='<mark name="'+k+'"/>')}M==="\u2032"?o+=" prime ":M==="2"?o+=" squared ":M==="3"?o+=" cubed ":Number.isNaN(Number.parseInt(M))?o+=" to the "+b+"; ":o+=' to the <say-as interpret-as="ordinal">'+M+"</say-as> power; "}else Number.isNaN(Number.parseInt(M))?o+=" raised to the "+b+"; ":o+=' raised to the <say-as interpret-as="ordinal">'+M+"</say-as> power; "}if(!h&&!e.hasEmptyBranch("subscript")){let b=ee("math",e.subscript);b=b.trim(),o+=Xi(e.subscript)?" sub "+b:" subscript "+b+". End subscript. "}}return o}function $t(t){var r,i;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){let o=W(t);if(o){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(r=window.MathfieldElement.textToSpeechRulesOptions)!=null?r:{},window.MathfieldElement.textToSpeechRulesOptions.markup=window.MathfieldElement.textToSpeechMarkup,window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions.markup="ssml_step"),window.MathfieldElement.textToSpeechRulesOptions.rate=window.MathfieldElement.speechEngineRate);let n=(i=window.SRE)!=null?i:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&n.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let a="";try{a=n.toSpeech(o)}catch(s){console.error("MathLive 0.93.0: `SRE.toSpeech()` runtime error",s)}return a}return""}let e=ee("math",t);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let o="";window.MathfieldElement.speechEngineRate&&(o='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),e='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+o+"<p><s>"+e+"</s></p>"+(o?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&jt()==="macos"?e=e.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):e=e.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return e}function Br(t,e){return t+$t(e)}me({speak:(t,e,r)=>Lu(t,e,r)},{target:"mathfield"});function Lu(t,e,r){var l,c;r=r!=null?r:{withHighlighting:!1};let{model:i}=t;function o(u){let d=null;switch(u){case"all":d=i.root;break;case"selection":d=i.getAtoms(i.selection);break;case"left":{d=i.getAtoms(i.offsetOf(i.at(i.position).leftSibling),i.position);break}case"right":{d=i.getAtoms(i.position,i.offsetOf(i.at(i.position).rightSibling));break}case"group":d=i.getAtoms(i.getSiblingsRange(i.position));break;case"parent":{let{parent:m}=i.at(i.position);m!=null&&m.parent?d=m:d=i.root;break}default:d=i.root}return d}function n(u){let d="";switch(u){case"all":break;case"selection":d="no selection";break;case"left":d="at start";break;case"right":d="at end";break;case"group":break;case"parent":d="no parent";break;default:""+u;break}return d}let a=o(e);if(a===null)return(c=(l=window.MathfieldElement).speakHook)==null||c.call(l,n(e)),!1;(r.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");let s=$t(a);return fe()&&r.withHighlighting?(vt().readAloudMathField=t,bt(t,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(t.field,s)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(s),!1}function Vs(t){var e,r;if(fe())if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){let i=new SpeechSynthesisUtterance(t);window.speechSynthesis.speak(i)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.93.0: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{let i=new window.AWS.Polly({apiVersion:"2016-06-10"}),o={OutputFormat:"mp3",VoiceId:(e=window.MathfieldElement.speechEngineVoice)!=null?e:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:t,TextType:"ssml"};i.synthesizeSpeech(o,(n,a)=>{if(n)console.trace(`MathLive 0.93.0: \`polly.synthesizeSpeech()\` error: ${n}`);else if(a!=null&&a.AudioStream){let s=new Uint8Array(a.AudioStream),l=new Blob([s.buffer],{type:"audio/mpeg"}),c=URL.createObjectURL(l);new Audio(c).play().catch(d=>console.log(d))}})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.93.0: The Google speech engine is not supported yet. Please come again.")}function $s(t){var r;let e;if(t.parent.type==="prompt")t.parentBranch==="body"&&(e="prompt");else if(t.parentBranch==="body")e=t.type&&(r={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[t.type])!=null?r:"parent";else if(t.parent.type==="genfrac"){if(t.parentBranch==="above")return"numerator";if(t.parentBranch==="below")return"denominator"}else t.parent.type==="surd"?t.parentBranch==="above"&&(e="index"):t.parentBranch==="superscript"?e="superscript":t.parentBranch==="subscript"&&(e="subscript");return e!=null?e:"parent"}function qs(t,e,r,i){let o="";if(e==="plonk")window.MathfieldElement.playSound("plonk"),t.flushInlineShortcutBuffer();else if(e==="delete")o=Br("deleted: ",i);else if(e==="focus"||e.includes("move"))o=Cu(t.model,r)+(t.model.selectionIsCollapsed?"":"selected: ")+Eu(t.model);else if(e==="replacement")o=Br("",t.model.at(t.model.position));else if(e==="line"){let n=Br("",t.model.root);t.keyboardDelegate.setAriaLabel(n)}else o=i?Br(e+" ",i):e;if(o){let n=t.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";t.ariaLiveText.textContent=o+n}}function Cu(t,e){if(Number.isNaN(e))return"";let r=t.at(e);if(!r||r.treeDepth<=t.at(t.position).treeDepth)return"";let i="",o=r.parent,n=t.at(t.position).parent;for(;o!==t.root&&o!==n;)i+=`out of ${$s(o)};`,o=o.parent;return i}function Eu(t){if(!t.selectionIsCollapsed)return Br("",t.getAtoms(t.selection));let e="",r=t.at(t.position),i=$s(r);return r.isFirstSibling&&(e=(i?"start of "+i:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(e+=i?"end of "+i:"unknown"):e+=Br("",r),e}var Zi=class{constructor(e,r,i,o){this.mathfield=e,this.mode=r,this.silenceNotifications=!1,this.listeners=o,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=i}dispose(){this.mathfield=void 0,this.listeners.onSelectionDidChange=void 0,this.listeners.onContentWillChange=void 0}getState(){let e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,r){var n;let i=this.silenceNotifications;this.silenceNotifications=(n=r==null?void 0:r.silenceNotifications)!=null?n:!0;let o={};if((r==null?void 0:r.type)==="undo"&&(o={inputType:"historyUndo"}),(r==null?void 0:r.type)==="redo"&&(o={inputType:"historyRedo"}),H(this,o)){let a=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=Je(e.content),this.selection=e.selection,this.silenceNotifications=a,q(this,o)}this.silenceNotifications=i}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,r){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var l,c,u;let i=this.normalizeSelection(e,r);if(i===void 0)throw new TypeError("Invalid selection");if(i.ranges.length===1&&i.ranges[0][0]===i.ranges[0][1]){let d=i.ranges[0][0];return!this.mathfield.dirty&&!((l=this.at(d))!=null&&l.parentPrompt)&&this.mathfield.hasEditablePrompts?(c=this.at(d-1))!=null&&c.parentPrompt?(this._anchor=this.normalizeOffset(d-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor),!0):(u=this.at(d+1))!=null&&u.parentPrompt?(this._anchor=this.normalizeOffset(d+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor),!0):(this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]},!1):(this._anchor=d,this._position=d,this._selection=i,!1)}let o=xe(i);i.direction==="backward"?[this._position,this._anchor]=o:[this._anchor,this._position]=o;let n=this.at(o[0]+1),a=this.at(o[1]),s=f.commonAncestor(n,a);return(s==null?void 0:s.type)==="array"&&n.parent===s&&a.parent===s?this._selection={ranges:[o],direction:i.direction}:this._selection={ranges:[o],direction:i.direction},this._position>=0&&this._position<=this.lastOffset,!1})}setPositionHandlingPlaceholder(e){var i;let r=this.at(e);(r==null?void 0:r.type)==="placeholder"?this.setSelection(e-1,e):((i=r==null?void 0:r.rightSibling)==null?void 0:i.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,r instanceof te&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){let r=this.at(e),{parent:i}=r;if(!i)return[0,this.lastOffset];let o=r.parent.branch(r.parentBranch);return[this.offsetOf(o[0]),this.offsetOf(o[o.length-1])]}getBranchRange(e,r){let i=this.at(e).branch(r);return[this.offsetOf(i[0]),this.offsetOf(i[i.length-1])]}getAtoms(e,r,i){let o=i!=null?i:{};if(pi(e)){if(o=r!=null?r:{},e.ranges.length>1)return e.ranges.reduce((u,d)=>[...u,...this.getAtoms(d,o)],[]);e=e.ranges[0]}let n,a;if(Dt(e)){if(n=e,!Dt(r))return[];a=r}else[n,a]=e,o=r!=null?r:{};if(!Number.isFinite(n))return[];o.includeChildren===void 0&&(o.includeChildren=!1),n<0&&(n=this.lastOffset-n+1),a<0&&(a=this.lastOffset-a+1);let s=Math.min(n,a)+1,l=Math.max(n,a);if(s===1&&l===this.lastOffset)return[this.root];let c=[];for(let u=s;u<=l;u++){let d=this.atoms[u];Hs(this,d,s,l)&&c.push(d)}return o.includeChildren||(c=c.filter(u=>{let d=!1,{parent:m}=u;for(;m&&!d;)d=Hs(this,m,s,l),m=m.parent;return!d})),c}getAllAtoms(e=0){let r=[],i=this.lastOffset;for(let o=e;o<=i;o++)r.push(this.atoms[o]);for(let o=0;o<e;o++)r.push(this.atoms[o]);return r}findAtom(e,r=0,i="forward"){if(i==="forward"){let o=this.lastOffset;for(let n=r;n<=o;n++)if(e(this.atoms[n]))return this.atoms[n];for(let n=0;n<r;n++)if(e(this.atoms[n]))return this.atoms[n];return}for(let o=r;o>=0;o--)if(e(this.atoms[o]))return this.atoms[o];for(let o=this.lastOffset;o<r;o--)if(e(this.atoms[o]))return this.atoms[o]}extractAtoms(e){let r=this.getAtoms(e);if(r.length===1&&!r[0].parent)if(r[0].type==="root")r=[...r[0].body],r.shift();else return r=this.root.cells.flat(),this.root=new f({type:"root",body:[]}),r;for(let i of r)i.parent.removeChild(i);return r}deleteAtoms(e){this.extractAtoms(e),this.position=e[0]}atomToString(e,r){let i=r!=null?r:"latex";if(i.startsWith("latex"))return j(_e.serialize([e],{expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",defaultMode:this.mathfield.options.defaultMode}));if(i==="math-ml")return W(e);if(i==="spoken")return $t(e);if(i==="spoken-text"){let o=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";let n=$t(e);return window.MathfieldElement.textToSpeechMarkup=o,n}if(i==="spoken-ssml"||i==="spoken-ssml-with-highlighting"){let o=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";let n=$t(e);return window.MathfieldElement.textToSpeechMarkup=o,n}if(i==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';try{let o=window.MathfieldElement.computeEngine.parse(f.serialize(e,{expandMacro:!1,defaultMode:"math"}));return JSON.stringify(o.json)}catch(o){return JSON.stringify(["Error",`'${o.toString()}'`])}}return i==="ascii-math"?ce(e):(console.error(`MathLive 0.93.0: Unknown format "${i}`),"")}getValue(e,r,i){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string")return this.atomToString(this.root,e);let o,n;if(Dt(e)&&Dt(r)?(o=[this.normalizeRange([e,r])],n=i!=null?i:"latex"):Tr(e)?(o=[this.normalizeRange(e)],n=r):pi(e)?(o=e.ranges,n=r):(o=[],n="latex"),n.startsWith("latex")){let a={expandMacro:n==="latex-expanded",skipStyles:n==="latex-unstyled",defaultMode:this.mathfield.options.defaultMode};return j(o.map(s=>f.serialize(this.getAtoms(s),a)))}return o.map(a=>this.getAtoms(a).map(s=>this.atomToString(s,n)).join("")).join("")}extendSelectionTo(e,r){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{let i=this.normalizeRange([e,r]),[o,n]=i,{parent:a}=this.at(n);if(a&&(a.type==="genfrac"||a.type==="subsup"))for(;a!==this.root&&Zn(this,a,[o,n]);)n=this.offsetOf(a),a=a.parent;for(a=this.at(o).parent;a!==this.root&&Zn(this,a,[o,n]);)o=this.offsetOf(a.leftSibling),a=a.parent;if(a=this.at(n).parent,(a==null?void 0:a.type)==="genfrac")for(;a!==this.root&&Zn(this,a,[o,n]);)n=this.offsetOf(a),n>=0,a=a.parent;this._position=this.normalizeOffset(r),this._selection={ranges:[[o,n]],direction:"none"}})}announce(e,r,i=[]){var n,a;((a=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:r,atoms:i},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0)&&qs(this.mathfield,e,r,i)}deferNotifications(e,r){let i=this._selection,o=this._anchor,n=this._position,a=this.silenceNotifications;this.silenceNotifications=!0;let s=this.root.changeCounter;r();let l=this.root.changeCounter!==s,c=o!==this._anchor||n!==this._position||ja(this._selection,i)==="different";return this.silenceNotifications=a,e.content&&l&&q(this,{inputType:e.type}),e.selection&&c&&Bo(this),l||c}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[r,i]=e;return r=this.normalizeOffset(r),i=this.normalizeOffset(i),r<i?[r,i]:[i,r]}normalizeSelection(e,r){var o;let i;if(Dt(e)){let n=this.normalizeOffset(e);if(Dt(r)){let a=this.normalizeOffset(r);i=n<=a?{ranges:[[n,a]],direction:"none"}:{ranges:[[a,n]],direction:"backward"}}else i={ranges:[[n,n]],direction:"none"}}else if(Tr(e)){let n=this.normalizeOffset(e[0]),a=this.normalizeOffset(e[1]);i=n<=a?{ranges:[[n,a]],direction:"none"}:{ranges:[[a,n]],direction:"backward"}}else pi(e)&&(i={ranges:e.ranges.map(n=>this.normalizeRange(n)),direction:(o=e.direction)!=null?o:"none"});return i}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}};function Hs(t,e,r,i){let o=t.offsetOf(e);if(o<r||o>i)return!1;if(!e.hasChildren)return!0;let n=t.offsetOf(e.firstChild);if(n>=r&&n<=i){let a=t.offsetOf(e.lastChild);if(a>=r&&a<=i)return!0}return!1}function Zn(t,e,r){if(!(e!=null&&e.hasChildren))return!1;let[i,o]=r,n=t.offsetOf(e.firstChild),a=t.offsetOf(e.lastChild);return n>=i&&n<=o&&a>=n&&a<=o}Mn(["math","displaymath"],Xe);Mn("center",Xe);At("array","{columns:colspec}",(t,e,r,i)=>new I(t,Yn(e),r,{columns:i[0],mathstyleName:"textstyle"}));At(["equation","equation*","subequations"],"",(t,e,r)=>new I(t,Yn(e),r,{columns:[{align:"c"}]}));At(["multline","multline*"],"",Xe);At(["align","align*","aligned","eqnarray"],"",Xe);At("split","",Xe);At(["gather","gathered"],"",Xe);At(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Xe);At(["smallmatrix","smallmatrix*"],"[columns:colspec]",Xe);At(["cases","dcases","rcases"],"",Xe);function Tu(t){for(let e of t)for(let r of e)if(r.length>0)return!1;return!0}function Yn(t,e=1){return Tu(t)?Array(e).fill([[new f({type:"first"}),new he]]):t.map(r=>r.length===0?[[new f({type:"first"})]]:r.map(i=>i.length===0?[new f({type:"first"})]:(i[0].type!=="first"&&i.unshift(new f({type:"first"})),i)))}function Xe(t,e=[[[]]],r=[],i=[]){switch(e=Yn(e,["split","align","align*","aligned","eqnarray"].includes(t)?2:1),t){case"math":return new I(t,e,r,{mathstyleName:"textstyle"});case"displaymath":return new I(t,e,r,{mathstyleName:"textstyle"});case"center":return new I(t,e,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new I(t,e,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new I(t,e,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new I(t,e,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Dr(i[0])});case"bmatrix":case"bmatrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Dr(i[0])});case"Bmatrix":case"Bmatrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Dr(i[0])});case"vmatrix":case"vmatrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Dr(i[0])});case"Vmatrix":case"Vmatrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Dr(i[0])});case"matrix":case"matrix*":return new I(t,e,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Dr(i==null?void 0:i[0])});case"smallmatrix":case"smallmatrix*":return new I(t,e,r,{mathstyleName:"scriptstyle",columns:Dr(i==null?void 0:i[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new I(t,e,r,{mathstyleName:t==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new I(t,e,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new I(t,e,r,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let o=0;for(let s of e)o=Math.max(o,s.length);let n=[{gap:0},{align:"r"},{gap:.25},{align:"l"}],a=2;for(;a<o;)n.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),a+=2;return n.push({gap:0}),new I(t,e,r,{arraycolsep:0,columns:n,minColumns:2})}}return new I(t,e,r,{mathstyleName:"textstyle"})}function Dr(t){return t!=null?t:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Pu(t,e){let r=t.at(t.position);for(;r&&!(r.parent instanceof I);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof I)){let i=t.at(t.position);if(r=i,!r.parent.parent){let o=t.extractAtoms([t.position,t.lastOffset]),n=t.extractAtoms([0,t.position]);n.length===0&&(n=Vo()),o.length===0&&(o=Vo());let a;return e.endsWith("column")?(a=Xe("split",[[n,o]]),t.root=a,Kr(a,0,0)?Or(t,a,0,0):Kr(a,0,1)?Or(t,a,0,1):t.position=t.offsetOf(i)):(a=Xe("lines",[[n],[o]]),t.root=a,Kr(a,0,0)?Or(t,a,0,0):Kr(a,1,0)?Or(t,a,1,0):t.position=t.offsetOf(i)),[void 0,[0,0]]}if(r.parent instanceof X){let o=r.parent,n=t.extractAtoms([t.position,t.offsetOf(o.lastChild)]),a=t.extractAtoms([t.offsetOf(o.firstChild),t.position]);a.length===0&&(a=Vo()),n.length===0&&(n=Vo());let s="pmatrix",l=o.leftDelim,c=o.rightDelim;l==="("&&(c===")"||c==="?")?s="pmatrix":(l==="["||l==="\\lbrack")&&(c==="]"||c==="\\rbrack"||c==="?")?s="bmatrix":l==="\\vert"&&c==="\\vert"?s="vmatrix":l==="\\Vert"&&c==="\\Vert"?s="Vmatrix":(l==="{"||l==="\\lbrace")&&(c==="."||c==="?")&&(s="cases");let u=Xe(s,e.endsWith("column")?[[a,n]]:[[a],[n]]);return o.parent.addChildBefore(u,o),o.parent.removeChild(o),Kr(u,0,0)?Or(t,u,0,0):e.endsWith("column")?Kr(u,0,1)?Or(t,u,0,1):t.position=t.offsetOf(r):Kr(u,1,0)?Or(t,u,1,0):t.position=t.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof I?[r.parent,r.parentBranch]:[void 0,[0,0]]}function Kr(t,e,r){let i=t.getCell(e,r);return!i||i.length!==2?!1:i[1].type==="placeholder"}function Bu(t,e,r,i){let o=e.getCell(r,i);return o?[t.offsetOf(o[0]),t.offsetOf(o[o.length-1])]:-1}function Or(t,e,r,i){let o=Bu(t,e,r,i);typeof o!="number"&&t.setSelection(o)}function Io(t,e,r,i,o){let n=e.getCell(r,i);n&&t.setPositionHandlingPlaceholder(t.offsetOf(n[o==="start"?0:n.length-1]))}function $o(t,e){let[r,[i,o]]=Pu(t,e);if(r)switch(e){case"after row":r.addRowAfter(i),Io(t,r,i+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){t.announce("plonk");return}r.addColumnAfter(o),Io(t,r,i,o+1,"end");break;case"before row":r.addRowBefore(i),Io(t,r,i,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){t.announce("plonk");return}r.addColumnBefore(o),Io(t,r,i,o,"start");break}}function Qn(t){return H(t,{inputType:"insertText"})?($o(t,"after row"),q(t,{inputType:"insertText"}),!0):!1}function Du(t){return H(t,{inputType:"insertText"})?($o(t,"before row"),q(t,{inputType:"insertText"}),!0):!1}function ea(t){return H(t,{inputType:"insertText"})?($o(t,"after column"),q(t,{inputType:"insertText"}),!0):!1}function Ku(t){return H(t,{inputType:"insertText"})?($o(t,"before column"),q(t,{inputType:"insertText"}),!0):!1}function Ou(t,e){if(!H(t,{}))return!1;t.mathfield.snapshot();let r=".",i=".";switch(e){case"pmatrix":case"pmatrix*":r="(",i=")";break;case"bmatrix":case"bmatrix*":r="[",i="]";break;case"Bmatrix":case"Bmatrix*":r="\\lbrace",i="\\rbrace";break;case"vmatrix":case"vmatrix*":r="\\vert",i="\\vert";break;case"Vmatrix":case"Vmatrix*":r="\\Vert",i="\\Vert";break;case"matrix":case"matrix*":r=".",i=".";break;case"cases":case"dcases":r="\\lbrace";break;case"rcases":i="\\rbrace";break}let o=t.parentEnvironment;return o.environmentName=e,o.leftDelim=r,o.rightDelim=i,q(t,{}),!0}function Js(t,e){let r=t.at(t.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof I);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof I){let i=r.parent,o=r.parentBranch,n;switch(e){case"row":if(i.rowCount>1){i.removeRow(o[0]);let a=i.getCell(Math.max(0,o[0]-1),o[1]);n=t.offsetOf(a[a.length-1])}break;case"column":if(i.colCount>i.minColumns){i.removeColumn(o[1]);let a=i.getCell(o[0],Math.max(0,o[1]-1));n=t.offsetOf(a[a.length-1])}break}n&&t.setPositionHandlingPlaceholder(n)}}function zu(t){return H(t,{inputType:"deleteContent"})?(Js(t,"row"),q(t,{inputType:"deleteContent"}),!0):!1}function Ru(t){return H(t,{inputType:"deleteContent"})?(Js(t,"column"),q(t,{inputType:"deleteContent"}),!0):!1}me({addRowAfter:Qn,addColumnAfter:ea,addRowBefore:Du,addColumnBefore:Ku,removeRow:zu,removeColumn:Ru,setEnvironment:Ou},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Vo(){return[new he]}function Yi(t,e,r,i){var n,a,s,l,c,u;let o=r.parent;if(o&&r instanceof X){let d=!i&&e==="forward"||i==="body"&&e==="backward",m=d?t.offsetOf(r.firstChild):t.offsetOf(r.lastChild);return d?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),m--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),m--),t.position=m,!0}if(o&&r.type==="surd"){if(e==="forward"&&!i||e==="backward"&&i==="body"){let d=r.leftSibling;r.hasChildren&&o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),t.position=t.offsetOf(d)}else e==="forward"&&i==="body"?t.position=t.offsetOf(r):!i&&e==="backward"?r.hasChildren?t.position=t.offsetOf(r.lastChild):(t.position=Math.max(0,t.offsetOf(r)-1),o.removeChild(r)):i==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),e==="backward"?t.position=t.offsetOf(r.leftSibling):t.position=t.offsetOf(r.body[0]));return!0}if(o&&(r.type==="box"||r.type==="enclose")){let d=i&&e==="backward"||!i&&e==="forward"?r.leftSibling:r.lastChild;return o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),t.position=t.offsetOf(d),!0}if(r.type==="genfrac"||r.type==="overunder"){if(!i)return r.type==="overunder"&&r.hasEmptyBranch("body")||r.type==="genfrac"&&r.hasEmptyBranch("below")&&r.hasEmptyBranch("above")?!1:(t.position=t.offsetOf(e==="forward"?r.firstChild:r.lastChild),!0);let d=li.fractionNavigationOrder==="numerator-denominator"?"above":"below",m=d==="above"?"below":"above";if(o&&(e==="forward"&&i===d||e==="backward"&&i===m)){let h=r.removeBranch(d),y=r.removeBranch(m);return o.addChildrenAfter([...h,...y],r),o.removeChild(r),t.position=t.offsetOf(h.length>0?h[h.length-1]:y[0]),!0}return e==="backward"?t.position=t.offsetOf(r.leftSibling):t.position=t.offsetOf(r),!0}if(r.isExtensibleSymbol||r.type==="subsup"){if(!i&&e==="forward")return!1;if(!i){if(r.subscript||r.superscript){let d=e==="forward"?(s=(n=r.superscript)==null?void 0:n[0])!=null?s:(a=r.subscript)==null?void 0:a[0]:(u=(l=r.subscript)==null?void 0:l[0].lastSibling)!=null?u:(c=r.superscript)==null?void 0:c[0].lastSibling;return d&&(t.position=t.offsetOf(d)),!0}return!1}if(i&&r.hasEmptyBranch(i)&&r.removeBranch(i),!r.hasChildren){let d=e==="forward"?t.offsetOf(r):Math.max(0,t.offsetOf(r)-1);return r.parent.removeChild(r),t.position=d,!0}if(i==="superscript")if(e==="backward"){let d=t.offsetOf(r.firstChild)-1;d>=0,t.position=d}else r.subscript?t.position=t.offsetOf(r.subscript[0]):t.position=t.offsetOf(r);else i==="subscript"&&(e==="backward"&&r.superscript?t.position=t.offsetOf(r.superscript[0].lastSibling):e==="backward"?t.position=t.offsetOf(r.firstChild)-1:t.position=t.offsetOf(r));return!0}if((o==null?void 0:o.type)==="genfrac"&&!i&&r.type!=="first"){let d=t.offsetOf(r.leftSibling);return o.removeChild(r),o.hasEmptyBranch("above")&&o.hasEmptyBranch("below")?(d=t.offsetOf(o.leftSibling),o.parent.removeChild(o),t.announce("delete",void 0,[o]),t.position=d,!0):(t.announce("delete",void 0,[r]),t.position=d,!0)}return!1}function Ws(t){return!t.mathfield.isSelectionEditable||!H(t,{inputType:"deleteContentBackward"})?!1:t.selectionIsCollapsed?t.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let e=t.at(t.position);if(!(e&&Yi(t,"backward",e))){if(e!=null&&e.isFirstSibling){if(Yi(t,"backward",e.parent,e.parentBranch))return;e=null}if(!e){t.announce("plonk");return}t.position=t.offsetOf(e.leftSibling),e.parent.removeChild(e),t.announce("delete",void 0,[e])}}):st(t,xe(t.selection),"deleteContentBackward")}function Us(t){return!t.mathfield.isSelectionEditable||!H(t,{inputType:"deleteContentForward"})?!1:t.selectionIsCollapsed?t.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var i,o;let e=t.at(t.position).rightSibling;if(e&&Yi(t,"forward",e))return;if(e){if(t.at(t.position).isLastSibling&&Yi(t,"forward",e.parent,e.parentBranch))return}else{if(e=t.at(t.position),e.isLastSibling&&Yi(t,"forward",e.parent,e.parentBranch))return;e=void 0}if(t.position===t.lastOffset||!e){t.announce("plonk");return}e.parent.removeChild(e);let r=(i=t.at(t.position))==null?void 0:i.rightSibling;for(;(r==null?void 0:r.type)==="subsup";)r.parent.removeChild(r),r=(o=t.at(t.position))==null?void 0:o.rightSibling;t.announce("delete",void 0,[e])}):st(t,xe(t.selection),"deleteContentForward")}function st(t,e,r){let i=t.getAtoms(e);if(i.length>0&&i[0].parent){let o=i[0].parent.firstChild;o.type==="first"&&(o=o.rightSibling);let n=i[i.length-1].parent.lastChild,a=i[0];a.type==="first"&&(a=a.rightSibling);let s=i[i.length-1];if(a===o&&s===n){let l=i[0].parent;l.parent&&l.type!=="prompt"&&(e=[t.offsetOf(l.leftSibling),t.offsetOf(l)])}if(i.length===1&&i[0].type==="placeholder"&&i[0].parent.type==="genfrac"){let l=i[0].parent,c=i[0].parentBranch==="below"?"above":"below",u=t.offsetOf(l.leftSibling);return t.deferNotifications({content:!0,selection:!0,type:r},()=>{var m,h;let d=l.removeBranch(c);if(d.length===1&&d[0].type==="placeholder")(h=l.parent)==null||h.removeChild(l),t.position=Math.max(0,u);else{let y=l.parent.addChildrenAfter(d,l);(m=l.parent)==null||m.removeChild(l),t.position=t.offsetOf(y)}})}}return t.deferNotifications({content:!0,selection:!0,type:r},()=>t.deleteAtoms(e))}function js(t,e){let r=t.at(t.position);if(r.type==="composition")r.value=e;else{let{caret:i}=r;r.caret=void 0;let o=new tr(e,{mode:r.mode});o.caret=i,r.parent.addChildAfter(o,r),t.position+=1}}function Gs(t){let e=t.at(t.position);e.type==="composition"&&(e.parent.removeChild(e),t.position-=1)}function qo(t,e){let r=t.at(e),i;if(r){i=r.mode;let o=r.parent;for(;!i&&o;)o&&(i=o.mode),o=o.parent}return i}function Kt(t,e){!t||!e||(oe(t)?t.forEach(r=>Kt(r,e)):typeof t=="object"&&!t.style.color&&!t.style.backgroundColor&&!t.style.fontFamily&&!t.style.fontShape&&!t.style.fontSeries&&!t.style.fontSize&&!t.style.variant&&!t.style.variantStyle&&(t.applyStyle(e),Kt(t.body,e),Kt(t.above,e),Kt(t.below,e),Kt(t.subscript,e),Kt(t.superscript,e)))}function Qi(t,e,r,i){function o(a,s){for(let l of n)if(l.style[a]!==s)return!1;return!0}if(e=t.normalizeRange(e),e[0]===e[1])return!1;let n=t.getAtoms(e,{includeChildren:!0});i.operation==="toggle"&&(r.color&&o("color",r.color)&&(r.color="none",delete r.verbatimColor),r.backgroundColor&&o("backgroundColor",r.backgroundColor)&&(r.backgroundColor="none",delete r.verbatimBackgroundColor),r.fontFamily&&o("fontFamily",r.fontFamily)&&(r.fontFamily="none"),r.fontSeries&&o("fontSeries",r.fontSeries)&&(r.fontSeries="auto"),r.fontShape&&o("fontShape",r.fontShape)&&(r.fontShape="auto"),r.fontSize&&o("fontSize",r.fontSize)&&(r.fontSize=$r));for(let a of n)a.applyStyle(r);return!0}var Fu=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Ho(t){return t.ctrlKey||t.metaKey||["Dead","Process"].includes(t.key)?!1:t.code===""?!0:Fu.has(t.code)}function Xs(t){t=bs(t);let e=[];return t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.length===0?"["+t.code+"]":(e.push("["+t.code+"]"),e.join("+"))}function Zs(t,e,r){let i=null,o=null,n=!1,a=!1,s=!1,l=new AbortController,c=l.signal;return t.addEventListener("keydown",u=>{if(n||u.key==="Process"||u.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(u.code)){i=null;return}i=u,o=null,r.onKeystroke(Xs(u),u)?t.textContent="":i=null},{capture:!0,signal:c}),t.addEventListener("keypress",u=>{n||(i&&o&&r.onKeystroke(Xs(i),i),o=u)},{capture:!0,signal:c}),t.addEventListener("compositionstart",u=>{t.textContent="",n=!0,r.onCompositionStart(u.data)},{capture:!0,signal:c}),t.addEventListener("compositionupdate",u=>{n&&r.onCompositionUpdate(u.data)},{capture:!0,signal:c}),t.addEventListener("compositionend",u=>{t.textContent="",n&&(n=!1,r.onCompositionEnd(u.data))},{capture:!0,signal:c}),t.addEventListener("beforeinput",u=>u.stopImmediatePropagation(),{signal:c}),t.addEventListener("input",u=>{var d;if(!n&&(t.textContent="",u.inputType!=="insertCompositionText")){if(u.inputType==="insertFromPaste"){u.preventDefault(),u.stopPropagation();return}r.onInput((d=u.data)!=null?d:""),u.preventDefault(),u.stopPropagation()}},{signal:c}),t.addEventListener("paste",u=>{t.focus({preventScroll:!0}),t.textContent="",r.onPaste(u)||u.preventDefault(),u.stopImmediatePropagation()},{passive:!0,signal:c}),t.addEventListener("cut",u=>r.onCut(u),{capture:!0,signal:c}),t.addEventListener("copy",u=>r.onCopy(u),{capture:!0,signal:c}),t.addEventListener("blur",u=>{var m,h,y;if(((h=(m=u.relatedTarget)==null?void 0:m._mathfield)==null?void 0:h.element)===e){t.focus({preventScroll:!0}),u.preventDefault(),u.stopPropagation();return}let d=(y=Bt.scrim)==null?void 0:y.state;if(d==="open"||d==="opening"){u.preventDefault(),u.stopPropagation();return}if(u.relatedTarget===u.target.getRootNode().host){u.preventDefault(),u.stopPropagation();return}s||a||(s=!0,i=null,o=null,r.onBlur(),s=!1)},{capture:!0,signal:c}),t.addEventListener("focus",u=>{s||a||(a=!0,r.onFocus(),a=!1)},{capture:!0,signal:c}),{dispose:()=>l.abort(),cancelComposition:()=>{n&&(t.blur(),requestAnimationFrame(()=>t.focus({preventScroll:!0})))},blur:()=>{typeof t.blur=="function"&&t.blur()},focus:()=>{!a&&typeof t.focus=="function"&&t.focus({preventScroll:!0})},hasFocus:()=>Nu()===t,setAriaLabel:u=>t.setAttribute("aria-label",u),setValue:u=>{var d;t.textContent=u,t.style.left="-1000px",(d=window.getSelection())==null||d.selectAllChildren(t)},moveTo:(u,d)=>{t.style.top=`${d}px`,t.style.left=`${u}px`}}}function Nu(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}function eo(t){var r;if(!t)return"";let e;return t.key==="Unidentified"&&t.target&&(e=t.target.value),e=(r=e!=null?e:t.key)!=null?r:t.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(e)&&(e=""),e}var ta=class{constructor(e){this.recording=!1;this.model=e,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(e){e&&this.index>=0&&(this.stack[this.index].selection=e),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(e){return this.recording?(e&&e===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>ta.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=e!=null?e:"",!0):!1}},to=ta;to.maximumDepth=1e3;function ra(t){let e=t.position,r=t.at(e).parent;return r!=null&&r.parent?(t.position=t.offsetOf(r),t.mathfield.stopCoalescingUndo(),t.announce("move",e),!0):(t.announce("plonk"),!1)}function Iu(t){let e=0,r=t.at(t.position),i=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(e+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(i=!1):i=!0,r=r.parent;return i?e:0}function Vu(t){let e=0,r=t.at(t.position),i=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(e+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(i=!0):i=!1,r=r.parent;return i?e:0}function Ys(t){var r;if(t.collapseSelection(),Iu(t)>=t.mathfield.options.scriptDepth[1])return t.announce("plonk"),!1;let e=t.at(t.position);return e.subsupPlacement===void 0&&(((r=e.rightSibling)==null?void 0:r.type)!=="subsup"&&e.parent.addChildAfter(new ft({style:e.computedStyle}),e),e=e.rightSibling),e.createBranch("superscript"),t.setSelection(t.getSiblingsRange(t.offsetOf(e.superscript[0]))),!0}function Qs(t){var r;if(t.collapseSelection(),Vu(t)>=t.mathfield.options.scriptDepth[0])return t.announce("plonk"),!1;let e=t.at(t.position);return e.subsupPlacement===void 0&&(((r=t.at(t.position+1))==null?void 0:r.type)!=="subsup"&&e.parent.addChildAfter(new ft({style:t.at(t.position).computedStyle}),e),e=t.at(t.position+1)),e.createBranch("subscript"),t.setSelection(t.getSiblingsRange(t.offsetOf(e.subscript[0]))),!0}function $u(){function t(l){let c=[],u=[];return[...l.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(e).forEach((m,h)=>{let y=i(m);y===0?c.push(m):u.push({documentOrder:h,tabIndex:y,node:m})}),u.sort((m,h)=>m.tabIndex===h.tabIndex?m.documentOrder-h.documentOrder:m.tabIndex-h.tabIndex).map(m=>m.node).concat(c)}function e(l){return!(!r(l)||o(l)||i(l)<0)}function r(l){return!(l.disabled||l.type==="hidden"&&l.tagName.toUpperCase()==="INPUT"||s(l))}function i(l){var u;let c=Number.parseInt((u=l.getAttribute("tabindex"))!=null?u:"NaN",10);return Number.isNaN(c)?l.contentEditable==="true"||(l.nodeName==="AUDIO"||l.nodeName==="VIDEO")&&l.getAttribute("tabindex")===null?0:l.tabIndex:c}function o(l){return l.tagName.toUpperCase()==="INPUT"&&l.type==="radio"&&!a(l)}function n(l,c){for(let u of l)if(u.checked&&u.form===c)return u;return null}function a(l){var m;if(!l.name)return!0;let u=((m=l.form)!=null?m:l.ownerDocument).querySelectorAll('input[type="radio"][name="'+l.name+'"]'),d=n(u,l.form);return!d||d===l}function s(l){if(!fe()||l===document.activeElement||l.contains(document.activeElement))return!1;if(getComputedStyle(l).visibility==="hidden")return!0;let c=l.getBoundingClientRect();if(c.width===0||c.height===0)return!0;for(;l;){if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}return fe()?t(document.body):[]}function el(t,e,r=!0){var l,c;let i=e==="forward"?1:-1;t.at(t.anchor).type==="placeholder"&<(t,e);let o,n=t.at(t.anchor).parentPrompt;n?e==="forward"?o=t.offsetOf(n)+1:o=t.offsetOf(n.leftSibling):o=Math.max(t.position+i,0);let a=t.findAtom(u=>u.type==="placeholder"||u.type==="prompt"||!t.mathfield.readOnly&&u.treeDepth>2&&u.isFirstSibling&&u.isLastSibling,o,e);if(!a||e==="forward"&&t.offsetOf(a)<o||e==="backward"&&t.offsetOf(a)>o){if(!r||!((c=(l=t.mathfield.host)==null?void 0:l.dispatchEvent(new CustomEvent("move-out",{detail:{direction:e},cancelable:!0,bubbles:!0,composed:!0})))==null||c))return t.announce("plonk"),!1;let d=$u();if(!document.activeElement||d.length<=1)return t.announce("plonk"),!1;let m=d.indexOf(document.activeElement)+i;return m<0&&(m=d.length-1),m>=d.length&&(m=0),d[m].focus(),t.mathfield.stopCoalescingUndo(),!0}let s=t.position;if(a.type==="prompt")t.setSelection(t.offsetOf(a.firstChild),t.offsetOf(a.lastChild));else{let u=t.offsetOf(a);a.type==="placeholder"?t.setSelection(u-1,u):t.position=u}return t.announce("move",s),t.mathfield.stopCoalescingUndo(),!0}me({moveToOpposite:t=>{let e={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=t.at(t.position),{parent:i}=r;if(!i)return t.announce("plonk"),!1;let o=r.parentBranch,n;if(typeof o=="string"&&(n=e[o]),!n){let s=r.subsupPlacement?Qs(t):Ys(t);return t.mathfield.stopCoalescingUndo(),s}i.branch(n)||i.createBranch(n);let a=t.setSelection(t.getBranchRange(t.offsetOf(i),n));return t.mathfield.stopCoalescingUndo(),a},moveBeforeParent:t=>{let{parent:e}=t.at(t.position);return e?(t.position=t.offsetOf(e),t.mathfield.stopCoalescingUndo(),!0):(t.announce("plonk"),!1)},moveAfterParent:t=>ra(t),moveToNextChar:t=>lt(t,"forward"),moveToPreviousChar:t=>lt(t,"backward"),moveUp:t=>lt(t,"upward"),moveDown:t=>lt(t,"downward"),moveToNextWord:t=>mr(t,"forward"),moveToPreviousWord:t=>mr(t,"backward"),moveToGroupStart:t=>{let e=t.offsetOf(t.at(t.position).firstSibling);return e===t.position?(t.announce("plonk"),!1):(t.position=e,t.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:t=>{let e=t.offsetOf(t.at(t.position).lastSibling);return e===t.position?(t.announce("plonk"),!1):(t.position=e,t.mathfield.stopCoalescingUndo(),!0)},moveToMathfieldStart:t=>t.position===0?(t.announce("plonk"),!1):(t.position=0,t.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:t=>t.position===t.lastOffset?(t.announce("plonk"),!1):(t.position=t.lastOffset,t.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:t=>Ys(t),moveToSubscript:t=>Qs(t)},{target:"model",changeSelection:!0});me({moveToNextPlaceholder:t=>el(t,"forward"),moveToPreviousPlaceholder:t=>el(t,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function Jo(t,e,r){typeof e=="function"&&(r=e,e=1/0),e===void 0&&(e=1/0);let i=t.position,o=!1,n="";for(;!o;){let a=t.at(i);o=e===0||a===void 0||a.mode!=="math"||!(a.type&&/mord|mpunct/.test(a.type)||a.type==="mop"&&/[a-zA-Z]+/.test(a.value))||!a.hasEmptyBranch("superscript")||!a.hasEmptyBranch("subscript")||typeof r=="function"&&!r(a),o||(a.mode="text",a.command=a.value,a.verbatimLatex=void 0,n+=a.value),i-=1,e-=1}q(t,{data:n,inputType:"insertText"})}function zr(t,e,r){typeof e=="function"&&(r=e,e=1/0),e===void 0&&(e=1/0);let i=t.position,o=!1,n=[];for(;!o;){let a=t.at(i);o=e===0||!a||a.isFirstSibling||a.mode!=="text"||a.value===" "||r&&!r(a),o||(n.push(a.serialize({defaultMode:"math"})),a.mode="math"),i-=1,e-=1}Wo(t),q(t,{data:j(n),inputType:"insertText"})}function Wo(t){var r;let e=t.position-1;for(;e>=0&&((r=t.at(e))==null?void 0:r.mode)==="math";)e-=1;if(!(e<0)&&t.at(e).mode==="text"&&t.at(e).value===" "&&t.at(e-1).mode==="math"){t.at(e-1).parent.removeChild(t.at(e-1));let i=t.silenceNotifications;t.silenceNotifications=!0,t.position-=1,t.silenceNotifications=i,q(t,{inputType:"deleteContent"})}}function qu(t){let e="",r=t.position,i=!1;for(;!i;){let o=t.at(r);i=!(o&&(o.mode==="text"||o.mode==="math"&&o.type&&/mord|mpunct/.test(o.type))),i||(e=o.value+e),r-=1}return e}function tl(t,e,r){if(t.smartModeSuppressed)return!1;let{model:i}=t;if(!i.at(i.position).isLastSibling||!r||!Ho(r))return!1;let o=eo(r);if(!i.selectionIsCollapsed)return!!(t.model.mode==="text"&&/[/_^]/.test(o));let n=qu(i)+o;if(t.model.mode==="text"){if(e==="Esc"||/[/\\]/.test(o))return!0;if(/[\^_]/.test(o))return/(^|\s)[a-zA-Z][^_]$/.test(n)&&zr(i,1),!0;let a={")":"(","}":"{","]":"["}[o],{parent:s}=i.at(i.position);if(a&&s instanceof X&&s.leftDelim===a)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(n))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(o))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(n))return zr(i,1),!1;if(/\D\.[^\d\s]$/.test(n)){zr(i,1);let l=i.at(i.position);return l.value="\u22C5",l.style.variant="normal",l.command="\\cdot",l.verbatimLatex=void 0,q(i,{data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(n)||/\.\d$/.test(n)||/\([\d+\-.]$/.test(n))return zr(i,1),!0;if(/\([a-z][,;]$/.test(n))return zr(i,2),!0;if(/[\d+\-=><*|]$/.test(o))return Wo(i),!0}else{if(e==="[Space]")return Jo(i,void 0,a=>/[a-z][:,;.]$/.test(a.value)),!0;if(/[a-zA-Z]{3,}$/.test(n)&&!/(dxd|abc|xyz|uvw)$/.test(n))return Jo(i,void 0,a=>/[a-zA-Z]/.test(a.value)),!0;if(/(^|\W)(if)$/i.test(n))return Jo(i,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(n)&&!/(αβγ)$/.test(n))return Jo(i,void 0,a=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(a.value)),!0;if(o==="?"||o==="."&&!/[\d-+]\.$/.test(n))return!0}return!1}var rl=`/* The element that displays the keys as the user type them */
#mathlive-keystroke-caption-panel {
visibility: hidden;
/*min-width: 160px;*/
/*background-color: rgba(97, 97, 200, .95);*/
background: var(--secondary, hsl(var(--hue, 212), 19%, 26%));
border-color: var(--secondary-border, hsl(0, 0%, 91%));
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
text-align: center;
border-radius: 6px;
padding: 16px;
position: absolute;
z-index: 1;
display: flex;
flex-direction: row-reverse;
justify-content: center;
--keystroke: white;
--on-keystroke: #555;
--keystroke-border: #f7f7f7;
}
@media (prefers-color-scheme: dark) {
body:not([theme='light']) #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--hue, 212), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--hue, 212), 50%, 25%);
}
}
body[theme='dark'] #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--hue, 212), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--hue, 212), 50%, 25%);
}
#mathlive-keystroke-caption-panel > span {
min-width: 14px;
/*height: 8px;*/
margin: 0 8px 0 0;
padding: 4px;
background-color: var(--keystroke);
color: var(--on-keystroke);
fill: currentColor;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 1em;
border-radius: 6px;
border: 2px solid var(--keystroke-border);
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
}
`;function il(t,e){if(!t.isSelectionEditable||!t.keystrokeCaptionVisible)return;let r=nl(),i=t.element.getBoundingClientRect();r.style.left=`${i.left}px`,r.style.top=`${i.top-64}px`,r.innerHTML=window.MathfieldElement.createHTML("<span>"+(On(e)||e)+"</span>"+r.innerHTML),r.style.visibility="visible",setTimeout(()=>{r.childNodes.length>0&&r.childNodes[r.childNodes.length-1].remove(),r.childNodes.length===0&&(r.style.visibility="hidden")},3e3)}function ol(t){if(t.keystrokeCaptionVisible=!t.keystrokeCaptionVisible,t.keystrokeCaptionVisible){let e=nl();e.innerHTML=""}else{let e=Mr("mathlive-keystroke-caption-panel");e.style.visibility="hidden"}return!1}function nl(){let t=document.getElementById("mathlive-keystroke-caption-panel");return t||(t=Mr("mathlive-keystroke-caption-panel"),qe("mathlive-keystroke-caption-stylesheet",rl),qe("mathlive-core-stylesheet",nt),t)}function al(){ai("mathlive-keystroke-caption-panel"),rt("mathlive-core-stylesheet"),rt("mathlive-keystroke-caption-panel")}var oa=class extends Q{constructor(){super("math")}onPaste(e,r){if(!r||!H(e.model,{data:typeof r=="string"?r:null,dataTransfer:typeof r=="string"?null:r,inputType:"insertFromPaste"}))return!1;let i="",o="auto",n=typeof r!="string"?r.getData("application/json+mathlive"):"";if(n)try{let a=JSON.parse(n);if(a&&Array.isArray(a)){e.snapshot();let s=Je(a),{model:l}=e;l.selectionIsCollapsed||l.deleteAtoms(xe(l.selection));let c=l.at(l.position);if(c.parent instanceof I){c.parentBranch;let u=[],d=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(let b of s)b.type==="first"&&d.length>0?(u.push(d),d=[b]):d.push(b);d.length>0&&u.push(d);let m=Number(c.parentBranch[0]),h=Number(c.parentBranch[1]),y=c.parent.maxColumns;for(;c.parent.colCount-h<u.length&&c.parent.colCount<y;)c.parent.addColumn();c.parent.addChildrenAfter(u[0],c);for(let b=1;b<u.length;b++)h++,h>=y&&(h=0,c.parent.addRowAfter(m),m++),c.parent.setCell(m,h,u[b])}else c.parent.addChildrenAfter(s.filter(u=>u.type!=="first"),c);return l.position=l.offsetOf(s[s.length-1]),q(l,{inputType:"insertFromPaste"}),re(e),!0}}catch(a){}if(n=typeof r!="string"?r.getData("application/json"):"",n&&window.MathfieldElement.computeEngine)try{let a=JSON.parse(n);if(typeof a=="object"&&"latex"in a&&a.latex&&(i=a.latex),!i){let s=window.MathfieldElement.computeEngine.box(a);s&&!s.has("Error")&&(i=s.latex)}i||(o="latex")}catch(a){}if(!i&&typeof r!="string"&&(i=r.getData("application/x-latex"),i&&(o="latex")),i||(i=typeof r=="string"?r:r.getData("text/plain")),i){let a;return[a,i]=Mo(i),o==="auto"&&a&&(o="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i,{format:o})&&(e.startRecording(),e.snapshot("paste"),re(e)),e.startRecording(),!0}return!1}insert(e,r,i){var M,k;let o=typeof r=="string"?r:(k=(M=window.MathfieldElement.computeEngine)==null?void 0:M.box(r).latex)!=null?k:"";if(!i.silenceNotifications&&!H(e,{data:o,inputType:"insertText"}))return!1;if(i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),e.mathfield.smartFence){if(e.selectionIsCollapsed&&typeof r=="string"&&jo(e,r,i.style))return!0}else if(i.insertionMode!=="replaceAll"){let{parent:w}=e.at(e.position);if(w instanceof X&&w.rightDelim==="?"&&e.at(e.position).isLastSibling&&typeof r=="string"&&/^[)}\]|]$/.test(r))return w.isDirty=!0,w.rightDelim=r,e.position+=1,Bo(e),q(e,{data:o,inputType:"insertText"}),!0}let{silenceNotifications:n}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let a=e.silenceNotifications;e.silenceNotifications=!0;let s={};if(s[0]=i.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),s["?"]="\\placeholder{}",s["@"]=s["?"],i.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(xe(e.selection)):i.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]),s[0])s["@"]=s[0];else if(typeof r=="string"&&/(^|[^\\])#@/.test(r)){let w=Uu(e);w>=0&&(s["@"]=e.getValue(w,e.position,"latex-unstyled"),e.deleteAtoms([w,e.position]))}s[0]||(s[0]=s["?"]);let l=!1,c=w=>(l=!0,s[w]),[u,d]=Ju(e,r,c,i);if(!d)return!1;let{parent:m}=e.at(e.position);if(u!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&m instanceof X&&m.leftDelim==="("&&m.hasEmptyBranch("body")&&d.length===1&&d[0].type==="genfrac"){let w=m.parent,L=m.parentBranch;w.removeChild(m),w.setChildren(d,L)}let h=m.hasEmptyBranch("body"),y=e.at(e.position);y.parent.addChildrenAfter(d,y),u==="latex"&&typeof r=="string"&&!m.parent&&h&&!l&&(m.verbatimLatex=r),e.silenceNotifications=a;let b=d[d.length-1];if(i.selectionMode==="placeholder"){let w=d.flatMap(L=>[L,...L.children]).find(L=>L.type==="placeholder");if(w){let L=e.offsetOf(w);e.setSelection(L-1,L),e.announce("move")}else b&&(e.position=e.offsetOf(b))}else i.selectionMode==="before"||(i.selectionMode==="after"?b&&(e.position=e.offsetOf(b)):i.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(b)));return q(e,{data:o,inputType:"insertText"}),e.silenceNotifications=n,!0}};function Ju(t,e,r,i){var a;let o,n=[];if(typeof e!="string"||i.format==="math-json"){let s=window.MathfieldElement.computeEngine;if(!s)return["math-json",[]];[o,e]=["latex",s.box(e).latex],n=le(e,{context:t.mathfield.context})}else typeof e=="string"&&i.format==="ascii-math"?([o,e]=xr(e,{format:"ascii-math",inlineShortcuts:t.mathfield.options.inlineShortcuts}),n=le(e,{context:t.mathfield.context}),o!=="latex"&&t.mathfield.options.removeExtraneousParentheses&&Uo(n)):(i.format==="auto"||(a=i.format)!=null&&a.startsWith("latex"))&&(i.format==="auto"&&([o,e]=xr(e,{format:"auto",inlineShortcuts:t.mathfield.options.inlineShortcuts})),i.format==="latex"&&([,e]=Mo(e)),n=le(e,{context:t.mathfield.context,args:r}),i.format!=="latex"&&t.mathfield.options.removeExtraneousParentheses&&Uo(n));return Kt(n,i.style),[o!=null?o:"latex",n]}function Wu(t){if(!t||(t[0].type,t.length>1))return null;let e=t[0];return e instanceof X&&e.leftDelim==="("&&e.rightDelim===")"?e.removeBranch("body"):null}function Uo(t){if(t){for(let e=0;t[e];e++){let r=t[e];if(r instanceof X&&r.leftDelim==="("){let i=0,o=0,n=0;for(let a=0;r.body[a];a++)r.body[a].type==="genfrac"&&(i++,o=a),n++;n===0&&i===1&&(t[e]=r.body[o])}}for(let e of t){for(let r of e.branches)if(!e.hasEmptyBranch(r)){Uo(e.branch(r));let i=Wu(e.branch(r));i&&e.setChildren(i,r)}if(e instanceof I)for(let r of e.cells)Uo(r)}}}function Uu(t){let e=t.at(t.position);if(e.mode==="text"){for(;!e.isFirstSibling&&e.mode==="text";)e=e.leftSibling;return t.offsetOf(e)}let r=e,i=!1;if(e.type==="mclose"){let o=Oi[e.value];for(;!e.isFirstSibling&&!(e.type==="mopen"&&e.value===o);)e=e.leftSibling;e.isFirstSibling||(e=e.leftSibling),i=!0}else e.type==="leftright"&&(e=e.leftSibling,i=!0);if(i)for(;!e.isFirstSibling&&(e.isFunction||sl(e));)e=e.leftSibling;else{let o=[];for(;!e.isFirstSibling&&(sl(e)||o.length>0);)e.type==="mclose"&&o.unshift(e.value),e.type==="mopen"&&o.length>0&&e.value===Oi[o[0]]&&o.shift(),e=e.leftSibling}return r===e?-1:t.offsetOf(e)}function sl(t){return t.type&&/^(mord|surd|msubsup|leftright|mop|mclose)$/.test(t.type)?!(t.isExtensibleSymbol||t.isFunction):!1}function ia(t,e){return t?["(","{","[","\\lbrace","\\lparen","\\{","\\lbrack"].includes(t)?[")","}","]","\\rbrace","\\rparen","\\}","\\rbrack"].includes(e):Qr[t]===e:!0}function ll(t,e){return e?[")","}","]","\\rbrace","\\rparen","\\}","\\rbrack"].includes(e)?["(","{","[","\\lbrace","\\lparen","\\{","\\lbrack"].includes(t):Oi[e]===t:!0}function jo(t,e,r){t.selectionIsCollapsed;let i=t.at(t.position),{parent:o}=i;if((e==="{"||e==="\\{")&&(e="\\lbrace"),(e==="}"||e==="\\}")&&(e="\\rbrace"),e==="["&&(e="\\lbrack"),e==="]"&&(e="\\rbrack"),/\||\\vert|\\Vert|\\mvert|\\mid/.test(e)){let s=o instanceof X?o.leftDelim+o.rightDelim:"";if(s==="\\lbrace\\rbrace"&&(s="{}"),s==="\\{\\}"&&(s="{}"),s==="\\lparen\\rparen"&&(s="()"),s==="{}")return Q.insert(t,"\\,\\middle"+e+"\\, ",{format:"latex",style:r}),!0}let n=Qr[e];if(n){if(o instanceof X&&o.firstChild===i&&(o.leftDelim==="?"||o.leftDelim==="."))return o.leftDelim=e,o.isDirty=!0,q(t,{data:e,inputType:"insertText"}),!0;if(!(o instanceof X)){let u=i;for(;u&&!(u.type==="mclose"&&u.value===n);)u=u.rightSibling;if(u){let d=t.extractAtoms([t.offsetOf(i),t.offsetOf(u)]);return d.pop(),o.addChildrenAfter([new X("left...right",d,{leftDelim:e,rightDelim:n})],i),t.position=t.offsetOf(o.firstChild)+1,q(t,{data:e,inputType:"insertText"}),!0}}let s=t.offsetOf(i.lastSibling),l;for(l=t.position;l<=s;l++){let u=t.at(l);if(u instanceof X&&(u.leftDelim==="?"||u.leftDelim===".")&&ll(e,u.rightDelim))break}let c=t.at(l);if(l<=s&&c instanceof X){c.leftDelim=e;let u=t.extractAtoms([t.position,l-1]);return u=u.filter(d=>d.type!=="first"),c.addChildren(u,c.parentBranch),t.position+=1,q(t,{data:e,inputType:"insertText"}),!0}if(o instanceof X&&(o.leftDelim==="?"||o.leftDelim===".")&&ll(e,o.rightDelim)){o.isDirty=!0,o.leftDelim=e;let u=t.extractAtoms([t.offsetOf(i.firstSibling),t.position]);for(let d of u)o.parent.addChildBefore(d,o);return q(t,{data:e,inputType:"insertText"}),!0}if(!(o instanceof X&&o.leftDelim==="|")){if(Q.insert(t,`\\left${e}\\right?`,{format:"latex",style:r}),i.lastSibling.type!=="first"){let u=t.offsetOf(i.lastSibling),d=t.extractAtoms([t.position,u]);t.at(t.position).body=d,t.position-=1}return!0}}let a=Oi[e];if(a){let s=i;for(;s;){if(s.type==="mopen"&&s.value===a){let m=s.leftSibling,h=t.extractAtoms([t.offsetOf(s.leftSibling),t.offsetOf(i)]);h.shift();let y=new X("left...right",h,{leftDelim:a,rightDelim:e});return o.addChildrenAfter([y],m),t.position=t.offsetOf(y),q(t,{data:e,inputType:"insertText"}),!0}s=s.leftSibling}if(o instanceof X&&i.isLastSibling&&ia(o.leftDelim,e))return o.isDirty=!0,o.rightDelim=e,t.position+=1,q(t,{data:e,inputType:"insertText"}),!0;let l=t.offsetOf(i.firstSibling),c;for(c=t.position;c>=l;c--){let m=t.at(c);if(m instanceof X&&(m.rightDelim==="?"||m.rightDelim===".")&&ia(m.leftDelim,e))break}let u=t.at(c);if(c>=l&&u instanceof X)return u.rightDelim=e,u.addChildren(t.extractAtoms([c,t.position]),u.parentBranch),q(t,{data:e,inputType:"insertText"}),!0;if(o instanceof X&&(o.rightDelim==="?"||o.rightDelim===".")&&ia(o.leftDelim,e))return o.isDirty=!0,o.rightDelim=e,o.parent.addChildren(t.extractAtoms([t.position,t.offsetOf(i.lastSibling)]),o.parentBranch),t.position=t.offsetOf(o),q(t,{data:e,inputType:"insertText"}),!0;let d=o.parent;return d instanceof X&&(d.rightDelim==="?"||d.rightDelim===".")&&t.at(t.position).isLastSibling?(t.position=t.offsetOf(d),jo(t,e,r)):!1}return!1}new oa;function na(t,e,r){var d,m,h,y;let{model:i}=t;xs(r);let o=cr();if(t.keyboardLayout!==o.id&&(t.keyboardLayout=o.id,t._keybindings=void 0),clearTimeout(t.inlineShortcutBufferFlushTimer),t.inlineShortcutBufferFlushTimer=0,il(t,e),r.defaultPrevented)return t.flushInlineShortcutBuffer(),!1;let n,a="",s,l=t.inlineShortcutBuffer;if(t.isSelectionEditable){if(i.mode==="math")if(e==="[Backspace]")l.pop(),t.flushInlineShortcutBuffer({defer:!0});else if(!Ho(r))t.flushInlineShortcutBuffer();else{let b=eo(r),M=[...(m=(d=l[l.length-1])==null?void 0:d.keystrokes)!=null?m:[],b];l.push({state:i.getState(),keystrokes:M,leftSiblings:ju(t)});let k=0,w="";for(;!n&&k<M.length;)s=l.length-(M.length-k),w=M.slice(k).join(""),n=Bi(l[s].leftSiblings,w,t.options.inlineShortcuts),!n&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(w)&&(n=t.options.onInlineShortcut(t,w)),k+=1;t.flushInlineShortcutBuffer({defer:!0})}if(t.options.smartMode){let b=i.mode;n?i.mode="math":tl(t,e,r)&&(i.mode={math:"text",text:"math"}[i.mode],a=""),i.mode!==b&&((h=t.host)!=null&&h.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))||(i.mode=b))}}if(!n){if(a||(a=ks(t.keybindings,i.mode,e)),!a&&(e==="[Enter]"||e==="[Return]")){let b=!1;return H(i,{inputType:"insertLineBreak"})&&(t.host&&(b=!t.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),b||r.preventDefault&&(r.preventDefault(),r.stopPropagation()),q(i,{inputType:"insertLineBreak"})),b}if((!a||e==="[Space]")&&i.mode==="math"){if(e==="[Space]"){if(t.adoptStyle="none",t.flushInlineShortcutBuffer(),t.options.mathModeSpace)return Q.insert(i,t.options.mathModeSpace,{format:"latex",mode:"math"}),t.snapshot("insert-space"),a="",t.dirty=!0,t.scrollIntoView(),r.preventDefault&&(r.preventDefault(),r.stopPropagation()),!1;let b=i.at(i.position+1),M=i.at(i.position-1);if((b==null?void 0:b.mode)==="text"||(M==null?void 0:M.mode)==="text")return Q.insert(i," ",{mode:"text"}),t.snapshot("insert-space"),t.dirty=!0,t.scrollIntoView(),!0}(y=i.at(i.position))!=null&&y.isDigit()&&window.MathfieldElement.decimalSeparator===","&&eo(r)===","&&(a="insertDecimalSeparator")}}if(!n&&!a)return!0;let c=i.at(Math.max(i.position,i.anchor)),{parent:u}=c;if(a==="moveAfterParent"&&(u==null?void 0:u.type)==="leftright"&&c.isLastSibling&&t.options.smartFence&&jo(i,".",t.style)&&(a="",re(t)),t.keyboardDelegate.cancelComposition(),a)t.executeCommand(a);else if(n){let b=g(g({},i.at(i.position).computedStyle),t.style);i.setState(l[s].state);let M=l[l.length-1].keystrokes;for(let k of M)Q.insert(i,k,{silenceNotifications:!0,style:b});t.snapshot("insert-shortcut"),i.setState(l[s].state),i.deferNotifications({content:!0,selection:!0,data:n,type:"insertText"},()=>(Q.insert(i,n,{format:"latex",style:b}),Wo(t.model),n.endsWith(" ")&&(i.mode="text",Q.insert(i," ",{style:b,mode:"text"})),t.snapshot(),i.selectionIsCollapsed||t.flushInlineShortcutBuffer(),!0)),t.dirty=!0,i.announce("replacement")}return t.scrollIntoView(),r.preventDefault&&r.preventDefault(),!1}function ro(t,e,r){var l;let{model:i}=t;if(!t.isSelectionEditable){i.announce("plonk");return}if(r!=null||(r={}),r.focus&&t.focus(),r.feedback&&window.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(t.switchMode(r.mode),t.snapshot()),r.simulateKeystroke){let c=e.charAt(0),u=new KeyboardEvent("keypress",{key:c});if(!na(t,c,u))return}let o=i.at(i.position),n=o.rightSibling,a=g(g({},o.computedStyle),t.style);i.selectionIsCollapsed||(i.deleteAtoms(xe(i.selection)),t.snapshot("delete"));let s=ho(e);if(i.mode==="latex")i.deferNotifications({content:!0,selection:!0,data:e,type:"insertText"},()=>{Ni(t);for(let c of s)Q.insert(i,c);t.snapshot("insert-latex"),ni(t)});else if(i.mode==="text"){for(let c of s)Q.insert(i,c,{style:a});t.snapshot("insert-text")}else if(i.mode==="math")for(let c of s){let u={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[c];if(c===" "&&t.options.mathModeSpace&&(u=["insert",t.options.mathModeSpace]),u)t.executeCommand(u);else if(/\d/.test(c)&&t.options.smartSuperscript&&o.parentBranch==="superscript"&&((l=o.parent)==null?void 0:l.type)!=="mop"&&o.hasNoSiblings)Q.insert(i,c,{style:a}),t.snapshot(),ra(i),t.snapshot();else{if(t.adoptStyle!=="none"){let d=t.adoptStyle==="left"?o:n;(d==null?void 0:d.type)==="mord"&&/[a-zA-Z]/.test(d.value)&&/[a-zA-Z]/.test(c)&&(d.style.variant&&(a.variant=d.style.variant),d.style.variantStyle&&(a.variantStyle=d.style.variantStyle))}Q.insert(i,c,{style:a}),t.snapshot(`insert-${i.at(i.position).type}`)}}t.dirty=!0,t.scrollIntoView()}function ju(t){let e=t.model,r=[],i=e.at(Math.min(e.position,e.anchor));for(;i.type!=="first";)r.push(i),i=i.leftSibling;return r}var cl={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};v(Object.keys(cl),"{body:auto}",{createAtom:(t,e,r)=>new Lt(t,e[0]?A(e[0]):[new he],{accentChar:cl[t.slice(1)],style:r})});v(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:(t,e,r)=>{let i=Sn(A(e[0]));return new Lt(t,A(e[0]),{style:r,svgAccent:t.slice(1)+(i.length>5?"4":["1","1","2","2","3","3"][i.length])})}});v(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:(t,e,r)=>new Lt(t,A(e[0]),{style:r,svgAccent:"overarc"})});v(["underarc","underparen"],"{body:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[0]),style:r,svgBelow:"underarc"})});v("utilde","{body:auto}",{createAtom:(t,e,r)=>{let i=Sn(A(e[0])),o="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return new ve(t,{body:A(e[0]),svgBelow:o,style:r,boxType:gr(A(e[0]))})}});v("^","{:string}",{createAtom:(t,e,r)=>{var i;return new f({type:"mord",command:t,isFunction:!1,limits:"adjacent",style:r,value:e[0]&&(i={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e[0]])!=null?i:"^"})}});v("`","{:string}",{createAtom:(t,e,r)=>{var i;return new f({type:"mord",command:t,isFunction:!1,limits:"adjacent",style:r,value:e[0]&&(i={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e[0]])!=null?i:"`"})}});v("'","{:string}",{createAtom:(t,e,r)=>{var i;return new f({type:"mord",command:t,isFunction:!1,limits:"adjacent",style:r,value:e[0]&&(i={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e[0]])!=null?i:"^"})}});v("~","{:string}",{createAtom:(t,e,r)=>{var i;return new f({type:"mord",command:t,isFunction:!1,limits:"adjacent",style:r,value:e[0]&&(i={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e[0]])!=null?i:"\xB4"})}});v("c","{:string}",{createAtom:(t,e,r)=>{var i;return new f({type:"mord",command:t,isFunction:!1,limits:"adjacent",style:r,value:e[0]&&(i={c:"\xE7",C:"\xC7"}[e[0]])!=null?i:""})}});v("enclose","{notation:string}[style:string]{body:auto}",{createAtom:(t,e,r)=>{var n;let i={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",svgStrokeStyle:void 0,borderStyle:void 0,style:r};if(e[1]){let a=e[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let s of a){let l=s.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(l)i.strokeWidth=l[1],i.strokeStyle=l[2],i.strokeColor=l[3];else{let c=s.match(/\s*([a-z]*)\s*=\s*"(.*)"/);c&&(c[1]==="mathbackground"?i.backgroundcolor=c[2]:c[1]==="mathcolor"?i.strokeColor=c[2]:c[1]==="padding"?i.padding=c[2]:c[1]==="shadow"&&(i.shadow=c[2]))}}i.strokeStyle==="dashed"?i.svgStrokeStyle="5,5":i.strokeStyle==="dotted"&&(i.svgStrokeStyle="1,5")}i.borderStyle=`${i.strokeWidth} ${i.strokeStyle} ${i.strokeColor}`;let o={};return((n=e[0])!=null?n:"").split(/[, ]/).filter(a=>a.length>0).forEach(a=>{o[a.toLowerCase()]=!0}),new gt(t,A(e[2]),o,i)}});v("cancel","{body:auto}",{createAtom:(t,e,r)=>new gt(t,A(e[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:r})});v("bcancel","{body:auto}",{createAtom:(t,e,r)=>new gt(t,A(e[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:r})});v("xcancel","{body:auto}",{createAtom:(t,e,r)=>new gt(t,A(e[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:r})});v(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",style:r,svgAbove:t.slice(1)})});v("overbrace","{:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",style:r,svgAbove:t.slice(1)})});v(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",style:r,svgBelow:t.slice(1)})});v(["underbrace"],"{:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",style:r,svgBelow:t.slice(1)})});v(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",{createAtom:(t,e,r)=>{var i,o;return new ve(t,{style:r,svgBody:t.slice(1),above:((i=A(e[1]))==null?void 0:i.length)===0?void 0:A(e[1]),below:(o=A(e[0]))!=null?o:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"})},serialize:(t,e)=>t.command+(t.hasEmptyBranch("below")?"":`[${t.belowToLatex(e)}]`)+`{${t.aboveToLatex(e)}}${t.supsubToLatex(e)}`});v(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","dim","exp","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:(t,e,r)=>new Se(t,t.slice(1),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up",style:r})});v(["liminf","limsup"],"",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,{"\\liminf":"lim inf","\\limsup":"lim sup"}[t],{limits:"over-under",variant:"main",style:r})});v(["lim","mod"],"",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,t.slice(1),{limits:"over-under",variant:"main",style:r})});v(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:(t,e,r)=>new Se(t,t.slice(1),{limits:"over-under",isFunction:!0,variant:"main",style:r})});v(["ang"],"{:math}",{ifMode:"math",createAtom:(t,e,r)=>new f({command:t,body:A(e[0]),mode:"math",style:r}),serialize:(t,e)=>`\\ang{${t.bodyToLatex(e)}}`,render:(t,e)=>{let r=t.createBox(e),i=r.caret;r.caret=void 0;let o=new x("\xB0",{style:T(g({},t.style),{variant:"normal",variantStyle:"up"})});return new x([r,o],{type:"inner",isSelected:t.isSelected,caret:i})}});v("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:(t,e,r)=>new lr(t,{body:A(e[1]),index:e[0]?A(e[0]):void 0,style:r})});v(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:(t,e,r)=>{let i={style:r};switch(t){case"\\dfrac":case"\\frac":case"\\tfrac":i.hasBarLine=!0;break;case"\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")";break;case"\\cfrac":i.hasBarLine=!0,i.continuousFraction=!0;break;default:}switch(t){case"\\dfrac":case"\\dbinom":i.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyleName="textstyle";break;default:}return new it(t,e[0]?A(e[0]):[new he],e[1]?A(e[1]):[new he],i)},serialize:(t,e)=>{let r=t.aboveToLatex(e),i=t.belowToLatex(e);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(i)?`${t.command}${r}${i}`:R(t.command,r,i)}});v(["brace","brack"],"",{infix:!0,createAtom:(t,e,r)=>new it(t,A(e[0]),A(e[1]),{hasBarLine:!1,leftDelim:t==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:t==="\\brace"?"\\rbrace":"\\rbrack",style:r}),serialize:(t,e)=>j([t.aboveToLatex(e),t.command,t.belowToLatex(e)])});v(["over","atop","choose"],"",{infix:!0,createAtom:(t,e,r)=>{let i,o;return t==="\\choose"&&(i="(",o=")"),new it(t,A(e[0]),A(e[1]),{hasBarLine:t==="\\over",leftDelim:i,rightDelim:o,style:r})},serialize:(t,e)=>j([t.aboveToLatex(e),t.command,t.belowToLatex(e)])});v(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:(t,e,r)=>{var i,o;return new it(t,A(e[0]),A(e[1]),{leftDelim:(i=e[2])!=null?i:".",rightDelim:(o=e[3])!=null?o:".",hasBarLine:!1,style:r})},serialize:(t,e)=>`${t.aboveToLatex(e)} ${t.command}${t.leftDelim}${t.rightDelim}${t.belowToLatex(e)}`});v("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:(t,e,r)=>new it(t,A(e[0]),A(e[1]),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202",style:r})});v(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,{coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[t.slice(1)],{isExtensibleSymbol:!0,limits:"auto",variant:"main",style:r})});v("smallint","",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,"\u222B",{limits:"adjacent",isExtensibleSymbol:!1,style:r,variant:"main"})});var aa={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};v(Object.keys(aa),"",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,aa[t.slice(1)],{limits:"adjacent",isExtensibleSymbol:!0,style:r,variant:{"\u22D2":"ams","\u22D3":"ams"}[aa[t.slice(1)]]})});v(["Re","Im"],"",{ifMode:"math",createAtom:(t,e,r)=>new Se(t,{"\\Re":"\u211C","\\Im":"\u2111"}[t],{limits:"adjacent",style:r,isFunction:!0,variant:"fraktur"})});v("middle","{:delim}",{ifMode:"math",createAtom:(t,e,r)=>{var i;return new nr(t,(i=e[0])!=null?i:"|",{size:1,style:r})}});v("the","{:value}",{createAtom:(t,e,r)=>new f({command:t,captureSelection:!0,args:e,style:r,verbatimLatex:null}),render:(t,e)=>{var n;let r=new P({parent:e},t.style),i="";t.isSelected&&(i+=" ML__selected");let o=r.evaluate(t.args[0]);return new x(((n=be(o))!=null?n:"").split("").map(a=>new x(a,{type:"ord",classes:i,mode:t.mode,isSelected:t.isSelected,style:g({variant:"main"},t.style)})),{type:"lift",style:t.style,caret:t.caret,isSelected:t.isSelected,classes:i}).wrap(r)},serialize:t=>{var e;return`\\the${(e=be(t.args[0]))!=null?e:"\\relax"}`}});v("mathtip","{:math}{:math}",{createAtom:(t,e,r)=>new It(A(e[0]),A(e[1]),{command:t,content:"math",style:r})});v("texttip","{:math}{:text}",{createAtom:(t,e,r)=>new It(A(e[0]),A(e[1]),{command:t,content:"text",style:r})});v("error","{:math}",{createAtom:(t,e,r)=>new f({args:e,body:A(e[0]),style:r}),serialize:(t,e)=>`\\error{${t.bodyToLatex(e)}}`,render:(t,e)=>t.createBox(e,{classes:"ML__error"})});v("ensuremath","{:math}",{createAtom:(t,e,r)=>new f({type:"minner",command:t,body:A(e[0]),mode:"math",style:r}),serialize:(t,e)=>`${t.command}{${t.bodyToLatex(e)}}`});v("color","{:value}",{applyStyle:(t,e,r)=>{var i,o;return{verbatimColor:(i=be(e[0]))!=null?i:void 0,color:r.toColor((o=e[0])!=null?o:{string:"red"})}}});v("textcolor","{:value}{content:auto*}",{applyStyle:(t,e,r)=>{var i,o;return{verbatimColor:(i=be(e[0]))!=null?i:void 0,color:r.toColor((o=e[0])!=null?o:{string:"red"})}}});v("boxed","{content:math}",{createAtom:(t,e,r)=>new He(t,A(e[0]),{framecolor:{string:"black"},style:r})});v("colorbox","{:value}{:auto*}",{applyMode:"text",applyStyle:(t,e,r)=>{var i,o;return{verbatimBackgroundColor:(i=be(e[0]))!=null?i:void 0,backgroundColor:r.toBackgroundColor((o=e[0])!=null?o:{string:"yellow"})}}});v("fcolorbox","{frame-color:value}{background-color:value}{content:auto}",{applyMode:"text",createAtom:(t,e,r)=>{var i,o;return new He(t,A(e[2]),{framecolor:(i=e[0])!=null?i:{string:"blue"},backgroundcolor:(o=e[1])!=null?o:{string:"yellow"},style:r})},serialize:(t,e)=>{var r,i;return R(t.command,(r=be(t.framecolor))!=null?r:"",(i=be(t.backgroundcolor))!=null?i:"",t.bodyToLatex(e))}});v("bbox","[:bbox]{body:auto}",{createAtom:(t,e,r)=>{var o;let i=e[0];return i?new He(t,A(e[1]),{padding:i.padding,border:i.border,backgroundcolor:(o=i.backgroundcolor)!=null?o:void 0,style:r}):new He(t,A(e[1]),{style:r})},serialize:(t,e)=>{var i,o;let r=t.command;if(Number.isFinite(t.padding)||t.border!==void 0||t.backgroundcolor!==void 0){let n=[];t.padding&&n.push((i=be(t.padding))!=null?i:""),t.border&&n.push(`border: ${t.border}`),t.backgroundcolor&&n.push((o=be(t.backgroundcolor))!=null?o:""),r+=`[${n.join(",")}]`}return R(r,t.bodyToLatex(e))}});v(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:(t,e,r)=>new f({command:t,body:A(e[0]),style:r}),render:(t,e)=>{let r=new P({parent:e,mathstyle:t.command.slice(1)},t.style),i=f.createBox(r,t.body,{type:"lift",mode:"math",style:t.style});return t.caret&&(i.caret=t.caret),t.bind(e,i)},serialize:(t,e)=>`{${j([t.command,t.bodyToLatex(e)])}}`});v(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:t=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[t]})});v("fontseries","{:string}",{ifMode:"text",applyStyle:(t,e)=>{var r;return{fontSeries:(r=e[0])!=null?r:"auto"}}});v("fontshape","{:string}",{ifMode:"text",applyStyle:(t,e)=>{var r;return{fontShape:(r=e[0])!=null?r:"auto"}}});v("fontfamily","{:string}",{ifMode:"text",applyStyle:(t,e)=>{var r;return{fontFamily:(r=e[0])!=null?r:"roman"}}});v("selectfont","",{ifMode:"text",applyStyle:()=>({})});v("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})});v(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:(t,e,r)=>new f({command:t,body:A(e[0]),style:r}),serialize:(t,e)=>`${t.command}{${t.bodyToLatex(e)}}`,render:(t,e)=>t.createBox(e,{classes:"ML__boldsymbol"})});v("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})});v("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})});v("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})});v("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})});v("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})});v("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})});v("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})});v("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})});v("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})});v("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})});v("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})});v("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})});v("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})});v("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})});v("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})});v("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})});v("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})});v("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})});v("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})});v("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})});v("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})});v("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})});v("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})});v("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})});v("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})});v("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})});v("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})});v(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})});v(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})});v("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})});v("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})});v("mbox","{:text}",{ifMode:"math",createAtom:(t,e,r)=>new f({type:"mord",command:t,style:r,body:A(e[0]),mode:"math"}),serialize:(t,e)=>R("\\mbox",t.bodyToLatex(T(g({},e),{skipModeCommand:!0})))});v("text","{:text}",{ifMode:"math",applyMode:"text"});v(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:(t,e,r)=>new f({command:t,args:e,body:A(e[1]),style:r}),serialize:(t,e)=>{var r;return(r=t.args)!=null&&r[0]?`${t.command}{${t.args[0]}}{${t.serialize(e)}}`:t.serialize(e)},render:(t,e)=>{var r;return t.createBox(e,{classes:(r=t.args[0])!=null?r:""})}});v(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:(t,e,r)=>new f({command:t,args:e,body:A(e[1]),style:r}),serialize:(t,e)=>{var r;return(r=t.args)!=null&&r[0]?`${t.command}{${t.args[0]}}{${t.serialize(e)}}`:t.serialize(e)},render:(t,e)=>{var i;let r=t.createBox(e);return r.cssId=(i=t.args[0])!=null?i:"",r}});v("htmlData","{data:string}{content:auto}",{createAtom:(t,e,r)=>new f({command:t,body:A(e[1]),args:e,style:r}),serialize:(t,e)=>{var r;return(r=t.args)!=null&&r[0]?`\\htmlData{${t.args[0]}}{${t.serialize(e)}}`:t.serialize(e)},render:(t,e)=>{var i;let r=t.createBox(e);return r.htmlData=(i=t.args[0])!=null?i:"",r}});v(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:(t,e,r)=>new f({command:t,args:e,body:A(e[1]),style:r}),serialize:(t,e)=>{var r;return(r=t.args)!=null&&r[0]?`${t.command}{${t.args[0]}}{${t.serialize(e)}}`:t.serialize(e)},render:(t,e)=>{var i;let r=t.createBox(e);return r.htmlStyle=(i=t.args[0])!=null?i:"",r}});v("em","{:rest}",{createAtom:(t,e,r)=>new f({command:t,body:A(e[0]),args:e,style:r}),serialize:(t,e)=>`{\\em ${t.bodyToLatex(e)}}`,render:(t,e)=>t.createBox(e,{classes:"ML__emph",boxType:"lift"})});v("emph","{:auto}",{createAtom:(t,e,r)=>new f({command:t,body:A(e[0]),args:e,style:r}),serialize:(t,e)=>`\\emph{${t.bodyToLatex(e)}}`,render:(t,e)=>t.createBox(e,{classes:"ML__emph",boxType:"lift"})});var ul={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};v(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:(t,e,r)=>{var i;return new ar(t,(i=e[0])!=null?i:".",{size:ul[t].size,delimType:ul[t].mclass,style:r})}});v(["hspace","hspace*"],"{width:value}",{createAtom:(t,e,r)=>{var i;return new ot(t,r,(i=e[0])!=null?i:{dimension:0})}});v(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:(t,e,r)=>{var i;return new ot(t,r,(i=e[0])!=null?i:{dimension:0})}});v("mathop","{:auto}",{createAtom:(t,e,r)=>new Se(t,A(e[0]),{type:"mop",captureSelection:!0,limits:"over-under",isFunction:!0,hasArgument:!0,style:r})});v("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:(t,e)=>new or(e.map(r=>A(r)))});v(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:(t,e,r)=>new Se(t,A(e[0]),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[t],captureSelection:!0,hasArgument:!0,style:r})});v(["operatorname","operatorname*"],"{operator:math}",{createAtom:(t,e,r)=>{let i=new Se(t,A(e[0]),{isFunction:!0,hasArgument:!0,limits:t==="\\operatorname"?"adjacent":"over-under",style:r});return i.captureSelection=!0,i.body&&i.body.forEach(o=>{var n;o.type!=="first"&&(o.type="mord",o.value=(n={"\u2217":"*","\u2212":"-"}[o.value])!=null?n:o.value,o.isFunction=!1,!o.style.variant&&!o.style.variantStyle&&(o.style.variant="main",o.style.variantStyle="up"))}),i}});v("unicode","{charcode:value}",{createAtom:(t,e,r)=>new f({command:t,args:e,style:r}),serialize:t=>{var e;return`\\unicode${be((e=t.args[0])!=null?e:{number:10067,base:"hexadecimal"})}`},render:(t,e)=>{let r=e.evaluate(t.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),t.value=String.fromCodePoint(r.number),t.createBox(e)}});v("rule","[raise:value]{width:value}{thickness:value}",{createAtom:(t,e,r)=>{var i,o,n;return new sr(t,{shift:(i=e[0])!=null?i:{dimension:0},width:(o=e[1])!=null?o:{dimension:1,unit:"em"},height:(n=e[2])!=null?n:{dimension:1,unit:"em"},style:r})}});v("overline","{:auto}",{createAtom:(t,e,r)=>new Nt(t,A(e[0]),{position:"overline",style:r})});v("underline","{:auto}",{createAtom:(t,e,r)=>new Nt(t,A(e[0]),{position:"underline",style:r})});v("overset","{above:auto}{base:auto}",{createAtom:(t,e,r)=>new ve(t,{above:A(e[0]),body:A(e[1]),skipBoundary:!1,style:r,boxType:gr(A(e[1]))}),serialize:(t,e)=>R(t.command,t.aboveToLatex(e),t.bodyToLatex(e))});v("underset","{below:auto}{base:auto}",{createAtom:(t,e,r)=>new ve(t,{below:A(e[0]),body:A(e[1]),skipBoundary:!1,style:r,boxType:gr(A(e[1]))}),serialize:(t,e)=>R(t.command,t.belowToLatex(e),t.bodyToLatex(e))});v("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:(t,e,r)=>new ve(t,{above:A(e[0]),below:A(e[1]),body:A(e[2]),skipBoundary:!1,style:r,boxType:gr(A(e[2]))}),serialize:(t,e)=>R(t.command,t.aboveToLatex(e),t.bodyToLatex(e))});v(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:(t,e,r)=>new ve(t,{body:A(e[2]),above:A(e[1]),below:A(e[0]),skipBoundary:!1,style:r,boxType:t==="\\stackrel"?"rel":"bin"}),serialize:(t,e)=>R(t.command,t.aboveToLatex(e),t.bodyToLatex(e))});v("smash","[:string]{:auto}",{createAtom:(t,e,r)=>{var i,o,n,a;return new yt(t,A(e[1]),{smashHeight:(o=(i=e[0])==null?void 0:i.includes("t"))!=null?o:!0,smashDepth:(a=(n=e[0])==null?void 0:n.includes("b"))!=null?a:!0,style:r})}});v(["vphantom"],"{:auto}",{createAtom:(t,e,r)=>new yt(t,A(e[0]),{isInvisible:!0,smashWidth:!0,style:r})});v(["hphantom"],"{:auto}",{createAtom:(t,e,r)=>new yt(t,A(e[0]),{isInvisible:!0,smashHeight:!0,smashDepth:!0,style:r})});v(["phantom"],"{:auto}",{createAtom:(t,e,r)=>new yt(t,A(e[0]),{isInvisible:!0,style:r})});v("not","{:math}",{createAtom:(t,e,r)=>{let i=A(e[0]);return e.length<1||e[0]===null||i.length===0?new f({type:"mrel",command:t,args:e,style:r,value:"\uE020"}):new f({command:t,body:[new je("","\uE020",{align:"right",style:r}),...i],args:e,style:r,captureSelection:!0})},serialize:(t,e)=>{let r=t.args[0],i=typeof r=="object"&&"group"in r;return t.value!=="\uE020"?i?`\\not{${ht(r.group,e)}}`:`\\not${ht(r,e)}`:i?"\\not{}":"\\not"},render:(t,e)=>{if(t.value)return t.createBox(e);let i=typeof t.args[0]=="object"&&"group"in t.args[0]?"ord":gr(A(t.args[0])),o=f.createBox(e,t.body,{type:i});return t.caret&&(o.caret=t.caret),t.bind(e,o)}});v(["ne","neq"],"",{createAtom:(t,e,r)=>new f({type:"mrel",body:[new je("","\uE020",{align:"right",style:r,boxType:"rel"}),new f({style:r,value:"="})],captureSelection:!0,command:t,style:r}),serialize:t=>t.command});v("rlap","{:auto}",{createAtom:(t,e,r)=>new je(t,A(e[0]),{align:"right",style:r})});v("llap","{:auto}",{createAtom:(t,e,r)=>new je(t,A(e[0]),{style:r})});v("mathllap","{:auto}",{createAtom:(t,e,r)=>new je(t,A(e[0]),{style:r})});v("mathrlap","{:auto}",{createAtom:(t,e,r)=>new je(t,A(e[0]),{align:"right",style:r})});v("raisebox","{:value}{:text}",{createAtom:(t,e,r)=>{var i;return new He(t,A(e[1]),{padding:{dimension:0},raise:(i=e[0])!=null?i:{dimension:0},style:r})},serialize:(t,e)=>{var r;return R("\\raisebox",(r=be(t.raise))!=null?r:"0pt",t.bodyToLatex(e))}});ke("0123456789/@.?!");kn(65,90);kn(97,122);ke([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]);ke([["\\sharp",9839],["\\flat",9837],["\\natural",9838],["\\#",35],["\\&",38],["\\clubsuit",9827],["\\heartsuit",9825],["\\spadesuit",9824],["\\diamondsuit",9826],["\\parallelogram",9649]]);ke([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]);ke([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel");ke([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]);ke([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams");ke([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin");ke([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams");ke([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]);ke([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel");ke([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams");ke([["\\wp",8472],["\\aleph",8501]]);ke([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams");ke([["\\ ",160],["~",160]],"space");v(["!",",",":",";","enskip","enspace","quad","qquad"],"",{createAtom:(t,e,r)=>new ot(t,r)});v("space","",{createAtom:(t,e,r)=>new ot("space",r)});ke([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct");ke([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner");ke([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);me({undo:t=>(t.undo(),!0),redo:t=>(t.redo(),!0),scrollIntoView:t=>(t.scrollIntoView(),!0),scrollToStart:t=>(t.field.scroll(0,0),!0),scrollToEnd:t=>{let e=t.field.getBoundingClientRect();return t.field.scroll(e.left-window.scrollX,0),!0},toggleKeystrokeCaption:ol,plonk:t=>(t.model.announce("plonk"),!0),switchMode:(t,e,r,i)=>(t.switchMode(e,r,i),!0),insert:(t,e,r)=>t.insert(e,r),typedText:(t,e,r)=>(ro(t,e,r),!0),insertDecimalSeparator:t=>{let e=t.model;return e.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&e.at(Math.max(e.position,e.anchor)).isDigit()?(t.insert("{,}",{format:"latex"}),t.snapshot("insert-mord"),!0):(t.insert("."),!0)},commit:t=>{var e;return H(t.model,{inputType:"insertLineBreak"})&&((e=t.host)==null||e.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),q(t.model,{inputType:"insertLineBreak"})),!0},insertPrompt:(t,e,r)=>{let i=t.getPrompts(),o="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),n=0;for(;i.includes(o)&&n<100;){if(n===99)return console.error("could not find a unique ID after 100 tries"),!1;o="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),n++}return t.insert(`\\placeholder[${e!=null?e:o}]{}`,r),!0}});me({copyToClipboard:t=>(t.focus(),t.model.selectionIsCollapsed&&t.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):t.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"});me({cutToClipboard:t=>(t.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):t.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:t=>(t.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(e=>{e&&H(t.model,{inputType:"insertFromPaste",data:e})?(t.stopCoalescingUndo(),t.stopRecording(),t.insert(e)&&(t.startRecording(),t.snapshot("paste"),q(t.model,{inputType:"insertFromPaste"}),re(t))):t.model.announce("plonk"),t.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Gu(t,e){t.flushInlineShortcutBuffer(),t.stopCoalescingUndo();let r=sa(t,e),{model:i}=t;return i.selectionIsCollapsed?(t.style.fontSeries&&r.fontSeries===t.style.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===t.style.fontShape&&(r.fontShape="auto"),r.color&&r.color===t.style.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===t.style.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===t.style.fontSize&&(r.fontSize="auto"),t.style=g(g({},t.style),r)):t.model.deferNotifications({content:!0,type:"insertText"},()=>{i.selection.ranges.forEach(o=>Qi(i,o,r,{operation:"toggle"})),t.snapshot("style-change")}),!0}me({applyStyle:Gu},{target:"mathfield",canUndo:!0,changeContent:!0});function sa(t,e){var o,n,a,s,l,c;let r={};typeof e.color=="string"&&(r.verbatimColor=e.color,r.color=(o=t.colorMap(e.color))!=null?o:"none"),typeof e.backgroundColor=="string"&&(r.verbatimBackgroundColor=e.backgroundColor,r.backgroundColor=(n=t.backgroundColorMap(e.backgroundColor))!=null?n:"none"),typeof e.fontFamily=="string"&&(r.fontFamily=e.fontFamily),typeof e.series=="string"&&(r.fontSeries=e.series),typeof e.fontSeries=="string"&&(r.fontSeries=e.fontSeries.toLowerCase()),r.fontSeries&&(r.fontSeries=(a={bold:"b",medium:"m",normal:"m"}[r.fontSeries])!=null?a:r.fontSeries),typeof e.shape=="string"&&(r.fontShape=e.shape),typeof e.fontShape=="string"&&(r.fontShape=e.fontShape.toLowerCase()),r.fontShape&&(r.fontShape=(s={italic:"it",up:"n",upright:"n",normal:"n"}[r.fontShape])!=null?s:r.fontShape);let i=(l=e.size)!=null?l:e.fontSize;return typeof i=="number"?r.fontSize=Math.max(1,Math.min(10,i)):typeof i=="string"&&(r.fontSize=(c={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[i.toLowerCase()])!=null?c:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[i]),r}function la(t){var e,r,i,o,n,a;if(qo(t,t.position)==="text"){let s=Math.min(t.anchor,t.position),l=Math.max(t.anchor,t.position),c=!1;for(;!c&&s>0;){let u=t.at(s);u.mode==="text"&&Qt.test(u.value)?s-=1:c=!0}for(c=!1;!c&&l<=t.lastOffset;){let u=t.at(l);u.mode==="text"&&Qt.test(u.value)?l+=1:c=!0}if(c&&(l-=1),s>=l)return t.setSelection(l-1,l),!0;t.setSelection(s,l)}else{let s=t.at(t.position);if(s.isDigit()){let l=Math.min(t.anchor,t.position),c=Math.max(t.anchor,t.position);for(;(e=t.at(l))!=null&&e.isDigit();)l-=1;for(;(r=t.at(c))!=null&&r.isDigit();)c+=1;t.setSelection(l,c-1)}else if(s.style.variant||s.style.variantStyle){let l=Math.min(t.anchor,t.position),c=Math.max(t.anchor,t.position),u=(i=t.at(l))==null?void 0:i.style;for(;u&&u.variant===s.style.variant&&u.variantStyle===s.style.variantStyle;)l-=1,u=(o=t.at(l))==null?void 0:o.style;for(u=(n=t.at(c))==null?void 0:n.style;u&&u.variant===s.style.variant&&u.variantStyle===s.style.variantStyle;)c+=1,u=(a=t.at(c))==null?void 0:a.style;t.setSelection(l,c-1)}else t.setSelection(t.offsetOf(s.firstSibling),t.offsetOf(s.lastSibling))}return!0}me({selectGroup:t=>{let e=la(t);return e||t.announce("plonk"),e},selectAll:t=>t.setSelection(0,t.lastOffset),extendSelectionForward:t=>lt(t,"forward",{extend:!0}),extendSelectionBackward:t=>lt(t,"backward",{extend:!0}),extendToNextWord:t=>mr(t,"forward",{extend:!0}),extendToPreviousWord:t=>mr(t,"backward",{extend:!0}),extendSelectionUpward:t=>lt(t,"upward",{extend:!0}),extendSelectionDownward:t=>lt(t,"downward",{extend:!0}),extendToNextBoundary:t=>mr(t,"forward",{extend:!0}),extendToPreviousBoundary:t=>mr(t,"backward",{extend:!0}),extendToGroupStart:t=>{let e=t.setSelection(t.anchor,t.offsetOf(t.at(t.position).firstSibling));return e||t.announce("plonk"),e},extendToGroupEnd:t=>{let e=t.setSelection(t.anchor,t.offsetOf(t.at(t.position).lastSibling));return e||t.announce("plonk"),e},extendToMathFieldStart:t=>{let e=t.setSelection(t.anchor,0);return e||t.announce("plonk"),e},extendToMathFieldEnd:t=>{let e=t.setSelection(t.anchor,t.lastOffset);return e||t.announce("plonk"),e}},{target:"model",changeSelection:!0});var Rr=null,io=0;function dl(t){return t instanceof PointerEvent}function ca(t,e){var k;t.atomBoundsCache=new Map;let r=t,i,o=!1,n=!1,a="none";if(e.buttons>1)return;let s=!1,l=!1,c=e.clientX,u=e.clientY,d=Date.now(),m=r.field,h=setInterval(()=>{s?m.scroll({top:0,left:m.scrollLeft-16}):l&&m.scroll({top:0,left:m.scrollLeft+16})},32);function y(w){"PointerEvent"in window?(Ki(m,"pointermove",b),Ki(m,"pointerup pointercancel",y),w instanceof PointerEvent&&m.releasePointerCapture(w.pointerId)):(Ki(window,"mousemove",b),Ki(window,"mouseup blur",y)),o=!1,clearInterval(h),t.element.classList.remove("tracking"),w&&w.preventDefault()}function b(w){if(!r.hasFocus()){y(null);return}let L=w.clientX,E=w.clientY,B=dl(w)&&w.pointerType==="touch"?20:5;if(Date.now()<d+500&&Math.abs(c-L)<B&&Math.abs(u-E)<B){w.preventDefault(),w.stopPropagation();return}let _=m.getBoundingClientRect();l=L>_.right,s=L<_.left;let O=i;dl(w)&&(w.isPrimary||(O=Fr(r,w.clientX,w.clientY,{bias:0})));let V=Fr(r,L,E,{bias:L<=c?L===c?0:-1:1});O>=0&&V>=0&&(r.model.extendSelectionTo(O,V),re(t)),w.preventDefault(),w.stopPropagation()}Rr&&Math.abs(Rr.x-c)<5&&Math.abs(Rr.y-u)<5&&Date.now()<Rr.time+500?(io+=1,Rr.time=d):(Rr={x:c,y:u,time:d},io=1);let M=m.getBoundingClientRect();if(c>=M.left&&c<=M.right&&u>=M.top&&u<=M.bottom){if(t.hasFocus()||(a="none",t.focus({preventScroll:!0})),t.flushInlineShortcutBuffer(),t.smartModeSuppressed=!1,t.adoptStyle="left",i=Fr(t,c,u,{bias:0}),i>=0){if(t.element.classList.add("tracking"),e.shiftKey){let w=t.model.selectionIsCollapsed;t.model.extendSelectionTo(t.model.anchor,i),Rn(t.model)||w?a="all":a="selection"}else t.model.at(i).type==="placeholder"?(t.model.setSelection(i-1,i),a="selection"):((k=t.model.at(i).rightSibling)==null?void 0:k.type)==="placeholder"?(t.model.setSelection(i,i+1),a="selection"):(t.model.position=i,Rn(t.model)?a="all":a="selection");t.style={},e.detail===3||io>2?(y(e),(e.detail===3||io===3)&&(t.model.selection={ranges:[[0,t.model.lastOffset]]},a="all")):o||(o=!0,"PointerEvent"in window?(Xr(m,"pointermove",b),Xr(m,"pointerup pointercancel",y),e instanceof PointerEvent&&m.setPointerCapture(e.pointerId)):(Xr(window,"blur",y),Xr(window,"mousemove",b),Xr(window,"mouseup",y)),(e.detail===2||io===2)&&(n=!0,la(t.model),a="all"))}}else Rr=null;t.stopCoalescingUndo(),a!=="none"&&(t.model.selectionIsCollapsed&&(a="all"),re(t)),e.preventDefault()}function Xu(t,e,r){if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)return 0;let i=t-(r.left+r.right)/2,o=e-(r.top+r.bottom)/2;return i*i+o*o}function ml(t,e,r,i,o){if(!r.id)return[1/0,null];if(e.has(r.id))return e.get(r.id);let n=er(t,r);if(!n)return[1/0,null];let a=[1/0,null];if(r.hasChildren&&!r.captureSelection&&i>=n.left&&i<=n.right)for(let s of r.children){let l=ml(t,e,s,i,o);l[0]<=a[0]&&(a=l)}return a[1]||(a=[Xu(i,o,n),r]),e.set(r.id,a),a}function Zu(t,e,r){let[,i]=ml(t,new Map,t.model.root,e,r);return i}function Fr(t,e,r,i){var c,u;let o=(c=t.fieldContent)==null?void 0:c.getBoundingClientRect();if(!o)return 0;if(e>o.right||r>o.bottom+8)return t.model.lastOffset;if(e<o.left||r<o.top-8)return 0;i=i!=null?i:{},i.bias=(u=i.bias)!=null?u:0;let n=Zu(t,e,r),a=[],s=n;for(;s;)a.unshift(s),s=s.parent;for(let d of a)if(d.captureSelection){n=d;break}let l=t.model.offsetOf(n);if(l<0)return-1;if(n.leftSibling)if(i.bias===0&&n.type!=="placeholder"){let d=er(t,n);d&&e<(d.left+d.right)/2&&(l=t.model.offsetOf(n.leftSibling))}else i.bias<0&&(l=t.model.offsetOf(n.leftSibling));return l}var ua=class extends Q{constructor(){super("text")}onPaste(e,r){if(!r)return!1;let i=typeof r=="string"?r:r.getData("text/plain");return i&&H(e.model,{inputType:"insertFromPaste",data:i})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i)&&(q(e.model,{inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),re(e)),e.startRecording(),!0):!1}insert(e,r,i={}){if(!H(e,{data:r,inputType:"insertText"}))return!1;i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto");let{silenceNotifications:o}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let n=e.silenceNotifications;e.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(xe(e.selection)):i.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward");let a=Yu(r,e.mathfield.context);if(Kt(a,i.style),!a)return!1;let s=e.at(e.position),l=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=n,i.selectionMode==="before"||(i.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),q(e,{data:r,inputType:"insertText"}),e.silenceNotifications=o,!0}};function Yu(t,e){return t=t.replace(/\\/g,"\\textbackslash "),t=t.replace(/#/g,"\\#"),t=t.replace(/\$/g,"\\$"),t=t.replace(/%/g,"\\%"),t=t.replace(/&/g,"\\&"),t=t.replace(/_/g,"\\_"),t=t.replace(/{/g,"\\textbraceleft "),t=t.replace(/}/g,"\\textbraceright "),t=t.replace(/\^/g,"\\textasciicircum "),t=t.replace(/~/g,"\\textasciitilde "),t=t.replace(/£/g,"\\textsterling "),le(t,{context:e,parseMode:"text"})}new ua;var pl=`#mathlive-environment-popover.is-visible {
visibility: visible;
}
#mathlive-environment-popover {
--private-panel-height: var(--environment-panel-height, 70px);
position: absolute;
width: calc(var(--private-panel-height) * 2);
height: var(--private-panel-height);
border-radius: 4px;
border: 1.5px solid var(--keyboard-accent-color, #0c75d8);
background-color: var(--variant-panel-background, #fff);
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
pointer-events: all;
visibility: hidden;
}
#mathlive-environment-popover .MLEP__array-buttons {
height: calc(var(--private-panel-height) * 5/4);
width: calc(var(--private-panel-height) * 5/4);
margin-left: calc(0px - var(--private-panel-height) * 0.16);
margin-top: calc(0px - var(--private-panel-height) * 0.19);
}
#mathlive-environment-popover .MLEP__array-buttons .font {
fill: white;
}
#mathlive-environment-popover .MLEP__array-buttons circle {
fill: #7f7f7f;
transition: fill 300ms;
}
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
fill-opacity: 1;
fill: var(--variant-panel-background, #fff);
stroke: var(--keyboard-accent-color, #0c75d8);
stroke-width: 3px;
}
#mathlive-environment-popover .MLEP__array-buttons line {
stroke: var(--keyboard-accent-color, #0c75d8);
stroke-opacity: 0;
stroke-width: 40;
pointer-events: none;
transition: stroke-opacity 300ms;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
fill: var(--keyboard-accent-color, #0c75d8);
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
stroke-opacity: 1;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
height: 100%;
width: 50%;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
width: var(--private-panel-height);
height: var(--private-panel-height);
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: space-around;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
pointer-events: all;
margin-top: 2px;
width: calc(var(--private-panel-height) / 3 * 28 / 24);
height: calc(var(--private-panel-height) / 3 - 2px);
border-radius: calc(var(--private-panel-height) / 25);
background-color: var(--keycap-background, white);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
background-color: var(--keycap-background-hover, #f5f5f7);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
stroke: var(--keycap-text, #e3e4e8);
stroke-width: 2;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
fill-opacity: 0;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
pointer-events: none;
background-color: var(--keycap-background-active, #f5f5f7);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
stroke: var(--keyboard-accent-color, #0c75d8);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
fill: var(--keyboard-accent-color, #0c75d8);
}
`;var ie=4,Fe=20,pe=2*(Fe+ie),Go=(t,e)=>`
<line x1="${t+Fe}" y1="${e+Fe}"
x2="${t>e?t+Fe:7*Fe+10*ie}"
y2="${t<e?e+Fe:7*Fe+10*ie}"/>
<svg id="plus" viewBox="0 0 40 40" x="${t}" y="${e}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
</svg>`,hl=(t,e)=>`
<line x1="${t+Fe}" y1="${e+Fe}"
x2="${t>e?t+Fe:7*Fe+10*ie}"
y2="${t<e?e+Fe:7*Fe+10*ie}"/>
<svg id="minus" viewBox="0 0 40 40" x="${t}" y="${e}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
</svg>`,Xo=(t,e,r)=>`
<svg id="arrow" viewBox="0 0 40 40" x="${t}" y="${e}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<g transform="rotate(${r})" transform-origin="20 20">
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
</g>
</svg>`,ed=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*Fe+10*ie+5} ${8*Fe+10*ie+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${pe+ie}"
height="${3*pe}"
width="${pe}"
rx="${pe/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${pe+ie}"
y="0"
height="${pe}"
width="${3*pe}"
rx="${pe/2}"/>
<g data-command='"moveDown"'>
${Xo(2*(ie+pe),2*ie+3*pe,0)}
</g>
<g data-command='"moveUp"'>
${Xo(2*(ie+pe),2*ie+pe,180)}
</g>
<g data-command='"moveToNextWord"'>
${Xo(2*ie+3*pe,2*(ie+pe),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${Xo(2*ie+pe,2*(ie+pe),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Go(2*ie+pe,ie)}
</g>
<g data-command='"removeColumn"'>
${hl(2*ie+2*pe,ie)}
</g>
<g data-command='"addColumnAfter"'>
${Go(2*ie+3*pe,ie)}
</g>
<g data-command='"addRowBefore"'>
${Go(ie,2*ie+pe)}
</g>
<g data-command='"removeRow"'>
${hl(ie,2*ie+2*pe)}
</g>
<g data-command='"addRowAfter"'>
${Go(ie,2*ie+3*pe)}
</g>
</svg>`,td=t=>`
<svg id="matrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","matrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,rd=t=>`
<svg id="pmatrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","pmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,fl=t=>`
<svg id="Bmatrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","Bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,id=t=>`
<svg id="bmatrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4h-3v16h3"/>
<path class="cls-2" d="m22,4h3v16h-3"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,od=t=>`
<svg id="vmatrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
</svg>`,nd=t=>`
<svg id="Vmatrix" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
data-command='["setEnvironment","Vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
</svg>`,ad=t=>`
<svg id="cases" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","cases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<circle cx="13" cy="8" r="1"/>
<circle cx="13" cy="16" r="1"/>
<circle cx="21" cy="8" r="1"/>
<circle cx="21" cy="16" r="1"/>
</svg>`,sd=t=>`
<svg id="rcases" class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","rcases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
<circle cx="15" cy="8" r="1"/>
<circle cx="15" cy="16" r="1"/>
<circle cx="7" cy="8" r="1"/>
<circle cx="7" cy="16" r="1"/>
</svg>`,da={matrix:td,pmatrix:rd,bmatrix:id,Bmatrix:fl,vmatrix:od,Vmatrix:nd},ma={cases:ad,rcases:sd,Bmatrix:fl};function ld(t){var m,b;let e=(m=t.model.parentEnvironment)==null?void 0:m.array;if(!e)return;let r=0;e.forEach(M=>{(!r||M.length>r)&&(r=M.length)});let i=document.getElementById("mathlive-environment-popover");i||(i=Mr("mathlive-environment-popover"),qe("mathlive-environment-popover-stylesheet",pl),qe("mathlive-core-stylesheet",nt),i.setAttribute("aria-hidden","true"));let o,n=i.querySelector(".MLEP__environment-controls");n?o=n:(o=document.createElement("div"),i.innerHTML="",i.appendChild(o)),o.className="MLEP__environment-controls",o.style.display="flex",o.style.width="100%",o.style.height="100%",o.style.boxSizing="border-box",o.innerHTML=ed;let a=[],s="",l=t.model.parentEnvironment.environmentName;if(Lo(l)){let M=cd(l);s=da[M]("active");let h=da,{[M]:k}=h,w=Ir(h,[an(M)]);a=Object.values(w).map(L=>L("inactive"))}else if(cs(l)){let M=ud(l);s=ma[M]("active");let y=ma,{[M]:k}=y,w=Ir(y,[an(M)]);a=Object.values(w).map(L=>L("inactive"))}else us(l)&&(s=da.matrix("active"),a=Object.values(ma).map(M=>M("inactive")));let c=document.createElement("div");c.className="MLEP__environment-delimiter-controls",c.style.display="flex",c.style.flexDirection="column",c.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${s}
${a.join("")}
</div>`,s&&o.appendChild(c),o.querySelectorAll("[data-command]").forEach(M=>{let k=M.dataset.command,w=k;try{w=JSON.parse(k)}catch(L){}M.addEventListener("mousedown",L=>L.preventDefault()),w&&M.addEventListener("click",()=>t.executeCommand(w))});let d=(b=t.field)==null?void 0:b.getBoundingClientRect();d&&(i.style.top=`${d.top-i.clientHeight-15}px`,i.style.left=`${d.left+20}px`,i.classList.add("is-visible"))}function Zo(){let t=document.getElementById("mathlive-environment-popover");t==null||t.classList.remove("is-visible")}function gl(){ai("mathlive-environment-popover"),rt("mathlive-environment-popover-stylesheet"),rt("mathlive-core-stylesheet")}function oo(t){if(!t.hasFocus())return;let e=!1;if(t.model.mode==="math"&&window.mathVirtualKeyboard.visible){let r=t.model.parentEnvironment;e=!!(r!=null&&r.array)&&ls(r.environmentName)}e?ld(t):Zo()}function cd(t){return t.replace("*","")}function ud(t){return t==="dcases"?"cases":t}var dd='<svg style="width: 21px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>',Yo=class{constructor(e,r){this.focusBlurInProgress=!1;var s,l,c;this.options=g(T(g({},mi()),{macros:jr(),registers:go()}),di(r)),this.eventController=new AbortController,r.eventSink&&(this.host=r.eventSink),this.element=e,e.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.style={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let i=(l=(s=r.value)!=null?s:this.element.textContent)!=null?l:"";i=i.trim();let o=Wn(this.options),n=new f({type:"root",mode:o,body:le(i,{context:this.context})});this.model=new Zi(this,o,n,{onSelectionDidChange:()=>this.onSelectionDidChange(),onContentWillChange:u=>this.onContentWillChange(u)}),this.smartModeSuppressed=!1,this.undoManager=new to(this.model);let a=[];if(a.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),a.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),a.push("<span part=content class=ML__content>"),a.push(In(this)),a.push("</span>"),a.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'}data-ML__tooltip="${mt("tooltip.toggle virtual keyboard")}">`),a.push(dd),a.push("</div>"),a.push("</span>"),a.push("<span class=ML__sr-only>"),a.push("<span role=status aria-live=assertive aria-atomic=true></span>"),a.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(a.join("")),!this.element.children){console.error("%cMathLive 0.93.0: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",u=>u.stopImmediatePropagation(),{capture:!1,signal:this.eventController.signal}),this.field.addEventListener("wheel",this,{passive:!1,signal:this.eventController.signal}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:this.eventController.signal}):this.field.addEventListener("mousedown",this,{signal:this.eventController.signal}),(c=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||c.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Pt(this)))},{signal:this.eventController.signal}),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Zs(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:this.eventController.signal}),document.addEventListener("scroll",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this),kr&&!Z.locale.startsWith(kr.locale)&&vs(Z.locale),Re!=="ready"&&document.fonts.ready.then(()=>Vi(this)),e.querySelector(".ML__container").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(this)),oo(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Zo())}get colorMap(){return e=>{var r,i,o;return(o=(i=(r=this.options).colorMap)==null?void 0:i.call(r,e))!=null?o:fr(e)}}get backgroundColorMap(){return e=>{var r,i,o,n,a,s;return(s=(a=(i=(r=this.options).backgroundColorMap)==null?void 0:i.call(r,e))!=null?a:(n=(o=this.options).colorMap)==null?void 0:n.call(o,e))!=null?s:Vr(e)}}get smartFence(){var e;return(e=this.options.smartFence)!=null?e:!1}get readOnly(){var e;return(e=this.options.readOnly)!=null?e:!1}get disabled(){var e,r;return(r=(e=this.host)==null?void 0:e.disabled)!=null?r:!1}get contentEditable(){var e;return((e=this.host)==null?void 0:e.getAttribute("contenteditable"))!=="false"}get userSelect(){if(!this.host)return"";let e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(e=>e.type==="prompt"&&!e.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;let e=this.model.at(this.model.anchor),r=this.model.at(this.model.position),i=f.commonAncestor(e,r);return!!((i==null?void 0:i.type)==="prompt"||i!=null&&i.parentPrompt)}get letterShapeStyle(){var e;return(e=this.options.letterShapeStyle)!=null?e:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed){let i=this.model.at(this.model.selection.ranges[0][0]),o=this.adoptStyle==="right"?i.rightSibling:i;if(!o)return{};if(o.type==="group"){let n=o.branch("body");return!n||n.length<2?{}:this.adoptStyle==="right"?n[1].style:n[n.length-1].style}return o.style}let e=this.model.getAtoms(this.model.selection);if(e.length===0)return{};let r=g({},e[0].style);return e.forEach(i=>{for(let[o,n]of Object.entries(i.style))(!r[o]||r[o]!==n)&&(r[o]=void 0)}),r}get keybindings(){var i,o;if(this._keybindings)return this._keybindings;let[e,r]=Ms(this.options.keybindings,(i=cr())!=null?i:Dn);return((o=cr())==null?void 0:o.score)>0&&(this._keybindings=e,r.length>0&&console.error("MathLive 0.93.0: Invalid keybindings for current keyboard layout",r)),e}setOptions(e){this.options=g(g({},this.options),di(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");let r=f.serialize(this.model.root,{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==r)&&Q.insert(this.model,r,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in e||"macros"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"readOnly"in e||"placeholderSymbol"in e)&&re(this)}getOptions(e){return Vt(this.options,e)}getOption(e){return Vt(this.options,e)}handleEvent(e){var r;if(Rt(this)){if(qi(e)){if(!Yr(e.origin,(r=this.options.originValidator)!=null?r:"none"))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");let{action:i}=e.data;if(i==="execute-command"){let o=e.data.command;if(dr(o)==="virtual-keyboard")return;this.executeCommand(o)}else i==="update-state"||(i==="focus"?this.focus({preventScroll:!0}):i==="blur"&&this.blur());return}switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":ca(this,e);break;case"pointerdown":ca(this,e);break;case"virtual-keyboard-toggle":this.hasFocus()&&oo(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rt(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rt(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}}dispose(){if(!Rt(this))return;this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();let e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.fieldContent=void 0,this.ariaLiveText=void 0,al(),Cs(),gl()}flushInlineShortcutBuffer(e){if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(e){return dr(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Pt(this))),!1):Ds(this,e)}get errors(){return Po(this.model.getValue(),{context:this.context})}getValue(e,r,i){return this.model.getValue(e,r,i)}setValue(e,r){var i;r=r!=null?r:{mode:"math"},r.insertionMode===void 0&&(r.insertionMode="replaceAll"),(r.format===void 0||r.format==="auto")&&(r.format="latex"),(r.mode===void 0||r.mode==="auto")&&(r.mode=(i=qo(this.model,this.model.position))!=null?i:"math"),Q.insert(this.model,e,r)&&(re(this),this.undoManager.snapshot("set-value"))}get expression(){let e=window.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue())):(console.error("MathLive 0.93.0: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var i;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){let o=window.mathVirtualKeyboard.boundingRect,n=this.host.getBoundingClientRect();n.bottom>o.top&&((i=window.document.scrollingElement)==null||i.scrollBy(0,n.bottom-o.top+8))}}this.dirty&&bt(this,{interactive:!0});let e=this.field.getBoundingClientRect(),r=null;if(this.model.selectionIsCollapsed)r=Zr(this.field);else{let o=_o(this);if(o.length>0){let n=-1/0,a=-1/0;for(let s of o)s.right>n&&(n=s.right),s.top<a&&(a=s.top);r={x:n+e.left-this.field.scrollLeft,y:a+e.top-this.field.scrollTop,height:0}}}if(this.host&&r){let o=this.host.getBoundingClientRect(),n=r.y,a=this.host.scrollTop;n<o.top?a=n-o.top+this.host.scrollTop:n>o.bottom&&(a=n-o.bottom+this.host.scrollTop+r.height),this.host.scroll({top:a,left:0})}if(r){let o=r.x-window.scrollX,n=this.field.scrollLeft;o<e.left?n=o-e.left+this.field.scrollLeft-20:o>e.right&&(n=o-e.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:n})}}insert(e,r){if(typeof e!="string"||e.length===0&&((r==null?void 0:r.insertionMode)==="insertBefore"||(r==null?void 0:r.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed)return!1;if(this.flushInlineShortcutBuffer(),r=r!=null?r:{mode:"math"},r.focus&&this.focus(),r.feedback&&(window.MathfieldElement.keypressVibration&&lo()&&navigator.vibrate(Vn),window.MathfieldElement.playSound("keypress")),r.scrollIntoView&&this.scrollIntoView(),e==="\\\\")Qn(this.model);else if(e==="&")ea(this.model);else{let i=this.style;Q.insert(this.model,e,g({style:this.model.at(this.model.position).computedStyle},r)),r.resetStyle&&(this.style=i)}return this.snapshot(`insert-${this.model.at(this.model.position).type}`),re(this),!0}switchMode(e,r="",i=""){var a;if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled||!((a=this.host)!=null&&a.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))))return;let o=this.model.mode,{model:n}=this;n.deferNotifications({content:!!i||!!r,selection:!0,type:"insertText"},()=>{let s=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),this.smartModeSuppressed=/text|math/.test(this.model.mode)&&/text|math/.test(e),r&&e!=="latex"){let l=le(r,{context:this.context,parseMode:e});n.collapseSelection("forward");let c=n.at(n.position);n.position=n.offsetOf(c.parent.addChildrenAfter(l,c)),s=!0}if(this.model.mode=e,e==="latex"){let l=n.selectionIsCollapsed;ur(this,"accept");let c,u=n.at(n.position);if(l)c="\\";else{let m=xe(n.selection);c=this.model.getValue(m,"latex");let h=this.model.extractAtoms(m);h.length===1&&h[0].type==="placeholder"&&(c=r,l=!0),u=n.at(m[0])}let d=new We(c);u.parent.addChildAfter(d,u),l?n.position=n.offsetOf(d.lastChild):n.setSelection(n.offsetOf(d.firstChild),n.offsetOf(d.lastChild))}else Sr(n).forEach(l=>{l.isError=!1});if(i){let l=le(i,{context:this.context,parseMode:o});n.collapseSelection("forward");let c=n.at(n.position);n.position=n.offsetOf(c.parent.addChildrenAfter(l,c)),s=!0}return re(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),s}),this.model.mode=e}hasFocus(){return!this.blurred}focus(e){this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.model.announce("line")),e!=null&&e.preventScroll||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]}}applyStyle(e,r={}){var a,s;let i={operation:"set",silenceNotifications:!1};Tr(r)?i.range=r:(i.range=r.range,i.silenceNotifications=(a=r.silenceNotifications)!=null?a:!1);let o=sa(this,e),n=(s=i.operation)!=null?s:"set";this.model.deferNotifications({content:!i.silenceNotifications,type:"insertText"},()=>{if(i.range===void 0)for(let l of this.model.selection.ranges)Qi(this.model,l,o,{operation:n});else Qi(this.model,i.range,o,{operation:n})}),re(this)}getCaretPoint(){let e=Zr(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,r){let i=Fr(this,e,r,{bias:0});if(i<0)return!1;let o=this.model.position;return this.model.position=i,this.model.announce("move",o),re(this),!0}getPrompt(e){let r=this.model.findAtom(i=>i.type==="prompt"&&i.placeholderId===e);return r}getPromptValue(e,r){let i=this.getPrompt(e);if(!i)return console.error(`MathLive 0.93.0: unknown prompt ${e}`),"";let o=this.model.offsetOf(i.firstChild),n=this.model.offsetOf(i.lastChild);return this.model.getValue(o,n,r)}getPrompts(e){return this.model.getAllAtoms().filter(r=>r.type!=="prompt"?!1:e?!(e.id&&r.placeholderId!==e.id||e.locked&&r.locked!==e.locked||e.correctness==="undefined"&&r.correctness||e.correctness&&r.correctness!==e.correctness):!0).map(r=>r.placeholderId)}setPromptValue(e,r,i){if(r!==void 0){let o=this.getPrompt(e);if(!o){console.error(`MathLive 0.93.0: unknown prompt ${e}`);return}let n=this.model.getBranchRange(this.model.offsetOf(o),"body");this.model.setSelection(n),this.insert(r,T(g({},i),{insertionMode:"replaceSelection"}))}i!=null&&i.silenceNotifications&&(this.valueOnFocus=this.getValue()),re(this)}setPromptState(e,r,i){let o=this.getPrompt(e);if(!o){console.error(`MathLive 0.93.0: unknown prompt ${e}`);return}r==="undefined"?o.correctness=void 0:typeof r=="string"&&(o.correctness=r),typeof i=="boolean"&&(o.locked=i,o.captureSelection=i),re(this)}stripPromptContent(e){let r=this.model.getAllAtoms().filter(o=>o.type!=="prompt"?!1:e?!(e.id&&o.placeholderId!==e.id||e.locked&&o.locked!==e.locked||e.correctness==="undefined"&&o.correctness||e.correctness&&o.correctness!==e.correctness):!0),i={};return r.forEach(o=>{let n=o.placeholderId;i[n]=this.getPromptValue(n),this.setPromptValue(n,"")}),i}getPromptState(e){let r=this.getPrompt(e);return r?[r.correctness,r.locked]:(console.error(`MathLive 0.93.0: unknown prompt ${e}`),[void 0,!0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(e){var r;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(this)),(r=this.host)==null||r.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var e;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var e;(e=this.undoManager)==null||e.reset()}onSelectionDidChange(){var r,i;let e=this.model;this.keyboardDelegate.setValue(e.getValue(this.model.selection,"latex-expanded"));{let o=e.at(e.position),n=(r=o.mode)!=null?r:Wn(this.options);this.model.mode!==n&&(this.model.mode==="latex"?(ur(this,"accept",{mode:n}),e.position=e.offsetOf(o)):this.switchMode(n))}(i=this.host)==null||i.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Pt(this)),oo(this)}onContentWillChange(e){var r,i,o;return(o=(i=this.host)==null?void 0:i.dispatchEvent(new InputEvent("beforeinput",T(g({},e),{data:e.data?e.data:(r=e.inputType)!=null?r:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?o:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),bt(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var i,o,n;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",ur(this,"accept"),this.model.getValue()!==this.valueOnFocus&&((i=this.host)==null||i.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(o=this.host)==null||o.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(n=this.host)==null||n.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),re(this),this.focusBlurInProgress=!1,Zo();let e=new AbortController,r=e.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Rt(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0})},{once:!0,signal:r}),setTimeout(()=>e.abort(),100)}onInput(e){ro(this,e)}onKeystroke(e,r){return na(this,e,r)}onCompositionStart(e){this.model.deleteAtoms(xe(this.model.selection));let r=Zr(this.field);r&&requestAnimationFrame(()=>{bt(this),this.keyboardDelegate.moveTo(r.x,r.y-r.height)})}onCompositionUpdate(e){js(this.model,e),re(this)}onCompositionEnd(e){Gs(this.model),ro(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}H(this.model,{inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Q.onCopy(this,e),st(this.model,xe(this.model.selection),"deleteByCut"),this.snapshot("cut"),re(this))}onCopy(e){Q.onCopy(this,e)}onPaste(e){let r=this.isSelectionEditable;return r&&(r=Q.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),r||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),r}onGeometryChange(){si(this),oo(this)}onWheel(e){let r=5*e.deltaX;if(!Number.isFinite(r)||r===0)return;let i=this.field;r<0&&i.scrollLeft===0||r>0&&i.offsetWidth+i.scrollLeft>=i.scrollWidth||(i.scrollBy({top:0,left:r}),e.preventDefault(),e.stopPropagation())}getHTMLElement(e){var i;let r=e;for(;!r.id&&r.hasChildren;)r=e.children[0];if(r.id)return(i=this.fieldContent)==null?void 0:i.querySelector(`[data-atom-id="${r.id}"]`);throw new TypeError("Could not get an ID from atom")}get context(){var e,r;return{registers:(e=this.options.registers)!=null?e:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(r=this.options.placeholderSymbol)!=null?r:"\u25A2",colorMap:i=>this.colorMap(i),backgroundColorMap:i=>this.backgroundColorMap(i),getMacro:i=>yo(i,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function tn(t,e,r){if(t.at(e).mode!=="text")return e;let i=r==="backward"?-1:1,o;if(Qt.test(t.at(e).value)){let n=e,a;do a=t.at(n).mode==="text"&&Qt.test(t.at(n).value),n+=i;while(t.at(n)&&a);o=t.at(n)?n-2*i:n-i}else if(/\s/.test(t.at(e).value)){let n=e;for(;t.at(n)&&t.at(n).mode==="text"&&/\s/.test(t.at(n).value);)n+=i;if(!t.at(n))o=n-i;else{let a=!0;do a=t.at(n).mode==="text"&&!/\s/.test(t.at(n).value),n+=i;while(t.at(n)&&a);o=t.at(n)?n-2*i:n-i}}else{let n=e;for(;t.at(n)&&t.at(n).mode==="text"&&!/\s/.test(t.at(n).value);)n+=i;o=t.at(n)?n:n-i;let a=!0;for(;t.at(n)&&a;)a=t.at(n).mode==="text"&&/\s/.test(t.at(n).value),a&&(o=n),n+=i;o=t.at(n)?n-2*i:n-i}return o-(i>0?0:1)}function mr(t,e,r){var a,s,l,c,u,d,m;let i=t.position;(a=r==null?void 0:r.extend)!=null&&a||t.collapseSelection(e);let o=t.at(t.position);if(e==="forward"&&(o.type==="subsup"?(o=o.rightSibling,o||(o=t.at(t.position+1))):o=t.at(t.position+1)),!o)return t.announce("plonk"),!1;let n=t.offsetOf(o);if(o instanceof $e)n=tn(t,n,e);else if(o instanceof te)if(o.isSuggestion)for(;o&&o instanceof te;)o.isSuggestion=!1,n=t.offsetOf(o),o=o.rightSibling;else if(e==="forward"){if(o=o.rightSibling,!o||!(o instanceof te))return t.announce("plonk"),!1;for(;o&&o instanceof te&&/[a-zA-Z\*]/.test(o.value);)n=t.offsetOf(o),o=o.rightSibling}else{if(o=o.leftSibling,!o||!(o instanceof te))return t.announce("plonk"),!1;for(;o&&o instanceof te&&/[a-zA-Z\*]/.test(o.value);)n=t.offsetOf(o),o=o.leftSibling}else if(e==="forward"&&o.type==="mopen"){let h=0;do o.type==="mopen"?h+=1:o.type==="mclose"&&(h-=1),o=o.rightSibling;while(!o.isLastSibling&&h!==0);n=t.offsetOf(o.leftSibling)}else if(e==="backward"&&o.type==="mclose"){let h=0;do o.type==="mopen"?h+=1:o.type==="mclose"&&(h-=1),o=o.leftSibling;while(!o.isFirstSibling&&h!==0);n=t.offsetOf(o)}else if(e==="backward")if(o.type==="first")for(;n>0&&o.type==="first";)n-=1,o=t.at(n);else{let h=o.type;o.type==="subsup"&&(n=t.offsetOf(t.at(n).leftSibling)),n-=1;let y=(s=t.at(n))==null?void 0:s.type;for(;n>=0&&y===h;)((l=t.at(n))==null?void 0:l.type)==="subsup"?n=t.offsetOf(t.at(n).leftSibling):n-=1,y=t.at(n).type}else{let{type:h}=o,y=(c=t.at(n))==null?void 0:c.type,{lastOffset:b}=t;for(;n<=b&&(y===h||y==="subsup");){for(;((u=t.at(n).rightSibling)==null?void 0:u.type)==="subsup";)n=t.offsetOf(t.at(n).rightSibling);n+=1,y=(d=t.at(n))==null?void 0:d.type}n-=1}if((m=r==null?void 0:r.extend)!=null&&m){if(!t.setSelection(t.anchor,n))return t.announce("plonk"),!1}else{if(n===t.position)return t.announce("plonk"),!1;t.position=n}return t.announce("move",i),t.mathfield.stopCoalescingUndo(),!0}function lt(t,e,r){var n,a;if(r=r!=null?r:{extend:!1},t.mathfield.adoptStyle=e==="backward"?"right":"left",e!=="forward"){let[s,l]=Do(t);s!==void 0&&l!==void 0&&t.deleteAtoms([s,l])}if(e==="upward")return pd(t,r);if(e==="downward")return hd(t,r);if(r.extend){let s=Qo(t,t.position,e);s<0&&(s=0),s>t.lastOffset&&(s=t.lastOffset);let l=t.setSelection(t.anchor,s);return t.mathfield.stopCoalescingUndo(),l}if(t.selectionIsPlaceholder){t.collapseSelection(e);let s=lt(t,e);return t.mathfield.stopCoalescingUndo(),s}let i=t.position,o=i;if(t.collapseSelection(e)?(i=t.position,yl(t,i)||(i=Qo(t,i,e))):i=Qo(t,i,e),i<0||i>t.lastOffset){let s=!0;return t.silenceNotifications||(s=(a=(n=t.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:e},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0),s&&t.announce("plonk"),s}return t.setPositionHandlingPlaceholder(i),t.mathfield.stopCoalescingUndo(),t.announce("move",o),!0}function Qo(t,e,r){return e=e+(r==="forward"?1:-1),e<0||e>t.lastOffset||yl(t,e)?e:Qo(t,e,r)}function yl(t,e){var o;let r=t.at(e),i=r.parent;for(;i&&!i.inCaptureSelection;)i=i.parent;return!(i!=null&&i.inCaptureSelection||(o=r.parent)!=null&&o.skipBoundary&&(!r.isFirstSibling&&r.isLastSibling||r.type==="first")||t.mathfield.hasEditablePrompts&&!r.parentPrompt)}function md(t,e,r){let i=1/0,o=0;for(;o<e.length;o++){let n=Ln(t.getHTMLElement(e[o])).right,a=Math.abs(r-n);if(a<=i)i=a;else break}return e[o-1]}function en(t,e,r,i,o){let n=t.mathfield.hasEditablePrompts,a=n?r.filter(c=>c.type==="prompt"&&!c.captureSelection):r,s=Ln(t.mathfield.getHTMLElement(e)).right,l=t.offsetOf(md(t.mathfield,a,s))-(n?1:0);if(i){let[c,u]=t.selection.ranges[0],d;l<(o==="up"?c:u)?d={ranges:[[l,u]],direction:"backward"}:d={ranges:[[c,l]],direction:"forward"},t.setSelection(d)}else t.setPositionHandlingPlaceholder(l);t.announce(`move ${o}`)}function pd(t,e){var a,s;let r=(a=e==null?void 0:e.extend)!=null?a:!1;r||t.collapseSelection("backward");let i=()=>{var c,u;let l=!0;return t.silenceNotifications||(l=(u=(c=t.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),t.announce(l?"plonk":"line"),l},o=t.at(t.position),n=o;for(;n&&n.parentBranch!=="below"&&!(Array.isArray(n.parentBranch)&&n.parent instanceof I);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&n.parent instanceof I){let l=n.parent;if(n.parentBranch[0]<1)return i();let c=n.parentBranch[0]-1,u=l.array[c][n.parentBranch[1]];if(!u.some(m=>m.type==="prompt"&&!m.captureSelection)&&t.mathfield.hasEditablePrompts)return i();en(t,o,u,r,"up")}else if(n){let l=(s=n.parent.branch("above"))!=null?s:n.parent.createBranch("above");if(!l.some(u=>u.type==="prompt"&&u.placeholderId)&&t.mathfield.hasEditablePrompts)return i();en(t,o,l,r,"up")}else return i();return t.mathfield.stopCoalescingUndo(),!0}function hd(t,e){var a,s;let r=(a=e==null?void 0:e.extend)!=null?a:!1;r||t.collapseSelection("forward");let i=()=>{var c,u;let l=!0;return t.silenceNotifications||(l=(u=(c=t.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),t.announce(l?"plonk":"line"),l},o=t.at(t.position),n=o;for(;n&&n.parentBranch!=="above"&&!(Array.isArray(n.parentBranch)&&n.parent instanceof I);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&n.parent instanceof I){let l=n.parent;if(n.parentBranch[0]+1>l.array.length-1)return i();let c=n.parentBranch[0]+1,u=l.array[c][n.parentBranch[1]];if(!u.some(m=>m.type==="prompt"&&!m.captureSelection)&&t.mathfield.hasEditablePrompts)return i();en(t,o,u,r,"down")}else if(n){let l=(s=n.parent.branch("below"))!=null?s:n.parent.createBranch("below");if(!l.some(u=>u.type==="prompt")&&t.mathfield.hasEditablePrompts)return i();en(t,o,l,r,"down")}else return i();return!0}me({deleteAll:t=>H(t,{inputType:"deleteContent"})&&st(t,[0,-1],"deleteContent"),deleteForward:t=>Us(t),deleteBackward:t=>Ws(t),deleteNextWord:t=>H(t,{inputType:"deleteWordForward"})&&st(t,[t.anchor,tn(t,t.position,"forward")],"deleteWordForward"),deletePreviousWord:t=>H(t,{inputType:"deleteWordBackward"})&&st(t,[t.anchor,tn(t,t.position,"backward")],"deleteWordBackward"),deleteToGroupStart:t=>H(t,{inputType:"deleteSoftLineBackward"})&&st(t,[t.anchor,t.offsetOf(t.at(t.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:t=>H(t,{inputType:"deleteSoftLineForward"})&&st(t,[t.anchor,t.offsetOf(t.at(t.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:t=>H(t,{inputType:"deleteHardLineBackward"})&&st(t,[t.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:t=>H(t,{inputType:"deleteHardLineForward"})&&st(t,[t.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});function bl(t){if(t&&(t.classList.remove("ML__highlight"),t.children))for(let e of t.children)bl(e)}function pa(t,e){var r;t&&(!e||((r=t.dataset)==null?void 0:r.atomId)===e?(t.classList.add("ML__highlight"),t.children&&t.children.length>0&&[...t.children].forEach(i=>{i instanceof HTMLElement&&pa(i)})):(t.classList.remove("ML__highlight"),t.children&&t.children.length>0&&[...t.children].forEach(i=>{i instanceof HTMLElement&&pa(i,e)})))}function xl(t,e){var o;if(!fe())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.93.0: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(e);return}if(!window.AWS){console.error("MathLive 0.93.0: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}let r=new window.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"json",VoiceId:(o=window.MathfieldElement.speechEngineVoice)!=null?o:"Joanna",Engine:"standard",Text:e,TextType:"ssml",SpeechMarkTypes:["ssml"]};vt().readAloudElement=t,r.synthesizeSpeech(i,(n,a)=>{if(n){console.trace(`MathLive 0.93.0: \`polly.synthesizeSpeech()\` error: ${n}`);return}if(!(a!=null&&a.AudioStream))return;let s=new TextDecoder("utf-8").decode(new Uint8Array(a.AudioStream));vt().readAloudMarks=s.split(`
`).map(l=>l?JSON.parse(l):{}),vt().readAloudTokens=[];for(let l of vt().readAloudMarks)l.value&&vt().readAloudTokens.push(l.value);vt().readAloudCurrentMark="",i.OutputFormat="mp3",i.SpeechMarkTypes=[],r.synthesizeSpeech(i,(l,c)=>{if(l){console.trace(`MathLive 0.93.0: \`polly.synthesizeSpeech("${e}") error:${l}`);return}if(!(c!=null&&c.AudioStream))return;let u=new Uint8Array(c.AudioStream),d=new Blob([u.buffer],{type:"audio/mpeg"}),m=URL.createObjectURL(d),h=vt();h.readAloudAudio?h.readAloudAudio.pause():(h.readAloudAudio=new Audio,h.readAloudAudio.addEventListener("ended",()=>{let y=h.readAloudMathField;h.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),y?(bt(y),h.readAloudElement=null,h.readAloudMathField=null,h.readAloudTokens=[],h.readAloudMarks=[],h.readAloudCurrentMark=""):bl(h.readAloudElement)}),h.readAloudAudio.addEventListener("timeupdate",()=>{let y="",b=h.readAloudAudio.currentTime*1e3+100;for(let M of h.readAloudMarks)M.time<b&&(y=M.value);h.readAloudCurrentMark!==y&&(h.readAloudCurrentToken=y,y&&y===h.readAloudFinalToken?h.readAloudAudio.pause():(h.readAloudCurrentMark=y,pa(h.readAloudElement,h.readAloudCurrentMark)))})),h.readAloudAudio.src=m,h.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),h.readAloudAudio.play()})})}var vl=`@keyframes ML__caret-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.ML__caret:after {
content: '';
border: none;
border-radius: 2px;
border-right: 2px solid var(--caret-color, var(--ML__caret-color));
margin-right: -2px;
position: relative;
left: -1px;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__text-caret:after {
content: '';
border: none;
border-radius: 1px;
border-right: 1px solid var(--caret-color, var(--ML__caret-color));
margin-right: -1px;
position: relative;
left: 0;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__latex-caret:after {
content: '_';
border: none;
margin-right: 0;
margin-right: calc(-1ex - 2px);
position: relative;
color: var(--caret-color, var(--ML__caret-color));
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__container {
display: inline-flex;
flex-flow: row;
justify-content: space-between;
align-items: flex-end;
min-height: 39px;
/* Need some room for the virtual keyboard toggle */
width: 100%;
/* Encourage browsers to consider allocating a hardware accelerated
layer for this element. */
isolation: isolate;
/* Prevent the browser from trying to interpret touch gestures in the field */
/* "Disabling double-tap to zoom removes the need for browsers to
delay the generation of click events when the user taps the screen." */
touch-action: none;
--ML__selection-background-color: hsl(var(--hue, 212), 97%, 85%);
--ML__text-highlight-background-color: hsla(var(--hue, 212), 40%, 50%, 0.1);
--ML__contains-highlight-background-color: hsl(var(--hue, 212), 40%, 95%);
--ML__selection-color: currentColor;
--ML__caret-color: hsl(var(--hue, 212), 40%, 49%);
--ML__smart-fence-color: currentColor;
--ML__latex-color: var(--primary, hsl(var(--hue, 212), 40%, 50%));
--ML__correct-color: #10a000;
--ML__incorrect-color: #a01b00;
--ML__placeholder-color: hsl(var(--hue, 212), 40%, 49%);
}
/* This is the actual field content (formula) */
.ML__content {
display: flex;
align-items: center;
align-self: center;
position: relative;
overflow: hidden;
padding: 2px 0 2px 1px;
width: 100%;
}
.ML__virtual-keyboard-toggle {
box-sizing: border-box;
display: flex;
align-self: center;
align-items: center;
flex-shrink: 0;
flex-direction: column;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
margin-right: 4px;
cursor: pointer;
/* Avoid some weird blinking with :hover */
border-radius: 8px;
border: 1px solid transparent;
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
color: var(--primary, hsl(var(--hue, 212), 40%, 50%));
fill: currentColor;
background: transparent;
}
.ML__virtual-keyboard-toggle:hover {
background: hsla(0, 0%, 70%, 0.3);
color: #333;
fill: currentColor;
}
.ML__virtual-keyboard-toggle > span {
display: flex;
align-self: center;
align-items: center;
}
/* The invisible element used to capture keyboard events. We're just trying
really hard to make sure it doesn't show. */
.ML__keyboard-sink {
display: inline-block;
resize: none;
outline: none;
border: none;
/* Need these for Microsoft Edge */
position: fixed;
clip: rect(0 0 0 0);
/* Need this to prevent iOS Safari from auto-zooming */
font-size: 1em;
font-family: KaTeX_Main;
}
.ML__focused .ML__text {
background: var(--highlight-text, var(--ML__text-highlight-background-color));
}
/* When using smartFence, the anticipated closing fence is displayed
with this style */
.ML__smart-fence__close {
opacity: var(--smart-fence-opacity, 0.5);
color: var(--smart-fence-color, var(--ML__smart-fence-color));
}
.ML__focused .ML__selection {
background: var(--selection-background-color-focused, var(--selection-background-color, var(--ML__selection-background-color))) !important;
}
.ML__focused .ML__selected,
.ML__focused .ML__selected .ML__contains-caret,
.ML__focused .ML__selected .ML__smart-fence__close,
.ML__focused .ML__selected .ML__placeholder {
color: var(--selection-color-focused, var(--selection-color, var(--ML__selection-color))) !important;
}
.ML__selection {
box-sizing: border-box;
background: var(--selection-background-color, var(--ML__selection-background-color)) !important;
}
.ML__selected,
.ML__selected .ML__contains-caret,
.ML__selected .ML__smart-fence__close,
.ML__selected .ML__placeholder {
color: var(--selection-color, var(--ML__selection-color));
opacity: 1;
}
.ML__contains-caret.ML__close,
.ML__contains-caret.ML__open,
.ML__contains-caret > .ML__close,
.ML__contains-caret > .ML__open,
.ML__contains-caret .ML__sqrt-sign,
.ML__contains-caret .ML__sqrt-line {
color: var(--caret-color, var(--ML__caret-color));
}
.ML__contains-highlight {
background: var(--contains-highlight-backround-color, var(--ML__contains-highlight));
box-sizing: border-box;
}
.ML__latex {
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
font-weight: 400;
color: var(--latex-color, var(--ML__latex-color));
}
.ML__suggestion {
opacity: 0.5;
}
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
background: hsl(var(--hue, 212), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
.ML__virtual-keyboard-toggle:focus {
outline: none;
border-radius: 8px;
border: 2px solid var(--primary, hsl(var(--hue, 212), 40%, 50%));
}
.ML__virtual-keyboard-toggle.is-pressed,
.ML__virtual-keyboard-toggle.is-active:hover,
.ML__virtual-keyboard-toggle.is-active {
background: hsl(var(--hue, 212), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
For UI elements, see \`[data-ML__tooltip]\`
*/
.ML__tooltip-container {
position: relative;
transform: scale(0);
}
.ML__tooltip-container .ML__tooltip-content {
position: fixed;
display: inline-table;
visibility: hidden;
z-index: 2;
width: max-content;
max-width: 400px;
padding: 12px 12px;
border-radius: 8px;
background: #616161;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
opacity: 0;
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
}
.ML__tooltip-container .ML__tooltip-content .ML__text {
white-space: normal;
}
.ML__tooltip-container .ML__tooltip-content .ML__base {
display: contents;
}
.ML__tooltip-container:hover .ML__tooltip-content {
visibility: visible;
opacity: 1;
font-size: 0.75em;
transform: scale(1) translate(0, 3em);
}
/* Add an attribute 'data-ML__tooltip' to automatically show a
tooltip over a element on hover.
Use 'data-position="top"' to place the tooltip above the
element rather than below.
Use 'data-delay' to delay the triggering of the tooltip.
*/
[data-ML__tooltip] {
position: relative;
}
[data-ML__tooltip][data-placement='top']::after {
top: inherit;
bottom: 100%;
}
[data-ML__tooltip]::after {
content: attr(data-ML__tooltip);
position: absolute;
display: none;
z-index: 2;
right: 110%;
left: calc(100% + 8px);
width: max-content;
max-width: 200px;
padding: 8px 8px;
border-radius: 2px;
background: #616161;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
text-align: center;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 12px;
/* Phone */
opacity: 0;
transform: scale(0.5);
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1);
}
@media only screen and (max-width: 767px) {
[data-ML__tooltip]::after {
padding: 8px 16px;
font-size: 16px;
}
}
:not(.tracking) [data-ML__tooltip]:hover {
position: relative;
}
:not(.tracking) [data-ML__tooltip]:hover::after {
visibility: visible;
display: inline-table;
opacity: 1;
transform: scale(1);
}
[data-ML__tooltip][data-delay]::after {
transition-delay: 0s;
}
[data-ML__tooltip][data-delay]:hover::after {
transition-delay: 1s;
/* attr(data-delay); Should work. But doesn't. */
}
`;fe()||console.error('MathLive 0.93.0: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var ha=fe()?document.createElement("template"):null;ha&&(ha.innerHTML=`<style>
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px; pointer-events: none;}
:host([hidden]) { display: none; }
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
:host(:focus), :host(:focus-within) {
outline: Highlight auto 1px; /* For Firefox */
outline: -webkit-focus-ring-color auto 1px;
}
:host([readonly]:focus), :host([readonly]:focus-within),
:host([read-only]:focus), :host([read-only]:focus-within) {
outline: none;
}
${nt}${vl}
</style>
<span style="pointer-events:auto"></span><slot style="display:none"></slot>`);var G=new WeakMap,gd=.5,pr={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},hr=class extends HTMLElement{constructor(r){super();if(r){let o=[];for(let n of Object.keys(r))if(pr[n])if(pr[n].startsWith("mf."))if(pr[n].startsWith(`mf.${n}`))o.push(`Option \`${n}\` cannot be used as a constructor option. Use ${pr[n]}`);else{let a=pr[n].match(/([a-zA-Z]+) =/);o.push(`Option \`${n}\` has been renamed \`${a[1]}\``)}else o.push(`Option \`${n}\` cannot be used as a constructor option. Use ${pr[n]}`);else o.push(`Unexpected option \`${n}\``);if(o.length>0){console.group("%cMathLive 0.93.0: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathFieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(let n of o)console.warn(n);console.groupEnd()}}fi()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot.append(ha.content.cloneNode(!0));let i=this.shadowRoot.querySelector("slot:not([name])");this._slotValue=i.assignedNodes().map(o=>o.nodeType===3?o.textContent:"").join("").trim(),r&&this._setOptions(r)}static get formAssociated(){return fi()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(r){r!==this._fontsDirectory&&(this._fontsDirectory=r,Ps())}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(r){this._soundsDirectory=r,this.audioBuffers={}}static get keypressSound(){return this._keypressSound}static set keypressSound(r){var i,o,n;this.audioBuffers={},r===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof r=="string"?this._keypressSound={spacebar:r,return:r,delete:r,default:r}:typeof r=="object"&&"default"in r&&(this._keypressSound={spacebar:(i=r.spacebar)!=null?i:r.default,return:(o=r.return)!=null?o:r.default,delete:(n=r.delete)!=null?n:r.default,default:r.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(r){this.audioBuffers={},this._plonkSound=r}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(r){this._speechEngine=r}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(r){this._speechEngineRate=r}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(r){this._speechEngineVoice=r}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(r){this._textToSpeechMarkup=r}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(r){this._textToSpeechRules=r}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(r){this._textToSpeechRulesOptions=r}static get locale(){return Z.locale}static set locale(r){r==="auto"&&(r=navigator.language.slice(0,5)),Z.locale=r}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(r){this._decimalSeparator=r,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}static get strings(){return Z.strings}static set strings(r){Z.merge(r)}static get computeEngine(){var r,i;if(this._computeEngine===void 0){let o=(r=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:r.ComputeEngine;o?this._computeEngine=new o:console.error(`MathLive 0.93.0: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(i=this._computeEngine)!=null?i:null}static set computeEngine(r){this._computeEngine=r}static async loadSound(r){delete this.audioBuffers[r];let i="";switch(r){case"keypress":i=this._keypressSound.default;break;case"return":i=this._keypressSound.return;break;case"spacebar":i=this._keypressSound.spacebar;break;case"delete":i=this._keypressSound.delete;break;case"plonk":i=this.plonkSound;break}if(typeof i!="string")return;i=i.trim();let o=this.soundsDirectory;if(o==null||o==="null"||i==="none"||i==="null")return;let a=await(await fetch(await Ko(`${o}/${i}`))).arrayBuffer(),s=await this.audioContext.decodeAudioData(a);this.audioBuffers[r]=s}static async playSound(r){if(this.audioBuffers[r]||await this.loadSound(r),!this.audioBuffers[r])return;let i=this.audioContext.createBufferSource();i.buffer=this.audioBuffers[r];let o=this.audioContext.createGain();o.gain.value=gd,i.connect(o).connect(this.audioContext.destination),i.start()}onPointerDown(){window.addEventListener("pointerup",r=>{var i;r.target===this&&!((i=this._mathfield)!=null&&i.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:r.altKey,button:r.button,buttons:r.buttons,clientX:r.clientX,clientY:r.clientY,ctrlKey:r.ctrlKey,metaKey:r.metaKey,movementX:r.movementX,movementY:r.movementY,relatedTarget:r.relatedTarget,screenX:r.screenX,screenY:r.screenY,shiftKey:r.shiftKey}))},{once:!0})}getPromptValue(r){var i,o;return(o=(i=this._mathfield)==null?void 0:i.getPromptValue(r))!=null?o:""}getPrompts(r){var i,o;return(o=(i=this._mathfield)==null?void 0:i.getPrompts(r))!=null?o:[]}get form(){var r;return(r=this._internals)==null?void 0:r.form}get name(){var r;return(r=this.getAttribute("name"))!=null?r:""}get type(){return this.localName}get mode(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.model.mode)!=null?i:"math"}set mode(r){this._mathfield&&(this._mathfield.model.mode=r)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.93.0: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),this._mathfield.expression}set expression(r){var o,n;if(!this._mathfield)return;let i=(n=(o=hr.computeEngine)==null?void 0:o.box(r).latex)!=null?n:null;i!==null&&this._mathfield.setValue(i),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.93.0: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.errors)!=null?i:[]}_getOptions(r){return this._mathfield?Vt(this._mathfield.options,r):G.has(this)?g({},Vt(g(g({},mi()),di(G.get(this).options)),r)):null}getOptions(r){return console.warn("%cMathLive 0.93.0: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Vt(this._mathfield.options,r):G.has(this)?Vt(g(g({},mi()),di(G.get(this).options)),r):null}reflectAttributes(){let r=mi(),i=this._getOptions();Object.keys(hr.optionsAttributes).forEach(o=>{let n=qt(o);hr.optionsAttributes[o]==="on/off"?r[n]!==i[n]?this.setAttribute(o,i[n]?"on":"off"):this.removeAttribute(o):r[n]!==i[n]&&(hr.optionsAttributes[o]==="boolean"?i[n]?this.setAttribute(o,""):this.removeAttribute(o):(typeof i[n]=="string"||typeof i[n]=="number")&&this.setAttribute(o,i[n].toString()))})}getOption(r){return console.warn("%cMathLive 0.93.0: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([r])[r]}_getOption(r){return this._getOptions([r])[r]}_setOptions(r){if(this._mathfield)this._mathfield.setOptions(r);else if(G.has(this)){let i=g(g({},G.get(this).options),r);G.set(this,T(g({},G.get(this)),{selection:{ranges:i.readOnly?[[0,0]]:[[0,-1]]},options:i}))}else G.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:r});this.reflectAttributes()}setOptions(r){console.group("%cMathLive 0.93.0: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(let i of Object.keys(r))pr[i]&&console.warn(`\`mf.setOptions({${i}:...})\` -> ${pr[i]}`);console.groupEnd(),this._setOptions(r)}executeCommand(r){var i,o;return(o=(i=this._mathfield)==null?void 0:i.executeCommand(r))!=null?o:!1}getValue(r,i,o){var n,a;if(this._mathfield)return this._mathfield.model.getValue(r,i,o);if(G.has(this)){let s,l,c;if(pi(r)?([s,l]=r.ranges[0],c=i):Tr(r)?([s,l]=r,c=i):Dt(r)&&Dt(i)?(s=r,l=i,c=o):(s=0,l=-1,c=r),(c===void 0||c==="latex")&&s===0&&l===-1)return(a=(n=G.get(this).value)!=null?n:this.textContent)!=null?a:""}return""}setValue(r,i){if(this._mathfield&&r!==void 0){i!=null||(i={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(r,i);return}if(G.has(this)){let n=G.get(this).options;G.set(this,{value:r,selection:{ranges:n.readOnly?[[0,0]]:[[0,-1]],direction:"forward"},options:n});return}let o=rn(this);G.set(this,{value:r,selection:{ranges:o.readOnly?[[0,0]]:[[0,-1]],direction:"forward"},options:o})}hasFocus(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.hasFocus())!=null?i:!1}focus(){var r;(r=this._mathfield)==null||r.focus()}blur(){var r;(r=this._mathfield)==null||r.blur()}select(){var r;(r=this._mathfield)==null||r.select()}insert(r,i){var o,n;return(n=(o=this._mathfield)==null?void 0:o.insert(r,i))!=null?n:!1}applyStyle(r,i){var o;return(o=this._mathfield)==null?void 0:o.applyStyle(r,i)}get caretPoint(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.getCaretPoint())!=null?i:null}set caretPoint(r){var i;r&&((i=this._mathfield)==null||i.setCaretPoint(r.x,r.y))}setCaretPoint(r,i){var o,n;return(n=(o=this._mathfield)==null?void 0:o.setCaretPoint(r,i))!=null?n:!1}offsetFromPoint(r,i,o){return this._mathfield?Fr(this._mathfield,r,i,o):-1}hitboxFromOffset(r){if(!this._mathfield)return null;let i=this._mathfield.model.at(r);if(!i)return null;let o=er(this._mathfield,i);return o?new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top):null}resetUndo(){var r;(r=this._mathfield)==null||r.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(r){var i,o;r.type==="pointerdown"&&this.onPointerDown(),r.type==="focus"&&((i=this._mathfield)==null||i.focus()),r.type==="blur"&&((o=this._mathfield)==null||o.blur())}connectedCallback(){var o,n,a;this.shadowRoot.host.addEventListener("pointerdown",this,!0),this.shadowRoot.host.addEventListener("focus",this,!0),this.shadowRoot.host.addEventListener("blur",this,!0),fi()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),this.hasAttribute("contenteditable")||this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");let r=this.shadowRoot.querySelector("slot:not([name])"),i="";if(this.hasAttribute("value")?i=(o=this.getAttribute("value"))!=null?o:"":i=(n=r==null?void 0:r.assignedNodes().map(s=>s.nodeType===3?s.textContent:"").join("").trim())!=null?n:"",this._mathfield=new Yo(this.shadowRoot.querySelector(":host > span"),T(g({},G.has(this)?G.get(this).options:rn(this)),{eventSink:this,value:i})),!G.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(let s of Object.keys(hr.optionsAttributes))this.upgradeProperty(qt(s))}if(!((a=this._mathfield)!=null&&a.model)){this._mathfield=null;return}G.has(this)&&this._mathfield.model.deferNotifications({content:!1,selection:!1},()=>{let s=G.get(this).value;s!==void 0&&this._mathfield.setValue(s),this._mathfield.model.selection=G.get(this).selection,G.delete(this)}),window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),_r()}disconnectedCallback(){if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));let r=Vt(this._mathfield.options,Object.keys(hr.optionsAttributes).map(i=>qt(i)));G.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,options:r}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(r){if(this.hasOwnProperty(r)){let i=this[r];delete this[r],(r==="readonly"||r==="read-only")&&(r="readOnly"),this[r]=i}}attributeChangedCallback(r,i,o){if(i===o)return;let n=o!==null;switch(r){case"contenteditable":this._mathfield&&re(this._mathfield);break;case"disabled":this.disabled=n;break;case"read-only":case"readonly":this.readOnly=n;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(r){let i=!!r;i?(this.setAttribute("readonly",""),fi()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(fi()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:i})}get disabled(){return this.hasAttribute("disabled")}set disabled(r){var o;let i=!!r;i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),fi()?this._internals.ariaDisabled=i?"true":"false":this.setAttribute("aria-disabled",i?"true":"false"),i&&((o=this._mathfield)!=null&&o.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(r){this.setValue(r)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(r){this._setOptions({defaultMode:r})}get macros(){return this._getOption("macros")}set macros(r){this._setOptions({macros:r})}get registers(){return this._getOption("registers")}set registers(r){this._setOptions({registers:r})}get colorMap(){return this._getOption("colorMap")}set colorMap(r){this._setOptions({colorMap:r})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(r){this._setOptions({backgroundColorMap:r})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(r){this._setOptions({letterShapeStyle:r})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(r){this._setOptions({minFontScale:r})}get smartMode(){return this._getOption("smartMode")}set smartMode(r){this._setOptions({smartMode:r})}get smartFence(){return this._getOption("smartFence")}set smartFence(r){this._setOptions({smartFence:r})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(r){this._setOptions({smartSuperscript:r})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(r){this._setOptions({scriptDepth:r})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(r){this._setOptions({removeExtraneousParentheses:r})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(r){this._setOptions({mathModeSpace:r})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(r){this._setOptions({placeholderSymbol:r})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(r){this._setOptions({popoverPolicy:r})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(r){this._setOptions({mathVirtualKeyboardPolicy:r})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(r){this._setOptions({inlineShortcuts:r})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(r){this._setOptions({inlineShortcutTimeout:r})}get keybindings(){return this._getOption("keybindings")}set keybindings(r){this._setOptions({keybindings:r})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(r){this._setOptions({onInlineShortcut:r})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(r){this._setOptions({onScrollIntoView:r})}get onExport(){return this._getOption("onExport")}set onExport(r){this._setOptions({onExport:r})}get readOnly(){return this._getOption("readOnly")}set readOnly(r){this._setOptions({readOnly:r})}get isSelectionEditable(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.isSelectionEditable)!=null?i:!1}setPromptState(r,i,o){var n;(n=this._mathfield)==null||n.setPromptState(r,i,o)}getPromptState(r){var i,o;return(o=(i=this._mathfield)==null?void 0:i.getPromptState(r))!=null?o:[void 0,!0]}setPromptContent(r,i,o){var n;(n=this._mathfield)==null||n.setPromptValue(r,i,o)}stripPromptContent(r){var i,o;return(o=(i=this._mathfield)==null?void 0:i.stripPromptContent(r))!=null?o:{}}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(r){this._setOptions({virtualKeyboardTargetOrigin:r})}get selection(){return this._mathfield?this._mathfield.model.selection:G.has(this)?G.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(r){if(typeof r=="number"&&(r={ranges:[[r,r]]}),this._mathfield){this._mathfield.model.selection=r;return}if(G.has(this)){G.set(this,T(g({},G.get(this)),{selection:r}));return}G.set(this,{value:void 0,selection:r,options:rn(this)})}get selectionIsCollapsed(){let r=this.selection;return r.ranges.length===1&&r.ranges[0][0]===r.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:G.has(this)?G.get(this).selection.ranges[0][0]:0}set position(r){if(this._mathfield&&(this._mathfield.model.position=r),G.has(this)){G.set(this,T(g({},G.get(this)),{selection:{ranges:[[r,r]]}}));return}G.set(this,{value:void 0,selection:{ranges:[[r,r]]},options:rn(this)})}getOffsetDepth(r){var i;return this._mathfield?((i=this._mathfield.model.at(r))==null?void 0:i.treeDepth)-2:0}get lastOffset(){var r,i;return(i=(r=this._mathfield)==null?void 0:r.model.lastOffset)!=null?i:-1}},ue=hr;ue.version="0.93.0",ue._fontsDirectory="./fonts",ue._soundsDirectory="./sounds",ue.keypressVibration=!0,ue._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ue._plonkSound="plonk.wav",ue.audioBuffers={},ue.createHTML=r=>r,ue._speechEngineRate="100%",ue._speechEngineVoice="Joanna",ue._textToSpeechMarkup="",ue._textToSpeechRules="mathlive",ue._textToSpeechRulesOptions={},ue.speakHook=Vs,ue.readAloudHook=xl,ue._decimalSeparator=".",ue.fractionNavigationOrder="numerator-denominator";function qt(t){return t.replace(/[^a-zA-Z\d]+(.)/g,(e,r)=>r.toUpperCase())}function rn(t){let e={readOnly:!1},r=ue.optionsAttributes;return Object.keys(r).forEach(i=>{if(t.hasAttribute(i)){let o=t.getAttribute(i);r[i]==="boolean"?e[qt(i)]=!0:r[i]==="on/off"?o==="on"?e[qt(i)]=!0:o==="off"?e[qt(i)]=!1:e[qt(i)]=void 0:r[i]==="number"?e[qt(i)]=Number.parseFloat(o!=null?o:"0"):e[qt(i)]=o}}),e}function fi(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var li=ue,wl,kl,Sl,Ml;if(fe()&&!((wl=window.customElements)!=null&&wl.get("math-field"))){(Sl=window[kl=Symbol.for("io.cortexjs.mathlive")])!=null||(window[kl]={});let t=window[Symbol.for("io.cortexjs.mathlive")];t.version="0.93.0",window.MathfieldElement=ue,(Ml=window.customElements)==null||Ml.define("math-field",ue)}function fa(t,e){var a,s;e!=null||(e={}),e.mathstyle=(a=e.mathstyle)!=null?a:"displaystyle";let r=new P({from:T(g({},Ci()),{renderPlaceholder:()=>new x(160,{maxFontSize:1}),letterShapeStyle:(s=e==null?void 0:e.letterShapeStyle)!=null?s:"tex"}),mathstyle:e.mathstyle}),o=new f({type:"root",body:le(t,{context:r,parseMode:"math",mathstyle:e.mathstyle})}).render(r);return o?(Gt(Et(o,r)),zt(o,{classes:"ML__mathlive"}).toMarkup()):""}function yd(t){return Po(t,{context:Ci()})}function ga(t,e={}){return W(le(t,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),e)}function ya(t){let e=le(t,{parseMode:"math",mathstyle:"displaystyle"});return $t(e)}var no;function ba(t){var e,r;if(!no){let i=(e=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:e.ComputeEngine;i?no=new i:console.error(`MathLive 0.93.0: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(r=no==null?void 0:no.box(t).latex)!=null?r:""}function bd(t,e="math"){return ce(new f({type:"root",body:le(t,{parseMode:e})}))}function xd(t){return xr(t,{format:"ascii-math"})[1]}function vd(t,e,r){let i=r,o=0,n=t.length;for(;i<e.length;){let a=e[i];if(o<=0&&e.slice(i,i+n)===t)return i;a==="\\"?i++:a==="{"?o++:a==="}"&&o--,i++}return-1}function on(t,e,r,i,o="latex"){let n=[];for(let a of t)if(a.type==="text"){let s=a.data,l=!0,c=0,u;u=s.indexOf(e),u!==-1&&(c=u,c>0&&n.push({type:"text",data:s.slice(0,c)}),l=!1);let d=!1;for(;!d;){if(l){if(u=s.indexOf(e,c),u===-1){d=!0;break}c!==u&&n.push({type:"text",data:s.slice(c,u)}),c=u}else{if(u=vd(r,s,c+e.length),u===-1){d=!0;break}let m=s.slice(c+e.length,u);o==="ascii-math"&&([,m]=xr(m,{format:"ascii-math"})),n.push({type:"math",data:m,rawData:s.slice(c,u+r.length),mathstyle:i}),c=u+r.length}l=!l}c<s.length&&n.push({type:"text",data:s.slice(c)})}else n.push(a);return n}function _l(t,e,r){let i=[{type:"text",data:t}];return e!=null&&e.inline&&e.inline.forEach(([o,n])=>{i=on(i,o,n,"textstyle")}),e!=null&&e.display&&e.display.forEach(([o,n])=>{i=on(i,o,n,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([o,n])=>{i=on(i,o,n,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([o,n])=>{i=on(i,o,n,"displaystyle","ascii-math")}),i}function wd(t,e){let r=document.createElement("span");try{let i="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+e.renderToMathML(t)+"</math>";r.innerHTML=window.MathfieldElement.createHTML(i)}catch(i){console.error(`MathLive 0.93.0: Could not convert "${t}"' to MathML with ${i}`),r.textContent=t}return r.className="ML__sr-only",r}function kd(t,e,r,i){try{let o=e.renderToMarkup(t,{mathstyle:r,format:"html"}),n=document.createElement("span");return n.style.display=r==="displaystyle"?"flex":"inline-flex",n.setAttribute("aria-hidden","true"),n.innerHTML=window.MathfieldElement.createHTML(o),n}catch(o){if(console.error("Could not parse'"+t+"' with ",o),i)return document.createTextNode(t)}return null}function gi(t,e,r,i){var a;let o=kd(t,r,e||"textstyle",i),n=(a=r.renderAccessibleContent)!=null?a:"";if(o&&/\b(mathml|speakable-text)\b/i.test(n)){let s=document.createElement("span");if(/\bmathml\b/i.test(n)&&r.renderToMathML&&s.append(wd(t,r)),/\bspeakable-text\b/i.test(n)&&r.renderToSpeakableText){let l=document.createElement("span"),c=r.renderToSpeakableText(t);l.innerHTML=window.MathfieldElement.createHTML(c),l.className="ML__sr-only",s.append(l)}return s.append(o),s}return o}function Sd(t,e){var i,o,n;let r=null;if((i=e.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(t)){r=document.createDocumentFragment();let a=gi(t,"",e,!0);a&&r.appendChild(a)}else{if(!t.trim())return null;let a=_l(t,(o=e.TeX)==null?void 0:o.delimiters,(n=e.asciiMath)==null?void 0:n.delimiters);if(a.length===1&&a[0].type==="text")return null;r=document.createDocumentFragment();for(let s of a)if(s.type==="text")r.appendChild(document.createTextNode(s.data));else{let l=gi(s.data,s.mathstyle==="textstyle"?"textstyle":"displaystyle",e,!0);l&&r.appendChild(l)}}return r}function Al(t,e){var r,i,o,n,a,s,l,c,u,d,m,h,y,b,M,k;if(t.childNodes.length===1&&t.childNodes[0].nodeType===3){let w=(r=t.childNodes[0].textContent)!=null?r:"";if((i=e.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(w)){t.textContent="";let E=gi(w,"",e,!0);E&&t.append(E);return}let L=_l(w,(o=e.TeX)==null?void 0:o.delimiters,(n=e.asciiMath)==null?void 0:n.delimiters);if(L.length===1&&L[0].type==="math"){t.textContent="";let E=gi(L[0].data,L[0].mathstyle==="textstyle"?"textstyle":"displaystyle",e,!0);E&&t.append(E);return}if(L.length===1&&L[0].type==="text")return}for(let w=t.childNodes.length-1;w>=0;w--){let L=t.childNodes[w];if(L.nodeType===3){let E=Sd((a=L.textContent)!=null?a:"",e);E&&(w+=E.childNodes.length-1,L.replaceWith(E))}else if(L.nodeType===1){let E=L,B=L.nodeName.toLowerCase();if(B==="script"){let _=L,O;if((s=e.processScriptTypePattern)!=null&&s.test(_.type))O=(l=_.textContent)!=null?l:"";else if((c=e.processMathJSONScriptTypePattern)!=null&&c.test(_.type))try{O=(d=e.serializeToLatex)==null?void 0:d.call(e,JSON.parse((u=_.textContent)!=null?u:""))}catch(V){console.error(V)}if(O){let V="textstyle";for(let ct of _.type.split(";")){let[wt,Ht]=ct.toLowerCase().split("=");wt.trim()==="mode"&&(V=Ht.trim()==="display"?"displaystyle":"textstyle")}let Ce=gi(O,V,e,!0);Ce&&_.parentNode.replaceChild(Ce,_)}}else if(((h=(m=e.processClassPattern)==null?void 0:m.test(E.className))!=null?h:!1)||!((b=(y=e.skipTags)==null?void 0:y.includes(B))!=null&&b||(k=(M=e.ignoreClassPattern)==null?void 0:M.test(E.className))!=null&&k))if(t.childNodes.length===1&&t.childNodes[0].nodeType===3){let O=t.textContent;t.textContent="";let V=gi(O!=null?O:"","displaystyle",e,!0);V&&t.append(V)}else Al(E,e)}}}var Md={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function xa(t,e){var r,i,o,n;try{let a=g(g({},Md),e);a.ignoreClassPattern=new RegExp((r=a.ignoreClass)!=null?r:""),a.processClassPattern=new RegExp((i=a.processClass)!=null?i:""),a.processScriptTypePattern=new RegExp((o=a.processScriptType)!=null?o:""),a.processMathJSONScriptTypePattern=new RegExp((n=a.processMathJSONScriptType)!=null?n:""),_r(),qe("mathlive-core-stylesheet",nt),Al(t,a)}catch(a){a instanceof Error?console.error("renderMathInElement(): "+a.message):console.error("renderMathInElement(): Could not render math for element",t)}}function _d(t){let e=we.singleton;return e.show(),Cr(),e.currentLayer=t,e.render(),e.focus(),!0}function Ad(){let t=window.mathVirtualKeyboard;return t.visible?t.hide({animate:!0}):t.show({animate:!0}),!1}me({switchKeyboardLayer:_d,toggleVirtualKeyboard:Ad,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function vt(){var t,e;return(e=globalThis[t=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[t]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Ld(){return console.warn("%cMathLive 0.93.0: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function Cd(t){Ll(document.body,t)}function Ed(t){if(typeof t=="string"){let e=document.getElementById(t);if(e===null)throw new Error(`The element with ID "${t}" could not be found.`);return e}return typeof t=="string"?null:t}function Ll(t,e){var o,n,a,s;let r=Ed(t);if(!r)return;let i=e!=null?e:{};(o=i.renderToMarkup)!=null||(i.renderToMarkup=fa),(n=i.renderToMathML)!=null||(i.renderToMathML=ga),(a=i.renderToSpeakableText)!=null||(i.renderToSpeakableText=ya),(s=i.serializeToLatex)!=null||(i.serializeToLatex=ba),xa(r,i)}var Td={mathlive:"0.93.0"};return Kl(Pd);})();
Object.assign(exports, MathLive); Object.defineProperty(exports, '__esModule', { value: true });}));