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 • 177 kB
JavaScript
(()=>{var __webpack_modules__={6:(t,e,s)=>{"use strict";s.r(e),s.d(e,{APPEND:()=>n,Expandable:()=>l,OPTIONS:()=>a,REMOVE:()=>o,copy:()=>u,defaultOptions:()=>m,expandable:()=>c,insert:()=>p,isObject:()=>r,keys:()=>d,lookup:()=>x,makeArray:()=>h,selectOptions:()=>g,selectOptionsFromKeys:()=>f,separateOptions:()=>R,userOptions:()=>E});const i={}.constructor;function r(t){return"object"==typeof t&&null!==t&&(t.constructor===i||t.constructor===l)}const n="[+]",o="[-]",a={invalidOption:"warn",optionError:(t,e)=>{if("fatal"===a.invalidOption)throw new Error(t);console.warn("MathJax: "+t)}};class l{}function c(t){return Object.assign(Object.create(l.prototype),t)}function h(t){return Array.isArray(t)?t:[t]}function d(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function u(t){const e={};for(const s of d(t)){const i=Object.getOwnPropertyDescriptor(t,s),n=i.value;Array.isArray(n)?i.value=p([],n,!1):r(n)&&(i.value=u(n)),i.enumerable&&(e[s]=i)}return Object.defineProperties(t.constructor===l?c({}):{},e)}function p(t,e,s=!0){for(let i of d(e)){if(s&&void 0===t[i]&&t.constructor!==l){"symbol"==typeof i&&(i=i.toString()),a.optionError(`Invalid option "${i}" (no default value).`,i);continue}const c=e[i];let h=t[i];if(!r(c)||null===h||"object"!=typeof h&&"function"!=typeof h)Array.isArray(c)?(t[i]=[],p(t[i],c,!1)):r(c)?t[i]=u(c):t[i]=c;else{const e=d(c);Array.isArray(h)&&(1===e.length&&(e[0]===n||e[0]===o)&&Array.isArray(c[e[0]])||2===e.length&&e.sort().join(",")===n+","+o&&Array.isArray(c[n])&&Array.isArray(c[o]))?(c[o]&&(h=t[i]=h.filter((t=>c[o].indexOf(t)<0))),c[n]&&(t[i]=[...h,...c[n]])):p(h,c,s)}}return t}function m(t,...e){return e.forEach((e=>p(t,e,!1))),t}function E(t,...e){return e.forEach((e=>p(t,e,!0))),t}function g(t,...e){const s={};for(const i of e)Object.hasOwn(t,i)&&(s[i]=t[i]);return s}function f(t,e){return g(t,...Object.keys(e))}function R(t,...e){const s=[];for(const i of e){const e={},r={};for(const s of Object.keys(t||{}))(void 0===i[s]?r:e)[s]=t[s];s.push(e),t=r}return s.unshift(t),s}function x(t,e,s=null){return Object.hasOwn(e,t)?e[t]:s}},61:(t,e,s)=>{"use strict";var i={};s.r(i),s.d(i,{CONFIG:()=>m,MathJax:()=>p,Startup:()=>u});var r=s(977);!Object.hasOwn&&r.MathJax.config.startup.polyfillHasOwn&&(Object.hasOwn=function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)});var n=s(516),o=s(648),a=s(296),l=s(983),c=s(6),h=s(939),d=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function a(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};class u{static toMML(t){return u.visitor.visitTree(t,this.document)}static registerConstructor(t,e){u.constructors[t]=e}static useHandler(t,e=!1){m.handler&&!e||(m.handler=t)}static useAdaptor(t,e=!1){m.adaptor&&!e||(m.adaptor=t)}static useInput(t,e=!1){E&&!e||m.input.push(t)}static useOutput(t,e=!1){m.output&&!e||(m.output=t)}static extendHandler(t,e=10){u.extensions.add(t,e)}static defaultReady(){u.getComponents(),u.makeMethods(),u.pagePromise.then((()=>m.pageReady())).then((()=>u.promiseResolve())).catch((t=>u.promiseReject(t)))}static defaultPageReady(){return(m.loadAllFontFiles&&u.output.font?u.output.font.loadDynamicFiles():Promise.resolve()).then((()=>{var t;return null===(t=u.document.menu)||void 0===t?void 0:t.loadingPromise})).then(m.typeset&&p.typesetPromise?()=>u.typesetPromise(m.elements):Promise.resolve()).then((()=>u.promiseResolve()))}static typesetPromise(t){return this.hasTypeset=!0,u.document.whenReady((()=>d(this,void 0,void 0,(function*(){u.document.options.elements=t,u.document.reset(),yield u.document.renderPromise()}))))}static getComponents(){u.visitor=new p._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,u.mathjax=p._.mathjax.mathjax,u.input=u.getInputJax(),u.output=u.getOutputJax(),u.adaptor=u.getAdaptor(),u.handler&&u.mathjax.handlers.unregister(u.handler),u.handler=u.getHandler(),u.handler&&(u.mathjax.handlers.register(u.handler),u.document=u.getDocument())}static makeMethods(){u.input&&u.output&&u.makeTypesetMethods();const t=u.output?u.output.name.toLowerCase():"";for(const e of u.input){const s=e.name.toLowerCase();u.makeMmlMethods(s,e),u.makeResetMethod(s,e),u.output&&u.makeOutputMethods(s,t,e)}p.done=()=>u.document.done(),p.whenReady=t=>u.document.whenReady(t)}static makeTypesetMethods(){p.typeset=(t=null)=>{this.hasTypeset=!0,u.document.options.elements=t,u.document.reset(),u.document.render()},p.typesetPromise=(t=null)=>u.typesetPromise(t),p.typesetClear=(t=null)=>{t?u.document.clearMathItemsWithin(t):u.document.clear()}}static makeOutputMethods(t,e,s){const i=t+"2"+e;p[i]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),u.document.convert(t,e)),p[i+"Promise"]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),u.document.convertPromise(t,e)),p[e+"Stylesheet"]=()=>u.output.styleSheet(u.document),"getMetricsFor"in u.output&&(p.getMetricsFor=(t,e)=>u.output.getMetricsFor(t,e))}static makeMmlMethods(t,e){const s=p._.core.MathItem.STATE;p[t+"2mml"]=(t,i={})=>(i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name}),u.toMML(u.document.convert(t,i))),p[t+"2mmlPromise"]=(t,...i)=>d(this,[t,...i],void 0,(function*(t,i={}){i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name});const r=yield u.document.convertPromise(t,i);return u.toMML(r)}))}static makeResetMethod(t,e){p[t+"Reset"]=(...t)=>e.reset(...t)}static getInputJax(){const t=[];for(const e of m.input){const s=u.constructors[e];if(!s)throw Error('Input Jax "'+e+'" is not defined (has it been loaded?)');t[e]=new s(p.config[e]),t.push(t[e])}return t}static getOutputJax(){const t=m.output;if(!t)return null;const e=u.constructors[t];if(!e)throw Error('Output Jax "'+t+'" is not defined (has it been loaded?)');return new e(p.config[t])}static getAdaptor(){const t=m.adaptor;if(!t||"none"===t)return null;const e=u.constructors[t];if(!e)throw Error('DOMAdaptor "'+t+'" is not defined (has it been loaded?)');return e(p.config[t])}static getHandler(){const t=m.handler;if(!t||"none"===t||!u.adaptor)return null;const e=u.constructors[t];if(!e)throw Error('Handler "'+t+'" is not defined (has it been loaded?)');let s=new e(u.adaptor,5);for(const t of u.extensions)s=t.item(s);return s}static getDocument(t=null){return u.mathjax.document(t||m.document,Object.assign(Object.assign({},p.config.options),{InputJax:u.input,OutputJax:u.output}))}}u.extensions=new l.PrioritizedList,u.constructors={},u.input=[],u.output=null,u.handler=null,u.adaptor=null,u.elements=null,u.document=null,u.promise=new Promise(((t,e)=>{u.promiseResolve=t,u.promiseReject=e})),u.pagePromise=new Promise(((t,e)=>{const s=r.GLOBAL.document;if(s&&s.readyState&&"complete"!==s.readyState&&"interactive"!==s.readyState){const e=()=>t();s.defaultView.addEventListener("load",e,!0),s.defaultView.addEventListener("DOMContentLoaded",e,!0)}else t()})),u.hasTypeset=!1,u.defaultOptionError=c.OPTIONS.optionError;const p=r.MathJax;void 0===p._.startup&&((0,r.combineDefaults)(p.config,"startup",{input:[],output:"",handler:null,adaptor:null,document:h.context.document||"",elements:null,typeset:!0,ready:u.defaultReady.bind(u),pageReady:u.defaultPageReady.bind(u),polyfillHasOwn:!0}),(0,r.combineWithMathJax)({startup:u,options:{}}),p.config.startup.invalidOption&&(c.OPTIONS.invalidOption=p.config.startup.invalidOption),p.config.startup.optionError&&(c.OPTIONS.optionError=p.config.startup.optionError));const m=p.config.startup,E=0!==m.input.length;MathJax.loader&&MathJax.loader.checkVersion("startup",n.x,"startup"),(0,r.combineWithMathJax)({_:{components:{loader:o,package:a,startup:i}}});o.Loader.preLoaded("loader","startup"),(0,r.combineDefaults)(MathJax.config.loader,"dependencies",{"a11y/semantic-enrich":["input/mml","a11y/sre"],"a11y/speech":["a11y/semantic-enrich"],"a11y/complexity":["a11y/semantic-enrich"],"a11y/explorer":["a11y/speech"],"[mml]/mml3":["input/mml"],"[tex]/action":["input/tex-base"],"[tex]/ams":["input/tex-base","[tex]/newcommand"],"[tex]/amscd":["input/tex-base"],"[tex]/autoload":["input/tex-base","[tex]/require"],"[tex]/bbm":["input/tex-base"],"[tex]/bboldx":["input/tex-base","[tex]/textmacros"],"[tex]/bbox":["input/tex-base"],"[tex]/begingroup":["input/tex-base","[tex]/newcommand"],"[tex]/boldsymbol":["input/tex-base"],"[tex]/braket":["input/tex-base"],"[tex]/bussproofs":["input/tex-base"],"[tex]/cancel":["input/tex-base","[tex]/enclose"],"[tex]/cases":["[tex]/empheq"],"[tex]/centernot":["input/tex-base"],"[tex]/color":["input/tex-base"],"[tex]/colortbl":["input/tex-base","[tex]/color"],"[tex]/colorv2":["input/tex-base"],"[tex]/configmacros":["input/tex-base","[tex]/newcommand"],"[tex]/dsfont":["input/tex-base"],"[tex]/empheq":["input/tex-base","[tex]/ams"],"[tex]/enclose":["input/tex-base"],"[tex]/extpfeil":["input/tex-base","[tex]/newcommand","[tex]/ams"],"[tex]/gensymb":["input/tex-base"],"[tex]/html":["input/tex-base"],"[tex]/mathtools":["input/tex-base","[tex]/newcommand","[tex]/ams","[tex]/boldsymbol"],"[tex]/mhchem":["input/tex-base","[tex]/ams"],"[tex]/newcommand":["input/tex-base"],"[tex]/noerrors":["input/tex-base"],"[tex]/noundefined":["input/tex-base"],"[tex]/physics":["input/tex-base"],"[tex]/require":["input/tex-base"],"[tex]/setoptions":["input/tex-base"],"[tex]/tagformat":["input/tex-base"],"[tex]/texhtml":["input/tex-base"],"[tex]/textcomp":["input/tex-base","[tex]/textmacros"],"[tex]/textmacros":["input/tex-base"],"[tex]/unicode":["input/tex-base"],"[tex]/units":["input/tex-base"],"[tex]/upgreek":["input/tex-base"],"[tex]/verb":["input/tex-base"],"ui/menu":["a11y/sre"]}),(0,r.combineDefaults)(MathJax.config.loader,"paths",{tex:"[mathjax]/input/tex/extensions",mml:"[mathjax]/input/mml/extensions",sre:"[mathjax]/sre",mathmaps:"[sre]/mathmaps"}),(0,r.combineDefaults)(MathJax.config.loader,"provides",{startup:["loader"],"input/tex":["input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"]}),(0,r.combineDefaults)(MathJax.config.loader,"source",{"[tex]/amsCd":"[tex]/amscd","[tex]/colorV2":"[tex]/colorv2","[tex]/configMacros":"[tex]/configmacros","[tex]/tagFormat":"[tex]/tagformat"})},164:(t,e,s)=>{"use strict";var i={};s.r(i),s.d(i,{LiteElement:()=>f});var r={};s.r(r),s.d(r,{LiteDocument:()=>R});var n={};s.r(n),s.d(n,{LiteComment:()=>L,LiteText:()=>x});var o={};s.r(o),s.d(o,{LiteList:()=>b});var a={};s.r(a),s.d(a,{LiteParser:()=>w,PATTERNS:()=>T});var l={};s.r(l),s.d(l,{LiteWindow:()=>A});var c={};s.r(c),s.d(c,{LiteAdaptor:()=>_,LiteBase:()=>S,liteAdaptor:()=>j});var h=s(977),d=s(516),u=s(502),p=s(6),m=s(780),E=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function a(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};const g={badCSS:!0,badSizes:!0};class f{constructor(t,e={},s=[]){this.kind=t,this.attributes=Object.assign({},e),this.children=[...s];for(const t of this.children)t.parent=this;this.styles=null}}class R{get kind(){return"#document"}constructor(t=null){this.defaultView=null,this.root=new f("html",{},[this.head=new f("head"),this.body=new f("body")]),this.type="",this.defaultView=t}}class x{get kind(){return"#text"}constructor(t=""){this.value=t}}class L extends x{get kind(){return"#comment"}}class b{constructor(t){this.nodes=[],this.nodes=[...t]}append(t){this.nodes.push(t)}[Symbol.iterator](){let t=0;return{next(){return t===this.nodes.length?{value:null,done:!0}:{value:this.nodes[t++],done:!1}}}}}var y=s(989);const N="[ \\n]+",I="[ \\n]*",O="[A-Za-z][^\0-\x1f \"'>/=\x7f-\x9f]*",v="[^\0-\x1f \"'>/=\x7f-\x9f]+",C=`${v}(?:${I}=${I}${`(?:'[^']*'|"[^"]*"|${N})`})?`,D=`(${v})(?:${I}=${I}${`(?:'([^']*)'|"([^"]*)"|(${N}))`})?`,T={tag:new RegExp(`(<(?:${O}(?:${N}${C})*${I}/?|/${O}|!--[^]*?--|![^]*?)(?:>|$))`,"u"),attr:new RegExp(C,"u"),attrsplit:new RegExp(D,"u")};class w{parseFromString(t,e="text/html",s=null){const i=s.createDocument();let r=s.body(i);const n=t.replace(/<\?.*?\?>/g,"").split(T.tag);for(;n.length;){const t=n.shift(),e=n.shift();t&&this.addText(s,r,t),e&&">"===e.charAt(e.length-1)&&("!"===e.charAt(1)?this.addComment(s,r,e):r="/"===e.charAt(1)?this.closeTag(s,r,e):this.openTag(s,r,e,n))}return this.checkDocument(s,i),i}addText(t,e,s){return s=y.translate(s),t.append(e,t.text(s))}addComment(t,e,s){return t.append(e,new L(s))}closeTag(t,e,s){const i=s.slice(2,s.length-1).toLowerCase();for(;t.parent(e)&&t.kind(e)!==i;)e=t.parent(e);return t.parent(e)}openTag(t,e,s,i){const r=this.constructor.PCDATA,n=this.constructor.SELF_CLOSING,o=s.match(/<(.*?)[\s\n>/]/)[1].toLowerCase(),a=t.node(o),l=s.replace(/^<.*?[\s\n>]/,"").split(T.attrsplit);return(l.pop().match(/>$/)||l.length<5)&&(this.addAttributes(t,a,l),t.append(e,a),n[o]||s.match(/\/>$/)||(r[o]?this.handlePCDATA(t,a,o,i):e=a)),e}addAttributes(t,e,s){for(;s.length;){const[,i,r,n,o]=s.splice(0,5),a=y.translate(r||n||o||"");t.setAttribute(e,i,a)}}handlePCDATA(t,e,s,i){const r=[],n="</"+s+">";let o="";for(;i.length&&o!==n;)r.push(o),r.push(i.shift()),o=i.shift();t.append(e,t.text(r.join("")))}checkDocument(t,e){const s=this.getOnlyChild(t,t.body(e));if(s){for(const i of t.childNodes(t.body(e))){if(i===s)break;i instanceof L&&i.value.match(/^<!DOCTYPE/)&&(e.type=i.value)}switch(t.kind(s)){case"html":for(const i of s.children)switch(t.kind(i)){case"head":e.head=i;break;case"body":e.body=i}e.root=s,t.remove(s),t.parent(e.body)!==s&&t.append(s,e.body),t.parent(e.head)!==s&&t.insert(e.head,e.body);break;case"head":e.head=t.replace(s,e.head);break;case"body":e.body=t.replace(s,e.body)}}}getOnlyChild(t,e){let s=null;for(const i of t.childNodes(e))if(i instanceof f){if(s)return null;s=i}return s}serialize(t,e,s=!1){const i=this.constructor.SELF_CLOSING,r=t.kind(e),n=this.allAttributes(t,e,s).map((t=>t.name+'="'+this.protectAttribute(t.value,s)+'"')).join(" "),o=this.serializeInner(t,e,s);return`<${r}`+(n?" "+n:"")+(s&&!o||i[r]?s?"/>":">":`>${o}</${r}>`)}serializeInner(t,e,s=!1){const i=this.constructor.PCDATA;return Object.hasOwn(i,e.kind)?t.childNodes(e).map((e=>t.value(e))).join(""):t.childNodes(e).map((e=>{const i=t.kind(e);return"#text"===i?this.protectHTML(t.value(e)):"#comment"===i?e.value:this.serialize(t,e,s)})).join("")}allAttributes(t,e,s){const i=t.allAttributes(e);if(!s)return i;const r=t.kind(e),n=this.constructor.XMLNS;if(!Object.hasOwn(n,r))return i;for(const{name:t}of i)if("xmlns"===t)return i;return i.push({name:"xmlns",value:n[r]}),i}protectAttribute(t,e){return"string"!=typeof t&&(t=String(t)),t=t.replace(/&/g,"&").replace(/"/g,"""),e&&(t=t.replace(/</g,"<").replace(/>/g,">")),t}protectHTML(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}w.SELF_CLOSING={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},w.PCDATA={option:!0,textarea:!0,fieldset:!0,title:!0,style:!0,script:!0},w.XMLNS={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML",html:"http://www.w3.org/1999/xhtml"};class A{constructor(){this.DOMParser=w,this.NodeList=b,this.HTMLCollection=b,this.HTMLElement=f,this.DocumentFragment=b,this.Document=R,this.document=new R(this)}}var k=s(292),M=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function a(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};class S extends u.AbstractDOMAdaptor{constructor(){super(),this.parser=new w,this.window=new A}parse(t,e){return this.parser.parseFromString(t,e,this)}create(t,e=null){return new f(t)}text(t){return new x(t)}comment(t){return new L(t)}createDocument(){return new R}head(t=this.document){return t.head}body(t=this.document){return t.body}root(t=this.document){return t.root}doctype(t=this.document){return t.type}tags(t,e,s=null,i=null){let r=[];const n=[];if(s)return n;let o=t;for(;o;){const t=o.kind;if("#text"!==t&&"#comment"!==t){if(t===e&&(n.push(o),n.length===i))return n;o.children.length&&(r=o.children.concat(r))}o=r.shift()}return n}elementById(t,e){let s=[],i=t;for(;i;){if("#text"!==i.kind&&"#comment"!==i.kind){if(i.attributes.id===e)return i;i.children.length&&(s=i.children.concat(s))}i=s.shift()}return null}elementsByClass(t,e,s=null){let i=[];const r=[];let n=t;for(;n;){if("#text"!==n.kind&&"#comment"!==n.kind){if((n.attributes.class||"").trim().split(/ +/).includes(e)&&(r.push(n),r.length===s))return r;n.children.length&&(i=n.children.concat(i))}n=i.shift()}return r}elementsByAttribute(t,e,s,i=null){let r=[];const n=[];let o=t;for(;o;){if("#text"!==o.kind&&"#comment"!==o.kind){if(o.attributes[e]===s&&(n.push(o),n.length===i))return n;o.children.length&&(r=o.children.concat(r))}o=r.shift()}return n}getElements(t,e){let s=[];const i=this.body(e);for(const e of t)if("string"==typeof e)if("#"===e.charAt(0)){const t=this.elementById(i,e.slice(1));t&&s.push(t)}else if("."===e.charAt(0))s=s.concat(this.elementsByClass(i,e.slice(1)));else if(e.match(/^[-a-z][-a-z0-9]*$/i))s=s.concat(this.tags(i,e));else{const t=e.match(/^\[(.*?)="(.*?)"\]$/);t&&(s=s.concat(this.elementsByAttribute(i,t[1],t[2])))}else Array.isArray(e)?s=s.concat(e):e instanceof this.window.NodeList||e instanceof this.window.HTMLCollection?s=s.concat(e.nodes):s.push(e);return s}getElement(t,e=this.document){if(e instanceof R&&(e=this.body(e)),"#"===t.charAt(0))return this.elementById(e,t.slice(1));if("."===t.charAt(0))return this.elementsByClass(e,t.slice(1),1)[0];if(t.match(/^[-a-z][-a-z0-9]*$/i))return this.tags(e,t,null,1)[0];const s=t.match(/^\[(.*?)="(.*?)"\]$/);return s?this.elementsByAttribute(e,s[1],s[2],1)[0]:null}contains(t,e){for(;e&&e!==t;)e=this.parent(e);return!!e}parent(t){return t.parent}childIndex(t){return t.parent?t.parent.children.findIndex((e=>e===t)):-1}append(t,e){return e.parent&&this.remove(e),t.children.push(e),e.parent=t,e}insert(t,e){if(t.parent&&this.remove(t),e&&e.parent){const s=this.childIndex(e);e.parent.children.splice(s,0,t),t.parent=e.parent}}remove(t){const e=this.childIndex(t);return e>=0&&t.parent.children.splice(e,1),t.parent=null,t}replace(t,e){const s=this.childIndex(e);return s>=0&&(e.parent.children[s]=t,t.parent=e.parent,e.parent=null),e}clone(t,e=!0){const s=new f(t.kind);return s.attributes=Object.assign({},t.attributes),s.children=e?t.children.map((t=>{if("#text"===t.kind)return new x(t.value);if("#comment"===t.kind)return new L(t.value);{const e=this.clone(t);return e.parent=s,e}})):[],s}split(t,e){const s=new x(t.value.slice(e));return t.value=t.value.slice(0,e),t.parent.children.splice(this.childIndex(t)+1,0,s),s.parent=t.parent,s}next(t){const e=t.parent;if(!e)return null;const s=this.childIndex(t)+1;return s>=0&&s<e.children.length?e.children[s]:null}previous(t){const e=t.parent;if(!e)return null;const s=this.childIndex(t)-1;return s>=0?e.children[s]:null}firstChild(t){return t.children[0]}lastChild(t){return t.children[t.children.length-1]}childNodes(t){return[...t.children]}childNode(t,e){return t.children[e]}kind(t){return t.kind}value(t){return"#text"===t.kind?t.value:"#comment"===t.kind?t.value.replace(/^<!(--)?((?:.|\n)*)\1>$/,"$2"):""}textContent(t){return t.children.reduce(((t,e)=>t+("#text"===e.kind?e.value:"#comment"===e.kind?"":this.textContent(e))),"")}innerHTML(t){return this.parser.serializeInner(this,t)}outerHTML(t){return this.parser.serialize(this,t)}serializeXML(t){return this.parser.serialize(this,t,!0)}setAttribute(t,e,s,i=null){"string"!=typeof s&&(s=String(s)),i&&(e=i.replace(/.*\//,"")+":"+e.replace(/^.*:/,"")),t.attributes[e]=s,"style"===e&&(t.styles=null)}getAttribute(t,e){return t.attributes[e]}removeAttribute(t,e){delete t.attributes[e]}hasAttribute(t,e){return Object.hasOwn(t.attributes,e)}allAttributes(t){const e=t.attributes,s=[];for(const t of Object.keys(e))s.push({name:t,value:e[t]});return s}addClass(t,e){const s=t.attributes.class,i=(null==s?void 0:s.split(/ /))||[];i.includes(e)||(i.push(e),t.attributes.class=i.join(" "))}removeClass(t,e){const s=t.attributes.class,i=(null==s?void 0:s.split(/ /))||[],r=i.indexOf(e);r>=0&&(i.splice(r,1),t.attributes.class=i.join(" "))}hasClass(t,e){return(t.attributes.class||"").split(/ /).includes(e)}setStyle(t,e,s){t.styles||(t.styles=new k.Styles(this.getAttribute(t,"style"))),t.styles.set(e,s),t.attributes.style=t.styles.cssText}getStyle(t,e){if(!t.styles){const e=this.getAttribute(t,"style");if(!e)return"";t.styles=new k.Styles(e)}return t.styles.get(e)}allStyles(t){return this.getAttribute(t,"style")}insertRules(t,e){t.children=[this.text(this.textContent(t)+"\n\n"+e.join("\n\n"))]}fontSize(t){return 0}fontFamily(t){return""}nodeSize(t,e=1,s=null){return[0,0]}nodeBBox(t){return{left:0,right:0,top:0,bottom:0}}createWorker(){return M(this,void 0,void 0,(function*(){return null}))}}class _ extends(function(t,e={}){var s;return e=(0,p.userOptions)((0,p.defaultOptions)({},g),e),(s=class extends t{constructor(...t){super(t[0]),this.canMeasureNodes=!1;const e=this.constructor;this.options=(0,p.userOptions)((0,p.defaultOptions)({},e.OPTIONS),t[1])}fontSize(t){return e.badCSS?this.options.fontSize:super.fontSize(t)}fontFamily(t){return e.badCSS?this.options.fontFamily:super.fontFamily(t)}nodeSize(t,i=1,r=null){if(!e.badSizes)return super.nodeSize(t,i,r);const n=this.textContent(t),o=Array.from(n.replace(s.cjkPattern,"")).length;return[(Array.from(n).length-o)*this.options.cjkCharWidth+o*this.options.unknownCharWidth,this.options.unknownCharHeight]}nodeBBox(t){return e.badSizes?{left:0,right:0,top:0,bottom:0}:super.nodeBBox(t)}createWorker(t,e){return E(this,void 0,void 0,(function*(){const{Worker:s}=yield(0,m.asyncLoad)("node:worker_threads");const{path:i,maps:r}=e,n=`${i}/${e.worker}`,o=new class{constructor(t,e={}){this.worker=new s(t,e)}addEventListener(t,e){this.worker.on(t,e)}postMessage(t){this.worker.postMessage({data:t})}terminate(){this.worker.terminate()}}(n,{type:"module",workerData:{maps:r}});return o.addEventListener("message",t),o}))}}).OPTIONS=Object.assign(Object.assign({},e.badCSS?{fontSize:16,fontFamily:"Times"}:{}),e.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),s.cjkPattern=new RegExp(["[","\u1100-\u115f","\u2329\u232a","\u2e80-\u303e","\u3040-\u3247","\u3250-\u4dbf","\u4e00-\ua4c6","\ua960-\ua97c","\uac00-\ud7a3","\uf900-\ufaff","\ufe10-\ufe19","\ufe30-\ufe6b","\uff01-\uff60\uffe0-\uffe6","\u{1b000}-\u{1b001}","\u{1f200}-\u{1f251}","\u{20000}-\u{3fffd}","]"].join(""),"gu"),s}(S)){}function j(t=null){return new _(null,t)}MathJax.loader&&MathJax.loader.checkVersion("adaptors/liteDOM",d.x,"adaptors"),(0,h.combineWithMathJax)({_:{adaptors:{liteAdaptor:c,lite:{Document:r,Element:i,List:o,Parser:a,Text:n,Window:l}}}}),MathJax.startup&&(MathJax.startup.registerConstructor("liteAdaptor",j),MathJax.startup.useAdaptor("liteAdaptor",!0))},174:(t,e,s)=>{"use strict";s.r(e),s.d(e,{FunctionList:()=>r});var i=s(983);class r extends i.PrioritizedList{constructor(t=null){super(),t&&this.addList(t)}addList(t){for(const e of t)Array.isArray(e)?this.add(e[0],e[1]):this.add(e)}execute(...t){for(const e of this){if(!1===e.item(...t))return!1}return!0}asyncExecute(...t){let e=-1;const s=this.items;return new Promise(((i,r)=>{!function n(){for(;++e<s.length;){const o=s[e].item(...t);if(o instanceof Promise)return void o.then(n).catch((t=>r(t)));if(!1===o)return void i(!1)}i(!0)}()}))}}},281:(t,e,s)=>{"use strict";s.d(e,{s:()=>n});var i=s(288);const r=s(939).context.path(i.p),n={core:`${r}/core/core.js`,"adaptors/jsdom":`${r}/adaptors/jsdom/jsdom.js`,"adaptors/linkedom":`${r}/adaptors/linkedom/linkedom.js`,"adaptors/liteDOM":`${r}/adaptors/liteDOM/liteDOM.js`,"input/tex":`${r}/input/tex/tex.js`,"input/tex-base":`${r}/input/tex-base/tex-base.js`,"input/tex-full":`${r}/input/tex-full/tex-full.js`,"[tex]/action":`${r}/input/tex/extensions/action/action.js`,"[tex]/ams":`${r}/input/tex/extensions/ams/ams.js`,"[tex]/amscd":`${r}/input/tex/extensions/amscd/amscd.js`,"[tex]/autoload":`${r}/input/tex/extensions/autoload/autoload.js`,"[tex]/bbm":`${r}/input/tex/extensions/bbm/bbm.js`,"[tex]/bboldx":`${r}/input/tex/extensions/bboldx/bboldx.js`,"[tex]/bbox":`${r}/input/tex/extensions/bbox/bbox.js`,"[tex]/begingroup":`${r}/input/tex/extensions/begingroup/begingroup.js`,"[tex]/boldsymbol":`${r}/input/tex/extensions/boldsymbol/boldsymbol.js`,"[tex]/braket":`${r}/input/tex/extensions/braket/braket.js`,"[tex]/bussproofs":`${r}/input/tex/extensions/bussproofs/bussproofs.js`,"[tex]/cancel":`${r}/input/tex/extensions/cancel/cancel.js`,"[tex]/cases":`${r}/input/tex/extensions/cases/cases.js`,"[tex]/centernot":`${r}/input/tex/extensions/centernot/centernot.js`,"[tex]/color":`${r}/input/tex/extensions/color/color.js`,"[tex]/colortbl":`${r}/input/tex/extensions/colortbl/colortbl.js`,"[tex]/colorv2":`${r}/input/tex/extensions/colorv2/colorv2.js`,"[tex]/configmacros":`${r}/input/tex/extensions/configmacros/configmacros.js`,"[tex]/dsfont":`${r}/input/tex/extensions/dsfont/dsfont.js`,"[tex]/empheq":`${r}/input/tex/extensions/empheq/empheq.js`,"[tex]/enclose":`${r}/input/tex/extensions/enclose/enclose.js`,"[tex]/extpfeil":`${r}/input/tex/extensions/extpfeil/extpfeil.js`,"[tex]/gensymb":`${r}/input/tex/extensions/gensymb/gensymb.js`,"[tex]/html":`${r}/input/tex/extensions/html/html.js`,"[tex]/mathtools":`${r}/input/tex/extensions/mathtools/mathtools.js`,"[tex]/mhchem":`${r}/input/tex/extensions/mhchem/mhchem.js`,"[tex]/newcommand":`${r}/input/tex/extensions/newcommand/newcommand.js`,"[tex]/noerrors":`${r}/input/tex/extensions/noerrors/noerrors.js`,"[tex]/noundefined":`${r}/input/tex/extensions/noundefined/noundefined.js`,"[tex]/physics":`${r}/input/tex/extensions/physics/physics.js`,"[tex]/require":`${r}/input/tex/extensions/require/require.js`,"[tex]/setoptions":`${r}/input/tex/extensions/setoptions/setoptions.js`,"[tex]/tagformat":`${r}/input/tex/extensions/tagformat/tagformat.js`,"[tex]/texhtml":`${r}/input/tex/extensions/texhtml/texhtml.js`,"[tex]/textcomp":`${r}/input/tex/extensions/textcomp/textcomp.js`,"[tex]/textmacros":`${r}/input/tex/extensions/textmacros/textmacros.js`,"[tex]/unicode":`${r}/input/tex/extensions/unicode/unicode.js`,"[tex]/units":`${r}/input/tex/extensions/units/units.js`,"[tex]/upgreek":`${r}/input/tex/extensions/upgreek/upgreek.js`,"[tex]/verb":`${r}/input/tex/extensions/verb/verb.js`,"input/mml":`${r}/input/mml/mml.js`,"input/mml/entities":`${r}/input/mml/entities/entities.js`,"[mml]/mml3":`${r}/input/mml/extensions/mml3/mml3.js`,"input/asciimath":`${r}/input/asciimath/asciimath.js`,"output/chtml":`${r}/output/chtml/chtml.js`,"output/svg":`${r}/output/svg/svg.js`,"a11y/assistive-mml":`${r}/a11y/assistive-mml/assistive-mml.js`,"a11y/semantic-enrich":`${r}/a11y/semantic-enrich/semantic-enrich.js`,"a11y/speech":`${r}/a11y/speech/speech.js`,"a11y/complexity":`${r}/a11y/complexity/complexity.js`,"a11y/explorer":`${r}/a11y/explorer/explorer.js`,"a11y/sre":`${r}/a11y/sre/sre.js`,"[mathmaps]":`${r}/../../bundle/sre/mathmaps`,"ui/lazy":`${r}/ui/lazy/lazy.js`,"ui/menu":`${r}/ui/menu/menu.js`,"ui/safe":`${r}/ui/safe/safe.js`,"mml-chtml":`${r}/mml-chtml/mml-chtml.js`,"mml-chtml-nofont":`${r}/mml-chtml-nofont/mml-chtml-nofont.js`,"mml-svg":`${r}/mml-svg/mml-svg.js`,"mml-svg-nofont":`${r}/mml-svg-nofont/mml-svg-nofont.js`,"tex-chtml":`${r}/tex-chtml/tex-chtml.js`,"tex-chtml-nofont":`${r}/tex-chtml-nofont/tex-chtml-nofont.js`,"tex-svg":`${r}/tex-svg/tex-svg.js`,"tex-svg-nofont":`${r}/tex-svg-nofont/tex-svg-nofont.js`,"tex-mml-chtml":`${r}/tex-mml-chtml/tex-mml-chtml.js`,"tex-mml-chtml-nofont":`${r}/tex-mml-chtml-nofont/tex-mml-chtml-nofont.js`,"tex-mml-svg":`${r}/tex-mml-svg/tex-mml-svg.js`,"tex-mml-svg-nofont":`${r}/tex-mml-svg-nofont/tex-mml-svg-nofont.js`,loader:`${r}/loader/loader.js`,startup:`${r}/startup/startup.js`}},288:t=>{t.exports.p="/"},292:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Styles:()=>m,TRBL:()=>i,WSC:()=>r});const i=["top","right","bottom","left"],r=["width","style","color"];function n(t){const e=t.split(/((?:'[^'\n]*'|"[^"\n]*"|,[\s\n]|[^\s\n])*)/g),s=[];for(;e.length>1;)e.shift(),s.push(e.shift());return s}function o(t){const e=n(this.styles[t]);0===e.length&&e.push(""),1===e.length&&e.push(e[0]),2===e.length&&e.push(e[0]),3===e.length&&e.push(e[1]);for(const s of m.connect[t].children)this.setStyle(this.childName(t,s),e.shift())}function a(t){const e=m.connect[t].children,s=[];for(const i of e){const e=this.styles[t+"-"+i];if(!e)return void delete this.styles[t];s.push(e)}s[3]===s[1]&&(s.pop(),s[2]===s[0]&&(s.pop(),s[1]===s[0]&&s.pop())),this.styles[t]=s.join(" ")}const l=/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,c=/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/;function h(t){const e={width:"",style:"",color:""};for(const s of n(this.styles[t]))s.match(l)&&""===e.width?e.width=s:s.match(c)&&""===e.style?e.style=s:e.color=s;for(const s of m.connect[t].children)this.setStyle(this.childName(t,s),e[s])}function d(t){const e=[];for(const s of m.connect[t].children){const i=this.styles[this.childName(t,s)];i&&e.push(i)}e.length?this.styles[t]=e.join(" "):delete this.styles[t]}const u={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[\\d.]+%|[\\d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$")};function p(t,e){for(const s of m.connect[t].children){const i=this.childName(t,s);if(Array.isArray(e[s])){const t=e[s];t.length&&(this.styles[i]=t.join(" "))}else""!==e[s]&&(this.styles[i]=e[s])}}class m{constructor(t=""){this.parse(t)}sanitizeValue(t){const e=this.constructor.pattern;if(!t.match(e.sanitize))return t;const s=(t=t.replace(e.value,"$1")).replace(/\\./g,"").replace(/(['"]).*?\1/g,"").replace(/[^'"]/g,"");return s.length&&(t+=s.charAt(0)),t}get cssText(){var t,e;const s=[];for(const i of Object.keys(this.styles)){const r=this.parentName(i),n=i.replace(/.*-/,"");this.styles[r]&&(null===(e=null===(t=m.connect[r])||void 0===t?void 0:t.children)||void 0===e?void 0:e.includes(n))||s.push(`${i}: ${this.styles[i]};`)}return s.join(" ")}get styleList(){return Object.assign({},this.styles)}set(t,e){var s,i;for(t=this.normalizeName(t),this.setStyle(t,String(e)),m.connect[t]&&!m.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/);){const e=t;if(t=this.parentName(t),!m.connect[e]&&!(null===(i=null===(s=m.connect[t])||void 0===s?void 0:s.children)||void 0===i?void 0:i.includes(e.substring(t.length+1))))break;m.connect[t].combine.call(this,t)}}get(t){return t=this.normalizeName(t),Object.hasOwn(this.styles,t)?this.styles[t]:""}setStyle(t,e){this.styles[t]=this.sanitizeValue(e),m.connect[t]&&m.connect[t].children&&m.connect[t].split.call(this,t),""===e&&delete this.styles[t]}combineChildren(t){const e=this.parentName(t);for(const s of m.connect[t].children){const t=this.childName(e,s);m.connect[t].combine.call(this,t)}}parentName(t){const e=t.replace(/-[^-]*$/,"");return t===e?"":e}childName(t,e){return e.match(/-/)?e:(m.connect[t]&&!m.connect[t].combine&&(e+=t.replace(/.*-/,"-"),t=this.parentName(t)),t+"-"+e)}normalizeName(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}parse(t=""){const e=this.constructor.pattern;this.styles={};const s=t.replace(/\n/g," ").replace(e.comment,"").split(e.style);for(;s.length>1;){const[t,e,i]=s.splice(0,3);if(t.match(/[^\s\n;]/))return;this.set(e,i)}}}m.pattern={sanitize:/['";]/,value:/^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},m.connect={padding:{children:i,split:o,combine:a},margin:{children:i,split:o,combine:a},border:{children:i,split:function(t){for(const e of m.connect[t].children)this.setStyle(this.childName(t,e),this.styles[t])},combine:function(t){const e=[...m.connect[t].children],s=this.styles[this.childName(t,e.shift())];for(const i of e)if(this.styles[this.childName(t,i)]!==s)return void delete this.styles[t];this.styles[t]=s}},"border-top":{children:r,split:h,combine:d},"border-right":{children:r,split:h,combine:d},"border-bottom":{children:r,split:h,combine:d},"border-left":{children:r,split:h,combine:d},"border-width":{children:i,split:o,combine:null},"border-style":{children:i,split:o,combine:null},"border-color":{children:i,split:o,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:function(t){const e=n(this.styles[t]),s={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};for(const t of e){s.family||(s.family=t);for(const e of Object.keys(u))if((Array.isArray(s[e])||""===s[e])&&t.match(u[e]))if(s.family===t&&(s.family=""),"size"===e){const[i,r]=t.split(/\//);s[e]=i,r&&(s["line-height"]=r)}else""===s.size&&(Array.isArray(s[e])?s[e].push(t):""===s[e]&&(s[e]=t))}p.call(this,t,s),delete this.styles[t]},combine:function(t){}}}},296:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Package:()=>o,PackageError:()=>n});var i=s(648),r=s(939);class n extends Error{constructor(t,e){super(t),this.package=e}}class o{get canLoad(){return 0===this.dependencyCount&&!this.noLoad&&!this.isLoading&&!this.hasFailed}static loadPromise(t){const e=i.CONFIG[t]||{},s=e.extraLoads?i.Loader.load(...e.extraLoads):Promise.resolve(),r=e.checkReady||(()=>Promise.resolve());return s.then((()=>r()))}static resolvePath(t,e=!0){const s={name:t,original:t,addExtension:e};return i.Loader.pathFilters.execute(s),s.name}static loadAll(){for(const t of this.packages.values())t.canLoad&&t.load()}constructor(t,e=!1){this.isLoaded=!1,this.result={},this.isLoading=!1,this.hasFailed=!1,this.dependents=[],this.dependencies=[],this.dependencyCount=0,this.provided=[],this.name=t,this.noLoad=e,o.packages.set(t,this),this.promise=this.makePromise(this.makeDependencies())}makeDependencies(){const t=[],e=o.packages,s=this.noLoad,r=this.name,n=[];Object.hasOwn(i.CONFIG.dependencies,r)?n.push(...i.CONFIG.dependencies[r]):"core"!==r&&n.push("core");for(const i of n){const r=e.get(i)||new o(i,s);this.dependencies.includes(r)||(r.addDependent(this,s),this.dependencies.push(r),r.isLoaded||(this.dependencyCount++,t.push(r.promise)))}return t}makePromise(t){let e=new Promise(((t,e)=>{this.resolve=t,this.reject=e}));const s=i.CONFIG[this.name]||{};return s.ready&&(e=e.then((t=>s.ready(this.name)))),t.length&&(t.push(e),e=Promise.all(t).then((t=>t.join(", ")))),s.failed&&e.catch((t=>s.failed(new n(t,this.name)))),e}load(){if(!this.isLoaded&&!this.isLoading&&!this.noLoad){this.isLoading=!0;const t=o.resolvePath(this.name);i.CONFIG.require?this.loadCustom(t):this.loadScript(t)}}loadCustom(t){try{const e=i.CONFIG.require(t);e instanceof Promise?e.then((t=>this.result=t)).then((()=>this.checkLoad())).catch((e=>this.failed("Can't load \""+t+'"\n'+e.message.trim()))):(this.result=e,this.checkLoad())}catch(t){this.failed(t.message)}}loadScript(t){const e=r.context.document.createElement("script");e.src=t,e.charset="UTF-8",e.onload=t=>this.checkLoad(),e.onerror=e=>this.failed("Can't load \""+t+'"'),r.context.document.head.appendChild(e)}loaded(){this.isLoaded=!0,this.isLoading=!1;for(const t of this.dependents)t.requirementSatisfied();for(const t of this.provided)t.loaded();this.resolve(this.name)}failed(t){this.hasFailed=!0,this.isLoading=!1,this.reject(new n(t,this.name))}checkLoad(){o.loadPromise(this.name).then((()=>this.loaded())).catch((t=>this.failed(t)))}requirementSatisfied(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())}provides(t=[]){for(const e of t){let t=o.packages.get(e);t||(i.CONFIG.dependencies[e]||(i.CONFIG.dependencies[e]=[]),i.CONFIG.dependencies[e].push(e),t=new o(e,!0),t.isLoading=!0),this.provided.push(t)}}addDependent(t,e){this.dependents.push(t),e||this.checkNoLoad()}checkNoLoad(){if(this.noLoad){this.noLoad=!1;for(const t of this.dependencies)t.checkNoLoad()}}}o.packages=new Map},462:(t,e,s)=>{"use strict";function i(t){return new Promise((function e(s,i){const r=t=>{var r;t.retry instanceof Promise?t.retry.then((()=>e(s,i))).catch((t=>i(t))):(null===(r=t.restart)||void 0===r?void 0:r.isCallback)?MathJax.Callback.After((()=>e(s,i)),t.restart):i(t)};try{const e=t();e instanceof Promise?e.then((t=>s(t))).catch((t=>r(t))):s(e)}catch(t){r(t)}}))}function r(t){const e=new Error("MathJax retry -- an asynchronous action is required; try using one of the promise-based functions and await its resolution.");throw e.retry=t,e}s.r(e),s.d(e,{handleRetriesFor:()=>i,retryAfter:()=>r})},502:(t,e,s)=>{"use strict";s.r(e),s.d(e,{AbstractDOMAdaptor:()=>i});class i{constructor(t=null){this.canMeasureNodes=!0,this.document=t}node(t,e={},s=[],i){const r=this.create(t,i);this.setAttributes(r,e);for(const t of s)this.append(r,t);return r}setProperty(t,e,s){t[e]=s}getProperty(t,e){return t[e]}setAttributes(t,e){if(e.style&&"string"!=typeof e.style)for(const s of Object.keys(e.style))this.setStyle(t,s.replace(/-([a-z])/g,((t,e)=>e.toUpperCase())),e.style[s]);if(e.properties)for(const s of Object.keys(e.properties))t[s]=e.properties[s];for(const s of Object.keys(e))"style"===s&&"string"!=typeof e.style||"properties"===s||this.setAttribute(t,s,e[s])}replace(t,e){return this.insert(t,e),this.remove(e),e}childNode(t,e){return this.childNodes(t)[e]}allClasses(t){const e=this.getAttribute(t,"class");return e?e.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]}cssText(t){return"style"===this.kind(t)?this.textContent(t):""}}},516:(t,e,s)=>{"use strict";s.d(e,{x:()=>i});const i="4.1.0"},586:(t,e,s)=>{"use strict";var i={};s.r(i),s.d(i,{HTMLAdaptor:()=>yt});var r={};s.r(r),s.d(r,{browserAdaptor:()=>It});var n={};s.r(n),s.d(n,{AbstractFindMath:()=>vt});var o={};s.r(o),s.d(o,{AbstractInputJax:()=>Dt});var a={};s.r(a),s.d(a,{AbstractOutputJax:()=>Tt});var l={};s.r(l),s.d(l,{END:()=>wt,LinkedList:()=>kt,ListItem:()=>At});var c={};s.r(c),s.d(c,{AbstractMathList:()=>Mt});var h={};s.r(h),s.d(h,{AbstractMathItem:()=>_t,STATE:()=>jt,newState:()=>Pt,protoItem:()=>St});var d={};s.r(d),s.d(d,{AbstractFactory:()=>Bt});var u={};s.r(u),s.d(u,{AbstractNodeFactory:()=>Wt});var p={};s.r(p),s.d(p,{Attributes:()=>Ft,INHERIT:()=>Ht});var m={};s.r(m),s.d(m,{AbstractEmptyNode:()=>zt,AbstractNode:()=>$t});var E={};s.r(E),s.d(E,{AbstractMmlBaseNode:()=>Qt,AbstractMmlEmptyNode:()=>te,AbstractMmlLayoutNode:()=>Zt,AbstractMmlNode:()=>Vt,AbstractMmlTokenNode:()=>Yt,MATHVARIANTS:()=>Ut,TEXCLASS:()=>Jt,TEXCLASSNAMES:()=>qt,TextNode:()=>ee,XMLNode:()=>se,indentAttributes:()=>Gt});var g={};s.r(g),s.d(g,{MmlMath:()=>ie});var f={};s.r(f),s.d(f,{MmlMi:()=>re});var R={};s.r(R),s.d(R,{MmlMn:()=>ne});var x={};s.r(x),s.d(x,{MMLSPACING:()=>he,MO:()=>ae,OPDEF:()=>oe,OPTABLE:()=>de,RANGES:()=>le,getRange:()=>ce});var L={};s.r(L),s.d(L,{isPercent:()=>ge,quotePattern:()=>pe,replaceUnicode:()=>Re,sortLength:()=>ue,split:()=>fe,toEntity:()=>xe,unicodeChars:()=>me,unicodeString:()=>Ee});var b={};s.r(b),s.d(b,{MmlMo:()=>Le});var y={};s.r(y),s.d(y,{MmlMtext:()=>be});var N={};s.r(N),s.d(N,{MmlMspace:()=>ye});var I={};s.r(I),s.d(I,{MmlMs:()=>Ne});var O={};s.r(O),s.d(O,{MmlInferredMrow:()=>Oe,MmlMrow:()=>Ie});var v={};s.r(v),s.d(v,{MmlMfrac:()=>ve});var C={};s.r(C),s.d(C,{MmlMsqrt:()=>Ce});var D={};s.r(D),s.d(D,{MmlMroot:()=>De});var T={};s.r(T),s.d(T,{MmlMstyle:()=>Te});var w={};s.r(w),s.d(w,{MmlMerror:()=>we});var A={};s.r(A),s.d(A,{MmlMpadded:()=>Ae});var k={};s.r(k),s.d(k,{MmlMphantom:()=>ke});var M={};s.r(M),s.d(M,{MmlMfenced:()=>Me});var S={};s.r(S),s.d(S,{MmlMenclose:()=>Se});var _={};s.r(_),s.d(_,{MmlMaction:()=>_e});var j={};s.r(j),s.d(j,{MmlMsub:()=>Pe,MmlMsubsup:()=>je,MmlMsup:()=>Be});var P={};s.r(P),s.d(P,{MmlMover:()=>Fe,MmlMunder:()=>He,MmlMunderover:()=>We});var B={};s.r(B),s.d(B,{MmlMmultiscripts:()=>$e,MmlMprescripts:()=>ze,MmlNone:()=>Je});var W={};s.r(W),s.d(W,{MmlMtable:()=>qe});var H={};s.r(H),s.d(H,{MmlMlabeledtr:()=>Xe,MmlMtr:()=>Ke});var F={};s.r(F),s.d(F,{MmlMtd:()=>Ue});var $={};s.r($),s.d($,{MmlMaligngroup:()=>Ge});var z={};s.r(z),s.d(z,{MmlMalignmark:()=>Ve});var J={};s.r(J),s.d(J,{MmlMglyph:()=>Ye});var q={};s.r(q),s.d(q,{MmlAnnotation:()=>ts,MmlAnnotationXML:()=>Qe,MmlSemantics:()=>Ze});var K={};s.r(K),s.d(K,{TeXAtom:()=>es});var X={};s.r(X),s.d(X,{MathChoice:()=>ss});var U={};s.r(U),s.d(U,{HtmlNode:()=>is});var G={};s.r(G),s.d(G,{MML:()=>rs});var V={};s.r(V),s.d(V,{MmlFactory:()=>ns});var Y={};s.r(Y),s.d(Y,{BitField:()=>os,BitFieldClass:()=>as});var Z={};s.r(Z),s.d(Z,{AbstractMathDocument:()=>fs,RenderList:()=>ds,resetAllOptions:()=>ps,resetOptions:()=>us});var Q={};s.r(Q),s.d(Q,{AbstractHandler:()=>xs});var tt={};s.r(tt),s.d(tt,{AbstractVisitor:()=>bs});var et={};s.r(et),s.d(et,{DATAMJX:()=>ys,MmlVisitor:()=>Ns});var st={};s.r(st),s.d(st,{MathMLVisitor:()=>Is});var it={};s.r(it),s.d(it,{SerializedMmlVisitor:()=>Os});var rt={};s.r(rt),s.d(rt,{AbstractWrapper:()=>vs});var nt={};s.r(nt),s.d(nt,{AbstractWrapperFactory:()=>Cs});var ot={};s.r(ot),s.d(ot,{HTMLMathItem:()=>Ts});var at={};s.r(at),s.d(at,{HTMLMathList:()=>ws});var lt={};s.r(lt),s.d(lt,{HTMLDomStrings:()=>As});var ct={};s.r(ct),s.d(ct,{HTMLDocument:()=>ks});var ht={};s.r(ht),s.d(ht,{HTMLHandler:()=>Ms});var dt={};s.r(dt),s.d(dt,{RegisterHTMLHandler:()=>Ss});var ut={};s.r(ut),s.d(ut,{StyleJsonSheet:()=>_s});var pt={};s.r(pt),s.d(pt,{DraggableDialog:()=>Ws,isDialog:()=>Bs});var mt={};s.r(mt),s.d(mt,{InfoDialog:()=>Hs});var Et={};s.r(Et),s.d(Et,{BIGDIMEN:()=>$s,MATHSPACE:()=>qs,RELUNITS:()=>Js,UNITS:()=>zs,em:()=>Us,length2em:()=>Ks,percent:()=>Xs,px:()=>Gs});var gt={};s.r(gt),s.d(gt,{BBox:()=>Vs});var ft={};s.r(ft),s.d(ft,{max:()=>ti,sum:()=>Qs});var Rt=s(977),xt=s(516),Lt=s(502),bt=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function a(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};class yt extends Lt.AbstractDOMAdaptor{constructor(t){super(t.document),this.canMeasureNodes=!0,this.window=t,this.parser=new t.DOMParser}parse(t,e="text/html"){return this.parser.parseFromString(t,e)}create(t,e){return e?this.document.createElementNS(e,t):this.document.createElement(t)}text(t){return this.document.createTextNode(t)}head(t=this.document){return t.head||t}body(t=this.document){return t.body||t}root(t=this.document){return t.documentElement||t}doctype(t=this.document){return t.doctype?`<!DOCTYPE ${t.doctype.name}>`:""}tags(t,e,s=null){const i=s?t.getElementsByTagNameNS(s,e):t.getElementsByTagName(e);return Array.from(i)}getElements(t,e){let s=[];for(const e of t)"string"==typeof e?s=s.concat(Array.from(this.document.querySelectorAll(e))):Array.isArray(e)||e instanceof this.window.NodeList||e instanceof this.window.HTMLCollection?s=s.concat(Array.from(e)):s.push(e);return s}getElement(t,e=this.document){return e.querySelector(t)}contains(t,e){return t.contains(e)}parent(t){return t.parentNode}append(t,e){return t.appendChild(e)}insert(t,e){return this.parent(e).insertBefore(t,e)}remove(t){return this.parent(t).removeChild(t)}replace(t,e){return this.parent(e).replaceChild(t,e)}clone(t,e=!0){return t.cloneNode(e)}split(t,e){return t.splitText(e)}next(t){return t.nextSibling}previous(t){return t.previousSibling}firstChild(t){return t.firstChild}lastChild(t){return t.lastChild}childNodes(t){return Array.from(t.childNodes)}childNode(t,e){return t.childNodes[e]}kind(t){const e=t.nodeType;return 1===e||3===e||8===e?t.nodeName.toLowerCase():""}value(t){return t.nodeValue||""}textContent(t){return t.textContent}innerHTML(t){return t.innerHTML}outerHTML(t){return t.outerHTML}serializeXML(t){return(new this.window.XMLSerializer).serializeToString(t)}setAttribute(t,e,s,i=null){return i?(e=i.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(i,e,s)):("style"===e&&(s=s.replace(/\n/g," ")),t.setAttribute(e,s))}getAttribute(t,e){return t.getAttribute(e)}removeAttribute(t,e){return t.removeAttribute(e)}hasAttribute(t,e){return t.hasAttribute(e)}allAttributes(t){return Array.from(t.attributes).map((t=>({name:t.name,value:t.value})))}addClass(t,e){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim()}removeClass(t,e){t.classList?t.classList.remove(e):t.className=t.className.split(/ /).filter((t=>t!==e)).join(" ")}hasClass(t,e){return t.classList?t.classList.contains(e):t.className.split(/ /).includes(e)}setStyle(t,e,s){t.style[e]=String(s).replace(/\n/g," ")}getStyle(t,e){return t.style[e]}allStyles(t){return t.style.cssText}insertRules(t,e){for(const s of e)try{t.sheet.insertRule(s,t.sheet.cssRules.length)}catch(t){console.warn(`MathJax: can't insert css rule '${s}': ${t.message}`)}}cssText(t){return"style"!==this.kind(t)?"":Array.from(t.sheet.cssRules).map((t=>t.cssText)).join("\n")}fontSize(t){const e=this.window.getComputedStyle(t);return parseFloat(e.fontSize||String(this.constructor.DEFAULT_FONT_SIZE))}fontFamily(t){return this.window.getComputedStyle(t).fontFamily||""}nodeSize(t,e=1,s=!1){if(s&&t.getBBox){const{width:s,height:i}=t.getBBox();return[s/e,i/e]}return[t.offsetWidth/e,t.offsetHeight/e]}nodeBBox(t){const{left:e,right:s,top:i,bottom:r}=t.getBoundingClientRect();return{left:e,right:s,top:i,bottom:r}}createWorker(t,e){return bt(this,void 0,void 0,(function*(){const{path:s,maps:i,worker:r}=e,n=`${s}/${r}`,o=`\n self.maps = '${Nt(i)}';\n importScripts('${Nt(n)}');\n `,a=URL.createObjectURL(new Blob([o],{type:"text/javascript"})),l=new Worker(a);return l.onmessage=t,URL.revokeObjectURL(a),l}))}}function Nt(t){return[...t].map((t=>("\\"===t||"'"===t?t="\\"+t:(t<" "||t>"~")&&(t=`\\u{${t.codePointAt(0).toString(16)}}`),t))).join("")}function It(){return new yt(window)}yt.DEFAULT_FONT_SIZE=16;var Ot=s(6);class vt{constructor(t){const e=this.constructor;this.options=(0,Ot.userOptions)((0,Ot.defaultOptions)({},e.OPTIONS),t)}}vt.OPTIONS={};var Ct=s(174);class Dt{constructor(t={}){this.adaptor=null,this.mmlFactory=null;const e=this.constructor;this.options=(0,Ot.userOptions)((0,Ot.defaultOptions)({},e.OPTIONS),t),this.preFilters=new Ct.FunctionList(this.options.preFilters),this.postFilters=new Ct.FunctionList(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}setMmlFactory(t){this.mmlFactory=t}initialize(){}reset(...t){}get processStrings(){return!0}findMath(t,e){return[]}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}Dt.NAME="generic",Dt.OPTIONS={preFilters:[],postFilters:[]};class Tt{constructor(t={}){this.adaptor=null;const e=this.constructor;this.options=(0,Ot.userOptions)((0,Ot.defaultOptions)({},e.OPTIONS),t),this.preFilters=new Ct.FunctionList(this.options.preFilters),this.postFilters=new Ct.FunctionList(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}initialize(){}reset(...t){}getMetrics(t){}styleSheet(t){return null}pageElements(t){return null}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}Tt.NAME="generic",Tt.OPTIONS={preFilters:[],postFilters:[]};const wt=Symbol();class At{constructor(t=null){this.next=null,this.prev=null,this.data=t}}class kt{constructor(...t){this.list=new At(wt),this.list.next=this.list.prev=this.list,this.push(...t)}isBefore(t,e){return t<e}push(...t){for(const e of t){const t=new At(e);t.next=this.list,t.prev=this.list.prev,this.list.prev=t,t.prev.next=t}return this}pop(){const t=this.list.prev;return t.data===wt?null:(this.list.prev=t.prev,t.prev.next=this.list,t.next=t.prev=null,t.data)}unshift(...t){for(const e of t.slice(0).reverse()){const t=new At(e);t.next=this.list.next,t.prev=this.list,this.list.next=t,t.next.prev=t}return this}shift(){const t=this.list.next;return t.data===wt?null:(this.list.next=t.next,t.next.prev=this.list,t.next=t.prev=null,t.data)}remove(...t){const e=new Map;for(const s of t)e.set(s,!0);let s=this.list.next;for(;s.data!==wt;){const t=s.next;e.has(s.data)&&(s.prev.next=s.next,s.next.prev=s.prev,s.next=s.prev=null),s=t}return this}clear(){return this.list.next.prev=this.list.prev.next=null,this.list.next=this.list.prev=this.list,this}*[Symbol.iterator](){let t=this.list.next;for(;t.data!==wt;)yield t.data,t=t.next}*reversed(){let t=this.list.prev;for(;t.data!==wt;)yield t.data,t=t.prev}insert(t,e=null){null===e&&(e=this.isBefore.bind(this));const s=new At(t);let i=this.list.next;for(;i.data!==wt&&e(i.data,s.data);)i=i.next;return s.prev=i.prev,s.next=i,i.prev.next=i.prev=s,this}sort(t=null){null===t&&(t=this.isBefore.bind(this));const e=[];for(const t of this)e.push(new kt(t));for(this.list.next=this.list.prev=this.list;e.lengt