UNPKG

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 426 kB
(function(){"use strict";var __webpack_modules__={706:function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=new Map;t.default=n},8905:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sreReady=t.Sre=void 0;var l,u=i(n(9037)),d=i(n(907)),p=i(n(7317)),h=i(n(4998)),f=c(n(4886)),m=n(3955),g=i(n(9009)),b=n(4513),y=c(n(706));!function(e){e.locales=b.Variables.LOCALES,e.sreReady=u.engineReady,e.setupEngine=u.setupEngine,e.engineSetup=u.engineSetup,e.toEnriched=u.toEnriched,e.toSpeech=u.toSpeech,e.clearspeakPreferences=m.ClearspeakPreferences,e.getHighlighter=g.highlighter,e.getSpeechGenerator=p.generator,e.getWalker=d.walker,e.clearspeakStyle=function(){return h.DOMAIN_TO_STYLES.clearspeak},e.preloadLocales=function(e){return s(this,void 0,void 0,(function(){var t;return a(this,(function(n){return[2,(t=y.default.get(e))?new Promise((function(e,n){return e(JSON.stringify(t))})):u.localeLoader()(e)]}))}))}}(l=t.Sre||(t.Sre={})),t.sreReady=l.sreReady,f.default.getInstance().delay=!0,t.default=l},7306:function(e,t){t.q=void 0,t.q="3.2.2"},3021:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.MJContextMenu=void 0;var a=n(9964),c=n(2745),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mathItem=null,t.annotation="",t.annotationTypes={},t}return o(t,e),t.prototype.post=function(t,n){if(this.mathItem){if(void 0!==n){var r=this.mathItem.inputJax.name,o=this.findID("Show","Original");o.content="MathML"===r?"Original MathML":r+" Commands",this.findID("Copy","Original").content=o.content;var i=this.findID("Settings","semantics");"MathML"===r?i.disable():i.enable(),this.getAnnotationMenu(),this.dynamicSubmenus()}e.prototype.post.call(this,t,n)}},t.prototype.unpost=function(){e.prototype.unpost.call(this),this.mathItem=null},t.prototype.findID=function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=this,s=null;try{for(var a=i(n),l=a.next();!l.done;l=a.next()){var u=l.value;o?(s=o.find(u),o=s instanceof c.Submenu?s.submenu:null):s=null}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return s},t.prototype.getAnnotationMenu=function(){var e=this,t=this.getAnnotations(this.getSemanticNode());this.createAnnotationMenu("Show",t,(function(){return e.showAnnotation.post()})),this.createAnnotationMenu("Copy",t,(function(){return e.copyAnnotation()}))},t.prototype.getSemanticNode=function(){for(var e=this.mathItem.root;e&&!e.isKind("semantics");){if(e.isToken||1!==e.childNodes.length)return null;e=e.childNodes[0]}return e},t.prototype.getAnnotations=function(e){var t,n,r=[];if(!e)return r;try{for(var o=i(e.childNodes),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.isKind("annotation")){var c=this.annotationMatch(a);if(c){var l=a.childNodes.reduce((function(e,t){return e+t.toString()}),"");r.push([c,l])}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},t.prototype.annotationMatch=function(e){var t,n,r=e.attributes.get("encoding");try{for(var o=i(Object.keys(this.annotationTypes)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this.annotationTypes[a].indexOf(r)>=0)return a}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return null},t.prototype.createAnnotationMenu=function(e,t,n){var r=this,o=this.findID(e,"Annotation");o.submenu=this.factory.get("subMenu")(this.factory,{items:t.map((function(e){var t=s(e,2),o=t[0],i=t[1];return{type:"command",id:o,content:o,action:function(){r.annotation=i,n()}}})),id:"annotations"},o),t.length?o.enable():o.disable()},t.prototype.dynamicSubmenus=function(){var e,n;try{for(var r=i(t.DynamicSubmenus),o=r.next();!o.done;o=r.next()){var a=s(o.value,2),c=a[0],l=a[1],u=this.find(c);if(u){var d=l(this,u);u.submenu=d,d.items.length?u.enable():u.disable()}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.DynamicSubmenus=new Map,t}(a.ContextMenu);t.MJContextMenu=l},1062:function(e,t,n){var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;var s=n(3184),a=n(4769),c=n(8723),l=n(9077),u=n(3021),d=n(9232),p=n(7309),h=n(6932),f=n(7258),m=n(1156),g=n(6837),b=i(n(8905)),y=c.MathJax,S="undefined"!=typeof window&&window.navigator&&"Mac"===window.navigator.platform.substr(0,3),E=function(){function e(e,t){void 0===t&&(t={});var n=this;this.settings=null,this.defaultSettings=null,this.menu=null,this.MmlVisitor=new d.MmlVisitor,this.jax={CHTML:null,SVG:null},this.rerenderStart=a.STATE.LAST,this.about=new h.Info('<b style="font-size:120%;">MathJax</b> v'+s.mathjax.version,(function(){var e=[];return e.push("Input Jax: "+n.document.inputJax.map((function(e){return e.name})).join(", ")),e.push("Output Jax: "+n.document.outputJax.name),e.push("Document Type: "+n.document.kind),e.join("<br/>")}),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.help=new h.Info("<b>MathJax Help</b>",(function(){return["<p><b>MathJax</b> is a JavaScript library that allows page"," authors to include mathematics within their web pages."," As a reader, you don't need to do anything to make that happen.</p>","<p><b>Browsers</b>: MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.</p>","<p><b>Math Menu</b>: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.</p>",'<div style="margin-left: 1em;">',"<p><b>Show Math As:</b> These options allow you to view the formula's"," source markup (as MathML or in its original format).</p>","<p><b>Copy to Clipboard:</b> These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).</p>","<p><b>Math Settings:</b> These give you control over features of MathJax,"," such the size of the mathematics, and the mechanism used"," to display equations.</p>","<p><b>Accessibility</b>: MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on the explorer to enable generation of speech strings"," and the ability to investigate expressions interactively.</p>","<p><b>Language</b>: This menu lets you select the language used by MathJax"," for its menus and warning messages. (Not yet implemented in version 3.)</p>","</div>","<p><b>Math Zoom</b>: If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scall all the math on the page to make it larger."," Turn these features on in the <b>Math Settings</b> menu.</p>","<p><b>Preferences</b>: MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser. These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.</p>"].join("\n")}),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.mathmlCode=new p.SelectableInfo("MathJax MathML Expression",(function(){if(!n.menu.mathItem)return"";var e=n.toMML(n.menu.mathItem);return"<pre>"+n.formatSource(e)+"</pre>"}),""),this.originalText=new p.SelectableInfo("MathJax Original Source",(function(){if(!n.menu.mathItem)return"";var e=n.menu.mathItem.math;return'<pre style="font-size:125%; margin:0">'+n.formatSource(e)+"</pre>"}),""),this.annotationText=new p.SelectableInfo("MathJax Annotation Text",(function(){if(!n.menu.mathItem)return"";var e=n.menu.annotation;return'<pre style="font-size:125%; margin:0">'+n.formatSource(e)+"</pre>"}),""),this.zoomBox=new h.Info("MathJax Zoomed Expression",(function(){if(!n.menu.mathItem)return"";var e=n.menu.mathItem.typesetRoot.cloneNode(!0);return e.style.margin="0",'<div style="font-size: '+1.25*parseFloat(n.settings.zscale)+'%">'+e.outerHTML+"</div>"}),""),this.document=e,this.options=(0,l.userOptions)((0,l.defaultOptions)({},this.constructor.OPTIONS),t),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}return Object.defineProperty(e.prototype,"isLoading",{get:function(){return e.loading>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loadingPromise",{get:function(){return this.isLoading?(e._loadingPromise||(e._loadingPromise=new Promise((function(t,n){e._loadingOK=t,e._loadingFailed=n}))),e._loadingPromise):Promise.resolve()},enumerable:!1,configurable:!0}),e.prototype.initSettings=function(){this.settings=this.options.settings,this.jax=this.options.jax;var e=this.document.outputJax;this.jax[e.name]=e,this.settings.renderer=e.name,y._.a11y&&y._.a11y.explorer&&Object.assign(this.settings,this.document.options.a11y),this.settings.scale=e.options.scale,this.defaultSettings=Object.assign({},this.settings)},e.prototype.initMenu=function(){var e=this,t=new f.Parser([["contextMenu",u.MJContextMenu.fromJson.bind(u.MJContextMenu)]]);this.menu=t.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",(function(t){return e.setRenderer(t)})),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",(function(t){return e.setScale(t)})),this.variable("explorer",(function(t){return e.setExplorer(t)})),this.a11yVar("highlight"),this.a11yVar("backgroundColor"),this.a11yVar("backgroundOpacity"),this.a11yVar("foregroundColor"),this.a11yVar("foregroundOpacity"),this.a11yVar("speech"),this.a11yVar("subtitles"),this.a11yVar("braille"),this.a11yVar("viewBraille"),this.a11yVar("locale",(function(e){return b.default.setupEngine({locale:e})})),this.a11yVar("speechRules",(function(t){var n=r(t.split("-"),2),o=n[0],i=n[1];e.document.options.sre.domain=o,e.document.options.sre.style=i})),this.a11yVar("magnification"),this.a11yVar("magnify"),this.a11yVar("treeColoring"),this.a11yVar("infoType"),this.a11yVar("infoRole"),this.a11yVar("infoPrefix"),this.variable("autocollapse"),this.variable("collapsible",(function(t){return e.setCollapsible(t)})),this.variable("inTabOrder",(function(t){return e.setTabOrder(t)})),this.variable("assistiveMml",(function(t){return e.setAssistiveMml(t)}))],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",(function(){return e.mathmlCode.post()})),this.command("Original","Original Form",(function(){return e.originalText.post()})),this.submenu("Annotation","Annotation")]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",(function(){return e.copyMathML()})),this.command("Original","Original Form",(function(){return e.copyOriginal()})),this.submenu("Annotation","Annotation")]),this.rule(),this.submenu("Settings","Math Settings",[this.submenu("Renderer","Math Renderer",this.radioGroup("renderer",[["CHTML"],["SVG"]])),this.rule(),this.submenu("ZoomTrigger","Zoom Trigger",[this.command("ZoomNow","Zoom Once Now",(function(){return e.zoom(null,"",e.menu.mathItem)})),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(S?"Option":"Alt",S?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!S}),this.checkbox("Control","Control","ctrl",{hiddne:S}),this.checkbox("Shift","Shift","shift")]),this.submenu("ZoomFactor","Zoom Factor",this.radioGroup("zscale",[["150%"],["175%"],["200%"],["250%"],["300%"],["400%"]])),this.rule(),this.command("Scale","Scale All Math...",(function(){return e.scaleAllMath()})),this.rule(),this.checkbox("texHints","Add TeX hints to MathML","texHints"),this.checkbox("semantics","Add original as annotation","semantics"),this.rule(),this.command("Reset","Reset to defaults",(function(){return e.resetDefaults()}))]),this.submenu("Accessibility","Accessibility",[this.checkbox("Activate","Activate","explorer"),this.submenu("Speech","Speech",[this.checkbox("Speech","Speech Output","speech"),this.checkbox("Subtitles","Speech Subtitles","subtitles"),this.checkbox("Braille","Braille Output","braille"),this.checkbox("View Braille","Braille Subtitles","viewBraille"),this.rule(),this.submenu("A11yLanguage","Language"),this.rule(),this.submenu("Mathspeak","Mathspeak Rules",this.radioGroup("speechRules",[["mathspeak-default","Verbose"],["mathspeak-brief","Brief"],["mathspeak-sbrief","Superbrief"]])),this.submenu("Clearspeak","Clearspeak Rules",this.radioGroup("speechRules",[["clearspeak-default","Auto"]])),this.submenu("ChromeVox","ChromeVox Rules",this.radioGroup("speechRules",[["chromevox-default","Standard"],["chromevox-alternative","Alternative"]]))]),this.submenu("Highlight","Highlight",[this.submenu("Background","Background",this.radioGroup("backgroundColor",[["Blue"],["Red"],["Green"],["Yellow"],["Cyan"],["Magenta"],["White"],["Black"]])),{type:"slider",variable:"backgroundOpacity",content:" "},this.submenu("Foreground","Foreground",this.radioGroup("foregroundColor",[["Black"],["White"],["Magenta"],["Cyan"],["Yellow"],["Green"],["Red"],["Blue"]])),{type:"slider",variable:"foregroundOpacity",content:" "},this.rule(),this.radioGroup("highlight",[["None"],["Hover"],["Flame"]]),this.rule(),this.checkbox("TreeColoring","Tree Coloring","treeColoring")]),this.submenu("Magnification","Magnification",[this.radioGroup("magnification",[["None"],["Keyboard"],["Mouse"]]),this.rule(),this.radioGroup("magnify",[["200%"],["300%"],["400%"],["500%"]])]),this.submenu("Semantic Info","Semantic Info",[this.checkbox("Type","Type","infoType"),this.checkbox("Role","Role","infoRole"),this.checkbox("Prefix","Prefix","infoPrefix")],!0),this.rule(),this.checkbox("Collapsible","Collapsible Math","collapsible"),this.checkbox("AutoCollapse","Auto Collapse","autocollapse",{disabled:!0}),this.rule(),this.checkbox("InTabOrder","Include in Tab Order","inTabOrder"),this.checkbox("AssistiveMml","Include Hidden MathML","assistiveMml")]),this.submenu("Language","Language"),this.rule(),this.command("About","About MathJax",(function(){return e.about.post()})),this.command("Help","MathJax Help",(function(){return e.help.post()}))]});var n=this.menu;this.about.attachMenu(n),this.help.attachMenu(n),this.originalText.attachMenu(n),this.annotationText.attachMenu(n),this.mathmlCode.attachMenu(n),this.zoomBox.attachMenu(n),this.checkLoadableItems(),this.enableExplorerItems(this.settings.explorer),n.showAnnotation=this.annotationText,n.copyAnnotation=this.copyAnnotation.bind(this),n.annotationTypes=this.options.annotationTypes,g.CssStyles.addInfoStyles(this.document.document),g.CssStyles.addMenuStyles(this.document.document)},e.prototype.checkLoadableItems=function(){var e,t;if(y&&y._&&y.loader&&y.startup)!this.settings.collapsible||y._.a11y&&y._.a11y.complexity||this.loadA11y("complexity"),!this.settings.explorer||y._.a11y&&y._.a11y.explorer||this.loadA11y("explorer"),!this.settings.assistiveMml||y._.a11y&&y._.a11y["assistive-mml"]||this.loadA11y("assistive-mml");else{var n=this.menu;try{for(var r=o(Object.keys(this.jax)),i=r.next();!i.done;i=r.next()){var s=i.value;this.jax[s]||n.findID("Settings","Renderer",s).disable()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}n.findID("Accessibility","Activate").disable(),n.findID("Accessibility","AutoCollapse").disable(),n.findID("Accessibility","Collapsible").disable()}},e.prototype.enableExplorerItems=function(e){var t,n,r=this.menu.findID("Accessibility","Activate").menu;try{for(var i=o(r.items.slice(1)),s=i.next();!s.done;s=i.next()){var a=s.value;if(a instanceof m.Rule)break;e?a.enable():a.disable()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.mergeUserSettings=function(){try{var t=localStorage.getItem(e.MENU_STORAGE);if(!t)return;Object.assign(this.settings,JSON.parse(t)),this.setA11y(this.settings)}catch(e){console.log("MathJax localStorage error: "+e.message)}},e.prototype.saveUserSettings=function(){var t,n,r={};try{for(var i=o(Object.keys(this.settings)),s=i.next();!s.done;s=i.next()){var a=s.value;this.settings[a]!==this.defaultSettings[a]&&(r[a]=this.settings[a])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}try{Object.keys(r).length?localStorage.setItem(e.MENU_STORAGE,JSON.stringify(r)):localStorage.removeItem(e.MENU_STORAGE)}catch(e){console.log("MathJax localStorage error: "+e.message)}},e.prototype.setA11y=function(e){y._.a11y&&y._.a11y.explorer&&y._.a11y.explorer_ts.setA11yOptions(this.document,e)},e.prototype.getA11y=function(e){if(y._.a11y&&y._.a11y.explorer)return void 0!==this.document.options.a11y[e]?this.document.options.a11y[e]:this.document.options.sre[e]},e.prototype.applySettings=function(){this.setTabOrder(this.settings.inTabOrder),this.document.options.enableAssistiveMml=this.settings.assistiveMml,this.document.outputJax.options.scale=parseFloat(this.settings.scale),this.settings.renderer!==this.defaultSettings.renderer&&this.setRenderer(this.settings.renderer)},e.prototype.setScale=function(e){this.document.outputJax.options.scale=parseFloat(e),this.document.rerender()},e.prototype.setRenderer=function(e){var t=this;if(this.jax[e])this.setOutputJax(e);else{var n=e.toLowerCase();this.loadComponent("output/"+n,(function(){var r=y.startup;n in r.constructors&&(r.useOutput(n,!0),r.output=r.getOutputJax(),t.jax[e]=r.output,t.setOutputJax(e))}))}},e.prototype.setOutputJax=function(e){this.jax[e].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[e],this.rerender()},e.prototype.setTabOrder=function(e){this.menu.store.inTaborder(e)},e.prototype.setAssistiveMml=function(e){this.document.options.enableAssistiveMml=e,!e||y._.a11y&&y._.a11y["assistive-mml"]?this.rerender():this.loadA11y("assistive-mml")},e.prototype.setExplorer=function(e){this.enableExplorerItems(e),this.document.options.enableExplorer=e,!e||y._.a11y&&y._.a11y.explorer?this.rerender(this.settings.collapsible?a.STATE.RERENDER:a.STATE.COMPILED):this.loadA11y("explorer")},e.prototype.setCollapsible=function(e){this.document.options.enableComplexity=e,!e||y._.a11y&&y._.a11y.complexity?this.rerender(a.STATE.COMPILED):this.loadA11y("complexity")},e.prototype.scaleAllMath=function(){var e=(100*parseFloat(this.settings.scale)).toFixed(1).replace(/.0$/,""),t=prompt("Scale all mathematics (compared to surrounding text) by",e+"%");if(t)if(t.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){var n=parseFloat(t)/100;n?this.menu.pool.lookup("scale").setValue(String(n)):alert("The scale should not be zero")}else alert("The scale should be a percentage (e.g., 120%)")},e.prototype.resetDefaults=function(){var t,n;e.loading++;var r=this.menu.pool,i=this.defaultSettings;try{for(var s=o(Object.keys(this.settings)),c=s.next();!c.done;c=s.next()){var l=c.value,u=r.lookup(l);if(u){u.setValue(i[l]);var d=u.items[0];d&&d.executeCallbacks_()}else this.settings[l]=i[l]}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}e.loading--,this.rerender(a.STATE.COMPILED)},e.prototype.checkComponent=function(t){var n=e.loadingPromises.get(t);n&&s.mathjax.retryAfter(n)},e.prototype.loadComponent=function(t,n){if(!e.loadingPromises.has(t)){var r=y.loader;if(r){e.loading++;var o=r.load(t).then((function(){e.loading--,e.loadingPromises.delete(t),n(),0===e.loading&&e._loadingPromise&&(e._loadingPromise=null,e._loadingOK())})).catch((function(t){e._loadingPromise?(e._loadingPromise=null,e._loadingFailed(t)):console.log(t)}));e.loadingPromises.set(t,o)}}},e.prototype.loadA11y=function(t){var n=this,r=!a.STATE.ENRICHED;this.loadComponent("a11y/"+t,(function(){var o=y.startup;s.mathjax.handlers.unregister(o.handler),o.handler=o.getHandler(),s.mathjax.handlers.register(o.handler);var i=n.document;n.document=o.document=o.getDocument(),n.document.menu=n,n.document.outputJax.reset(),n.transferMathList(i),n.document.processed=i.processed,e._loadingPromise||(n.document.outputJax.reset(),n.rerender("complexity"===t||r?a.STATE.COMPILED:a.STATE.TYPESET))}))},e.prototype.transferMathList=function(e){var t,n,r=this.document.options.MathItem;try{for(var i=o(e.math),s=i.next();!s.done;s=i.next()){var a=s.value,c=new r;Object.assign(c,a),this.document.math.push(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.formatSource=function(e){return e.trim().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},e.prototype.toMML=function(e){return this.MmlVisitor.visitTree(e.root,e,{texHints:this.settings.texHints,semantics:this.settings.semantics&&"MathML"!==e.inputJax.name})},e.prototype.zoom=function(e,t,n){e&&!this.isZoomEvent(e,t)||(this.menu.mathItem=n,e&&this.menu.post(e),this.zoomBox.post())},e.prototype.isZoomEvent=function(e,t){return this.settings.zoom===t&&(!this.settings.alt||e.altKey)&&(!this.settings.ctrl||e.ctrlKey)&&(!this.settings.cmd||e.metaKey)&&(!this.settings.shift||e.shiftKey)},e.prototype.rerender=function(t){void 0===t&&(t=a.STATE.TYPESET),this.rerenderStart=Math.min(t,this.rerenderStart),e.loading||(this.rerenderStart<=a.STATE.COMPILED&&this.document.reset({inputJax:[]}),this.document.rerender(this.rerenderStart),this.rerenderStart=a.STATE.LAST)},e.prototype.copyMathML=function(){this.copyToClipboard(this.toMML(this.menu.mathItem))},e.prototype.copyOriginal=function(){this.copyToClipboard(this.menu.mathItem.math.trim())},e.prototype.copyAnnotation=function(){this.copyToClipboard(this.menu.annotation.trim())},e.prototype.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){alert("Can't copy to clipboard: "+e.message)}document.body.removeChild(t)},e.prototype.addMenu=function(e){var t=this,n=e.typesetRoot;n.addEventListener("contextmenu",(function(){return t.menu.mathItem=e}),!0),n.addEventListener("keydown",(function(){return t.menu.mathItem=e}),!0),n.addEventListener("click",(function(n){return t.zoom(n,"Click",e)}),!0),n.addEventListener("dblclick",(function(n){return t.zoom(n,"DoubleClick",e)}),!0),this.menu.store.insert(n)},e.prototype.clear=function(){this.menu.store.clear()},e.prototype.variable=function(e,t){var n=this;return{name:e,getter:function(){return n.settings[e]},setter:function(r){n.settings[e]=r,t&&t(r),n.saveUserSettings()}}},e.prototype.a11yVar=function(e,t){var n=this;return{name:e,getter:function(){return n.getA11y(e)},setter:function(r){n.settings[e]=r;var o={};o[e]=r,n.setA11y(o),t&&t(r),n.saveUserSettings()}}},e.prototype.submenu=function(e,t,n,r){var i,s;void 0===n&&(n=[]),void 0===r&&(r=!1);var a=[];try{for(var c=o(n),l=c.next();!l.done;l=c.next()){var u=l.value;Array.isArray(u)?a=a.concat(u):a.push(u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}return{type:"submenu",id:e,content:t,menu:{items:a},disabled:0===a.length||r}},e.prototype.command=function(e,t,n,r){return void 0===r&&(r={}),Object.assign({type:"command",id:e,content:t,action:n},r)},e.prototype.checkbox=function(e,t,n,r){return void 0===r&&(r={}),Object.assign({type:"checkbox",id:e,content:t,variable:n},r)},e.prototype.radioGroup=function(e,t){var n=this;return t.map((function(t){return n.radio(t[0],t[1]||t[0],e)}))},e.prototype.radio=function(e,t,n,r){return void 0===r&&(r={}),Object.assign({type:"radio",id:e,content:t,variable:n},r)},e.prototype.label=function(e,t){return{type:"label",id:e,content:t}},e.prototype.rule=function(){return{type:"rule"}},e.MENU_STORAGE="MathJax-Menu-Settings",e.OPTIONS={settings:{texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!1,cmd:!1,ctrl:!1,shift:!1,scale:1,autocollapse:!1,collapsible:!1,inTabOrder:!0,assistiveMml:!0,explorer:!1},jax:{CHTML:null,SVG:null},annotationTypes:(0,l.expandable)({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},e.loading=0,e.loadingPromises=new Map,e._loadingPromise=null,e._loadingOK=null,e._loadingFailed=null,e}();t.Menu=E},9003:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.MenuHandler=t.MenuMathDocumentMixin=t.MenuMathItemMixin=void 0;var l=n(3184),u=n(4769),d=n(9077),p=n(1062);function h(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.addMenu=function(e,t){void 0===t&&(t=!1),this.state()>=u.STATE.CONTEXT_MENU||(this.isEscaped||!e.options.enableMenu&&!t||e.menu.addMenu(this),this.state(u.STATE.CONTEXT_MENU))},t.prototype.checkLoading=function(e){e.checkLoading()},t}(e)}function f(e){var t;return t=function(e){function t(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,a([],s(t),!1))||this;r.menu=new r.options.MenuClass(r,r.options.menuOptions);var o=r.constructor.ProcessBits;return o.has("context-menu")||o.allocate("context-menu"),r.options.MathItem=h(r.options.MathItem),r}return o(t,e),t.prototype.addMenu=function(){var e,t;if(!this.processed.isSet("context-menu")){try{for(var n=c(this.math),r=n.next();!r.done;r=n.next()){r.value.addMenu(this)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.processed.set("context-menu")}return this},t.prototype.checkLoading=function(){this.menu.isLoading&&l.mathjax.retryAfter(this.menu.loadingPromise.catch((function(e){return console.log(e)})));var e=this.menu.settings;return e.collapsible&&(this.options.enableComplexity=!0,this.menu.checkComponent("a11y/complexity")),e.explorer&&(this.options.enableEnrichment=!0,this.options.enableExplorer=!0,this.menu.checkComponent("a11y/explorer")),this},t.prototype.state=function(t,n){return void 0===n&&(n=!1),e.prototype.state.call(this,t,n),t<u.STATE.CONTEXT_MENU&&this.processed.clear("context-menu"),this},t.prototype.updateDocument=function(){return e.prototype.updateDocument.call(this),this.menu.menu.store.sort(),this},t}(e),t.OPTIONS=i(i({enableEnrichment:!0,enableComplexity:!0,enableExplorer:!0,enrichSpeech:"none",enrichError:function(e,t,n){return console.warn("Enrichment Error:",n)}},e.OPTIONS),{MenuClass:p.Menu,menuOptions:p.Menu.OPTIONS,enableMenu:!0,sre:e.OPTIONS.sre||(0,d.expandable)({}),a11y:e.OPTIONS.a11y||(0,d.expandable)({}),renderActions:(0,d.expandable)(i(i({},e.OPTIONS.renderActions),{addMenu:[u.STATE.CONTEXT_MENU],checkLoading:[u.STATE.UNPROCESSED+1]}))}),t}(0,u.newState)("CONTEXT_MENU",170),t.MenuMathItemMixin=h,t.MenuMathDocumentMixin=f,t.MenuHandler=function(e){return e.documentClass=f(e.documentClass),e}},9232:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MmlVisitor=void 0;var i=n(2433),s=n(9077),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options={texHints:!0,semantics:!1},t.mathItem=null,t}return o(t,e),t.prototype.visitTree=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n={}),this.mathItem=t,(0,s.userOptions)(this.options,n),this.visitNode(e,"")},t.prototype.visitTeXAtomNode=function(t,n){return this.options.texHints?e.prototype.visitTeXAtomNode.call(this,t,n):t.childNodes[0]&&1===t.childNodes[0].childNodes.length?this.visitNode(t.childNodes[0],n):n+"<mrow"+this.getAttributes(t)+">\n"+this.childNodeMml(t,n+" ","\n")+n+"</mrow>"},t.prototype.visitMathNode=function(t,n){if(!this.options.semantics||"TeX"!==this.mathItem.inputJax.name)return e.prototype.visitDefault.call(this,t,n);var r=t.childNodes.length&&t.childNodes[0].childNodes.length>1;return n+"<math"+this.getAttributes(t)+">\n"+n+" <semantics>\n"+(r?n+" <mrow>\n":"")+this.childNodeMml(t,n+(r?" ":" "),"\n")+(r?n+" </mrow>\n":"")+n+' <annotation encoding="application/x-tex">'+this.mathItem.math+"</annotation>\n"+n+" </semantics>\n"+n+"</math>"},t}(i.SerializedMmlVisitor);t.MmlVisitor=a},7309:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SelectableInfo=void 0;var i=n(6932),s=n(1698),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.addEvents=function(e){var t=this;e.addEventListener("keypress",(function(e){"a"===e.key&&(e.ctrlKey||e.metaKey)&&(t.selectAll(),t.stop(e))}))},t.prototype.selectAll=function(){document.getSelection().selectAllChildren(this.html.querySelector("pre"))},t.prototype.copyToClipboard=function(){this.selectAll();try{document.execCommand("copy")}catch(e){alert("Can't copy to clipboard: "+e.message)}document.getSelection().removeAllRanges()},t.prototype.generateHtml=function(){var t=this;e.prototype.generateHtml.call(this);var n=this.html.querySelector("span."+s.HtmlClasses.INFOSIGNATURE).appendChild(document.createElement("input"));n.type="button",n.value="Copy to Clipboard",n.addEventListener("click",(function(e){return t.copyToClipboard()}))},t}(i.Info);t.SelectableInfo=a},8723:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=MathJax._.components.global.isObject,t.combineConfig=MathJax._.components.global.combineConfig,t.combineDefaults=MathJax._.components.global.combineDefaults,t.combineWithMathJax=MathJax._.components.global.combineWithMathJax,t.MathJax=MathJax._.components.global.MathJax},4769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.protoItem=MathJax._.core.MathItem.protoItem,t.AbstractMathItem=MathJax._.core.MathItem.AbstractMathItem,t.STATE=MathJax._.core.MathItem.STATE,t.newState=MathJax._.core.MathItem.newState},2433:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DATAMJX=MathJax._.core.MmlTree.SerializedMmlVisitor.DATAMJX,t.toEntity=MathJax._.core.MmlTree.SerializedMmlVisitor.toEntity,t.SerializedMmlVisitor=MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor},3184:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.mathjax=MathJax._.mathjax.mathjax},9077:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=MathJax._.util.Options.isObject,t.APPEND=MathJax._.util.Options.APPEND,t.REMOVE=MathJax._.util.Options.REMOVE,t.OPTIONS=MathJax._.util.Options.OPTIONS,t.Expandable=MathJax._.util.Options.Expandable,t.expandable=MathJax._.util.Options.expandable,t.makeArray=MathJax._.util.Options.makeArray,t.keys=MathJax._.util.Options.keys,t.copy=MathJax._.util.Options.copy,t.insert=MathJax._.util.Options.insert,t.defaultOptions=MathJax._.util.Options.defaultOptions,t.userOptions=MathJax._.util.Options.userOptions,t.selectOptions=MathJax._.util.Options.selectOptions,t.selectOptionsFromKeys=MathJax._.util.Options.selectOptionsFromKeys,t.separateOptions=MathJax._.util.Options.separateOptions,t.lookup=MathJax._.util.Options.lookup},2612:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractEntry=void 0;var i=n(9943),s=n(1698),a=function(e){function t(t,n){var r=e.call(this)||this;return r._menu=t,r._type=n,r.className=s.HtmlClasses.MENUITEM,r.role="menuitem",r.hidden=!1,r}return o(t,e),Object.defineProperty(t.prototype,"menu",{get:function(){return this._menu},set:function(e){this._menu=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),t.prototype.hide=function(){this.hidden=!0,this.menu.generateMenu()},t.prototype.show=function(){this.hidden=!1,this.menu.generateMenu()},t.prototype.isHidden=function(){return this.hidden},t}(i.MenuElement);t.AbstractEntry=a},1341:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractItem=void 0;var s=n(2612),a=n(865),c=n(1698),l=function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i._content=r,i.disabled=!1,i.callbacks=[],i._id=o||r,i}return o(t,e),Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){this._content=e,this.generateHtml(),this.menu&&this.menu.generateHtml()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.press=function(){this.disabled||(this.executeAction(),this.executeCallbacks_())},t.prototype.executeAction=function(){},t.prototype.registerCallback=function(e){-1===this.callbacks.indexOf(e)&&this.callbacks.push(e)},t.prototype.unregisterCallback=function(e){var t=this.callbacks.indexOf(e);-1!==t&&this.callbacks.splice(t,1)},t.prototype.mousedown=function(e){this.press(),this.stop(e)},t.prototype.mouseover=function(e){this.focus(),this.stop(e)},t.prototype.mouseout=function(e){this.deactivate(),this.stop(e)},t.prototype.generateHtml=function(){e.prototype.generateHtml.call(this);var t=this.html;t.setAttribute("aria-disabled","false"),t.textContent=this.content},t.prototype.activate=function(){this.disabled||this.html.classList.add(c.HtmlClasses.MENUACTIVE)},t.prototype.deactivate=function(){this.html.classList.remove(c.HtmlClasses.MENUACTIVE)},t.prototype.focus=function(){this.menu.focused=this,e.prototype.focus.call(this),this.activate()},t.prototype.unfocus=function(){this.deactivate(),e.prototype.unfocus.call(this)},t.prototype.escape=function(e){a.MenuUtil.close(this)},t.prototype.up=function(e){this.menu.up(e)},t.prototype.down=function(e){this.menu.down(e)},t.prototype.left=function(e){this.menu.left(e)},t.prototype.right=function(e){this.menu.right(e)},t.prototype.space=function(e){this.press()},t.prototype.disable=function(){this.disabled=!0;var e=this.html;e.classList.add(c.HtmlClasses.MENUDISABLED),e.setAttribute("aria-disabled","true")},t.prototype.enable=function(){this.disabled=!1;var e=this.html;e.classList.remove(c.HtmlClasses.MENUDISABLED),e.removeAttribute("aria-disabled")},t.prototype.executeCallbacks_=function(){var e,t;try{for(var n=i(this.callbacks),r=n.next();!r.done;r=n.next()){var o=r.value;try{o(this)}catch(e){a.MenuUtil.error(e,"Callback for menu entry "+this.id+" failed.")}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t}(s.AbstractEntry);t.AbstractItem=l},1585:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMenu=void 0;var s=n(3757),a=n(1341),c=n(1698),l=n(2745),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.className=c.HtmlClasses.CONTEXTMENU,t.role="menu",t._items=[],t._baseMenu=null,t}return o(t,e),Object.defineProperty(t.prototype,"baseMenu",{get:function(){return this._baseMenu},set:function(e){this._baseMenu=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pool",{get:function(){return this.variablePool},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focused",{get:function(){return this._focused},set:function(e){if(this._focused!==e){this._focused||this.unfocus();var t=this._focused;this._focused=e,t&&t.unfocus()}},enumerable:!1,configurable:!0}),t.prototype.up=function(e){var t=this.items.filter((function(e){return e instanceof a.AbstractItem&&!e.isHidden()}));if(0!==t.length)if(this.focused){var n=t.indexOf(this.focused);-1!==n&&t[n=n?--n:t.length-1].focus()}else t[t.length-1].focus()},t.prototype.down=function(e){var t=this.items.filter((function(e){return e instanceof a.AbstractItem&&!e.isHidden()}));if(0!==t.length)if(this.focused){var n=t.indexOf(this.focused);-1!==n&&t[n=++n===t.length?0:n].focus()}else t[0].focus()},t.prototype.generateHtml=function(){e.prototype.generateHtml.call(this),this.generateMenu()},t.prototype.generateMenu=function(){var e,t,n=this.html;n.classList.add(c.HtmlClasses.MENU);try{for(var r=i(this.items),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.isHidden()){var a=s.html;a.parentNode&&a.parentNode.removeChild(a)}else n.appendChild(s.html)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.post=function(t,n){this.variablePool.update(),e.prototype.post.call(this,t,n)},t.prototype.unpostSubmenus=function(){var e,t,n=this.items.filter((function(e){return e instanceof l.Submenu}));try{for(var r=i(n),o=r.next();!o.done;o=r.next()){var s=o.value;s.submenu.unpost(),s!==this.focused&&s.unfocus()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.unpost=function(){e.prototype.unpost.call(this),this.unpostSubmenus(),this.focused=null},t.prototype.find=function(e){var t,n;try{for(var r=i(this.items),o=r.next();!o.done;o=r.next()){var s=o.value;if("rule"!==s.type){if(s.id===e)return s;if("submenu"===s.type){var a=s.submenu.find(e);if(a)return a}}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return null},t}(s.AbstractPostable);t.AbstractMenu=u},2817:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractNavigatable=void 0;var r=n(2635),o=n(9674),i=function(){function e(){this.bubble=!1}return e.prototype.bubbleKey=function(){this.bubble=!0},e.prototype.keydown=function(e){switch(e.keyCode){case r.KEY.ESCAPE:this.escape(e);break;case r.KEY.RIGHT:this.right(e);break;case r.KEY.LEFT:this.left(e);break;case r.KEY.UP:this.up(e);break;case r.KEY.DOWN:this.down(e);break;case r.KEY.RETURN:case r.KEY.SPACE:this.space(e);break;default:return}this.bubble?this.bubble=!1:this.stop(e)},e.prototype.escape=function(e){},e.prototype.space=function(e){},e.prototype.left=function(e){},e.prototype.right=function(e){},e.prototype.up=function(e){},e.prototype.down=function(e){},e.prototype.stop=function(e){e&&(e.stopPropagation(),e.preventDefault(),e.cancelBubble=!0)},e.prototype.mousedown=function(e){return this.stop(e)},e.prototype.mouseup=function(e){return this.stop(e)},e.prototype.mouseover=function(e){return this.stop(e)},e.prototype.mouseout=function(e){return this.stop(e)},e.prototype.click=function(e){return this.stop(e)},e.prototype.addEvents=function(e){e.addEventListener(o.MOUSE.DOWN,this.mousedown.bind(this)),e.addEventListener(o.MOUSE.UP,this.mouseup.bind(this)),e.addEventListener(o.MOUSE.OVER,this.mouseover.bind(this)),e.addEventListener(o.MOUSE.OUT,this.mouseout.bind(this)),e.addEventListener(o.MOUSE.CLICK,this.click.bind(this)),e.addEventListener("keydown",this.keydown.bind(this)),e.addEventListener("dragstart",this.stop.bind(this)),e.addEventListener(o.MOUSE.SELECTSTART,this.stop.bind(this)),e.addEventListener("contextmenu",this.stop.bind(this)),e.addEventListener(o.MOUSE.DBLCLICK,this.stop.bind(this))},e}();t.AbstractNavigatable=i},3757:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractPostable=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.posted=!1,t}return o(t,e),t.prototype.isPosted=function(){return this.posted},t.prototype.post=function(e,t){this.posted||(void 0!==e&&void 0!==t&&this.html.setAttribute("style","left: "+e+"px; top: "+t+"px;"),this.display(),this.posted=!0)},t.prototype.unpost=function(){if(this.posted){var e=this.html;e.parentNode&&e.parentNode.removeChild(e),this.posted=!1}},t}(n(9943).MenuElement);t.AbstractPostable=i},2467:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractVariableItem=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.generateHtml=function(){e.prototype.generateHtml.call(this);var t=this.html;this.span||this.generateSpan(),t.appendChild(this.span),this.update()},t.prototype.register=function(){this.variable.register(this)},t.prototype.unregister=function(){this.variable.unregister(this)},t.prototype.update=function(){this.updateAria(),this.span&&this.updateSpan()},t}(n(1341).AbstractItem);t.AbstractVariableItem=i},725:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CloseButton=void 0;var i=n(3757),s=n(1698),a=function(e){function t(t){var n=e.call(this)||this;return n.element=t,n.className=s.HtmlClasses.MENUCLOSE,n.role="button",n}return o(t,e),t.prototype.generateHtml=function(){var e=document.createElement("span");e.classList.add(this.className),e.setAttribute("role",this.role),e.setAttribute("tabindex","0");var t=document.createElement("span");t.textContent="\xd7",e.appendChild(t),this.html=e},t.prototype.display=function(){},t.prototype.unpost=function(){e.prototype.unpost.call(this),this.element.unpost()},t.prototype.keydown=function(t){this.bubbleKey(),e.prototype.keydown.call(this,t)},t.prototype.space=function(e){this.unpost(),this.stop(e)},t.prototype.mousedown=function(e){this.unpost(),this.stop(e)},t}(i.AbstractPostable);t.CloseButton=a},9964:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnPropert