mathjax
Version:
Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers. This package includes the packaged components (install mathjax-full to get the source
1 lines • 136 kB
JavaScript
!function(){"use strict";var t={306:function(t,e){e.q=void 0,e.q="3.2.2"},205:function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TeX=void 0;var l=r(309),u=r(77),c=r(982),f=s(r(199)),p=s(r(321)),h=s(r(810)),d=s(r(466)),m=s(r(394)),y=r(251),g=r(552);r(606);var v=function(t){function e(r){void 0===r&&(r={});var n=this,i=a((0,u.separateOptions)(r,e.OPTIONS,c.FindTeX.OPTIONS),3),o=i[0],s=i[1],l=i[2];(n=t.call(this,s)||this).findTeX=n.options.FindTeX||new c.FindTeX(l);var p=n.options.packages,h=n.configuration=e.configure(p),d=n._parseOptions=new m.default(h,[n.options,y.TagsFactory.OPTIONS]);return(0,u.userOptions)(d.options,o),h.config(n),e.tags(d,h),n.postFilters.add(f.default.cleanSubSup,-6),n.postFilters.add(f.default.setInherited,-5),n.postFilters.add(f.default.moveLimits,-4),n.postFilters.add(f.default.cleanStretchy,-3),n.postFilters.add(f.default.cleanAttributes,-2),n.postFilters.add(f.default.combineRelations,-1),n}return i(e,t),e.configure=function(t){var e=new g.ParserConfiguration(t,["tex"]);return e.init(),e},e.tags=function(t,e){y.TagsFactory.addTags(e.tags),y.TagsFactory.setDefault(t.options.tags),t.tags=y.TagsFactory.getDefault(),t.tags.configuration=t},e.prototype.setMmlFactory=function(e){t.prototype.setMmlFactory.call(this,e),this._parseOptions.nodeFactory.setMmlFactory(e)},Object.defineProperty(e.prototype,"parseOptions",{get:function(){return this._parseOptions},enumerable:!1,configurable:!0}),e.prototype.reset=function(t){void 0===t&&(t=0),this.parseOptions.tags.reset(t)},e.prototype.compile=function(t,e){this.parseOptions.clear(),this.executeFilters(this.preFilters,t,e,this.parseOptions);var r,n,i=t.display;this.latex=t.math,this.parseOptions.tags.startEquation(t);try{var o=new h.default(this.latex,{display:i,isInner:!1},this.parseOptions);r=o.mml(),n=o.stack.global}catch(t){if(!(t instanceof d.default))throw t;this.parseOptions.error=!0,r=this.options.formatError(this,t)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),(null==n?void 0:n.indentalign)&&p.default.setAttribute(r,"indentalign",n.indentalign),i&&p.default.setAttribute(r,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=r,this.executeFilters(this.postFilters,t,e,this.parseOptions),this.mathNode=this.parseOptions.root,this.mathNode},e.prototype.findMath=function(t){return this.findTeX.findMath(t)},e.prototype.formatError=function(t){var e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)},e.NAME="TeX",e.OPTIONS=o(o({},l.AbstractInputJax.OPTIONS),{FindTeX:null,packages:["base"],digits:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,maxBuffer:5120,formatError:function(t,e){return t.formatError(e)}}),e}(l.AbstractInputJax);e.TeX=v},552:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.ParserConfiguration=e.ConfigurationHandler=e.Configuration=void 0;var o,a=r(77),s=r(910),l=r(898),u=r(297),c=r(251),f=function(){function t(t,e,r,n,i,o,a,s,l,u,c,f,p){void 0===e&&(e={}),void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i={}),void 0===o&&(o={}),void 0===a&&(a={}),void 0===s&&(s=[]),void 0===l&&(l=[]),void 0===u&&(u=null),void 0===c&&(c=null),this.name=t,this.handler=e,this.fallback=r,this.items=n,this.tags=i,this.options=o,this.nodes=a,this.preprocessors=s,this.postprocessors=l,this.initMethod=u,this.configMethod=c,this.priority=f,this.parser=p,this.handler=Object.assign({character:[],delimiter:[],macro:[],environment:[]},e)}return t.makeProcessor=function(t,e){return Array.isArray(t)?t:[t,e]},t._create=function(e,r){var n=this;void 0===r&&(r={});var i=r.priority||u.PrioritizedList.DEFAULTPRIORITY,o=r.init?this.makeProcessor(r.init,i):null,a=r.config?this.makeProcessor(r.config,i):null,s=(r.preprocessors||[]).map((function(t){return n.makeProcessor(t,i)})),l=(r.postprocessors||[]).map((function(t){return n.makeProcessor(t,i)})),c=r.parser||"tex";return new t(e,r.handler||{},r.fallback||{},r.items||{},r.tags||{},r.options||{},r.nodes||{},s,l,o,a,i,c)},t.create=function(e,r){void 0===r&&(r={});var n=t._create(e,r);return o.set(e,n),n},t.local=function(e){return void 0===e&&(e={}),t._create("",e)},Object.defineProperty(t.prototype,"init",{get:function(){return this.initMethod?this.initMethod[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this.configMethod?this.configMethod[0]:null},enumerable:!1,configurable:!0}),t}();e.Configuration=f,function(t){var e=new Map;t.set=function(t,r){e.set(t,r)},t.get=function(t){return e.get(t)},t.keys=function(){return e.keys()}}(o=e.ConfigurationHandler||(e.ConfigurationHandler={}));var p=function(){function t(t,e){var r,i,o,a;void 0===e&&(e=["tex"]),this.initMethod=new l.FunctionList,this.configMethod=new l.FunctionList,this.configurations=new u.PrioritizedList,this.parsers=[],this.handlers=new s.SubHandlers,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;try{for(var c=n(t.slice().reverse()),f=c.next();!f.done;f=c.next()){var p=f.value;this.addPackage(p)}}catch(t){r={error:t}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}try{for(var h=n(this.configurations),d=h.next();!d.done;d=h.next()){var m=d.value,y=m.item,g=m.priority;this.append(y,g)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return t.prototype.init=function(){this.initMethod.execute(this)},t.prototype.config=function(t){var e,r;this.configMethod.execute(this,t);try{for(var i=n(this.configurations),o=i.next();!o.done;o=i.next()){var a=o.value;this.addFilters(t,a.item)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.prototype.addPackage=function(t){var e="string"==typeof t?t:t[0],r=this.getPackage(e);r&&this.configurations.add(r,"string"==typeof t?r.priority:t[1])},t.prototype.add=function(t,e,r){var i,o;void 0===r&&(r={});var s=this.getPackage(t);this.append(s),this.configurations.add(s,s.priority),this.init();var l=e.parseOptions;l.nodeFactory.setCreators(s.nodes);try{for(var u=n(Object.keys(s.items)),f=u.next();!f.done;f=u.next()){var p=f.value;l.itemFactory.setNodeClass(p,s.items[p])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}c.TagsFactory.addTags(s.tags),(0,a.defaultOptions)(l.options,s.options),(0,a.userOptions)(l.options,r),this.addFilters(e,s),s.config&&s.config(this,e)},t.prototype.getPackage=function(t){var e=o.get(t);if(e&&this.parsers.indexOf(e.parser)<0)throw Error("Package ".concat(t," doesn't target the proper parser"));return e},t.prototype.append=function(t,e){e=e||t.priority,t.initMethod&&this.initMethod.add(t.initMethod[0],t.initMethod[1]),t.configMethod&&this.configMethod.add(t.configMethod[0],t.configMethod[1]),this.handlers.add(t.handler,t.fallback,e),Object.assign(this.items,t.items),Object.assign(this.tags,t.tags),(0,a.defaultOptions)(this.options,t.options),Object.assign(this.nodes,t.nodes)},t.prototype.addFilters=function(t,e){var r,o,a,s;try{for(var l=n(e.preprocessors),u=l.next();!u.done;u=l.next()){var c=i(u.value,2),f=c[0],p=c[1];t.preFilters.add(f,p)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}try{for(var h=n(e.postprocessors),d=h.next();!d.done;d=h.next()){var m=i(d.value,2),y=m[0];p=m[1];t.postFilters.add(y,p)}}catch(t){a={error:t}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}},t}();e.ParserConfiguration=p},199:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(921),s=i(r(321));!function(t){t.cleanStretchy=function(t){var e,r,i=t.data;try{for(var o=n(i.getList("fixStretchy")),a=o.next();!a.done;a=o.next()){var l=a.value;if(s.default.getProperty(l,"fixStretchy")){var u=s.default.getForm(l);u&&u[3]&&u[3].stretchy&&s.default.setAttribute(l,"stretchy",!1);var c=l.parent;if(!(s.default.getTexClass(l)||u&&u[2])){var f=i.nodeFactory.create("node","TeXAtom",[l]);c.replaceChild(f,l),f.inheritAttributesFrom(l)}s.default.removeProperties(l,"fixStretchy")}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.cleanAttributes=function(t){t.data.root.walkTree((function(t,e){var r,i,o=t.attributes;if(o){var a=new Set((o.get("mjx-keep-attrs")||"").split(/ /));delete o.getAllAttributes()["mjx-keep-attrs"];try{for(var s=n(o.getExplicitNames()),l=s.next();!l.done;l=s.next()){var u=l.value;a.has(u)||o.attributes[u]!==t.attributes.getInherited(u)||delete o.attributes[u]}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}}),{})},t.combineRelations=function(t){var i,o,l,u,c=[];try{for(var f=n(t.data.getList("mo")),p=f.next();!p.done;p=f.next()){var h=p.value;if(!h.getProperty("relationsCombined")&&h.parent&&(!h.parent||s.default.isType(h.parent,"mrow"))&&s.default.getTexClass(h)===a.TEXCLASS.REL){for(var d=h.parent,m=void 0,y=d.childNodes,g=y.indexOf(h)+1,v=s.default.getProperty(h,"variantForm");g<y.length&&(m=y[g])&&s.default.isType(m,"mo")&&s.default.getTexClass(m)===a.TEXCLASS.REL;){if(v!==s.default.getProperty(m,"variantForm")||!r(h,m)){null==h.attributes.getExplicit("rspace")&&s.default.setAttribute(h,"rspace","0pt"),null==m.attributes.getExplicit("lspace")&&s.default.setAttribute(m,"lspace","0pt");break}s.default.appendChildren(h,s.default.getChildren(m)),e(["stretchy","rspace"],h,m);try{for(var b=(l=void 0,n(m.getPropertyNames())),x=b.next();!x.done;x=b.next()){var T=x.value;h.setProperty(T,m.getProperty(T))}}catch(t){l={error:t}}finally{try{x&&!x.done&&(u=b.return)&&u.call(b)}finally{if(l)throw l.error}}y.splice(g,1),c.push(m),m.parent=null,m.setProperty("relationsCombined",!0)}h.attributes.setInherited("form",h.getForms()[0])}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}t.data.removeFromList("mo",c)};var e=function(t,e,r){var n=e.attributes,i=r.attributes;t.forEach((function(t){var e=i.getExplicit(t);null!=e&&n.set(t,e)}))},r=function(t,e){var r,i,o=function(t,e){return t.getExplicitNames().filter((function(r){return r!==e&&("stretchy"!==r||t.getExplicit("stretchy"))}))},a=t.attributes,s=e.attributes,l=o(a,"lspace"),u=o(s,"rspace");if(l.length!==u.length)return!1;try{for(var c=n(l),f=c.next();!f.done;f=c.next()){var p=f.value;if(a.getExplicit(p)!==s.getExplicit(p))return!1}}catch(t){r={error:t}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return!0},i=function(t,e,r){var i,o,a=[];try{for(var l=n(t.getList("m"+e+r)),u=l.next();!u.done;u=l.next()){var c=u.value,f=c.childNodes;if(!f[c[e]]||!f[c[r]]){var p=c.parent,h=f[c[e]]?t.nodeFactory.create("node","m"+e,[f[c.base],f[c[e]]]):t.nodeFactory.create("node","m"+r,[f[c.base],f[c[r]]]);s.default.copyAttributes(c,h),p?p.replaceChild(h,c):t.root=h,a.push(c)}}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}t.removeFromList("m"+e+r,a)};t.cleanSubSup=function(t){var e=t.data;e.error||(i(e,"sub","sup"),i(e,"under","over"))};var o=function(t,e,r){var i,o,a=[];try{for(var l=n(t.getList(e)),u=l.next();!u.done;u=l.next()){var c=u.value;if(!c.attributes.get("displaystyle")){var f=c.childNodes[c.base],p=f.coreMO();if(f.getProperty("movablelimits")&&!p.attributes.getExplicit("movablelimits")){var h=t.nodeFactory.create("node",r,c.childNodes);s.default.copyAttributes(c,h),c.parent?c.parent.replaceChild(h,c):t.root=h,a.push(c)}}}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}t.removeFromList(e,a)};t.moveLimits=function(t){var e=t.data;o(e,"munderover","msubsup"),o(e,"munder","msub"),o(e,"mover","msup")},t.setInherited=function(t){t.data.root.setInheritedAttributes({},t.math.display,0,!1)}}(o||(o={})),e.default=o},982:function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.FindTeX=void 0;var a=r(649),s=r(720),l=r(769),u=function(t){function e(e){var r=t.call(this,e)||this;return r.getPatterns(),r}return i(e,t),e.prototype.getPatterns=function(){var t=this,e=this.options,r=[],n=[],i=[];this.end={},this.env=this.sub=0;var o=1;e.inlineMath.forEach((function(e){return t.addPattern(r,e,!1)})),e.displayMath.forEach((function(e){return t.addPattern(r,e,!0)})),r.length&&n.push(r.sort(s.sortLength).join("|")),e.processEnvironments&&(n.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=o,o++),e.processEscapes&&i.push("\\\\([\\\\$])"),e.processRefs&&i.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),i.length&&(n.push("("+i.join("|")+")"),this.sub=o),this.start=new RegExp(n.join("|"),"g"),this.hasPatterns=n.length>0},e.prototype.addPattern=function(t,e,r){var n=o(e,2),i=n[0],a=n[1];t.push((0,s.quotePattern)(i)),this.end[i]=[a,r,this.endPattern(a)]},e.prototype.endPattern=function(t,e){return new RegExp((e||(0,s.quotePattern)(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")},e.prototype.findEnd=function(t,e,r,n){for(var i,a=o(n,3),s=a[0],u=a[1],c=a[2],f=c.lastIndex=r.index+r[0].length,p=0;i=c.exec(t);){if((i[1]||i[0])===s&&0===p)return(0,l.protoItem)(r[0],t.substr(f,i.index-f),i[0],e,r.index,i.index+i[0].length,u);"{"===i[0]?p++:"}"===i[0]&&p&&p--}return null},e.prototype.findMathInString=function(t,e,r){var n,i;for(this.start.lastIndex=0;n=this.start.exec(r);){if(void 0!==n[this.env]&&this.env){var o="\\\\end\\s*(\\{"+(0,s.quotePattern)(n[this.env])+"\\})";(i=this.findEnd(r,e,n,["{"+n[this.env]+"}",!0,this.endPattern(null,o)]))&&(i.math=i.open+i.math+i.close,i.open=i.close="")}else if(void 0!==n[this.sub]&&this.sub){var a=n[this.sub];o=n.index+n[this.sub].length;i=2===a.length?(0,l.protoItem)("",a.substr(1),"",e,n.index,o):(0,l.protoItem)("",a,"",e,n.index,o,!1)}else i=this.findEnd(r,e,n,this.end[n[0]]);i&&(t.push(i),this.start.lastIndex=i.end.n)}},e.prototype.findMath=function(t){var e=[];if(this.hasPatterns)for(var r=0,n=t.length;r<n;r++)this.findMathInString(e,r,t[r]);return e},e.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0},e}(a.AbstractFindMath);e.FindTeX=u},910:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.SubHandlers=e.SubHandler=e.MapHandler=void 0;var o,a=r(297),s=r(898);!function(t){var e=new Map;t.register=function(t){e.set(t.name,t)},t.getMap=function(t){return e.get(t)}}(o=e.MapHandler||(e.MapHandler={}));var l=function(){function t(){this._configuration=new a.PrioritizedList,this._fallback=new s.FunctionList}return t.prototype.add=function(t,e,r){var i,s;void 0===r&&(r=a.PrioritizedList.DEFAULTPRIORITY);try{for(var l=n(t.slice().reverse()),u=l.next();!u.done;u=l.next()){var c=u.value,f=o.getMap(c);if(!f)return void this.warn("Configuration "+c+" not found! Omitted.");this._configuration.add(f,r)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}e&&this._fallback.add(e,r)},t.prototype.parse=function(t){var e,r;try{for(var o=n(this._configuration),a=o.next();!a.done;a=o.next()){var s=a.value.item.parse(t);if(s)return s}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}var l=i(t,2),u=l[0],c=l[1];Array.from(this._fallback)[0].item(u,c)},t.prototype.lookup=function(t){var e=this.applicable(t);return e?e.lookup(t):null},t.prototype.contains=function(t){return!!this.applicable(t)},t.prototype.toString=function(){var t,e,r=[];try{for(var i=n(this._configuration),o=i.next();!o.done;o=i.next()){var a=o.value.item;r.push(a.name)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r.join(", ")},t.prototype.applicable=function(t){var e,r;try{for(var i=n(this._configuration),o=i.next();!o.done;o=i.next()){var a=o.value.item;if(a.contains(t))return a}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return null},t.prototype.retrieve=function(t){var e,r;try{for(var i=n(this._configuration),o=i.next();!o.done;o=i.next()){var a=o.value.item;if(a.name===t)return a}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return null},t.prototype.warn=function(t){console.log("TexParser Warning: "+t)},t}();e.SubHandler=l;var u=function(){function t(){this.map=new Map}return t.prototype.add=function(t,e,r){var i,o;void 0===r&&(r=a.PrioritizedList.DEFAULTPRIORITY);try{for(var s=n(Object.keys(t)),u=s.next();!u.done;u=s.next()){var c=u.value,f=this.get(c);f||(f=new l,this.set(c,f)),f.add(t[c],e[c],r)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.set=function(t,e){this.map.set(t,e)},t.prototype.get=function(t){return this.map.get(t)},t.prototype.retrieve=function(t){var e,r;try{for(var i=n(this.map.values()),o=i.next();!o.done;o=i.next()){var a=o.value.retrieve(t);if(a)return a}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return null},t.prototype.keys=function(){return this.map.keys()},t}();e.SubHandlers=u},644:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NodeFactory=void 0;var a=o(r(321)),s=function(){function t(){this.mmlFactory=null,this.factory={node:t.createNode,token:t.createToken,text:t.createText,error:t.createError}}return t.createNode=function(t,e,r,n,i){void 0===r&&(r=[]),void 0===n&&(n={});var o=t.mmlFactory.create(e);return o.setChildren(r),i&&o.appendChild(i),a.default.setProperties(o,n),o},t.createToken=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n="");var i=t.create("text",n);return t.create("node",e,[],r,i)},t.createText=function(t,e){return null==e?null:t.mmlFactory.create("text").setText(e)},t.createError=function(t,e){var r=t.create("text",e),n=t.create("node","mtext",[],{},r);return t.create("node","merror",[n],{"data-mjx-error":e})},t.prototype.setMmlFactory=function(t){this.mmlFactory=t},t.prototype.set=function(t,e){this.factory[t]=e},t.prototype.setCreators=function(t){for(var e in t)this.set(e,t[e])},t.prototype.create=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=this.factory[t]||this.factory.node,a=o.apply(void 0,i([this,e[0]],n(e.slice(1)),!1));return"node"===t&&this.configuration.addNode(e[0],a),a},t.prototype.get=function(t){return this.factory[t]},t}();e.NodeFactory=s},321:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a,s=r(921),l=r(946);!function(t){var e=new Map([["autoOP",!0],["fnOP",!0],["movesupsub",!0],["subsupOK",!0],["texprimestyle",!0],["useHeight",!0],["variantForm",!0],["withDelims",!0],["mathaccent",!0],["open",!0],["close",!0]]);function r(t,r){var i,o;try{for(var a=n(Object.keys(r)),s=a.next();!s.done;s=a.next()){var l=s.value,u=r[l];"texClass"===l?(t.texClass=u,t.setProperty(l,u)):"movablelimits"===l?(t.setProperty("movablelimits",u),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",u)):"inferred"===l||(e.has(l)?t.setProperty(l,u):t.attributes.set(l,u))}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function a(t,e,r){t.childNodes[e]=r,r&&(r.parent=t)}function u(t,e){return t.isKind(e)}t.createEntity=function(t){return String.fromCodePoint(parseInt(t,16))},t.getChildren=function(t){return t.childNodes},t.getText=function(t){return t.getText()},t.appendChildren=function(t,e){var r,i;try{for(var o=n(e),a=o.next();!a.done;a=o.next()){var s=a.value;t.appendChild(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.setAttribute=function(t,e,r){t.attributes.set(e,r)},t.setProperty=function(t,e,r){t.setProperty(e,r)},t.setProperties=r,t.getProperty=function(t,e){return t.getProperty(e)},t.getAttribute=function(t,e){return t.attributes.get(e)},t.removeProperties=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t.removeProperty.apply(t,o([],i(e),!1))},t.getChildAt=function(t,e){return t.childNodes[e]},t.setChild=a,t.copyChildren=function(t,e){for(var r=t.childNodes,n=0;n<r.length;n++)a(e,n,r[n])},t.copyAttributes=function(t,e){e.attributes=t.attributes,r(e,t.getAllProperties())},t.isType=u,t.isEmbellished=function(t){return t.isEmbellished},t.getTexClass=function(t){return t.texClass},t.getCoreMO=function(t){return t.coreMO()},t.isNode=function(t){return t instanceof s.AbstractMmlNode||t instanceof s.AbstractMmlEmptyNode},t.isInferred=function(t){return t.isInferred},t.getForm=function(t){var e,r;if(!u(t,"mo"))return null;var i=t,o=i.getForms();try{for(var a=n(o),s=a.next();!s.done;s=a.next()){var c=s.value,f=l.MmlMo.OPTABLE[c][i.getText()];if(f)return f}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return null}}(a||(a={})),e.default=a},708:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a,s=o(r(321)),l=r(7),u=o(r(702));!function(t){t.variable=function(t,e){var r=u.default.getFontDef(t),n=t.stack.env;n.multiLetterIdentifiers&&""!==n.font&&(e=t.string.substr(t.i-1).match(n.multiLetterIdentifiers)[0],t.i+=e.length-1,r.mathvariant===l.TexConstant.Variant.NORMAL&&n.noAutoOP&&e.length>1&&(r.autoOP=!1));var i=t.create("token","mi",r,e);t.Push(i)},t.digit=function(t,e){var r,n=t.configuration.options.digits,i=t.string.slice(t.i-1).match(n),o=u.default.getFontDef(t);i?(r=t.create("token","mn",o,i[0].replace(/[{}]/g,"")),t.i+=i[0].length-1):r=t.create("token","mo",o,e),t.Push(r)},t.controlSequence=function(t,e){var r=t.GetCS();t.parse("macro",[t,r])},t.mathchar0mi=function(t,e){var r=e.attributes||{mathvariant:l.TexConstant.Variant.ITALIC},n=t.create("token","mi",r,e.char);t.Push(n)},t.mathchar0mo=function(t,e){var r=e.attributes||{};r.stretchy=!1;var n=t.create("token","mo",r,e.char);s.default.setProperty(n,"fixStretchy",!0),t.configuration.addNode("fixStretchy",n),t.Push(n)},t.mathchar7=function(t,e){var r=e.attributes||{mathvariant:l.TexConstant.Variant.NORMAL};t.stack.env.font&&(r.mathvariant=t.stack.env.font);var n=t.create("token","mi",r,e.char);t.Push(n)},t.delimiter=function(t,e){var r=e.attributes||{};r=Object.assign({fence:!1,stretchy:!1},r);var n=t.create("token","mo",r,e.char);t.Push(n)},t.environment=function(t,e,r,o){var a=o[0],s=t.itemFactory.create("begin").setProperties({name:e,end:a});s=r.apply(void 0,i([t,s],n(o.slice(1)),!1)),t.Push(s)}}(a||(a={})),e.default=a},394:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(r(239)),l=r(644),u=a(r(321)),c=r(77),f=function(){function t(t,e){void 0===e&&(e=[]),this.options={},this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new l.NodeFactory,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new s.default(t.items),this.itemFactory.configuration=this,c.defaultOptions.apply(void 0,i([this.options],n(e),!1)),(0,c.defaultOptions)(this.options,t.options)}return t.prototype.pushParser=function(t){this.parsers.unshift(t)},t.prototype.popParser=function(){this.parsers.shift()},Object.defineProperty(t.prototype,"parser",{get:function(){return this.parsers[0]},enumerable:!1,configurable:!0}),t.prototype.clear=function(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()},t.prototype.addNode=function(t,e){var r=this.nodeLists[t];if(r||(r=this.nodeLists[t]=[]),r.push(e),e.kind!==t){var n=u.default.getProperty(e,"in-lists")||"",i=(n?n.split(/,/):[]).concat(t).join(",");u.default.setProperty(e,"in-lists",i)}},t.prototype.getList=function(t){var e,r,n=this.nodeLists[t]||[],i=[];try{for(var a=o(n),s=a.next();!s.done;s=a.next()){var l=s.value;this.inTree(l)&&i.push(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return this.nodeLists[t]=i,i},t.prototype.removeFromList=function(t,e){var r,n,i=this.nodeLists[t]||[];try{for(var a=o(e),s=a.next();!s.done;s=a.next()){var l=s.value,u=i.indexOf(l);u>=0&&i.splice(u,1)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},t.prototype.inTree=function(t){for(;t&&t!==this.root;)t=t.parent;return!!t},t}();e.default=f},702:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a,s=r(921),l=o(r(321)),u=o(r(810)),c=o(r(466)),f=r(29);!function(t){var e=7.2,r={em:function(t){return t},ex:function(t){return.43*t},pt:function(t){return t/10},pc:function(t){return 1.2*t},px:function(t){return t*e/72},in:function(t){return t*e},cm:function(t){return t*e/2.54},mm:function(t){return t*e/25.4},mu:function(t){return t/18}},o="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",a="(pt|em|ex|mu|px|mm|cm|in|pc)",p=RegExp("^\\s*"+o+"\\s*"+a+"\\s*$"),h=RegExp("^\\s*"+o+"\\s*"+a+" ?");function d(t,e){void 0===e&&(e=!1);var i=t.match(e?h:p);return i?function(t){var e=n(t,3),i=e[0],o=e[1],a=e[2];if("mu"!==o)return[i,o,a];return[m(r[o](parseFloat(i||"1"))).slice(0,-2),"em",a]}([i[1].replace(/,/,"."),i[4],i[0].length]):[null,null,0]}function m(t){return Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function y(t,e,r){"{"!==e&&"}"!==e||(e="\\"+e);var n="{\\bigg"+r+" "+e+"}",i="{\\big"+r+" "+e+"}";return new u.default("\\mathchoice"+n+i+i+i,{},t).mml()}function g(t,e,r){e=e.replace(/^\s+/,f.entities.nbsp).replace(/\s+$/,f.entities.nbsp);var n=t.create("text",e);return t.create("node","mtext",[],r,n)}function v(t,e,r){if(r.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+r.length>t.configuration.options.maxBuffer)throw new c.default("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+r}function b(t,e){for(;e>0;)t=t.trim().slice(1,-1),e--;return t.trim()}function x(t,e){for(var r=t.length,n=0,i="",o=0,a=0,s=!0,l=!1;o<r;){var u=t[o++];switch(u){case" ":break;case"{":s?a++:(l=!1,a>n&&(a=n)),n++;break;case"}":n&&n--,(s||l)&&(a--,l=!0),s=!1;break;default:if(!n&&-1!==e.indexOf(u))return[l?"true":b(i,a),u,t.slice(o)];s=!1,l=!1}i+=u}if(n)throw new c.default("ExtraOpenMissingClose","Extra open brace or missing close brace");return[l?"true":b(i,a),"",t.slice(o)]}t.matchDimen=d,t.dimen2em=function(t){var e=n(d(t),2),i=e[0],o=e[1],a=parseFloat(i||"1"),s=r[o];return s?s(a):0},t.Em=m,t.cols=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.map((function(t){return m(t)})).join(" ")},t.fenced=function(t,e,r,n,i,o){void 0===i&&(i=""),void 0===o&&(o="");var a,c=t.nodeFactory,f=c.create("node","mrow",[],{open:e,close:n,texClass:s.TEXCLASS.INNER});if(i)a=new u.default("\\"+i+"l"+e,t.parser.stack.env,t).mml();else{var p=c.create("text",e);a=c.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:s.TEXCLASS.OPEN},p)}if(l.default.appendChildren(f,[a,r]),i)a=new u.default("\\"+i+"r"+n,t.parser.stack.env,t).mml();else{var h=c.create("text",n);a=c.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:s.TEXCLASS.CLOSE},h)}return o&&a.attributes.set("mathcolor",o),l.default.appendChildren(f,[a]),f},t.fixedFence=function(t,e,r,n){var i=t.nodeFactory.create("node","mrow",[],{open:e,close:n,texClass:s.TEXCLASS.ORD});return e&&l.default.appendChildren(i,[y(t,e,"l")]),l.default.isType(r,"mrow")?l.default.appendChildren(i,l.default.getChildren(r)):l.default.appendChildren(i,[r]),n&&l.default.appendChildren(i,[y(t,n,"r")]),i},t.mathPalette=y,t.fixInitialMO=function(t,e){for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i&&!l.default.isType(i,"mspace")&&(!l.default.isType(i,"TeXAtom")||l.default.getChildren(i)[0]&&l.default.getChildren(l.default.getChildren(i)[0]).length)){if(l.default.isEmbellished(i)||l.default.isType(i,"TeXAtom")&&l.default.getTexClass(i)===s.TEXCLASS.REL){var o=t.nodeFactory.create("node","mi");e.unshift(o)}break}}},t.internalMath=function(t,e,r,n){if(t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,r,n);var i,o,a=n||t.stack.env.font,s=a?{mathvariant:a}:{},l=[],f=0,p=0,h="",d=0;if(e.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)){for(;f<e.length;)if("$"===(i=e.charAt(f++)))"$"===h&&0===d?(o=t.create("node","TeXAtom",[new u.default(e.slice(p,f-1),{},t.configuration).mml()]),l.push(o),h="",p=f):""===h&&(p<f-1&&l.push(g(t,e.slice(p,f-1),s)),h="$",p=f);else if("{"===i&&""!==h)d++;else if("}"===i)if("}"===h&&0===d){var m=new u.default(e.slice(p,f),{},t.configuration).mml();o=t.create("node","TeXAtom",[m],s),l.push(o),h="",p=f}else""!==h&&d&&d--;else if("\\"===i)if(""===h&&e.substr(f).match(/^(eq)?ref\s*\{/)){var y=RegExp["$&"].length;p<f-1&&l.push(g(t,e.slice(p,f-1),s)),h="}",p=f-1,f+=y}else"("===(i=e.charAt(f++))&&""===h?(p<f-2&&l.push(g(t,e.slice(p,f-2),s)),h=")",p=f):")"===i&&")"===h&&0===d?(o=t.create("node","TeXAtom",[new u.default(e.slice(p,f-2),{},t.configuration).mml()]),l.push(o),h="",p=f):i.match(/[${}\\]/)&&""===h&&(f--,e=e.substr(0,f-1)+e.substr(f));if(""!==h)throw new c.default("MathNotTerminated","Math not terminated in text box")}return p<e.length&&l.push(g(t,e.slice(p),s)),null!=r?l=[t.create("node","mstyle",l,{displaystyle:!1,scriptlevel:r})]:l.length>1&&(l=[t.create("node","mrow",l)]),l},t.internalText=g,t.underOver=function(e,r,n,i,o){if(t.checkMovableLimits(r),l.default.isType(r,"munderover")&&l.default.isEmbellished(r)){l.default.setProperties(l.default.getCoreMO(r),{lspace:0,rspace:0});var a=e.create("node","mo",[],{rspace:0});r=e.create("node","mrow",[a,r])}var u=e.create("node","munderover",[r]);l.default.setChild(u,"over"===i?u.over:u.under,n);var c=u;return o&&(c=e.create("node","TeXAtom",[u],{texClass:s.TEXCLASS.OP,movesupsub:!0})),l.default.setProperty(c,"subsupOK",!0),c},t.checkMovableLimits=function(t){var e=l.default.isType(t,"mo")?l.default.getForm(t):null;(l.default.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&l.default.setProperties(t,{movablelimits:!1})},t.trimSpaces=function(t){if("string"!=typeof t)return t;var e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e},t.setArrayAlign=function(e,r){return"t"===(r=t.trimSpaces(r||""))?e.arraydef.align="baseline 1":"b"===r?e.arraydef.align="baseline -1":"c"===r?e.arraydef.align="axis":r&&(e.arraydef.align=r),e},t.substituteArgs=function(t,e,r){for(var n="",i="",o=0;o<r.length;){var a=r.charAt(o++);if("\\"===a)n+=a+r.charAt(o++);else if("#"===a)if("#"===(a=r.charAt(o++)))n+=a;else{if(!a.match(/[1-9]/)||parseInt(a,10)>e.length)throw new c.default("IllegalMacroParam","Illegal macro parameter reference");i=v(t,v(t,i,n),e[parseInt(a,10)-1]),n=""}else n+=a}return v(t,i,n)},t.addArgs=v,t.checkMaxMacros=function(t,e){if(void 0===e&&(e=!0),!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new c.default("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new c.default("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},t.checkEqnEnv=function(t){if(t.stack.global.eqnenv)throw new c.default("ErroneousNestingEq","Erroneous nesting of equation structures");t.stack.global.eqnenv=!0},t.copyNode=function(t,e){var r=t.copy(),n=e.configuration;return r.walkTree((function(t){var e,r;n.addNode(t.kind,t);var o=(t.getProperty("in-lists")||"").split(/,/);try{for(var a=i(o),s=a.next();!s.done;s=a.next()){var l=s.value;l&&n.addNode(l,t)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}})),r},t.MmlFilterAttribute=function(t,e,r){return r},t.getFontDef=function(t){var e=t.stack.env.font;return e?{mathvariant:e}:{}},t.keyvalOptions=function(t,e,r){var o,a;void 0===e&&(e=null),void 0===r&&(r=!1);var s=function(t){var e,r,i,o,a,s={},l=t;for(;l;)o=(e=n(x(l,["=",","]),3))[0],i=e[1],l=e[2],"="===i?(a=(r=n(x(l,[","]),3))[0],i=r[1],l=r[2],a="false"===a||"true"===a?JSON.parse(a):a,s[o]=a):o&&(s[o]=!0);return s}(t);if(e)try{for(var l=i(Object.keys(s)),u=l.next();!u.done;u=l.next()){var f=u.value;if(!e.hasOwnProperty(f)){if(r)throw new c.default("InvalidOption","Invalid option: %1",f);delete s[f]}}}catch(t){o={error:t}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return s}}(a||(a={})),e.default=a},874:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(r(321)),l=function(){function t(t,e,r){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:r},this.stack=[this._factory.create("start",this.global)],e&&(this.stack[0].env=e),this.env=this.stack[0].env}return Object.defineProperty(t.prototype,"env",{get:function(){return this._env},set:function(t){this._env=t},enumerable:!1,configurable:!0}),t.prototype.Push=function(){for(var t,e,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];try{for(var l=n(r),u=l.next();!u.done;u=l.next()){var c=u.value;if(c){var f=s.default.isNode(c)?this._factory.create("mml",c):c;f.global=this.global;var p=i(this.stack.length?this.Top().checkItem(f):[null,!0],2),h=p[0],d=p[1];d&&(h?(this.Pop(),this.Push.apply(this,o([],i(h),!1))):(this.stack.push(f),f.env?(f.copyEnv&&Object.assign(f.env,this.env),this.env=f.env):f.env=this.env))}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}},t.prototype.Pop=function(){var t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t},t.prototype.Top=function(t){return void 0===t&&(t=1),this.stack.length<t?null:this.stack[this.stack.length-t]},t.prototype.Prev=function(t){var e=this.Top();return t?e.First:e.Pop()},t.prototype.toString=function(){return"stack[\n "+this.stack.join("\n ")+"\n]"},t}();e.default=l},44:function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseItem=e.MmlStack=void 0;var u=l(r(466)),c=function(){function t(t){this._nodes=t}return Object.defineProperty(t.prototype,"nodes",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),t.prototype.Push=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];(t=this._nodes).push.apply(t,a([],o(e),!1))},t.prototype.Pop=function(){return this._nodes.pop()},Object.defineProperty(t.prototype,"First",{get:function(){return this._nodes[this.Size()-1]},set:function(t){this._nodes[this.Size()-1]=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Last",{get:function(){return this._nodes[0]},set:function(t){this._nodes[0]=t},enumerable:!1,configurable:!0}),t.prototype.Peek=function(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)},t.prototype.Size=function(){return this._nodes.length},t.prototype.Clear=function(){this._nodes=[]},t.prototype.toMml=function(t,e){return void 0===t&&(t=!0),1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First},t.prototype.create=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(e=this.factory.configuration.nodeFactory).create.apply(e,a([t],o(r),!1))},t}();e.MmlStack=c;var f=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=t.call(this,r)||this;return i.factory=e,i.global={},i._properties={},i.isOpen&&(i._env={}),i}return i(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"base"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"env",{get:function(){return this._env},set:function(t){this._env=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"copyEnv",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.getProperty=function(t){return this._properties[t]},e.prototype.setProperty=function(t,e){return this._properties[t]=e,this},Object.defineProperty(e.prototype,"isOpen",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFinal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.isKind=function(t){return t===this.kind},e.prototype.checkItem=function(t){if(t.isKind("over")&&this.isOpen&&(t.setProperty("num",this.toMml(!1)),this.Clear()),t.isKind("cell")&&this.isOpen){if(t.getProperty("linebreak"))return e.fail;throw new u.default("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){var r=o(this.getErrors(t.kind),2),n=r[0],i=r[1];throw new u.default(n,i,t.getName())}return t.isFinal?(this.Push(t.First),e.fail):e.success},e.prototype.clearEnv=function(){var t,e;try{for(var r=s(Object.keys(this.env)),n=r.next();!n.done;n=r.next()){var i=n.value;delete this.env[i]}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.setProperties=function(t){return Object.assign(this._properties,t),this},e.prototype.getName=function(){return this.getProperty("name")},e.prototype.toString=function(){return this.kind+"["+this.nodes.join("; ")+"]"},e.prototype.getErrors=function(t){return(this.constructor.errors||{})[t]||e.errors[t]},e.fail=[null,!1],e.success=[null,!0],e.errors={end:["MissingBeginExtraEnd","Missing \\begin{%1} or extra \\end{%1}"],close:["ExtraCloseMissingOpen","Extra close brace or missing open brace"],right:["MissingLeftExtraRight","Missing \\left or extra \\right"],middle:["ExtraMiddle","Extra \\middle"]},e}(c);e.BaseItem=f},239:function(t,e,r){var n,i,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a=r(44),s=r(752),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(a.BaseItem),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultKind="dummy",e.configuration=null,e}return o(e,t),e.DefaultStackItems=((i={})[l.prototype.kind]=l,i),e}(s.AbstractFactory);e.default=u},237:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Macro=e.Symbol=void 0;var r=function(){function t(t,e,r){this._symbol=t,this._char=e,this._attributes=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"char",{get:function(){return this._char},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),t}();e.Symbol=r;var n=function(){function t(t,e,r){void 0===r&&(r=[]),this._symbol=t,this._func=e,this._args=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"func",{get:function(){return this._func},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!1,configurable:!0}),t}();e.Macro=n},628:function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentMap=e.CommandMap=