(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AssistiveMmlHandler:()=>M,AssistiveMmlMathDocumentMixin:()=>h,AssistiveMmlMathItemMixin:()=>d,LimitedMmlVisitor:()=>c});const s=("undefined"!=typeof window?window:global).MathJax._.components.global,i=(s.GLOBAL,s.isObject,s.combineConfig,s.combineDefaults),o=s.combineWithMathJax,a=(s.MathJax,MathJax._.core.MathItem),n=(a.protoItem,a.AbstractMathItem,a.STATE),r=a.newState,l=MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,p=MathJax._.util.Options,m=(p.isObject,p.APPEND,p.REMOVE,p.OPTIONS,p.Expandable,p.expandable);p.makeArray,p.keys,p.copy,p.insert,p.defaultOptions,p.userOptions,p.selectOptions,p.selectOptionsFromKeys,p.separateOptions,p.lookup;class c extends l{getAttributes(t){return super.getAttributes(t).replace(/ ?id=".*?"/,"")}}function d(t){return class extends t{assistiveMml(t,e=!1){if(!(this.state()>=n.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){const e=t.adaptor,s=t.toMML(this.root).replace(/\n */g,"").replace(//g,""),i=e.firstChild(e.body(e.parse(s,"text/html"))),o=e.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[i]);e.setAttribute(e.firstChild(this.typesetRoot),"aria-hidden","true"),e.setStyle(this.typesetRoot,"position","relative"),e.append(this.typesetRoot,o)}this.state(n.ASSISTIVEMML)}}}}function h(t){var e;return(e=class extends t{constructor(...t){super(...t);const e=this.constructor,s=e.ProcessBits;s.has("assistive-mml")||s.allocate("assistive-mml"),this.visitor=new c(this.mmlFactory),this.options.MathItem=d(this.options.MathItem),"addStyles"in this&&this.addStyles(e.assistiveStyles)}toMML(t){return this.visitor.visitTree(t)}assistiveMml(){if(!this.processed.isSet("assistive-mml")){for(const t of this.math)t.assistiveMml(this);this.processed.set("assistive-mml")}return this}state(t,e=!1){return super.state(t,e),tM(t))))})();