vditor
Version:
♏ 易于使用的 Markdown 编辑器,为适配不同的应用场景而生
1 lines • 1.81 MB
JavaScript
!function(t){var e={};function Q(r){if(e[r])return e[r].exports;var T=e[r]={i:r,l:!1,exports:{}};return t[r].call(T.exports,T,T.exports,Q),T.l=!0,T.exports}Q.m=t,Q.c=e,Q.d=function(t,e,r){Q.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},Q.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},Q.t=function(t,e){if(1&e&&(t=Q(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(Q.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var T in t)Q.d(r,T,function(e){return t[e]}.bind(null,T));return r},Q.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return Q.d(e,"a",e),e},Q.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Q.p="",Q(Q.s=313)}([function(t,e,Q){"use strict";var r,T=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var Q in e)e.hasOwnProperty(Q)&&(t[Q]=e[Q])})(t,e)},function(t,e){function Q(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(Q.prototype=e.prototype,new Q)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,Q=1,r=arguments.length;Q<r;Q++)for(var T in e=arguments[Q])Object.prototype.hasOwnProperty.call(e,T)&&(t[T]=e[T]);return t}).apply(this,arguments)},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.XMLNode=e.TextNode=e.AbstractMmlEmptyNode=e.AbstractMmlBaseNode=e.AbstractMmlLayoutNode=e.AbstractMmlTokenNode=e.AbstractMmlNode=e.indentAttributes=e.TEXCLASSNAMES=e.TEXCLASS=void 0;var a=Q(24),s=Q(58);e.TEXCLASS={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},e.TEXCLASSNAMES=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"];var l=["","thinmathspace","mediummathspace","thickmathspace"],c=[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]];e.indentAttributes=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];var u=function(t){function Q(e,Q,r){void 0===Q&&(Q={}),void 0===r&&(r=[]);var T=t.call(this,e)||this;return T.texClass=null,T.prevClass=null,T.prevLevel=null,T.arity<0&&(T.childNodes=[e.create("inferredMrow")],T.childNodes[0].parent=T),T.setChildren(r),T.attributes=new a.Attributes(e.getNodeClass(T.kind).defaults,e.getNodeClass("math").defaults),T.attributes.setList(Q),T}return T(Q,t),Object.defineProperty(Q.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"arity",{get:function(){return 1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"Parent",{get:function(){for(var t=this.parent;t&&t.notParent;)t=t.Parent;return t},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),Q.prototype.setChildren=function(e){return this.arity<0?this.childNodes[0].setChildren(e):t.prototype.setChildren.call(this,e)},Q.prototype.appendChild=function(e){return this.arity<0?(this.childNodes[0].appendChild(e),e):t.prototype.appendChild.call(this,e)},Q.prototype.replaceChild=function(e,Q){return this.arity<0?(this.childNodes[0].replaceChild(e,Q),e):t.prototype.replaceChild.call(this,e,Q)},Q.prototype.core=function(){return this},Q.prototype.coreMO=function(){return this},Q.prototype.coreIndex=function(){return 0},Q.prototype.childPosition=function(){for(var t,e,Q=this,r=Q.parent;r&&r.notParent;)Q=r,r=r.parent;if(r){var T=0;try{for(var n=o(r.childNodes),i=n.next();!i.done;i=n.next()){if(i.value===Q)return T;T++}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}}return null},Q.prototype.setTeXclass=function(t){return this.getPrevClass(t),null!=this.texClass?this:t},Q.prototype.updateTeXclass=function(t){t&&(this.prevClass=t.prevClass,this.prevLevel=t.prevLevel,t.prevClass=t.prevLevel=null,this.texClass=t.texClass)},Q.prototype.getPrevClass=function(t){t&&(this.prevClass=t.texClass,this.prevLevel=t.attributes.get("scriptlevel"))},Q.prototype.texSpacing=function(){var t=null!=this.prevClass?this.prevClass:e.TEXCLASS.NONE,Q=this.texClass||e.TEXCLASS.ORD;if(t===e.TEXCLASS.NONE||Q===e.TEXCLASS.NONE)return"";t===e.TEXCLASS.VCENTER&&(t=e.TEXCLASS.ORD),Q===e.TEXCLASS.VCENTER&&(Q=e.TEXCLASS.ORD);var r=c[t][Q];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&r>=0?"":l[Math.abs(r)]},Q.prototype.hasSpacingAttributes=function(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()},Q.prototype.setInheritedAttributes=function(t,e,r,T){var n,a;void 0===t&&(t={}),void 0===e&&(e=!1),void 0===r&&(r=0),void 0===T&&(T=!1);var s=this.attributes.getAllDefaults();try{for(var l=o(Object.keys(t)),c=l.next();!c.done;c=l.next()){var u=c.value;if(s.hasOwnProperty(u)||Q.alwaysInherit.hasOwnProperty(u)){var p=i(t[u],2),h=p[0],f=p[1];((Q.noInherit[h]||{})[this.kind]||{})[u]||this.attributes.setInherited(u,f)}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",e),void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",r),T&&this.setProperty("texprimestyle",T);var d=this.arity;if(d>=0&&d!==1/0&&(1===d&&0===this.childNodes.length||1!==d&&this.childNodes.length!==d))if(d<this.childNodes.length)this.childNodes=this.childNodes.slice(0,d);else for(;this.childNodes.length<d;)this.appendChild(this.factory.create("mrow"));this.setChildInheritedAttributes(t,e,r,T)},Q.prototype.setChildInheritedAttributes=function(t,e,Q,r){var T,n;try{for(var i=o(this.childNodes),a=i.next();!a.done;a=i.next()){a.value.setInheritedAttributes(t,e,Q,r)}}catch(t){T={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(T)throw T.error}}},Q.prototype.addInheritedAttributes=function(t,e){var Q,r,T=n({},t);try{for(var i=o(Object.keys(e)),a=i.next();!a.done;a=i.next()){var s=a.value;"displaystyle"!==s&&"scriptlevel"!==s&&"style"!==s&&(T[s]=[this.kind,e[s]])}}catch(t){Q={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(Q)throw Q.error}}return T},Q.prototype.inheritAttributesFrom=function(t){var e=t.attributes,Q=e.get("displaystyle"),r=e.get("scriptlevel"),T=e.isSet("mathsize")?{mathsize:["math",e.get("mathsize")]}:{},n=t.getProperty("texprimestyle")||!1;this.setInheritedAttributes(T,Q,r,n)},Q.prototype.verifyTree=function(t){if(void 0===t&&(t=null),null!==t){this.verifyAttributes(t);var e=this.arity;t.checkArity&&e>=0&&e!==1/0&&(1===e&&0===this.childNodes.length||1!==e&&this.childNodes.length!==e)&&this.mError('Wrong number of children for "'+this.kind+'" node',t,!0),this.verifyChildren(t)}},Q.prototype.verifyAttributes=function(t){var e,Q;if(t.checkAttributes){var r=this.attributes,T=[];try{for(var n=o(r.getExplicitNames()),i=n.next();!i.done;i=n.next()){var a=i.value;"data-"===a.substr(0,5)||void 0!==r.getDefault(a)||a.match(/^(?:class|style|id|(?:xlink:)?href)$/)||T.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(Q=n.return)&&Q.call(n)}finally{if(e)throw e.error}}T.length&&this.mError("Unknown attributes for "+this.kind+" node: "+T.join(", "),t)}},Q.prototype.verifyChildren=function(t){var e,Q;try{for(var r=o(this.childNodes),T=r.next();!T.done;T=r.next()){T.value.verifyTree(t)}}catch(t){e={error:t}}finally{try{T&&!T.done&&(Q=r.return)&&Q.call(r)}finally{if(e)throw e.error}}},Q.prototype.mError=function(t,e,Q){if(void 0===Q&&(Q=!1),this.parent&&this.parent.isKind("merror"))return null;var r=this.factory.create("merror");if(e.fullErrors||Q){var T=this.factory.create("mtext"),n=this.factory.create("text");n.setText(e.fullErrors?t:this.kind),T.appendChild(n),r.appendChild(T),this.parent.replaceChild(r,this)}else this.parent.replaceChild(r,this),r.appendChild(this);return r},Q.defaults={mathbackground:a.INHERIT,mathcolor:a.INHERIT,mathsize:a.INHERIT,dir:a.INHERIT},Q.noInherit={mstyle:{mpadded:{width:!0,height:!0,depth:!0,lspace:!0,voffset:!0},mtable:{width:!0,height:!0,depth:!0,align:!0}},maligngroup:{mrow:{groupalign:!0},mtable:{groupalign:!0}}},Q.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0},Q.verifyDefaults={checkArity:!0,checkAttributes:!1,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0},Q}(s.AbstractNode);e.AbstractMmlNode=u;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return T(e,t),Object.defineProperty(e.prototype,"isToken",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.getText=function(){var t,e,Q="";try{for(var r=o(this.childNodes),T=r.next();!T.done;T=r.next()){var n=T.value;n instanceof L&&(Q+=n.getText())}}catch(e){t={error:e}}finally{try{T&&!T.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return Q},e.prototype.setChildInheritedAttributes=function(t,e,Q,r){var T,n;try{for(var i=o(this.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;s instanceof u&&s.setInheritedAttributes(t,e,Q,r)}}catch(t){T={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(T)throw T.error}}},e.prototype.walkTree=function(t,e){var Q,r;t(this,e);try{for(var T=o(this.childNodes),n=T.next();!n.done;n=T.next()){var i=n.value;i instanceof u&&i.walkTree(t,e)}}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return e},e.defaults=n(n({},u.defaults),{mathvariant:"normal",mathsize:a.INHERIT}),e}(u);e.AbstractMmlTokenNode=p;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return T(e,t),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return this.childNodes[0].isSpacelike},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),e.prototype.core=function(){return this.childNodes[0]},e.prototype.coreMO=function(){return this.childNodes[0].coreMO()},e.prototype.setTeXclass=function(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t},e.defaults=u.defaults,e}(u);e.AbstractMmlLayoutNode=h;var f=function(t){function Q(){return null!==t&&t.apply(this,arguments)||this}return T(Q,t),Object.defineProperty(Q.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),Q.prototype.core=function(){return this.childNodes[0]},Q.prototype.coreMO=function(){return this.childNodes[0].coreMO()},Q.prototype.setTeXclass=function(t){var Q,r;this.getPrevClass(t),this.texClass=e.TEXCLASS.ORD;var T=this.childNodes[0];T?this.isEmbellished||T.isKind("mi")?(t=T.setTeXclass(t),this.updateTeXclass(this.core())):(T.setTeXclass(null),t=this):t=this;try{for(var n=o(this.childNodes.slice(1)),i=n.next();!i.done;i=n.next()){var a=i.value;a&&a.setTeXclass(null)}}catch(t){Q={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(Q)throw Q.error}}return t},Q.defaults=u.defaults,Q}(u);e.AbstractMmlBaseNode=f;var d=function(t){function Q(){return null!==t&&t.apply(this,arguments)||this}return T(Q,t),Object.defineProperty(Q.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"Parent",{get:function(){return this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"texClass",{get:function(){return e.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"prevClass",{get:function(){return e.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"prevLevel",{get:function(){return 0},enumerable:!1,configurable:!0}),Q.prototype.hasSpacingAttributes=function(){return!1},Object.defineProperty(Q.prototype,"attributes",{get:function(){return null},enumerable:!1,configurable:!0}),Q.prototype.core=function(){return this},Q.prototype.coreMO=function(){return this},Q.prototype.coreIndex=function(){return 0},Q.prototype.childPosition=function(){return 0},Q.prototype.setTeXclass=function(t){return t},Q.prototype.texSpacing=function(){return""},Q.prototype.setInheritedAttributes=function(t,e,Q,r){},Q.prototype.inheritAttributesFrom=function(t){},Q.prototype.verifyTree=function(t){},Q.prototype.mError=function(t,e,Q){void 0===Q&&(Q=!1)},Q}(s.AbstractEmptyNode);e.AbstractMmlEmptyNode=d;var L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e}return T(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"text"},enumerable:!1,configurable:!0}),e.prototype.getText=function(){return this.text},e.prototype.setText=function(t){return this.text=t,this},e.prototype.toString=function(){return this.text},e}(d);e.TextNode=L;var H=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.xml=null,e.adaptor=null,e}return T(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"XML"},enumerable:!1,configurable:!0}),e.prototype.getXML=function(){return this.xml},e.prototype.setXML=function(t,e){return void 0===e&&(e=null),this.xml=t,this.adaptor=e,this},e.prototype.getSerializedXML=function(){return this.adaptor.outerHTML(this.xml)},e.prototype.toString=function(){return"XML data"},e}(d);e.XMLNode=H},function(t,e,Q){"use strict";(function(t){var Q=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function r(t){return"object"==typeof t&&null!==t}function T(t,e){var n,o;try{for(var i=Q(Object.keys(e)),a=i.next();!a.done;a=i.next()){var s=a.value;"__esModule"!==s&&(!r(t[s])||!r(e[s])||e[s]instanceof Promise?null!==e[s]&&void 0!==e[s]&&(t[s]=e[s]):T(t[s],e[s]))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return t}Object.defineProperty(e,"__esModule",{value:!0}),e.MathJax=e.combineWithMathJax=e.combineDefaults=e.combineConfig=e.isObject=void 0,e.isObject=r,e.combineConfig=T,e.combineDefaults=function t(e,T,n){var o,i;e[T]||(e[T]={}),e=e[T];try{for(var a=Q(Object.keys(n)),s=a.next();!s.done;s=a.next()){var l=s.value;r(e[l])&&r(n[l])?t(e,l,n[l]):null==e[l]&&null!=n[l]&&(e[l]=n[l])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return e},e.combineWithMathJax=function(t){return T(e.MathJax,t)},void 0===t.MathJax&&(t.MathJax={}),t.MathJax.version||(t.MathJax={version:"3.1.2",_:{},config:t.MathJax}),e.MathJax=t.MathJax}).call(this,Q(271))},function(t,e,Q){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.ParserConfiguration=e.ConfigurationHandler=e.Configuration=void 0;var n,o=Q(7),i=Q(33),a=Q(30),s=Q(21),l=Q(20),c=function(){function t(t,e,Q,r,T,n,o,i,a,s,l,c){void 0===e&&(e={}),void 0===Q&&(Q={}),void 0===r&&(r={}),void 0===T&&(T={}),void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===a&&(a=[]),void 0===s&&(s=null),void 0===l&&(l=null),this.name=t,this.handler=e,this.fallback=Q,this.items=r,this.tags=T,this.options=n,this.nodes=o,this.preprocessors=i,this.postprocessors=a,this.initMethod=s,this.configMethod=l,this.priority=c,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,Q){var r=this;void 0===Q&&(Q={});var T=Q.priority||s.PrioritizedList.DEFAULTPRIORITY,n=Q.init?this.makeProcessor(Q.init,T):null,o=Q.config?this.makeProcessor(Q.config,T):null,i=(Q.preprocessors||[]).map((function(t){return r.makeProcessor(t,T)})),a=(Q.postprocessors||[]).map((function(t){return r.makeProcessor(t,T)}));return new t(e,Q.handler||{},Q.fallback||{},Q.items||{},Q.tags||{},Q.options||{},Q.nodes||{},i,a,n,o,T)},t.create=function(e,Q){void 0===Q&&(Q={});var r=t._create(e,Q);return n.set(e,r),r},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=c,function(t){var e=new Map;t.set=function(t,Q){e.set(t,Q)},t.get=function(t){return e.get(t)},t.keys=function(){return e.keys()}}(n=e.ConfigurationHandler||(e.ConfigurationHandler={}));var u=function(){function t(t){var e,Q,T,n;this.initMethod=new a.FunctionList,this.configMethod=new a.FunctionList,this.configurations=new s.PrioritizedList,this.handlers=new i.SubHandlers,this.items={},this.tags={},this.options={},this.nodes={};try{for(var o=r(t.slice().reverse()),l=o.next();!l.done;l=o.next()){var c=l.value;this.addPackage(c)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(Q=o.return)&&Q.call(o)}finally{if(e)throw e.error}}try{for(var u=r(this.configurations),p=u.next();!p.done;p=u.next()){var h=p.value,f=h.item,d=h.priority;this.append(f,d)}}catch(t){T={error:t}}finally{try{p&&!p.done&&(n=u.return)&&n.call(u)}finally{if(T)throw T.error}}}return t.prototype.init=function(){this.initMethod.execute(this)},t.prototype.config=function(t){var e,Q;this.configMethod.execute(this,t);try{for(var T=r(this.configurations),n=T.next();!n.done;n=T.next()){var o=n.value;this.addFilters(t,o.item)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(Q=T.return)&&Q.call(T)}finally{if(e)throw e.error}}},t.prototype.addPackage=function(t){var e="string"==typeof t?t:t[0],Q=n.get(e);Q&&this.configurations.add(Q,"string"==typeof t?Q.priority:t[1])},t.prototype.add=function(t,e,Q){var T,n;void 0===Q&&(Q={}),this.append(t),this.configurations.add(t,t.priority),this.init();var i=e.parseOptions;i.nodeFactory.setCreators(t.nodes);try{for(var a=r(Object.keys(t.items)),s=a.next();!s.done;s=a.next()){var c=s.value;i.itemFactory.setNodeClass(c,t.items[c])}}catch(t){T={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(T)throw T.error}}l.TagsFactory.addTags(t.tags),o.defaultOptions(i.options,t.options),o.userOptions(i.options,Q),this.addFilters(e,t),t.config&&t.config(this,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),o.defaultOptions(this.options,t.options),Object.assign(this.nodes,t.nodes)},t.prototype.addFilters=function(t,e){var Q,n,o,i;try{for(var a=r(e.preprocessors),s=a.next();!s.done;s=a.next()){var l=T(s.value,2),c=l[0],u=l[1];t.preFilters.add(c,u)}}catch(t){Q={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(Q)throw Q.error}}try{for(var p=r(e.postprocessors),h=p.next();!h.done;h=p.next()){var f=T(h.value,2),d=f[0];u=f[1];t.postFilters.add(d,u)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},t}();e.ParserConfiguration=u},function(t,e,Q){"use strict";var r,T=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var Q in e)e.hasOwnProperty(Q)&&(t[Q]=e[Q])})(t,e)},function(t,e){function Q(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(Q.prototype=e.prototype,new Q)}),n=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentMap=e.CommandMap=e.MacroMap=e.DelimiterMap=e.CharacterMap=e.AbstractParseMap=e.RegExpMap=e.AbstractSymbolMap=void 0;var a=Q(26),s=Q(33),l=function(){function t(t,e){this._name=t,this._parser=e,s.MapHandler.register(this)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t.prototype.parserFor=function(t){return this.contains(t)?this.parser:null},t.prototype.parse=function(t){var e=n(t,2),Q=e[0],r=e[1],T=this.parserFor(r),o=this.lookup(r);return T&&o?T(Q,o)||!0:null},Object.defineProperty(t.prototype,"parser",{get:function(){return this._parser},set:function(t){this._parser=t},enumerable:!1,configurable:!0}),t}();e.AbstractSymbolMap=l;var c=function(t){function e(e,Q,r){var T=t.call(this,e,Q)||this;return T._regExp=r,T}return T(e,t),e.prototype.contains=function(t){return this._regExp.test(t)},e.prototype.lookup=function(t){return this.contains(t)?t:null},e}(l);e.RegExpMap=c;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.map=new Map,e}return T(e,t),e.prototype.lookup=function(t){return this.map.get(t)},e.prototype.contains=function(t){return this.map.has(t)},e.prototype.add=function(t,e){this.map.set(t,e)},e.prototype.remove=function(t){this.map.delete(t)},e}(l);e.AbstractParseMap=u;var p=function(t){function e(e,Q,r){var T,i,s=t.call(this,e,Q)||this;try{for(var l=o(Object.keys(r)),c=l.next();!c.done;c=l.next()){var u=c.value,p=r[u],h=n("string"==typeof p?[p,null]:p,2),f=h[0],d=h[1],L=new a.Symbol(u,f,d);s.add(u,L)}}catch(t){T={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(T)throw T.error}}return s}return T(e,t),e}(u);e.CharacterMap=p;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return T(e,t),e.prototype.parse=function(e){var Q=n(e,2),r=Q[0],T=Q[1];return t.prototype.parse.call(this,[r,"\\"+T])},e}(p);e.DelimiterMap=h;var f=function(t){function e(e,Q,r){var T,i,s=t.call(this,e,null)||this;try{for(var l=o(Object.keys(Q)),c=l.next();!c.done;c=l.next()){var u=c.value,p=Q[u],h=n("string"==typeof p?[p]:p),f=h[0],d=h.slice(1),L=new a.Macro(u,r[f],d);s.add(u,L)}}catch(t){T={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(T)throw T.error}}return s}return T(e,t),e.prototype.parserFor=function(t){var e=this.lookup(t);return e?e.func:null},e.prototype.parse=function(t){var e=n(t,2),Q=e[0],r=e[1],T=this.lookup(r),o=this.parserFor(r);return T&&o?o.apply(void 0,i([Q,T.symbol],T.args))||!0:null},e}(u);e.MacroMap=f;var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return T(e,t),e.prototype.parse=function(t){var e=n(t,2),Q=e[0],r=e[1],T=this.lookup(r),o=this.parserFor(r);if(!T||!o)return null;if(!o)return null;var a=Q.currentCS;Q.currentCS="\\"+r;var s=o.apply(void 0,i([Q,"\\"+T.symbol],T.args));return Q.currentCS=a,s||!0},e}(f);e.CommandMap=d;var L=function(t){function e(e,Q,r,T){var n=t.call(this,e,r,T)||this;return n.parser=Q,n}return T(e,t),e.prototype.parse=function(t){var e=n(t,2),Q=e[0],r=e[1],T=this.lookup(r),o=this.parserFor(r);return T&&o?(this.parser(Q,T.symbol,o,T.args),!0):null},e}(f);e.EnvironmentMap=L},function(t,e,Q){"use strict";var r,T=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var Q in e)e.hasOwnProperty(Q)&&(t[Q]=e[Q])})(t,e)},function(t,e){function Q(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(Q.prototype=e.prototype,new Q)}),n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.SVGWrapper=void 0;var i=Q(168),a=Q(50),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.element=null,e}return T(e,t),e.prototype.toSVG=function(t){this.addChildren(this.standardSVGnode(t))},e.prototype.addChildren=function(t){var e,Q,r=0;try{for(var T=n(this.childNodes),o=T.next();!o.done;o=T.next()){var i=o.value;i.toSVG(t),i.element&&i.place(r+i.bbox.L*i.bbox.rscale,0),r+=(i.bbox.L+i.bbox.w+i.bbox.R)*i.bbox.rscale}}catch(t){e={error:t}}finally{try{o&&!o.done&&(Q=T.return)&&Q.call(T)}finally{if(e)throw e.error}}},e.prototype.standardSVGnode=function(t){var e=this.createSVGnode(t);return this.handleStyles(),this.handleScale(),this.handleColor(),this.handleAttributes(),e},e.prototype.createSVGnode=function(t){var e=this.node.attributes.get("href");if(e){t=this.adaptor.append(t,this.svg("a",{href:e}));var Q=this.getBBox(),r=Q.h,T=Q.d,n=Q.w;this.adaptor.append(t,this.svg("rect",{"data-hitbox":!0,fill:"none",stroke:"none","pointer-events":"all",width:this.fixed(n),height:this.fixed(r+T),y:this.fixed(-T)}))}return this.element=this.adaptor.append(t,this.svg("g",{"data-mml-node":this.node.kind})),this.element},e.prototype.handleStyles=function(){if(this.styles){var t=this.styles.cssText;t&&this.adaptor.setAttribute(this.element,"style",t)}},e.prototype.handleScale=function(){if(1!==this.bbox.rscale){var t="scale("+this.fixed(this.bbox.rscale/1e3,3)+")";this.adaptor.setAttribute(this.element,"transform",t)}},e.prototype.handleColor=function(){var t=this.adaptor,e=this.node.attributes,Q=e.getExplicit("mathcolor"),r=e.getExplicit("color"),T=e.getExplicit("mathbackground"),n=e.getExplicit("background");if((Q||r)&&(t.setAttribute(this.element,"fill",Q||r),t.setAttribute(this.element,"stroke",Q||r)),T||n){var o=this.getBBox(),i=o.h,a=o.d,s=o.w,l=this.svg("rect",{fill:T||n,x:0,y:this.fixed(-a),width:this.fixed(s),height:this.fixed(i+a),"data-bgcolor":!0}),c=t.firstChild(this.element);c?t.insert(l,c):t.append(this.element,l)}},e.prototype.handleAttributes=function(){var t,Q,r,T,o=this.node.attributes,i=o.getAllDefaults(),a=e.skipAttributes;try{for(var s=n(o.getExplicitNames()),l=s.next();!l.done;l=s.next()){var c=l.value;!1!==a[c]&&(c in i||a[c]||this.adaptor.hasAttribute(this.element,c))||this.adaptor.setAttribute(this.element,c,o.getExplicit(c))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(Q=s.return)&&Q.call(s)}finally{if(t)throw t.error}}if(o.get("class")){var u=o.get("class").trim().split(/ +/);try{for(var p=n(u),h=p.next();!h.done;h=p.next()){var f=h.value;this.adaptor.addClass(this.element,f)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(T=p.return)&&T.call(p)}finally{if(r)throw r.error}}}},e.prototype.place=function(t,e,Q){if(void 0===Q&&(Q=null),t||e){Q||(Q=this.element);var r=this.adaptor.getAttribute(Q,"transform")||"";r="translate("+this.fixed(t)+", "+this.fixed(e)+")"+(r?" "+r:""),this.adaptor.setAttribute(Q,"transform",r)}},e.prototype.placeChar=function(t,e,Q,r,T){var i,a;void 0===T&&(T=null),null===T&&(T=this.variant);var s=t.toString(16).toUpperCase(),l=o(this.getVariantChar(T,t),4),c=l[2],u=l[3];if("p"in u){var p=u.p?"M"+u.p+"Z":"";this.place(e,Q,this.adaptor.append(r,this.charNode(T,s,p)))}else if("c"in u){var h=this.adaptor.append(r,this.svg("g",{"data-c":s}));this.place(e,Q,h),e=0;try{for(var f=n(this.unicodeChars(u.c,T)),d=f.next();!d.done;d=f.next()){var L=d.value;e+=this.placeChar(L,e,Q,h,T)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}else if(u.unknown){var H=String.fromCodePoint(t),m=this.adaptor.append(r,this.jax.unknownText(H,T));return this.place(e,Q,m),this.jax.measureTextNodeWithCache(m,H,T).w}return c},e.prototype.charNode=function(t,e,Q){return"none"!==this.jax.options.fontCache?this.useNode(t,e,Q):this.pathNode(e,Q)},e.prototype.pathNode=function(t,e){return this.svg("path",{"data-c":t,d:e})},e.prototype.useNode=function(t,e,Q){var r=this.svg("use"),T="#"+this.jax.fontCache.cachePath(t,e,Q);return this.adaptor.setAttribute(r,"href",T,a.XLINKNS),r},e.prototype.drawBBox=function(){var t=this.getBBox(),e=t.w,Q=t.h,r=t.d,T=this.svg("g",{style:{opacity:.25}},[this.svg("rect",{fill:"red",height:this.fixed(Q),width:this.fixed(e)}),this.svg("rect",{fill:"green",height:this.fixed(r),width:this.fixed(e),y:this.fixed(-r)})]),n=this.element||this.parent.element;this.adaptor.append(n,T)},e.prototype.html=function(t,e,Q){return void 0===e&&(e={}),void 0===Q&&(Q=[]),this.jax.html(t,e,Q)},e.prototype.svg=function(t,e,Q){return void 0===e&&(e={}),void 0===Q&&(Q=[]),this.jax.svg(t,e,Q)},e.prototype.text=function(t){return this.jax.text(t)},e.prototype.fixed=function(t,e){return void 0===e&&(e=1),this.jax.fixed(1e3*t,e)},e.kind="unknown",e}(i.CommonWrapper);e.SVGWrapper=s},function(t,e,Q){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,Q){for(var r=[],T=2;T<arguments.length;T++)r[T-2]=arguments[T];this.id=e,this.message=t.processString(Q,r)}return t.processString=function(e,Q){for(var r=e.split(t.pattern),T=1,n=r.length;T<n;T+=2){var o=r[T].charAt(0);if(o>="0"&&o<="9")r[T]=Q[parseInt(r[T],10)-1],"number"==typeof r[T]&&(r[T]=r[T].toString());else if("{"===o){if((o=r[T].substr(1))>="0"&&o<="9")r[T]=Q[parseInt(r[T].substr(1,r[T].length-2),10)-1],"number"==typeof r[T]&&(r[T]=r[T].toString());else r[T].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(r[T]="%"+r[T])}null==r[T]&&(r[T]="???")}return r.join("")},t.pattern=/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,t}();e.default=r},function(t,e,Q){"use strict";var r,T=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var Q in e)e.hasOwnProperty(Q)&&(t[Q]=e[Q])})(t,e)},function(t,e){function Q(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(Q.prototype=e.prototype,new Q)}),n=this&&this.__createBinding||(Object.create?function(t,e,Q,r){void 0===r&&(r=Q),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[Q]}})}:function(t,e,Q,r){void 0===r&&(r=Q),t[r]=e[Q]}),o=this&&this.__exportStar||function(t,e){for(var Q in t)"default"===Q||e.hasOwnProperty(Q)||n(e,t,Q)},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AddPaths=e.SVGFontData=void 0;var a=Q(28);o(Q(28),e);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return T(e,t),e.charOptions=function(e,Q){return t.charOptions.call(this,e,Q)},e}(a.FontData);e.SVGFontData=s,e.AddPaths=function(t,e,Q){var r,T,n,o;try{for(var a=i(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,u=parseInt(c);s.charOptions(t,u).p=e[u]}}catch(t){r={error:t}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(r)throw r.error}}try{for(var p=i(Object.keys(Q)),h=p.next();!h.done;h=p.next()){c=h.value,u=parseInt(c);s.charOptions(t,u).c=Q[u]}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}return t}},function(t,e,Q){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o},n=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(T(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0}),e.separateOptions=e.selectOptionsFromKeys=e.selectOptions=e.userOptions=e.defaultOptions=e.insert=e.copy=e.keys=e.makeArray=e.expandable=e.Expandable=e.REMOVE=e.APPEND=void 0;var o={}.constructor;function i(t){return"object"==typeof t&&null!==t&&(t.constructor===o||t.constructor===a)}e.APPEND="[+]",e.REMOVE="[-]";var a=function(){};function s(t){return Object.assign(Object.create(a.prototype),t)}function l(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function c(t){var e,Q,T={};try{for(var n=r(l(t)),o=n.next();!o.done;o=n.next()){var p=o.value,h=Object.getOwnPropertyDescriptor(t,p),f=h.value;Array.isArray(f)?h.value=u([],f,!1):i(f)&&(h.value=c(f)),h.enumerable&&(T[p]=h)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(Q=n.return)&&Q.call(n)}finally{if(e)throw e.error}}return Object.defineProperties(t.constructor===a?s({}):{},T)}function u(t,Q,T){var o,s;void 0===T&&(T=!0);var p=function(r){if(T&&void 0===t[r]&&t.constructor!==a)throw"symbol"==typeof r&&(r=r.toString()),new Error('Invalid option "'+r+'" (no default value).');var o=Q[r],s=t[r];if(!i(o)||null===s||"object"!=typeof s&&"function"!=typeof s)Array.isArray(o)?(t[r]=[],u(t[r],o,!1)):i(o)?t[r]=c(o):t[r]=o;else{var p=l(o);Array.isArray(s)&&(1===p.length&&(p[0]===e.APPEND||p[0]===e.REMOVE)&&Array.isArray(o[p[0]])||2===p.length&&p.sort().join(",")===e.APPEND+","+e.REMOVE&&Array.isArray(o[e.APPEND])&&Array.isArray(o[e.REMOVE]))?(o[e.REMOVE]&&(s=t[r]=s.filter((function(t){return o[e.REMOVE].indexOf(t)<0}))),o[e.APPEND]&&(t[r]=n(s,o[e.APPEND]))):u(s,o,T)}};try{for(var h=r(l(Q)),f=h.next();!f.done;f=h.next()){p(f.value)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}return t}function p(t){for(var e,Q,T=[],n=1;n<arguments.length;n++)T[n-1]=arguments[n];var o={};try{for(var i=r(T),a=i.next();!a.done;a=i.next()){var s=a.value;t.hasOwnProperty(s)&&(o[s]=t[s])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(Q=i.return)&&Q.call(i)}finally{if(e)throw e.error}}return o}e.Expandable=a,e.expandable=s,e.makeArray=function(t){return Array.isArray(t)?t:[t]},e.keys=l,e.copy=c,e.insert=u,e.defaultOptions=function(t){for(var e=[],Q=1;Q<arguments.length;Q++)e[Q-1]=arguments[Q];return e.forEach((function(e){return u(t,e,!1)})),t},e.userOptions=function(t){for(var e=[],Q=1;Q<arguments.length;Q++)e[Q-1]=arguments[Q];return e.forEach((function(e){return u(t,e,!0)})),t},e.selectOptions=p,e.selectOptionsFromKeys=function(t,e){return p.apply(void 0,n([t],Object.keys(e)))},e.separateOptions=function(t){for(var e,Q,T,n,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a=[];try{for(var s=r(o),l=s.next();!l.done;l=s.next()){var c=l.value,u={},p={};try{for(var h=(T=void 0,r(Object.keys(t||{}))),f=h.next();!f.done;f=h.next()){var d=f.value;(void 0===c[d]?p:u)[d]=t[d]}}catch(t){T={error:t}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(T)throw T.error}}a.push(u),t=p}}catch(t){e={error:t}}finally{try{l&&!l.done&&(Q=s.return)&&Q.call(s)}finally{if(e)throw e.error}}return a.unshift(t),a}},function(t,e,Q){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o},n=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(T(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var o,i=Q(0),a=Q(31);!function(t){var e=new Map([["autoOP",!0],["fnOP",!0],["movesupsub",!0],["subsupOK",!0],["texprimestyle",!0],["useHeight",!0],["variantForm",!0],["withDelims",!0],["open",!0],["close",!0]]);function Q(t,Q){var T,n;try{for(var o=r(Object.keys(Q)),i=o.next();!i.done;i=o.next()){var a=i.value,s=Q[a];"texClass"===a?(t.texClass=s,t.setProperty(a,s)):"movablelimits"===a?(t.setProperty("movablelimits",s),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",s)):"inferred"===a||(e.has(a)?t.setProperty(a,s):t.attributes.set(a,s))}}catch(t){T={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(T)throw T.error}}}function T(t,e,Q){t.childNodes[e]=Q,Q&&(Q.parent=t)}function o(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 Q,T;try{for(var n=r(e),o=n.next();!o.done;o=n.next()){var i=o.value;t.appendChild(i)}}catch(t){Q={error:t}}finally{try{o&&!o.done&&(T=n.return)&&T.call(n)}finally{if(Q)throw Q.error}}},t.setAttribute=function(t,e,Q){t.attributes.set(e,Q)},t.setProperty=function(t,e,Q){t.setProperty(e,Q)},t.setProperties=Q,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=[],Q=1;Q<arguments.length;Q++)e[Q-1]=arguments[Q];t.removeProperty.apply(t,n(e))},t.getChildAt=function(t,e){return t.childNodes[e]},t.setChild=T,t.copyChildren=function(t,e){for(var Q=t.childNodes,r=0;r<Q.length;r++)T(e,r,Q[r])},t.copyAttributes=function(t,e){e.attributes=t.attributes,Q(e,t.getAllProperties())},t.isType=o,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 i.AbstractMmlNode||t instanceof i.AbstractMmlEmptyNode},t.isInferred=function(t){return t.isInferred},t.getForm=function(t){var e,Q;if(!o(t,"mo"))return null;var T=t,n=T.getForms();try{for(var i=r(n),s=i.next();!s.done;s=i.next()){var l=s.value,c=a.MmlMo.OPTABLE[l][T.getText()];if(c)return c}}catch(t){e={error:t}}finally{try{s&&!s.done&&(Q=i.return)&&Q.call(i)}finally{if(e)throw e.error}}return null}}(o||(o={})),e.default=o},function(t,e,Q){"use strict";var r=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var r,T,n=Q.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(t){T={error:t}}finally{try{r&&!r.done&&(Q=n.return)&&Q.call(n)}finally{if(T)throw T.error}}return o},T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var n,o=Q(0),i=Q(8),a=Q(12),s=Q(5),l=Q(19);Q(272),function(t){var e={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 7.2*t/72},in:function(t){return 7.2*t},cm:function(t){return 7.2*t/2.54},mm:function(t){return 7.2*t/25.4},mu:function(t){return t/18}},Q="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",n="(pt|em|ex|mu|px|mm|cm|in|pc)",c=RegExp("^\\s*"+Q+"\\s*"+n+"\\s*$"),u=RegExp("^\\s*"+Q+"\\s*"+n+" ?");function p(t,Q){void 0===Q&&(Q=!1);var T=t.match(Q?u:c);return T?function(t){var Q=r(t,3),T=Q[0],n=Q[1],o=Q[2];if("mu"!==n)return[T,n,o];return[h(e[n](parseFloat(T||"1"))).slice(0,-2),"em",o]}([T[1].replace(/,/,"."),T[4],T[0].length]):[null,null,0]}function h(t){return Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function f(t,e,Q){"{"!==e&&"}"!==e||(e="\\"+e);var r="{\\bigg"+Q+" "+e+"}",T="{\\big"+Q+" "+e+"}";return new a.default("\\mathchoice"+r+T+T+T,{},t).mml()}function d(t,e,Q){e=e.replace(/^\s+/,l.entities.nbsp).replace(/\s+$/,l.entities.nbsp);var r=t.create("text",e);return t.create("node","mtext",[],Q,r)}function L(t,e,Q){if(Q.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+Q.length>t.configuration.options.maxBuffer)throw new s.default("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+Q}function H(t,e){for(;e>0;)t=t.trim().slice(1,-1),e--;return t.trim()}function m(t,e){for(var Q=t.length,r=0,T="",n=0,o=0,i=!0,a=!1;n<Q;){var l=t[n++];switch(l){case" ":break;case"{":i?o++:(a=!1,o>r&&(o=r)),r++;break;case"}":r&&r--,(i||a)&&(o--,a=!0),i=!1;break;default:if(!r&&-1!==e.indexOf(l))return[a?"true":H(T,o),l,t.slice(n)];i=!1,a=!1}T+=l}if(r)throw new s.default("ExtraOpenMissingClose","Extra open brace or missing close brace");return[a?"true":H(T,o),"",t.slice(n)]}t.matchDimen=p,t.dimen2em=function(t){var Q=r(p(t),2),T=Q[0],n=Q[1],o=parseFloat(T||"1"),i=e[n];return i?i(o):0},t.Em=h,t.fenced=function(t,e,Q,r,T){void 0===T&&(T="");var n,s=t.nodeFactory,l=s.create("node","mrow",[],{open:e,close:r,texClass:o.TEXCLASS.INNER});if(T)n=new a.default("\\"+T+"l"+e,t.parser.stack.env,t).mml();else{var c=s.create("text",e);n=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:o.TEXCLASS.OPEN},c)}if(i.default.appendChildren(l,[n]),i.default.isType(Q,"mrow")&&i.default.isInferred(Q)?i.default.appendChildren(l,i.default.getChildren(Q)):i.default.appendChildren(l,[Q]),T)n=new a.default("\\"+T+"r"+r,t.parser.stack.env,t).mml();else{var u=s.create("text",r);n=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:o.TEXCLASS.CLOSE},u)}return i.default.appendChildren(l,[n]),l},t.fixedFence=function(t,e,Q,r){var T=t.nodeFactory.create("node","mrow",[],{open:e,close:r,texClass:o.TEXCLASS.ORD});return e&&i.default.appendChildren(T,[f(t,e,"l")]),i.default.isType(Q,"mrow")?i.default.appendChildren(T,i.default.getChildren(Q)):i.default.appendChildren(T,[Q]),r&&i.default.appendChildren(T,[f(t,r,"r")]),T},t.mathPalette=f,t.fixInitialMO=function(t,e){for(var Q=0,r=e.length;Q<r;Q++){var T=e[Q];if(T&&!i.default.isType(T,"mspace")&&(!i.default.isType(T,"TeXAtom")||i.default.getChildren(T)[0]&&i.default.getChildren(i.default.getChildren(T)[0]).length)){if(i.default.isEmbellished(T)||i.default.isType(T,"TeXAtom")&&i.default.getTexClass(T)===o.TEXCLASS.REL){var n=t.nodeFactory.create("node","mi");e.unshift(n)}break}}},t.internalMath=function(t,e,Q,r){if(t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,Q,r);var T,n,o=r||t.stack.env.font,i=o?{mathvariant:o}:{},l=[],c=0,u=0,p="",h=0;if(e.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)){for(;c<e.length;)if("$"===(T=e.charAt(c++)))"$"===p&&0===h?(n=t.create("node","TeXAtom",[new a.default(e.slice(u,c-1),{},t.configuration).mml()]),l.push(n),p="",u=c):""===p&&(u<c-1&&l.push(d(t,e.slice(u,c-1),i)),p="$",u=c);else if("{"===T&&""!==p)h++;else if("}"===T)if("}"===p&&0===h){var f=new a.default(e.slice(u,c),{},t.configuration).mml();n=t.create("node","TeXAtom",[f],i),l.push(n),p="",u=c}else""!==p&&h&&h--;else if("\\"===T)if(""===p&&e.substr(c).match(/^(eq)?ref\s*\{/)){var L=RegExp["$&"].length;u<c-1&&l.push(d(t,e.slice(u,c-1),i)),p="}",u=c-1,c+=L}else"("===(T=e.charAt(c++))&&""===p?(u<c-2&&l.push(d(t,e.slice(u,c-2),i)),p=")",u=c):")"===T&&")"===p&&0===h?(n=t.create("node","TeXAtom",[new a.default(e.slice(u,c-2),{},t.configuration).mml()]),l.push(n),p="",u=c):T.match(/[${}\\]/)&&""===p&&(c--,e=e.substr(0,c-1)+e.substr(c));if(""!==p)throw new s.default("MathNotTerminated","Math not terminated in text box")}return u<e.length&&l.push(d(t,e.slice(u),i)),null!=Q?l=[t.create("node","mstyle",l,{displaystyle:!1,scriptlevel:Q})]:l.length>1&&(l=[t.create("node","mrow",l)]),l},t.internalText=d,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,Q){return"t"===(Q=t.trimSpaces(Q||""))?e.arraydef.align="baseline 1":"b"===Q?e.arraydef.align="baseline -1":"c"===Q?e.arraydef.align="center":Q&&(e.arraydef.align=Q),e},t.substituteArgs=function(t,e,Q){for(var r="",T="",n=0;n<Q.length;){var o=Q.charAt(n++);if("\\"===o)r+=o+Q.charAt(n++);else if("#"===o)if("#"===(o=Q.charAt(n++)))r+=o;else{if(!o.match(/[1-9]/)||parseInt(o,10)>e.length)throw new s.default("IllegalMacroParam","Illegal macro parameter reference");T=L(t,L(t,T,r),e[parseInt(o,10)-1]),r=""}else r+=o}return L(t,T,r)},t.addArgs=L,t.checkEqnEnv=function(t){if(t.stack.global.eqnenv)throw new s.default("ErroneousNestingEq","Erroneous nesting of equation structures");t.stack.global.eqnenv=!0},t.MmlFilterAttribute=function(t,e,Q){return Q},t.getFontDef=function(t){var e=t.stack.env.font;return e?{mathvariant:e}:{}},t.keyvalOptions=function(t,e,Q){var n,o;void 0===e&&(e=null),void 0===Q&&(Q=!1);var i=function(t){var e,Q,T,n,o,i={},a=t;for(;a;)n=(e=r(m(a,["=",","]),3))[0],T=e[1],a=e[2],"="===T?(o=(Q=r(m(a,[","]),3))[0],T=Q[1],a=Q[2],o="false"===o||"true"===o?JSON.parse(o):o,i[n]=o):n&&(i[n]=!0);return i}(t);if(e)try{for(var a=T(Object.keys(i)),l=a.next();!l.done;l=a.next()){var c=l.value;if(!e.hasOwnProperty(c)){if(Q)throw new s.default("InvalidOption","Invalid optional argument: %1",c);delete i[c]}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}(n||(n={})),e.default=n},function(t,e,Q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HtmlAttrs=e.HtmlClasses=void 0;function r(t){return"CtxtMenu_"+t}function T(t){return r(t)}function n(t){return r(t)}e.HtmlClasses={ATTACHED:T("Attached"),CONTEXTMENU:T("ContextMenu"),MENU:T("Menu"),MENUARROW:T("MenuArrow"),MENUACTIVE:T("MenuActive"),MENUCHECK:T("MenuCheck"),MENUCLOSE:T("MenuClose"),MENUCOMBOBOX:T("MenuComboBox"),MENUDISABLED:T("MenuDisabled"),MENUFRAME:T("MenuFrame"),MENUITEM:T("MenuItem"),MENULABEL:T("MenuLabel"),MENURADIOCHECK:T("MenuRadioCheck"),MENUINPUTBOX:T("MenuInputBox"),MENURULE:T("MenuRule"),MENUSLIDER:T("MenuSlider"),MOUSEPOST:T("MousePost"),RTL:T("RTL"),INFO:T("Info"),INFOCLOSE:T("InfoClose"),INFOCONTENT:T("InfoContent"),INFOSIGNATURE:T("InfoSignature"),INFOTITLE:T("InfoTitle"),SLIDERVALUE:T("SliderValue"),SLIDERBAR:T("SliderBar"),SELECTION:T("Selection"),SELECTIONBOX:T("SelectionBox"),SELECTIONMENU:T("SelectionMenu"),SELECTIONDIVIDER:T("SelectionDivider"),SELECTIONITEM:T("SelectionItem")},e.HtmlAttrs={COUNTER:n("Counter"),KEYDOWNFUNC:n("keydownFunc"),CONTEXTMENUFUNC:n("contextmenuFunc"),OLDTAB:n("Oldtabindex"),TOUCHFUNC:n("TouchFunc")}},function(t,e,Q){"use strict";(function(t){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],r=0;if(Q)retu