File "mathlive.min-1.js"
Path: /ThinkIB/bm_econ/mathlive@0954/dist/mathlivemin-1js
File size: 697.28 KB
MIME-type: text/plain
Charset: utf-8
/** MathLive 0.95.4 */
(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 Wo=Object.defineProperty,Lm=Object.defineProperties,Cm=Object.getOwnPropertyDescriptor,Em=Object.getOwnPropertyDescriptors,Tm=Object.getOwnPropertyNames,jo=Object.getOwnPropertySymbols;var za=Object.prototype.hasOwnProperty,Tl=Object.prototype.propertyIsEnumerable;var El=(e,t,r)=>t in e?Wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))za.call(t,r)&&El(e,r,t[r]);if(jo)for(var r of jo(t))Tl.call(t,r)&&El(e,r,t[r]);return e},g=(e,t)=>Lm(e,Em(t));var Ra=e=>typeof e=="symbol"?e:e+"",Jr=(e,t)=>{var r={};for(var i in e)za.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&jo)for(var i of jo(e))t.indexOf(i)<0&&Tl.call(e,i)&&(r[i]=e[i]);return r};var Pm=(e,t)=>{for(var r in t)Wo(e,r,{get:t[r],enumerable:!0})},Bm=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Tm(t))!za.call(e,o)&&o!==r&&Wo(e,o,{get:()=>t[o],enumerable:!(i=Cm(t,o))||i.enumerable});return e};var Dm=e=>Bm(Wo({},"__esModule",{value:!0}),e);var Bf={};Pm(Bf,{MathfieldElement:()=>Ur,autoRenderMathInElement:()=>Cl,convertAsciiMathToLatex:()=>vf,convertLatexToAsciiMath:()=>xf,convertLatexToMarkup:()=>Sl,convertLatexToMathMl:()=>_l,convertLatexToSpeakableText:()=>Al,globalMathLive:()=>it,makeSharedVirtualKeyboard:()=>Cf,renderMathInDocument:()=>Ef,renderMathInElement:()=>_m,serializeMathJsonToLatex:()=>Ll,validateLatex:()=>bf,version:()=>Pf});function Q(e){return Array.isArray(e)}var Pl={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 ue(){return"window"in globalThis&&"document"in globalThis}function Bl(){return"matchMedia"in window?window.matchMedia("(any-pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Uo(){return typeof navigator.vibrate=="function"}function It(){var t,r;if(!ue())return"other";let e=(r=(t=navigator.userAgentData)==null?void 0:t.platform)!=null?r:navigator.platform;return/^mac/i.test(e)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(e)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Dl(){if(!ue())return!0;if(/firefox/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}var j={strings:Pl,_locale:"",get locale(){return j._locale||(j._locale=ue()?navigator.language.slice(0,5):"en"),j._locale},set locale(e){j._locale=e},merge(e,t){if(e&&t){let r=j._locale;j.locale=e,j.strings[e]=m(m({},j.strings[e]),t),j.locale=r}else if(e&&!t)for(let r of Object.keys(e))j.merge(r,e[r])}};function We(e){if(e===void 0)return;let t=j.locale.slice(0,2),r="";if(j.strings[j.locale]&&(r=j.strings[j.locale][e]),!r&&j.strings[t]&&(r=j.strings[t][e]),r||(r=j.strings.en[e]),!!r)return r}var Km={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Om={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ui={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"},Ji={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"},Kl={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"},zm={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 gr(e){var u,d,p,h,f,x;let t=e.split("!"),r,i,o,n=255,a=255,s=255,l=-1,c=t.length>0&&t[0].startsWith("-");c&&(t[0]=t[0].slice(1));for(let M=0;M<t.length;M++){r=n,i=a,o=s;let v=(u=t[M].trim().match(/^([A-Za-z\d]+)/))==null?void 0:u[1],b=v==null?void 0:v.toLowerCase(),A=v&&(x=(f=(h=(p=(d=Ji[b])!=null?d:Ji[Kl[v]])!=null?p:Om[v])!=null?h:zm[v])!=null?f:Km[v])!=null?x:t[M].trim(),_=A.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(_!=null&&_[1]&&_[2]&&_[3])n=Math.max(0,Math.min(255,Number.parseInt(_[1],16))),a=Math.max(0,Math.min(255,Number.parseInt(_[2],16))),s=Math.max(0,Math.min(255,Number.parseInt(_[3],16)));else if(_=A.match(/^#([\da-f]{3})$/i),_!=null&&_[1]){let T=Number.parseInt(_[1][0],16),E=Number.parseInt(_[1][1],16),R=Number.parseInt(_[1][2],16);n=Math.max(0,Math.min(255,T*16+T)),a=Math.max(0,Math.min(255,E*16+E)),s=Math.max(0,Math.min(255,R*16+R))}else if(_=A.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),_!=null&&_[1]&&_[2]&&_[3])n=Math.max(0,Math.min(255,Number.parseInt(_[1]))),a=Math.max(0,Math.min(255,Number.parseInt(_[2]))),s=Math.max(0,Math.min(255,Number.parseInt(_[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<t.length&&(l=Math.max(0,Math.min(100,Number.parseInt(t[++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 Gr(e){var t,r;return e=e.trim(),(r=(t=Ui[e.toLowerCase()])!=null?t:Ui[Kl[e]])!=null?r:gr(e)}function Rm(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function Fa(e,t,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e}function Fm(e){let[t,r,i]=[e.h,e.s,e.l];t=(t+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*Fa(n,o,t+2)),g:Math.round(255*Fa(n,o,t)),b:Math.round(255*Fa(n,o,t-2))}}function Na(e){return e<0?0:e>255?255:Math.round(e)}function Nm(e){let{r:t,g:r,b:i}=e,o=((1<<24)+(Na(t)<<16)+(Na(r)<<8)+Na(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 Im(e){let{r:t,g:r,b:i}=e;t=t/255,r=r/255,i=i/255;let o=Math.min(t,r,i),n=Math.max(t,r,i),a=n-o,s,l;n===o?s=0:t===n?s=(r-i)/a:r===n?s=2+(i-t)/a:i===n&&(s=4+(t-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 Ol(e){let t=Rm(e);if(!t)return e;let{h:r,s:i,l:o}=Im(t);return i+=.1,o-=.1,Nm(Fm({h:r,s:i,l:o}))}var Ia={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},zl=[{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 Rl(e,t,r){if(!/[A-Za-z\d]/.test(e)||!t&&!r)return e;let i=e.codePointAt(0);if(i===void 0)return e;for(let o of zl)if((!t||o.variant===t)&&(!r||o.style===r)&&i>=o.offset&&i<o.offset+o.len){let n=o.start+i-o.offset;return String.fromCodePoint(Ia[n]||n)}return e}function Fl(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(let r in Ia)if(Ia[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(let r of zl)if(e>=r.start&&e<r.start+r.len)return{char:String.fromCodePoint(e-r.start+r.offset),variant:r.variant,style:r.style};return{char:String.fromCodePoint(e)}}function L(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var Gi={},Go={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"},Xr={},$a={},Vm={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}"},$m={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}},qm={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"},Hm={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{(}",primitive:!0},tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:qm},"amsmath.sty":{package:$m,primitive:!0},"texvc.sty":{package:Vm,primitive:!1}},Vt={" ":32,"\\#":35,"\\&":38,"\\$":36,"\\%":37,"-":45,"\\_":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},Vl=/[\w!@*()-=+{}[\]\\';:?/.,~<>`|$%#&^" ]/,Xo,$t;Dl()?(Xo=new RegExp("\\p{Letter}","u"),$t=new RegExp("[0-9\\p{Letter}]","u")):(Xo=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,$t=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function Va(e,t,r="mord",i){t!==void 0&&(Gi[e]={definitionType:"symbol",type:r,variant:i,codepoint:t},Go[t]||(Go[t]=e),Vt[e]||(Vt[e]=t))}function de(e,t,r){if(typeof e=="string"){for(let i=0;i<e.length;i++){let o=e.charAt(i);Va(o,o.codePointAt(0))}return}for(let[i,o,n,a]of e)Va(i,o,n!=null?n:t,a!=null?a:r)}function qa(e,t){for(let r=e;r<=t;r++)Va(String.fromCodePoint(r),r)}function $l(e){var t;return(t=$a[e])!=null?t:null}function ql(e,t){var o,n;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];let r=[];for(let a in Xr)a.startsWith(t)&&!Xr[a].infix&&r.push({match:a,frequency:(o=Xr[a].frequency)!=null?o:0});for(let a in Gi)a.startsWith(t)&&r.push({match:a,frequency:(n=Gi[a].frequency)!=null?n:0});let i=t.substring(1);for(let a of Object.keys(e.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 Nl(e){let t="auto",r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function Zo(e){if(!e)return[];let t=[],r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:Nl(r[0].slice(1))});for(let i=1;i<=r.length;i++)t.push(...Zo(r[i]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:Nl(r[0].slice(1))});for(let i=1;i<=r.length;i++)t.push(...Zo(r[i]))}return t}function Ha(e){if(!e)return"";let t="",r=!0;for(let i of e)typeof i.value=="string"?t+=i.value:r=!1;return r?t:""}function ja(e,t){typeof e=="string"&&(e=[e]);let r={tabular:!1,params:[],createAtom:t};for(let i of e)$a[i]=r}function st(e,t,r){typeof e=="string"&&(e=[e]);let o={tabular:!0,params:Zo(t),createAtom:r};for(let n of e)$a[n]=o}function w(e,t,r){var o,n;r||(r={});let i={definitionType:"function",params:Zo(t),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 e=="string")Xr["\\"+e]=i;else for(let a of e)Xr["\\"+a]=i}var Jo;function Zr(e){return Jo||(Jo=Yo(Hm)),e?Yo(m(m({},Jo),e)):Jo}function Il(e,t){var r,i,o,n;if(typeof e=="string"){let a=0,s=e;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=t==null?void 0:t.expand)!=null?r:!0,captureSelection:(i=t==null?void 0:t.captureSelection)!=null?i:!0,args:a,def:s}}return m({expand:(o=t==null?void 0:t.expand)!=null?o:!0,captureSelection:(n=t==null?void 0:t.captureSelection)!=null?n:!0,args:0},e)}function Yo(e){if(!e)return{};let t={};for(let r of Object.keys(e)){let i=e[r];if(i==null)delete t[r];else if(typeof i=="object"&&"package"in i)for(let o of Object.keys(i.package))t[o]=Il(i.package[o],{expand:!i.primitive,captureSelection:i.captureSelection});else t[r]=Il(i)}return t}function ee(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=Xr[e],r)return!r.ifMode||r.ifMode===t?r:null;t==="math"?r=Gi[e]:Vt[e]&&(r={definitionType:"symbol",type:"mord",codepoint:Vt[e]})}else if(t==="math"){if(r=Gi[e],!r&&e.length===1){let i=Xi("math",e.codePointAt(0));return i.startsWith("\\")?g(m({},ee(i,"math")),{command:i}):null}}else Vt[e]?r={definitionType:"symbol",type:"mord",codepoint:Vt[e]}:t==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:e.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 Qo(e,t){if(!e.startsWith("\\"))return null;let r=e.slice(1);return t[r]}function Hl(e,t){var n;if(e==="text")return(n=Xi(e,t.codePointAt(0)))!=null?n:t;let r;if(r=Xi(e,t.codePointAt(0)),r)return r;let i=t.codePointAt(0),o=Fl(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 Xi(e,t){if(t===void 0)return"";if(e==="math"&&Go[t])return Go[t];if(e==="text"){let r=Object.keys(Vt).find(i=>Vt[i]===t);if(!r){let i=t.toString(16);r="^".repeat(i.length)+i}return r}return String.fromCodePoint(t)}var Ke=[0,.68889,0,0,.72222],yr=[0,.68889,0,0,.66667],Wa=[0,.68889,0,0,.77778],en=[0,.68889,0,0,.61111],jl=[.16667,.68889,0,0,.77778],Zi=[0,.68889,0,0,.55556],$=[0,0,0,0,.25],Wl=[0,.825,0,0,2.33334],Ul=[0,.9,0,0,2.33334],tn=[0,.68889,0,0,.54028],Ua=[-.03598,.46402,0,0,.5],ve=[-.13313,.36687,0,0,1],rn=[.01354,.52239,0,0,1],Jl=[.01354,.52239,0,0,1.11111],Gl=[0,.54986,0,0,1],on=[0,.69224,0,0,.5],Ja=[0,.43056,0,0,1],qt=[.08198,.58198,0,0,.77778],nn=[.19444,.69224,0,0,.41667],an=[.1808,.675,0,0,1],Xl=[.19444,.69224,0,0,.83334],Zl=[.13667,.63667,0,0,1],Yl=[-.064,.437,0,0,1.334],Ht=[.08167,.58167,0,0,.77778],Yi=[0,.69224,0,0,.72222],Ga=[0,.69224,0,0,.66667],sn=[-.13313,.36687,0,0,.77778],Ql=[.06062,.54986,0,0,.77778],ln=[0,.69224,0,0,.77778],Yr=[.25583,.75583,0,0,.77778],lt=[.25142,.75726,0,0,.77778],Qr=[.20576,.70576,0,0,.77778],Ue=[.30274,.79383,0,0,.77778],Qi=[.22958,.72958,0,0,.77778],ec=[.1808,.675,0,0,.77778],ct=[.13667,.63667,0,0,.77778],Ee=[.13597,.63597,0,0,.77778],jt=[.03517,.54986,0,0,.77778],ei=[0,.675,0,0,.77778],tc=[.19444,.69224,0,0,.61111],rc=[0,.54986,0,0,.76042],ic=[0,.54986,0,0,.66667],Wt=[.0391,.5391,0,0,.77778],oc=[.03517,.54986,0,0,1.33334],nc=[.38569,.88569,0,0,.77778],cn=[.23222,.74111,0,0,.77778],ac=[.19444,.69224,0,0,.77778],sc=[0,.37788,0,0,.5],un=[0,.54986,0,0,.72222],lc=[0,.69224,0,0,.83334],cc=[.11111,.69224,0,0,.66667],ti=[.26167,.75726,0,0,.77778],uc=[.48256,.98256,0,0,.77778],dc=[.28481,.79383,0,0,.77778],mc=[.08167,.58167,0,0,.22222],pc=[.08167,.58167,0,0,.38889],hc=[0,.43056,.04028,0,.66667],fc=[.41951,.91951,0,0,.77778],gc=[.24982,.74947,0,0,.38865],yc=[.08319,.58283,0,0,.75623],bc=[0,.10803,0,0,.27764],Xa=[0,.47534,0,0,.50181],eo=[.18906,.47534,0,0,.50181],xc=[0,.69141,0,0,.50181],vc=[.24982,.74947,0,0,.27764],Za=[0,.69141,0,0,.21471],dn=[.25,.75,0,0,.44722],Oe=[0,.64444,0,0,.575],ri=[.08556,.58556,0,0,.89444],mn=[0,.69444,0,0,.89444],pn=[0,.68611,0,0,.9],Ya=[0,.68611,0,0,.86944],Ut=[.25,.75,0,0,.575],hn=[.25,.75,0,0,.31944],br=[0,.69444,0,0,.63889],ii=[0,.69444,0,0,.31944],wc=[0,.44444,0,0,.63889],kc=[0,.44444,0,0,.51111],Jt=[0,.69444,0,0,.575],Je=[.13333,.63333,0,0,.89444],Mc=[0,.44444,0,0,.31944],Sc=[0,.69444,0,0,.86944],_c=[0,.68611,0,0,.69166],fn=[0,.68611,0,0,.83055],Qa=[0,.68611,0,0,.89444],es=[0,.69444,0,0,.60278],Ac=[.19444,.69444,0,0,.51111],Lc=[0,.69444,0,0,.83055],ut=[-.10889,.39111,0,0,1.14999],Cc=[.19444,.69444,0,0,.575],to=[.19444,.69444,0,0,1.14999],Ec=[.19444,.69444,0,0,.70277],Tc=[.05556,.75,0,0,.575],ts=[0,.68611,0,0,.95833],Pc=[.08556,.58556,0,0,.76666],rs=[-.02639,.47361,0,0,.575],Bc=[0,.44444,0,0,.89444],xr=[0,.55556,0,0,.76666],Dc=[-.10889,.39111,0,0,.89444],is=[.00222,.50222,0,0,.89444],Gt=[.19667,.69667,0,0,.89444],Kc=[.08556,.58556,0,0,1.14999],os=[0,.69444,0,0,.70277],gn=[-.02778,.47222,0,0,.575],yn=[.25,.75,0,0,.51111],Oc=[-.13889,.36111,0,0,1.14999],zc=[.19444,.69444,0,0,1.02222],bn=[.12963,.69444,0,0,.89444],Rc=[.19444,.69444,0,0,.44722],Xt=[0,.64444,.13167,0,.59111],Fc=[.19444,.64444,.13167,0,.59111],ns=[0,.68611,.17208,0,.8961],Nc=[.19444,.44444,.105,0,.53222],Ic=[0,.44444,.085,0,.82666],Vc=[0,.69444,.06709,0,.59111],xn=[0,.69444,.12945,0,.35555],$c=[0,.69444,0,0,.94888],as=[0,.69444,.11472,0,.59111],qc=[0,.68611,.10778,0,.88555],Hc=[0,.69444,.07939,0,.62055],vn=[0,.69444,.12417,0,.30667],Zt=[0,.64444,.13556,0,.51111],jc=[.19444,.64444,.13556,0,.51111],wn=[0,.68333,.16389,0,.74333],Wc=[.19444,.43056,.08847,0,.46],Uc=[0,.43056,.07514,0,.71555],Jc=[0,.69444,.06646,0,.51111],Gc=[0,.69444,0,0,.83129],Xc=[0,.69444,.1225,0,.51111],Zc=[0,.68333,.09403,0,.76666],Yc=[0,.68333,.11111,0,.76666],Qc=[0,.69444,.06961,0,.51444],_t=[0,.69444,0,0,.27778],oi=[.25,.75,0,0,.38889],ze=[0,.64444,0,0,.5],vr=[0,.69444,0,0,.77778],wr=[0,.68333,0,0,.75],ro=[0,.68333,0,0,.77778],eu=[0,.68333,0,0,.68056],io=[0,.68333,0,0,.72222],At=[.25,.75,0,0,.5],kn=[.25,.75,0,0,.27778],ce=[0,.69444,0,0,.5],ni=[0,.69444,0,0,.55556],ss=[0,.43056,0,0,.44445],oo=[0,.43056,0,0,.5],tu=[.19444,.43056,0,0,.55556],ru=[0,.43056,0,0,.55556],Re=[.08333,.58333,0,0,.77778],iu=[0,.43056,0,0,.27778],ou=[0,.66786,0,0,.27778],nu=[0,.69444,0,0,.75],au=[0,.66786,0,0,.5],su=[0,.68333,0,0,.625],ls=[.19444,.69444,0,0,.44445],no=[0,.69444,0,0,.72222],lu=[.19444,.69444,0,0,.5],ao=[.19444,.69444,0,0,1],cu=[.011,.511,0,0,1.126],cs=[.19444,.69444,0,0,.61111],us=[.05556,.75,0,0,.5],uu=[0,.68333,0,0,.83334],du=[.0391,.5391,0,0,.66667],ds=[-.05555,.44445,0,0,.5],mu=[0,.43056,0,0,.77778],kr=[0,.55556,0,0,.66667],Mn=[-.03625,.46375,0,0,.77778],pu=[-.01688,.48312,0,0,.77778],hu=[.0391,.5391,0,0,1],Yt=[0,.69444,0,0,.61111],Sn=[-.03472,.46528,0,0,.5],_n=[.25,.75,0,0,.44445],fu=[-.14236,.35764,0,0,1],An=[.244,.744,0,0,.412],gu=[.19444,.69444,0,0,.88889],Ln=[.12963,.69444,0,0,.77778],yu=[.19444,.69444,0,0,.38889],bu=[.011,.511,0,0,1.638],xu=[.19444,.69444,0,0,0],Cn=[0,.44444,0,0,.575],so=[.19444,.44444,0,0,.575],vu=[0,.68611,0,0,.75555],wu=[0,.69444,0,0,.66759],ku=[0,.68611,0,0,.80555],Mu=[0,.68611,.08229,0,.98229],Su=[0,.68611,0,0,.76666],_u=[0,.44444,0,0,.58472],Au=[.19444,.44444,0,0,.6118],lo=[.19444,.43056,0,0,.5],Lu=[0,.68333,.02778,.08334,.76278],Cu=[0,.68333,.08125,.05556,.83125],Eu=[0,.43056,0,.05556,.48472],Tu=[.19444,.43056,0,.08334,.51702],Pu=[.25,.75,0,0,.42778],ge=[0,.69444,0,0,.55],Lt=[0,.69444,0,0,.73334],Qt=[0,.69444,0,0,.79445],Bu=[0,.69444,0,0,.51945],ms=[0,.69444,0,0,.70278],Du=[0,.69444,0,0,.76389],Ku=[.25,.75,0,0,.34306],ps=[0,.69444,0,0,.56111],Ou=[0,.69444,0,0,.25556],zu=[.19444,.45833,0,0,.56111],Ru=[0,.45833,0,0,.56111],En=[0,.69444,0,0,.30556],Fu=[0,.69444,0,0,.58056],Nu=[0,.69444,0,0,.67223],hs=[0,.69444,0,0,.85556],fs=[0,.69444,0,0,.55834],dt=[0,.65556,.11156,0,.5],gs=[0,.69444,.08094,0,.70834],ys=[.17014,0,0,0,.44445],Iu=[0,.69444,.0799,0,.5],Vu=[0,.69444,0,0,.73752],$u=[0,.69444,.09205,0,.5],qu=[0,.69444,.09031,0,.77778],bs=[0,.69444,.07816,0,.27778],Hu=[0,.69444,.00316,0,.5],ju=[.19444,.69444,0,0,.83334],Wu=[.05556,.75,0,0,.83334],Uu=[0,.75,0,0,.5],Ju=[.125,.08333,0,0,.27778],Gu=[0,.08333,0,0,.27778],mt=[0,.65556,0,0,.5],xs=[0,.69444,0,0,.47222],Ct=[0,.69444,0,0,.66667],Xu=[0,.69444,0,0,.59722],vs=[0,.69444,0,0,.54167],ws=[0,.69444,0,0,.70834],Zu=[.25,.75,0,0,.28889],ks=[0,.69444,0,0,.51667],Yu=[0,.44444,0,0,.44445],Qu=[.19444,.44444,0,0,.51667],ed=[0,.44444,0,0,.38333],td=[0,.44444,0,0,.51667],rd=[0,.69444,0,0,.83334],id=[.35001,.85,0,0,.45834],od=[.35001,.85,0,0,.57778],nd=[.35001,.85,0,0,.41667],ad=[.35001,.85,0,0,.58334],Tn=[0,.72222,0,0,.55556],sd=[1e-5,.6,0,0,.66667],ld=[1e-5,.6,0,0,.77778],cd=[.25001,.75,0,0,.94445],ud=[.306,.805,.19445,0,.47222],dd=[.30612,.805,.19445,0,.47222],ai=[.25001,.75,0,0,.83334],si=[.35001,.85,0,0,.47222],Ms=[.25001,.75,0,0,1.11111],md=[.65002,1.15,0,0,.59722],pd=[.65002,1.15,0,0,.81111],hd=[.65002,1.15,0,0,.47222],fd=[.65002,1.15,0,0,.66667],Pn=[0,.75,0,0,1],gd=[.55001,1.05,0,0,1.27778],yd=[.862,1.36,.44445,0,.55556],bd=[.86225,1.36,.44445,0,.55556],li=[.55001,1.05,0,0,1.11111],Bn=[.65002,1.15,0,0,.52778],xd=[.65002,1.15,0,0,.61111],Ss=[.55001,1.05,0,0,1.51112],vd=[.95003,1.45,0,0,.73611],wd=[.95003,1.45,0,0,1.04445],kd=[.95003,1.45,0,0,.52778],Dn=[.95003,1.45,0,0,.75],Kn=[0,.75,0,0,1.44445],On=[.95003,1.45,0,0,.58334],Md=[1.25003,1.75,0,0,.79167],Sd=[1.25003,1.75,0,0,1.27778],_d=[1.25003,1.75,0,0,.58334],zn=[1.25003,1.75,0,0,.80556],Rn=[0,.825,0,0,1.8889],Fn=[1.25003,1.75,0,0,.63889],Nn=[.64502,1.155,0,0,.875],Ad=[1e-5,.6,0,0,.875],_s=[-99e-5,.601,0,0,.66667],In=[.64502,1.155,0,0,.66667],Ld=[1e-5,.9,0,0,.88889],Cd=[.65002,1.15,0,0,.88889],Ed=[.90001,0,0,0,.88889],Td=[-.00499,.605,0,0,1.05556],Vn=[0,.12,0,0,.45],C=[0,.61111,0,0,.525],Ge=[.08333,.69444,0,0,.525],Pd=[-.08056,.53055,0,0,.525],Bd=[-.05556,.55556,0,0,.525],Se=[0,.43056,0,0,.525],co=[.22222,.43056,0,0,.525],Dd=[0,0,0,0,.525],Kd={"AMS-Regular":{32:$,65:Ke,66:yr,67:Ke,68:Ke,69:yr,70:en,71:Wa,72:Wa,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Wa,76:yr,77:[0,.68889,0,0,.94445],78:Ke,79:jl,80:en,81:jl,82:Ke,83:Zi,84:yr,85:Ke,86:Ke,87:[0,.68889,0,0,1],88:Ke,89:Ke,90:yr,107:Zi,160:$,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Zi,295:tn,710:Wl,732:Ul,770:Wl,771:Ul,989:Ht,1008:hc,8245:[0,.54986,0,0,.275],8463:tn,8487:Ke,8498:Zi,8502:yr,8503:[0,.68889,0,0,.44445],8504:yr,8513:[0,.68889,0,0,.63889],8592:Ua,8594:Ua,8602:ve,8603:ve,8606:rn,8608:rn,8610:Jl,8611:Jl,8619:Gl,8620:Gl,8621:[-.13313,.37788,0,0,1.38889],8622:ve,8624:on,8625:on,8630:Ja,8631:Ja,8634:qt,8635:qt,8638:nn,8639:nn,8642:nn,8643:nn,8644:an,8646:an,8647:an,8648:Xl,8649:an,8650:Xl,8651:rn,8652:rn,8653:ve,8654:ve,8655:ve,8666:Zl,8667:Zl,8669:[-.13313,.37788,0,0,1],8672:Yl,8674:Yl,8705:[0,.825,0,0,.5],8708:Zi,8709:Ht,8717:[0,.43056,0,0,.42917],8722:Ua,8724:[.08198,.69224,0,0,.77778],8726:Ht,8733:ln,8736:Yi,8737:Yi,8738:[.03517,.52239,0,0,.72222],8739:mc,8740:[.25142,.74111,0,0,.27778],8741:pc,8742:[.25142,.74111,0,0,.5],8756:Ga,8757:Ga,8764:sn,8765:[-.13313,.37788,0,0,.77778],8769:sn,8770:Mn,8774:Ue,8776:pu,8778:Ht,8782:Ql,8783:Ql,8785:qt,8786:qt,8787:qt,8790:ln,8791:Qi,8796:[.08198,.91667,0,0,.77778],8806:Yr,8807:Yr,8808:lt,8809:lt,8812:[.25583,.75583,0,0,.5],8814:Qr,8815:Qr,8816:Ue,8817:Ue,8818:Qi,8819:Qi,8822:ec,8823:ec,8828:ct,8829:ct,8830:Qi,8831:Qi,8832:Qr,8833:Qr,8840:Ue,8841:Ue,8842:Ee,8843:Ee,8847:jt,8848:jt,8858:qt,8859:qt,8861:qt,8862:ei,8863:ei,8864:ei,8865:ei,8872:[0,.69224,0,0,.61111],8873:Yi,8874:[0,.69224,0,0,.88889],8876:en,8877:en,8878:Ke,8879:Ke,8882:jt,8883:jt,8884:ct,8885:ct,8888:[0,.54986,0,0,1.11111],8890:tu,8891:tc,8892:tc,8901:[0,.54986,0,0,.27778],8903:Ht,8905:Ht,8906:Ht,8907:ln,8908:ln,8909:[-.03598,.46402,0,0,.77778],8910:rc,8911:rc,8912:jt,8913:jt,8914:ic,8915:ic,8916:Ga,8918:Wt,8919:Wt,8920:oc,8921:oc,8922:nc,8923:nc,8926:ct,8927:ct,8928:Ue,8929:Ue,8934:cn,8935:cn,8936:cn,8937:cn,8938:Qr,8939:Qr,8940:Ue,8941:Ue,8994:ac,8995:ac,9416:[.15559,.69224,0,0,.90222],9484:on,9488:on,9492:sc,9496:sc,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:ei,9633:ei,9650:un,9651:un,9654:jt,9660:un,9661:un,9664:jt,9674:cc,9733:[.19444,.69224,0,0,.94445],10003:lc,10016:lc,10731:cc,10846:[.19444,.75583,0,0,.61111],10877:ct,10878:ct,10885:Yr,10886:Yr,10887:Ee,10888:Ee,10889:ti,10890:ti,10891:uc,10892:uc,10901:ct,10902:ct,10933:lt,10934:lt,10935:ti,10936:ti,10937:ti,10938:ti,10949:Yr,10950:Yr,10955:dc,10956:dc,57350:mc,57351:pc,57352:Ht,57353:hc,57356:lt,57357:lt,57358:fc,57359:Ue,57360:Ue,57361:fc,57366:lt,57367:lt,57368:lt,57369:lt,57370:Ee,57371:Ee},"Caligraphic-Regular":{32:$,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:$},"Fraktur-Regular":{32:$,33:[0,.69141,0,0,.29574],34:Za,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:gc,41:gc,42:[0,.62119,0,0,.27764],43:yc,44:bc,45:yc,46:bc,47:[.24982,.74947,0,0,.50181],48:Xa,49:Xa,50:Xa,51:eo,52:eo,53:eo,54:xc,55:eo,56:xc,57:eo,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:vc,93:vc,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:$,8216:Za,8217:Za,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:$,33:[0,.69444,0,0,.35],34:es,35:[.19444,.69444,0,0,.95833],36:Tc,37:[.05556,.75,0,0,.95833],38:mn,39:ii,40:dn,41:dn,42:[0,.75,0,0,.575],43:Je,44:[.19444,.15556,0,0,.31944],45:ed,46:[0,.15556,0,0,.31944],47:Ut,48:Oe,49:Oe,50:Oe,51:Oe,52:Oe,53:Oe,54:Oe,55:Oe,56:Oe,57:Oe,58:Mc,59:[.19444,.44444,0,0,.31944],60:ri,61:Dc,62:ri,63:[0,.69444,0,0,.54305],64:mn,65:Ya,66:[0,.68611,0,0,.81805],67:fn,68:[0,.68611,0,0,.88194],69:vu,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:pn,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:_c,77:[0,.68611,0,0,1.09166],78:pn,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:Ya,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:hn,92:Ut,93:hn,94:Jt,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:br,99:kc,100:br,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:br,105:ii,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:ii,109:[0,.44444,0,0,.95833],110:wc,111:Cn,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:wc,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:kc,123:Ut,124:hn,125:Ut,126:[.35,.34444,0,0,.575],160:$,163:[0,.69444,0,0,.86853],168:Jt,172:[0,.44444,0,0,.76666],176:Sc,177:Je,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Je,216:[.04861,.73472,0,0,.89444],223:Xu,230:[0,.44444,0,0,.83055],247:Je,248:[.09722,.54167,0,0,.575],305:Mc,338:[0,.68611,0,0,1.16944],339:Bc,567:[.19444,.44444,0,0,.35139],710:Jt,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Jt,715:Jt,728:Jt,729:ii,730:Sc,732:Jt,733:Jt,915:_c,916:ts,920:Qa,923:ku,926:Su,928:pn,931:fn,933:Qa,934:fn,936:Qa,937:fn,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:ii,8217:ii,8220:es,8221:es,8224:Ac,8225:Ac,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:wu,8465:Lc,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Lc,8501:os,8592:ut,8593:Cc,8594:ut,8595:Cc,8596:ut,8597:Ut,8598:to,8599:to,8600:to,8601:to,8636:ut,8637:ut,8640:ut,8641:ut,8656:ut,8657:Ec,8658:ut,8659:Ec,8660:ut,8661:[.25,.75,0,0,.70277],8704:br,8706:[0,.69444,.06389,0,.62847],8707:br,8709:Tc,8711:ts,8712:Pc,8715:Pc,8722:Je,8723:Je,8725:Ut,8726:Ut,8727:gn,8728:rs,8729:rs,8730:[.18,.82,0,0,.95833],8733:Bc,8734:[0,.44444,0,0,1.14999],8736:Yi,8739:hn,8741:Ut,8743:xr,8744:xr,8745:xr,8746:xr,8747:[.19444,.69444,.12778,0,.56875],8764:Dc,8768:[.19444,.69444,0,0,.31944],8771:is,8776:[.02444,.52444,0,0,.89444],8781:is,8801:is,8804:Gt,8805:Gt,8810:Kc,8811:Kc,8826:ri,8827:ri,8834:ri,8835:ri,8838:Gt,8839:Gt,8846:xr,8849:Gt,8850:Gt,8851:xr,8852:xr,8853:Je,8854:Je,8855:Je,8856:Je,8857:Je,8866:os,8867:os,8868:mn,8869:mn,8900:rs,8901:[-.02639,.47361,0,0,.31944],8902:gn,8968:yn,8969:yn,8970:yn,8971:yn,8994:Oc,8995:Oc,9651:zc,9657:gn,9661:zc,9667:gn,9711:to,9824:bn,9825:bn,9826:bn,9827:bn,9837:[0,.75,0,0,.44722],9838:Rc,9839:Rc,10216:dn,10217:dn,10815:pn,10927:Gt,10928:Gt,57376:xu},"Main-BoldItalic":{32:$,33:[0,.69444,.11417,0,.38611],34:Hc,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:xn,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:Xt,49:Xt,50:Xt,51:Xt,52:Fc,53:Xt,54:Xt,55:Fc,56:Xt,57:Xt,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:as,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:ns,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:ns,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:Vc,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Nc,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Nc,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:$,168:[0,.69444,.11473,0,.59111],176:$c,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:Ic,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Ic,567:[.19444,.44444,.04611,0,.385],710:Vc,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:xn,730:$c,732:as,733:as,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:ns,931:[0,.68611,.11431,0,.82666],933:qc,934:[0,.68611,.05632,0,.82666],936:qc,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:xn,8217:xn,8220:[0,.69444,.16772,0,.62055],8221:Hc},"Main-Italic":{32:$,33:vn,34:Qc,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:vn,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Zt,49:Zt,50:Zt,51:Zt,52:jc,53:Zt,54:Zt,55:jc,56:Zt,57:Zt,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Xc,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:wn,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:wn,79:Zc,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:wn,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:Jc,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:Wc,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:Wc,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:$,168:[0,.66786,.10474,0,.51111],176:Gc,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:Uc,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:Uc,710:Jc,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:Gc,732:[0,.66786,.11585,0,.51111],733:Xc,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Zc,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:wn,931:[0,.68333,.12028,0,.71555],933:Yc,934:[0,.68333,.05986,0,.71555],936:Yc,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:vn,8217:vn,8220:[0,.69444,.1685,0,.51444],8221:Qc,8463:tn},"Main-Regular":{32:$,33:_t,34:ce,35:ju,36:us,37:Wu,38:vr,39:_t,40:oi,41:oi,42:Uu,43:Re,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:At,48:ze,49:ze,50:ze,51:ze,52:ze,53:ze,54:ze,55:ze,56:ze,57:ze,58:iu,59:[.19444,.43056,0,0,.27778],60:Wt,61:sn,62:Wt,63:xs,64:vr,65:wr,66:[0,.68333,0,0,.70834],67:io,68:[0,.68333,0,0,.76389],69:eu,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:wr,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:ro,76:su,77:[0,.68333,0,0,.91667],78:wr,79:ro,80:eu,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:io,85:wr,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:wr,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:kn,92:At,93:kn,94:ce,95:[.31,.12056,.02778,0,.5],97:oo,98:ni,99:ss,100:ni,101:ss,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:ni,105:ou,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:_t,109:[0,.43056,0,0,.83334],110:ru,111:oo,112:tu,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:ru,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:ss,123:At,124:kn,125:At,126:[.35,.31786,0,0,.5],160:$,163:[0,.69444,0,0,.76909],167:ls,168:au,172:[0,.43056,0,0,.66667],176:nu,177:Re,182:cs,184:ys,198:[0,.68333,0,0,.90278],215:Re,216:[.04861,.73194,0,0,.77778],223:ce,230:[0,.43056,0,0,.72222],247:Re,248:[.09722,.52778,0,0,.5],305:iu,338:[0,.68333,0,0,1.01389],339:mu,567:[.19444,.43056,0,0,.30556],710:ce,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:ce,715:ce,728:ce,729:ou,730:nu,732:au,733:ce,915:su,916:uu,920:ro,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:wr,931:io,933:ro,934:io,936:ro,937:io,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:_t,8217:_t,8220:ce,8221:ce,8224:ls,8225:ls,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:tn,8465:no,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:no,8501:Yt,8592:ve,8593:lu,8594:ve,8595:lu,8596:ve,8597:At,8598:ao,8599:ao,8600:ao,8601:ao,8614:[.011,.511,0,0,1],8617:cu,8618:cu,8636:ve,8637:ve,8640:ve,8641:ve,8652:[.011,.671,0,0,1],8656:ve,8657:cs,8658:ve,8659:cs,8660:ve,8661:[.25,.75,0,0,.61111],8704:ni,8706:[0,.69444,.05556,.08334,.5309],8707:ni,8709:us,8711:uu,8712:du,8715:du,8722:Re,8723:Re,8725:At,8726:At,8727:Sn,8728:ds,8729:ds,8730:[.2,.8,0,0,.83334],8733:mu,8734:Ja,8736:Yi,8739:kn,8741:At,8743:kr,8744:kr,8745:kr,8746:kr,8747:[.19444,.69444,.11111,0,.41667],8764:sn,8768:[.19444,.69444,0,0,.27778],8771:Mn,8773:[-.022,.589,0,0,1],8776:pu,8781:Mn,8784:[-.133,.67,0,0,.778],8801:Mn,8804:Ee,8805:Ee,8810:hu,8811:hu,8826:Wt,8827:Wt,8834:Wt,8835:Wt,8838:Ee,8839:Ee,8846:kr,8849:Ee,8850:Ee,8851:kr,8852:kr,8853:Re,8854:Re,8855:Re,8856:Re,8857:Re,8866:Yt,8867:Yt,8868:vr,8869:vr,8872:[.249,.75,0,0,.867],8900:ds,8901:[-.05555,.44445,0,0,.27778],8902:Sn,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:_n,8969:_n,8970:_n,8971:_n,8994:fu,8995:fu,9136:An,9137:An,9651:gu,9657:Sn,9661:gu,9667:Sn,9711:ao,9824:Ln,9825:Ln,9826:Ln,9827:Ln,9837:[0,.75,0,0,.38889],9838:yu,9839:yu,10216:oi,10217:oi,10222:An,10223:An,10229:[.011,.511,0,0,1.609],10230:bu,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:bu,10815:wr,10927:Ee,10928:Ee,57376:xu},"Math-BoldItalic":{32:$,48:Cn,49:Cn,50:Cn,51:so,52:so,53:so,54:Oe,55:so,56:Oe,57:so,65:Ya,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:Mu,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:vu,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:wu,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:_u,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:$,915:[0,.68611,.15972,0,.65694],916:ts,920:[0,.68611,.03194,0,.86722],923:ku,926:[0,.68611,.07458,0,.84125],928:Mu,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Su,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:_u,960:[0,.44444,.03704,0,.68241],961:Au,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:Au,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:$,48:oo,49:oo,50:oo,51:lo,52:lo,53:lo,54:ze,55:lo,56:ze,57:lo,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:Cu,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Lu,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Eu,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:$,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Lu,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Cu,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Eu,960:[0,.43056,.03588,0,.57003],961:Tu,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:Tu,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:$,33:[0,.69444,0,0,.36667],34:fs,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:En,40:Pu,41:Pu,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:ge,49:ge,50:ge,51:ge,52:ge,53:ge,54:ge,55:ge,56:ge,57:ge,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Bu,64:Lt,65:Lt,66:Lt,67:ms,68:Qt,69:[0,.69444,0,0,.64167],70:Yt,71:Lt,72:Qt,73:[0,.69444,0,0,.33056],74:Bu,75:Du,76:Fu,77:[0,.69444,0,0,.97778],78:Qt,79:Qt,80:ms,81:[.10556,.69444,0,0,.79445],82:ms,83:Yt,84:Lt,85:Du,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Lt,89:[0,.69444,.0275,0,.73334],90:Nu,91:Ku,93:Ku,94:ge,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ps,99:[0,.45833,0,0,.48889],100:ps,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ps,105:Ou,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Ou,109:[0,.45833,0,0,.86667],110:Ru,111:[0,.45833,0,0,.55],112:zu,113:zu,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Ru,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:$,168:ge,176:Lt,180:ge,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:ge,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:ge,729:En,730:Lt,732:ge,733:ge,915:Fu,916:[0,.69444,0,0,.91667],920:hs,923:Nu,926:Lt,928:Qt,931:Qt,933:hs,934:Qt,936:hs,937:Qt,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:En,8217:En,8220:fs,8221:fs},"SansSerif-Italic":{32:$,33:[0,.69444,.05733,0,.31945],34:Hu,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:bs,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Ju,45:[0,.44444,.01946,0,.33333],46:Gu,47:[.25,.75,.13164,0,.5],48:dt,49:dt,50:dt,51:dt,52:dt,53:dt,54:dt,55:dt,56:dt,57:dt,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:Ct,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:gs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:vs,77:[0,.69444,.08094,0,.875],78:gs,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Iu,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:$,168:[0,.67937,.06385,0,.5],176:Vu,184:ys,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Iu,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:$u,715:ce,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Vu,732:[0,.67659,.08826,0,.5],733:$u,915:[0,.69444,.13372,0,.54167],916:rd,920:[0,.69444,.07555,0,.77778],923:Yt,926:[0,.69444,.12816,0,.66667],928:gs,931:[0,.69444,.11983,0,.72222],933:qu,934:[0,.69444,.04603,0,.72222],936:qu,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:bs,8217:bs,8220:[0,.69444,.14205,0,.5],8221:Hu},"SansSerif-Regular":{32:$,33:[0,.69444,0,0,.31945],34:ce,35:ju,36:us,37:Wu,38:[0,.69444,0,0,.75834],39:_t,40:oi,41:oi,42:Uu,43:Re,44:Ju,45:[0,.44444,0,0,.33333],46:Gu,47:At,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:xs,64:Ct,65:Ct,66:Ct,67:br,68:[0,.69444,0,0,.72223],69:Xu,70:[0,.69444,0,0,.56945],71:Ct,72:ws,73:_t,74:xs,75:[0,.69444,0,0,.69445],76:vs,77:[0,.69444,0,0,.875],78:ws,79:[0,.69444,0,0,.73611],80:br,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:ni,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:Ct,89:[0,.69444,.025,0,.66667],90:Yt,91:Zu,93:Zu,94:ce,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:ks,99:Yu,100:ks,101:Yu,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:ks,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:td,111:[0,.44444,0,0,.5],112:Qu,113:Qu,114:[0,.44444,.01389,0,.34167],115:ed,116:[0,.57143,0,0,.36111],117:td,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:$,168:[0,.67937,0,0,.5],176:Ct,184:ys,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:ce,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:ce,715:ce,728:ce,729:[0,.67937,0,0,.27778],730:Ct,732:[0,.67659,0,0,.5],733:ce,915:vs,916:rd,920:vr,923:Yt,926:Ct,928:ws,931:no,933:vr,934:no,936:vr,937:no,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:_t,8217:_t,8220:ce,8221:ce},"Script-Regular":{32:$,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:$},"Size1-Regular":{32:$,40:id,41:id,47:od,91:nd,92:od,93:nd,123:ad,125:ad,160:$,710:Tn,732:Tn,770:Tn,771:Tn,8214:[-99e-5,.601,0,0,.77778],8593:sd,8595:sd,8657:ld,8659:ld,8719:cd,8720:cd,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:dd,8748:ud,8749:ud,8750:dd,8896:ai,8897:ai,8898:ai,8899:ai,8968:si,8969:si,8970:si,8971:si,9168:_s,10216:si,10217:si,10752:Ms,10753:Ms,10754:Ms,10756:ai,10758:ai},"Size2-Regular":{32:$,40:md,41:md,47:pd,91:hd,92:pd,93:hd,123:fd,125:fd,160:$,710:Pn,732:Pn,770:Pn,771:Pn,8719:gd,8720:gd,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:bd,8748:yd,8749:yd,8750:bd,8896:li,8897:li,8898:li,8899:li,8968:Bn,8969:Bn,8970:Bn,8971:Bn,10216:xd,10217:xd,10752:Ss,10753:Ss,10754:Ss,10756:li,10758:li},"Size3-Regular":{32:$,40:vd,41:vd,47:wd,91:kd,92:wd,93:kd,123:Dn,125:Dn,160:$,710:Kn,732:Kn,770:Kn,771:Kn,8730:[.95003,1.45,0,0,1],8968:On,8969:On,8970:On,8971:On,10216:Dn,10217:Dn},"Size4-Regular":{32:$,40:Md,41:Md,47:Sd,91:_d,92:Sd,93:_d,123:zn,125:zn,160:$,710:Rn,732:Rn,770:Rn,771:Rn,8730:[1.25003,1.75,0,0,1],8968:Fn,8969:Fn,8970:Fn,8971:Fn,9115:Nn,9116:Ad,9117:Nn,9118:Nn,9119:Ad,9120:Nn,9121:In,9122:_s,9123:In,9124:In,9125:_s,9126:In,9127:Ld,9128:Cd,9129:Ed,9130:[0,.3,0,0,.88889],9131:Ld,9132:Cd,9133:Ed,9143:[.88502,.915,0,0,1.05556],10216:zn,10217:zn,57344:Td,57345:Td,57680:Vn,57681:Vn,57682:Vn,57683:Vn},"Typewriter-Regular":{32:Dd,33:C,34:C,35:C,36:Ge,37:Ge,38:C,39:C,40:Ge,41:Ge,42:[0,.52083,0,0,.525],43:Pd,44:[.13889,.125,0,0,.525],45:Pd,46:[0,.125,0,0,.525],47:Ge,48:C,49:C,50:C,51:C,52:C,53:C,54:C,55:C,56:C,57:C,58:Se,59:[.13889,.43056,0,0,.525],60:Bd,61:[-.19549,.41562,0,0,.525],62:Bd,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,.525],82:C,83:C,84:C,85:C,86:C,87:C,88:C,89:C,90:C,91:Ge,92:Ge,93:Ge,94:C,95:[.09514,0,0,0,.525],96:C,97:Se,98:C,99:Se,100:C,101:Se,102:C,103:co,104:C,105:C,106:[.22222,.61111,0,0,.525],107:C,108:C,109:Se,110:Se,111:Se,112:co,113:co,114:Se,115:Se,116:[0,.55358,0,0,.525],117:Se,118:Se,119:Se,120:Se,121:co,122:Se,123:Ge,124:Ge,125:Ge,126:C,127:C,160:Dd,176:C,184:[.19445,0,0,0,.525],305:Se,567:co,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],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,.525]}};var jm=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,ht=10,_e=.25,zd=1.2,pt=.431,As={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[pt,pt,pt],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],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:[_e,_e,_e],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]},uo=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],ci=5,Od={"\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 Et(e,t){e===void 0&&(e=77);let r=Kd[t][e];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};let i=String.fromCodePoint(e);if(i in Od)e=Od[i].codePointAt(0);else if(jm.test(i))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Ls={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"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["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],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["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],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Cs={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]},Rd={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 Fd(e){if(Cs[e]){let[c,u,d]=Cs[e],p=`<span class="stretchy" style="height:${d}em"><svg width="100%" height="${d}em" viewBox="0 0 ${c} ${u}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Rd[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${d/2}em;min-width:0">${p}</span>`}let[t,r,i,o]=Ls[e],n,a,s=i/1e3;t.length===3?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],a=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(n=["slice-1-of-2","slice-2-of-2"],a=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],a=[o]);let l=t.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="${Rd[c]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${s}em;min-width:${r}em;">${l}</span>`}function Nd(e){return Ls[e]?Ls[e][2]/1e3:Cs[e][2]}function Wm(e){let t=[];for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===13&&e.charCodeAt(r+1)===10&&(i=10,r++),(i===13||i===12)&&(i=10),i===0&&(i=65533),i>=55296&&i<=56319){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343){let n=i-55296,a=o-56320;i=2**16+n*2**10+a,r++}}t.push(i)}return t}var qn=8205,Um=[[qn,1],[65038,2],[127995,5],[129456,4],[917536,96]],$n,Id=[127462,127487];function Vd(e){var t;if($n===void 0){$n={};for(let r of Um)for(let i=r[0];i<=r[0]+r[1]-1;i++)$n[i]=!0}return(t=$n[e])!=null?t:!1}function Jm(e){return e>=Id[0]&&e<=Id[1]}function Hn(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;let t=[],r=Wm(e),i=0;for(;i<r.length;){let o=r[i++],n=r[i];if(n===qn){let a=i-1;for(i+=2;r[i]===qn;)i+=2;t.push(String.fromCodePoint(...r.slice(a,i-a+1)))}else if(Vd(n)){let a=i-1;for(;Vd(r[i]);)i+=r[i]===qn?2:1;t.push(String.fromCodePoint(...r.slice(a,2*i-a-1)))}else Jm(o)?(i+=1,t.push(String.fromCodePoint(...r.slice(i-2,2)))):t.push(String.fromCodePoint(o))}return t}var Es=class{constructor(t){this.s=Hn(t),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(t){let r=typeof this.s=="string"?t.exec(this.s.slice(this.pos)):t.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 t=this.get();if(t==="\\"){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(t==="{")return"<{>";if(t==="}")return"<}>";if(t==="^"){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 t}else if(t==="#"){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(t==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return t}};function Gm(e,t){var o,n,a,s;let r=[],i=e.next();if(i&&i!=="\\relax"){if(i==="\\noexpand")i=e.next(),i&&r.push(i);else if(i==="\\obeyspaces")e.obeyspaces=!0;else if(i==="\\bgroup")r.push("<{>");else if(i==="\\egroup")r.push("<}>");else if(i==="\\string"){if(i=e.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(;e.peek()==="<space>";)e.next();let l="",c=!1,u=[];do{if(u.length===0)if(/^#[\d?@]$/.test(e.peek())){let d=e.get().slice(1);u=mo((n=(o=t==null?void 0:t(d))!=null?o:t==null?void 0:t("?"))!=null?n:"\\placeholder{}",t),i=u[0]}else i=e.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(...mo((s=(a=t==null?void 0:t(l))!=null?a:t==null?void 0:t("?"))!=null?s:"\\placeholder{}",t))}else r.push(i)}return r}function mo(e,t=null){let r=[],i="";for(let a of e.toString().split(/\r?\n/)){i&&r.push(i),i=" ";let s=a.match(/((?:\\%)|[^%])*/);s!==null&&r.push(s[0])}let o=new Es(r.join("")),n=[];do n.push(...Gm(o,t));while(!o.end());return n}function B(e){let t="",r=[];for(let i of e)i&&(t&&/^[a-zA-Z\*]/.test(i)&&r.push(t),r.push(i),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(i)&&r.push(" "),t=/\\[a-zA-Z]+\*?$/.test(i)?" ":"");return r.join("")}function O(e,...t){return e.startsWith("\\"),t.length===0?e:B([e,...t.map(r=>`{${r}}`)])}function ui(e){return B(e.map(t=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}var Mr=class Mr{constructor(t){Mr._registry[t]=this}static createAtom(t,r,i){return Mr._registry[t].createAtom(r,ee(r,t),i)}static serialize(t,r){var i;if(!t||t.length===0)return"";if((i=r.skipStyles)!=null&&i){let o=[];for(let n of qd(t)){let a=Mr._registry[n[0].mode];o.push(...a.serialize(n,r))}return B(o)}return B(Zm(t,r))}static getFont(t,r,i){return Mr._registry[t].getFont(r,i)}};Mr._registry={};var se=Mr;function qd(e){let t=[],r=[],i="NONE";for(let o of e)o.type!=="first"&&(o.mode!==i?(r.length>0&&t.push(r),r=[o],i=o.mode):r.push(o));return r.length>0&&t.push(r),t}function ft(e,t){let r=[],i=[],o;for(let n of e)if(n.type!=="first"&&n.style){let a;t==="variant"?(a=n.style.variant,n.style.variantStyle&&n.style.variantStyle!=="up"&&(a+="-"+n.style.variantStyle)):a=n.style[t],a===o?i.push(n):(i.length>0&&r.push(i),i=[n],o=a)}return i.length>0&&r.push(i),r}function $d(e,t){var n;let{parent:r}=e[0],i=r==null?void 0:r.computedStyle.color,o=[];for(let a of qd(e)){let s=t.defaultMode;for(let l of ft(a,"color")){let c=l[0].computedStyle,u=se._registry[l[0].mode].serialize(l,g(m({},t),{defaultMode:s==="text"?"text":"math"}));!t.skipStyles&&c.color&&c.color!=="none"&&(!r||i!==c.color)?o.push(O("\\textcolor",(n=c.verbatimColor)!=null?n:c.color,B(u))):o.push(B(u))}}return o}function Xm(e,t){let{parent:r}=e[0],i=r==null?void 0:r.computedStyle.backgroundColor;return ft(e,"backgroundColor").map(o=>{var n;if(o.length>0||o[0].type!=="box"){let a=o[0].computedStyle;if(a.backgroundColor&&a.backgroundColor!=="none"&&(!r||i!==a.backgroundColor))return O("\\colorbox",(n=a.verbatimBackgroundColor)!=null?n:a.backgroundColor,B($d(o,g(m({},t),{defaultMode:"text"}))))}return B($d(o,t))})}function Zm(e,t){if(e.length===0)return[];let{parent:r}=e[0],i=r==null?void 0:r.computedStyle.fontSize,o=[];for(let n of ft(e,"fontSize")){let a=n[0].computedStyle.fontSize,s=Xm(n,t);s&&(a&&a!=="auto"&&(!r||i!==a)?o.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][a],...s):o.push(...s))}return o}function Wn(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function Sr(e){if(e.length===0)return"ord";let t=Wn(e[0].type),r=Wn(e[e.length-1].type);return t&&t===r?t:"ord"}function jn(e,t){if(typeof e=="string")return e;if(typeof e=="number"){Number.isFinite(e);let r=Math.ceil(100*e)/100;return r===0?"0":r.toString()+(t!=null?t:"")}return""}var k=class e{constructor(t,r){var o,n,a,s,l,c;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:Q(t)?this.children=t.filter(u=>u!==null):t&&t instanceof e&&(this.children=[t]),this.children)for(let u of this.children)u.parent=this;if(this.type=(o=r==null?void 0:r.type)!=null?o:"ignore",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.isTight=(a=r==null?void 0:r.isTight)!=null?a:!1,r!=null&&r.properties)for(let u of Object.keys(r.properties))this.setStyle(u,r.properties[u]);r!=null&&r.attributes&&(this.attributes=r.attributes);let i=r==null?void 0:r.fontFamily;if(r!=null&&r.style&&this.value&&(i=(l=se.getFont((s=r.mode)!=null?s:"math",this,g(m({variant:"normal"},r.style),{letterShapeStyle:r.letterShapeStyle})))!=null?l:void 0),i||(i="Main-Regular"),this.height=0,this.depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,this.type==="latex")this.height=.8,this.depth=.2,this._width=1;else if(typeof t=="number"){let u=Et(t,i);this.height=u.height,this.depth=u.depth,this._width=u.width,this.skew=u.skew,this.italic=u.italic}else if(this.value){this.height=-1/0,this.depth=-1/0,this._width=0,this.skew=-1/0,this.italic=-1/0;for(let u=0;u<this.value.length;u++){let d=Et(this.value.codePointAt(u),i);this.height=Math.max(this.height,d.height),this.depth=Math.max(this.depth,d.depth),this._width+=d.width,this.skew=d.skew,this.italic=d.italic}}else if(this.children&&this.children.length>0)if(this.children.length===1){let u=this.children[0];this.height=u.height,this.depth=u.depth,this._width=u.width,this.maxFontSize=u.maxFontSize,this.skew=u.skew,this.italic=u.italic}else{let u=-1/0,d=-1/0,p=0,h=0;for(let f of this.children)f.height>u&&(u=f.height),f.depth>d&&(d=f.depth),h=Math.max(h,(c=f.maxFontSize)!=null?c:0),p+=f.width;this.height=u,this.depth=d,this._width=p,this.maxFontSize=h}(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.width)!==void 0&&(this.width=r.width),(r==null?void 0:r.maxFontSize)!==void 0&&(this.maxFontSize=r.maxFontSize)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(let r of this.children)r.selected(t)}setStyle(t,r,i){if(r===void 0)return;let o=jn(r,i);o.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=o)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=jn(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=jn(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=jn(t,"em")))}get width(){return this._width}set width(t){this._width=t,this.hasExplicitWidth=!0}wrap(t){let r=t.parent;if(!r)return this;t.isPhantom&&this.setStyle("opacity",0);let i=t.color;i&&i!==r.color&&this.setStyle("color",i);let o=t.backgroundColor;this.isSelected&&(o=Ol(o)),o&&o!==r.backgroundColor&&(this.setStyle("background-color",o),this.setStyle("display","inline-block")),this.scale;let n=t.scalingFactor;return this.scale=n,this.height*=n,this.depth*=n,this._width*=n,this.skew*=n,this.italic*=n,this}toMarkup(){var c,u,d,p;let t=(c=this.value)!=null?c:"";if(this.children)for(let h of this.children)t+=h.toMarkup();let r="";if(this.svgBody)r=Fd(this.svgBody);else if(this.svgOverlay){r='<span style="',r+="display: inline-block;",r+=`height:${this.height+this.depth}em;`,r+=`vertical-align:${this.depth}em;`,r+='">',r+=t,r+="</span>",r+='<svg style="position:absolute;overflow:overlay;',r+=`height:${this.height+this.depth}em;`;let h=(u=this.cssProperties)==null?void 0:u.padding;h?(r+=`top:${h};`,r+=`left:${h};`,r+=`width:calc(100% - 2 * ${h} );`):r+="top:0;left:0;width:100%;",r+="z-index:2;",r+='"',this.svgStyle&&(r+=` style="${this.svgStyle}"`),r+=`>${this.svgOverlay}</svg>`}let i="",o=this.classes.split(" ");o.push((d={latex:"ML__latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?d:""),this.caret==="latex"&&o.push("ML__latex-caret"),this.isSelected&&o.push("ML__selected");let n=o.length===1?o[0]:o.filter((h,f,x)=>h.length>0&&x.indexOf(h)===f).join(" ");if(n.length>0&&(i+=` class="${n}"`),this.id&&(i+=` data-atom-id=${this.id}`),this.cssId&&(i+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(i+=" "+Object.keys(this.attributes).map(h=>`${h}="${this.attributes[h]}"`).join(" ")),this.htmlData){let h=this.htmlData.split(",");for(let f of h){let x=f.match(/([^=]+)=(.+$)/);if(x){let M=x[1].trim().replace(/ /g,"-");M&&(i+=` data-${M}="${x[2]}" `)}else{let M=f.trim().replace(/ /g,"-");M&&(i+=` data-${M} `)}}}let a=(p=this.cssProperties)!=null?p:{};this.hasExplicitWidth&&(a.width,a.width=`${Math.round(this._width*100)/100}em`);let s=Object.keys(a).map(h=>`${h}:${a[h]}`);if(this.scale!==void 0&&this.scale!==1&&(t.length>0||r.length>0)&&s.push(`font-size: ${Math.round(this.scale*1e4)/100}%`),this.htmlStyle){let h=this.htmlStyle.split(";"),f="";for(let x of h){let M=x.match(/([^=]+):(.+$)/);if(M){let v=M[1].trim().replace(/ /g,"-");v&&(f+=`${v}:${M[2]};`)}}f&&(i+=` style="${f}"`)}s.length>0&&(i+=` style="${s.join(";")}"`);let l="";return i.length>0||r.length>0?l=`<span${i}>${t}${r}</span>`:l=t,this.caret==="text"?l+='<span class="ML__text-caret"></span>':this.caret==="math"&&(l+='<span class="ML__caret"></span>'),l}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;let r=this.children&&this.children.length>0,i=t.children&&t.children.length>0;if(r||i)return!1;if(t.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(t.cssProperties&&l in t.cssProperties||this.cssProperties&&l in this.cssProperties)return!1}let o=this.cssProperties?Object.keys(this.cssProperties).length:0,n=t.cssProperties?Object.keys(t.cssProperties).length:0;if(o!==n)return!1;if(o>0){for(let l of Object.keys(this.cssProperties))if(this.cssProperties[l]!==t.cssProperties[l])return!1}let a=this.classes.trim().replace(/\s+/g," ").split(" "),s=t.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+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Ts(e){if(!e||e.length===0)return[];e[0].children=Ts(e[0].children);let t=[e[0]];for(let r=1;r<e.length;r++)t[t.length-1].tryCoalesceWith(e[r])||(e[r].children=Ts(e[r].children),t.push(e[r]));return t}function er(e){return e.children&&(e.children=Ts(e.children)),e}function tr(e,t){if(!e)return new k(null,t);let r=new k(null,{classes:"ML__strut",type:"ignore"});r.setStyle("height",Math.max(0,e.height),"em");let i=[r];if(e.depth!==0){let o=new k(null,{classes:"ML__strut--bottom",type:"ignore"});o.setStyle("height",e.height+e.depth,"em"),o.setStyle("vertical-align",-e.depth,"em"),i.push(o)}return i.push(e),new k(i,g(m({},t),{type:"lift"}))}function Un(e,t,r){return e.svgOverlay=t,e.svgStyle=r,e}function di(e){let t=Nd(e)/2,r=new k(null,{height:t+.166,depth:t-.166,maxFontSize:0});return r.svgBody=e,r}function Ym(e){if("individualShift"in e){let t=e.individualShift,r=t[0],i=[r],o=-r.shift-r.box.depth,n=o;for(let a=1;a<t.length;a++){let s=t[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 e){let t=e.top;for(let r of e.children)t-=typeof r=="number"?r:r.box.height+r.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){let t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){let t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}function Qm(e){var p;let[t,r]=Ym(e);if(!t)return[[],0,0];let i=0;for(let h of t)if(typeof h!="number"){let f=h.box;i=Math.max(i,f.maxFontSize,f.height)}i+=2;let o=new k(null,{classes:"pstrut",height:i});o.setStyle("height",i,"em");let n=[],a=r,s=r,l=r;for(let h of t){if(typeof h=="number")l+=h;else{let f=h.box,x=(p=h.classes)!=null?p:[],M=new k([o,f],{classes:x.join(" "),style:h.style});f.setStyle("height",f.height+f.depth,"em"),f.setStyle("display","inline-block"),M.setStyle("top",-i-l-f.depth,"em"),h.marginLeft&&M.setStyle("margin-left",h.marginLeft,"em"),h.marginRight&&M.setStyle("margin-right",h.marginRight,"em"),n.push(M),l+=f.height+f.depth}a=Math.min(a,l),s=Math.max(s,l)}let c=new k(n,{classes:"vlist"});if(c.setStyle("height",s,"em"),a>=0)return[[new k(c,{classes:"vlist-r"})],s,-a];let u=new k(new k(null),{classes:"vlist"});u.setStyle("height",-a,"em");let d=new k(8203,{classes:"vlist-s",maxFontSize:0,height:0,depth:0});return[[new k([c,d],{classes:"vlist-r"}),new k(u,{classes:"vlist-r"})],s,-a]}var W=class extends k{constructor(t,r){var a;let[i,o,n]=Qm(t);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 Hd(e,t){var c,u,d,p,h;let r=e.metrics,i=new k(t.base),o=(c=t.baseShift)!=null?c:0,n=(u=t.slant)!=null?u:0,a=0,s=0;t.above&&(a=(d=t.aboveShift)!=null?d:Math.max(r.bigOpSpacing1,r.bigOpSpacing3-t.above.depth)),t.below&&(s=(p=t.belowShift)!=null?p:Math.max(r.bigOpSpacing2,r.bigOpSpacing4-t.below.height));let l=null;if(t.below&&t.above){let f=r.bigOpSpacing5+t.below.height+t.below.depth+s+i.depth+o;l=new W({bottom:f,children:[r.bigOpSpacing5,{box:t.below,marginLeft:-n,classes:["ML__center"]},s,{box:i,classes:["ML__center"]},a,{box:t.above,marginLeft:n,classes:["ML__center"]},r.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)l=new W({top:i.height-o,children:[r.bigOpSpacing5,{box:t.below,marginLeft:-n,classes:["ML__center"]},s,{box:i,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){let f=i.depth+o;l=new W({bottom:f,children:[{box:i,classes:["ML__center"]},a,{box:t.above,marginLeft:n,classes:["ML__center"]},r.bigOpSpacing5]}).wrap(e)}else{let f=i.depth+o;l=new W({bottom:f,children:[{box:i},r.bigOpSpacing5]}).wrap(e)}return new k(l,{type:(h=t.type)!=null?h:"op"})}var Jn=7,ho=6,fo=5,rr=4,_r=3,Te=2,ir=1,ye=0,gt=class{constructor(t,r,i){this.id=t,this.sizeDelta=r,this.cramped=i;let o={"-4":2,"-3":1,0:0}[r];this.metrics=Object.keys(As).reduce((n,a)=>g(m({},n),{[a]:As[a][o]}),{})}getFontSize(t){return Math.max(1,t+this.sizeDelta)}get sup(){return Xe[[ye,ir,ye,ir,Te,_r,Te,_r][this.id]]}get sub(){return Xe[[ye,ye,ye,ye,Te,Te,Te,Te][this.id]]}get fracNum(){return Xe[[ye,ir,ye,ir,Te,_r,rr,fo][this.id]]}get fracDen(){return Xe[[ye,ye,ye,ye,Te,Te,rr,rr][this.id]]}get cramp(){return Xe[[ye,ye,Te,Te,rr,rr,ho,ho][this.id]]}get isTight(){return this.sizeDelta<0}},po={7:new gt(Jn,0,!1),6:new gt(ho,0,!0),5:new gt(fo,0,!1),4:new gt(rr,0,!0),3:new gt(_r,-3,!1),2:new gt(Te,-3,!0),1:new gt(ir,-4,!1),0:new gt(ye,-4,!0)},Xe=g(m({},po),{displaystyle:po[Jn],textstyle:po[fo],scriptstyle:po[_r],scriptscriptstyle:po[ir]});function Bs(e,t){var i;if(!e)return 0;let r={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:ht,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(i=e.unit)!=null?i:"pt"];if(Number.isFinite(t)){let o=10**t;return Math.round(e.dimension/ht*r*o)/o}return e.dimension*r}function Gn(e,t){if(e===null)return 0;let r=Bs(e)/ht;if(Number.isFinite(t)){let i=10**t;return Math.round(r*i)/i}return r}function Ps(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function ep(e){let t=Ps(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Ps(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Ps(e.shrink)}`),t}function le(e){var r,i;if(e==null)return null;let t="";if("dimension"in e&&(t=`${e.dimension}${(r=e.unit)!=null?r:"pt"}`),"glue"in e&&(t=ep(e)),"number"in e)if(!("base"in e)||e.base==="decimal")t=Number(e.number).toString();else if(e.base==="alpha")t=`\`${String.fromCodePoint(e.number)}`;else{let o=Math.round(e.number)>>>0;e.base==="hexadecimal"?(t=Number(o).toString(16).toUpperCase(),o<=255?t=t.padStart(2,"0"):o<=65535?t=t.padStart(4,"0"):o<=16777215?t=t.padStart(6,"0"):t=t.padStart(8,"0"),t=`"${t}`):e.base==="octal"&&(t=Number(o).toString(8),o<=63?t=t.padStart(2,"0"):o<=30583?t=t.padStart(4,"0"):t=t.padStart(8,"0"),t=`'${t}`)}return"register"in e&&("factor"in e&&(e.factor===-1?t="-":e.factor!==1&&(t=Number(e.factor).toString())),"global"in e&&e.global&&(t+="\\global"),t+=`\\${e.register}`),"string"in e&&(t=e.string),(i=e.relax)!=null&&i&&(t+="\\relax"),t}function Ze(e,t){return e==null?null:"number"in e?g(m({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?g(m({},e),{factor:e.factor*t}):g(m({},e),{factor:t}):"dimension"in e?g(m({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:Ze(e.glue,t),shrink:Ze(e.shrink,t),grow:Ze(e.grow,t)}:e.shrink?{glue:Ze(e.glue,t),shrink:Ze(e.shrink,t)}:e.grow?{glue:Ze(e.glue,t),grow:Ze(e.grow,t)}:{glue:Ze(e.glue,t)}:null}var tp={"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 Xn(){return m({},tp)}function go(){return{registers:Xn(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:j.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:gr,backgroundColorMap:Gr,getMacro:e=>Qo(e,Zr())}}var P=class e{constructor(t,r){var n,a,s,l,c,u,d,p,h,f,x,M,v,b,A;let i;t!=null&&t.parent?(this.parent=t.parent,i=t.parent,this.registers={}):(i=m(m({},go()),(n=t==null?void 0:t.from)!=null?n:{}),this.registers=i.registers),i.atomIdsSettings&&(this.atomIdsSettings=m({},i.atomIdsSettings)),this.renderPlaceholder=i.renderPlaceholder,this.isPhantom=(l=(s=t==null?void 0:t.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=(p=(d=this.parent)==null?void 0:d.backgroundColor)!=null?p:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((h=this.parent)==null?void 0:h.size)?this.size=r.fontSize:this.size=(x=(f=this.parent)==null?void 0:f.size)!=null?x:ci;let o=(v=(M=this.parent)==null?void 0:M.mathstyle)!=null?v:Xe.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(i instanceof e)switch(t.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(t.mathstyle){case"textstyle":o=Xe.textstyle;break;case"displaystyle":o=Xe.displaystyle;break;case"scriptstyle":o=Xe.scriptstyle;break;case"scriptscriptstyle":o=Xe.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=o,this.smartFence=i.smartFence,this.placeholderSymbol=i.placeholderSymbol,this.colorMap=(b=i.colorMap)!=null?b:_=>_,this.backgroundColorMap=(A=i.backgroundColorMap)!=null?A:_=>_,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 t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===Jn||this.mathstyle.id===ho}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(uo[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){var r;if((r=this.registers)!=null&&r[t])return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){let r=this.getRegister(t);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(t){var r;if((r=this.registers)!=null&&r[t]){let i=this.registers[t];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(t)}getRegisterAsEm(t,r){return Gn(this.getRegisterAsDimension(t),r)}getRegisterAsDimension(t){var r;if((r=this.registers)!=null&&r[t]){let i=this.registers[t];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(t)}setRegister(t,r){if(r===void 0){delete this.registers[t];return}this.registers[t]=r}evaluate(t){if(!t||!("register"in t))return t;let r=this;if("global"in t&&t.global)for(;r.parent;)r=r.parent;let i=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(i=t.factor);let o=r.getRegister(t.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?g(m({},n),{dimension:i*n.dimension}):"glue"in n?g(m({},n),{glue:g(m({},n.glue),{dimension:i*n.glue.dimension}),shrink:n.shrink?g(m({},n.shrink),{dimension:i*n.shrink.dimension}):void 0,grow:n.grow?g(m({},n.grow),{dimension:i*n.grow.dimension}):void 0}):t}toDimension(t){let r=this.evaluate(t);return r===void 0?null:"dimension"in r?r:"glue"in r?r.glue:"number"in r?{dimension:r.number}:null}toEm(t,r){if(t===null)return 0;let i=this.toDimension(t);return i===null?0:Bs(i,r)/ht}toNumber(t){if(t===null)return null;let r=this.evaluate(t);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(t){var i,o;if(t===null)return null;let r=this.evaluate(t);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(t){var i,o;if(t===null)return null;let r=this.evaluate(t);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 nr=["body","above","below","superscript","subscript"];function or(e){return typeof e=="string"&&nr.includes(e)}function yo(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var y=class e{constructor(t){this.subsupPlacement=void 0;this.explicitSubsupPlacement=!1;var r,i,o,n,a,s,l,c,u;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(i=(r=t.command)!=null?r:this.value)!=null?i:"",this.mode=(o=t.mode)!=null?o:"math",this.isFunction=(n=t.isFunction)!=null?n:!1,this.subsupPlacement=t.limits,this.style=(a=m({},t.style))!=null?a:{},this.displayContainsHighlight=(s=t.displayContainsHighlight)!=null?s:!1,this.captureSelection=(l=t.captureSelection)!=null?l:!1,this.skipBoundary=(c=t.skipBoundary)!=null?c:!1,this.verbatimLatex=(u=t.verbatimLatex)!=null?u:void 0,t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,r,i){var s;if(!r)return null;let o=rp(r),n=[];for(let l of o){let c=l[0].style,u=ip(t,l,{style:{color:c.color,backgroundColor:c.backgroundColor,fontSize:c.fontSize}});u&&n.push(u)}if(n.length===0)return null;let a=((s=i==null?void 0:i.classes)!=null?s:"").trim();return n.length===1&&!a&&!(i!=null&&i.type)?n[0].wrap(t):new k(n,{classes:a,type:i==null?void 0:i.type}).wrap(t)}static serialize(t,r){return se.serialize(t,r)}static commonAncestor(t,r){if(t===r||t.parent===r.parent)return t.parent;let i=new WeakSet,{parent:o}=t;for(;o;)i.add(o),o=o.parent;for(o=r.parent;o;){if(i.has(o))return o;o=o.parent}}static fromJson(t){return typeof t=="string"?new e({type:"mord",value:t,mode:"math"}):new e(t)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){let t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=m({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=op(this.args)),this._branches)for(let r of Object.keys(this._branches))this._branches[r]&&(t[r]=this._branches[r].filter(i=>i.type!=="first").map(i=>i.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:t}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){if(t){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:r}=this;for(;r;)r.parent||r._changeCounter++,"verbatimLatex"in r&&(r.verbatimLatex=void 0),r._children=void 0,r=r.parent}}_serialize(t){var i;if(!(t.expandMacro||t.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=ee(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?B([O(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?B([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":(i=this.command)!=null?i:Hl(this.mode,this.value)}bodyToLatex(t){var r;return se.serialize(this.body,g(m({},t),{defaultMode:(r=t.defaultMode)!=null?r:this.latexMode}))}aboveToLatex(t){return se.serialize(this.above,t)}belowToLatex(t){return se.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=g(m({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){let i=se.serialize(this.subscript,t);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=se.serialize(this.superscript,t);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 t=1,r=this.parent;for(;r;)r=r.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(or(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];let t=[];for(let r of nr)this._branches[r]&&t.push(r);return t}createBranch(t){return or(t),or(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return yo(this.parentBranch)?this.parentBranch[0]:-1}get col(){return yo(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}get computedStyle(){var o,n;let t=typeof this.style.verbatimColor=="string",r=typeof this.style.verbatimBackgroundColor=="string",i=m(m({},(n=(o=this.parent)==null?void 0:o.computedStyle)!=null?n:{}),this.style);return delete i.variant,delete i.variantStyle,r||delete i.verbatimBackgroundColor,t||delete i.verbatimColor,i}applyStyle(t){this.isDirty=!0,this.style=m(m({},this.style),t),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(t)}getInitialBaseElement(){var t,r,i;return this.hasEmptyBranch("body")?this:((t=this.body)==null||t[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(t){let r=this.branch(t);return r?(r.length>0,r[0].type,r.length===1):!0}setChildren(t,r){var o;if(!t||(or(r),!or(r)))return;(o=t[0])==null||o.type;let i=[this.makeFirstAtom(r),...t];this._branches?this._branches[r]=i:this._branches={[r]:i};for(let n of t)n.parent=this,n.parentBranch=r;this.isDirty=!0}makeFirstAtom(t){let r=new e({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=t,r}addChild(t,r){t.type,this.createBranch(r).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=r}addChildBefore(t,r){r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildAfter(t,r){r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildren(t,r){let i=this.createBranch(r);for(let o of t)o.parent=this,o.parentBranch=r,i.push(o);this.isDirty=!0}addChildrenAfter(t,r){t.length===0||t[0].type,r.parentBranch;let i=this.createBranch(r.parentBranch);i.splice(i.indexOf(r)+1,0,...t),this.isDirty=!0;for(let o of t)o.parent=this,o.parentBranch=r.parentBranch;return t[t.length-1]}removeBranch(t){let r=this.branch(t);if(or(t)&&(this._branches[t]=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(t){if(t.parent,t.type==="first")return;let r=this.branch(t.parentBranch),i=r.indexOf(t);i>=0,r.splice(i,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){let{siblings:t}=this;return t[t.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 t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){this.parent;let t=this.parent.branch(this.parentBranch);return t[t.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:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];let t=[];for(let r of nr)if(this._branches[r])for(let i of this._branches[r])t.push(...i.children),t.push(i);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;let r=ee(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);let i=new P({parent:t},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(t,r){var f;let i=r.base,o=this.superscript,n=this.subscript;if(!o&&!n)return i;let a=null,s=null,l=(f=r.isCharacterBox)!=null?f:this.isCharacterBox(),c=0;if(o){let x=new P({parent:t,mathstyle:"superscript"});a=e.createBox(x,o),l||(c=i.height-t.metrics.supDrop*x.scalingFactor)}let u=0;if(n){let x=new P({parent:t,mathstyle:"subscript"});s=e.createBox(x,n),l||(u=i.depth+t.metrics.subDrop*x.scalingFactor)}let d;t.isDisplayStyle?d=t.metrics.sup1:t.isCramped?d=t.metrics.sup3:d=t.metrics.sup2;let p=.5/ht/t.scalingFactor,h=null;if(s&&a){c=Math.max(c,d,a.depth+.25*t.metrics.xHeight),u=Math.max(u,t.metrics.sub2);let x=t.metrics.defaultRuleThickness;if(c-a.depth-(s.height-u)<4*x){u=4*x-(c-a.depth)+s.height;let v=.8*t.metrics.xHeight-(c-a.depth);v>0&&(c+=v,u-=v)}let M=this.isExtensibleSymbol&&i.italic?-i.italic:0;h=new W({individualShift:[{box:s,shift:u,marginLeft:M},{box:a,shift:-c}]}).wrap(t)}else s&&!a?(u=Math.max(u,t.metrics.sub1,s.height-.8*pt),h=new W({shift:u,children:[{box:s,marginRight:p,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!s&&a&&(c=Math.max(c,d,a.depth+.25*pt),h=new W({shift:-c,children:[{box:a,marginRight:p}]}));return new k([i,new k(h,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(t,r){let i=this.superscript?e.createBox(new P({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,o=this.subscript?e.createBox(new P({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!i&&!o?r.base.wrap(t):Hd(t,g(m({},r),{above:i,below:o}))}bind(t,r){if(!r||t.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=t.makeID()),r.atomID=this.id),r}createBox(t,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:Wn(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 k(i!=null?i:null,{type:o,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:g(m({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:n}):(u=e.createBox(t,i,{type:o,classes:n}))!=null?u:new k(null);return t.isTight&&(a.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(a.italic=0),a.right=a.italic,this.bind(t,a),this.caret&&!this.superscript&&!this.subscript&&(a.caret=this.caret),a}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function rp(e){let t,r=[],i=[];for(let o of e)if(!t&&!o.style)i.push(o);else{let n=o.computedStyle;t&&n.color===t.color&&n.backgroundColor===t.backgroundColor&&n.fontSize===t.fontSize?i.push(o):(i.length>0&&r.push(i),i=[o],t=n)}return i.length>0&&r.push(i),r}function ip(e,t,r){var s,l,c,u,d;if(!t||t.length===0)return null;let i=new P({parent:e},r.style),o=!((s=i.atomIdsSettings)!=null&&s.groupNumbers),n=[];if(t.length===1){let p=t[0],h=p.render(i);h&&(o&&p.isSelected&&h.selected(!0),n=[h])}else{let p="",h=!0;for(let f of t){(l=i.atomIdsSettings)!=null&&l.groupNumbers&&p&&(h&&f.isDigit()||!h&&Ds(f))&&(i.atomIdsSettings.overrideID=p);let x=f.render(i);i.atomIdsSettings&&(i.atomIdsSettings.overrideID=void 0),x&&((c=i.atomIdsSettings)!=null&&c.groupNumbers&&((f.isDigit()||Ds(f))&&(!p||h!==f.isDigit())&&(h=f.isDigit(),p=(u=f.id)!=null?u:""),p&&(!(f.isDigit()||Ds(f))||!f.hasEmptyBranch("superscript")||!f.hasEmptyBranch("subscript"))&&(p="")),o&&f.isSelected&&x.selected(!0),n.push(x))}}if(n.length===0)return null;let a=new k(n,g(m({isTight:i.isTight},r),{type:(d=r.type)!=null?d:"lift"}));return a.isSelected=n.every(p=>p.isSelected),a.wrap(i)}function Ds(e){return e.mode==="text"}function op(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof y?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}var Fe=class e extends y{constructor(t,r,i){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(i)}static fromJson(t){return new e(t.command,t.value,t.style)}render(t){let r=this.createBox(t);return this.caret&&(r.caret=this.caret),r}_serialize(t){var r;return(r=this.verbatimLatex)!=null?r:Xi("text",this.value.codePointAt(0))}};function jd(e,t){if(e.direction===t.direction){let r=e.ranges.length;if(t.ranges.length===r){let i=0;for(;i<r&&np(e.ranges[i],t.ranges[i])==="equal";)i++;return i===r?"equal":"different"}}return"different"}function np(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function X(e){let t=1/0,r=-1/0;for(let i of e.ranges)t=Math.min(t,i[0],i[1]),r=Math.max(r,i[0],i[1]);return[t,r]}function ap(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;let r=!1,i=!1,o=!1,n=!1,a=!1,s=!1,l=!1,c=!1,u=!1,d=!1,p=!1,h=!1,f=!1,x=!1,M=!1,v=e[0],b=0;for(;v!=null&&v.type&&/msubsup|placeholder/.test(v.type);)b+=1,v=e[b];return r=!v||v.type==="first",v&&(x=v.mode==="text",i=!x&&v.type==="mord"&&Xo.test(v.value),o=!x&&v.type==="mord"&&/\d+$/.test(v.value),n=!x&&v.isFunction,a=v.type==="genfrac",s=v.type==="surd",l=v.type==="mbin",c=v.type==="mrel",u=v.type==="mop",d=v.type==="mpunct"||v.type==="minner",p=v.type==="array",h=v.type==="mopen",f=v.type==="mclose"||v.type==="leftright",M=v.type==="space"),t.after.includes("nothing")&&r||t.after.includes("letter")&&i||t.after.includes("digit")&&o||t.after.includes("function")&&n||t.after.includes("frac")&&a||t.after.includes("surd")&&s||t.after.includes("binop")&&l||t.after.includes("relop")&&c||t.after.includes("operator")&&u||t.after.includes("punct")&&d||t.after.includes("array")&&p||t.after.includes("openfence")&&h||t.after.includes("closefence")&&f||t.after.includes("text")&&x||t.after.includes("space")&&M?t.value:""}function bo(e,t,r){return r?ap(e,r[t]):""}var Zn={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",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"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},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 Lr(e,t){var i;let r=(i=t==null?void 0:t.format)!=null?i:"auto";return r==="auto"&&([r,e]=sp(e)),r==="ascii-math"?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",Ae(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function Ae(e,t){var n,a,s;if(!e)return"";let r=!1,i,o=(n=t.inlineShortcuts)!=null?n:Zn;if(!r&&(e.startsWith("^")||e.startsWith("_"))&&(i=Ar(e.slice(1),{inlineShortcuts:o,noWrap:!0}),e=e[0]+"{"+i.match+"}",e+=Ae(i.rest,t),r=!0),r||(i=e.match(/^(sqrt|\u221A)(.*)/),i&&(i=Ar(i[2],{inlineShortcuts:o,noWrap:!0}),e="\\sqrt{"+((a=i.match)!=null?a:"\\placeholder{}")+"}",e+=Ae(i.rest,t),r=!0)),r||(i=e.match(/^(\\cbrt|\u221B)(.*)/),i&&(i=Ar(i[2],{inlineShortcuts:o,noWrap:!0}),e="\\sqrt[3]{"+((s=i.match)!=null?s:"\\placeholder{}")+"}",e+=Ae(i.rest,t),r=!0)),r||(i=e.match(/^abs(.*)/),i&&(i=Ar(i[1],{inlineShortcuts:o,noWrap:!0}),e="\\left|"+i.match+"\\right|",e+=Ae(i.rest,t),r=!0)),r||(i=e.match(/^["”“](.*?)["”“](.*)/),i&&(e="\\text{"+i[1]+"}",e+=Ae(i[2],t),r=!0)),r||(i=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),i&&(e=Wd(i[1],o),e+=Ae(i[2],t),r=!0)),!r&&/^([fgh])[^a-zA-Z]/.test(e)&&(i=Ar(e.slice(1),{inlineShortcuts:o,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+i.match+"\\right)":e[0]+i.match,e+=Ae(i.rest,t),r=!0),r||(i=e.match(/^([a-zA-Z]+)(.*)/),i&&(e=Wd(i[1],o),e+=Ae(i[2],t),r=!0)),!r)if(i=Ar(e,{inlineShortcuts:o,noWrap:!0}),i.match&&i.rest[0]==="/"){let l=Ar(i.rest.slice(1),{inlineShortcuts:o,noWrap:!0});l.match&&(e="\\frac{"+i.match+"}{"+l.match+"}"+Ae(l.rest,t)),r=!0}else i.match&&(e=e.startsWith("(")?"\\left("+i.match+"\\right)"+Ae(i.rest,t):i.match+Ae(i.rest,t),r=!0);return r||(i=e.match(/^(\s+)(.*)$/),i&&(e=" "+Ae(i[2],t),r=!0)),e}function Ar(e,t){let r="";e=e.trim();let i=e,o=e.charAt(0),n={"(":")","{":"}","[":"]"}[o];if(n){let a=1,s=1;for(;s<e.length&&a>0;)e[s]===o&&a++,e[s]===n&&a--,s++;a===0?(t.noWrap&&o==="("?r=Ae(e.substring(1,s-1),t):(o==="{"&&n==="}"&&(o="\\{",n="\\}"),r="\\left"+o+Ae(e.substring(1,s-1),t)+"\\right"+n),i=e.slice(Math.max(0,s))):(r=e.substring(1,s),i="")}else{let a=e.match(/^([a-zA-Z]+)/);if(a){let s=bo(null,e,t.inlineShortcuts);if(s)return s=s.replace("_{#?}",""),s=s.replace("^{#?}",""),{match:s,rest:e.slice(s.length)}}if(a=e.match(/^([a-zA-Z])/),a)return{match:a[1],rest:e.slice(1)};if(a=e.match(/^(-)?\d+(\.\d*)?/),a)return{match:a[0],rest:e.slice(a[0].length)};/^\\(left|right)/.test(e)||(a=e.match(/^(\\[a-zA-Z]+)/),a&&(i=e.slice(a[1].length),r=a[1]))}return{match:r,rest:i}}function Wd(e,t){let r=bo(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}var Ks=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Yn(e){let t=e.trim();for(let r of Ks)if(t.startsWith(r[0])&&t.endsWith(r[1]))return[!0,t.substring(r[0].length,t.length-r[1].length)];return[!1,e]}function sp(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=Yn(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}var lp="$$",cp="$$",Ud=(e,t,r)=>(Ks.some(i=>t.startsWith(i[0])&&t.endsWith(i[1]))||(t=`${lp} ${t} ${cp}`),t),mi=class mi{constructor(t){mi._modes[t]=this}static onPaste(t,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)?mi._modes[t].onPaste(r,i):!1}static onCopy(t,r){var a;if(!r.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}let i=t.model,o=i.selectionIsCollapsed?[0,i.lastOffset]:X(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 Fe).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",t.options.onExport(t,s,o))}catch(l){}if(n.length===1){let l=n[0];(l.type==="root"||l.type==="group")&&(n=l.body.filter(c=>c.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(i.getValue(o,"latex-unstyled")),u=JSON.stringify(c.json);u&&r.clipboardData.setData("application/json",u)}catch(c){}}}r.preventDefault()}static insert(t,r,i={}){var n;let o=i.mode==="auto"?t.mode:(n=i.mode)!=null?n:t.mode;return mi._modes[o].insert(t,r,i)}onPaste(t,r){return!1}insert(t,r,i){return!1}};mi._modes={};var q=mi;var Jd=[{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:"[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]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{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",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",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"]}],Gd={"\\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 pi(e,t,r,i){let o=t.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,e.addEventListener(a[1],r,s)}else e.addEventListener(n,r,i)}}function xo(e,t,r,i){let o=t.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,e.removeEventListener(a[1],r,s)}else e.removeEventListener(n,r,i)}}function Tt(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function up(e){var t,r;return(r=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?r:e.querySelector(".ML__latex-caret")}function hi(e){let t=up(e);if(!t)return null;let r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function dp(e){var r;if(!e.parent)return"root";let t=(r=e.parent.id)!=null?r:"";return t+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,t}function Os(e,t,r){if(!t)return null;let i=e.field.getBoundingClientRect(),o=t.right-t.left,n=t.bottom-t.top,a=Math.ceil(t.left-i.left+e.field.scrollLeft*r),s=Math.ceil(t.top-i.top);return{left:a,right:a+o,top:s,bottom:s+n}}function Xd(e){let t=e.getBoundingClientRect(),r=parseInt(getComputedStyle(e).marginRight),i={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+r};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return i;for(let o of e.children)if(o.nodeType===1&&"atomId"in o.dataset&&!o.classList.contains("pstrut")){let n=Xd(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 ar(e,t){var o,n;if(!t.id)return null;let r=(n=(o=e.atomBoundsCache)==null?void 0:o.get(t.id))!=null?n:null;if(r!==null)return r;let i=e.fieldContent.querySelector(`[data-atom-id="${t.id}"]`);return r=i?Xd(i):null,e.atomBoundsCache&&(r?e.atomBoundsCache.set(t.id,r):e.atomBoundsCache.delete(t.id)),r!=null?r:null}function mp(e,t,r){let i=new Map;for(let o of e.model.getAtoms(t,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&o.style.backgroundColor)continue;let n=e.field,a=parseFloat(getComputedStyle(n).width),l=n.getBoundingClientRect().width/a;l=isNaN(l)?1:l;let c=Os(e,ar(e,o),l);if(c){let u=dp(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 Qn(e,t){return e.model.selection.ranges.reduce((r,i)=>r.concat(...mp(e,i,t)),[])}function fi(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function zs(e){let t=0,r=0,i=e.offsetWidth,o=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,r+=e.offsetLeft,e=e.offsetParent;return new DOMRect(r,t,i,o)}var Zd=`@keyframes ML__caret-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.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;
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
--_selection-color: var(--selection-color, #000);
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
--_smart-fence-color: var(--smart-fence-color, currentColor);
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
--_latex-color: var(--latex-color, hsl(var(--_hue), 40%, 50%));
--_correct-color: var(--correct-color, #10a000);
--_incorrect-color: var(--incorrect-color, #a01b00);
--_composition-background-color: var(--composition-background-color, #fff1c2);
--_composition-text-color: var(--composition-text-color, black);
--_composition-underline-color: var(--composition-underline-color, transparent);
}
/* 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: hsl(var(--_hue), 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__composition {
background: var(--_composition-background-color);
color: var(--_composition-text-color);
text-decoration: underline var(--_composition-underline-color);
}
.ML__caret:after {
content: '';
border: none;
border-radius: 2px;
border-right: 2px solid var(--_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);
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);
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__focused .ML__text {
background: var(--_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);
color: var(--_smart-fence-color);
}
.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);
opacity: 1;
}
:host(:focus) .ML__selection {
box-sizing: border-box;
background: var(--_selection-background-color) !important;
}
.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);
}
.ML__contains-highlight {
background: var(--_contains-highlight-background-color);
box-sizing: border-box;
}
.ML__latex {
font-family: 'Berkeley Mono', '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);
}
.ML__suggestion {
opacity: 0.5;
}
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
background: hsl(var(--_hue), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
.ML__virtual-keyboard-toggle:focus {
outline: none;
border-radius: 8px;
border: 2px solid hsl(var(--_hue), 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), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
/* 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. */
}
.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);
box-shadow: 0 0 5px var(--_correct-color);
}
.ML__incorrectPromptBox {
outline: 1px solid var(--_incorrect-color);
box-shadow: 0 0 5px var(--_incorrect-color);
}
`;var Yd=`.ML__container {
min-height: auto !important;
--_hue: var(--hue, 212);
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
--_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);
}
.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);
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 {
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 .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__placeholder {
color: var(--_placeholder-color);
opacity: var(--_placeholder-opacity);
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;
}
/* 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;
--_selection-color: #fff;
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);
}
`;var Qd=`#mathlive-environment-popover.is-visible {
visibility: visible;
}
#mathlive-environment-popover {
--_environment-panel-height: var(--environment-panel-height, 70px);
--_accent-color: var(--accent-color, #0c75d8);
--_background: var(--environment-panel-background, #0c75d8);
--_button-background: var(--environment-panel-button-background, white);
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
--_button-text: var(--environment-panel-button-text, #e3e4e8);
position: absolute;
width: calc(var(--_environment-panel-height) * 2);
height: var(--_environment-panel-height);
border-radius: 4px;
border: 1.5px solid var(--_accent-color);
background-color: var(--_background);
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(--_environment-panel-height) * 5/4);
width: calc(var(--_environment-panel-height) * 5/4);
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
margin-top: calc(0px - var(--_environment-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(--_background);
stroke: var(--_accent-color);
stroke-width: 3px;
}
#mathlive-environment-popover .MLEP__array-buttons line {
stroke: var(--_accent-color);
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(--_accent-color);
}
#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(--_environment-panel-height);
height: var(--_environment-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(--_environment-panel-height) / 3 * 28 / 24);
height: calc(var(--_environment-panel-height) / 3 - 2px);
border-radius: calc(var(--_environment-panel-height) / 25);
background-color: var(--_button-background);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
background-color: var(--_button-background-hover);
}
#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(--_button-text);
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(--_button-background-active);
}
#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(--_accent-color);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
fill: var(--_accent-color);
}
`;var e0=`/* 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 t0=`/* 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), 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), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 50%, 25%);
}
}
body[theme='dark'] #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--_hue), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 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);*/
}
`;var r0=`.ML__keyboard {
--_keyboard-height: 0;
--_keyboard-zindex: var(--keyboard-zindex, 105);
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
--_padding-top: var(--keyboard-padding-top, 5px);
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_keycap-height: var(--keycap-height, 60px);
/* Keycap width (incl. margin) */
--_keycap-max-width: var(--keycap-max-width, 100px);
--_keycap-gap: var(--keycap-gap, 8px);
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
--_variant-keycap-length: var(--variant-keycap-length, 70px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
}
.is-math-mode .MLK__rows .if-text-mode,
.is-text-mode .MLK__rows .if-math-mode {
display: none;
}
.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;
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + 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(--_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);
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(--_padding-top);
padding-bottom: var(--_padding-bottom);
padding-left: var(--_padding-horizontal);
padding-right: var(--_padding-horizontal);
opacity: 0;
visibility: hidden;
transform: translate(0, 0);
background: var(--_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: var(--_padding-top);
left: var(--_padding-horizontal);
width: calc(100% - 2 * var(--_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);
}
.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 {
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
display: flex;
flex-flow: column;
align-items: center;
border-collapse: separate;
clear: both;
border: 0;
margin: 0;
margin-bottom: var(--_keycap-gap);
gap: var(--_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(--_row-padding-left);
padding-right: var(--_row-padding-right);
overflow-x: auto;
touch-action: none;
}
.MLK__rows > .row {
display: flex;
flex-flow: row;
justify-content: center;
width: 100%;
gap: var(--_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));
}
.MLK__rows > .row .small {
font-size: var(--_keycap-small-font-size);
}
.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(0.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .row .w15 {
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .row .w20 {
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .row .w50 {
width: calc(5 * var(--_keycap-width) - var(--_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(--_horizontal-rule);
}
.MLK__rows > .row .ghost {
background: var(--_toolbar-background);
border: none;
color: var(--_toolbar-text);
}
.MLK__rows > .row .ghost:hover {
background: var(--_toolbar-background-hover);
}
.MLK__rows > .row .bigfnbutton {
font-size: var(--_keycap-extra-small-font-size);
}
.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));
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(--_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(var(--_keycap-width) - var(--_keycap-gap));
height: var(--_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);
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) - 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(--_toolbar-text);
fill: currentColor;
background: var(--_toolbar-background);
font-size: var(--_toolbar-font-size);
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(--_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(--_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(--_toolbar-text-active);
}
.MLK__toolbar > div > div.selected {
color: var(--_toolbar-text-active);
background: var(--_toolbar-background-selected);
border-radius: 0;
border-bottom-color: var(--_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) + 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: var(--variant-keycap-length, 50px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-aside-font-size: var(--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: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--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);
}
.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: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--variant-keycap-length, 50px);
}
}
/* @xs breakpoint: iPhone 5 */
@container (max-width: 414px) {
.MLK__rows {
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
--_keycap-height: max(var(--_keycap-height), 42px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 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 {
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
--_keycap-height: max(var(--keycap-height, 52px), 52px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 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) / 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 {
--_keycap-height: max(var(--keycap-height, 42px), 42px);
}
.MLK__rows > .row > div > small {
font-size: 14px;
}
}
@media (max-height: 768px) {
.MLK__rows {
--_keycap-height: max(var(--keycap-height, 42px), 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 {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
}
/* Same as the media query, but with a class */
[theme='dark'] .ML__keyboard .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
[theme='light'] .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--_keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
}
`;var sr;function gi(e){let t="";switch(e){case"mathfield-element":t=`
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
: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;
}
@media (hover: none) and (pointer: coarse) {
:host(:not(:focus)) :first-child { pointer-events: none !important; }
}`;break;case"core":t=Yd;break;case"mathfield":t=Zd;break;case"environment-popover":t=Qd;break;case"suggestion-popover":t=e0;break;case"keystroke-caption":t=t0;break;case"virtual-keyboard":t=r0;break;default:}return t}function vo(e){return sr||(sr={}),sr[e]||(sr[e]=new CSSStyleSheet,sr[e].replaceSync(gi(e))),sr[e]}var yt;function Pe(e){var t;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;let r=window.document.createElement("style");r.id=`mathlive-style-${e}`,r.append(window.document.createTextNode(gi(e))),window.document.head.appendChild(r);return}if(yt||(yt={}),((t=yt[e])!=null?t:0)!==0)yt[e]+=1;else{let r=vo(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],yt[e]=1}}function Ne(e){if("adoptedStyleSheets"in document&&yt!=null&&yt[e]&&(yt[e]-=1,yt[e]<=0)){let t=sr[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}var lr=class e extends y{constructor(r){var i;super(g(m({},r),{type:"accent",body:(i=r.body)!=null?i:void 0}));r.accentChar?this.accent=r.accentChar:this.svgAccent=r==null?void 0:r.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(r){return new e(r)}toJson(){return g(m({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(r){var c;let i=new P({parent:r,mathstyle:"cramp"},this.style),o=(c=y.createBox(i,this.body))!=null?c:new k("\u25A2",{style:this.style}),n=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(n=o.skew);let a=Math.min(o.height,pt),s;if(this.svgAccent)s=di(this.svgAccent),a=i.metrics.bigOpSpacing1-a;else if(this.accent){let u=new k(this.accent,{fontFamily:"Main-Regular"});u.italic=0;let d=this.accent===8407?" ML__accent-vec":"";s=new k(new k(u),{classes:"ML__accent-body"+d})}s=new W({shift:0,children:[{box:new k(o)},-a,{box:s,marginLeft:o.left+2*n,classes:["ML__center"]}]});let l=new k(s,{type:"lift"});return this.caret&&(l.caret=this.caret),this.bind(i,l.wrap(i)),this.attachSupsub(i,{base:l})}};var yi={"(":")","{":"}","[":"]","|":"|","\\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"},bi=Object.fromEntries(Object.entries(yi).map(([e,t])=>[t,e]));function ea(e){var t;return(t={"[":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}[e])!=null?t:e.codePointAt(0)}function xp(e,t,r,i){var a;let n=new k(ea(e),{fontFamily:"Main-Regular",isSelected:i.isSelected,classes:"ML__small-delim "+((a=i.classes)!=null?a:"")}).wrap(t);return r&&n.setTop((1-t.scalingFactor)*_e),n}function i0(e,t,r,i,o){var s,l;let n=new P({parent:i,mathstyle:"textstyle"},o==null?void 0:o.style),a=new k(ea(e),{fontFamily:`Size${t}-Regular`,isSelected:o.isSelected,classes:((s=o.classes)!=null?s:"")+` ML__delim-size${t}`,type:(l=o.type)!=null?l:"ignore"}).wrap(n);return r&&a.setTop((1-n.scalingFactor)*_e),a}function o0(e,t,r,i,o){var Nt;let n,a,s,l;n=s=l=ea(e),a=null;let c="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?s=n=l=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?s=n=l=8741:e==="\\uparrow"?s=l=9168:e==="\\Uparrow"?s=l=8214:e==="\\downarrow"?n=s=9168:e==="\\Downarrow"?n=s=8214:e==="\\updownarrow"?(n=8593,s=9168,l=8595):e==="\\Updownarrow"?(n=8657,s=8214,l=8659):e==="["||e==="\\lbrack"?(n=9121,s=9122,l=9123,c="Size4-Regular"):e==="]"||e==="\\rbrack"?(n=9124,s=9125,l=9126,c="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(s=n=9122,l=9123,c="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(n=9121,s=l=9122,c="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(s=n=9125,l=9126,c="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(n=9124,s=l=9125,c="Size4-Regular"):e==="("||e==="\\lparen"?(n=9115,s=9116,l=9117,c="Size4-Regular"):e===")"||e==="\\rparen"?(n=9118,s=9119,l=9120,c="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(n=9127,a=9128,l=9129,s=9130,c="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(n=9131,a=9132,l=9133,s=9130,c="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(n=9127,l=9129,s=9130,c="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(n=9131,l=9133,s=9130,c="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(n=9127,l=9133,s=9130,c="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(n=9131,l=9129,s=9130,c="Size4-Regular"):e==="\\surd"?(n=57345,l=9143,s=57344,c="Size4-Regular"):e==="\\ulcorner"?(n=9484,s=l=32):e==="\\urcorner"?(n=9488,s=l=32):e==="\\llcorner"?(l=9492,s=n=32):e==="\\lrcorner"&&(n=9496,s=n=32);let u=Et(n,c),d=u.height+u.depth,p=Et(s,c),h=p.height+p.depth,f=Et(l,c),x=f.height+f.depth,M=0,v=1;if(a!==null){let fe=Et(a,c);M=fe.height+fe.depth,v=2}let b=d+x+M,A=Math.max(0,Math.ceil((t-b)/(v*h))),_=b+A*v*h,T=_e;r&&(T=T*i.scalingFactor);let E=_/2-T,R=.008,F=[];F.push({box:new k(l,{fontFamily:c})}),F.push(-R);let xe=new k(s,{fontFamily:c});if(a===null)for(let fe=0;fe<A;fe++)F.push({box:xe});else{for(let fe=0;fe<A;fe++)F.push({box:xe});F.push(-R),F.push({box:new k(a,{fontFamily:c})}),F.push(-R);for(let fe=0;fe<A;fe++)F.push({box:xe})}F.push(-R),F.push({box:new k(n,{fontFamily:c})});let je="";c==="Size1-Regular"?je=" delim-size1":c==="Size4-Regular"&&(je=" delim-size4");let nt=new W({bottom:E,children:F},{classes:je});return new k(nt,g(m({},o!=null?o:{}),{classes:((Nt=o==null?void 0:o.classes)!=null?Nt:"")+" ML__delim-mult"}))}var n0=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),vp=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),a0=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),wp=[0,1.2,1.8,2.4,3];function s0(e,t,r,i){return e===void 0||e==="."?Pt(r,i.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),n0.has(e)||a0.has(e)?i0(e,t,!1,r,i):vp.has(e)?o0(e,wp[t],!1,r,i):(""+e,null))}var kp=[{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}],Mp=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Sp=[{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 _p(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(e.type,"Size4-Regular")}function Ap(e,t,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=Et(e,_p(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(uo[Math.max(1,i.size-2)],i.minFontScale):r[n].mathstyle==="scriptstyle"&&(s*=Math.max(uo[Math.max(1,i.size-1)],i.minFontScale))),s>t)return r[n]}return r[r.length-1]}function xi(e,t,r,i,o,n){if(!t||t.length===0||t===".")return Pt(o);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let a;a0.has(t)?a=kp:n0.has(t)?a=Sp:a=Mp;let s=Ap(ea(t),r,a,o),l=new P({parent:o,mathstyle:s.mathstyle},n==null?void 0:n.style);return s.type==="small"?xp(t,l,i,g(m({},n),{type:e})):s.type==="large"?i0(t,s.size,i,l,g(m({},n),{type:e})):(s.type,o0(t,r,i,l,g(m({},n),{type:e})))}function Cr(e,t,r,i,o,n){if(t===".")return Pt(o,n==null?void 0:n.classes);let a=_e*o.scalingFactor,s=901,l=5/ht,c=Math.max(r-a,i+a),u=Math.max(c/500*s,2*c-l);return xi(e,t,u,!0,o,n)}function Pt(e,t){return new k(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore",width:e.getRegisterAsEm("nulldelimiterspace")}).wrap(new P({parent:e,mathstyle:"textstyle"}))}var be=class e extends y{constructor(t){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=t==null?void 0:t.mode)!=null?r:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new e(t)}toJson(){return super.toJson()}render(t){let r;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?r=t.renderPlaceholder(t):r=this.createBox(t),this.caret&&(r.classes+=" ML__placeholder-selected"),r}_serialize(){return"\\placeholder{}"}};var l0=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],c0=["cases","dcases","rcases"],u0=["align","align*","aligned","gather","gathered","split"],Lp=["array","subequations","eqnarray"];function d0(e){return Lp.concat(u0).concat(c0).concat(l0).includes(e)}function ta(e){return l0.includes(e)}function m0(e){return c0.includes(e)}function p0(e){return u0.includes(e)}function Cp(e,t,r){let i=0;for(let c of r)"align"in c&&(i+=1);let o=0,n=[];for(let c of t){let u=0;for(o=Math.max(o,Math.min(c.length,i));u<c.length;){let d=[],p=Math.min(c.length,u+i);for(;u<p;){let h=c[u];h.length===0?d.push([new y({type:"first",mode:e.mode})]):h[0].type!=="first"?d.push([new y({type:"first",mode:e.mode}),...h]):(h.slice(1).some(f=>f.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 y({type:"first",mode:e.mode}),new be]);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=e,d.parentBranch=[s,l];l+=1}s+=1}return e.isDirty=!0,a}var z=class e extends y{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=Cp(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 e(r.environmentName,r.array,r.rowGaps,r)}toJson(){let r=g(m({},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(yo(r))return(i=this.array[r[0]][r[1]])!=null?i:void 0}createBranch(r){var i;return yo(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(or(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 Ft,Nt,fe,$i,qi,Hi;let i=new P({parent:r,mathstyle:this.mathstyleName},this.style),o=i.getRegisterAsEm("arrayrulewidth"),n=i.getRegisterAsEm("arraycolsep"),a=i.getRegisterAsEm("doublerulesep"),s=(Nt=(Ft=this.arraystretch)!=null?Ft:i.getRegisterAsNumber("arraystretch"))!=null?Nt: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*zd,u=.7*c,d=.3*c,p=0,h=[],f=0,x=this.array.length;for(let ie=0;ie<x;++ie){let me=this.array[ie];f=Math.max(f,me.length);let Me=new P({parent:i,mathstyle:this.mathstyleName},this.style),pe=u/Me.scalingFactor,at=d/Me.scalingFactor,ji={cells:[],height:0,depth:0,pos:0};for(let Am of me){let Oa=(fe=y.createBox(Me,Am,{type:"ignore"}))!=null?fe:new k(null,{type:"ignore"});at=Math.max(at,Oa.depth),pe=Math.max(pe,Oa.height),ji.cells.push(Oa)}let Wi=($i=Gn(this.rowGaps[ie]))!=null?$i:0;Wi>0&&(Wi+=d,at=Math.max(at,Wi),Wi=0),ie<x-1&&!ta(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(at+=i.getRegisterAsEm("jot")),ji.height=pe,ji.depth=at,p+=pe,ji.pos=p,p+=at+Wi,h.push(ji)}let M=p/2+_e,v=[];for(let ie=0;ie<f;ie++){let me=[];for(let Me of h){let pe=Me.cells[ie];pe.depth=Me.depth,pe.height=Me.height,me.push({box:pe,shift:Me.pos-M})}me.length>0&&v.push(new W({individualShift:me}))}let b=[],A=!1,_=!1,T=0,E=!this.leftDelim,{colFormat:R}=this;for(let ie of R){if("align"in ie&&T>=v.length)break;if("align"in ie)A?b.push(ia(2*l)):(_||E)&&b.push(ia(l)),b.push(new k(v[T],{classes:"col-align-"+ie.align})),T++,A=!0,_=!1,E=!1;else if("gap"in ie){if(typeof ie.gap=="number")b.push(ia(ie.gap));else{let me=Ep(r,h,M,ie.gap);me&&b.push(me)}A=!1,_=!1,E=!1}else if("separator"in ie){let me=new k(null,{classes:"vertical-separator"});me.setStyle("height",p,"em"),me.setStyle("border-right",`${o}em ${ie.separator} currentColor`),me.setStyle("vertical-align",-(p-M),"em");let Me=0;_?Me=a-o:A&&(Me=l-o),me.left=Me,b.push(me),A=!1,_=!0,E=!1}}A&&!this.rightDelim&&b.push(ia(l));let F=new k(b,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(F.caret=this.caret),this.bind(r,F);let xe=F.height,je=F.depth,nt=this.bind(r,new k([this.bind(r,Cr("open",(qi=this.leftDelim)!=null?qi:".",xe,je,i,{isSelected:this.isSelected})),F,this.bind(r,Cr("close",(Hi=this.rightDelim)!=null?Hi:".",xe,je,i,{isSelected:this.isSelected}))],{type:"ord"}));return nt?(this.caret&&(nt.caret=this.caret),this.bind(r,this.attachSupsub(r,{base:nt}))):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(y.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}}`),B(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 y({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(ra(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(ra(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,ra(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,ra(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 ra(e){let t=new y({type:"first",mode:e.mode});t.parent=e;let r=new be;return r.parent=e,[t,r]}function ia(e){return new k(null,{classes:"arraycolsep",width:e})}function Ep(e,t,r,i){if(!i)return null;let o=[];for(let n of t){let a=y.createBox(e,i,{type:"ignore"});a&&(a.depth=n.depth,a.height=n.height,o.push({box:a,shift:n.pos-r}))}return new W({individualShift:o}).wrap(e)}var Ie=class e extends y{constructor(r){super({mode:r.mode,command:r.command,style:r.style,body:r.body,type:"box"});this.framecolor=r.framecolor,this.backgroundcolor=r.backgroundcolor,this.padding=r.padding,this.offset=r.offset,this.border=r.border}static fromJson(r){return new e(r)}toJson(){return g(m({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(r){var c,u,d,p;let i=y.createBox(r,this.body,{type:"lift"});if(!i)return null;let o=r.toEm((c=this.offset)!=null?c:{dimension:0});i.depth+=o;let n=new P({parent:r},this.style),a=n.toEm((u=this.padding)!=null?u:{register:"fboxsep"}),s=new k(null,{classes:"ML__box"});s.height=i.height+a,s.depth=i.depth+a,s.setStyle("box-sizing","border-box"),s.setStyle("position","absolute"),s.setStyle("top",-a+.3,"em"),s.setStyle("height",s.height+s.depth,"em"),s.setStyle("left",0),s.setStyle("width","100%"),this.backgroundcolor&&s.setStyle("background-color",(d=n.toColor(this.backgroundcolor))!=null?d:"transparent"),this.framecolor&&s.setStyle("border",`${n.getRegisterAsEm("fboxrule",2)}em solid ${(p=n.toColor(this.framecolor))!=null?p:"black"}`),this.border&&s.setStyle("border",this.border),i.setStyle("display","inline-block"),i.setStyle("position","relative"),i.setStyle("height",i.height+i.depth,"em"),i.setStyle("vertical-align",-i.height,"em");let l=new k([s,i],{type:"lift"});return l.setStyle("display","inline-block"),l.setStyle("position","relative"),l.setStyle("line-height",0),l.height=i.height+a+(o>0?o:0),l.depth=i.depth+a+(o<0?-o:0),l.setStyle("padding-left",a,"em"),l.setStyle("padding-right",a,"em"),l.setStyle("height",i.height+i.depth+2*a+Math.abs(o),"em"),l.setStyle("margin-top",-a,"em"),l.setStyle("top",i.depth-i.height+2*a-o,"em"),l.setStyle("vertical-align",i.depth+2*a,"em"),this.caret&&(l.caret=this.caret),this.attachSupsub(r,{base:l})}_serialize(r){return r.skipStyles?B([this.bodyToLatex(r),this.supsubToLatex(r)]):super._serialize(r)}};var vi=class e extends y{constructor(t,r){var i;super({type:"composition",mode:(i=r==null?void 0:r.mode)!=null?i:"math",value:t})}static fromJson(t){return new e(t.value,t)}toJson(){return super.toJson()}get computedStyle(){return{}}render(t){let r=new k(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}};var Ye=class e extends y{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new e(t.command)}toJson(){return super.toJson()}render(t){let r=this.createBox(t,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}};var wi=class e extends y{constructor(r,i,o){super({type:"group",mode:i,style:o});this.body=r,this.boxType=r.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,r&&r.length===1&&r[0].command===","&&(this.captureSelection=!0)}static fromJson(r){return new e(r.body,r.mode,r.style)}render(r){let i=y.createBox(r,this.body,{type:this.boxType});return i?(this.caret&&(i.caret=this.caret),this.bind(r,i)):null}_serialize(r){if(!(r.expandMacro||r.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,r):`{${this.bodyToLatex(r)}}`}};var H=class e extends y{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 e((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"?B(["\\left",(o=this.leftDelim)!=null?o:".",this.bodyToLatex(r),"\\right",i]):this.variant==="mleft...mright"?B(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(r),"\\mright",i]):B([!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=yi[r])!=null?o:r}render(r){var d,p,h;let i=new P({parent:r},this.style);this.body;let o=new P({parent:r,mathstyle:"textstyle"},this.style),n=(d=y.createBox(i,this.body,{type:"inner"}))!=null?d:new k(null,{type:"inner"}),a=n.height/o.scalingFactor,s=n.depth/o.scalingFactor,l=[];if(this.leftDelim&&l.push(this.bind(o,Cr("open",this.leftDelim,a,s,o,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),n&&(h0(n.children,this,i,a,s),l.push(n)),this.rightDelim){let f=this.containsCaret?" ML__contains-caret":"",x=this.rightDelim;x==="?"&&(i.smartFence?(x=this.matchingRightDelim(),f+=" ML__smart-fence__close"):x="."),l.push(this.bind(o,Cr("close",x,a,s,o,{isSelected:this.isSelected,classes:f+" ML__close",mode:this.mode,style:this.style})))}let c=(h=this.variant==="mleft...mright"||((p=this.leftSibling)==null?void 0:p.isFunction))!=null?h:!1,u=new k(l,{type:c?"close":"inner",classes:"left-right"});return this.caret&&(u.caret=this.caret),this.bind(i,u.wrap(i))}};function h0(e,t,r,i,o){if(e)for(let n=0;n<e.length;n++){let a=e[n];a.type==="middle"?(e[n]=t.bind(r,Cr("inner",a.value,i,o,r,{isSelected:t.isSelected})),e[n].caret=a.caret,e[n].isSelected=a.isSelected,e[n].cssId=a.cssId,e[n].htmlData=a.htmlData,e[n].htmlStyle=a.htmlStyle,e[n].attributes=a.attributes,e[n].cssProperties=a.cssProperties):a.children&&h0(a.children,t,r,i,o)}}var ki=class e extends y{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 e(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=y.createBox(r,this.body);return i?(this.caret&&(i.caret=this.caret),this.bind(r,i)):null}},oa=class e extends y{constructor(){super({type:"macro-argument"})}static fromJson(t){return new e}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}};var Mi=class e extends y{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 e(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=i.getRegisterAsEm("fboxsep"),n=o,a=y.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 k(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 k(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&&Un(c,u,""),s.setStyle("display","inline-block"),s.setStyle("height",a.height+a.depth,"em"),s.setStyle("vertical-align",-n,"em");let d=new k([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]"),O(o,i)}};var Bt=class e extends y{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}static fromJson(t){let r=new e(t);for(let i of nr)t[i]&&r.setChildren(t[i],i);return r}render(t){var a;let r=new P({parent:t,isPhantom:!0}),i=this.leftSibling,o=(a=i.render(r))!=null?a:new k(null),n=new k(null,{height:o.height,depth:o.depth});return this.attachSupsub(t,{base:n,isCharacterBox:i.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function Si(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var na=class{constructor(t,r,i){this.errors=[];this.index=0;this.endCount=0;var o,n,a,s;i!=null||(i={}),this.tokens=t,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(t){var o,n,a;let r=this.parsingContext,i={parent:r,mathlist:[],style:m({},r.style),parseMode:(o=t==null?void 0:t.mode)!=null?o:r.parseMode,mathstyle:(n=t==null?void 0:t.mathstyle)!=null?n:r.mathstyle,tabular:(a=t==null?void 0:t.tabular)!=null?a:!1};this.parsingContext=i}endContext(){this.parsingContext=this.parsingContext.parent}onError(t){this.errors.push(m({before:ui(this.tokens.slice(this.index,this.index+10)),after:ui(this.tokens.slice(Math.max(0,this.index-10),this.index))},t))}get mathlist(){return this.parsingContext.mathlist}set mathlist(t){this.parsingContext.mathlist=t}get parseMode(){return this.parsingContext.parseMode}set parseMode(t){this.parsingContext.parseMode=t}get tabularMode(){return this.parsingContext.tabular}get style(){let t=this.parsingContext;for(;t;){if(t.style)return m({},t.style);t=t.parent}return{}}set style(t){this.parsingContext.style=t}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(t){return this.tokens[this.index]===t?(this.index++,!0):!1}lastSubsupAtom(){let t;return this.mathlist.length>0&&(t=this.mathlist[this.mathlist.length-1],t.type==="subsup"||t.subsupPlacement!==void 0)||(t=new Bt({style:this.style}),this.mathlist.push(t)),t}hasPattern(t){return t.test(this.tokens[this.index])}hasInfixCommand(){var r;let{index:t}=this;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){let i=ee(this.tokens[t],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 t=this.peek();return t!=="\\\\"&&t!=="\\cr"&&t!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var r;let t=(r=this.args)==null?void 0:r.call(this,"?");return t?oe(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new be({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(t){let r=this.tokens[this.index];for(;r&&r!==t;)r=this.tokens[++this.index];r===t&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(t){let r=this.index,i=this.end(),o="";for(;!i;){let a=this.get();Si(a)?(o+=a,i=this.end()||o.length>=t.length):i=!0}let n=t.toUpperCase()===o.toUpperCase();return n||(this.index=r),n}scanString(){let t="";for(;!this.end();){let r=this.peek();if(r==="]")return t;if(r==="<space>")t+=" ";else if(r.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),t+=r.substring(1);else if(Si(r))t+=r;else return t;this.next()}return t}scanBalancedString(){let t="",r=this.end(),i=1;for(;!r;){let o=this.get();o==="<space>"?t+=" ":o==="<{>"?(t+="{",i+=1):o==="<}>"?(i-=1,i>0?t+="}":this.index-=1):o==="<$>"?t+="$":o==="<$$>"?t+="$$":t+=o,r=i===0||this.end()}return t}scanLiteralGroup(){var i;if(!this.match("<{>"))return"";let t="",r=1;for(;r>0&&!this.end();){let o=this.get();o==="<}>"?(r-=1,r>0&&(t+="}")):o==="<{>"?(r+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(o)&&(t+=" "),t+=(i={"<space>":" ","<$$>":"$$","<$>":"$"}[o])!=null?i:o)}return t}scanNumber(t=!0){var l,c;let r=!1,i=this.peek();for(;i==="<space>"||i==="+"||i==="-";)this.get(),i==="-"&&(r=!r),i=this.peek();t=!!t;let o=10,n=/\d/;if(this.match("'"))o=8,n=/[0-7]/,t=!0;else if(this.match('"'))o=16,n=/[\dA-F]/,t=!0;else if(this.match("x"))o=16,n=/[\dA-Fa-f]/,t=!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(!t&&(this.match(".")||this.match(",")))for(a+=".";this.hasPattern(n);)a+=this.get();let s=t?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 t=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=t,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}:(this.index=t,null)):(this.index=t,null)}scanValue(){let t=this.scanRegister();if(t)return t;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()||!Si(this.peek()))return null;let n=this.scanString();return n.length>0?{string:n}:null}scanDimen(){let t=this.scanNumber(!1);if(t===null)return null;let r=t.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 t=this.scanDimen();if(t===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return t;let r={glue:t};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?t:r}scanColspec(){this.skipWhitespace();let t=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){let r=this.get();r==="c"||r==="r"||r==="l"?t.push({align:r}):r==="|"?t.push({separator:"solid"}):r===":"?t.push({separator:"dashed"}):r==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),t.push({gap:this.scan(i=>i==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return t}scanModeSet(){let t;if(this.match("\\(")&&(t="textstyle"),!t&&this.match("\\[")&&(t="displaystyle"),!t)return null;this.beginContext({mode:"math",mathstyle:t});let r=this.scan(i=>i===(t==="displaystyle"?"\\]":"\\)"));return this.match(t==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),r}scanModeShift(){let t="";if(this.match("<$>")&&(t="<$>"),!t&&this.match("<$$>")&&(t="<$$>"),!t)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});let r=this.scan(i=>i===t);return this.match(t)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),r}scanEnvironment(){if(!this.match("\\begin"))return null;let t=this.scanArgument("string");if(!t)return null;let r=$l(t);if(!r)return this.onError({code:"unknown-environment",arg:t}),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:t}),i.push(c)}this.beginContext({tabular:r.tabular});let o=[],n=[],a=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:t}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==t&&this.onError({code:"unbalanced-environment",arg:t}),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(t,o,n,i)}scanExpression(){let t=this.mathlist;if(this.mathlist=[],this.parseExpression()){let r=this.mathlist;return this.mathlist=t,r}return this.mathlist=t,null}scan(t){this.beginContext(),t||(t=s=>s==="<}>");let r="",i=null,o=[],n=null;for(;!this.end()&&!t(this.peek());)this.hasInfixCommand()&&!r?(r=this.get(),i=ee(r,"math"),i&&(o=this.scanArguments(i)[1]),n=this.mathlist,this.mathlist=[]):this.parseExpression();let a;return r?(o.unshift(this.mathlist),n&&o.unshift(n),a=[i.createAtom({command:r,args:o,style:this.style,mode:this.parseMode})]):a=this.mathlist,this.endContext(),a}scanGroup(){let t=this.index;if(!this.match("<{>"))return null;let r=this.scan(o=>o==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});let i=new wi(r,this.parseMode,this.style);return i.verbatimLatex=ui(this.tokens.slice(t,this.index)),i}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let t=1;for(;!this.end()&&t!==0;)this.match("(")&&(t+=1),this.match(")")&&(t-=1),t!==0&&this.parseExpression();t===0&&this.match(")");let r=new H("",this.mathlist,{leftDelim:"(",rightDelim:t===0?")":"?"});return this.endContext(),r}scanDelim(){this.skipWhitespace();let t=this.peek();if(!t)return this.onError({code:"unexpected-end-of-string"}),null;if(!Si(t)&&!t.startsWith("\\"))return null;this.next();let r=ee(t,"math");return r?r.definitionType==="function"&&r.ifMode&&!r.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):r.definitionType==="symbol"&&(r.type==="mopen"||r.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):(this.onError({code:"unknown-command",arg:t}),null)}scanLeftRight(){var n;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new Ye("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Ye("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}let r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new Ye(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();let i=this.mathlist;this.endContext();let o=(n=this.scanDelim())!=null?n:".";return new H(t==="\\right"?"left...right":"mleft...mright",i,{leftDelim:r,rightDelim:o,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let t=this.peek();if(t!=="^"&&t!=="_"&&t!=="'")return!1;let r=this.lastSubsupAtom();for(;t==="^"||t==="_"||t==="'";)this.match("'")?this.match("'")?r.addChild(new y({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):r.addChild(new y({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&r.addChildren(L(this.scanArgument("expression")),t==="_"?"subscript":"superscript"),t=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;let t=this.match("\\limits"),r=!t&&this.match("\\nolimits"),i=!r&&!t&&this.match("\\displaylimits");if(!t&&!r&&!i)return!1;let o=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return o===null||o.type!=="mop"?!1:(o.explicitSubsupPlacement=!0,t&&(o.subsupPlacement="over-under"),r&&(o.subsupPlacement="adjacent"),i&&(o.subsupPlacement="auto"),!0)}scanArguments(t){if(!(t!=null&&t.params))return[void 0,[]];let r,i=[],o=t.infix?2:0;for(;o<t.params.length;){let n=t.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 t=this.peek();if(!t)return null;this.next();let r;if(Si(t)){let i=se.createAtom(this.parseMode,t,m({},this.style));return i?[i]:null}if(r=this.scanMacro(t),r)return[r];if(t.startsWith("\\")){let i=ee(t,this.parseMode);if(!i)return this.onError({code:"unknown-command",arg:t}),[new Ye(t)];if(i.definitionType==="symbol"){let o=m({},this.style);i.variant&&(o.variant=i.variant),r=new y({type:i.type,command:t,style:o,value:String.fromCodePoint(i.codepoint),mode:this.parseMode,verbatimLatex:t})}else{if(i.applyMode||i.applyStyle||i.infix)return this.onError({code:"invalid-command",arg:t}),[new Ye(t)];i.createAtom&&(r=i.createAtom({command:t,args:[],style:this.style,mode:this.parseMode}))}}return r?[r]:null}scanArgument(t){var o;this.skipFiller();let r=this.parseMode;if(t==="auto"&&(t=r),!this.match("<{>")){if(t==="string")return this.scanString();if(t==="value")return this.scanValue();if(t==="delim")return(o=this.scanDelim())!=null?o:".";if(t==="expression")return this.scanExpression();if(t==="math"){t!==r&&this.beginContext({mode:"math"});let n=this.scanSymbolOrLiteral();return t!==r&&this.endContext(),n}if(t==="text"){t!==r&&this.beginContext({mode:"text"});let n=this.scanSymbolOrLiteral();return t!==r&&this.endContext(),n}return null}if(t==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let n=this.mathlist;return this.endContext(),{group:n}}if(t==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let n=this.mathlist;return this.endContext(),{group:n}}let i=null;if(t==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let n=this.mathlist;return this.endContext(),{group:n}}return t==="string"?i=this.scanString():t==="balanced-string"?i=this.scanBalancedString():t==="colspec"?i=this.scanColspec():t==="value"&&(i=this.scanValue()),this.skipUntilToken("<}>"),i}scanOptionalArgument(t){if(t=t==="auto"?this.parseMode:t,this.skipFiller(),!this.match("["))return null;let r=null;for(;!this.end()&&!this.match("]");)if(t==="string")r=this.scanString();else if(t==="value")r=this.scanValue();else if(t==="colspec")r=this.scanColspec();else if(t==="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 t==="math"&&(this.beginContext({mode:"math"}),r=this.mathlist.concat(this.scan(i=>i==="]")),this.endContext());return r}scanSymbolOrCommand(t){var n,a;if(t==="\\placeholder"){let s=this.scanOptionalArgument("string"),l=this.scanOptionalArgument("math"),c=y.serialize(l,{defaultMode:"math"}),u=[],d;!d&&c==="correct"?d="correct":!d&&c==="incorrect"?d="incorrect":c!==""&&(u=l);let p=this.scanOptionalArgument("string")==="locked",h=this.scanArgument("auto"),f;return h&&Array.isArray(h)&&h.length>0?f=h:h&&typeof h=="object"&&"group"in h?f=h.group:f=u,s?[new Mi(s,d,p,f!=null?f:u,{mode:this.parseMode,style:this.style})]:[new be({mode:this.parseMode,style:this.style})]}let r=this.scanMacro(t);if(r)return[r];let i=ee(t,this.parseMode);if(!i)return this.onError({code:"unknown-command",arg:t}),this.parseMode==="text"?[...t].map(s=>new y({type:"text",value:s,mode:"text",style:this.style})):[new Ye(t)];let o=this.index;if(i.definitionType==="symbol"){let s=m({},this.style);i.variant&&(s.variant=i.variant),r=new y({type:i.type,command:t,style:s,value:String.fromCodePoint(i.codepoint),mode:this.parseMode})}else{if(i.ifMode&&!i.ifMode.includes(this.parseMode))return[];let s=this.parseMode;i.applyMode&&(this.parseMode=i.applyMode);let[l,c]=this.scanArguments(i);if(this.parseMode=s,i.applyMode&&!i.applyStyle&&!i.createAtom)return L(c[0]);if(i.infix)return this.onError({code:"too-many-infix-commands",arg:t}),null;if(typeof i.createAtom=="function")r=i.createAtom({command:t,args:c,style:this.style,mode:this.parseMode}),l&&(r.body=L(this.scanArgument(l)));else if(typeof i.applyStyle=="function"){let u=m(m({},this.style),i.applyStyle(t,c,this.context)),d=this.parseMode;if(i.applyMode&&(this.parseMode=i.applyMode),l){let p=this.style;this.style=u;let h=this.scanArgument(l);return this.style=p,this.parseMode=d,L(h)}this.style=u}else r=new y({type:"mord",command:(n=i.command)!=null?n:t,style:m({},this.style),value:t,mode:(a=i.applyMode)!=null?a:this.parseMode})}if(!r)return null;if(r instanceof y&&r.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(t)){let s=B([t,ui(this.tokens.slice(o,this.index))]);s&&(r.verbatimLatex=s)}if(r.verbatimLatex===null&&(r.verbatimLatex=void 0),r.isFunction&&this.smartFence){let s=this.scanSmartFence();if(s)return[r,s]}return[r]}scanSymbolCommandOrLiteral(){let t=this.get();if(!t)return null;if(Si(t)){let r=se.createAtom(this.parseMode,t,m({},this.style));if(!r)return null;if(r.isFunction&&this.smartFence){let i=this.scanSmartFence();if(i)return[r,i]}return[r]}return t.startsWith("\\")?this.scanSymbolOrCommand(t):t==="<space>"?this.parseMode==="text"?[new Fe(" "," ",this.style)]:null:(t==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:t}),null)}scanMacro(t){var a;let r=this.context.getMacro(t);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 ki(t,{expand:r.expand,captureSelection:r.captureSelection,args:i===this.index?null:ui(this.tokens.slice(i,this.index)),style:this.parsingContext.style,body:oe(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 t=(n=(o=(i=(r=this.scanEnvironment())!=null?r:this.scanModeShift())!=null?i:this.scanModeSet())!=null?o:this.scanGroup())!=null?n:this.scanLeftRight();if(t===null){if(this.parseSupSub()||this.parseLimits())return!0;t=this.scanSymbolCommandOrLiteral()}return t?(Array.isArray(t)?this.mathlist.push(...t):this.mathlist.push(t),!0):!1}};function oe(e,t){var n,a,s,l;let r=(n=t==null?void 0:t.args)!=null?n:void 0,i=new na(mo(e,r),t==null?void 0:t.context,{args:r,mathstyle:(a=t==null?void 0:t.mathstyle)!=null?a:"displaystyle",parseMode:(s=t==null?void 0:t.parseMode)!=null?s:"math",style:(l=t==null?void 0:t.style)!=null?l:{}}),o=[];for(;!i.end();)o.push(...i.scan(()=>!1));return o}function aa(e,t){var i;let r=new na(mo(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(i=t==null?void 0:t.parseMode)!=null?i:"math"});for(;!r.end();)r.scan();return r.errors}var wo=class e extends y{constructor(r,i){super({type:"chem"},{command:r,mode:"math"});let o=Z.go(S.go(i,r==="\\pu"?"pu":"ce"),!1);this.body=oe(o),this.verbatimLatex=r+"{"+i+"}",this.arg=i,this.captureSelection=!0}static fromJson(r){return new e(r.command,r.arg)}toJson(){return g(m({},super.toJson()),{arg:this.arg})}render(r){let i=y.createBox(r,this.body,{type:"inner"});return this.caret&&(i.caret=this.caret),this.bind(r,i)}_serialize(r){return this.verbatimLatex}};w(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new wo(e.command,(t=e.args[0])!=null?t:"")}});var S={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",i={};i.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var o,n=10,a=[];;){o!==e?(n=10,o=e):n--;var s=S.stateMachines[t],l=s.transitions[r]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var u=S.patterns.match_(l[c].pattern,e);if(u){for(var d=l[c].task,p=0;p<d.action_.length;p++){var h;if(s.actions[d.action_[p].type_])h=s.actions[d.action_[p].type_](i,u.match_,d.action_[p].option);else if(S.actions[d.action_[p].type_])h=S.actions[d.action_[p].type_](i,u.match_,d.action_[p].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[p].type_+")"];S.concatArray(a,h)}if(r=d.nextState||r,e.length>0){if(d.revisit||(e=u.remainder),!d.toContinue)break e}else return a}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},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(e){var t=e.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 t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=S.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return S.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return S.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return S.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return S.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return S.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return S.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return S.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return S.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return S.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return S.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return S.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return S.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return S.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\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(e){return S.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return S.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return S.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return S.patterns.findObserveGroups(e,"",/^\\[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(e){return S.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return S.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return S.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return S.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return S.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return S.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return S.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return S.patterns.findObserveGroups(e,"\\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(e){var t;if(t=e.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))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var r=S.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,i,o,n,a,s,l,c){var u=function(v,b){if(typeof b=="string")return v.indexOf(b)!==0?null:b;var A=v.match(b);return A?A[0]:null},d=function(v,b,A){for(var _=0;b<v.length;){var T=v.charAt(b),E=u(v.substr(b),A);if(E!==null&&_===0)return{endMatchBegin:b,endMatchEnd:b+E.length};if(T==="{")_++;else if(T==="}"){if(_===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];_--}b++}return _>0,null},p=u(e,t);if(p===null||(e=e.substr(p.length),p=u(e,r),p===null))return null;var h=d(e,p.length,i||o);if(h===null)return null;var f=e.substring(0,i?h.endMatchEnd:h.endMatchBegin);if(n||a){var x=this.findObserveGroups(e.substr(h.endMatchEnd),n,a,s,l);if(x===null)return null;var M=[f,x.match_];return{match_:c?M.join(""):M,remainder:x.remainder}}else return{match_:f,remainder:e.substr(h.endMatchEnd)}},match_:function(e,t){var r=S.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return S.patterns.patterns[e](t);var i=t.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:t.substr(i[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return S.go(t,"text")},"{text}":function(e,t){var r=["{"];return S.concatArray(r,S.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return S.go(t,"tex-math")},"tex-math tight":function(e,t){return S.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return S.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var i=t.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(e,t){return S.go(t,"9,9")}},createTransitions:function(e){var t,r,i,o,n={};for(t in e)for(r in e[t])for(i=r.split("|"),e[t][r].stateArray=i,o=0;o<i.length;o++)n[i[o]]=[];for(t in e)for(r in e[t])for(i=e[t][r].stateArray||[],o=0;o<i.length;o++){var a=e[t][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=t.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(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var i=e.d;e.d=void 0,r=this.output(e),e.b=i}else r=this.output(e);return S.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return S.concatArray(r,this.output(e)),S.concatArray(r,S.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var i=S.patterns.match_("orbital",e.o||""),o=S.patterns.match_("one lowercase greek letter $",e.o||""),n=S.patterns.match_("one lowercase latin letter $",e.o||""),a=S.patterns.match_("$one lowercase latin letter$ $",e.o||""),s=t==="-"&&(i&&i.remainder===""||o||n||a);s&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!i&&n&&(e.o="$"+e.o+"$");var l=[];return s?(S.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(i=S.patterns.match_("digits",e.d||""),r&&i&&i.remainder===""?(S.concatArray(l,S.actions["d="](e,t)),S.concatArray(l,this.output(e))):(S.concatArray(l,this.output(e)),S.concatArray(l,S.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:S.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),i=r!==t;return i&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var i;if(!e.r)i=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&i.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&S.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),i.push({type_:"chemfive",a:S.go(e.a,"a"),b:S.go(e.b,"bd"),p:S.go(e.p,"pq"),o:S.go(e.o,"o"),q:S.go(e.q,"pq"),d:S.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var o;e.rdt==="M"?o=S.go(e.rd,"tex-math"):e.rdt==="T"?o=[{type_:"text",p1:e.rd||""}]:o=S.go(e.rd);var n;e.rqt==="M"?n=S.go(e.rq,"tex-math"):e.rqt==="T"?n=[{type_:"text",p1:e.rq||""}]:n=S.go(e.rq),i={type_:"arrow",r:e.r,rd:o,rq:n}}for(var a in e)a!=="parenthesisLevel"&&a!=="beginsWithBond"&&delete e[a];return i},"oxidation-output":function(e,t){var r=["{"];return S.concatArray(r,S.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:S.go(t[0]),p2:S.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:S.go(t[0]),p2:S.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:S.go(t[0]),p2:S.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:S.go(t[0]),p2:S.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:S.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},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(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},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(e,t){return{type_:"state of aggregation subscript",p1:S.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:S.go(t[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(e,t){return{type_:"color",color1:t[0],color2:S.go(t[1],"bd")}}}},oxidation:{transitions:S.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"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(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"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(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(S.concatArray(r,S.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?S.concatArray(r,S.go(t[2],"pu-9,9")):r.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[5]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),S.concatArray(r,S.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=S.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var i=S.patterns.match_("{(...)}",e.q||"");if(i&&i.remainder===""&&(e.q=i.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:S.go(e.d,"pu"),q:S.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:o.d,p2:o.q}:(t=o.d,o.d.length>1||o.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),S.concatArray(t,o.q))}else t=S.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"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(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=S.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=S.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var i in e)delete e[i];return t}}},"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(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;r===0&&(r=3);for(var i=e.text_.length-3;i>0;i-=3)t.push(e.text_.substr(i,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var o in e)delete e[o];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,i=0;i<r;i+=3)t.push(e.text_.substr(i,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(i))}else t.push(e.text_);for(var o in e)delete e[o];return t}}}};var Z={go:function(e,t){if(!e)return"";for(var r="",i=!1,o=0;o<e.length;o++){var n=e[o];typeof n=="string"?r+=n:(r+=Z._go2(n),n.type_==="1st-level escape"&&(i=!0))}return!t&&!i&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&Z.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:Z._goInner(e.a),b:Z._goInner(e.b),p:Z._goInner(e.p),o:Z._goInner(e.o),q:Z._goInner(e.q),d:Z._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),e.dType==="kv"?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{\\smash[t]{"+r.q+"}}")):e.dType==="oxidation"?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}"),r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+Z._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+Z._goInner(e.p1);break;case"bond":if(t=Z._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var i="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"pu-frac":var o="\\frac{"+Z._goInner(e.p1)+"}{"+Z._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+Z._goInner(e.p1)+"}{"+Z._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+Z._goInner(e.p1)+"}{"+Z._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+Z._goInner(e.p1)+"}{"+Z._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+Z._goInner(e.p1)+"}_{"+Z._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+Z._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var n={rd:Z._goInner(e.rd),rq:Z._goInner(e.rq)},a=Z._getArrow(e.r);n.rd||n.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(a="\\long"+a,n.rd&&(a="\\overset{"+n.rd+"}{"+a+"}"),n.rq&&(e.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+"}{} ",t=a;break;case"operator":t=Z._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){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(e){switch(e){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(e){switch(e){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 _i=class e extends y{constructor(r){super(g(m({},r),{type:"delim"}));this.value=r.delim,this.size=r.size}static fromJson(r){return new e(r)}toJson(){return g(m({},super.toJson()),{delim:this.value,size:this.size})}render(r){return new k(this.value,{type:"middle"})}_serialize(r){if(!(r.expandMacro||r.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,r):O(this.command,this.value)}},Ai=class e extends y{constructor(r){super(g(m({},r),{type:"sizeddelim",value:r.delim}));this.delimType=r.delimType,this.size=r.size}static fromJson(r){return new e(r)}toJson(){return g(m({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(r){let i=s0(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){if(!(r.expandMacro||r.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,r):O(this.command,this.value)}};var Dt=class e extends y{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 e(r.command,r.body,r.notation,r)}toJson(){return g(m({},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 n;if(!(r.expandMacro||r.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,r);let o=(n=this.command)!=null?n:"";if(this.command==="\\enclose"){o+="{"+Object.keys(this.notation).join(" ")+"}";let a="",s="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(a+=s+'mathbackground="'+this.backgroundcolor+'"',s=","),this.shadow&&this.shadow!=="auto"&&(a+=s+'shadow="'+this.shadow+'"',s=","),this.strokeWidth||this.strokeStyle!=="solid"?(a+=s+this.borderStyle,s=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(a+=s+'mathcolor="'+this.strokeColor+'"',s=","),a&&(o+=`[${a}]`)}return O(o,this.bodyToLatex(r))}render(r){var u;let i=new P({parent:r},this.style),o=y.createBox(i,this.body);if(!o)return null;let n=i.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding}),a=Tp(this.borderStyle),s=new k(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+")"),Un(s,l,d)}let c=new k([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 Tp(e){if(!e)return"1px";let t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}var bt=class e extends y{constructor(r,i,o){var n,a;super(g(m({},o),{type:"genfrac",displayContainsHighlight:!0}));this.above=r,this.below=i,this.hasBarLine=(n=o==null?void 0:o.hasBarLine)!=null?n:!0,this.continuousFraction=(a=o==null?void 0:o.continuousFraction)!=null?a:!1,this.numerPrefix=o==null?void 0:o.numerPrefix,this.denomPrefix=o==null?void 0:o.denomPrefix,this.mathstyleName=o==null?void 0:o.mathstyleName,this.leftDelim=o==null?void 0:o.leftDelim,this.rightDelim=o==null?void 0:o.rightDelim,this.fractionNavigationOrder=o==null?void 0:o.fractionNavigationOrder}static fromJson(r){return new e(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),m(m({},super.toJson()),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 T,E;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 k([new k(this.numerPrefix),y.createBox(n,this.above)],{isTight:n.isTight,type:"ignore"}):(T=y.createBox(n,this.above,{type:"ignore"}))!=null?T:new k(null,{type:"ignore"}),s=new P({parent:i,mathstyle:this.continuousFraction?"":"denominator"},this.style),l=this.denomPrefix?new k([new k(this.denomPrefix),y.createBox(s,this.below,{type:"ignore"})]):(E=y.createBox(s,this.below,{type:"ignore"}))!=null?E:new k(null,{type:"ignore"}),c=this.hasBarLine?o.defaultRuleThickness:0,u,d=0,p;i.isDisplayStyle?(u=n.metrics.num1,d=c>0?3*c:7*c,p=s.metrics.denom1):(c>0?(u=n.metrics.num2,d=c):(u=n.metrics.num3,d=3*o.defaultRuleThickness),p=s.metrics.denom2);let h=[];this.isSelected&&h.push("ML__selected");let f=a.depth,x=l.height,M;if(c<=0){let R=u-f-(x-p);R<d&&(u+=(d-R)/2,p+=(d-R)/2),M=new W({individualShift:[{box:a,shift:-u,classes:[...h,"ML__center"]},{box:l,shift:p,classes:[...h,"ML__center"]}]}).wrap(i)}else{let R=_e+c/2,F=_e-c/2;u<d+f+R&&(u=d+f+R),p<d+x-F&&(p=d+x-F);let xe=new k(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});xe.height=c/2,xe.depth=c/2,M=new W({individualShift:[{box:l,shift:p,classes:[...h,"ML__center"]},{box:xe,shift:-F,classes:h},{box:a,shift:-u,classes:[...h,"ML__center"]}]}).wrap(i)}let v=i.isDisplayStyle?o.delim1:o.delim2,b=this.leftDelim?this.bind(r,xi("open",this.leftDelim,v,!0,r,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Pt(i,"open"),A=null;this.continuousFraction?A=new k(null,{type:"close"}):this.rightDelim?A=this.bind(r,xi("close",this.rightDelim,v,!0,r,{style:this.style,mode:this.mode,isSelected:this.isSelected})):A=Pt(i,"close");let _=this.bind(r,new k([b,M,A],{isTight:i.isTight,type:"inner",classes:"mfrac"}));return _?(this.caret&&(_.caret=this.caret),this.attachSupsub(r,{base:_})):null}};var Y=class e extends y{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 e(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),m({type:"latex",value:this.value},r)}get computedStyle(){return{}}render(r){let i=new k(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}},xt=class e extends y{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(r=>new Y(r)),this.skipBoundary=!1}static fromJson(t){return new e("")}toJson(){return super.toJson()}render(t){let r=y.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){var r,i;return(i=(r=this.body)==null?void 0:r.map(o=>o.value).join(""))!=null?i:""}};var Be=class e extends y{constructor(r,i){var o,n,a;super(g(m({},i),{type:(o=i.type)!=null?o:"mop",isFunction:i==null?void 0:i.isFunction}));this.value=r,this.hasArgument=(n=i.hasArgument)!=null?n:!1,this.variant=i==null?void 0:i.variant,this.variantStyle=i==null?void 0:i.variantStyle,this.subsupPlacement=i==null?void 0:i.limits,this.isExtensibleSymbol=(a=i==null?void 0:i.isExtensibleSymbol)!=null?a:!1}static fromJson(r){return new e(r.symbol,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 k(this.value,{fontFamily:l?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(l?"large-op":"small-op"),type:"op",maxFontSize:r.scalingFactor,isSelected:this.isSelected}),!i)return null;i.right=i.italic,o=(i.height-i.depth)/2-_e*r.scalingFactor,n=i.italic,i.setTop(o)}else this.type,i=new k(this.value,{type:"op",mode:"math",maxFontSize:r.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:r.letterShapeStyle});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 k(this.bind(r,a),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(r)}_serialize(r){if(!(r.expandMacro||r.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,r);if(this.value==="\u200B")return this.supsubToLatex(r);let o=[];return this.hasArgument?o.push(O(this.command,this.bodyToLatex(r))):o.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&o.push("\\limits"),this.subsupPlacement==="adjacent"&&o.push("\\nolimits"),this.subsupPlacement==="auto"&&o.push("\\displaylimits")),o.push(this.supsubToLatex(r)),B(o)}};var Qe=class e extends y{constructor(r){let i=r.body;super(g(m({},r),{type:"overlap",body:typeof i=="string"?[new y({value:i})]:i,style:r==null?void 0:r.style}));this.skipBoundary=!0,this.align=r==null?void 0:r.align,this.boxType=r==null?void 0:r.boxType}static fromJson(r){return new e(r)}toJson(){let r={};return this.align&&(r.align=this.align),this.boxType&&(r.boxType=this.boxType),m(m({},super.toJson()),r)}render(r){let i=y.createBox(r,this.body,{classes:"inner"});return i?(this.caret&&(i.caret=this.caret),this.bind(r,new k([i,new k(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}};var he=class e extends y{constructor(r){var i,o,n,a;super({type:"overunder",command:r.command,style:r.style,mode:r.mode,body:r.body,skipBoundary:(i=r.skipBoundary)!=null?i:!0});this.subsupPlacement=r.supsubPlacement,this.svgAbove=r.svgAbove,this.svgBelow=r.svgBelow,this.svgBody=r.svgBody,this.above=r.above,this.below=r.below,this.boxType=(o=r.boxType)!=null?o:"ord",this.paddedBody=(n=r.paddedBody)!=null?n:!1,this.paddedLabels=(a=r.paddedLabels)!=null?a:!1}static fromJson(r){return new e(r)}toJson(){let r=super.toJson();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),r}render(r){let i=this.svgBody?di(this.svgBody):y.createBox(r,this.body,{type:"ignore"}),o=new P({parent:r,mathstyle:"scriptstyle"},this.style),n=null;this.svgAbove?n=di(this.svgAbove):this.above&&(n=y.createBox(o,this.above,{type:"ignore"}));let a=null;this.svgBelow?a=di(this.svgBelow):this.below&&(a=y.createBox(o,this.below,{type:"ignore"})),this.paddedBody&&(i=new k([Pt(r,"open"),i,Pt(r,"close")],{type:"ignore"}));let s=Pp(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 Pp(e,t){if(!t.base)return null;if(!t.above&&!t.below){let s=new k(t.base,{type:t.type});return s.setStyle("position","relative"),s}let r=0;t.above&&(r=e.metrics.bigOpSpacing5);let i=null,o=t.base,n=0,a=["ML__center"];if(t.paddedAboveBelow&&a.push("ML__label_padding"),t.below&&t.above){let s=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+o.depth+n;i=new W({bottom:s,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:a},{box:o,classes:["ML__center"]},r,{box:t.above,classes:a},e.metrics.bigOpSpacing5]})}else t.below?i=new W({top:o.height-n,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:a},{box:o,classes:["ML__center"]}]}):t.above&&(i=new W({bottom:o.depth+n,children:[{box:o,classes:["ML__center"]},r,{box:t.above,classes:a},e.metrics.bigOpSpacing5]}));return new k(i,{type:t.type})}var Kt=class e extends y{constructor(r){var i,o,n,a;super(g(m({},r),{type:"phantom"}));this.captureSelection=!0,this.isInvisible=(i=r.isInvisible)!=null?i:!1,this.smashDepth=(o=r.smashDepth)!=null?o:!1,this.smashHeight=(n=r.smashHeight)!=null?n:!1,this.smashWidth=(a=r.smashWidth)!=null?a:!1}static fromJson(r){return new e(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),m(m({},super.toJson()),r)}render(r){let i=new P({parent:r,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return this.isInvisible,y.createBox(i,this.body,{classes:"inner"});let o=y.createBox(this.isInvisible?i:r,this.body);if(!o)return null;if(this.smashWidth){let n=new k(null,{classes:"fix"});return new k([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 W({firstBaseline:[{box:o}]},{type:o.type}).wrap(r)}};var vt=class e extends y{constructor(r){var i;super(m({type:"spacing"},r));this.width=r==null?void 0:r.width,this._braced=(i=r==null?void 0:r.braced)!=null?i:!1}static fromJson(r){return new e(r)}toJson(){let r=super.toJson();return this.width!==void 0&&(r.width=this.width),this._braced&&(r.braced=!0),r}render(r){var o;if(this.command==="space")return new k(this.mode==="math"?null:" ");let i;if(this.width!==void 0)i=new k(null,{classes:"mspace"}),i.left=r.toEm(this.width);else{let n=(o={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?o:"mediumspace";i=new k(null,{classes:n})}return i=this.bind(r,i),this.caret&&(i.caret=this.caret),i}_serialize(r){var n;if(!r.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ee(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,r);let o=(n=this.command)!=null?n:"";return this.width===void 0?o:this._braced&&!("register"in this.width)?`${o}{${le(this.width)}}`:`${o}${le(this.width)}`}};var Li=class e extends y{constructor(t){var r;super(g(m({},t),{type:"surd",mode:(r=t.mode)!=null?r:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new e(g(m({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=ee(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let i=this.command,o=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?O(`${i}[${this.aboveToLatex(t)}]`,o):/^[0-9]$/.test(o)?`${i}${o}`:O(i,o)}get children(){if(this._children)return this._children;let t=[];if(this.above)for(let r of this.above)t.push(...r.children),t.push(r);if(this.body)for(let r of this.body)t.push(...r.children),t.push(r);return this._children=t,t}render(t){var b;let r=new P({parent:t,mathstyle:"cramp"},this.style),i=(b=y.createBox(r,this.body,{type:"inner"}))!=null?b:new k(null),o=r.scalingFactor,n=r.metrics.defaultRuleThickness/o,a=t.isDisplayStyle?pt:n,s=new k(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:t},this.style),p=this.bind(d,new k(xi("inner","\\surd",u,!1,d,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!p)return null;let h=p.height+p.depth-n;h>i.height+i.depth+l&&(l=(l+h-(i.height+i.depth))/2),p.setTop(p.height-i.height-l);let f=this.bind(t,new W({firstBaseline:[{box:new k(i)},l-2*n,{box:s},n]})),x=y.createBox(new P({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!x){let A=new k([p,f],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return A.setStyle("display","inline-block"),A.setStyle("height",A.height+A.depth,"em"),this.caret&&(A.caret=this.caret),this.bind(t,A)}let M=new W({shift:-.6*(Math.max(p.height,f.height)-Math.max(p.depth,f.depth)),children:[{box:x}]}),v=new k([new k(M,{classes:"ML__sqrt-index",type:"ignore"}),p,f],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return v.height=p.height,v.depth=p.depth,this.caret&&(v.caret=this.caret),this.bind(t,v)}};var Rs=class extends k{constructor(t){super(null,{type:"skip",width:t})}toMarkup(){return`<span style="display:inline-block;width:${Math.round(this.width*100)/100}em"></span>`}};function ko(e,t){if(!e.parent)return;let r=e.parent.children,i=r.indexOf(e),o=i-1;for(;o>=0&&r[o].type==="ignore";)o-=1;if(o<0&&e.parent.parent&&e.parent.type==="lift"){ko(e.parent,t);return}if(i>0&&r[i-1].type==="skip"){r[i-1].width+=t;return}r.splice(i,0,new Rs(t))}var Bp={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}},Dp={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Kp(e){Mo(e,(t,r)=>{r.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(r.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(t.type="ord"),r.type!=="ignore"&&(t=r)})}function wt(e,t){if(!e.children)return e;let r=e.children;Kp(r);let i=t.getRegisterAsEm("thinmuskip"),o=t.getRegisterAsEm("medmuskip"),n=t.getRegisterAsEm("thickmuskip");return Mo(r,(a,s)=>{var d,p,h;if(!a)return;let l=a.type,c=s.isTight?(d=Dp[l])!=null?d:null:(p=Bp[l])!=null?p:null,u=(h=c==null?void 0:c[s.type])!=null?h:null;u===3&&ko(s,i),u===4&&ko(s,o),u===5&&ko(s,n)}),e}function Mo(e,t,r=void 0){if(!e)return r;e=[...e];for(let i of e)i.type==="lift"?r=Mo(i.children,t,r):i.type==="ignore"?Mo(i.children,t):(t(r,i),Mo(i.children,t),r=i);return r}var Er=class e extends y{constructor(r){super({type:"tooltip",command:r.command,mode:r.mode,style:r.style,body:r.body,displayContainsHighlight:!0});this.tooltip=new y({type:"root",mode:r.content,body:r.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(r){return new e(g(m({},r),{tooltip:et(r.tooltip)}))}toJson(){var i;let r=(i=this.tooltip.body)==null?void 0:i.filter(o=>o.type!=="first").map(o=>o.toJson());return g(m({},super.toJson()),{tooltip:r})}render(r){let i=y.createBox(new P,this.body);if(!i)return null;let o=new P({parent:r,mathstyle:"displaystyle"},{fontSize:ci}),n=er(wt(new k(this.tooltip.render(o),{classes:"ML__tooltip-content"}),o)),a=new k([n,i],{classes:"ML__tooltip-container"});return this.caret&&(a.caret=this.caret),this.bind(r,a)}};function et(e){if(Q(e))return e.map(i=>et(i));if(typeof e=="string")return y.fromJson(e);e=m({},e);for(let i of nr)e[i]&&(e[i]=et(e[i]));e.args&&(e.args=Op(e.args)),e.array&&(e.array=et(e.array));let t=e.type,r;t==="accent"&&(r=lr.fromJson(e)),t==="array"&&(r=z.fromJson(e)),t==="box"&&(r=Ie.fromJson(e)),t==="chem"&&(r=wo.fromJson(e)),t==="composition"&&(r=vi.fromJson(e)),t==="delim"&&(r=_i.fromJson(e)),t==="enclose"&&(r=Dt.fromJson(e)),t==="error"&&(r=Ye.fromJson(e)),t==="genfrac"&&(r=bt.fromJson(e)),t==="group"&&(r=wi.fromJson(e)),t==="latex"&&(r=Y.fromJson(e)),t==="latexgroup"&&(r=xt.fromJson(e)),t==="leftright"&&(r=H.fromJson(e)),t==="macro"&&(r=ki.fromJson(e)),t==="macro-argument"&&(r=oa.fromJson(e)),t==="subsup"&&(r=Bt.fromJson(e)),t==="overlap"&&(r=Qe.fromJson(e)),t==="overunder"&&(r=he.fromJson(e)),t==="placeholder"&&(r=be.fromJson(e)),t==="prompt"&&(r=Mi.fromJson(e)),t==="phantom"&&(r=Kt.fromJson(e)),t==="sizeddelim"&&(r=Ai.fromJson(e)),t==="spacing"&&(r=vt.fromJson(e)),t==="surd"&&(r=Li.fromJson(e)),t==="text"&&(r=Fe.fromJson(e)),t==="tooltip"&&(r=Er.fromJson(e)),t==="mop"&&(r=Be.fromJson(e)),r||(!t||["first","mbin","mrel","mclose","minner","mopen","mord","mpunct","root","space"].includes(t),`${t}`,r=y.fromJson(e));for(let i of nr)e[i]&&r.setChildren(e[i],i);return e.verbatimLatex!==void 0&&(r.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(r.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),e.isFunction&&(r.isFunction=!0),e.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),e.skipBoundary&&(r.skipBoundary=!0),e.captureSelection&&(r.captureSelection=!0),r}function Op(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>et(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>et(r)):t)}var f0={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"]},g0={"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]$/},b0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,zp=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Rp=[/^[a-z]$/,/^[A-Z]$/,b0,zp],Fp={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Fs=class extends se{constructor(){super("math")}createAtom(t,r,i){var n,a,s,l,c;if(r===null)return new y({type:"mord",mode:"math",command:t,value:t,style:i});if(r.definitionType==="symbol"){let u=new y({type:(n=r.type)!=null?n:"mord",mode:"math",command:(a=r.command)!=null?a:t,value:String.fromCodePoint(r.codepoint),style:i});return(s=r.isFunction)!=null&&s&&(u.isFunction=!0),t.startsWith("\\")&&(u.verbatimLatex=t),u}let o=new y({type:"mord",mode:"math",command:(l=r.command)!=null?l:t,value:t,style:i});return(c=r.isFunction)!=null&&c&&(o.isFunction=!0),t.startsWith("\\")&&(o.verbatimLatex=t),o}serialize(t,r){let i=Np(t,g(m({},r),{defaultMode:"math"}));return i.length===0||r.defaultMode!=="text"?i:["$ ",...i," $"]}getFont(t,r){r.variant;let{variant:i}=r,{variantStyle:o}=r;i==="normal"&&!o&&/[\u00A3\u0131\u0237]/.test(t.value)&&(i="main",o="italic"),i==="normal"&&!o&&t.value.length===1&&Rp.forEach((l,c)=>{var u;l.test(t.value)&&Fp[(u=r.letterShapeStyle)!=null?u:"tex"][c]==="it"&&(o="italic")}),o==="up"&&(o=void 0);let n=o?i+"-"+o:i;f0[n];let[a,s]=f0[n];return g0[i]&&!g0[i].test(t.value)?(t.value=Rl(t.value,i,o),null):(b0.test(t.value)&&(t.classes+=" lcGreek"),s&&(t.classes+=" "+s),a)}};function Np(e,t){let{parent:r}=e[0],i=y0(r);return ft(e,"variant").map(o=>{let n=y0(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=B(o.map(l=>l._serialize(t)));return a?O(a,s):s})}function y0(e){if(!e)return"";let{style:t}=e;if(t.variant===void 0)return"";let r=t.variant;return t.variantStyle&&t.variantStyle!=="up"&&(r+="-"+t.variantStyle),r}new Fs;function Ip(e,t){return e.map(r=>r._serialize(t))}function Vp(e,t){return ft(e,"fontShape").map(r=>{let i=Ip(r,t),{fontShape:o}=r[0].style,n="";return o==="it"&&(n="\\textit"),o==="sl"&&(n="\\textsl"),o==="sc"&&(n="\\textsc"),o==="n"&&(n="\\textup"),!n&&o?`{${O("\\fontshape",o)}${B(i)}}`:n?O(n,B(i)):B(i)})}function $p(e,t){return ft(e,"fontSeries").map(r=>{let i=Vp(r,t),{fontSeries:o}=r[0].style,n="";return o==="b"&&(n="\\textbf"),o==="l"&&(n="\\textlf"),o==="m"&&(n="\\textmd"),o&&!n?`{${O("\\fontseries",o)}${B(i)}}`:n?O(n,B(i)):B(i)})}function qp(e,t){return ft(e,"fontSize").map(r=>{var n,a;let i=$p(r,t),o=(a=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=r[0].style.fontSize)!=null?n:""])!=null?a:"";return o?`${o} ${B(i)}`:B(i)})}function Hp(e,t){return ft(e,"fontFamily").map(r=>{var n,a;let i=qp(r,t),o=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(n=r[0].style.fontFamily)!=null?n:""])!=null?a:"";return o?`\\${o}{${B(i)}}`:r[0].style.fontFamily?`{\\fontfamily{${r[0].style.fontFamily}} ${B(i)}}`:B(i)})}var x0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Ns=class extends se{constructor(){super("text")}createAtom(t,r,i){return r&&r.definitionType==="symbol"?new Fe(t,String.fromCodePoint(r.codepoint),i!=null?i:{}):null}serialize(t,r){let i=Hp(t,g(m({},r),{defaultMode:"text"}));return i.length===0||r.defaultMode==="text"?i:["\\text{",...i,"}"]}getFont(t,r){var o,n,a,s,l;let{fontFamily:i}=r;if(x0[i]?t.classes+=" "+x0[i]:i&&t.setStyle("font-family",i),r.fontShape&&(t.classes+=" ",t.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&&(t.classes+=" ",t.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:"",t.classes+=" ",t.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 Ns;var Is=class extends se{constructor(){super("latex")}createAtom(t){return new Y(t)}serialize(t,r){return t.filter(i=>i instanceof Y&&!i.isSuggestion).map(i=>i.value)}getFont(){return null}};new Is;function $s(e){let t=e.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(r.shift=!0),t.includes("alt")&&(r.alt=!0),t.includes("ctrl")&&(r.ctrl=!0),t.includes("cmd")&&(r.cmd=!0),t.includes("win")&&(r.win=!0),t.includes("meta")&&(r.meta=!0),r}function _o(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}var qs=Vs()==="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:["","=","","="]}}:Vs()==="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:[")",")",")",")"]}},jp={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]"},So=[],Tr;function Vs(){switch(It()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function kt(e){(!e.platform||e.platform===Vs())&&So.push(e)}function v0(e,t){var i;let r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return r;for(let[o,n]of Object.entries(t.mapping)){if(n[0]===e)return r.key=`[${o}]`,r;if(n[1]===e)return r.shift=!0,r.key=`[${o}]`,r;if(n[2]===e)return r.alt=!0,r.key=`[${o}]`,r;if(n[3]===e)return r.shift=!0,r.alt=!0,r.key=`[${o}]`,r}return r.key=(i=jp[e])!=null?i:"",r}function w0(e){if(e.code)return e;let t=Object.entries(cr().mapping),r=!1,i=!1,o="";for(let n=0;n<4;n++){for(let[a,s]of t)if(s[n]===e.key){o=a,n===3?(r=!0,i=!0):n===2?r=!0:n===1&&(i=!0);break}if(o)break}return new KeyboardEvent(e.type,g(m({},e),{altKey:r,shiftKey:i,code:o}))}function k0(e){var r,i;if(!e||e.key==="Unidentified"||e.key==="Dead")return;let t=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(let o of So)((r=o.mapping[e.code])==null?void 0:r[t])===e.key?o.score+=1:(i=o.mapping[e.code])!=null&&i[t]&&(o.score=0);So.sort((o,n)=>n.score-o.score)}function M0(e){Tr=So.find(t=>e.startsWith(t.locale))}function cr(){return Tr!=null?Tr:So[0]}kt(qs);kt({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:["=","=","=","="]}});kt({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"]}});kt({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:["<",">","",""]}});kt({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:[")",")",")",")"]}});kt({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"]}});kt({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:["<",">","",""]}});kt({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:["<",">","|",""]}});kt({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:["=","=","=","="]}});kt({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 Wp(e){if(ue()){let t=It(),r=e.startsWith("!"),i=e.endsWith(t);if(r&&!i||!r&&i)return!0}return e==="!other"?!1:e==="other"}function _0(e,t,r){if(e.length===0)return"";let i=_o($s(r));for(let o=e.length-1;o>=0;o--)if(e[o].key===i&&(!e[o].ifMode||e[o].ifMode===t))return e[o].command;return""}function S0(e){let t=e;return Q(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function A0(e,t){let r=[];if(typeof t=="string"){let n=Gd[t];Q(n)?r=n.slice():n&&r.push(n)}let i=S0(t),o=new RegExp("^"+i.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(let n of e)o.test(S0(n.command))&&r.push(n.key);return r.map(js)}function js(e){var o;let t=/macos|ios|/.test(It()),r=e.split("+"),i="";for(let n of r)!t&&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:t?"\u2318":"command",shift:t?"\u21E7":"shift",alt:t?"\u2325":"alt",ctrl:t?"\u2303":"control","\n":t?"\u23CE":"return","[return]":t?"\u23CE":"return","[enter]":t?"\u2324":"enter","[tab]":t?"\u21E5":"tab","[escape]":"esc","[backspace]":t?"\u232B":"backspace","[delete]":t?"\u2326":"del","[pageup]":t?"\u21DE":"page up","[pagedown]":t?"\u21DF":"page down","[home]":t?"\u2912":"home","[end]":t?"\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 Up(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;let r=$s(e.key),i=e.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=It()==="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&&!Wp(i))return;if(/^\[.+\]$/.test(r.key))return g(m({},e),{ifPlatform:i,key:_o(r)});let o=v0(r.key,t);if(!o)throw new Error('Invalid keybinding key "'+e.key+'"');if(o.shift&&r.shift||o.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${Hs(e.command)}) is conflicting with the key combination ${_o(o)} using the ${t.displayName} keyboard layout`);return o.shift=o.shift||r.shift,o.alt=o.alt||r.alt,o.meta=r.meta,o.ctrl=r.ctrl,g(m({},e),{ifPlatform:i,key:_o(o)})}function Hs(e){if(Array.isArray(e)){let t=[...e];return t.shift()+"("+t.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return e}function L0(e,t){let r=[],i=[];for(let o of e)try{let n=Up(o,t);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} (${Hs(o.command)}) matches ${a[0].key} (${Hs(a[0].command)}) with the ${t.displayName} keyboard layout`);r.push(n)}}catch(n){n instanceof Error&&i.push(n.message)}return[r,i]}function Ve(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}function sa(e){window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ve(e.mathfield)),!e.silenceNotifications&&(e.silenceNotifications=!0,e.listeners.onSelectionDidChange(),e.silenceNotifications=!1)}function N(e,t={}){if(e.silenceNotifications)return!0;e.silenceNotifications=!0;let r=e.listeners.onContentWillChange(t);return e.silenceNotifications=!1,r}function K(e,t){var r;window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ve(e.mathfield)),!(e.silenceNotifications||!e.mathfield.host)&&(e.silenceNotifications=!0,e.mathfield.host.dispatchEvent(new InputEvent("input",g(m({},t),{data:t.data?t.data:(r=t.inputType)!=null?r:"",bubbles:!0,composed:!0}))),e.silenceNotifications=!1)}var Ws=class extends q{constructor(){super("latex")}createAtom(t){return new Y(t)}onPaste(t,r){if(!r)return!1;let i=typeof r=="string"?r:r.getData("application/x-latex")||r.getData("text/plain");return i&&N(t.model,{inputType:"insertFromPaste",data:i})?(t.stopCoalescingUndo(),t.stopRecording(),this.insert(t.model,i)&&(t.startRecording(),t.snapshot("paste"),K(t.model,{inputType:"insertFromPaste"}),U(t)),t.startRecording(),!0):!1}insert(t,r,i){if(!N(t,{data:r,inputType:"insertText"}))return!1;i||(i={}),i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder");let{silenceNotifications:o}=t;i.silenceNotifications&&(t.silenceNotifications=!0);let n=t.silenceNotifications;t.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!t.selectionIsCollapsed?t.deleteAtoms(X(t.selection)):i.insertionMode==="replaceAll"?(t.root.setChildren([],"body"),t.position=0):i.insertionMode==="insertBefore"?t.collapseSelection("backward"):i.insertionMode==="insertAfter"&&t.collapseSelection("forward");let a=[];for(let c of r)Vl.test(c)&&a.push(new Y(c));let s=t.at(t.position);if(s instanceof xt&&(s=s.lastChild),!(s.parent instanceof xt)){let c=new xt("");s.parent.addChildAfter(c,s),s=c.firstChild}let l=s.parent.addChildrenAfter(a,s);return t.silenceNotifications=n,i.selectionMode==="before"||(i.selectionMode==="item"?t.setSelection(t.anchor,t.offsetOf(l)):l&&(t.position=t.offsetOf(l))),K(t,{data:r,inputType:"insertText"}),t.silenceNotifications=o,!0}};function C0(e){return e.atoms.find(t=>t.type==="latexgroup")}function Pr(e){var r,i;let t=e.atoms.find(o=>o.type==="latexgroup");return t?(i=(r=t.body)==null?void 0:r.filter(o=>o.type==="latex"))!=null?i:[]:[]}function la(e,t){var s;let r=0,i=!1,o=Number.isFinite(t==null?void 0:t.before)?(s=t==null?void 0:t.before)!=null?s:0:e.lastOffset;for(;r<=o&&!i;){let l=e.at(r);i=l instanceof Y&&l.isSuggestion,i||r++}if(!i)return[void 0,void 0];let n=r,a=!1;for(;n<=o&&!a;){let l=e.at(n);a=!(l instanceof Y&&l.isSuggestion),a||n++}return[r-1,n-1]}new Ws;function Ao(e){let t=Pr(e.model).filter(r=>r.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(let r of t)r.parent.removeChild(r)}}function ur(e,t){var c;let{model:r}=e;Ao(e);for(let u of Pr(r))u.isError=!1;if(!r.selectionIsCollapsed||e.options.popoverPolicy==="off"){Ci(e);return}let i=[],o=r.at(r.position);for(;o&&o instanceof Y&&/^[a-zA-Z\*]$/.test(o.value);)o=o.leftSibling;if(o&&o instanceof Y&&o.value==="\\")for(i.push(o),o=o.rightSibling;o&&o instanceof Y&&/^[a-zA-Z\*]$/.test(o.value);)i.push(o),o=o.rightSibling;let n=i.map(u=>u.value).join(""),a=ql(e,n);if(a.length===0){if(/^\\[a-zA-Z\*]+$/.test(n))for(let u of i)u.isError=!0;Ci(e);return}let s=(c=t==null?void 0:t.atIndex)!=null?c:0;e.suggestionIndex=s<0?a.length-1:s%a.length;let l=a[e.suggestionIndex];if(l!==n){let u=i[i.length-1];u.parent.addChildrenAfter([...l.slice(n.length-l.length)].map(d=>new Y(d,{isSuggestion:!0})),u),tt(e,{interactive:!0})}E0(e,a)}function Us(e){let[t,r]=la(e,{before:e.position});if(t===void 0||r===void 0)return!1;let i=!1;return e.getAtoms([t,r]).forEach(o=>{o.isSuggestion&&(o.isSuggestion=!1,i=!0)}),i}function dr(e,t="accept",r){var s,l;Ci(e);let i=C0(e.model);if(!i)return!1;if(t==="accept-suggestion"){let c=Pr(e.model).filter(u=>u.isSuggestion);if(c.length===0)return!1;for(let u of c)u.isSuggestion=!1;return e.model.position=e.model.offsetOf(c[c.length-1]),!0}let n=Pr(e.model).filter(c=>!c.isSuggestion).map(c=>c.value).join(""),a=i.leftSibling;return i.parent.removeChild(i),e.model.position=e.model.offsetOf(a),e.model.mode=(s=r==null?void 0:r.mode)!=null?s:"math",t==="reject"||(q.insert(e.model,n,{selectionMode:(l=r==null?void 0:r.selectItem)!=null&&l?"item":"placeholder",format:"latex",mode:"math"}),e.snapshot(),e.model.announce("replacement")),!0}function Br(e){var r;let t=document.getElementById(e);return t?t.dataset.refcount=Number(Number.parseInt((r=t.dataset.refcount)!=null?r:"0")+1).toString():(t=document.createElement("div"),t.setAttribute("aria-hidden","true"),t.dataset.refcount="1",t.id=e,document.body.append(t)),t}function Ei(e){var i;let t=document.getElementById(e);if(!t)return;let r=Number.parseInt((i=t.getAttribute("data-refcount"))!=null?i:"0");r<=1?t.remove():t.dataset.refcount=Number(r-1).toString()}function Jp(e,t){let r=new P({from:e.context}),i=new y({mode:"math",type:"root",body:oe(t,{context:r})}),o=er(wt(new k(i.render(r),{classes:"ML__base"}),r));return tr(o,{classes:"ML__mathlive"}).toMarkup()}function E0(e,t){var o;if(t.length===0){Ci(e);return}let r="";for(let[n,a]of t.entries()){let s=a,l=Jp(e,a),c=A0(e.keybindings,s).join("<br>");r+=`<li role="button" data-command="${s}" ${n===e.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=Gp(e,`<ul>${r}</ul>`);Js()&&((o=i.querySelector(".ML__popover__current"))==null||o.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var n;i&&!Js()&&(i.classList.add("is-visible"),Ti(e),(n=i.querySelector(".ML__popover__current"))==null||n.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function Js(){let e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function Ti(e,t){var d;if(!e.element||e.element.mathfield!==e||!Js())return;if(((d=e.model.at(e.model.position))==null?void 0:d.type)!=="latex"){Ci(e);return}if(t!=null&&t.deferred){setTimeout(()=>Ti(e),32);return}let r=hi(e.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 Ci(e){e.suggestionIndex=0;let t=document.getElementById("mathlive-suggestion-popover");t&&(t.classList.remove("is-visible"),t.innerHTML="")}function Gp(e,t){let r=document.getElementById("mathlive-suggestion-popover");return r||(r=Br("mathlive-suggestion-popover"),Pe("suggestion-popover"),Pe("core"),r.addEventListener("pointerdown",i=>i.preventDefault()),r.addEventListener("click",i=>{let o=i.target;for(;o&&!o.dataset.command;)o=o.parentElement;o&&(dr(e,"reject"),q.insert(e.model,o.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())})),r.innerHTML=window.MathfieldElement.createHTML(t),r}function T0(){document.getElementById("mathlive-suggestion-popover")&&(Ei("mathlive-suggestion-popover"),Ne("suggestion-popover"),Ne("core"))}function Xp(){let e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
`);if(e.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 t=e[1],r=t.match(/http.*\.ts[\?:]/);return r&&(t=e[2]),r=t.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=t.match(/at (.*(\.ts))[\?:]/),r||(r=t.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}var Lo=null,P0,B0,Gs=((B0=(P0=globalThis==null?void 0:globalThis.document)==null?void 0:P0.currentScript)==null?void 0:B0.src)||Xp();async function ca(e){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Lo===null)try{let t=await fetch(Gs,{method:"HEAD"});t.status===200&&(Lo=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${Gs}")`)}return new URL(e,Lo!=null?Lo:Gs).href}function Zp(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}var Le="not-loaded";async function D0(){return Le="not-loaded",Dr()}async function Dr(){var t;if(Le!=="not-loaded")return;if(Le="loading",(t=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?t:!1){Le="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))){Le="ready";return}if(!window.MathfieldElement.fontsDirectory){Le="not-loaded";return}let o=await ca(window.MathfieldElement.fontsDirectory);if(!o){document.body.classList.add("ML__fonts-did-not-load"),Le="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=>Zp(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)),Le="ready";return}catch(a){console.error(`MathLive 0.95.4: The math fonts could not be loaded from "${o}"`,{cause:a}),document.body.classList.add("ML__fonts-did-not-load")}Le="error"}}function Yp(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r),t=t|0;return Math.abs(t)}function U(e,t){e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{Tt(e)&&e.dirty&&(e.atomBoundsCache=new Map,tt(e,t),e.atomBoundsCache=void 0)}))}function Qp(e,t){var n;t=t!=null?t:{};let r=new P({from:g(m({},e.context),{atomIdsSettings:{seed:t.forHighlighting?Yp(y.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(n=t.forHighlighting)!=null?n:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),i=e.model.root.render(r);return tr(wt(i,r),{classes:e.hasEditablePrompts?"ML__mathlive ML__prompting":"ML__mathlive",attributes:{translate:"no","aria-hidden":"true"}})}function Xs(e,t){let{model:r}=e;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(let o of r.atoms)o.caret=void 0,o.isSelected=!1,o.containsCaret=!1;if(r.selectionIsCollapsed){if(e.isSelectionEditable&&e.hasFocus()){let n=r.at(r.position);n.caret=e.model.mode;let a=n.parent;for(;a;)a.containsCaret=!0,a=a.parent}}else{let o=r.getAtoms(r.selection,{includeChildren:!0});for(let n of o)n.isSelected=!0}return Qp(e,t).toMarkup()}function tt(e,t){var a;if(!Tt(e))return;t!=null||(t={});let r=(a=e.element)==null?void 0:a.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=e.hasEditableContent?"flex":"none");let i=e.field,o=e.isSelectionEditable&&e.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(Xs(e,t)),e.fieldContent=i.getElementsByClassName("ML__mathlive")[0],Co(e,t.interactive),e.dirty=!1}function Co(e,t){let r=e.field;if(!r)return;for(let s of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))s.remove();!(t!=null&&t)&&Le!=="error"&&Le!=="ready"&&setTimeout(()=>{Le==="ready"?Co(e):setTimeout(()=>Co(e),128)},32);let i=e.model,o=parseFloat(getComputedStyle(r).width),a=r.getBoundingClientRect().width/o;if(a=isNaN(a)?1:a,i.selectionIsCollapsed){Ti(e,{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=Os(e,ar(e,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 eh(Qn(e,{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 eh(e){let t=[];for(let r of e){let i=!1;for(let o of t)if(r.left===o.left&&r.right===o.right&&r.top===o.top&&r.bottom===o.bottom){i=!0;break}i||t.push(r)}e=t,t=[];for(let r of e){let i=0;for(let o of e)if(r.left>=o.left&&r.right<=o.right&&r.top>=o.top&&r.bottom<=o.bottom&&(i+=1,i>1))break;i===1&&t.push(r)}return t}var Zs=3,rt;function ne(e,t){t=m({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),rt||(rt={});for(let r of Object.keys(e))rt[r],rt[r]=g(m({},t),{fn:e[r]})}function Ys(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return Ys(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,r=>r[1].toUpperCase()),rt[t]}function mr(e){var t;return(t=Ys(e))==null?void 0:t.target}function K0(e,t){var l;if(!t)return!1;let r,i=[],o=!1,n=!1;Q(t)?(r=t[0],i=t.slice(1)):r=t,r=r.replace(/-\w/g,c=>c[1].toUpperCase());let a=rt[r],s=a==null?void 0:a.target;if(s==="model"){if(!e.isSelectionEditable&&(a!=null&&a.changeContent))return e.model.announce("plonk"),!1;/^(delete|add)/.test(r)&&(r!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(r)),/^complete/.test(r)||Ao(e),rt[r].fn(e.model,...i),ur(e),n=!0,o=!0}else if(s==="virtual-keyboard")n=(l=window.mathVirtualKeyboard.executeCommand(t))!=null?l:!1,o=!0;else if(rt[r]){if(!e.isSelectionEditable&&(a!=null&&a.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(r)&&e.flushInlineShortcutBuffer(),n=rt[r].fn(e,...i),o=!0}else throw new Error(`Unknown command "${r}"`);return s!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||a!=null&&a.changeSelection)&&(e.flushInlineShortcutBuffer(),a!=null&&a.changeContent||e.stopCoalescingUndo(),e.style={}),n&&U(e),o}function th(e,t){var o;e.focus(),Pi.keypressVibration&&Uo()&&navigator.vibrate(Zs);let r=Ys(t);window.MathfieldElement.playSound((o=r==null?void 0:r.audioFeedback)!=null?o:"keypress");let i=e.executeCommand(t);return e.scrollIntoView(),i}ne({performWithFeedback:(e,t)=>th(e,t)});function rh(e){return ur(e,{atIndex:e.suggestionIndex+1}),!1}function ih(e){return ur(e,{atIndex:e.suggestionIndex-1}),!1}ne({complete:dr},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0});ne({nextSuggestion:rh,previousSuggestion:ih},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var To="mathlive#virtual-keyboard-message";function Po(e){var r;return e.type!=="message"?!1:((r=e.data)==null?void 0:r.type)===To}var Eo=class e{constructor(){this.targetOrigin=window.origin;this.originValidator="none";this._boundingRect=new DOMRect(0,0,0,0);this._isShifted=!1;window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new e),this._singleton}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set actionKeycap(t){this.sendMessage("update-setting",{actionKeycap:t})}set shiftKeycap(t){this.sendMessage("update-setting",{shiftKeycap:t})}set backspaceKeycap(t){this.sendMessage("update-setting",{backspaceKeycap:t})}set tabKeycap(t){this.sendMessage("update-setting",{tabKeycap:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.sendMessage("show",t)}hide(t){this.sendMessage("hide",t)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,r,i){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,i){this.listeners[t]&&this.listeners[t].delete(r)}handleEvent(t){if(Po(t)){if(!fi(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){let{action:r}=t;if(r==="execute-command"){let{command:i}=t;mr(i)==="virtual-keyboard"&&this.executeCommand(i);return}if(r==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(r==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,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(m({type:To,action:t},r),this.targetOrigin)}};var Qs={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{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:"\\exp",insert:"\\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 $e=class{constructor(t){var r,i;this.preventOverlayClose=(r=t==null?void 0:t.preventOverlayClose)!=null?r:!1,this.translucent=(i=t==null?void 0:t.translucent)!=null?i:!1,this.state="closed"}get element(){if(this._element)return this._element;let t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var n;if(this.state!=="closed")return;this.state="opening",this.savedActiveElement=O0();let{element:r}=this;((n=t==null?void 0:t.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`,t!=null&&t.child&&r.append(t.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:t}=this;t.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),t.remove(),document.body.style.overflow=(r=this.savedOverflow)!=null?r:"",document.body.style.marginRight=(i=this.savedMarginRight)!=null?i:"",O0()!==this.savedActiveElement&&((n=(o=this.savedActiveElement)==null?void 0:o.focus)==null||n.call(o)),t.innerHTML="",this.state="closed"}handleEvent(t){this.preventOverlayClose||(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function O0(){var t;let e=document.activeElement;for(;(t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement;)e=e.shadowRoot.activeElement;return e}var ua={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"}]},Bi;function da(e,t){var p,h,f;let r=we.singleton;if(!r)return;let i=Kr(e),o=(h=(p=r.getKeycap(i==null?void 0:i.id))==null?void 0:p.variants)!=null?h:"";if(typeof o=="string"&&!el(o)||Array.isArray(o)&&o.length===0){t==null||t();return}let n={},a="";for(let x of nh(o)){let M=tl(x),v=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);n[v]=M;let[b,A]=Di(M);a+=`<div id=${v} class="item ${A}">${b}</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=Pi.createHTML(a),$e.scrim||($e.scrim=new $e),$e.scrim.open({root:(f=r==null?void 0:r.container)==null?void 0:f.querySelector(".ML__keyboard"),child:s}),Bi=new AbortController;let{signal:u}=Bi,d=e==null?void 0:e.getBoundingClientRect();if(d){d.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 x=Math.max(0,Math.min(window.innerWidth-s.offsetWidth,(d.left+d.right-s.offsetWidth)/2)),M=d.top-s.clientHeight+5;s.style.transform=`translate(${x}px, ${M}px)`,s.classList.add("is-visible"),requestAnimationFrame(()=>{s.addEventListener("pointerup",v=>{let b=Kr(v.target);!(b!=null&&b.id)||!n[b.id]||(ma(n[b.id]),Or(),t==null||t(),v.preventDefault())},{capture:!0,passive:!1,signal:u}),s.addEventListener("pointerenter",v=>{let b=Kr(v.target);!(b!=null&&b.id)||!n[b.id]||b.classList.add("is-active")},{capture:!0,signal:u}),s.addEventListener("pointerleave",v=>{let b=Kr(v.target);!(b!=null&&b.id)||!n[b.id]||b.classList.remove("is-active")},{capture:!0,signal:u}),window.addEventListener("pointercancel",()=>{Or(),t==null||t()},{signal:u}),window.addEventListener("pointerup",()=>{Or(),t==null||t()},{signal:u})})}}function Or(){var e;Bi==null||Bi.abort(),Bi=null,(e=$e.scrim)==null||e.close()}function oh(e){if(e==="foreground-color"){let t=[];for(let r of Object.keys(Ji))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ji[r]+'"></span>',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){let t=[];for(let r of Object.keys(Ui))t.push({class:"swatch-button",label:'<span style="background:'+Ui[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return t}}function el(e){return ua[e]!==void 0}function nh(e){var t;return typeof e!="string"?e:(ua[e]||(ua[e]=(t=oh(e))!=null?t:[]),ua[e])}function ah(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r} !important`).join(";")}function sh(e){return Object.keys(e).map(t=>`${t} {${ah(e[t])}}`).join("")}function Bo(e){if(!e)return"";let t=new P,r=new y({mode:"math",type:"root",body:oe(e,{context:t,args:o=>o==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),i=er(wt(new k(r.render(t),{classes:"ML__base"}),t));return tr(i,{classes:"ML__mathlive"}).toMarkup()}function Do(e){var r;if(Array.isArray(e))return e.map(i=>Do(i)).flat();let t=typeof e=="string"?{markup:e}:e;return"rows"in t&&Array.isArray(t.rows)&&(t.rows=t.rows.map(i=>i.map(o=>tl(o)))),(r=t.id)!=null||(t.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[t]}function lh(){var n,a;let t=window.mathVirtualKeyboard.alphabeticLayout;if(t==="auto"){let s=cr();s&&(t=s.virtualLayout),(!t||t==="auto")&&(t=(n={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[j.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[t])!=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:el(c)?c:void 0}):c==="~"?t!=="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:Do({rows:o})}}function rl(e){if(e==="alphabetic")return lh();if(typeof e=="string")return Qs[e],`${e}`,rl(Qs[e]);let t;if("rows"in e&&Array.isArray(e.rows)){"layers"in e||"markup"in e;let o=e,{rows:a}=o,s=Jr(o,["rows"]);t=g(m({},s),{layers:Do({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){let n=e,{markup:a}=n,s=Jr(n,["markup"]);t=g(m({},s),{layers:Do(e.markup)})}else t=m({},e),"layers"in e?t.layers=Do(e.layers):console.error('MathLive 0.95.4: provide either a "rows", "markup" or "layers" property');let r=!1,i=!1;for(let a of t.layers)if(a.rows)for(let s of a.rows.flat()){Ki(s)&&(r=!0);let l=s.command;typeof l=="string"&&["undo","redo","cut","copy","paste"].includes(l)&&(i=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=r),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!i),t}function ch(e,t){var i,o;let r='<div class="left">';if(e.normalizedLayouts.length>1)for(let[n,a]of e.normalizedLayouts.entries()){let s=a,l=[n===t?"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=We(s.tooltip))!=null?i:s.tooltip)+"' "),n!==t&&(r+=`data-layer="${s.layers[0].id}"`),r+=`>${(o=s.label)!=null?o:"untitled"}</div>`}return r+="</div>",r}function z0(e,t){let r="";if(e.editToolbar==="none")return"";let o=[];t.selectionIsCollapsed?o.push("undo","redo","pasteFromClipboard"):o.push("cutToClipboard","copyToClipboard","pasteFromClipboard");let n={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${We("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${We("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${We("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${We("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${We("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return r+=o.map(a=>n[a]).join(""),r}function uh(e){for(let t of e)dh(t)}function dh(e){let t=we.singleton;if(!t)return;let r={};if(!e.id){if(e.hasAttribute("data-label")&&(r.label=e.dataset.label),e.hasAttribute("data-latex")&&(r.latex=e.dataset.latex),e.hasAttribute("data-key")&&(r.key=e.dataset.key),e.hasAttribute("data-insert")&&(r.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(r.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(r.aside=e.dataset.aside),e.className&&(r.class=e.className),!r.label&&!r.latex&&!r.key&&!r.insert&&(r.latex=e.innerText,r.label=e.innerHTML),e.hasAttribute("data-command"))try{r.command=JSON.parse(e.dataset.command)}catch(i){}e.id=t.registerKeycap(r)}if(!e.innerHTML){let[i,o]=Di(r);e.innerHTML=window.MathfieldElement.createHTML(i)}}function mh(){Pe("virtual-keyboard"),Pe("core"),Dr()}function R0(){Ne("core"),Ne("virtual-keyboard")}var ph=`<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 F0(e){e.resetKeycapRegistry(),mh();let t=document.createElement("div");t.className="ML__keyboard";let r=document.createElement("div");r.className="MLK__plate",r.innerHTML=window.MathfieldElement.createHTML(ph+e.normalizedLayouts.map((a,s)=>hh(e,a,s)).join(""));let i=document.createElement("div");i.className="MLK__backdrop",i.appendChild(r),t.appendChild(i),t.addEventListener("pointerdown",gh,{passive:!1});let o=t.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&&e.executeCommand(JSON.parse(c))});uh(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));let n=t.querySelectorAll(".MLK__layer");n.length>0;for(let a of n)a.addEventListener("pointerdown",s=>s.preventDefault());return e.currentLayer=e.latentLayer,t}function hh(e,t,r){let i=[];if(!("layers"in t))return"";for(let o of t.layers)i.push(`<div tabindex="-1" class="MLK__layer" id="${o.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(i.push("<div class='MLK__toolbar' role='toolbar'>"),i.push(ch(e,r)),t.displayEditToolbar&&i.push('<div class="ML__edit-toolbar right"></div>'),i.push("</div>")),i.push(fh(e,o)),i.push("</div>");return i.join("")}function fh(e,t){if(typeof t=="string")return t;let r="";if(typeof t.style=="string"?r+=`<style>${t.style}</style>`:typeof t.style=="object"&&(r+=`<style>${sh(t.style)}</style>`),t.backdrop&&(r+=`<div class='${t.backdrop}'>`),t.container&&(r+=`<div class='${t.container}'>`),t.rows){r+="<div class='MLK__rows'>";for(let i of t.rows){r+="<div dir='ltr' class=row>";for(let o of i)if(o){let n=e.registerKeycap(o),[a,s]=Di(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 t.markup&&(r+=t.markup);return t.container&&(r+="</div>"),t.backdrop&&(r+="</div>"),r}function Di(e,t={shifted:!1}){var o,n,a,s,l,c,u;let r="",i=(o=e.class)!=null?o:"";if(t.shifted&&Ki(e)&&(i+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?r=Bo(e.shift):typeof e.shift=="object"&&(r=e.shift.label?e.shift.label:(n=Bo(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?n:""),typeof e.shift=="object"&&(i=(s=(a=e.shift.class)!=null?a:e.class)!=null?s:"");else{if(r=e.label?e.label:(l=Bo(e.latex||e.insert||"")||e.key)!=null?l:"",e.shift){let d;typeof e.shift=="string"?d=Bo(e.shift):e.shift.label?d=e.shift.label:d=(c=Bo(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?c:"",r+=`<span class="MLK__shift">${d}</span>`}e.aside&&(r+=`<aside>${e.aside}</aside>`)}return e.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)&&e.width&&(i+=(u={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?u:""),[r,i||"MLK__keycap"]}var zr={"[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:["performWithFeedback","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:We("tooltip.undo")},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:We("tooltip.redo")},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",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 tl(e){var r;if(typeof e=="string"){if(!zr[e])return{latex:e};e={label:e}}let t;return"label"in e&&e.label&&zr[e.label]&&(t=g(m(m({},zr[e.label]),e),{label:zr[e.label].label})),"key"in e&&e.key&&zr[e.key]&&(t=g(m(m({},zr[e.key]),e),{key:zr[e.key].key})),t?(t.command==="insertDecimalSeparator"&&(t.label=(r=window.MathfieldElement.decimalSeparator)!=null?r:"."),e.label==="[action]"&&(t=m(m({},t),window.mathVirtualKeyboard.actionKeycap)),e.label==="[shift]"&&(t=m(m({},t),window.mathVirtualKeyboard.shiftKeycap)),e.label==="[backspace]"&&(t=m(m({},t),window.mathVirtualKeyboard.backspaceKeycap)),e.label==="[tab]"&&(t=m(m({},t),window.mathVirtualKeyboard.tabKeycap)),t):e}var Ko;function gh(e){var a;if(e.button!==0)return;let t=we.singleton;if(!t)return;let r=e.target;for(;r&&!r.getAttribute("data-layer");)r=r.parentElement;if(r){t.currentLayer=(a=r.getAttribute("data-layer"))!=null?a:"",e.preventDefault();return}let i=Kr(e.target);if(!(i!=null&&i.id))return;let o=t.getKeycap(i.id);if(!o)return;e.type;let n=new AbortController;i.classList.add("is-pressed"),i.addEventListener("pointerenter",pa(n),{capture:!0,signal:n.signal}),i.addEventListener("pointerleave",pa(n),{capture:!0,signal:n.signal}),i.addEventListener("pointercancel",pa(n),{signal:n.signal}),i.addEventListener("pointerup",pa(n),{signal:n.signal}),Ki(o)&&(i.classList.add("is-active"),t.shiftPressCount++),o.variants&&(Ko&&clearTimeout(Ko),Ko=setTimeout(()=>{i.classList.contains("is-pressed")&&(i.classList.remove("is-pressed"),i.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),da(i,()=>{n.abort(),i==null||i.classList.remove("is-active")}))},300)),e.preventDefault()}function pa(e){return t=>{let r=Kr(t.target);if(!(r!=null&&r.id))return;let i=we.singleton;if(!i)return;let o=i.getKeycap(r.id);if(o){if(t.type==="pointerenter"&&t.target===r&&t.isPrimary&&r.classList.add("is-pressed"),t.type==="pointercancel"){r.classList.remove("is-pressed"),Ki(o)&&(i.shiftPressCount--,r.classList.toggle("is-active",i.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===r){r.classList.remove("is-pressed"),Ki(o)&&(i.shiftPressCount--,r.classList.toggle("is-active",i.isShifted));return}if(t.type==="pointerup"){Ko&&clearTimeout(Ko),Ki(o)?r.classList.toggle("is-active",i.isShifted):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),i.isShifted&&o.shift?typeof o.shift=="string"?i.executeCommand(["insert",o.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]):ma(o.shift):ma(o),i.shiftPressCount===1&&!t.shiftKey&&(i.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function ma(e){var r;let t=e.command;!t&&e.insert&&(t=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]),!t&&e.key&&(t=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!t&&e.latex&&(t=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]),t||(t=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(r=we.singleton)==null||r.executeCommand(t)}function yh(e){if(e.nodeType!==1)return!1;let t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function Kr(e){if(!e)return;let t=e;for(;t&&!yh(t);)t=t.parentElement;return t!=null?t:void 0}function Ki(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var we=class e{constructor(){this.originalContainerBottomPadding=null;this.keycapRegistry={};this._shiftPressCount=0;var t,r,i;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(r=(t=window.document)==null?void 0:t.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={};try{(i=window.top)==null||i.addEventListener("message",this)}catch(o){window.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"&&Bl()){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 t,r,i;return(i=(r=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?i:""}set currentLayer(t){var i;if(!this._element){this.latentLayer=t;return}let r=t?this._element.querySelector(`#${t}.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")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var r;this._shiftPressCount=t>2||t<0?0:t,(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){let r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=t,r}getKeycap(t){return t?this.keycapRegistry[t]:void 0}getLayer(t){let r=this.normalizedLayouts;for(let i of r)for(let o of i.layers)if(o.id===t)return o}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(t){this._actionKeycap=typeof t=="string"?{label:t}:t}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(t){this._shiftKeycap=typeof t=="string"?{label:t}:t}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(t){this._backspaceKeycap=typeof t=="string"?{label:t}:t}get tabKeycap(){return this._tabKeycap}set tabKeycap(t){this._tabKeycap=typeof t=="string"?{label:t}:t}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){let r=Array.isArray(t)?[...t]:[t],i=r.findIndex(o=>o==="default");i>=0&&r.splice(i,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(r),this._normalizedLayouts=r.map(o=>rl(o))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new e}catch(t){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,r,i){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,i){this.listeners[t]&&this.listeners[t].delete(r)}get element(){return this._element}set element(t){var r;this._element!==t&&((r=this._element)==null||r.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var r;if(!this._visible)return new DOMRect;let t=(r=this._element)==null?void 0:r.getElementsByClassName("MLK__plate")[0];return t?t.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var r,i;let t=this.boundingRect.height;if(this.container===document.body){(r=this._element)==null||r.style.setProperty("--_keyboard-height",`calc(${t}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);let o=t-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${o}px)`:`${o}px`}else(i=this._element)==null||i.style.setProperty("--_keyboard-height",`${t}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;let t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;let t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.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]=Di(o,{shifted:this.isShifted});i.innerHTML=window.MathfieldElement.createHTML(n),i.className=a}}}show(t){var i;if(this._visible)return;let r=this.container;if(r&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){let o=this._element.getElementsByClassName("MLK__plate")[0];if(o&&this.observer.observe(o),r===window.document.body){let n=r.style.paddingBottom;this.originalContainerBottomPadding=n;let a=o.offsetHeight-1;r.style.paddingBottom=n?`calc(${n} + ${a}px)`:`${a}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(i=this._element)==null||i.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var o;return(o=this._element)==null?void 0:o.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){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}),Or(),R0(),(i=this._element)==null||i.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(r.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,r;return(r=(t=this.element)==null?void 0:t.offsetHeight)!=null?r:0}buildAndAttachElement(){var t;this.element,this.element=F0(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&da(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(Po(t)){if(!fi(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");t.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(t.source,this.connectedMathfieldWindow=t.source),this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,r){let{action:i}=t;if(i==="execute-command"){let{command:o}=t;if(mr(o)!=="virtual-keyboard"&&window===window.parent)return;this.executeCommand(o);return}if((i==="connect"||i==="show")&&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 t.animate!="undefined"?this.show({animate:t.animate}):this.show();return}if(i==="hide"){typeof t.animate!="undefined"?this.hide({animate:t.animate}):this.hide();return}if(i==="update-setting"){t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.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(t,r,i){if(i||(i=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||i===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:m({type:To,action:t},r)}));return}if(i)i.postMessage(m({type:To,action:t},r),{targetOrigin:this.targetOrigin});else if(t==="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(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},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(t){let r=this._element;if(!r)return;r.classList.toggle("is-math-mode",t.mode==="math"),r.classList.toggle("is-text-mode",t.mode==="text"),r.classList.toggle("can-undo",t.canUndo),r.classList.toggle("can-redo",t.canRedo),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-paste",!0);let i=r.querySelectorAll(".ML__edit-toolbar");if(i)for(let o of i)o.innerHTML=z0(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(t){let r,i=[];return Q(t)?(r=t[0],i=t.slice(1)):r=t,r=r.replace(/-\w/g,o=>o[1].toUpperCase()),mr(t)==="virtual-keyboard"?rt[r].fn(...i):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};if(ue()&&!("mathVirtualKeyboard"in window))if(window===window.top){let e=we.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>Eo.singleton,configurable:!0});function Oi(e){let t={};for(let r of Object.keys(e))switch(r){case"scriptDepth":if(Q(e.scriptDepth))t.scriptDepth=[e.scriptDepth[0],e.scriptDepth[1]];else if(typeof e.scriptDepth=="number")t.scriptDepth=[e.scriptDepth,e.scriptDepth];else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let i=e.mathVirtualKeyboardPolicy.toLowerCase();if(i==="sandboxed"){if(window!==window.top){let o=we.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>o})}i="manual"}t.mathVirtualKeyboardPolicy=i;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?j.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.95.4: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=Yo(e.macros);break;default:Q(e[r])?t[r]=[...e[r]]:typeof e[r]=="object"&&!(e[r]instanceof Element)&&r!=="computeEngine"?t[r]=m({},e[r]):t[r]=e[r]}return t}function Ot(e,t){let r;typeof t=="string"?r=[t]:t===void 0?r=Object.keys(e):r=t;let i={};for(let o of r)e[o]===null?i[o]=null:Q(e[o])?i[o]=[...e[o]]:typeof e[o]=="object"&&!(e[o]instanceof Element)&&o!=="computeEngine"?i[o]=m({},e[o]):i[o]=e[o];return typeof t=="string"?i[t]:i}function zi(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:gr,backgroundColorMap:Gr,letterShapeStyle:j.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",environmentPopoverPolicy:"auto",keybindings:Jd,inlineShortcuts:Zn,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:Ud,value:""}}function il(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function Mt(e){return typeof e=="number"&&!Number.isNaN(e)}function Rr(e){return Array.isArray(e)&&e.length===2}function Ri(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}var N0="<mo>⁡</mo>",fa="<mo>⁢</mo>";function ha(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function G(e,t){return!e||!t.generateID?"":` extid="${e}"`}function bh(e,t,r){var d,p,h,f,x,M,v,b,A;let i=!1;t=t!=null?t:e.atoms.length;let o="",n="",a=e.atoms[e.index],s=(p=(d=a.style)==null?void 0:d.variant)!=null?p:"",l=(f=(h=a.style)==null?void 0:h.variantStyle)!=null?f:"",c="";(s||l)&&(c=(x={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[l+s])!=null?x:"",c=`mathvariant="${c}"`);let u={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(u[a.command]){e.index+=1;let _=`<mi${G(a.id,r)}${c}>${u[a.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(_=fa+_),Nr(_,e,r)||(e.mathML+=_,e.lastType="mi"),!0}if(a.command==="\\operatorname")n=Fi(a.body),e.index+=1;else if(s||l)for(;e.index<t&&(a.type==="mord"||a.type==="macro")&&!a.isDigit()&&s===((v=(M=a.style)==null?void 0:M.variant)!=null?v:"")&&l===((A=(b=a.style)==null?void 0:b.variantStyle)!=null?A:"");)n+=Fi([a]),e.index+=1,a=e.atoms[e.index];else(a.type==="mord"||a.type==="macro")&&!a.isDigit()&&(n+=Fi([a]),e.index+=1);if(n.length>0){i=!0,o=`<mi${c}>${n}</mi>`;let _=e.lastType;o.endsWith(">f</mi>")||o.endsWith(">g</mi>")?(o+=N0,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(o)?"mo":"mi",Nr(o,e,r)||((_==="mi"||_==="mn"||_==="mtext"||_==="fence")&&(o=fa+o),e.mathML+=o)}return i}function xh(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function vh(e){let t=-1,r=e.index,i=!1,o=!1;for(;r<e.atoms.length&&!i&&!o;){let n=e.atoms[r];i=!n.isDigit(),o=!i&&n.superscript!==void 0,r++}return o&&(t=r-1),t}function Nr(e,t,r){var l;let i=t.atoms[t.index-1];if(!i)return!1;if(!i.superscript&&!i.subscript)if(((l=t.atoms[t.index])==null?void 0:l.type)==="subsup")i=t.atoms[t.index],t.index+=1;else return!1;let o=t.lastType;t.lastType="";let n=I(i.superscript,r);t.lastType="";let a=I(i.subscript,r);if(t.lastType=o,!n&&!a)return!1;let s="";return n&&a?s=`<msubsup>${e}${a}${n}</msubsup>`:n?s=`<msup>${e}${n}</msup>`:a&&(s=`<msub>${e}${a}</msub>`),t.mathML+=s,t.lastType="",!0}function wh(e,t,r){t=t!=null?t:e.atoms.length;let i=e.index,o="";for(;e.index<t&&e.atoms[e.index].mode==="text";)o+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return o.length>0?(e.mathML+=`<mtext ${G(e.atoms[i].id,r)}>${o}</mtext>`,e.lastType="mtext",!0):!1}function kh(e,t,r){t=t!=null?t:e.atoms.length;let i=e.index,o="",n=vh(e);for(n>=0&&n<t&&(t=n);e.index<t&&e.atoms[e.index].isDigit();)o+=e.atoms[e.index].asDigit(),e.index+=1;return o.length<=0?!1:(o="<mn"+G(e.atoms[i].id,r)+">"+o+"</mn>",n<0&&xh(e)&&(n=e.index,e.index+=1),Nr(o,e,r)||(e.mathML+=o,e.lastType="mn"),!0)}function Mh(e,t,r){let i=!1;t=t!=null?t:e.atoms.length;let o="",n="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let a=!1,s=0,l=e.index,c=-1,u=l+1;for(;u<t&&!a;)e.atoms[u].type==="mopen"?s+=1:e.atoms[u].type==="mclose"&&(s-=1),s===-1&&(a=!0,c=u),u+=1;a&&(o="<mrow>",o+=Fr(e.atoms[l],r),o+=I(e.atoms,r,l+1,c),o+=Fr(e.atoms[c],r),o+="</mrow>",e.index=c+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=fa),Nr(o,e,r)&&(i=!0,e.lastType="",o=""),n="fence")}return o.length>0&&(i=!0,e.mathML+=o,e.lastType=n),i}function Sh(e,t,r){let i=!1;t=t!=null?t:e.atoms.length;let o="",n="",a=e.atoms[e.index];if(!a)return!1;let s={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(s[a.command]){e.index+=1;let l=`<mo${G(a.id,r)}>${s[a.command]}</mo>`;return Nr(l,e,r)||(e.mathML+=l,e.lastType="mo"),!0}if(e.index<t&&(a.type==="mbin"||a.type==="mrel"))o+=ol(e.atoms[e.index],r),e.index+=1,n="mo";else if(e.index<t&&a.type==="mop"){if(a.subsupPlacement==="over-under"&&(a.superscript||a.subscript)){let l=Fr(a,r);a.superscript&&a.subscript?(o+="<munderover>"+l,o+=I(a.subscript,r),o+=I(a.superscript,r),o+="</munderover>"):a.superscript?(o+="<mover>"+l,o+=I(a.superscript,r),o+="</mover>"):a.subscript&&(o+="<munder>"+l,o+=I(a.subscript,r),o+="</munder>"),n="mo"}else{let l=e.atoms[e.index],c=l.value==="\\operatorname",u=c?'<mi class="MathML-Unit"'+G(l.id,r)+">"+Fi(l.value)+"</mi>":Fr(l,r);o+=u,!c&&!/^<mo>(.*)<\/mo>$/.test(u)?(o+=N0,n="applyfunction"):n=c?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(o)&&(o=fa+o),e.index+=1}return o.length>0&&(i=!0,Nr(o,e,r)||(e.mathML+=o,e.lastType=n)),i}function I(e,t,r,i){t!=null||(t={});let o={atoms:[],index:r!=null?r:0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")o.mathML=e.toString();else if(typeof e=="string")o.mathML=e;else if(e instanceof y)o.mathML=ol(e,t);else if(Array.isArray(e)){o.atoms=e;let n=0;for(i=i||(e?e.length:0);o.index<i;)if(wh(o,i,t)||kh(o,i,t)||bh(o,i,t)||Sh(o,i,t)||Mh(o,i,t))n+=1;else if(o.index<i){let a=ol(o.atoms[o.index],t);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,Nr(a,o,t)?n+=1:a.length>0&&(o.mathML+=a,n+=1)}n>1&&(o.mathML="<mrow>"+o.mathML+"</mrow>")}return o.mathML}function Fr(e,t){let r="",i=Fi(e.value);return i&&(r="<mo"+G(e.id,t)+">"+i+"</mo>"),r}function Fi(e){if(!e)return"";if(typeof e=="string")return ha(e);if(!Array.isArray(e)&&typeof e.body=="string")return ha(e.body);let t="";for(let r of e)typeof r.value=="string"&&(t+=r.value);return ha(t)}function ol(e,t){var x,M,v,b,A,_,T,E,R,F,xe,je,nt,Ft,Nt,fe,$i,qi,Hi,ie,me,Me;if(e.mode==="text")return`<mi${G(e.id,t)}>${e.value}</mi>`;let r={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\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",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},i={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5},o="",n="",a,s,l,c,u,d,{command:p}=e;if(e.command==="\\error")return`<merror${G(e.id,t)}>${I(e.body,t)}</merror>`;let h={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},f={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"group":case"root":o=I(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(o+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(o+="<mo>"+(h[e.leftDelim]||e.leftDelim)+"</mo>")),o+="<mtable",e.colFormat){for(o+=' columnalign="',l=0;l<e.colFormat.length;l++)e.colFormat[l].align&&(o+={l:"left",c:"center",r:"right"}[e.colFormat[l].align]+" ");o+='"'}for(o+=">",s=0;s<e.array.length;s++){for(o+="<mtr>",a=0;a<e.array[s].length;a++)o+="<mtd>"+I(e.array[s][a],t)+"</mtd>";o+="</mtr>"}o+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(o+="<mo>"+(h[e.leftDelim]||e.rightDelim)+"</mo>"),o+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(o+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(o+="<mo"+G(e.id,t)+">"+(h[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(o+="<mfrac>",o+=I(e.above,t)||"<mi> </mi>",o+=I(e.below,t)||"<mi> </mi>",o+="</mfrac>"):(o+="<mtable"+G(e.id,t)+">",o+="<mtr>"+I(e.above,t)+"</mtr>",o+="<mtr>"+I(e.below,t)+"</mtr>",o+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(o+="<mo"+G(e.id,t)+">"+(h[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(o+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(o+="<msqrt"+G(e.id,t)+">",o+=I(e.body,t),o+="</msqrt>"):(o+="<mroot"+G(e.id,t)+">",o+=I(e.body,t),o+=I(e.above,t),o+="</mroot>");break;case"leftright":o="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(o+=`<mo${G(e.id,t)}>${(x=h[e.leftDelim])!=null?x:e.leftDelim}</mo>`),e.body&&(o+=I(e.body,t)),e.rightDelim&&e.rightDelim!=="."&&(o+=`<mo${G(e.id,t)}>${(M=h[e.rightDelim])!=null?M:e.rightDelim}</mo>`),o+="</mrow>";break;case"sizeddelim":case"delim":o+=`<mo${G(e.id,t)}>${h[e.delim]||e.delim}</mo>`;break;case"accent":o+='<mover accent="true"'+G(e.id,t)+">",o+=I(e.body,t),o+="<mo>"+(f[p]||e.accent)+"</mo>",o+="</mover>";break;case"line":case"overlap":break;case"overunder":u=e.above,c=e.below,(e.svgAbove||u)&&(e.svgBelow||c)?d=e.body:u&&u.length>0?(d=e.body,(b=(v=e.body)==null?void 0:v[0])!=null&&b.below?(c=e.body[0].below,d=e.body[0].body):((_=(A=e.body)==null?void 0:A[0])==null?void 0:_.type)==="first"&&((E=(T=e.body)==null?void 0:T[1])!=null&&E.below)&&(c=e.body[1].below,d=e.body[1].body)):c&&c.length>0&&(d=e.body,(F=(R=e.body)==null?void 0:R[0])!=null&&F.above?(u=e.body[0].above,d=e.body[0].body):((je=(xe=e.body)==null?void 0:xe[0])==null?void 0:je.type)==="first"&&((Ft=(nt=e.body)==null?void 0:nt[1])!=null&&Ft.above)&&(u=e.body[1].overscript,d=e.body[1].body)),(e.svgAbove||u)&&(e.svgBelow||c)?(o+=`<munderover ${G(e.id,t)}>`,o+=(Nt=r[e.svgBody])!=null?Nt:I(d,t),o+=(fe=r[e.svgBelow])!=null?fe:I(c,t),o+=($i=r[e.svgAbove])!=null?$i:I(u,t),o+="</munderover>"):e.svgAbove||u?(o+=`<mover ${G(e.id,t)}>`+((qi=r[e.svgBody])!=null?qi:I(d,t)),o+=(Hi=r[e.svgAbove])!=null?Hi:I(u,t),o+="</mover>"):(e.svgBelow||c)&&(o+=`<munder ${G(e.id,t)}>`+((ie=r[e.svgBody])!=null?ie:I(d,t)),o+=(me=r[e.svgBelow])!=null?me:I(c,t),o+="</munder>");break;case"placeholder":o+="?";break;case"mord":{o=typeof e.value=="string"?e.value:p;let pe=p?p.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null;pe?o="&#x"+pe[1]+";":o.length>0&&o.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?o="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?o=e.value.charAt(0):(console.error("Did not expect this"),o=""));let at=/\d/.test(o)?"mn":"mi";o=`<${at}${G(e.id,t)}>${ha(o)}</${at}>`;break}case"mbin":case"mrel":case"minner":o=Fr(e,t);break;case"mpunct":o='<mo separator="true"'+G(e.id,t)+">"+p+"</mo>";break;case"mop":e.body!=="\u200B"&&(o="<mo"+G(e.id,t)+">",o+=p==="\\operatorname"?e.body:p||e.body,o+="</mo>");break;case"box":o='<menclose notation="box"',e.backgroundcolor&&(o+=' mathbackground="'+e.backgroundcolor+'"'),o+=G(e.id,t)+">"+I(e.body,t)+"</menclose>";break;case"spacing":o+='<mspace width="'+((Me=i[p])!=null?Me:0)+'em"/>';break;case"enclose":o='<menclose notation="';for(let pe in e.notation)Object.prototype.hasOwnProperty.call(e.notation,pe)&&e.notation[pe]&&(o+=n+pe,n=" ");o+=G(e.id,t)+'">'+I(e.body,t)+"</menclose>";break;case"prompt":o='<menclose notation="roundexbox""">'+I(e.body,t)+"</menclose>";break;case"space":o+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":o+=Fr(e,t);break;case"mclose":o+=Fr(e,t);break;case"macro":{let pe=e.command+Fi(e.macroArgs);pe&&(o+=`<mo ${G(e.id,t)}>${pe}</mo>`)}break;case"latexgroup":o+=I(e.body,t);break;case"latex":o+="<mtext"+G(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":o+=I(e.body,t);break;case"text":o+=`<mtext ${G(e.id,t)}x>${e.value}</mtext>`;break;default:}return o}var Oo={"\\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":" "},nl={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};function te(e){var o,n,a,s,l,c,u,d,p,h,f,x,M;if(!e)return"";if(Q(e)){if(e.length===0||(e[0].type==="first"&&(e=e.slice(1)),e.length===0))return"";let v="";if(e[0].mode==="latex")for(let b of e)v+=te(b);else if(e[0].mode==="text"){let b=0;for(v='"';((o=e[b])==null?void 0:o.mode)==="text";)v+=e[b].body?te(e[b].body):e[b].value,b++;v+='"'+te(e.slice(b))}else if(e[0].mode==="math"){let b=0;for(;e[b]&&e[b].mode==="math";)v+=te(e[b]),b++;v+=te(e.slice(b))}else console.warn("toASCIIMath: Unexpected mode");return v.trim()}if(e.mode==="text")return'"'+e.value+'"';let t="",{command:r}=e,i;if(r==="\\placeholder")return`(${te(e.body)})`;switch(e.type){case"first":return"";case"group":case"root":t=(n=Oo[r])!=null?n:te(e.body);break;case"genfrac":{let E=e;(E.leftDelim||E.rightDelim)&&(t+=E.leftDelim==="."||!E.leftDelim?"{:":E.leftDelim),E.hasBarLine?(t+="(",t+=te(E.above),t+=")/(",t+=te(E.below),t+=")"):(t+="("+te(E.above)+"),",t+="("+te(E.below)+")"),(E.leftDelim||E.rightDelim)&&(t+=E.rightDelim==="."||!E.rightDelim?"{:":E.rightDelim)}break;case"surd":t+=e.hasEmptyBranch("above")?"sqrt("+te(e.body)+")":"root("+te(e.above)+")("+te(e.body)+")";break;case"latex":t=e.value;break;case"leftright":{let E=e;t+=E.leftDelim==="."||!E.leftDelim?"{:":E.leftDelim,t+=te(E.body),t+=E.rightDelim==="."||!E.rightDelim?":}":E.rightDelim}break;case"sizeddelim":case"delim":break;case"overlap":break;case"overunder":break;case"mord":t=(s=(a=Oo[r])!=null?a:r)!=null?s:typeof e.value=="string"?e.value:"",t.startsWith("\\")&&(t+=" "),i=r?r.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null,i?t=String.fromCodePoint(Number.parseInt("0x"+i[1])):t.length>0&&t.startsWith("\\")&&(t=typeof e.value=="string"?e.value.charAt(0):e.command);break;case"mbin":case"mrel":case"minner":t=(c=(l=Oo[r])!=null?l:nl[r])!=null?c:e.value;break;case"mopen":case"mclose":t+=e.value;break;case"mpunct":t=(u=nl[r])!=null?u:r;break;case"mop":e.value!=="\u200B"&&(t="",t+=r==="\\operatorname"?te(e.body):(d=e.value)!=null?d:r,t+=" ");break;case"array":let v=e.array,b=e.environmentName,A=(p={bmatrix:["[","]"],"bmatrix*":["[","]"]}[b])!=null?p:["(",")"],_=[];for(let E of v){let R=[];for(let F of E)R.push(A[0]+te(F)+A[1]);_.push(R.join(","))}let T=(h={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[b])!=null?h:["(",")"];t=T[0]+_.join(",")+T[1];break;case"box":break;case"spacing":t=(f=Oo[r])!=null?f:" ";break;case"enclose":t="("+te(e.body)+")";break;case"space":t=" ";break;case"subsup":t="";break;case"macro":t=(M=(x=Oo[r])!=null?x:nl[r])!=null?M:te(e.body);break}if(!e.hasEmptyBranch("subscript")){t+="_";let v=te(e.subscript);t+=v.length>1?"("+v+")":v}if(!e.hasEmptyBranch("superscript")){t+="^";let v=te(e.superscript);t+=v.length>1?"("+v+")":v}return t}var Ni={"\\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"},al={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 _h(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function zo(e){let t=0;if(Q(e))for(let r of e)r.type!=="first"&&(t+=1);return t===1}function Ah(e){if(Q(e)){for(let t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function I0(e){let t="";if(Q(e))for(let r of e)r.type!=="first"&&typeof r.value=="string"&&(t+=r.value);return t}function Lh(e){return e?e.map(t=>t.value).join(""):""}function D(e,t){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(!t)return"";let o="";if(Q(t)){let u=!1,d=!1;for(let p=0;p<t.length;p++)t[p].type!=="first"&&(t[p].mode!=="text"&&(d=!1),p<t.length-2&&t[p].type==="mopen"&&t[p+2].type==="mclose"&&t[p+1].type==="mord"?(o+=" of ",o+=i(D(e,t[p+1])),p+=2):t[p].mode==="text"?d?o+=(n=t[p].value)!=null?n:" ":(d=!0,o+=D("text",t[p])):t[p].isDigit()?u?o+=t[p].asDigit():(u=!0,o+=D(e,t[p])):(u=!1,o+=D(e,t[p])))}else if(t.mode==="text")t.id&&e==="math"&&(o+='<mark name="'+t.id.toString()+'"/>'),o+=t.value;else{t.id&&e==="math"&&(o+='<mark name="'+t.id.toString()+'"/>');let u="",d="",p="",h=!1,{command:f}=t;switch(f){case"\\vec":return"vector "+D(e,t.body);case"\\acute":return D(e,t.body)+" acute";case"\\grave":return D(e,t.body)+" grave";case"\\dot":return"dot over"+D(e,t.body);case"\\ddot":return"double dot over"+D(e,t.body);case"\\mathring":return"ring over"+D(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+D(e,t.body);case"\\bar":return D(e,t.body)+" bar";case"\\breve":return D(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+D(e,t.body);case"\\hat":case"\\widehat":return"hat over"+D(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+D(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+D(e,t.body)}switch(t.type){case"prompt":let x=t.body.length>1?'start input . <break time="500ms"/> '+D(e,t.body)+'. <break time="500ms"/> end input':"blank";o+=' <break time="300ms"/> '+x+'. <break time="700ms"/>'+((a=t.correctness)!=null?a:"")+' . <break time="700ms"/> ';break;case"array":let M=t.array,v=t.environmentName;if(Object.keys(al).includes(v)){o+=` begin ${al[v]} `;for(let _=0;_<M.length;_++){_>0&&(o+=","),o+=` row ${_+1} `;for(let T=0;T<M[_].length;T++)T>0&&(o+=","),o+=` column ${T+1}: `,o+=D("math",M[_][T])}o+=` end ${al[v]} `}break;case"group":f==="\\ne"?o+=" not equal ":(f==="\\not"&&(o+=" not "),o+=D("math",t.body));break;case"root":o+=D("math",t.body);break;case"genfrac":if(u=D("math",t.above),d=D("math",t.below),zo(t.above)&&zo(t.below)){let T={"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 "}[I0(t.above)+"/"+I0(t.below)];T?o=T: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(p=D("math",t.body),t.hasEmptyBranch("above"))o+=zo(t.body)?" the square root of "+p+" , ":' the square root of <break time="200ms"/>'+p+'. <break time="200ms"/> End square root';else{let _=D("math",t.above);_=_.trim();let T=_.replace(/<mark([^/]*)\/>/g,"");T==="3"?o+=' the cube root of <break time="200ms"/>'+p+'. <break time="200ms"/> End cube root':T==="n"?o+=' the nth root of <break time="200ms"/>'+p+'. <break time="200ms"/> End root':o+=' the root with index: <break time="200ms"/>'+_+', of <break time="200ms"/>'+p+'. <break time="200ms"/> End root'}break;case"leftright":{let _=t;o+=(s=_.leftDelim?Ni[_.leftDelim]:void 0)!=null?s:_.leftDelim,o+=D("math",t.body),o+=(l=_.rightDelim?Ni[_.rightDelim]:void 0)!=null?l:_.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":let b=f.replace(/^\\/g,""),A=Zr()[b];A&&(A!=null&&A.expand?o+=D("math",t.body):o+=`${b} `);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(f==="\\mathbin"||f==="\\mathrel"||f==="\\mathopen"||f==="\\mathclose"||f==="\\mathpunct"||f==="\\mathord"||f==="\\mathinner"){o=D(e,t.body);break}let _=t.isDigit()?t.asDigit():t.value,T=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(T=t.value,_=T),e==="text")o+=_;else{if(t.type==="mbin"&&(o+='<break time="150ms"/>'),_){let E=Ni[_]||(T?Ni[T.trim()]:"");if(E)o+=" "+E;else{let R=T?_h(T.trim()):"";o+=R||r(_)}}else o+=D("math",t.body);t.type==="mbin"&&(o+='<break time="150ms"/>')}break}case"mop":if(t.value!=="\u200B"){let _=t.command;if(_==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let T=D("math",t.superscript);T=T.trim();let E=D("math",t.subscript);E=E.trim(),o+=' the summation from <break time="200ms"/>'+E+'<break time="200ms"/> to <break time="200ms"/>'+T+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(t.hasEmptyBranch("subscript"))o+=" the summation of";else{let T=D("math",t.subscript);T=T.trim(),o+=' the summation from <break time="200ms"/>'+T+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(_==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let T=D("math",t.superscript);T=T.trim();let E=D("math",t.subscript);E=E.trim(),o+=' the product from <break time="200ms"/>'+E+'<break time="200ms"/> to <break time="200ms"/>'+T+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(t.hasEmptyBranch("subscript"))o+=" the product of ";else{let T=D("math",t.subscript);T=T.trim(),o+=' the product from <break time="200ms"/>'+T+'<break time="200ms"/> of <break time="150ms"/>',h=!0}else if(_==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let T=D("math",t.superscript);T=T.trim();let E=D("math",t.subscript);E=E.trim(),o+=' the integral from <break time="200ms"/>'+i(E)+'<break time="200ms"/> to <break time="200ms"/>'+i(T)+' <break time="200ms"/> of ',h=!0}else o+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){let T=(c=Ni[t.value])!=null?c:t.command?Ni[t.command]:void 0;o+=T||" "+t.value}else t.command&&(t.command==="\\mathop"?o+=D("math",t.body):t.command==="\\operatorname"?o+=Lh(t.body):o+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":p=D("math",t.body),o+=" crossed out "+p+". End crossed out.";break;case"space":case"spacing":break}if(!h&&!t.hasEmptyBranch("superscript")){let x=D(e,t.superscript);x=x.trim();let M=x.replace(/<[^>]*>/g,"");if(zo(t.superscript)){if(e==="math"){let v=Ah(t.superscript);v&&(o+='<mark name="'+v+'"/>')}M==="\u2032"?o+=" prime ":M==="2"?o+=" squared ":M==="3"?o+=" cubed ":Number.isNaN(Number.parseInt(M))?o+=" to the "+x+"; ":o+=' to the <say-as interpret-as="ordinal">'+M+"</say-as> power; "}else Number.isNaN(Number.parseInt(M))?o+=" raised to the "+x+"; ":o+=' raised to the <say-as interpret-as="ordinal">'+M+"</say-as> power; "}if(!h&&!t.hasEmptyBranch("subscript")){let x=D("math",t.subscript);x=x.trim(),o+=zo(t.subscript)?" sub "+x:" subscript "+x+". End subscript. "}}return o}function zt(e){var r,i;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){let o=I(e);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.95.4: `SRE.toSpeech()` runtime error",s)}return a}return""}let t=D("math",e);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let o="";window.MathfieldElement.speechEngineRate&&(o='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),t='<?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>"+t+"</s></p>"+(o?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&It()==="macos"?t=t.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,""):t=t.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return t}function Ir(e,t){return e+zt(t)}ne({speak:(e,t,r)=>Ch(e,t,r)},{target:"mathfield"});function Ch(e,t,r){var l,c;r=r!=null?r:{withHighlighting:!1};let{model:i}=e;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:p}=i.at(i.position);p!=null&&p.parent?d=p: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(t);if(a===null)return(c=(l=window.MathfieldElement).speakHook)==null||c.call(l,n(t)),!1;(r.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");let s=zt(a);return ue()&&r.withHighlighting?(it().readAloudMathField=e,tt(e,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(e.field,s)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(s),!1}function V0(e){var t,r;if(ue())if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){let i=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(i)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.95.4: 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:(t=window.MathfieldElement.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(o,(n,a)=>{if(n)console.trace(`MathLive 0.95.4: \`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.95.4: The Google speech engine is not supported yet. Please come again.")}function $0(e){var r;let t;if(e.parent.type==="prompt")e.parentBranch==="body"&&(t="prompt");else if(e.parentBranch==="body")t=e.type&&(r={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[e.type])!=null?r:"parent";else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(t="index"):e.parentBranch==="superscript"?t="superscript":e.parentBranch==="subscript"&&(t="subscript");return t!=null?t:"parent"}function q0(e,t,r,i){let o="";if(t==="plonk")window.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();else if(t==="delete")o=Ir("deleted: ",i);else if(t==="focus"||t.includes("move"))o=Eh(e.model,r)+(e.model.selectionIsCollapsed?"":"selected: ")+Th(e.model);else if(t==="replacement")o=Ir("",e.model.at(e.model.position));else if(t==="line"){let n=Ir("",e.model.root);e.keyboardDelegate.setAriaLabel(n)}else o=i?Ir(t+" ",i):t;if(o){let n=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=o+n}}function Eh(e,t){if(Number.isNaN(t))return"";let r=e.at(t);if(!r||r.treeDepth<=e.at(e.position).treeDepth)return"";let i="",o=r.parent,n=e.at(e.position).parent;for(;o!==e.root&&o!==n;)i+=`out of ${$0(o)};`,o=o.parent;return i}function Th(e){if(!e.selectionIsCollapsed)return Ir("",e.getAtoms(e.selection));let t="",r=e.at(e.position),i=$0(r);return r.isFirstSibling&&(t=(i?"start of "+i:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(t+=i?"end of "+i:"unknown"):t+=Ir("",r),t}var Ro=class{constructor(t,r,i,o){this.mathfield=t,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 t={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(t.direction=this.selection.direction),{content:this.root.toJson(),selection:t,mode:this.mode}}setState(t,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"}),N(this,o)){let a=this.silenceNotifications;this.silenceNotifications=!0,this.mode=t.mode,this.root=et(t.content),this.selection=t.selection,this.silenceNotifications=a,K(this,o)}this.silenceNotifications=i}get atoms(){return this.root.children}get selection(){return this._selection}set selection(t){this.setSelection(t)}setSelection(t,r){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var l,c,u;let i=this.normalizeSelection(t,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=X(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=y.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(t){var i;let r=this.at(t);(r==null?void 0:r.type)==="placeholder"?this.setSelection(t-1,t):((i=r==null?void 0:r.rightSibling)==null?void 0:i.type)==="placeholder"?this.setSelection(t,t+1):this.position=t,r instanceof Y&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(t){this.setSelection(t,t)}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(t="forward"){return this._anchor===this._position?!1:(t==="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(t){return this.atoms[t]}offsetOf(t){return this.atoms.indexOf(t)}getSiblingsRange(t){let r=this.at(t),{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(t,r){let i=this.at(t).branch(r);return[this.offsetOf(i[0]),this.offsetOf(i[i.length-1])]}getAtoms(t,r,i){let o=i!=null?i:{};if(Ri(t)){if(o=r!=null?r:{},t.ranges.length>1)return t.ranges.reduce((u,d)=>[...u,...this.getAtoms(d,o)],[]);t=t.ranges[0]}let n,a;if(Mt(t)){if(n=t,!Mt(r))return[];a=r}else[n,a]=t,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(!o.includeChildren&&s===1&&l===this.lastOffset)return[this.root];let c=[];for(let u=s;u<=l;u++){let d=this.atoms[u];H0(this,d,s,l)&&c.push(d)}return o.includeChildren||(c=c.filter(u=>{let d=!1,{parent:p}=u;for(;p&&!d;)d=H0(this,p,s,l),p=p.parent;return!d})),c}getAllAtoms(t=0){let r=[],i=this.lastOffset;for(let o=t;o<=i;o++)r.push(this.atoms[o]);for(let o=0;o<t;o++)r.push(this.atoms[o]);return r}findAtom(t,r=0,i="forward"){let o,n=this.lastOffset;if(i==="forward"){for(let a=r;a<=n;a++)if(o=this.atoms[a],t(o))return o;for(let a=0;a<r;a++)if(o=this.atoms[a],t(o))return o;return}for(let a=r;a>=0;a--)if(o=this.atoms[a],t(o))return o;for(let a=n;a>r;a--)if(o=this.atoms[a],t(o))return o}extractAtoms(t){let r=this.getAtoms(t);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 y({type:"root",body:[]}),r;for(let i of r)i.parent.removeChild(i);return r}deleteAtoms(t){this.extractAtoms(t),this.position=t[0]}atomToString(t,r){let i=r!=null?r:"latex";if(i.startsWith("latex"))return y.serialize([t],{expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",defaultMode:this.mathfield.options.defaultMode});if(i==="math-ml")return I(t);if(i==="spoken")return zt(t);if(i==="spoken-text"){let o=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";let n=zt(t);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=zt(t);return window.MathfieldElement.textToSpeechMarkup=o,n}return i==="ascii-math"?te(t):(console.error(`MathLive 0.95.4: Unexpected format "${i}`),"")}getValue(t,r,i){if(t===void 0)return this.atomToString(this.root,"latex");if(typeof t=="string"&&t!=="math-json")return this.atomToString(this.root,t);let o,n;if(Mt(t)&&Mt(r)?(o=[this.normalizeRange([t,r])],n=i!=null?i:"latex"):Rr(t)?(o=[this.normalizeRange(t)],n=r):Ri(t)?(o=t.ranges,n=r):(o=[this.normalizeRange([0,-1])],n=t!=null?t:"latex"),n==="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"]';let a=this.getValue({ranges:o},"latex-unstyled");try{let s=window.MathfieldElement.computeEngine.parse(a);return JSON.stringify(s.json)}catch(s){return JSON.stringify(["Error",`'${s.toString()}'`])}}if(n.startsWith("latex")){let a={expandMacro:n==="latex-expanded",skipStyles:n==="latex-unstyled",defaultMode:this.mathfield.options.defaultMode};return B(o.map(s=>y.serialize(this.getAtoms(s),a)))}return o.map(a=>this.getAtoms(a).map(s=>this.atomToString(s,n)).join("")).join("")}extendSelectionTo(t,r){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{let i=this.normalizeRange([t,r]),[o,n]=i,{parent:a}=this.at(n);if(a&&(a.type==="genfrac"||a.type==="subsup"))for(;a!==this.root&&sl(this,a,[o,n]);)n=this.offsetOf(a),a=a.parent;for(a=this.at(o).parent;a!==this.root&&sl(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&&sl(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(t,r,i=[]){var n,a;((a=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:t,previousPosition:r,atoms:i},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0)&&q0(this.mathfield,t,r,i)}deferNotifications(t,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||jd(this._selection,i)==="different";return this.silenceNotifications=a,t.content&&l&&K(this,{inputType:t.type}),t.selection&&c&&sa(this),l||c}normalizeOffset(t){return t>0?t=Math.min(t,this.lastOffset):t<0&&(t=this.lastOffset+t+1),t}normalizeRange(t){let[r,i]=t;return r=this.normalizeOffset(r),i=this.normalizeOffset(i),r<i?[r,i]:[i,r]}normalizeSelection(t,r){var o;let i;if(Mt(t)){let n=this.normalizeOffset(t);if(Mt(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(Rr(t)){let n=this.normalizeOffset(t[0]),a=this.normalizeOffset(t[1]);i=n<=a?{ranges:[[n,a]],direction:"none"}:{ranges:[[a,n]],direction:"backward"}}else Ri(t)&&(i={ranges:t.ranges.map(n=>this.normalizeRange(n)),direction:(o=t.direction)!=null?o:"none"});return i}get parentEnvironment(){let t=this.at(this.position).parent;if(t){for(;t.parent&&t.type!=="array";)t=t.parent;if(t.type==="array")return t}}};function H0(e,t,r,i){let o=e.offsetOf(t);if(o<r||o>i)return!1;if(!t.hasChildren)return!0;let n=e.offsetOf(t.firstChild);if(n>=r&&n<=i){let a=e.offsetOf(t.lastChild);if(a>=r&&a<=i)return!0}return!1}function sl(e,t,r){if(!(t!=null&&t.hasChildren))return!1;let[i,o]=r,n=e.offsetOf(t.firstChild),a=e.offsetOf(t.lastChild);return n>=i&&n<=o&&a>=n&&a<=o}ja(["math","displaymath"],De);ja("center",De);st("array","{columns:colspec}",(e,t,r,i)=>new z(e,ll(t),r,{columns:i[0],mathstyleName:"textstyle"}));st(["equation","equation*","subequations"],"",(e,t,r)=>new z(e,ll(t),r,{columns:[{align:"c"}]}));st(["multline","multline*"],"",De);st(["align","align*","aligned","eqnarray"],"",De);st("split","",De);st(["gather","gathered"],"",De);st(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",De);st(["smallmatrix","smallmatrix*"],"[columns:colspec]",De);st(["cases","dcases","rcases"],"",De);function Ph(e){for(let t of e)for(let r of t)if(r.length>0)return!1;return!0}function ll(e,t=1){return Ph(e)?Array(t).fill([[new y({type:"first"}),new be]]):e.map(r=>r.length===0?[[new y({type:"first"})]]:r.map(i=>i.length===0?[new y({type:"first"})]:(i[0].type!=="first"&&i.unshift(new y({type:"first"})),i)))}function De(e,t=[[[]]],r=[],i=[]){switch(t=ll(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new z(e,t,r,{mathstyleName:"textstyle"});case"displaymath":return new z(e,t,r,{mathstyleName:"textstyle"});case"center":return new z(e,t,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new z(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new z(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new z(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Vr(i[0])});case"bmatrix":case"bmatrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Vr(i[0])});case"Bmatrix":case"Bmatrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Vr(i[0])});case"vmatrix":case"vmatrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Vr(i[0])});case"Vmatrix":case"Vmatrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Vr(i[0])});case"matrix":case"matrix*":return new z(e,t,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Vr(i==null?void 0:i[0])});case"smallmatrix":case"smallmatrix*":return new z(e,t,r,{mathstyleName:"scriptstyle",columns:Vr(i==null?void 0:i[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new z(e,t,r,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new z(e,t,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new z(e,t,r,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let o=0;for(let s of t)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 z(e,t,r,{arraycolsep:0,columns:n,minColumns:2})}}return new z(e,t,r,{mathstyleName:"textstyle"})}function Vr(e){return e!=null?e:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Bh(e,t){let r=e.at(e.position);for(;r&&!(r.parent instanceof z);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof z)){let i=e.at(e.position);if(r=i,!r.parent.parent){let o=e.extractAtoms([e.position,e.lastOffset]),n=e.extractAtoms([0,e.position]);n.length===0&&(n=ya()),o.length===0&&(o=ya());let a;return t.endsWith("column")?(a=De("split",[[n,o]]),e.root=a,$r(a,0,0)?qr(e,a,0,0):$r(a,0,1)?qr(e,a,0,1):e.position=e.offsetOf(i)):(a=De("lines",[[n],[o]]),e.root=a,$r(a,0,0)?qr(e,a,0,0):$r(a,1,0)?qr(e,a,1,0):e.position=e.offsetOf(i)),[void 0,[0,0]]}if(r.parent instanceof H){let o=r.parent,n=e.extractAtoms([e.position,e.offsetOf(o.lastChild)]),a=e.extractAtoms([e.offsetOf(o.firstChild),e.position]);a.length===0&&(a=ya()),n.length===0&&(n=ya());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=De(s,t.endsWith("column")?[[a,n]]:[[a],[n]]);return o.parent.addChildBefore(u,o),o.parent.removeChild(o),$r(u,0,0)?qr(e,u,0,0):t.endsWith("column")?$r(u,0,1)?qr(e,u,0,1):e.position=e.offsetOf(r):$r(u,1,0)?qr(e,u,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof z?[r.parent,r.parentBranch]:[void 0,[0,0]]}function $r(e,t,r){let i=e.getCell(t,r);return!i||i.length!==2?!1:i[1].type==="placeholder"}function Dh(e,t,r,i){let o=t.getCell(r,i);return o?[e.offsetOf(o[0]),e.offsetOf(o[o.length-1])]:-1}function qr(e,t,r,i){let o=Dh(e,t,r,i);typeof o!="number"&&e.setSelection(o)}function ga(e,t,r,i,o){let n=t.getCell(r,i);n&&e.setPositionHandlingPlaceholder(e.offsetOf(n[o==="start"?0:n.length-1]))}function ba(e,t){let[r,[i,o]]=Bh(e,t);if(r)switch(t){case"after row":r.addRowAfter(i),ga(e,r,i+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(o),ga(e,r,i,o+1,"end");break;case"before row":r.addRowBefore(i),ga(e,r,i,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(o),ga(e,r,i,o,"start");break}}function cl(e){return N(e,{inputType:"insertText"})?(ba(e,"after row"),K(e,{inputType:"insertText"}),!0):!1}function Kh(e){return N(e,{inputType:"insertText"})?(ba(e,"before row"),K(e,{inputType:"insertText"}),!0):!1}function ul(e){return N(e,{inputType:"insertText"})?(ba(e,"after column"),K(e,{inputType:"insertText"}),!0):!1}function Oh(e){return N(e,{inputType:"insertText"})?(ba(e,"before column"),K(e,{inputType:"insertText"}),!0):!1}function zh(e,t){if(!N(e,{}))return!1;e.mathfield.snapshot();let r=".",i=".";switch(t){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=e.parentEnvironment;return o.environmentName=t,o.leftDelim=r,o.rightDelim=i,K(e,{}),!0}function j0(e,t){let r=e.at(e.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof z);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof z){let i=r.parent,o=r.parentBranch,n;switch(t){case"row":if(i.rowCount>1){i.removeRow(o[0]);let a=i.getCell(Math.max(0,o[0]-1),o[1]);n=e.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=e.offsetOf(a[a.length-1])}break}n&&e.setPositionHandlingPlaceholder(n)}}function Rh(e){return N(e,{inputType:"deleteContent"})?(j0(e,"row"),K(e,{inputType:"deleteContent"}),!0):!1}function Fh(e){return N(e,{inputType:"deleteContent"})?(j0(e,"column"),K(e,{inputType:"deleteContent"}),!0):!1}ne({addRowAfter:cl,addColumnAfter:ul,addRowBefore:Kh,addColumnBefore:Oh,removeRow:Rh,removeColumn:Fh,setEnvironment:zh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function ya(){return[new be]}function Fo(e,t,r,i){var n,a,s,l,c,u;let o=r.parent;if(o&&r instanceof H){let d=!i&&t==="forward"||i==="body"&&t==="backward",p=d?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return d?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),p--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),p--),e.position=p,!0}if(o&&r.type==="surd"){if(t==="forward"&&!i||t==="backward"&&i==="body"){let d=r.leftSibling;r.hasChildren&&o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),e.position=e.offsetOf(d)}else t==="forward"&&i==="body"?e.position=e.offsetOf(r):!i&&t==="backward"?r.hasChildren?e.position=e.offsetOf(r.lastChild):(e.position=Math.max(0,e.offsetOf(r)-1),o.removeChild(r)):i==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r.body[0]));return!0}if(o&&(r.type==="box"||r.type==="enclose")){let d=i&&t==="backward"||!i&&t==="forward"?r.leftSibling:r.lastChild;return o.addChildrenAfter(r.removeBranch("body"),r),o.removeChild(r),e.position=e.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:(e.position=e.offsetOf(t==="forward"?r.firstChild:r.lastChild),!0);let d=Pi.fractionNavigationOrder==="numerator-denominator"?"above":"below",p=d==="above"?"below":"above";if(o&&(t==="forward"&&i===d||t==="backward"&&i===p)){let h=r.removeBranch(d),f=r.removeBranch(p);return o.addChildrenAfter([...h,...f],r),o.removeChild(r),e.position=e.offsetOf(h.length>0?h[h.length-1]:f[0]),!0}return t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r),!0}if(r.isExtensibleSymbol||r.type==="subsup"){if(!i&&t==="forward")return!1;if(!i){if(r.subscript||r.superscript){let d=t==="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&&(e.position=e.offsetOf(d)),!0}return!1}if(i&&r.hasEmptyBranch(i)&&r.removeBranch(i),!r.hasChildren){let d=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=d,!0}if(i==="superscript")if(t==="backward"){let d=e.offsetOf(r.firstChild)-1;d>=0,e.position=d}else r.subscript?e.position=e.offsetOf(r.subscript[0]):e.position=e.offsetOf(r);else i==="subscript"&&(t==="backward"&&r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r));return!0}if((o==null?void 0:o.type)==="genfrac"&&!i&&r.type!=="first"){let d=e.offsetOf(r.leftSibling);return o.removeChild(r),o.hasEmptyBranch("above")&&o.hasEmptyBranch("below")?(d=e.offsetOf(o.leftSibling),o.parent.removeChild(o),e.announce("delete",void 0,[o]),e.position=d,!0):(e.announce("delete",void 0,[r]),e.position=d,!0)}if(t==="backward"&&(o==null?void 0:o.subsupPlacement)==="adjacent"&&r.parentBranch!=="body"&&r.siblings.length===2){let d=e.offsetOf(o.leftSibling);return o.parent.removeChild(o),e.announce("delete",void 0,[o]),e.position=d,!0}return!1}function W0(e){return!e.mathfield.isSelectionEditable||!N(e,{inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&Fo(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(Fo(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])}}):qe(e,X(e.selection),"deleteContentBackward")}function U0(e){return!e.mathfield.isSelectionEditable||!N(e,{inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var i,o;let t=e.at(e.position).rightSibling;if(t&&Fo(e,"forward",t))return;if(t){if(e.at(e.position).isLastSibling&&Fo(e,"forward",t.parent,t.parentBranch))return}else{if(t=e.at(e.position),t.isLastSibling&&Fo(e,"forward",t.parent,t.parentBranch))return;t=void 0}if(e.position===e.lastOffset||!t){e.announce("plonk");return}t.parent.removeChild(t);let r=(i=e.at(e.position))==null?void 0:i.rightSibling;for(;(r==null?void 0:r.type)==="subsup";)r.parent.removeChild(r),r=(o=e.at(e.position))==null?void 0:o.rightSibling;e.announce("delete",void 0,[t])}):qe(e,X(e.selection),"deleteContentForward")}function qe(e,t,r){let i=e.getAtoms(t);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"&&(t=[e.offsetOf(l.leftSibling),e.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=e.offsetOf(l.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var p,h;let d=l.removeBranch(c);if(d.length===1&&d[0].type==="placeholder")(h=l.parent)==null||h.removeChild(l),e.position=Math.max(0,u);else{let f=l.parent.addChildrenAfter(d,l);(p=l.parent)==null||p.removeChild(l),e.position=e.offsetOf(f)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>e.deleteAtoms(t))}function J0(e,t){let r=e.at(e.position);if(r.type==="composition")r.value=t;else{let{caret:i}=r;r.caret=void 0;let o=new vi(t,{mode:r.mode});o.caret=i,r.parent.addChildAfter(o,r),e.position+=1}}function G0(e){let t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}function xa(e,t){let r=e.at(t),i;if(r){i=r.mode;let o=r.parent;for(;!i&&o;)o&&(i=o.mode),o=o.parent}return i}function St(e,t){!e||!t||(Q(e)?e.forEach(r=>St(r,t)):typeof e=="object"&&!e.style.color&&!e.style.backgroundColor&&!e.style.fontFamily&&!e.style.fontShape&&!e.style.fontSeries&&!e.style.fontSize&&!e.style.variant&&!e.style.variantStyle&&(e.applyStyle(t),St(e.body,t),St(e.above,t),St(e.below,t),St(e.subscript,t),St(e.superscript,t)))}function No(e,t,r,i){function o(a,s){for(let l of n)if(l.style[a]!==s)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;let n=e.getAtoms(t,{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=ci));for(let a of n)a.applyStyle(r);return!0}var Nh=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 Io(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:Nh.has(e.code)}function X0(e){e=w0(e);let t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function Z0(e,t,r){let i=null,o=null,n=!1,a=!1,s=!1,l=new AbortController,c=l.signal;return e.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(X0(u),u)?e.textContent="":i=null},{capture:!0,signal:c}),e.addEventListener("keypress",u=>{n||(i&&o&&r.onKeystroke(X0(i),i),o=u)},{capture:!0,signal:c}),e.addEventListener("compositionstart",u=>{e.textContent="",n=!0,r.onCompositionStart(u.data)},{capture:!0,signal:c}),e.addEventListener("compositionupdate",u=>{n&&r.onCompositionUpdate(u.data)},{capture:!0,signal:c}),e.addEventListener("compositionend",u=>{e.textContent="",n&&(n=!1,r.onCompositionEnd(u.data))},{capture:!0,signal:c}),e.addEventListener("beforeinput",u=>u.stopImmediatePropagation(),{signal:c}),e.addEventListener("input",u=>{var d;if(!n&&(e.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}),e.addEventListener("paste",u=>{e.focus({preventScroll:!0}),e.textContent="",r.onPaste(u)||u.preventDefault(),u.stopImmediatePropagation()},{signal:c}),e.addEventListener("cut",u=>r.onCut(u),{capture:!0,signal:c}),e.addEventListener("copy",u=>r.onCopy(u),{capture:!0,signal:c}),e.addEventListener("blur",u=>{var p,h,f;if(((h=(p=u.relatedTarget)==null?void 0:p._mathfield)==null?void 0:h.element)===t){e.focus({preventScroll:!0}),u.preventDefault(),u.stopPropagation();return}let d=(f=$e.scrim)==null?void 0:f.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}),e.addEventListener("focus",u=>{s||a||(a=!0,r.onFocus(),a=!1)},{capture:!0,signal:c}),{dispose:()=>l.abort(),cancelComposition:()=>{n&&(e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&e.blur()},focus:()=>{!a&&typeof e.focus=="function"&&e.focus({preventScroll:!0})},hasFocus:()=>Ih()===e,setAriaLabel:u=>e.setAttribute("aria-label",u),setValue:u=>{var d;e.textContent=u,e.style.left="-1000px",(d=window.getSelection())==null||d.selectAllChildren(e)},moveTo:(u,d)=>{e.style.top=`${d}px`,e.style.left=`${u}px`}}}function Ih(){var t;let e=document.activeElement;for(;(t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement;)e=e.shadowRoot.activeElement;return e}function pr(e){var r;if(!e||!Io(e))return"";let t;return e.key==="Unidentified"&&e.target&&(t=e.target.value),t=(r=t!=null?t:e.key)!=null?r:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(t)&&(t=""),t}var wa=class wa{constructor(t){this.recording=!1;this.model=t,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(t){t&&this.index>=0&&(this.stack[this.index].selection=t),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(t){return this.recording?(t&&t===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>wa.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t!=null?t:"",!0):!1}};wa.maximumDepth=1e3;var va=wa;function ml(e){let t=e.position,r=e.at(t).parent;return r!=null&&r.parent?(e.position=e.offsetOf(r),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function Vh(e){let t=0,r=e.at(e.position),i=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(i=!1):i=!0,r=r.parent;return i?t:0}function $h(e){let t=0,r=e.at(e.position),i=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(i=!0):i=!1,r=r.parent;return i?t:0}function Y0(e){var r;if(e.collapseSelection(),Vh(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let t=e.at(e.position);return t.subsupPlacement===void 0&&(((r=t.rightSibling)==null?void 0:r.type)!=="subsup"&&t.parent.addChildAfter(new Bt({style:t.computedStyle}),t),t=t.rightSibling),t.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.superscript[0]))),!0}function Q0(e){var r;if(e.collapseSelection(),$h(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let t=e.at(e.position);return t.subsupPlacement===void 0&&(((r=e.at(e.position+1))==null?void 0:r.type)!=="subsup"&&t.parent.addChildAfter(new Bt({style:e.at(e.position).computedStyle}),t),t=e.at(e.position+1)),t.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.subscript[0]))),!0}function qh(){function e(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(t).forEach((p,h)=>{let f=i(p);f===0?c.push(p):u.push({documentOrder:h,tabIndex:f,node:p})}),u.sort((p,h)=>p.tabIndex===h.tabIndex?p.documentOrder-h.documentOrder:p.tabIndex-h.tabIndex).map(p=>p.node).concat(c)}function t(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 p;if(!l.name)return!0;let u=((p=l.form)!=null?p:l.ownerDocument).querySelectorAll('input[type="radio"][name="'+l.name+'"]'),d=n(u,l.form);return!d||d===l}function s(l){if(!ue()||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 ue()?e(document.body):[]}function ke(e,t,r="forward"){let i=e.position;if(Array.isArray(t)){let o=e.offsetOf(t[0]),n=e.offsetOf(t[t.length-1]);return r==="forward"?e.setSelection(o,n):e.setSelection(n,o),e.announce("move",i),e.mathfield.stopCoalescingUndo(),!0}return r==="forward"?ke(e,[t.leftSibling,t]):ke(e,[t,t.leftSibling])}function ot(e,t){let r=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{let i=e.offsetOf(t);t.type==="placeholder"?e.setSelection(i-1,i):e.position=i}return e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}function ka(e,t,r=!0){var s,l;let i=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&He(e,t);let o,n=e.at(e.anchor).parentPrompt;n?t==="forward"?o=e.offsetOf(n)+1:o=e.offsetOf(n.leftSibling):o=Math.max(e.position+i,0);let a=dl(e,o,t);if(!a||t==="forward"&&e.offsetOf(a)<o||t==="backward"&&e.offsetOf(a)>o){if(!r||!((l=(s=e.mathfield.host)==null?void 0:s.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||l))return e.announce("plonk"),!1;let u=qh();if(!document.activeElement||u.length<=1)return e.announce("plonk"),!1;let d=u.indexOf(document.activeElement)+i;return d<0&&(d=u.length-1),d>=u.length&&(d=0),u[d].focus(),e.mathfield.stopCoalescingUndo(),!0}return ot(e,a),!0}function dl(e,t=0,r="forward"){return e.findAtom(i=>i.type==="placeholder"||i.type==="prompt"||!e.mathfield.readOnly&&i.treeDepth>2&&i.isFirstSibling&&i.isLastSibling,t,r)}ne({moveToOpposite:e=>{let t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=e.at(e.position),{parent:i}=r;if(!i)return e.announce("plonk"),!1;let o=r.parentBranch,n;if(typeof o=="string"&&(n=t[o]),!n){let s=r.subsupPlacement?Q0(e):Y0(e);return e.mathfield.stopCoalescingUndo(),s}i.branch(n)||i.createBranch(n);let a=e.setSelection(e.getBranchRange(e.offsetOf(i),n));return e.mathfield.stopCoalescingUndo(),a},moveBeforeParent:e=>{let{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>ml(e),moveToNextChar:e=>He(e,"forward"),moveToPreviousChar:e=>He(e,"backward"),moveUp:e=>He(e,"upward"),moveDown:e=>He(e,"downward"),moveToNextWord:e=>hr(e,"forward"),moveToPreviousWord:e=>hr(e,"backward"),moveToGroupStart:e=>{let t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{let t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var a,s,l,c;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return ka(e,"forward");let t=e.at(e.position);if(t.mode==="text"){if(e.selectionIsCollapsed){let u=t;for(;u&&u.mode==="text";)u=u.leftSibling;let d=t;for(;((a=d.rightSibling)==null?void 0:a.mode)==="text";)d=d.rightSibling;if(u&&d)return ke(e,[u,d])}if(t.rightSibling.mode==="text"){let u=t;for(;u&&u.mode==="text";)u=u.rightSibling;return u?(ot(e,(s=u.leftSibling)!=null?s:u),e.mathfield.switchMode("math"),!0):ot(e,e.lastOffset)}}let i=dl(e,e.position+1,"forward");if(i)return ot(e,i);let o=em(e,t,u=>u.type==="leftright"||u.type==="text","forward");if(o){if(o.mode==="text"){let u=o;for(;u&&u.mode==="text";)u=u.rightSibling;return ke(e,[(l=o.leftSibling)!=null?l:o,(c=u.leftSibling)!=null?c:u])}return ke(e,o)}let n=t.parent;if(n){if(n.type==="leftright"||n.type==="surd")return ke(e,n);if(t.parentBranch==="superscript"&&n.subscript)return ke(e,n.subscript);if(t.parentBranch==="above"&&n.below)return ke(e,n.below);if(t.parentBranch==="superscript"||t.parentBranch==="subscript")return ot(e,n);if(t.parentBranch==="above"||t.parentBranch==="below")return ke(e,n)}return ot(e,e.lastOffset)},moveToPreviousGroup:e=>{var o;if(e.position===0&&e.anchor===0)return ka(e,"backward");let t=e.at(e.position),r=t.mode;if(r==="text"){if(e.selectionIsCollapsed){let n=t;for(;n&&n.mode==="text";)n=n.leftSibling;let a=t;for(;((o=a.rightSibling)==null?void 0:o.mode)==="text";)a=a.rightSibling;if(n&&a)return ke(e,[n,a])}for(;t&&t.mode==="text";)t=t.leftSibling;return t?ot(e,t):ot(e,0)}let i=dl(e,e.position-1,"backward");if(i)return ot(e,i);if(r==="math"){let n=em(e,t,s=>s.type==="leftright"||s.type==="text","backward");if(n){if(n.mode==="text"){let s=n;for(;s&&s.mode==="text";)s=s.leftSibling;return ke(e,[n,s])}return ke(e,n)}let a=t.parent;if(a){if(a.type==="leftright"||a.type==="surd")return ke(e,a);if(t.parentBranch==="subscript"&&a.superscript)return ke(e,a.superscript);if(t.parentBranch==="below"&&a.above)return ke(e,a.above);if(t.parentBranch==="superscript"||t.parentBranch==="subscript")return ot(e,a);if(t.parentBranch==="above"||t.parentBranch==="below")return ke(e,a)}return ot(e,0)}return!1},moveToMathfieldStart:e=>e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:e=>Y0(e),moveToSubscript:e=>Q0(e)},{target:"model",changeSelection:!0});ne({moveToNextPlaceholder:e=>ka(e,"forward"),moveToPreviousPlaceholder:e=>ka(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function em(e,t,r,i){if(i==="forward"){let n=t.rightSibling;for(;n&&!r(n);)n=n.rightSibling;return n}let o=t.leftSibling;for(;o&&!r(o);)o=o.leftSibling;return o}function Ma(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let i=e.position,o=!1,n="";for(;!o;){let a=e.at(i);o=t===0||a===void 0||a.type==="first"||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,t-=1}K(e,{data:n,inputType:"insertText"})}function Hr(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let i=e.position,o=!1,n=[];for(;!o;){let a=e.at(i);o=t===0||!a||a.type==="first"||a.isFirstSibling||a.mode!=="text"||a.value===" "||typeof r=="function"&&!r(a),o||(n.push(y.serialize([a],{defaultMode:"math"})),a.mode="math"),i-=1,t-=1}Sa(e),K(e,{data:B(n),inputType:"insertText"})}function Sa(e){var r;let t=e.position-1;for(;t>=0&&((r=e.at(t))==null?void 0:r.mode)==="math";)t-=1;if(!(t<0)&&e.at(t).mode==="text"&&e.at(t).value===" "&&e.at(t-1).mode==="math"){e.at(t-1).parent.removeChild(e.at(t-1));let i=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=i,K(e,{inputType:"deleteContent"})}}function Hh(e){let t="",r=e.position,i=!1;for(;!i;){let o=e.at(r);i=!(o&&(o.mode==="text"||o.mode==="math"&&o.type&&/mord|mpunct/.test(o.type))),i||(t=o.value+t),r-=1}return t}function tm(e,t,r){let{model:i}=e;if(i.mode==="latex"||!i.at(i.position).isLastSibling||!r||!Io(r))return!1;let o=pr(r);if(!i.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(o));let n=Hh(i)+o;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(o))return!0;if(/[\^_]/.test(o))return/(^|\s)[a-zA-Z][^_]$/.test(n)&&Hr(i,1),!0;let a={")":"(","}":"{","]":"["}[o],{parent:s}=i.at(i.position);if(a&&s instanceof H&&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 Hr(i,1),!1;if(/\D\.[^\d\s]$/.test(n)){Hr(i,1);let l=i.at(i.position);return l.value="\u22C5",l.style.variant="normal",l.command="\\cdot",l.verbatimLatex=void 0,K(i,{data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(n)||/\.\d$/.test(n)||/\([\d+\-.]$/.test(n))return Hr(i,1),!0;if(/\([a-z][,;]$/.test(n))return Hr(i,2),!0;if(/[\d+\-=><*|]$/.test(o))return Sa(i),!0}else{if(t==="[Space]")return Ma(i,void 0,a=>/[a-z][:,;.]$/.test(a.value)),!0;if(/[a-zA-Z]{3,}$/.test(n)&&!/(dxd|abc|xyz|uvw)$/.test(n))return Ma(i,void 0,a=>/[a-zA-Z]/.test(a.value)),!0;if(/(^|\W)(if)$/i.test(n))return Ma(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 Ma(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}function rm(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;let r=om(),i=e.element.getBoundingClientRect();r.style.left=`${i.left}px`,r.style.top=`${i.top-64}px`,r.innerHTML=window.MathfieldElement.createHTML("<span>"+(js(t)||t)+"</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 im(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){let t=om();t.innerHTML=""}else{let t=Br("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function om(){let e=document.getElementById("mathlive-keystroke-caption-panel");return e||(Pe("keystroke-caption"),Pe("core"),Br("mathlive-keystroke-caption-panel"))}function nm(){document.getElementById("mathlive-keystroke-caption-panel")&&(Ei("mathlive-keystroke-caption-panel"),Ne("core"),Ne("keystroke-caption"))}function fl(e,t,r){var u,d,p,h;let{model:i}=e;if(r.isTrusted){k0(r);let f=cr();e.keyboardLayout!==f.id&&(e.keyboardLayout=f.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,rm(e,t),r.isTrusted&&r.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;if(i.mathfield.smartFence){if(hl(i,pr(r),e.style))return e.flushInlineShortcutBuffer(),e.dirty=!0,e.scrollIntoView(),r.preventDefault&&r.preventDefault(),!1}else{let{parent:f}=i.at(i.position);if(f instanceof H&&f.rightDelim==="?"&&i.at(i.position).isLastSibling&&/^[)}\]|]$/.test(t))return e.snapshot(),f.isDirty=!0,f.rightDelim=t,i.position+=1,sa(i),K(i,{data:pr(r),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),r.preventDefault&&r.preventDefault(),!1;if(!i.selectionIsCollapsed){let x=pr(r);if(x==="("||x==="{"||x==="["){let M={"(":"(","{":"\\lbrace","[":"\\lbrack"}[x],v={"(":")","{":"\\rbrace","[":"\\rbrack"}[x],[b,A]=X(i.selection);return e.snapshot(),i.position=A,q.insert(i,v,{format:"latex"}),i.position=b,q.insert(i,M,{format:"latex"}),i.setSelection(b+1,A+1),K(i,{data:x,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),r.preventDefault&&r.preventDefault(),!1}}}let o,n="",a,s=e.inlineShortcutBuffer;if(e.isSelectionEditable){if(i.mode==="math")if(t==="[Backspace]")s.pop(),e.flushInlineShortcutBuffer({defer:!0});else if(!Io(r))e.flushInlineShortcutBuffer();else{let f=pr(r),x=[...(d=(u=s[s.length-1])==null?void 0:u.keystrokes)!=null?d:[],f];s.push({state:i.getState(),keystrokes:x,leftSiblings:jh(e)});let M=0,v="";for(;!o&&M<x.length;)a=s.length-(x.length-M),v=x.slice(M).join(""),o=bo(s[a].leftSiblings,v,e.options.inlineShortcuts),!o&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(v)&&(o=e.options.onInlineShortcut(e,v)),M+=1;e.flushInlineShortcutBuffer({defer:!0})}if(e.options.smartMode){let f=i.mode;o?i.mode="math":tm(e,t,r)&&(i.mode={math:"text",text:"math"}[i.mode],n=""),i.mode!==f&&((p=e.host)!=null&&p.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))||(i.mode=f))}}if(!o){if(n||(n=_0(e.keybindings,i.mode,t)),!n&&(t==="[Enter]"||t==="[Return]")){let f=!1;return N(i,{inputType:"insertLineBreak"})&&(e.host&&(f=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),f||r.preventDefault&&(r.preventDefault(),r.stopPropagation()),K(i,{inputType:"insertLineBreak"})),f}if((!n||t==="[Space]")&&i.mode==="math"){if(t==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return q.insert(i,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),n="",e.dirty=!0,e.scrollIntoView(),r.preventDefault&&(r.preventDefault(),r.stopPropagation()),!1;let f=i.at(i.position+1),x=i.at(i.position-1);if((f==null?void 0:f.mode)==="text"||(x==null?void 0:x.mode)==="text")return q.insert(i," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(h=i.at(i.position))!=null&&h.isDigit()&&window.MathfieldElement.decimalSeparator===","&&pr(r)===","&&(n="insertDecimalSeparator")}}if(!o&&!n)return!0;let l=i.at(Math.max(i.position,i.anchor)),{parent:c}=l;if(n==="moveAfterParent"&&(c==null?void 0:c.type)==="leftright"&&l.isLastSibling&&e.options.smartFence&&hl(i,".",e.style)&&(n="",U(e)),e.keyboardDelegate.cancelComposition(),n)e.executeCommand(n);else if(o){let f=m(m({},i.at(i.position).computedStyle),e.style);i.setState(s[a].state);let x=s[s.length-1].keystrokes;for(let M of x)q.insert(i,M,{silenceNotifications:!0,style:f});e.snapshot("insert-shortcut"),i.setState(s[a].state),i.deferNotifications({content:!0,selection:!0,data:o,type:"insertText"},()=>(q.insert(i,o,{format:"latex",style:f}),Sa(e.model),o.endsWith(" ")&&(i.mode="text",q.insert(i," ",{style:f,mode:"text"})),e.snapshot(),i.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,i.announce("replacement")}return e.scrollIntoView(),r.preventDefault&&r.preventDefault(),!1}function Vo(e,t,r){let{model:i}=e;if(!e.isSelectionEditable){i.announce("plonk");return}r!=null||(r={}),r.focus&&e.focus(),r.feedback&&window.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(e.switchMode(r.mode),e.snapshot());let o=Hn(t),n=window.mathVirtualKeyboard;if(n!=null&&n.isShifted&&(o=typeof o=="string"?o.toUpperCase():o.map(l=>l.toUpperCase())),r.simulateKeystroke){let l=!0;for(let c of o)fl(e,c,new KeyboardEvent("keypress",{key:c}))&&(l=!1);if(l)return}let a=i.at(i.position),s=m(m({},a.computedStyle),e.style);if(i.selectionIsCollapsed||(i.deleteAtoms(X(i.selection)),e.snapshot("delete")),i.mode==="latex")i.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{Ao(e);for(let l of o)q.insert(i,l);e.snapshot("insert-latex"),ur(e)});else if(i.mode==="text"){for(let l of o)q.insert(i,l,{style:s});e.snapshot("insert-text")}else if(i.mode==="math")for(let l of o)Wh(e,l,s,a);e.dirty=!0,e.scrollIntoView()}function jh(e){let t=e.model,r=[],i=t.at(Math.min(t.position,t.anchor));for(;i.type!=="first";)r.push(i),i=i.leftSibling;return r}function Wh(e,t,r,i){var a;let o=e.model,n={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(t===" "&&e.options.mathModeSpace&&(n=["insert",e.options.mathModeSpace]),n){e.executeCommand(n);return}if(/\d/.test(t)&&e.options.smartSuperscript&&i.parentBranch==="superscript"&&((a=i.parent)==null?void 0:a.type)!=="mop"&&i.hasNoSiblings){Uh(o),q.insert(o,t,{style:r}),e.snapshot(),ml(o),e.snapshot();return}if(e.adoptStyle!=="none"){let s=e.adoptStyle==="left"?i:i.parent?i.rightSibling:null;(s==null?void 0:s.type)==="mord"&&/[a-zA-Z0-9]/.test(s.value)&&/[a-zA-Z0-9]/.test(t)&&(r=m({},r),s.style.variant&&(r.variant=s.style.variant),s.style.variantStyle&&(r.variantStyle=s.style.variantStyle))}q.insert(o,t,{style:r}),e.snapshot(`insert-${o.at(o.position).type}`)}function Uh(e){e.selectionIsCollapsed||(e.deleteAtoms(X(e.selection)),e.mathfield.snapshot("delete"))}function hl(e,t,r){if(!t||e.mode!=="math")return!1;let i=e.at(e.position),{parent:o}=i,n={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!n)return!1;let a=bi[n],s=yi[n];if(!e.selectionIsCollapsed){e.mathfield.snapshot();let[l,c]=X(e.selection),u=e.extractAtoms([l,c]),d=o.addChildrenAfter([new H("left...right",u,{leftDelim:n,rightDelim:s})],e.at(l));return e.setSelection(e.offsetOf(d.firstChild),e.offsetOf(d.lastChild)),e.mathfield.snapshot("insert-fence"),K(e,{data:n,inputType:"insertText"}),!0}if(n==="|"){let l=o instanceof H?o.leftDelim+o.rightDelim:"";if(l==="\\lbrace\\rbrace"||l==="\\{\\}"||l==="\\lbrace?")return e.mathfield.snapshot(),q.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:r}),e.mathfield.snapshot("insert-fence"),K(e,{data:n,inputType:"insertText"}),!0}if(s){if(o instanceof H&&o.firstChild===i&&(o.leftDelim==="?"||o.leftDelim==="."))return o.leftDelim=n,o.isDirty=!0,e.mathfield.snapshot(),K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(o instanceof H)){let d=i;for(;d&&!(d.type==="mclose"&&d.value===s);)d=d.rightSibling;if(d){e.mathfield.snapshot();let p=e.extractAtoms([e.offsetOf(i),e.offsetOf(d)]);return p.pop(),o.addChildrenAfter([new H("left...right",p,{leftDelim:n,rightDelim:s})],i),e.position=e.offsetOf(o.firstChild)+1,K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}let l=e.offsetOf(i.lastSibling),c;for(c=e.position;c<=l;c++){let d=e.at(c);if(d instanceof H&&(d.leftDelim==="?"||d.leftDelim===".")&&am(n,d.rightDelim))break}let u=e.at(c);if(c<=l&&u instanceof H){u.leftDelim=n,e.mathfield.snapshot();let d=e.extractAtoms([e.position,c-1]);return d=d.filter(p=>p.type!=="first"),u.addChildren(d,u.parentBranch),e.position+=1,K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(o instanceof H&&(o.leftDelim==="?"||o.leftDelim===".")&&am(n,o.rightDelim)){o.isDirty=!0,o.leftDelim=n,e.mathfield.snapshot();let d=e.extractAtoms([e.offsetOf(i.firstSibling),e.position]);for(let p of d)o.parent.addChildBefore(p,o);return K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(o instanceof H&&o.leftDelim==="|")){if(e.mathfield.snapshot(),q.insert(e,`\\left${n}\\right?`,{format:"latex",style:r}),i.lastSibling.type!=="first"){let d=e.offsetOf(i.lastSibling),p=e.extractAtoms([e.position,d]);e.at(e.position).body=p,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(a){let l=i;for(;l;){if(l.type==="mopen"&&l.value===a){e.mathfield.snapshot();let h=l.leftSibling,f=e.extractAtoms([e.offsetOf(l.leftSibling),e.offsetOf(i)]);f.shift();let x=new H("left...right",f,{leftDelim:a,rightDelim:n});return o.addChildrenAfter([x],h),e.position=e.offsetOf(x),K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}l=l.leftSibling}if(o instanceof H&&i.isLastSibling&&pl(o.leftDelim,n))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=n,e.position+=1,K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let c=e.offsetOf(i.firstSibling),u;for(u=e.position;u>=c;u--){let h=e.at(u);if(h instanceof H&&(h.rightDelim==="?"||h.rightDelim===".")&&pl(h.leftDelim,n))break}let d=e.at(u);if(u>=c&&d instanceof H)return e.mathfield.snapshot(),d.rightDelim=n,d.addChildren(e.extractAtoms([u,e.position]),d.parentBranch),K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(o instanceof H&&(o.rightDelim==="?"||o.rightDelim===".")&&pl(o.leftDelim,n))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=n,o.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(i.lastSibling)]),o.parentBranch),e.position=e.offsetOf(o),K(e,{data:n,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let p=o.parent;return p instanceof H&&(p.rightDelim==="?"||p.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(p),hl(e,n,r)):!1}return!1}function pl(e,t){return e?["(","{","[","\\lbrace","\\lparen","\\{","\\lbrack"].includes(e)?[")","}","]","\\rbrace","\\rparen","\\}","\\rbrack"].includes(t):yi[e]===t:!0}function am(e,t){return t?[")","}","]","\\rbrace","\\rparen","\\}","\\rbrack"].includes(t)?["(","{","[","\\lbrace","\\lparen","\\{","\\lbrack"].includes(e):bi[t]===e:!0}var sm={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};w(Object.keys(sm),"{body:auto}",{createAtom:e=>new lr(g(m({},e),{body:L(e.args[0]),accentChar:sm[e.command.slice(1)]}))});w(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{let t=Ha(L(e.args[0]));return new lr(g(m({},e),{body:L(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}});w(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new lr(g(m({},e),{body:L(e.args[0]),svgAccent:"overarc"}))});w(["underarc","underparen"],"{body:auto}",{createAtom:e=>new he(g(m({},e),{body:L(e.args[0]),svgBelow:"underarc"}))});w("utilde","{body:auto}",{createAtom:e=>{let t=L(e.args[0]),r=Ha(t),i="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new he(g(m({},e),{body:t,svgBelow:i,boxType:Sr(t)}))}});w("^","{:string}",{createAtom:e=>{var t;return new y(g(m({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}});w("`","{:string}",{createAtom:e=>{var t;return new y(g(m({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}});w("'","{:string}",{createAtom:e=>{var t;return new y(g(m({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"^"}))}});w("~","{:string}",{createAtom:e=>{var t;return new y(g(m({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}});w("c","{:string}",{createAtom:e=>{var t;return new y(g(m({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}});w("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var o,n;let t=e.args,r={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",svgStrokeStyle:void 0,borderStyle:void 0,style:(o=e.style)!=null?o:{}};if(t[1]){let a=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let s of a){let l=s.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(l)r.strokeWidth=l[1],r.strokeStyle=l[2],r.strokeColor=l[3];else{let c=s.match(/\s*([a-z]*)\s*=\s*"(.*)"/);c&&(c[1]==="mathbackground"?r.backgroundcolor=c[2]:c[1]==="mathcolor"?r.strokeColor=c[2]:c[1]==="padding"?r.padding=c[2]:c[1]==="shadow"&&(r.shadow=c[2]))}}r.strokeStyle==="dashed"?r.svgStrokeStyle="5,5":r.strokeStyle==="dotted"&&(r.svgStrokeStyle="1,5")}r.borderStyle=`${r.strokeWidth} ${r.strokeStyle} ${r.strokeColor}`;let i={};return((n=t[0])!=null?n:"").split(/[, ]/).filter(a=>a.length>0).forEach(a=>{i[a.toLowerCase()]=!0}),new Dt(e.command,L(t[2]),i,r)}});w("cancel","{body:auto}",{createAtom:e=>{var t;return new Dt(e.command,L(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:(t=e.style)!=null?t:{}})}});w("bcancel","{body:auto}",{createAtom:e=>{var t;return new Dt(e.command,L(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:(t=e.style)!=null?t:{}})}});w("xcancel","{body:auto}",{createAtom:e=>{var t;return new Dt(e.command,L(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:(t=e.style)!=null?t:{}})}});w(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new he(g(m({},e),{body:L((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}});w("overbrace","{:auto}",{createAtom:e=>new he(g(m({},e),{body:L(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))});w(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new he(g(m({},e),{body:L(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))});w(["underbrace"],"{:auto}",{createAtom:e=>new he(g(m({},e),{body:L(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))});w(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,r,i,o,n;return new he(g(m({},e),{svgBody:e.command.slice(1),above:((r=L((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:L((i=e.args)==null?void 0:i[1]),below:(n=L((o=e.args)==null?void 0:o[0]))!=null?n:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`});w(["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:e=>new Be(e.command.slice(1),g(m({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))});w(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new Be({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],g(m({},e),{limits:"over-under",variant:"main"}))});w(["lim","mod"],"",{ifMode:"math",createAtom:e=>new Be(e.command.slice(1),g(m({},e),{limits:"over-under",variant:"main"}))});w(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new Be(e.command.slice(1),g(m({},e),{limits:"over-under",isFunction:!0,variant:"main"}))});w(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{let r=e.createBox(t),i=r.caret;r.caret=void 0;let o=new k("\xB0",{style:g(m({},e.style),{variant:"normal",variantStyle:"up"})});return new k([r,o],{type:"inner",isSelected:e.isSelected,caret:i})}});w("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new Li(g(m({},e),{body:L(e.args[1]),index:e.args[0]?L(e.args[0]):void 0}))});w(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{let t=m({},e),r=e.command,i=e.args;switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(r){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new bt(i[0]?L(i[0]):[new be],i[1]?L(i[1]):[new be],t)},serialize:(e,t)=>{let r=e.aboveToLatex(t),i=e.belowToLatex(t);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(i)?`${e.command}${r}${i}`:O(e.command,r,i)}});w(["brace","brack"],"",{infix:!0,createAtom:e=>new bt(L(e.args[0]),L(e.args[1]),g(m({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>B([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});w(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,r,i=e.args;return e.command==="\\choose"&&(t="(",r=")"),new bt(L(i[0]),L(i[1]),g(m({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>B([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});w(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var r,i;let t=e.args;return new bt(L(t[0]),L(t[1]),g(m({},e),{leftDelim:(r=t[2])!=null?r:".",rightDelim:(i=t[3])!=null?i:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`});w("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new bt(L(e.args[0]),L(e.args[1]),g(m({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))});w(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new Be({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"}[e.command.slice(1)],g(m({},e),{isExtensibleSymbol:!0,limits:"auto",variant:"main"}))});w("smallint","",{ifMode:"math",createAtom:e=>new Be("\u222B",g(m({},e),{limits:"adjacent",isExtensibleSymbol:!1,variant:"main"}))});var lm={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"};w(Object.keys(lm),"",{ifMode:"math",createAtom:e=>{let t=e.command,r=lm[t.slice(1)];return new Be(r,g(m({},e),{limits:"adjacent",isExtensibleSymbol:!0,variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}});w(["Re","Im"],"",{ifMode:"math",createAtom:e=>new Be({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],g(m({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))});w("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new _i(g(m({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}});w("the","{:value}",{createAtom:e=>new y(g(m({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var n;let r=new P({parent:t},e.style),i="";e.isSelected&&(i+=" ML__selected");let o=r.evaluate(e.args[0]);return new k(((n=le(o))!=null?n:"").split("").map(a=>new k(a,{type:"ord",classes:i,mode:e.mode,isSelected:e.isSelected,style:m({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:i}).wrap(r)},serialize:e=>{var t;return`\\the${(t=le(e.args[0]))!=null?t:"\\relax"}`}});w("mathtip","{:auto}{:math}",{createAtom:e=>new Er(g(m({},e),{body:L(e.args[0]),tooltip:L(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${y.serialize([e.tooltip],g(m({},t),{defaultMode:"math"}))}}`});w("texttip","{:auto}{:text}",{createAtom:e=>new Er(g(m({},e),{body:L(e.args[0]),tooltip:L(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${y.serialize([e.tooltip],g(m({},t),{defaultMode:"text"}))}}`});w("error","{:math}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})});w("ensuremath","{:math}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(g(m({},t),{defaultMode:"math"}))}}`});w("color","{:value}",{applyStyle:(e,t,r)=>{var i,o;return{verbatimColor:(i=le(t[0]))!=null?i:void 0,color:r.toColor((o=t[0])!=null?o:{string:"red"})}}});w("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,r)=>{var i,o;return{verbatimColor:(i=le(t[0]))!=null?i:void 0,color:r.toColor((o=t[0])!=null?o:{string:"red"})}}});w("boxed","{content:math}",{createAtom:e=>new Ie(g(m({},e),{body:L(e.args[0]),framecolor:{string:"black"}}))});w("colorbox","{:value}{:text*}",{applyStyle:(e,t,r)=>{var i,o;return{verbatimBackgroundColor:(i=le(t[0]))!=null?i:void 0,backgroundColor:r.toBackgroundColor((o=t[0])!=null?o:{string:"yellow"})}}});w("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,r;return new Ie(g(m({},e),{body:L(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(r=e.args[1])!=null?r:{string:"yellow"}}))},serialize:(e,t)=>{var r,i;return t.skipStyles?e.bodyToLatex(g(m({},t),{defaultMode:"text"})):O(e.command,(r=le(e.framecolor))!=null?r:"",(i=le(e.backgroundcolor))!=null?i:"",e.bodyToLatex(g(m({},t),{defaultMode:"text"})))}});w("bbox","[:bbox]{body:auto}",{createAtom:e=>{var i;let t=e.args[0],r=L(e.args[1]);return t?new Ie(g(m({},e),{body:r,padding:t.padding,border:t.border,backgroundcolor:(i=t.backgroundcolor)!=null?i:void 0})):new Ie(g(m({},e),{body:r}))},serialize:(e,t)=>{var i,o;if(t.skipStyles)return e.bodyToLatex(t);let r=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){let n=[];e.padding&&n.push((i=le(e.padding))!=null?i:""),e.border&&n.push(`border: ${e.border}`),e.backgroundcolor&&n.push((o=le(e.backgroundcolor))!=null?o:""),r+=`[${n.join(",")}]`}return O(r,e.bodyToLatex(t))}});w(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),render:(e,t)=>{let r=new P({parent:t,mathstyle:e.command.slice(1)},e.style),i=y.createBox(r,e.body,{type:"lift"});return e.caret&&(i.caret=e.caret),e.bind(t,i)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${B([e.command,e.bodyToLatex(t)])}}`});w(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:e=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})});w("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontSeries:(r=t[0])!=null?r:"auto"}}});w("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontShape:(r=t[0])!=null?r:"auto"}}});w("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontFamily:(r=t[0])!=null?r:"roman"}}});w("selectfont","",{ifMode:"text",applyStyle:()=>({})});w("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})});w(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__boldsymbol"})});w("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})});w("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})});w("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})});w("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})});w("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})});w("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})});w("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})});w("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})});w("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})});w("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})});w("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})});w("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})});w("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})});w("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})});w("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})});w("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})});w("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})});w("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})});w("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})});w("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})});w("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})});w("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})});w("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})});w("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})});w("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})});w("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})});w("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})});w(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})});w(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})});w("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})});w("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})});w("mbox","{:text}",{ifMode:"math",createAtom:e=>new y(g(m({},e),{type:"mord",body:L(e.args[0]),mode:"math"})),serialize:(e,t)=>O("\\mbox",e.bodyToLatex(g(m({},t),{defaultMode:"text"})))});w("text","{:text}",{ifMode:"math",applyMode:"text"});w(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var r;return e.createBox(t,{classes:(r=e.args[0])!=null?r:""})}});w(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.cssId=(i=e.args[0])!=null?i:"",r}});w("htmlData","{data:string}{content:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.htmlData=(i=e.args[0])!=null?i:"",r}});w(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.htmlStyle=(i=e.args[0])!=null?i:"",r}});w("em","{:rest}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});w("emph","{:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var cm={"\\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}};w(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new Ai(g(m({},e),{delim:(t=e.args[0])!=null?t:".",size:cm[e.command].size,delimType:cm[e.command].mclass}))}});w(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new vt(g(m({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});w(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new vt(g(m({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});w("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new y(e),render:(e,t)=>{let r=0,i=t.mathstyle.id;(i===fo||i===rr)&&(r=1),(i===_r||i===Te)&&(r=2),(i===ir||i===ye)&&(r=3);let o=L(e.args[r]);return y.createBox(t,o)},serialize:(e,t)=>`\\mathchoice{${y.serialize(e.args[0],t)}}{${y.serialize(e.args[1],t)}}{${y.serialize(e.args[2],t)}}{${y.serialize(e.args[3],t)}}`});w("mathop","{:auto}",{createAtom:e=>new y(g(m({},e),{type:"mop",body:L(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var i;let r=y.createBox(t,e.body);if(e.superscript||e.subscript){let o=(i=e.subsupPlacement)!=null?i:"auto";r=o==="over-under"||o==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r})}return new k(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{let r=[O(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),B(r)}});w(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new y(g(m({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:L(e.args[0]),captureSelection:!0}))});w(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{let t=L(e.args[0]).map(r=>{var i;return r.type!=="first"&&(r.type="mord",r.value=(i={"\u2217":"*","\u2212":"-"}[r.value])!=null?i:r.value,r.isFunction=!1,!r.style.variant&&!r.style.variantStyle&&(r.style.variant="main",r.style.variantStyle="up")),r});return new y(g(m({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var i;let r=y.createBox(t,e.body);if(e.superscript||e.subscript){let o=(i=e.subsupPlacement)!=null?i:"auto";r=o==="over-under"||o==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r})}return new k(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{let r=[O(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),B(r)}});w(["char","unicode"],"{charcode:value}",{createAtom:e=>new y(g(m({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${le((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let r=t.evaluate(e.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(r.number),e.createBox(t)}});w("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new y(e),render:(e,t)=>{var s,l,c;let r=new P({parent:t,mathstyle:"textstyle"},e.style),i=r.toEm((s=e.args[0])!=null?s:{dimension:0}),o=r.toEm((l=e.args[1])!=null?l:{dimension:10}),n=r.toEm((c=e.args[2])!=null?c:{dimension:10}),a=new k(null,{classes:"rule",type:"ord",width:o,height:n+i,depth:-i});return a.setStyle("border-right-width",o,"em"),a.setStyle("border-top-width",n,"em"),a.setStyle("border-color",e.style.color),a.setStyle("vertical-align",i,"em"),e.isSelected&&a.setStyle("opacity","50%"),e.bind(r,a),e.caret&&(a.caret=e.caret),a.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${le(e.args[0])}]`:""}{${le(e.args[1])}}{${le(e.args[2])}}`});w(["overline","underline"],"{:auto}",{createAtom:e=>new y(g(m({},e),{body:L(e.args[0])})),render:(e,t)=>{let r=e.command.substring(1),i=new P({parent:t,mathstyle:"cramp"},e.style),o=y.createBox(i,e.body);if(!o)return null;let n=i.metrics.defaultRuleThickness/i.scalingFactor,a=new k(null,{classes:r+"-line"});a.height=n,a.maxFontSize=n*1.125*i.scalingFactor;let s;return r==="overline"?s=new W({shift:0,children:[{box:o},3*n,{box:a},n]}):s=new W({top:o.height,children:[n,{box:a},3*n,{box:o}]}),e.caret&&(s.caret=e.caret),new k(s,{classes:r,type:"ignore"})}});w("overset","{:auto}{base:auto}",{createAtom:e=>{let t=L(e.args[1]);return new he(g(m({},e),{above:L(e.args[0]),body:t,skipBoundary:!1,boxType:Sr(t)}))},serialize:(e,t)=>O(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});w("underset","{:auto}{base:auto}",{createAtom:e=>{let t=L(e.args[1]);return new he(g(m({},e),{below:L(e.args[0]),body:t,skipBoundary:!1,boxType:Sr(t)}))},serialize:(e,t)=>O(e.command,e.belowToLatex(t),e.bodyToLatex(t))});w("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{let t=L(e.args[2]);return new he(g(m({},e),{above:L(e.args[0]),below:L(e.args[1]),body:t,skipBoundary:!1,boxType:Sr(t)}))},serialize:(e,t)=>O(e.command,e.belowToLatex(t),e.bodyToLatex(t))});w(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new he(g(m({},e),{body:L(e.args[2]),above:L(e.args[1]),below:L(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>O(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});w("smash","[:string]{:auto}",{createAtom:e=>{var t,r,i,o;return new Kt(g(m({},e),{body:L(e.args[1]),smashHeight:(r=(t=e.args[0])==null?void 0:t.includes("t"))!=null?r:!0,smashDepth:(o=(i=e.args[0])==null?void 0:i.includes("b"))!=null?o:!0}))}});w(["vphantom"],"{:auto}",{createAtom:e=>new Kt(g(m({},e),{body:L(e.args[0]),isInvisible:!0,smashWidth:!0}))});w(["hphantom"],"{:auto}",{createAtom:e=>new Kt(g(m({},e),{body:L(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))});w(["phantom"],"{:auto}",{createAtom:e=>new Kt(g(m({},e),{body:L(e.args[0]),isInvisible:!0}))});w("not","{:math}",{createAtom:e=>{let t=L(e.args[0]);return t.length===0?new y(g(m({},e),{type:"mrel",value:"\uE020"})):new y(g(m({},e),{body:[new Qe(g(m({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{let r=e.args[0],i=r&&typeof r=="object"&&"group"in r;return e.value!=="\uE020"?i?`\\not{${y.serialize(r.group,t)}}`:`\\not${y.serialize(r,t)}`:i?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);let i=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":Sr(L(e.args[0])),o=y.createBox(t,e.body,{type:i});return e.caret&&(o.caret=e.caret),e.bind(t,o)}});w(["ne","neq"],"",{createAtom:e=>new y(g(m({},e),{type:"mrel",body:[new Qe(g(m({},e),{body:"\uE020",align:"right",boxType:"rel"})),new y(g(m({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command});w("rlap","{:auto}",{createAtom:e=>new Qe(g(m({},e),{body:L(e.args[0]),align:"right"}))});w("llap","{:auto}",{createAtom:e=>new Qe(g(m({},e),{body:L(e.args[0]),align:"left"}))});w("mathrlap","{:math}",{createAtom:e=>new Qe(g(m({},e),{body:L(e.args[0]),align:"left"}))});w("mathllap","{:math}",{createAtom:e=>new Qe(g(m({},e),{body:L(e.args[0]),align:"left"}))});w("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new Ie(g(m({},e),{body:L(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return O("\\raisebox",(r=le(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}});w("raise","{:value}{:auto}",{createAtom:e=>{var t;return new Ie(g(m({},e),{body:L(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return O("\\raise",(r=le(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}});w("lower","{:value}{:auto}",{createAtom:e=>{var t;return new Ie(g(m({},e),{body:L(e.args[1]),padding:{dimension:0},offset:(t=Ze(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,i;return O("\\lower",(i=le(Ze((r=e.offset)!=null?r:{dimension:0},-1)))!=null?i:"0pt",e.bodyToLatex(t))}});de("0123456789/@.?!");qa(65,90);qa(97,122);de([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]);de([["\\sharp",9839],["\\flat",9837],["\\natural",9838],["\\#",35],["\\&",38],["\\clubsuit",9827],["\\heartsuit",9825],["\\spadesuit",9824],["\\diamondsuit",9826],["\\parallelogram",9649]]);de([["\\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]]);de([["\\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");de([["\\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"]]);de([["\\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");de([["+",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");de([["\\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");de([["\\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]]);de([["=",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");de([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams");de([["\\wp",8472],["\\aleph",8501]]);de([["\\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");de([["\\ ",160],["~",160]],"space");w(["!",",",":",";","enskip","enspace","quad","qquad"],"",{createAtom:e=>new vt(e)});w("space","",{createAtom:e=>new vt(e)});de([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct");de([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner");de([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);ne({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{let t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:im,plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,r,i)=>(e.switchMode(t,r,i),!0),insert:(e,t,r)=>e.insert(t,r),typedText:(e,t,r)=>(Vo(e,t,r),!0),insertDecimalSeparator:e=>{let t=e.model;return t.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t;return N(e.model,{inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),K(e.model,{inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,r)=>{let i=e.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 e.insert(`\\placeholder[${t!=null?t:o}]{}`,r),!0}});ne({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"});ne({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&N(e.model,{inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(ur(e),e.startRecording(),e.snapshot("paste"),K(e.model,{inputType:"insertFromPaste"}),U(e))):e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jh(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();let r=gl(e,t),{model:i}=e;return i.selectionIsCollapsed?(e.style.fontSeries&&r.fontSeries===e.style.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===e.style.fontShape&&(r.fontShape="auto"),r.color&&r.color===e.style.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===e.style.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===e.style.fontSize&&(r.fontSize="auto"),e.style=m(m({},e.style),r)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{i.selection.ranges.forEach(o=>No(i,o,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}ne({applyStyle:Jh},{target:"mathfield",canUndo:!0,changeContent:!0});function gl(e,t){var o,n,a,s,l,c;let r={};typeof t.color=="string"&&(r.verbatimColor=t.color,r.color=(o=e.colorMap(t.color))!=null?o:"none"),typeof t.backgroundColor=="string"&&(r.verbatimBackgroundColor=t.backgroundColor,r.backgroundColor=(n=e.backgroundColorMap(t.backgroundColor))!=null?n:"none"),typeof t.fontFamily=="string"&&(r.fontFamily=t.fontFamily),typeof t.series=="string"&&(r.fontSeries=t.series),typeof t.fontSeries=="string"&&(r.fontSeries=t.fontSeries.toLowerCase()),r.fontSeries&&(r.fontSeries=(a={bold:"b",medium:"m",normal:"m"}[r.fontSeries])!=null?a:r.fontSeries),typeof t.shape=="string"&&(r.fontShape=t.shape),typeof t.fontShape=="string"&&(r.fontShape=t.fontShape.toLowerCase()),r.fontShape&&(r.fontShape=(s={italic:"it",up:"n",upright:"n",normal:"n"}[r.fontShape])!=null?s:r.fontShape);let i=(l=t.size)!=null?l:t.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 yl(e){var t,r,i,o,n,a;if(xa(e,e.position)==="text"){let[s,l]=X(e.selection),c=!1;for(;!c&&s>0;){let u=e.at(s);u.mode==="text"&&$t.test(u.value)?s-=1:c=!0}for(c=!1;!c&&l<=e.lastOffset;){let u=e.at(l);u.mode==="text"&&$t.test(u.value)?l+=1:c=!0}if(c&&(l-=1),s>=l)return e.setSelection(l-1,l),!0;e.setSelection(s,l)}else{let s=e.at(e.position);if(s.isDigit()){let[l,c]=X(e.selection);for(;(t=e.at(l))!=null&&t.isDigit();)l-=1;for(;(r=e.at(c))!=null&&r.isDigit();)c+=1;e.setSelection(l,c-1)}else if(s.style.variant||s.style.variantStyle){let[l,c]=X(e.selection),u=(i=e.at(l))==null?void 0:i.style;for(;u&&u.variant===s.style.variant&&u.variantStyle===s.style.variantStyle;)l-=1,u=(o=e.at(l))==null?void 0:o.style;for(u=(n=e.at(c))==null?void 0:n.style;u&&u.variant===s.style.variant&&u.variantStyle===s.style.variantStyle;)c+=1,u=(a=e.at(c))==null?void 0:a.style;e.setSelection(l,c-1)}else e.setSelection(e.offsetOf(s.firstSibling),e.offsetOf(s.lastSibling))}return!0}ne({selectGroup:e=>{let t=yl(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>He(e,"forward",{extend:!0}),extendSelectionBackward:e=>He(e,"backward",{extend:!0}),extendToNextWord:e=>hr(e,"forward",{extend:!0}),extendToPreviousWord:e=>hr(e,"backward",{extend:!0}),extendSelectionUpward:e=>He(e,"upward",{extend:!0}),extendSelectionDownward:e=>He(e,"downward",{extend:!0}),extendToNextBoundary:e=>hr(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>hr(e,"backward",{extend:!0}),extendToGroupStart:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{let t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{let t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});var jr=null,$o=0;function um(e){return e instanceof PointerEvent}function bl(e,t){var v;e.atomBoundsCache=new Map;let r=e,i,o=!1,n=!1,a="none";if(t.buttons>1)return;let s=!1,l=!1,c=t.clientX,u=t.clientY,d=Date.now(),p=r.field,h=setInterval(()=>{s?p.scroll({top:0,left:p.scrollLeft-16}):l&&p.scroll({top:0,left:p.scrollLeft+16})},32);function f(b){"PointerEvent"in window?(xo(p,"pointermove",x),xo(p,"pointerup pointercancel",f),b instanceof PointerEvent&&p.releasePointerCapture(b.pointerId)):(xo(window,"mousemove",x),xo(window,"mouseup blur",f)),o=!1,clearInterval(h),e.element.classList.remove("tracking"),b&&b.preventDefault()}function x(b){if(!r.hasFocus()){f(null);return}let A=b.clientX,_=b.clientY,T=um(b)&&b.pointerType==="touch"?20:5;if(Date.now()<d+500&&Math.abs(c-A)<T&&Math.abs(u-_)<T){b.preventDefault(),b.stopPropagation();return}let E=p.getBoundingClientRect();l=A>E.right,s=A<E.left;let R=i;um(b)&&(b.isPrimary||(R=Wr(r,b.clientX,b.clientY,{bias:0})));let F=Wr(r,A,_,{bias:A<=c?A===c?0:-1:1});R>=0&&F>=0&&(r.model.extendSelectionTo(R,F),U(e)),b.preventDefault(),b.stopPropagation()}jr&&Math.abs(jr.x-c)<5&&Math.abs(jr.y-u)<5&&Date.now()<jr.time+500?($o+=1,jr.time=d):(jr={x:c,y:u,time:d},$o=1);let M=p.getBoundingClientRect();if(c>=M.left&&c<=M.right&&u>=M.top&&u<=M.bottom){if(e.hasFocus()||(a="none",e.focus({preventScroll:!0})),e.flushInlineShortcutBuffer(),e.adoptStyle="left",i=Wr(e,c,u,{bias:0}),i>=0){if(e.element.classList.add("tracking"),t.shiftKey){let b=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,i),Us(e.model)||b?a="all":a="selection"}else e.model.at(i).type==="placeholder"?(e.model.setSelection(i-1,i),a="selection"):((v=e.model.at(i).rightSibling)==null?void 0:v.type)==="placeholder"?(e.model.setSelection(i,i+1),a="selection"):(e.model.position=i,Us(e.model)?a="all":a="selection");e.style={},t.detail===3||$o>2?(f(t),(t.detail===3||$o===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},a="all")):o||(o=!0,"PointerEvent"in window?(pi(p,"pointermove",x),pi(p,"pointerup pointercancel",f),t instanceof PointerEvent&&p.setPointerCapture(t.pointerId)):(pi(window,"blur",f),pi(window,"mousemove",x),pi(window,"mouseup",f)),(t.detail===2||$o===2)&&(n=!0,yl(e.model),a="all"))}}else jr=null;e.stopCoalescingUndo(),a!=="none"&&(e.model.selectionIsCollapsed&&(a="all"),U(e)),t.preventDefault()}function Gh(e,t,r){if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return 0;let i=e-(r.left+r.right)/2,o=t-(r.top+r.bottom)/2;return i*i+o*o}function dm(e,t,r,i,o){if(!r.id)return[1/0,null];if(t.has(r.id))return t.get(r.id);let n=ar(e,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=dm(e,t,s,i,o);l[0]<=a[0]&&(a=l)}return a[1]||(a=[Gh(i,o,n),r]),t.set(r.id,a),a}function Xh(e,t,r){let[,i]=dm(e,new Map,e.model.root,t,r);return i}function Wr(e,t,r,i){var c,u;let o=(c=e.fieldContent)==null?void 0:c.getBoundingClientRect();if(!o)return 0;if(t>o.right||r>o.bottom+8)return e.model.lastOffset;if(t<o.left||r<o.top-8)return 0;i=i!=null?i:{},i.bias=(u=i.bias)!=null?u:0;let n=Xh(e,t,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=e.model.offsetOf(n);if(l<0)return-1;if(n.leftSibling)if(i.bias===0&&n.type!=="placeholder"){let d=ar(e,n);d&&t<(d.left+d.right)/2&&(l=e.model.offsetOf(n.leftSibling))}else i.bias<0&&(l=e.model.offsetOf(n.leftSibling));return l}var xl=class extends q{constructor(){super("math")}onPaste(t,r){if(!r||!N(t.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)){t.snapshot();let s=et(a),{model:l}=t;l.selectionIsCollapsed||l.deleteAtoms(X(l.selection));let c=l.at(l.position);if(c.parent instanceof z){c.parentBranch;let u=[],d=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(let x of s)x.type==="first"&&d.length>0?(u.push(d),d=[x]):d.push(x);d.length>0&&u.push(d);let p=Number(c.parentBranch[0]),h=Number(c.parentBranch[1]),f=c.parent.maxColumns;for(;c.parent.colCount-h<u.length&&c.parent.colCount<f;)c.parent.addColumn();c.parent.addChildrenAfter(u[0],c);for(let x=1;x<u.length;x++)h++,h>=f&&(h=0,c.parent.addRowAfter(p),p++),c.parent.setCell(p,h,u[x])}else c.parent.addChildrenAfter(s.filter(u=>u.type!=="first"),c);return l.position=l.offsetOf(s[s.length-1]),K(l,{inputType:"insertFromPaste"}),U(t),!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]=Yn(i),o==="auto"&&a&&(o="latex"),t.stopCoalescingUndo(),t.stopRecording(),this.insert(t.model,i,{format:o})&&(t.startRecording(),t.snapshot("paste"),U(t)),t.startRecording(),!0}return!1}insert(t,r,i){var M,v;let o=typeof r=="string"?r:(v=(M=window.MathfieldElement.computeEngine)==null?void 0:M.box(r).latex)!=null?v:"";if(!i.silenceNotifications&&!N(t,{data:o,inputType:"insertText"}))return!1;i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto");let{silenceNotifications:n}=t;i.silenceNotifications&&(t.silenceNotifications=!0);let a=t.silenceNotifications;t.silenceNotifications=!0;let s={};if(s[0]=i.insertionMode==="replaceAll"?"":t.getValue(t.selection,"latex-unstyled"),s["?"]="\\placeholder{}",s["@"]=s["?"],i.insertionMode==="replaceSelection"&&!t.selectionIsCollapsed?t.deleteAtoms(X(t.selection)):i.insertionMode==="replaceAll"?(t.root.setChildren([],"body"),t.position=0):i.insertionMode==="insertBefore"?t.collapseSelection("backward"):i.insertionMode==="insertAfter"&&t.collapseSelection("forward"),!t.at(t.position).isLastSibling&&t.at(t.position+1).type==="placeholder"?t.deleteAtoms([t.position,t.position+1]):t.at(t.position).type==="placeholder"&&t.deleteAtoms([t.position-1,t.position]),s[0])s["@"]=s[0];else if(typeof r=="string"&&/(^|[^\\])#@/.test(r)){let b=Qh(t);b>=0&&(s["@"]=t.getValue(b,t.position,"latex-unstyled"),t.deleteAtoms([b,t.position]))}s[0]||(s[0]=s["?"]);let l=!1,c=b=>(l=!0,s[b]),[u,d]=Zh(t,r,c,i);if(!d)return!1;let{parent:p}=t.at(t.position);if(u!=="latex"&&t.mathfield.options.removeExtraneousParentheses&&p instanceof H&&p.leftDelim==="("&&p.hasEmptyBranch("body")&&d.length===1&&d[0].type==="genfrac"){let b=p.parent,A=p.parentBranch;b.removeChild(p),b.setChildren(d,A)}let h=p.hasEmptyBranch("body"),f=t.at(t.position);f.parent.addChildrenAfter(d,f),u==="latex"&&typeof r=="string"&&(p==null?void 0:p.type)==="root"&&h&&!l&&(p.verbatimLatex=r),t.silenceNotifications=a;let x=d[d.length-1];if(i.selectionMode==="placeholder"){let b=d.flatMap(A=>[A,...A.children]).find(A=>A.type==="placeholder");if(b){let A=t.offsetOf(b);t.setSelection(A-1,A),t.announce("move")}else x&&(t.position=t.offsetOf(x))}else i.selectionMode==="before"||(i.selectionMode==="after"?x&&(t.position=t.offsetOf(x)):i.selectionMode==="item"&&t.setSelection(t.anchor,t.offsetOf(x)));return K(t,{data:o,inputType:"insertText"}),t.silenceNotifications=n,!0}};function Zh(e,t,r,i){var a;let o,n=[];if(typeof t!="string"||i.format==="math-json"){let s=window.MathfieldElement.computeEngine;if(!s)return["math-json",[]];[o,t]=["latex",s.box(t).latex],n=oe(t,{context:e.mathfield.context})}else typeof t=="string"&&i.format==="ascii-math"?([o,t]=Lr(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),n=oe(t,{context:e.mathfield.context}),o!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&_a(n)):(i.format==="auto"||(a=i.format)!=null&&a.startsWith("latex"))&&(i.format==="auto"&&([o,t]=Lr(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),i.format==="latex"&&([,t]=Yn(t)),n=oe(t,{context:e.mathfield.context,args:r}),i.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&_a(n));return St(n,i.style),[o!=null?o:"latex",n]}function Yh(e){if(!e||(e[0].type,e.length>1))return null;let t=e[0];return t instanceof H&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function _a(e){if(e){for(let t=0;e[t];t++){let r=e[t];if(r instanceof H&&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&&(e[t]=r.body[o])}}for(let t of e){for(let r of t.branches)if(!t.hasEmptyBranch(r)){_a(t.branch(r));let i=Yh(t.branch(r));i&&t.setChildren(i,r)}if(t instanceof z)for(let r of t.cells)_a(r)}}}function Qh(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}let r=t,i=!1;if(t.type==="mclose"){let o=bi[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===o);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),i=!0}else t.type==="leftright"&&(t=t.leftSibling,i=!0);if(i)for(;!t.isFirstSibling&&(t.isFunction||mm(t));)t=t.leftSibling;else{let o=[];for(;!t.isFirstSibling&&(mm(t)||o.length>0);)t.type==="mclose"&&o.unshift(t.value),t.type==="mopen"&&o.length>0&&t.value===bi[o[0]]&&o.shift(),t=t.leftSibling}return r===t?-1:e.offsetOf(t)}function mm(e){return e.isDigit()?!0:e.type&&/^(mord|surd|msubsup|leftright|mop|mclose)$/.test(e.type)?!(e.isExtensibleSymbol||e.isFunction):!1}new xl;var vl=class extends q{constructor(){super("text")}onPaste(t,r){if(!r)return!1;let i=typeof r=="string"?r:r.getData("text/plain");return i&&N(t.model,{inputType:"insertFromPaste",data:i})?(t.stopCoalescingUndo(),t.stopRecording(),this.insert(t.model,i)&&(K(t.model,{inputType:"insertFromPaste"}),t.startRecording(),t.snapshot("paste"),U(t)),t.startRecording(),!0):!1}insert(t,r,i={}){if(!N(t,{data:r,inputType:"insertText"}))return!1;i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto");let{silenceNotifications:o}=t;i.silenceNotifications&&(t.silenceNotifications=!0);let n=t.silenceNotifications;t.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!t.selectionIsCollapsed?t.deleteAtoms(X(t.selection)):i.insertionMode==="replaceAll"?(t.root.setChildren([],"body"),t.position=0):i.insertionMode==="insertBefore"?t.collapseSelection("backward"):i.insertionMode==="insertAfter"&&t.collapseSelection("forward");let a=ef(r,t.mathfield.context);if(St(a,i.style),!a)return!1;let s=t.at(t.position),l=s.parent.addChildrenAfter(a,s);return t.silenceNotifications=n,i.selectionMode==="before"||(i.selectionMode==="item"?t.setSelection(t.anchor,t.offsetOf(l)):l&&(t.position=t.offsetOf(l))),K(t,{data:r,inputType:"insertText"}),t.silenceNotifications=o,!0}};function ef(e,t){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/\$/g,"\\$"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),oe(e,{context:t,parseMode:"text"})}new vl;var J=4,Ce=20,ae=2*(Ce+J),Aa=(e,t)=>`
<line x1="${e+Ce}" y1="${t+Ce}"
x2="${e>t?e+Ce:7*Ce+10*J}"
y2="${e<t?t+Ce:7*Ce+10*J}"/>
<svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" 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>`,pm=(e,t)=>`
<line x1="${e+Ce}" y1="${t+Ce}"
x2="${e>t?e+Ce:7*Ce+10*J}"
y2="${e<t?t+Ce:7*Ce+10*J}"/>
<svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" 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>`,La=(e,t,r)=>`
<svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" 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>`,tf=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*Ce+10*J+5} ${8*Ce+10*J+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${ae+J}"
height="${3*ae}"
width="${ae}"
rx="${ae/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${ae+J}"
y="0"
height="${ae}"
width="${3*ae}"
rx="${ae/2}"/>
<g data-command='"moveDown"'>
${La(2*(J+ae),2*J+3*ae,0)}
</g>
<g data-command='"moveUp"'>
${La(2*(J+ae),2*J+ae,180)}
</g>
<g data-command='"moveToNextWord"'>
${La(2*J+3*ae,2*(J+ae),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${La(2*J+ae,2*(J+ae),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Aa(2*J+ae,J)}
</g>
<g data-command='"removeColumn"'>
${pm(2*J+2*ae,J)}
</g>
<g data-command='"addColumnAfter"'>
${Aa(2*J+3*ae,J)}
</g>
<g data-command='"addRowBefore"'>
${Aa(J,2*J+ae)}
</g>
<g data-command='"removeRow"'>
${pm(J,2*J+2*ae)}
</g>
<g data-command='"addRowAfter"'>
${Aa(J,2*J+3*ae)}
</g>
</svg>`,rf=e=>`
<svg id="matrix" class="${e}" 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>`,of=e=>`
<svg id="pmatrix" class="${e}" 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>`,hm=e=>`
<svg id="Bmatrix" class="${e}" 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>`,nf=e=>`
<svg id="bmatrix" class="${e}" 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>`,af=e=>`
<svg id="vmatrix" class="${e}" 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>`,sf=e=>`
<svg id="Vmatrix" class="${e}" 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>`,lf=e=>`
<svg id="cases" class="${e}" 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>`,cf=e=>`
<svg id="rcases" class="${e}" 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>`,wl={matrix:rf,pmatrix:of,bmatrix:nf,Bmatrix:hm,vmatrix:af,Vmatrix:sf},kl={cases:lf,rcases:cf,Bmatrix:hm};function uf(e){var p,x;let t=(p=e.model.parentEnvironment)==null?void 0:p.array;if(!t)return;let r=0;t.forEach(M=>{(!r||M.length>r)&&(r=M.length)});let i=document.getElementById("mathlive-environment-popover");i||(i=Br("mathlive-environment-popover"),Pe("environment-popover"),Pe("core"),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=tf;let a=[],s="",l=e.model.parentEnvironment.environmentName;if(ta(l)){let M=df(l);s=wl[M]("active");let h=wl,{[M]:v}=h,b=Jr(h,[Ra(M)]);a=Object.values(b).map(A=>A("inactive"))}else if(m0(l)){let M=mf(l);s=kl[M]("active");let f=kl,{[M]:v}=f,b=Jr(f,[Ra(M)]);a=Object.values(b).map(A=>A("inactive"))}else p0(l)&&(s=wl.matrix("active"),a=Object.values(kl).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 v=M.dataset.command,b=v;try{b=JSON.parse(v)}catch(A){}M.addEventListener("mousedown",A=>A.preventDefault()),b&&M.addEventListener("click",()=>e.executeCommand(b))});let d=(x=e.field)==null?void 0:x.getBoundingClientRect();d&&(i.style.top=`${window.scrollY+(d.top-i.clientHeight-15)}px`,i.style.left=`${d.left+20}px`,i.classList.add("is-visible"))}function Ca(){let e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function fm(){document.getElementById("mathlive-environment-popover")&&(Ei("mathlive-environment-popover"),Ne("environment-popover"),Ne("core"))}function qo(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){let r=e.model.parentEnvironment;if(r!=null&&r.array&&d0(r.environmentName)){let i=e.options.environmentPopoverPolicy;t=i==="auto"&&window.mathVirtualKeyboard.visible||i==="on"}}t?uf(e):Ca()}function df(e){return e.replace("*","")}function mf(e){return e==="dcases"?"cases":e}var pf='<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>',Ea=class{constructor(t,r){this.focusBlurInProgress=!1;var s,l,c;this.options=m(g(m({},zi()),{macros:Zr(),registers:Xn()}),Oi(r)),this.eventController=new AbortController,r.eventSink&&(this.host=r.eventSink),this.element=t,t.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=il(this.options),n=new y({type:"root",mode:o,body:oe(i,{context:this.context})});this.model=new Ro(this,o,n,{onSelectionDidChange:()=>this.onSelectionDidChange(),onContentWillChange:u=>this.onContentWillChange(u)}),this.undoManager=new va(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(Xs(this)),a.push("</span>"),window.mathVirtualKeyboard&&(a.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'}data-ML__tooltip="${We("tooltip.toggle virtual keyboard")}">`),a.push(pf),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.95.4: 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(Ve(this)))},{signal:this.eventController.signal}),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Z0(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),Tr&&!j.locale.startsWith(Tr.locale)&&M0(j.locale),Le!=="ready"&&document.fonts.ready.then(()=>Co(this)),t.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(Ve(this)),qo(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Ca())}get colorMap(){return t=>{var r,i,o;return(o=(i=(r=this.options).colorMap)==null?void 0:i.call(r,t))!=null?o:gr(t)}}get backgroundColorMap(){return t=>{var r,i,o,n,a,s;return(s=(a=(i=(r=this.options).backgroundColorMap)==null?void 0:i.call(r,t))!=null?a:(n=(o=this.options).colorMap)==null?void 0:n.call(o,t))!=null?s:Gr(t)}}get smartFence(){var t;return(t=this.options.smartFence)!=null?t:!1}get readOnly(){var t;return(t=this.options.readOnly)!=null?t:!1}get disabled(){var t,r;return(r=(t=this.host)==null?void 0:t.disabled)!=null?r:!1}get contentEditable(){var t;return((t=this.host)==null?void 0:t.getAttribute("contenteditable"))!=="false"}get userSelect(){if(!this.host)return"";let t=getComputedStyle(this.host);return t.getPropertyValue("user-select")||t.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(t=>t.type==="prompt"&&!t.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;let t=this.model.at(this.model.anchor),r=this.model.at(this.model.position),i=y.commonAncestor(t,r);return!!((i==null?void 0:i.type)==="prompt"||i!=null&&i.parentPrompt)}get letterShapeStyle(){var t;return(t=this.options.letterShapeStyle)!=null?t:"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 t=this.model.getAtoms(this.model.selection);if(t.length===0)return{};let r=m({},t[0].style);return t.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[t,r]=L0(this.options.keybindings,(i=cr())!=null?i:qs);return((o=cr())==null?void 0:o.score)>0&&(this._keybindings=t,r.length>0&&console.error("MathLive 0.95.4: Invalid keybindings for current keyboard layout",r)),t}setOptions(t){var o;this.options=m(m({},this.options),Oi(t)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let r=this.options.defaultMode;r==="inline-math"&&(r="math"),((o=this.model.root.firstChild)==null?void 0:o.mode)!==r&&(this.model.root.firstChild.mode=r),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");let i=y.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in t||this.model.getValue()!==i)&&q.insert(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in t||"macros"in t||"registers"in t||"colorMap"in t||"backgroundColorMap"in t||"letterShapeStyle"in t||"minFontScale"in t||"readOnly"in t||"placeholderSymbol"in t)&&U(this)}getOptions(t){return Ot(this.options,t)}getOption(t){return Ot(this.options,t)}handleEvent(t){var r;if(Tt(this)){if(Po(t)){if(!fi(t.origin,(r=this.options.originValidator)!=null?r:"none"))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");let{action:i}=t.data;if(i==="execute-command"){let o=t.data.command;if(mr(o)==="virtual-keyboard")return;this.executeCommand(o)}else i==="update-state"||(i==="focus"?this.focus({preventScroll:!0}):i==="blur"&&this.blur());return}switch(t.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":bl(this,t);break;case"pointerdown":bl(this,t);break;case"virtual-keyboard-toggle":this.hasFocus()&&qo(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Tt(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Tt(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(t);break;default:console.warn("Unexpected event type",t.type)}}}dispose(){if(!Tt(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 t=this.element;delete t.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.fieldContent=void 0,this.ariaLiveText=void 0,nm(),T0(),fm()}flushInlineShortcutBuffer(t){if(t!=null||(t={defer:!1}),!t.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(t){return mr(t)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(t),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Ve(this))),!1):K0(this,t)}get errors(){return aa(this.model.getValue(),{context:this.context})}getValue(t,r,i){return this.model.getValue(t,r,i)}setValue(t,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=xa(this.model,this.model.position))!=null?i:"math"),q.insert(this.model,t,r)&&(U(this),this.undoManager.snapshot("set-value"))}get expression(){let t=window.MathfieldElement.computeEngine;return t?t.box(t.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.95.4: 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&&tt(this,{interactive:!0});let t=this.field.getBoundingClientRect(),r=null;if(this.model.selectionIsCollapsed)r=hi(this.field);else{let o=Qn(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+t.left-this.field.scrollLeft,y:a+t.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<t.left?n=o-t.left+this.field.scrollLeft-20:o>t.right&&(n=o-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:n})}}insert(t,r){if(typeof t!="string"||t.length===0&&((r==null?void 0:r.insertionMode)==="insertBefore"||(r==null?void 0:r.insertionMode)==="insertAfter")||t.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&&Uo()&&navigator.vibrate(Zs),window.MathfieldElement.playSound("keypress")),t==="\\\\")cl(this.model);else if(t==="&")ul(this.model);else{let i=this.style;this.model.selectionIsCollapsed?q.insert(this.model,t,m({style:this.model.at(this.model.position).computedStyle},r)):q.insert(this.model,t,r),r.resetStyle&&(this.style=i)}return this.snapshot(`insert-${this.model.at(this.model.position).type}`),U(this),r.scrollIntoView&&this.scrollIntoView(),!0}switchMode(t,r="",i=""){var a;if(this.model.mode===t||!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(),r&&t!=="latex"){let l=oe(r,{context:this.context,parseMode:t});n.collapseSelection("forward");let c=n.at(n.position);n.position=n.offsetOf(c.parent.addChildrenAfter(l,c)),s=!0}if(this.model.mode=t,t==="latex"){let l=n.selectionIsCollapsed;dr(this,"accept");let c,u=n.at(n.position);if(l)c="\\";else{let p=X(n.selection);c=this.model.getValue(p,"latex");let h=this.model.extractAtoms(p);h.length===1&&h[0].type==="placeholder"&&(c=r,l=!0),u=n.at(p[0])}let d=new xt(c);u.parent.addChildAfter(d,u),l?n.position=n.offsetOf(d.lastChild):n.setSelection(n.offsetOf(d.firstChild),n.offsetOf(d.lastChild))}else Pr(n).forEach(l=>{l.isError=!1});if(i){let l=oe(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 U(this),this.undoManager.snapshot(t==="latex"?"insert-latex":"insert"),s}),this.model.mode=t,window.mathVirtualKeyboard.update(Ve(this))}hasFocus(){return!this.blurred}focus(t){this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.model.announce("line")),t!=null&&t.preventScroll||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]}}applyStyle(t,r={}){var a,s;let i={operation:"set",silenceNotifications:!1};Rr(r)?i.range=r:(i.range=r.range,i.silenceNotifications=(a=r.silenceNotifications)!=null?a:!1);let o=gl(this,t),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)No(this.model,l,o,{operation:n});else No(this.model,i.range,o,{operation:n})}),U(this)}getCaretPoint(){let t=hi(this.field);return t?{x:t.x,y:t.y}:null}setCaretPoint(t,r){let i=Wr(this,t,r,{bias:0});if(i<0)return!1;let o=this.model.position;return this.model.position=i,this.model.announce("move",o),U(this),!0}getPrompt(t){let r=this.model.findAtom(i=>i.type==="prompt"&&i.placeholderId===t);return r}getPromptValue(t,r){let i=this.getPrompt(t);if(!i)return console.error(`MathLive 0.95.4: unknown prompt ${t}`),"";let o=this.model.offsetOf(i.firstChild),n=this.model.offsetOf(i.lastChild);return this.model.getValue(o,n,r)}getPrompts(t){return this.model.getAllAtoms().filter(r=>r.type!=="prompt"?!1:t?!(t.id&&r.placeholderId!==t.id||t.locked&&r.locked!==t.locked||t.correctness==="undefined"&&r.correctness||t.correctness&&r.correctness!==t.correctness):!0).map(r=>r.placeholderId)}setPromptValue(t,r,i){if(r!==void 0){let o=this.getPrompt(t);if(!o){console.error(`MathLive 0.95.4: unknown prompt ${t}`);return}let n=this.model.getBranchRange(this.model.offsetOf(o),"body");this.model.setSelection(n),this.insert(r,g(m({},i),{insertionMode:"replaceSelection"}))}i!=null&&i.silenceNotifications&&(this.valueOnFocus=this.getValue()),U(this)}setPromptState(t,r,i){let o=this.getPrompt(t);if(!o){console.error(`MathLive 0.95.4: unknown prompt ${t}`);return}r==="undefined"?o.correctness=void 0:typeof r=="string"&&(o.correctness=r),typeof i=="boolean"&&(o.locked=i,o.captureSelection=i),U(this)}stripPromptContent(t){let r=this.model.getAllAtoms().filter(o=>o.type!=="prompt"?!1:t?!(t.id&&o.placeholderId!==t.id||t.locked&&o.locked!==t.locked||t.correctness==="undefined"&&o.correctness||t.correctness&&o.correctness!==t.correctness):!0),i={};return r.forEach(o=>{let n=o.placeholderId;i[n]=this.getPromptValue(n),this.setPromptValue(n,"")}),i}getPromptState(t){let r=this.getPrompt(t);return r?[r.correctness,r.locked]:(console.error(`MathLive 0.95.4: unknown prompt ${t}`),[void 0,!0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(t){var r;this.undoManager.snapshot(t)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ve(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 t;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ve(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var t;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ve(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var t;(t=this.undoManager)==null||t.reset()}onSelectionDidChange(){var r,i;let t=this.model;this.keyboardDelegate.setValue(t.getValue(this.model.selection,"latex-expanded"));{let o=t.at(t.position),n=(r=o.mode)!=null?r:il(this.options);this.model.mode!==n&&(this.model.mode==="latex"?(dr(this,"accept",{mode:n}),t.position=t.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(Ve(this)),qo(this)}onContentWillChange(t){var r,i,o;return(o=(i=this.host)==null?void 0:i.dispatchEvent(new InputEvent("beforeinput",g(m({},t),{data:t.data?t.data:(r=t.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(),tt(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="",dr(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})),U(this),this.focusBlurInProgress=!1,Ca();let t=new AbortController,r=t.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Tt(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0})},{once:!0,signal:r}),setTimeout(()=>t.abort(),100)}onInput(t){Vo(this,t)}onKeystroke(t,r){return fl(this,t,r)}onCompositionStart(t){this.model.deleteAtoms(X(this.model.selection));let r=hi(this.field);r&&requestAnimationFrame(()=>{tt(this),this.keyboardDelegate.moveTo(r.x,r.y-r.height)})}onCompositionUpdate(t){J0(this.model,t),U(this)}onCompositionEnd(t){G0(this.model),Vo(this,t,{simulateKeystroke:!0})}onCut(t){if(!this.isSelectionEditable){this.model.announce("plonk");return}N(this.model,{inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),q.onCopy(this,t),qe(this.model,X(this.model.selection),"deleteByCut"),this.snapshot("cut"),U(this))}onCopy(t){q.onCopy(this,t)}onPaste(t){let r=this.isSelectionEditable;return r&&(r=q.onPaste(this.model.at(this.model.position).mode,this,t.clipboardData)),r||this.model.announce("plonk"),t.preventDefault(),t.stopPropagation(),r}onGeometryChange(){Ti(this),qo(this)}onWheel(t){let r=5*t.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}),t.preventDefault(),t.stopPropagation())}getHTMLElement(t){let r=t;for(;!r.id&&r.hasChildren;)r=t.children[0];return this.fieldContent.querySelector(`[data-atom-id="${r.id}"]`)}get context(){var t,r;return{registers:(t=this.options.registers)!=null?t:{},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=>Qo(i,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function Ba(e,t,r){if(e.at(t).mode!=="text")return t;let i=r==="backward"?-1:1,o;if($t.test(e.at(t).value)){let n=t,a;do a=e.at(n).mode==="text"&&$t.test(e.at(n).value),n+=i;while(e.at(n)&&a);o=e.at(n)?n-2*i:n-i}else if(/\s/.test(e.at(t).value)){let n=t;for(;e.at(n)&&e.at(n).mode==="text"&&/\s/.test(e.at(n).value);)n+=i;if(!e.at(n))o=n-i;else{let a=!0;do a=e.at(n).mode==="text"&&!/\s/.test(e.at(n).value),n+=i;while(e.at(n)&&a);o=e.at(n)?n-2*i:n-i}}else{let n=t;for(;e.at(n)&&e.at(n).mode==="text"&&!/\s/.test(e.at(n).value);)n+=i;o=e.at(n)?n:n-i;let a=!0;for(;e.at(n)&&a;)a=e.at(n).mode==="text"&&/\s/.test(e.at(n).value),a&&(o=n),n+=i;o=e.at(n)?n-2*i:n-i}return o-(i>0?0:1)}function hr(e,t,r){var a,s,l,c,u,d,p;let i=e.position;(a=r==null?void 0:r.extend)!=null&&a||e.collapseSelection(t);let o=e.at(e.position);if(t==="forward"&&(o.type==="subsup"?(o=o.rightSibling,o||(o=e.at(e.position+1))):o=e.at(e.position+1)),!o)return e.announce("plonk"),!1;let n=e.offsetOf(o);if(o instanceof Fe)n=Ba(e,n,t);else if(o instanceof Y)if(o.isSuggestion)for(;o&&o instanceof Y;)o.isSuggestion=!1,n=e.offsetOf(o),o=o.rightSibling;else if(t==="forward"){if(o=o.rightSibling,!o||!(o instanceof Y))return e.announce("plonk"),!1;for(;o&&o instanceof Y&&/[a-zA-Z\*]/.test(o.value);)n=e.offsetOf(o),o=o.rightSibling}else{if(o=o.leftSibling,!o||!(o instanceof Y))return e.announce("plonk"),!1;for(;o&&o instanceof Y&&/[a-zA-Z\*]/.test(o.value);)n=e.offsetOf(o),o=o.leftSibling}else if(t==="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=e.offsetOf(o.leftSibling)}else if(t==="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=e.offsetOf(o)}else if(t==="backward")if(o.type==="first")for(;n>0&&o.type==="first";)n-=1,o=e.at(n);else{let h=o.type;o.type==="subsup"&&(n=e.offsetOf(e.at(n).leftSibling)),n-=1;let f=(s=e.at(n))==null?void 0:s.type;for(;n>=0&&f===h;)((l=e.at(n))==null?void 0:l.type)==="subsup"?n=e.offsetOf(e.at(n).leftSibling):n-=1,f=e.at(n).type}else{let{type:h}=o,f=(c=e.at(n))==null?void 0:c.type,{lastOffset:x}=e;for(;n<=x&&(f===h||f==="subsup");){for(;((u=e.at(n).rightSibling)==null?void 0:u.type)==="subsup";)n=e.offsetOf(e.at(n).rightSibling);n+=1,f=(d=e.at(n))==null?void 0:d.type}n-=1}if((p=r==null?void 0:r.extend)!=null&&p){if(!e.setSelection(e.anchor,n))return e.announce("plonk"),!1}else{if(n===e.position)return e.announce("plonk"),!1;e.position=n}return e.announce("move",i),e.mathfield.stopCoalescingUndo(),!0}function He(e,t,r){var n,a;if(r=r!=null?r:{extend:!1},e.mathfield.adoptStyle=t==="backward"?"right":"left",t!=="forward"){let[s,l]=la(e);s!==void 0&&l!==void 0&&e.deleteAtoms([s,l])}if(t==="upward")return ff(e,r);if(t==="downward")return gf(e,r);if(r.extend){let s=Ta(e,e.position,t);s<0&&(s=0),s>e.lastOffset&&(s=e.lastOffset);let l=e.setSelection(e.anchor,s);return e.mathfield.stopCoalescingUndo(),l}if(e.selectionIsPlaceholder){e.collapseSelection(t);let s=He(e,t);return e.mathfield.stopCoalescingUndo(),s}let i=e.position,o=i;if(e.collapseSelection(t)?(i=e.position,gm(e,i)||(i=Ta(e,i,t))):i=Ta(e,i,t),i<0||i>e.lastOffset){let s=!0;return e.silenceNotifications||(s=(a=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0),s&&e.announce("plonk"),s}return e.setPositionHandlingPlaceholder(i),e.mathfield.stopCoalescingUndo(),e.announce("move",o),!0}function Ta(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||gm(e,t)?t:Ta(e,t,r)}function gm(e,t){var o;let r=e.at(t),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")||e.mathfield.hasEditablePrompts&&!r.parentPrompt)}function hf(e,t,r){let i=1/0,o=0;for(;o<t.length;o++){let n=zs(e.getHTMLElement(t[o])).right,a=Math.abs(r-n);if(a<=i)i=a;else break}return t[o-1]}function Pa(e,t,r,i,o){let n=e.mathfield.hasEditablePrompts,a=n?r.filter(c=>c.type==="prompt"&&!c.captureSelection):r,s=zs(e.mathfield.getHTMLElement(t)).right,l=e.offsetOf(hf(e.mathfield,a,s))-(n?1:0);if(i){let[c,u]=e.selection.ranges[0],d;l<(o==="up"?c:u)?d={ranges:[[l,u]],direction:"backward"}:d={ranges:[[c,l]],direction:"forward"},e.setSelection(d)}else e.setPositionHandlingPlaceholder(l);e.announce(`move ${o}`)}function ff(e,t){var a,s;let r=(a=t==null?void 0:t.extend)!=null?a:!1;r||e.collapseSelection("backward");let i=()=>{var c,u;let l=!0;return e.silenceNotifications||(l=(u=(c=e.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(l?"plonk":"line"),l},o=e.at(e.position),n=o;for(;n&&n.parentBranch!=="below"&&!(Array.isArray(n.parentBranch)&&n.parent instanceof z);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&n.parent instanceof z){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(p=>p.type==="prompt"&&!p.captureSelection)&&e.mathfield.hasEditablePrompts)return i();Pa(e,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)&&e.mathfield.hasEditablePrompts)return i();Pa(e,o,l,r,"up")}else return i();return e.mathfield.stopCoalescingUndo(),!0}function gf(e,t){var a,s;let r=(a=t==null?void 0:t.extend)!=null?a:!1;r||e.collapseSelection("forward");let i=()=>{var c,u;let l=!0;return e.silenceNotifications||(l=(u=(c=e.mathfield.host)==null?void 0:c.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(l?"plonk":"line"),l},o=e.at(e.position),n=o;for(;n&&n.parentBranch!=="above"&&!(Array.isArray(n.parentBranch)&&n.parent instanceof z);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&n.parent instanceof z){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(p=>p.type==="prompt"&&!p.captureSelection)&&e.mathfield.hasEditablePrompts)return i();Pa(e,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")&&e.mathfield.hasEditablePrompts)return i();Pa(e,o,l,r,"down")}else return i();return!0}ne({deleteAll:e=>N(e,{inputType:"deleteContent"})&&qe(e,[0,-1],"deleteContent"),deleteForward:e=>U0(e),deleteBackward:e=>W0(e),deleteNextWord:e=>N(e,{inputType:"deleteWordForward"})&&qe(e,[e.anchor,Ba(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>N(e,{inputType:"deleteWordBackward"})&&qe(e,[e.anchor,Ba(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>N(e,{inputType:"deleteSoftLineBackward"})&&qe(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>N(e,{inputType:"deleteSoftLineForward"})&&qe(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>N(e,{inputType:"deleteHardLineBackward"})&&qe(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>N(e,{inputType:"deleteHardLineForward"})&&qe(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});function ym(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(let t of e.children)ym(t)}function Ml(e,t){var r;e&&(!t||((r=e.dataset)==null?void 0:r.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(i=>{i instanceof HTMLElement&&Ml(i)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(i=>{i instanceof HTMLElement&&Ml(i,t)})))}function bm(e,t){var o;if(!ue())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.95.4: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(t);return}if(!window.AWS){console.error("MathLive 0.95.4: 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:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};it().readAloudElement=e,r.synthesizeSpeech(i,(n,a)=>{if(n){console.trace(`MathLive 0.95.4: \`polly.synthesizeSpeech()\` error: ${n}`);return}if(!(a!=null&&a.AudioStream))return;let s=new TextDecoder("utf-8").decode(new Uint8Array(a.AudioStream));it().readAloudMarks=s.split(`
`).map(l=>l?JSON.parse(l):{}),it().readAloudTokens=[];for(let l of it().readAloudMarks)l.value&&it().readAloudTokens.push(l.value);it().readAloudCurrentMark="",i.OutputFormat="mp3",i.SpeechMarkTypes=[],r.synthesizeSpeech(i,(l,c)=>{if(l){console.trace(`MathLive 0.95.4: \`polly.synthesizeSpeech("${t}") error:${l}`);return}if(!(c!=null&&c.AudioStream))return;let u=new Uint8Array(c.AudioStream),d=new Blob([u.buffer],{type:"audio/mpeg"}),p=URL.createObjectURL(d),h=it();h.readAloudAudio?h.readAloudAudio.pause():(h.readAloudAudio=new Audio,h.readAloudAudio.addEventListener("ended",()=>{let f=h.readAloudMathField;h.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),f?(tt(f),h.readAloudElement=null,h.readAloudMathField=null,h.readAloudTokens=[],h.readAloudMarks=[],h.readAloudCurrentMark=""):ym(h.readAloudElement)}),h.readAloudAudio.addEventListener("timeupdate",()=>{let f="",x=h.readAloudAudio.currentTime*1e3+100;for(let M of h.readAloudMarks)M.time<x&&(f=M.value);h.readAloudCurrentMark!==f&&(h.readAloudCurrentToken=f,f&&f===h.readAloudFinalToken?h.readAloudAudio.pause():(h.readAloudCurrentMark=f,Ml(h.readAloudElement,h.readAloudCurrentMark)))})),h.readAloudAudio.src=p,h.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),h.readAloudAudio.play()})})}ue()||console.error('MathLive 0.95.4: 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 V=new WeakMap,yf=.5,fr={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 = ..."},re=class re extends HTMLElement{constructor(r){super();if(r){let i=[];for(let o of Object.keys(r))if(fr[o])if(fr[o].startsWith("mf."))if(fr[o].startsWith(`mf.${o}`))i.push(`Option \`${o}\` cannot be used as a constructor option. Use ${fr[o]}`);else{let n=fr[o].match(/([a-zA-Z]+) =/);i.push(`Option \`${o}\` has been renamed \`${n[1]}\``)}else i.push(`Option \`${o}\` cannot be used as a constructor option. Use ${fr[o]}`);if(i.length>0){console.group("%cMathLive 0.95.4: %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 o of i)console.warn(o);console.groupEnd()}}Ii()&&(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&&"adoptedStyleSheets"in this.shadowRoot?(this.shadowRoot.adoptedStyleSheets=[vo("core"),vo("mathfield"),vo("mathfield-element")],this.shadowRoot.innerHTML='<span style="pointer-events:auto"></span><slot style="display:none"></slot>'):this.shadowRoot.innerHTML=`<style>${gi("core")}${gi("mathfield")}${gi("mathfield-element")}</style><span style="pointer-events:auto"></span><slot style="display:none"></slot>`,r&&this._setOptions(r)}static get formAssociated(){return Ii()}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,D0())}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 j.locale}static set locale(r){r==="auto"&&(r=navigator.language.slice(0,5)),j.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 j.strings}static set strings(r){j.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;if(!o)return null;this._computeEngine=new o,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"))try{let a=await(await fetch(await ca(`${o}/${i}`))).arrayBuffer(),s=await this.audioContext.decodeAudioData(a);this.audioBuffers[r]=s}catch(n){}}static async playSound(r){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&await this.audioContext.resume(),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=yf,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,i){var o,n;return(n=(o=this._mathfield)==null?void 0:o.getPromptValue(r,i))!=null?n:""}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:this.defaultMode==="text"?"text":"math"}set mode(r){this._mathfield&&(this._mathfield.model.mode=r)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.95.4: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(r){var o,n;if(!this._mathfield)return;let i=(n=(o=re.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.95.4: 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?Ot(this._mathfield.options,r):V.has(this)?m({},Ot(m(m({},zi()),Oi(V.get(this).options)),r)):null}getOptions(r){return console.warn("%cMathLive 0.95.4: %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?Ot(this._mathfield.options,r):V.has(this)?Ot(m(m({},zi()),Oi(V.get(this).options)),r):null}reflectAttributes(){let r=zi(),i=this._getOptions();Object.keys(re.optionsAttributes).forEach(o=>{let n=Rt(o);re.optionsAttributes[o]==="on/off"?r[n]!==i[n]?this.setAttribute(o,i[n]?"on":"off"):this.removeAttribute(o):r[n]!==i[n]&&(re.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.95.4: %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(V.has(this)){let i=m(m({},V.get(this).options),r);V.set(this,g(m({},V.get(this)),{selection:{ranges:i.readOnly?[[0,0]]:[[0,-1]]},options:i}))}else V.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:r});this.reflectAttributes()}setOptions(r){console.group("%cMathLive 0.95.4: %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))fr[i]&&console.warn(`\`mf.setOptions({${i}:...})\` -> ${fr[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(V.has(this)){let s,l,c;if(Ri(r)?([s,l]=r.ranges[0],c=i):Rr(r)?([s,l]=r,c=i):Mt(r)&&Mt(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=V.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(V.has(this)){let n=V.get(this).options;V.set(this,{value:r,selection:{ranges:n.readOnly?[[0,0]]:[[0,-1]],direction:"forward"},options:n});return}let o=Da(this);V.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?Wr(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=ar(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,n;r.type==="pointerdown"&&this.onPointerDown(),r.type==="focus"&&((i=this._mathfield)==null||i.focus()),r.type==="blur"&&((o=$e.scrim)==null?void 0:o.state)==="closed"&&((n=this._mathfield)==null||n.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),Ii()||(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 Ea(this.shadowRoot.querySelector(":host > span"),g(m({},V.has(this)?V.get(this).options:Da(this)),{eventSink:this,value:i})),!V.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(let s of Object.keys(re.optionsAttributes))this.upgradeProperty(Rt(s))}if(!((a=this._mathfield)!=null&&a.model)){this._mathfield=null;return}V.has(this)&&this._mathfield.model.deferNotifications({content:!1,selection:!1},()=>{let s=V.get(this).value;s!==void 0&&this._mathfield.setValue(s),this._mathfield.model.selection=V.get(this).selection,V.delete(this)}),window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Dr()}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=Ot(this._mathfield.options,Object.keys(re.optionsAttributes).map(i=>Rt(i)));V.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&&U(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",""),Ii()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Ii()?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"),Ii()?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 environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(r){this._setOptions({environmentPopoverPolicy: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:V.has(this)?V.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(V.has(this)){V.set(this,g(m({},V.get(this)),{selection:r}));return}V.set(this,{value:void 0,selection:r,options:Da(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:V.has(this)?V.get(this).selection.ranges[0][0]:0}set position(r){if(this._mathfield&&(this._mathfield.model.position=r),V.has(this)){V.set(this,g(m({},V.get(this)),{selection:{ranges:[[r,r]]}}));return}V.set(this,{value:void 0,selection:{ranges:[[r,r]]},options:Da(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}};re.version="0.95.4",re._fontsDirectory="./fonts",re._soundsDirectory="./sounds",re.keypressVibration=!0,re._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},re._plonkSound="plonk.wav",re.audioBuffers={},re.createHTML=r=>r,re._speechEngineRate="100%",re._speechEngineVoice="Joanna",re._textToSpeechMarkup="",re._textToSpeechRules="mathlive",re._textToSpeechRulesOptions={},re.speakHook=V0,re.readAloudHook=bm,re._decimalSeparator=".",re.fractionNavigationOrder="numerator-denominator";var Ur=re;function Rt(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,r)=>r.toUpperCase())}function Da(e){let t={readOnly:!1},r=Ur.optionsAttributes;return Object.keys(r).forEach(i=>{if(e.hasAttribute(i)){let o=e.getAttribute(i);r[i]==="boolean"?t[Rt(i)]=!0:r[i]==="on/off"?o==="on"?t[Rt(i)]=!0:o==="off"?t[Rt(i)]=!1:t[Rt(i)]=void 0:r[i]==="number"?t[Rt(i)]=Number.parseFloat(o!=null?o:"0"):t[Rt(i)]=o}}),t}function Ii(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var Pi=Ur,xm,vm,wm,km;if(ue()&&!((xm=window.customElements)!=null&&xm.get("math-field"))){(wm=window[vm=Symbol.for("io.cortexjs.mathlive")])!=null||(window[vm]={});let e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.95.4",window.MathfieldElement=Ur,(km=window.customElements)==null||km.define("math-field",Ur)}function Sl(e,t){var a,s;t!=null||(t={}),t.mathstyle=(a=t.mathstyle)!=null?a:"displaystyle";let r=new P({from:g(m({},go()),{renderPlaceholder:()=>new k(160,{maxFontSize:1}),letterShapeStyle:(s=t==null?void 0:t.letterShapeStyle)!=null?s:"tex"}),mathstyle:t.mathstyle}),o=new y({mode:"math",type:"root",body:oe(e,{context:r,parseMode:"math",mathstyle:t.mathstyle})}).render(r);return o?(er(wt(o,r)),tr(o,{classes:"ML__mathlive"}).toMarkup()):""}function bf(e){return aa(e,{context:go()})}function _l(e,t={}){return I(oe(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Al(e){let t=oe(e,{parseMode:"math",mathstyle:"displaystyle"});return zt(t)}var Ho;function Ll(e){var t,r;if(!Ho){let i=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;i?Ho=new i:console.error(`MathLive 0.95.4: 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=Ho==null?void 0:Ho.box(e).latex)!=null?r:""}function xf(e,t="math"){return te(new y({type:"root",body:oe(e,{parseMode:t})}))}function vf(e){return Lr(e,{format:"ascii-math"})[1]}function wf(e,t,r){let i=r,o=0,n=e.length;for(;i<t.length;){let a=t[i];if(o<=0&&t.slice(i,i+n)===e)return i;a==="\\"?i++:a==="{"?o++:a==="}"&&o--,i++}return-1}function Ka(e,t,r,i,o="latex"){let n=[];for(let a of e)if(a.type==="text"){let s=a.data,l=!0,c=0,u;u=s.indexOf(t),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(t,c),u===-1){d=!0;break}c!==u&&n.push({type:"text",data:s.slice(c,u)}),c=u}else{if(u=wf(r,s,c+t.length),u===-1){d=!0;break}let p=s.slice(c+t.length,u);o==="ascii-math"&&([,p]=Lr(p,{format:"ascii-math"})),n.push({type:"math",data:p,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 Mm(e,t,r){let i=[{type:"text",data:e}];return t!=null&&t.inline&&t.inline.forEach(([o,n])=>{i=Ka(i,o,n,"textstyle")}),t!=null&&t.display&&t.display.forEach(([o,n])=>{i=Ka(i,o,n,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([o,n])=>{i=Ka(i,o,n,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([o,n])=>{i=Ka(i,o,n,"displaystyle","ascii-math")}),i}function kf(e,t){let r=document.createElement("span");try{let i="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";r.innerHTML=window.MathfieldElement.createHTML(i)}catch(i){console.error(`MathLive 0.95.4: Could not convert "${e}"' to MathML with ${i}`),r.textContent=e}return r.className="ML__sr-only",r}function Mf(e,t,r,i){try{let o=t.renderToMarkup(e,{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'"+e+"' with ",o),i)return document.createTextNode(e)}return null}function Vi(e,t,r,i){var a;let o=Mf(e,r,t||"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(kf(e,r)),/\bspeakable-text\b/i.test(n)&&r.renderToSpeakableText){let l=document.createElement("span"),c=r.renderToSpeakableText(e);l.innerHTML=window.MathfieldElement.createHTML(c),l.className="ML__sr-only",s.append(l)}return s.append(o),s}return o}function Sf(e,t){var i,o,n;let r=null;if((i=t.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(e)){r=document.createDocumentFragment();let a=Vi(e,"",t,!0);a&&r.appendChild(a)}else{if(!e.trim())return null;let a=Mm(e,(o=t.TeX)==null?void 0:o.delimiters,(n=t.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=Vi(s.data,s.mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);l&&r.appendChild(l)}}return r}function Sm(e,t){var r,i,o,n,a,s,l,c,u,d,p,h,f,x,M,v;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){let b=(r=e.childNodes[0].textContent)!=null?r:"";if((i=t.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(b)){e.textContent="";let _=Vi(b,"",t,!0);_&&e.append(_);return}let A=Mm(b,(o=t.TeX)==null?void 0:o.delimiters,(n=t.asciiMath)==null?void 0:n.delimiters);if(A.length===1&&A[0].type==="math"){e.textContent="";let _=Vi(A[0].data,A[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);_&&e.append(_);return}if(A.length===1&&A[0].type==="text")return}for(let b=e.childNodes.length-1;b>=0;b--){let A=e.childNodes[b];if(A.nodeType===3){let _=Sf((a=A.textContent)!=null?a:"",t);_&&(b+=_.childNodes.length-1,A.replaceWith(_))}else if(A.nodeType===1){let _=A,T=A.nodeName.toLowerCase();if(T==="script"){let E=A,R;if((s=t.processScriptTypePattern)!=null&&s.test(E.type))R=(l=E.textContent)!=null?l:"";else if((c=t.processMathJSONScriptTypePattern)!=null&&c.test(E.type))try{R=(d=t.serializeToLatex)==null?void 0:d.call(t,JSON.parse((u=E.textContent)!=null?u:""))}catch(F){console.error(F)}if(R){let F="textstyle";for(let je of E.type.split(";")){let[nt,Ft]=je.toLowerCase().split("=");nt.trim()==="mode"&&(F=Ft.trim()==="display"?"displaystyle":"textstyle")}let xe=Vi(R,F,t,!0);xe&&E.parentNode.replaceChild(xe,E)}}else if(((h=(p=t.processClassPattern)==null?void 0:p.test(_.className))!=null?h:!1)||!((x=(f=t.skipTags)==null?void 0:f.includes(T))!=null&&x||(v=(M=t.ignoreClassPattern)==null?void 0:M.test(_.className))!=null&&v))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){let R=e.textContent;e.textContent="";let F=Vi(R!=null?R:"","displaystyle",t,!0);F&&e.append(F)}else Sm(_,t)}}}var _f={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 Cl(e,t){var r,i,o,n;try{let a=m(m({},_f),t);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:""),Dr(),Pe("core"),Sm(e,a)}catch(a){a instanceof Error?console.error("renderMathInElement(): "+a.message):console.error("renderMathInElement(): Could not render math for element",e)}}function Af(e){let t=we.singleton;return t?(t.show(),Or(),t.currentLayer=e,t.render(),t.focus(),!0):!1}function Lf(){let e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}ne({switchKeyboardLayer:Af,toggleVirtualKeyboard:Lf,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function it(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Cf(){return console.warn("%cMathLive 0.95.4: %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 Ef(e){_m(document.body,e)}function Tf(e){if(typeof e=="string"){let t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return typeof e=="string"?null:e}function _m(e,t){var o,n,a,s;let r=Tf(e);if(!r)return;let i=t!=null?t:{};(o=i.renderToMarkup)!=null||(i.renderToMarkup=Sl),(n=i.renderToMathML)!=null||(i.renderToMathML=_l),(a=i.renderToSpeakableText)!=null||(i.renderToSpeakableText=Al),(s=i.serializeToLatex)!=null||(i.serializeToLatex=Ll),Cl(r,i)}var Pf={mathlive:"0.95.4"};return Dm(Bf);})();
Object.assign(exports, MathLive); Object.defineProperty(exports, '__esModule', { value: true });}));