Files
anthropic-client/docs/public/tex-svg-full-SL33OL2J.min.js
T

106 lines
2.2 MiB
JavaScript
Raw Normal View History

2024-11-19 20:13:35 +00:00
import{a as M6}from"./chunk-OSRY5VT3.min.js";var _6=M6((exports,module)=>{(function(){"use strict";var __webpack_modules__={351:function(A,t,d){var f,v=this&&this.__extends||(f=function(s,T){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(c[h]=p[h])},f(s,T)},function(s,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function c(){this.constructor=s}f(s,T),s.prototype=T===null?Object.create(T):(c.prototype=T.prototype,new c)}),g=this&&this.__assign||function(){return g=Object.assign||function(s){for(var T,c=1,p=arguments.length;c<p;c++)for(var h in T=arguments[c])Object.prototype.hasOwnProperty.call(T,h)&&(s[h]=T[h]);return s},g.apply(this,arguments)},l=this&&this.__read||function(s,T){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var p,h,m=c.call(s),L=[];try{for(;(T===void 0||T-- >0)&&!(p=m.next()).done;)L.push(p.value)}catch(H){h={error:H}}finally{try{p&&!p.done&&(c=m.return)&&c.call(m)}finally{if(h)throw h.error}}return L},u=this&&this.__spreadArray||function(s,T,c){if(c||arguments.length===2)for(var p,h=0,m=T.length;h<m;h++)!p&&h in T||(p||(p=Array.prototype.slice.call(T,0,h)),p[h]=T[h]);return s.concat(p||Array.prototype.slice.call(T))},Q=this&&this.__values||function(s){var T=typeof Symbol=="function"&&Symbol.iterator,c=T&&s[T],p=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&p>=s.length&&(s=void 0),{value:s&&s[p++],done:!s}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AssistiveMmlHandler=t.AssistiveMmlMathDocumentMixin=t.AssistiveMmlMathItemMixin=t.LimitedMmlVisitor=void 0;var o=d(4474),r=d(9259),e=d(7233),n=function(s){function T(){return s!==null&&s.apply(this,arguments)||this}return v(T,s),T.prototype.getAttributes=function(c){return s.prototype.getAttributes.call(this,c).replace(/ ?id=".*?"/,"")},T}(r.SerializedMmlVisitor);function i(s){return function(T){function c(){return T!==null&&T.apply(this,arguments)||this}return v(c,T),c.prototype.assistiveMml=function(p,h){if(h===void 0&&(h=!1),!(this.state()>=o.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(p.options.enableAssistiveMml||h)){var m=p.adaptor,L=p.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),H=m.firstChild(m.body(m.parse(L,"text/html"))),y=m.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[H]);m.setAttribute(m.firstChild(this.typesetRoot),"aria-hidden","true"),m.setStyle(this.typesetRoot,"position","relative"),m.append(this.typesetRoot,y)}this.state(o.STATE.ASSISTIVEMML)}},c}(s)}function a(s){var T;return T=function(c){function p(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];var L=c.apply(this,u([],l(h),!1))||this,H=L.constructor,y=H.ProcessBits;return y.has("assistive-mml")||y.allocate("assistive-mml"),L.visitor=new n(L.mmlFactory),L.options.MathItem=i(L.options.MathItem),"addStyles"in L&&L.addStyles(H.assistiveStyles),L}return v(p,c),p.prototype.toMML=function(h){return this.visitor.visitTree(h)},p.prototype.assistiveMml=function(){var h,m;if(!this.processed.isSet("assistive-mml")){try{for(var L=Q(this.math),H=L.next();!H.done;H=L.next())H.value.assistiveMml(this)}catch(y){h={error:y}}finally{try{H&&!H.done&&(m=L.return)&&m.call(L)}finally{if(h)throw h.error}}this.processed.set("assistive-mml")}return this},p.prototype.state=function(h,m){return m===void 0&&(m=!1),c.prototype.state.call(this,h,m),h<o.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},p}(s),T.OPTIONS=g(g({},s.OPTIONS),{enableAssistiveMml:!0,renderActions:(0,e.expandable)(g(g({},s.OPTIONS.renderActions),{assistiveMml:[o.STATE.ASSISTIVEMML]}))}),T.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !import
`+s.message.trim())}):this.checkLoad()}catch(s){this.failed(s.message)}},e.prototype.loadScript=function(n){var i=this,a=document.createElement("script");a.src=n,a.charset="UTF-8",a.onload=function(s){return i.checkLoad()},a.onerror=function(s){return i.failed(`Can't load "`+n+'"')},document.head.appendChild(a)},e.prototype.loaded=function(){var n,i,a,s;this.isLoaded=!0,this.isLoading=!1;try{for(var T=g(this.dependents),c=T.next();!c.done;c=T.next())c.value.requirementSatisfied()}catch(m){n={error:m}}finally{try{c&&!c.done&&(i=T.return)&&i.call(T)}finally{if(n)throw n.error}}try{for(var p=g(this.provided),h=p.next();!h.done;h=p.next())h.value.loaded()}catch(m){a={error:m}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}this.resolve(this.name)},e.prototype.failed=function(n){this.hasFailed=!0,this.isLoading=!1,this.reject(new o(n,this.name))},e.prototype.checkLoad=function(){var n=this;((Q.CONFIG[this.name]||{}).checkReady||function(){return Promise.resolve()})().then(function(){return n.loaded()}).catch(function(i){return n.failed(i)})},e.prototype.requirementSatisfied=function(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())},e.prototype.provides=function(n){var i,a;n===void 0&&(n=[]);try{for(var s=g(n),T=s.next();!T.done;T=s.next()){var c=T.value,p=e.packages.get(c);p||(Q.CONFIG.dependencies[c]||(Q.CONFIG.dependencies[c]=[]),Q.CONFIG.dependencies[c].push(c),(p=new e(c,!0)).isLoading=!0),this.provided.push(p)}}catch(h){i={error:h}}finally{try{T&&!T.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},e.prototype.addDependent=function(n,i){this.dependents.push(n),i||this.checkNoLoad()},e.prototype.checkNoLoad=function(){var n,i;if(this.noLoad){this.noLoad=!1;try{for(var a=g(this.dependencies),s=a.next();!s.done;s=a.next())s.value.checkNoLoad()}catch(T){n={error:T}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}}},e.packages=new Map,e}();t.Package=r},2388:function(A,t,d){var f=this&&this.__assign||function(){return f=Object.assign||function(n){for(var i,a=1,s=arguments.length;a<s;a++)for(var T in i=arguments[a])Object.prototype.hasOwnProperty.call(i,T)&&(n[T]=i[T]);return n},f.apply(this,arguments)},v=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&n[i],s=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},g=this&&this.__read||function(n,i){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var s,T,c=a.call(n),p=[];try{for(;(i===void 0||i-- >0)&&!(s=c.next()).done;)p.push(s.value)}catch(h){T={error:h}}finally{try{s&&!s.done&&(a=c.return)&&a.call(c)}finally{if(T)throw T.error}}return p},l=this&&this.__spreadArray||function(n,i,a){if(a||arguments.length===2)for(var s,T=0,c=i.length;T<c;T++)!s&&T in i||(s||(s=Array.prototype.slice.call(i,0,T)),s[T]=i[T]);return n.concat(s||Array.prototype.slice.call(i))};Object.defineProperty(t,"__esModule",{value:!0}),t.CONFIG=t.MathJax=t.Startup=void 0;var u,Q=d(9515),o=d(8666),r=d(7233);(function(n){var i,a,s=new o.PrioritizedList;function T(O){return i.visitTree(O,n.document)}function c(){i=new t.MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,a=t.MathJax._.mathjax.mathjax,n.input=y(),n.output=b(),n.adaptor=M(),n.handler&&a.handlers.unregister(n.handler),n.handler=_(),n.handler&&(a.handlers.register(n.handler),n.document=x())}function p(){var O,S;n.input&&n.output&&h();var V=n.output?n.output.name.toLowerCase():"";try{for(var E=v(n.input),w=E.next();!w.done;w=E.next()){var P=w.value,C=P.name.toLowerCase();L(C,P),H(C,P),n.output&&m(C,V,P)}}catch(k){O={error:k}}finally{try{w&&!w.done&&(S=E.return)&&S.call(E)}finally{if(O)throw O.error}}}function h(){t.MathJax.typeset=function(O){O===void 0&&(O=null),n.document.options.elements=O,n.document.reset(),n.document.render()},t.MathJax.typesetPromise=function(O){return O===void 0&&(O=null),n.document.options.elements=
`)},n.prototype.visitTeXAtomNode=function(i,a){var s=this.childNodeMml(i,a+" ",`
`);return a+"<mrow"+this.getAttributes(i)+">"+(s.match(/\S/)?`
`+s+a:"")+"</mrow>"},n.prototype.visitAnnotationNode=function(i,a){return a+"<annotation"+this.getAttributes(i)+">"+this.childNodeMml(i,"","")+"</annotation>"},n.prototype.visitDefault=function(i,a){var s=i.kind,T=l(i.isToken||i.childNodes.length===0?["",""]:[`
`,a],2),c=T[0],p=T[1],h=this.childNodeMml(i,a+" ",c);return a+"<"+s+this.getAttributes(i)+">"+(h.match(/\S/)?c+h+p:"")+"</"+s+">"},n.prototype.childNodeMml=function(i,a,s){var T,c,p="";try{for(var h=g(i.childNodes),m=h.next();!m.done;m=h.next()){var L=m.value;p+=this.visitNode(L,a)+s}}catch(H){T={error:H}}finally{try{m&&!m.done&&(c=h.return)&&c.call(h)}finally{if(T)throw T.error}}return p},n.prototype.getAttributes=function(i){var a,s,T=[],c=this.constructor.defaultAttributes[i.kind]||{},p=Object.assign({},c,this.getDataAttributes(i),i.attributes.getAllAttributes()),h=this.constructor.variants;p.hasOwnProperty("mathvariant")&&h.hasOwnProperty(p.mathvariant)&&(p.mathvariant=h[p.mathvariant]);try{for(var m=g(Object.keys(p)),L=m.next();!L.done;L=m.next()){var H=L.value,y=String(p[H]);y!==void 0&&T.push(H+'="'+this.quoteHTML(y)+'"')}}catch(b){a={error:b}}finally{try{L&&!L.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}return T.length?" "+T.join(" "):""},n.prototype.getDataAttributes=function(i){var a={},s=i.attributes.getExplicit("mathvariant"),T=this.constructor.variants;s&&T.hasOwnProperty(s)&&this.setDataAttribute(a,"variant",s),i.getProperty("variantForm")&&this.setDataAttribute(a,"alternate","1"),i.getProperty("pseudoscript")&&this.setDataAttribute(a,"pseudoscript","true"),i.getProperty("autoOP")===!1&&this.setDataAttribute(a,"auto-op","false");var c=i.getProperty("scriptalign");c&&this.setDataAttribute(a,"script-align",c);var p=i.getProperty("texClass");if(p!==void 0){var h=!0;if(p===Q.TEXCLASS.OP&&i.isKind("mi")){var m=i.getText();h=!(m.length>1&&m.match(o.MmlMi.operatorName))}h&&this.setDataAttribute(a,"texclass",p<0?"NONE":Q.TEXCLASSNAMES[p])}return i.getProperty("scriptlevel")&&i.getProperty("useHeight")===!1&&this.setDataAttribute(a,"smallmatrix","true"),a},n.prototype.setDataAttribute=function(i,a,s){i[t.DATAMJX+a]=s},n.prototype.quoteHTML=function(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/[\uD800-\uDBFF]./g,t.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,t.toEntity)},n.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},n.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}},n}(u.MmlVisitor);t.SerializedMmlVisitor=r},2975:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractOutputJax=void 0;var f=d(7233),v=d(7525),g=function(){function l(u){u===void 0&&(u={}),this.adaptor=null;var Q=this.constructor;this.options=(0,f.userOptions)((0,f.defaultOptions)({},Q.OPTIONS),u),this.postFilters=new v.FunctionList}return Object.defineProperty(l.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),l.prototype.setAdaptor=function(u){this.adaptor=u},l.prototype.initialize=function(){},l.prototype.reset=function(){for(var u=[],Q=0;Q<arguments.length;Q++)u[Q]=arguments[Q]},l.prototype.getMetrics=function(u){},l.prototype.styleSheet=function(u){return null},l.prototype.pageElements=function(u){return null},l.prototype.executeFilters=function(u,Q,o,r){var e={math:Q,document:o,data:r};return u.execute(e),e.data},l.NAME="generic",l.OPTIONS={},l}();t.AbstractOutputJax=g},4574:function(A,t){var d=this&&this.__values||function(l){var u=typeof Symbol=="function"&&Symbol.iterator,Q=u&&l[u],o=0;if(Q)return Q.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&o>=l.length&&(l=void 0),{value:l&&l[o++],done:!l}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(l,u){var Q=typeof Symbol=="function"&&l[Symbol.iterator];if(!Q)return l;var o,r,e=Q.call(l),n=[];try{for(;(u===void 0||u-- >0)&&!(o=e.next()).done;)n.push(o.value)}catch(i){r={error:i}}finally{try{o&&!o.done&&(Q=e.return)&&Q.call(e)}finally{if(r)throw r.error}}return n},v=this&&this.__spreadArray||function(l,u,Q){if(Q||arguments.length===2)for(var o,r=0,e=u.length;r<e;r++)!o&&r in u||(o||(o=Array.prototype.slice.call(u,0,r)),o[r]=u[r]);re
`,wbr:"","#comment":""},ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},l}();t.HTMLDomStrings=g},3726:function(A,t,d){var f,v=this&&this.__extends||(f=function(Q,o){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])},f(Q,o)},function(Q,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=Q}f(Q,o),Q.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLHandler=void 0;var g=d(3670),l=d(3683),u=function(Q){function o(){var r=Q!==null&&Q.apply(this,arguments)||this;return r.documentClass=l.HTMLDocument,r}return v(o,Q),o.prototype.handlesDocument=function(r){var e=this.adaptor;if(typeof r=="string")try{r=e.parse(r,"text/html")}catch{}return r instanceof e.window.Document||r instanceof e.window.HTMLElement||r instanceof e.window.DocumentFragment},o.prototype.create=function(r,e){var n=this.adaptor;if(typeof r=="string")r=n.parse(r,"text/html");else if(r instanceof n.window.HTMLElement||r instanceof n.window.DocumentFragment){var i=r;r=n.parse("","text/html"),n.append(n.body(r),i)}return Q.prototype.create.call(this,r,e)},o}(g.AbstractHandler);t.HTMLHandler=u},3363:function(A,t,d){var f,v=this&&this.__extends||(f=function(u,Q){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(o[e]=r[e])},f(u,Q)},function(u,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Class extends value "+String(Q)+" is not a constructor or null");function o(){this.constructor=u}f(u,Q),u.prototype=Q===null?Object.create(Q):(o.prototype=Q.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLMathItem=void 0;var g=d(4474),l=function(u){function Q(o,r,e,n,i){return e===void 0&&(e=!0),n===void 0&&(n={node:null,n:0,delim:""}),i===void 0&&(i={node:null,n:0,delim:""}),u.call(this,o,r,e,n,i)||this}return v(Q,u),Object.defineProperty(Q.prototype,"adaptor",{get:function(){return this.inputJax.adaptor},enumerable:!1,configurable:!0}),Q.prototype.updateDocument=function(o){if(this.state()<g.STATE.INSERTED){if(this.inputJax.processStrings){var r=this.start.node;if(r===this.end.node)this.end.n&&this.end.n<this.adaptor.value(this.end.node).length&&this.adaptor.split(this.end.node,this.end.n),this.start.n&&(r=this.adaptor.split(this.start.node,this.start.n)),this.adaptor.replace(this.typesetRoot,r);else{for(this.start.n&&(r=this.adaptor.split(r,this.start.n));r!==this.end.node;){var e=this.adaptor.next(r);this.adaptor.remove(r),r=e}this.adaptor.insert(this.typesetRoot,r),this.end.n<this.adaptor.value(r).length&&this.adaptor.split(r,this.end.n),this.adaptor.remove(r)}}else this.adaptor.replace(this.typesetRoot,this.start.node);this.start.node=this.end.node=this.typesetRoot,this.start.n=this.end.n=0,this.state(g.STATE.INSERTED)}},Q.prototype.updateStyleSheet=function(o){o.addStyleSheet()},Q.prototype.removeFromDocument=function(o){if(o===void 0&&(o=!1),this.state()>=g.STATE.TYPESET){var r=this.adaptor,e=this.start.node,n=r.text("");if(o){var i=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)n=r.text(i);else{var a=r.parse(i,"text/html");n=r.firstChild(r.body(a))}}r.parent(e)&&r.replace(n,e),this.start.node=this.end.node=n,this.start.n=this.end.n=0}},Q}(g.AbstractMathItem);t.HTMLMathItem=l},3335:function(A,t,d){var f,v=this&&this.__extends||(f=function(l,u){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,o){Q.__proto__=o}||function(Q,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(Q[r]=o[r])},f(l,u)},function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function Q(){this.constructor=l}f(l,u),l.prototype=u===null?Object.create(u):(Q.prototype=u.prototype,new Q)});Object.define
`+this.stack.join(`
`)+`
]`},o}();t.default=Q},8292:function(A,t,d){var f,v=this&&this.__extends||(f=function(n,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var T in s)Object.prototype.hasOwnProperty.call(s,T)&&(a[T]=s[T])},f(n,i)},function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function a(){this.constructor=n}f(n,i),n.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}),g=this&&this.__read||function(n,i){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var s,T,c=a.call(n),p=[];try{for(;(i===void 0||i-- >0)&&!(s=c.next()).done;)p.push(s.value)}catch(h){T={error:h}}finally{try{s&&!s.done&&(a=c.return)&&a.call(c)}finally{if(T)throw T.error}}return p},l=this&&this.__spreadArray||function(n,i,a){if(a||arguments.length===2)for(var s,T=0,c=i.length;T<c;T++)!s&&T in i||(s||(s=Array.prototype.slice.call(i,0,T)),s[T]=i[T]);return n.concat(s||Array.prototype.slice.call(i))},u=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&n[i],s=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},Q=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseItem=t.MmlStack=void 0;var o=Q(d(3971)),r=function(){function n(i){this._nodes=i}return Object.defineProperty(n.prototype,"nodes",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),n.prototype.Push=function(){for(var i,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];(i=this._nodes).push.apply(i,l([],g(a),!1))},n.prototype.Pop=function(){return this._nodes.pop()},Object.defineProperty(n.prototype,"First",{get:function(){return this._nodes[this.Size()-1]},set:function(i){this._nodes[this.Size()-1]=i},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Last",{get:function(){return this._nodes[0]},set:function(i){this._nodes[0]=i},enumerable:!1,configurable:!0}),n.prototype.Peek=function(i){return i==null&&(i=1),this._nodes.slice(this.Size()-i)},n.prototype.Size=function(){return this._nodes.length},n.prototype.Clear=function(){this._nodes=[]},n.prototype.toMml=function(i,a){return i===void 0&&(i=!0),this._nodes.length!==1||a?this.create("node",i?"inferredMrow":"mrow",this._nodes,{}):this.First},n.prototype.create=function(i){for(var a,s=[],T=1;T<arguments.length;T++)s[T-1]=arguments[T];return(a=this.factory.configuration.nodeFactory).create.apply(a,l([i],g(s),!1))},n}();t.MmlStack=r;var e=function(n){function i(a){for(var s=[],T=1;T<arguments.length;T++)s[T-1]=arguments[T];var c=n.call(this,s)||this;return c.factory=a,c.global={},c._properties={},c.isOpen&&(c._env={}),c}return v(i,n),Object.defineProperty(i.prototype,"kind",{get:function(){return"base"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"env",{get:function(){return this._env},set:function(a){this._env=a},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"copyEnv",{get:function(){return!0},enumerable:!1,configurable:!0}),i.prototype.getProperty=function(a){return this._properties[a]},i.prototype.setProperty=function(a,s){return this._properties[a]=s,this},Object.defineProperty(i.prototype,"isOpen",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isClose",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isFinal",{get:function(){return!1},enumerable:!1,configurable:!0}),i.prototype.isKind=function(a){return a===this.kind},i.prototype.checkItem=function(a){if(a.isKind("over")&&this.isOpen&&(a.setProperty("num",this.toMml(!1)),this.Clear()),a.isKind("cell")&&this.isOpen){if(a.getProperty("linebreak"))return i.fail;throw new o.default("Misplaced","Misplaced %1",a.getName())}if(a.isClose&&this.getErrors(a.kind)){var s=g(this.getErrors(a.kind),
`}}catch(h){i={error:h}}finally{try{c&&!c.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}return s},n.prototype.Parse=function(){for(var i;this.i<this.string.length;)i=this.getCodePoint(),this.i+=i.length,this.parse("character",[this,i])},n.prototype.Push=function(i){i instanceof r.AbstractMmlNode&&i.isInferred?this.PushAll(i.childNodes):this.stack.Push(i)},n.prototype.PushAll=function(i){var a,s;try{for(var T=f(i),c=T.next();!c.done;c=T.next()){var p=c.value;this.stack.Push(p)}}catch(h){a={error:h}}finally{try{c&&!c.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}},n.prototype.mml=function(){if(!this.stack.Top().isKind("mml"))return null;var i=this.stack.Top().First;return this.configuration.popParser(),i},n.prototype.convertDelimiter=function(i){var a=this.lookup("delimiter",i);return a?a.char:null},n.prototype.getCodePoint=function(){var i=this.string.codePointAt(this.i);return i===void 0?"":String.fromCodePoint(i)},n.prototype.nextIsSpace=function(){return!!this.string.charAt(this.i).match(/\s/)},n.prototype.GetNext=function(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()},n.prototype.GetCS=function(){var i=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return i?(this.i+=i[0].length,i[2]||i[1]):(this.i++," ")},n.prototype.GetArgument=function(i,a){switch(this.GetNext()){case"":if(!a)throw new o.default("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!a)throw new o.default("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":for(var s=++this.i,T=1;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":T++;break;case"}":if(--T==0)return this.string.slice(s,this.i-1)}throw new o.default("MissingCloseBrace","Missing close brace")}var c=this.getCodePoint();return this.i+=c.length,c},n.prototype.GetBrackets=function(i,a){if(this.GetNext()!=="[")return a;for(var s=++this.i,T=0;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":T++;break;case"\\":this.i++;break;case"}":if(T--<=0)throw new o.default("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"]":if(T===0)return this.string.slice(s,this.i-1)}throw new o.default("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)},n.prototype.GetDelimiter=function(i,a){var s=this.GetNext();if(this.i+=s.length,this.i<=this.string.length&&(s==="\\"?s+=this.GetCS():s==="{"&&a&&(this.i--,s=this.GetArgument(i).trim()),this.contains("delimiter",s)))return this.convertDelimiter(s);throw new o.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},n.prototype.GetDimen=function(i){if(this.GetNext()==="{"){var a=this.GetArgument(i),s=v(u.default.matchDimen(a),2),T=s[0],c=s[1];if(T)return T+c}else{a=this.string.slice(this.i);var p=v(u.default.matchDimen(a,!0),3),h=(T=p[0],c=p[1],p[2]);if(T)return this.i+=h,T+c}throw new o.default("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)},n.prototype.GetUpTo=function(i,a){for(;this.nextIsSpace();)this.i++;for(var s=this.i,T=0;this.i<this.string.length;){var c=this.i,p=this.GetNext();switch(this.i+=p.length,p){case"\\":p+=this.GetCS();break;case"{":T++;break;case"}":if(T===0)throw new o.default("ExtraCloseLooking","Extra close brace while looking for %1",a);T--}if(T===0&&p===a)return this.string.slice(s,c)}throw new o.default("TokenNotFoundForCommand","Could not find %1 for %2",a,this.currentCS)},n.prototype.ParseArg=function(i){return new n(this.GetArgument(i),this.stack.env,this.configuration).mml()},n.prototype.ParseUpTo=function(i,a){return new n(this.GetUpTo(i,a),this.stack.env,this.configuration).mml()},n.prototype.GetDelimiterArg=function(i){var a=u.default.trimSpaces(this.GetArgument(i));if(a==="")return null;if(this.contains("delimiter",a))return a;throw new o.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},n.prototype.GetStar=function(){var i=this
`;)y.i++},m.Hash=function(y,b){throw new e.default("CantUseHash1","You can't use 'macro parameter character #' in math mode")},m.MathFont=function(y,b,M){var _=y.GetArgument(b),x=new n.default(_,f(f({},y.stack.env),{font:M,multiLetterIdentifiers:/^[a-zA-Z]+/,noAutoOP:!0}),y.configuration).mml();y.Push(y.create("node","TeXAtom",[x]))},m.SetFont=function(y,b,M){y.stack.env.font=M},m.SetStyle=function(y,b,M,_,x){y.stack.env.style=M,y.stack.env.level=x,y.Push(y.itemFactory.create("style").setProperty("styles",{displaystyle:_,scriptlevel:x}))},m.SetSize=function(y,b,M){y.stack.env.size=M,y.Push(y.itemFactory.create("style").setProperty("styles",{mathsize:(0,c.em)(M)}))},m.Spacer=function(y,b,M){var _=y.create("node","mspace",[],{width:(0,c.em)(M)}),x=y.create("node","mstyle",[_],{scriptlevel:0});y.Push(x)},m.LeftRight=function(y,b){var M=b.substr(1);y.Push(y.itemFactory.create(M,y.GetDelimiter(b),y.stack.env.color))},m.NamedFn=function(y,b,M){M||(M=b.substr(1));var _=y.create("token","mi",{texClass:s.TEXCLASS.OP},M);y.Push(y.itemFactory.create("fn",_))},m.NamedOp=function(y,b,M){M||(M=b.substr(1)),M=M.replace(/&thinsp;/,"\u2006");var _=y.create("token","mo",{movablelimits:!0,movesupsub:!0,form:i.TexConstant.Form.PREFIX,texClass:s.TEXCLASS.OP},M);y.Push(_)},m.Limits=function(y,b,M){var _=y.stack.Prev(!0);if(!_||r.default.getTexClass(r.default.getCoreMO(_))!==s.TEXCLASS.OP&&r.default.getProperty(_,"movesupsub")==null)throw new e.default("MisplacedLimits","%1 is allowed only on operators",y.currentCS);var x,O=y.stack.Top();r.default.isType(_,"munderover")&&!M?(x=y.create("node","msubsup"),r.default.copyChildren(_,x),_=O.Last=x):r.default.isType(_,"msubsup")&&M&&(x=y.create("node","munderover"),r.default.copyChildren(_,x),_=O.Last=x),r.default.setProperty(_,"movesupsub",!!M),r.default.setProperties(r.default.getCoreMO(_),{movablelimits:!1}),(r.default.getAttribute(_,"movablelimits")||r.default.getProperty(_,"movablelimits"))&&r.default.setProperties(_,{movablelimits:!1})},m.Over=function(y,b,M,_){var x=y.itemFactory.create("over").setProperty("name",y.currentCS);M||_?(x.setProperty("open",M),x.setProperty("close",_)):b.match(/withdelims$/)&&(x.setProperty("open",y.GetDelimiter(b)),x.setProperty("close",y.GetDelimiter(b))),b.match(/^\\above/)?x.setProperty("thickness",y.GetDimen(b)):(b.match(/^\\atop/)||M||_)&&x.setProperty("thickness",0),y.Push(x)},m.Frac=function(y,b){var M=y.ParseArg(b),_=y.ParseArg(b),x=y.create("node","mfrac",[M,_]);y.Push(x)},m.Sqrt=function(y,b){var M=y.GetBrackets(b),_=y.GetArgument(b);_==="\\frac"&&(_+="{"+y.GetArgument(_)+"}{"+y.GetArgument(_)+"}");var x=new n.default(_,y.stack.env,y.configuration).mml();x=M?y.create("node","mroot",[x,H(y,M)]):y.create("node","msqrt",[x]),y.Push(x)},m.Root=function(y,b){var M=y.GetUpTo(b,"\\of"),_=y.ParseArg(b),x=y.create("node","mroot",[_,H(y,M)]);y.Push(x)},m.MoveRoot=function(y,b,M){if(!y.stack.env.inRoot)throw new e.default("MisplacedMoveRoot","%1 can appear only within a root",y.currentCS);if(y.stack.global[M])throw new e.default("MultipleMoveRoot","Multiple use of %1",y.currentCS);var _=y.GetArgument(b);if(!_.match(/-?[0-9]+/))throw new e.default("IntegerArg","The argument to %1 must be an integer",y.currentCS);(_=parseInt(_,10)/15+"em").substr(0,1)!=="-"&&(_="+"+_),y.stack.global[M]=_},m.Accent=function(y,b,M,_){var x=y.ParseArg(b),O=f(f({},a.default.getFontDef(y)),{accent:!0,mathaccent:!0}),S=r.default.createEntity(M),V=y.create("token","mo",O,S);r.default.setAttribute(V,"stretchy",!!_);var E=r.default.isEmbellished(x)?r.default.getCoreMO(x):x;(r.default.isType(E,"mo")||r.default.getProperty(E,"movablelimits"))&&r.default.setProperties(E,{movablelimits:!1});var w=y.create("node","munderover");r.default.setChild(w,0,x),r.default.setChild(w,1,null),r.default.setChild(w,2,V);var P=y.create("node","TeXAtom",[w]);y.Push(P)},m.UnderOver=function(y,b,M,_){var x=r.default.createEntity(M),O=y.create("token","mo",{stretchy:!0,accent:!0},x),S=b.charAt(1)==="o"?"over":"under",V=y.ParseArg(b);y.Push(a.default.underOver(y,V,O,S,_))},m.Overset=function(y,b){var M=y.ParseArg(b)
`;)u.i++;u.i++},Math:function(u,Q){u.saveText();for(var o,r,e=u.i,n=0;r=u.GetNext();)switch(o=u.i++,r){case"\\":u.GetCS()===")"&&(r="\\(");case"$":if(n===0&&Q===r){var i=u.texParser.configuration,a=new v.default(u.string.substr(e,o-e),u.stack.env,i).mml();return void u.PushMath(a)}break;case"{":n++;break;case"}":n===0&&u.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace"),n--}u.Error("MathNotTerminated","Math-mode is not properly terminated")},MathModeOnly:function(u,Q){u.Error("MathModeOnly","'%1' allowed only in math mode",Q)},Misplaced:function(u,Q){u.Error("Misplaced","'%1' can not be used here",Q)},OpenBrace:function(u,Q){var o=u.stack.env;u.envStack.push(o),u.stack.env=Object.assign({},o)},CloseBrace:function(u,Q){u.envStack.length?(u.saveText(),u.stack.env=u.envStack.pop()):u.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace")},OpenQuote:function(u,Q){u.string.charAt(u.i)===Q?(u.text+="\u201C",u.i++):u.text+="\u2018"},CloseQuote:function(u,Q){u.string.charAt(u.i)===Q?(u.text+="\u201D",u.i++):u.text+="\u2019"},Tilde:function(u,Q){u.text+="\xA0"},Space:function(u,Q){for(u.text+=" ";u.GetNext().match(/\s/);)u.i++},SelfQuote:function(u,Q){u.text+=Q.substr(1)},Insert:function(u,Q,o){u.text+=o},Accent:function(u,Q,o){var r=u.ParseArg(Q),e=u.create("token","mo",{},o);u.addAttributes(e),u.Push(u.create("node","mover",[r,e]))},Emph:function(u,Q){var o=u.stack.env.mathvariant==="-tex-mathit"?"normal":"-tex-mathit";u.Push(u.ParseTextArg(Q,{mathvariant:o}))},SetFont:function(u,Q,o){u.saveText(),u.stack.env.mathvariant=o},SetSize:function(u,Q,o){u.saveText(),u.stack.env.mathsize=o},CheckAutoload:function(u,Q){var o=u.configuration.packageData.get("autoload"),r=u.texParser;Q=Q.slice(1);var e=r.lookup("macro",Q);if(!e||o&&e._func===o.Autoload){if(r.parse("macro",[r,Q]),!e)return;(0,g.retryAfter)(Promise.resolve())}r.parse("macro",[u,Q])},Macro:l.default.Macro,Spacer:l.default.Spacer,Hskip:l.default.Hskip,rule:l.default.rule,Rule:l.default.Rule,HandleRef:l.default.HandleRef}},8728:function(A,t,d){var f,v=this&&this.__extends||(f=function(T,c){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(p[m]=h[m])},f(T,c)},function(T,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function p(){this.constructor=T}f(T,c),T.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}),g=this&&this.__values||function(T){var c=typeof Symbol=="function"&&Symbol.iterator,p=c&&T[c],h=0;if(p)return p.call(T);if(T&&typeof T.length=="number")return{next:function(){return T&&h>=T.length&&(T=void 0),{value:T&&T[h++],done:!T}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(T,c){var p=typeof Symbol=="function"&&T[Symbol.iterator];if(!p)return T;var h,m,L=p.call(T),H=[];try{for(;(c===void 0||c-- >0)&&!(h=L.next()).done;)H.push(h.value)}catch(y){m={error:y}}finally{try{h&&!h.done&&(p=L.return)&&p.call(L)}finally{if(m)throw m.error}}return H},u=this&&this.__spreadArray||function(T,c,p){if(p||arguments.length===2)for(var h,m=0,L=c.length;m<L;m++)!h&&m in c||(h||(h=Array.prototype.slice.call(c,0,m)),h[m]=c[m]);return T.concat(h||Array.prototype.slice.call(c))},Q=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var o=Q(d(8417)),r=Q(d(3971)),e=Q(d(1130)),n=d(9007),i=Q(d(1256)),a=d(1181),s=function(T){function c(p,h,m,L){var H=T.call(this,p,h,m)||this;return H.level=L,H}return v(c,T),Object.defineProperty(c.prototype,"texParser",{get:function(){return this.configuration.packageData.get("textmacros").texParser},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"tags",{get:function(){return this.texParser.tags},enumerable:!1,configurable:!0}),c.prototype.mml=function(){return this.level!=null?this.create("node","mstyle",this.nodes,{displaystyle:!1,s
`+this.cssStyles.cssText+`
`)])},T.prototype.addFontStyles=function(c){c.addStyles(this.font.styles)},T.prototype.addWrapperStyles=function(c){var p,h;try{for(var m=u(this.factory.getKinds()),L=m.next();!L.done;L=m.next()){var H=L.value;this.addClassStyles(this.factory.getNodeClass(H),c)}}catch(y){p={error:y}}finally{try{L&&!L.done&&(h=m.return)&&h.call(m)}finally{if(p)throw p.error}}},T.prototype.addClassStyles=function(c,p){p.addStyles(c.styles)},T.prototype.setDocument=function(c){c&&(this.document=c,this.adaptor.document=c.document)},T.prototype.html=function(c,p,h,m){return p===void 0&&(p={}),h===void 0&&(h=[]),this.adaptor.node(c,p,h,m)},T.prototype.text=function(c){return this.adaptor.text(c)},T.prototype.fixed=function(c,p){return p===void 0&&(p=3),Math.abs(c)<6e-4?"0":c.toFixed(p).replace(/\.?0+$/,"")},T.prototype.measureText=function(c,p,h){h===void 0&&(h=["",!1,!1]);var m=this.unknownText(c,p);if(p==="-explicitFont"){var L=this.cssFontStyles(h);this.adaptor.setAttributes(m,{style:L})}return this.measureTextNodeWithCache(m,c,p,h)},T.prototype.measureTextNodeWithCache=function(c,p,h,m){m===void 0&&(m=["",!1,!1]),h==="-explicitFont"&&(h=[m[0],m[1]?"T":"F",m[2]?"T":"F",""].join("-")),this.unknownCache.has(h)||this.unknownCache.set(h,new Map);var L=this.unknownCache.get(h),H=L.get(p);if(H)return H;var y=this.measureTextNode(c);return L.set(p,y),y},T.prototype.measureXMLnode=function(c){var p=this.adaptor,h=this.html("mjx-xml-block",{style:{display:"inline-block"}},[p.clone(c)]),m=this.html("mjx-baseline",{style:{display:"inline-block",width:0,height:0}}),L=this.html("mjx-measure-xml",{style:{position:"absolute",display:"inline-block","font-family":"initial","line-height":"normal"}},[m,h]);p.append(p.parent(this.math.start.node),this.container),p.append(this.container,L);var H=this.math.metrics.em*this.math.metrics.scale,y=p.nodeBBox(h),b=y.left,M=y.right,_=y.bottom,x=y.top,O=(M-b)/H,S=(p.nodeBBox(m).top-x)/H,V=(_-x)/H-S;return p.remove(this.container),p.remove(L),{w:O,h:S,d:V}},T.prototype.cssFontStyles=function(c,p){p===void 0&&(p={});var h=l(c,3),m=h[0],L=h[1],H=h[2];return p["font-family"]=this.font.getFamily(m),L&&(p["font-style"]="italic"),H&&(p["font-weight"]="bold"),p},T.prototype.getFontData=function(c){return c||(c=new n.Styles),[this.font.getFamily(c.get("font-family")),c.get("font-style")==="italic",c.get("font-weight")==="bold"]},T.NAME="Common",T.OPTIONS=g(g({},Q.AbstractOutputJax.OPTIONS),{scale:1,minScale:.5,mtextInheritFont:!1,merrorInheritFont:!1,mtextFont:"",merrorFont:"serif",mathmlSpacing:!1,skipAttributes:{},exFactor:.5,displayAlign:"center",displayIndent:"0",wrapperFactory:null,font:null,cssStyles:null}),T.commonStyles={},T}(Q.AbstractOutputJax);t.CommonOutputJax=a},7519:function(A,t,d){var f,v=this&&this.__extends||(f=function(L,H){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var M in b)Object.prototype.hasOwnProperty.call(b,M)&&(y[M]=b[M])},f(L,H)},function(L,H){if(typeof H!="function"&&H!==null)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");function y(){this.constructor=L}f(L,H),L.prototype=H===null?Object.create(H):(y.prototype=H.prototype,new y)}),g=this&&this.__createBinding||(Object.create?function(L,H,y,b){b===void 0&&(b=y);var M=Object.getOwnPropertyDescriptor(H,y);M&&!("get"in M?!H.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return H[y]}}),Object.defineProperty(L,b,M)}:function(L,H,y,b){b===void 0&&(b=y),L[b]=H[y]}),l=this&&this.__setModuleDefault||(Object.create?function(L,H){Object.defineProperty(L,"default",{enumerable:!0,value:H})}:function(L,H){L.default=H}),u=this&&this.__importStar||function(L){if(L&&L.__esModule)return L;var H={};if(L!=null)for(var y in L)y!=="default"&&Object.prototype.hasOwnProperty.call(L,y)&&g(H,L,y);return l(H,L),H},Q=this&&this.__values||function(L){var H=typeof Symbol=="function"&&Symbol.iterator,y=H&&L[H],b=0;if(y)return y.call(L);if(L&&typeof L.length=="number")return{next:function(){return L&&b>=L.length&&(L=void 0),{value:L&&L[b++],done:!L}}
`)},'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.mathmlCode=new n.SelectableInfo("MathJax MathML Expression",function(){if(!b.menu.mathItem)return"";var M=b.toMML(b.menu.mathItem);return"<pre>"+b.formatSource(M)+"</pre>"},""),this.originalText=new n.SelectableInfo("MathJax Original Source",function(){if(!b.menu.mathItem)return"";var M=b.menu.mathItem.math;return'<pre style="font-size:125%; margin:0">'+b.formatSource(M)+"</pre>"},""),this.annotationText=new n.SelectableInfo("MathJax Annotation Text",function(){if(!b.menu.mathItem)return"";var M=b.menu.annotation;return'<pre style="font-size:125%; margin:0">'+b.formatSource(M)+"</pre>"},""),this.zoomBox=new i.Info("MathJax Zoomed Expression",function(){if(!b.menu.mathItem)return"";var M=b.menu.mathItem.typesetRoot.cloneNode(!0);return M.style.margin="0",'<div style="font-size: '+1.25*parseFloat(b.settings.zscale)+'%">'+M.outerHTML+"</div>"},""),this.document=H,this.options=(0,o.userOptions)((0,o.defaultOptions)({},this.constructor.OPTIONS),y),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}return Object.defineProperty(L.prototype,"isLoading",{get:function(){return L.loading>0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"loadingPromise",{get:function(){return this.isLoading?(L._loadingPromise||(L._loadingPromise=new Promise(function(H,y){L._loadingOK=H,L._loadingFailed=y})),L._loadingPromise):Promise.resolve()},enumerable:!1,configurable:!0}),L.prototype.initSettings=function(){this.settings=this.options.settings,this.jax=this.options.jax;var H=this.document.outputJax;this.jax[H.name]=H,this.settings.renderer=H.name,p._.a11y&&p._.a11y.explorer&&Object.assign(this.settings,this.document.options.a11y),this.settings.scale=H.options.scale,this.defaultSettings=Object.assign({},this.settings)},L.prototype.initMenu=function(){var H=this,y=new a.Parser([["contextMenu",r.MJContextMenu.fromJson.bind(r.MJContextMenu)]]);this.menu=y.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",function(M){return H.setRenderer(M)}),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",function(M){return H.setScale(M)}),this.variable("explorer",function(M){return H.setExplorer(M)}),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(M){return c.default.setupEngine({locale:M})}),this.a11yVar("speechRules",function(M){var _=f(M.split("-"),2),x=_[0],O=_[1];H.document.options.sre.domain=x,H.document.options.sre.style=O}),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(M){return H.setCollapsible(M)}),this.variable("inTabOrder",function(M){return H.setTabOrder(M)}),this.variable("assistiveMml",function(M){return H.setAssistiveMml(M)})],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",function(){return H.mathmlCode.post()}),this.command("Original","Original Form",function(){return H.originalText.post()}),this.submenu("Annotation","Annotation")]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",function(){return H.copyMathML()}),this.command("Original","Original Form",function(){return H.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 H.zoom(null,"",H.menu.mathItem)}),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleCli
`+this.childNodeMml(r,e+" ",`
`)+e+"</mrow>"},o.prototype.visitMathNode=function(r,e){if(!this.options.semantics||this.mathItem.inputJax.name!=="TeX")return Q.prototype.visitDefault.call(this,r,e);var n=r.childNodes.length&&r.childNodes[0].childNodes.length>1;return e+"<math"+this.getAttributes(r)+`>
`+e+` <semantics>
`+(n?e+` <mrow>
`:"")+this.childNodeMml(r,e+(n?" ":" "),`
`)+(n?e+` </mrow>
`:"")+e+' <annotation encoding="application/x-tex">'+this.mathItem.math+`</annotation>
`+e+` </semantics>
`+e+"</math>"},o}(g.SerializedMmlVisitor);t.MmlVisitor=u},4414:function(A,t,d){var f,v=this&&this.__extends||(f=function(Q,o){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])},f(Q,o)},function(Q,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=Q}f(Q,o),Q.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SelectableInfo=void 0;var g=d(4922),l=d(2165),u=function(Q){function o(){return Q!==null&&Q.apply(this,arguments)||this}return v(o,Q),o.prototype.addEvents=function(r){var e=this;r.addEventListener("keypress",function(n){n.key==="a"&&(n.ctrlKey||n.metaKey)&&(e.selectAll(),e.stop(n))})},o.prototype.selectAll=function(){document.getSelection().selectAllChildren(this.html.querySelector("pre"))},o.prototype.copyToClipboard=function(){this.selectAll();try{document.execCommand("copy")}catch(r){alert("Can't copy to clipboard: "+r.message)}document.getSelection().removeAllRanges()},o.prototype.generateHtml=function(){var r=this;Q.prototype.generateHtml.call(this);var e=this.html.querySelector("span."+l.HtmlClasses.INFOSIGNATURE).appendChild(document.createElement("input"));e.type="button",e.value="Copy to Clipboard",e.addEventListener("click",function(n){return r.copyToClipboard()})},o}(g.Info);t.SelectableInfo=u},9923:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.asyncLoad=void 0;var f=d(5713);t.asyncLoad=function(v){return f.mathjax.asyncLoad?new Promise(function(g,l){var u=f.mathjax.asyncLoad(v);u instanceof Promise?u.then(function(Q){return g(Q)}).catch(function(Q){return l(Q)}):g(u)}):Promise.reject("Can't load '".concat(v,"': No asyncLoad method specified"))}},6469:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.BBox=void 0;var f=d(6010),v=function(){function g(l){l===void 0&&(l={w:0,h:-f.BIGDIMEN,d:-f.BIGDIMEN}),this.w=l.w||0,this.h="h"in l?l.h:-f.BIGDIMEN,this.d="d"in l?l.d:-f.BIGDIMEN,this.L=this.R=this.ic=this.sk=this.dx=0,this.scale=this.rscale=1,this.pwidth=""}return g.zero=function(){return new g({h:0,d:0,w:0})},g.empty=function(){return new g},g.prototype.empty=function(){return this.w=0,this.h=this.d=-f.BIGDIMEN,this},g.prototype.clean=function(){this.w===-f.BIGDIMEN&&(this.w=0),this.h===-f.BIGDIMEN&&(this.h=0),this.d===-f.BIGDIMEN&&(this.d=0)},g.prototype.rescale=function(l){this.w*=l,this.h*=l,this.d*=l},g.prototype.combine=function(l,u,Q){u===void 0&&(u=0),Q===void 0&&(Q=0);var o=l.rscale,r=u+o*(l.w+l.L+l.R),e=Q+o*l.h,n=o*l.d-Q;r>this.w&&(this.w=r),e>this.h&&(this.h=e),n>this.d&&(this.d=n)},g.prototype.append=function(l){var u=l.rscale;this.w+=u*(l.w+l.L+l.R),u*l.h>this.h&&(this.h=u*l.h),u*l.d>this.d&&(this.d=u*l.d)},g.prototype.updateFrom=function(l){this.h=l.h,this.d=l.d,this.w=l.w,l.pwidth&&(this.pwidth=l.pwidth)},g.fullWidth="100%",g.StyleAdjust=[["borderTopWidth","h"],["borderRightWidth","w"],["borderBottomWidth","d"],["borderLeftWidth","w",0],["paddingTop","h"],["paddingRight","w"],["paddingBottom","d"],["paddingLeft","w",0]],g}();t.BBox=v},6751:function(A,t){var d,f=this&&this.__extends||(d=function(Q,o){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])},d(Q,o)},function(Q,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=Q}d(Q,o),Q.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}),v=this&&this.__values||function(Q){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&Q[o],e=0;if(r)return r.call(Q);if(Q&&typeof Q.length=="number")return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},g=this&&this.__read||fun
`)},v.prototype.getStyleRules=function(){var g,l,u=Object.keys(this.styles),Q=new Array(u.length),o=0;try{for(var r=d(u),e=r.next();!e.done;e=r.next()){var n=e.value;Q[o++]=n+` {
`+this.getStyleDefString(this.styles[n])+`
}`}}catch(i){g={error:i}}finally{try{e&&!e.done&&(l=r.return)&&l.call(r)}finally{if(g)throw g.error}}return Q},v.prototype.getStyleDefString=function(g){var l,u,Q=Object.keys(g),o=new Array(Q.length),r=0;try{for(var e=d(Q),n=e.next();!n.done;n=e.next()){var i=n.value;o[r++]=" "+i+": "+g[i]+";"}}catch(a){l={error:a}}finally{try{n&&!n.done&&(u=e.return)&&u.call(e)}finally{if(l)throw l.error}}return o.join(`
`)},v}();t.CssStyles=f},8054:function(A,t){var d=this&&this.__values||function(m){var L=typeof Symbol=="function"&&Symbol.iterator,H=L&&m[L],y=0;if(H)return H.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&y>=m.length&&(m=void 0),{value:m&&m[y++],done:!m}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(m,L){var H=typeof Symbol=="function"&&m[Symbol.iterator];if(!H)return m;var y,b,M=H.call(m),_=[];try{for(;(L===void 0||L-- >0)&&!(y=M.next()).done;)_.push(y.value)}catch(x){b={error:x}}finally{try{y&&!y.done&&(H=M.return)&&H.call(M)}finally{if(b)throw b.error}}return _},v=this&&this.__spreadArray||function(m,L,H){if(H||arguments.length===2)for(var y,b=0,M=L.length;b<M;b++)!y&&b in L||(y||(y=Array.prototype.slice.call(L,0,b)),y[b]=L[b]);return m.concat(y||Array.prototype.slice.call(L))};Object.defineProperty(t,"__esModule",{value:!0}),t.Styles=void 0;var g=["top","right","bottom","left"],l=["width","style","color"];function u(m){for(var L=m.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),H=[];L.length>1;)L.shift(),H.push(L.shift());return H}function Q(m){var L,H,y=u(this.styles[m]);y.length===0&&y.push(""),y.length===1&&y.push(y[0]),y.length===2&&y.push(y[0]),y.length===3&&y.push(y[1]);try{for(var b=d(h.connect[m].children),M=b.next();!M.done;M=b.next()){var _=M.value;this.setStyle(this.childName(m,_),y.shift())}}catch(x){L={error:x}}finally{try{M&&!M.done&&(H=b.return)&&H.call(b)}finally{if(L)throw L.error}}}function o(m){var L,H,y=h.connect[m].children,b=[];try{for(var M=d(y),_=M.next();!_.done;_=M.next()){var x=_.value,O=this.styles[m+"-"+x];if(!O)return void delete this.styles[m];b.push(O)}}catch(S){L={error:S}}finally{try{_&&!_.done&&(H=M.return)&&H.call(M)}finally{if(L)throw L.error}}b[3]===b[1]&&(b.pop(),b[2]===b[0]&&(b.pop(),b[1]===b[0]&&b.pop())),this.styles[m]=b.join(" ")}function r(m){var L,H;try{for(var y=d(h.connect[m].children),b=y.next();!b.done;b=y.next()){var M=b.value;this.setStyle(this.childName(m,M),this.styles[m])}}catch(_){L={error:_}}finally{try{b&&!b.done&&(H=y.return)&&H.call(y)}finally{if(L)throw L.error}}}function e(m){var L,H,y=v([],f(h.connect[m].children),!1),b=this.styles[this.childName(m,y.shift())];try{for(var M=d(y),_=M.next();!_.done;_=M.next()){var x=_.value;if(this.styles[this.childName(m,x)]!==b)return void delete this.styles[m]}}catch(O){L={error:O}}finally{try{_&&!_.done&&(H=M.return)&&H.call(M)}finally{if(L)throw L.error}}this.styles[m]=b}var n=/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,i=/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/;function a(m){var L,H,y,b,M={width:"",style:"",color:""};try{for(var _=d(u(this.styles[m])),x=_.next();!x.done;x=_.next()){var O=x.value;O.match(n)&&M.width===""?M.width=O:O.match(i)&&M.style===""?M.style=O:M.color=O}}catch(w){L={error:w}}finally{try{x&&!x.done&&(H=_.return)&&H.call(_)}finally{if(L)throw L.error}}try{for(var S=d(h.connect[m].children),V=S.next();!V.done;V=S.next()){var E=V.value;this.setStyle(this.childName(m,E),M[E])}}catch(w){y={error:w}}finally{try{V&&!V.done&&(b=S.return)&&b.call(S)}finally{if(y)throw y.error}}}function s(m){var L,H,y=[];try{for(var b=d(h.connect[m].children),M=b.next();!M.done;M=b.next()){var _=M.value,x=this.styles[this.childName(m,_)];x&&y.push(x)}}catch(O){L={error:O}}finally{try{M&&!M.done&&(H=b.return)&&H.call(b)}finally{if(L)throw L.error}}y.length?this.styles[m]=y.join(" "):delete this.styles[m]}var T={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-
`;c.innerHTML=p,T.head.appendChild(c)}v.addMenuStyles=function(a){r||(i(u,a),r=!0,n(a))},v.addInfoStyles=function(a){o||(i(l,a),o=!0,n(a))}})(t.CssStyles||(t.CssStyles={}))},2165:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlAttrs=t.HtmlClasses=void 0;function d(g){return"CtxtMenu_"+g}function f(g){return d(g)}function v(g){return d(g)}t.HtmlClasses={ATTACHED:f("Attached"),CONTEXTMENU:f("ContextMenu"),MENU:f("Menu"),MENUARROW:f("MenuArrow"),MENUACTIVE:f("MenuActive"),MENUCHECK:f("MenuCheck"),MENUCLOSE:f("MenuClose"),MENUCOMBOBOX:f("MenuComboBox"),MENUDISABLED:f("MenuDisabled"),MENUFRAME:f("MenuFrame"),MENUITEM:f("MenuItem"),MENULABEL:f("MenuLabel"),MENURADIOCHECK:f("MenuRadioCheck"),MENUINPUTBOX:f("MenuInputBox"),MENURULE:f("MenuRule"),MENUSLIDER:f("MenuSlider"),MOUSEPOST:f("MousePost"),RTL:f("RTL"),INFO:f("Info"),INFOCLOSE:f("InfoClose"),INFOCONTENT:f("InfoContent"),INFOSIGNATURE:f("InfoSignature"),INFOTITLE:f("InfoTitle"),SLIDERVALUE:f("SliderValue"),SLIDERBAR:f("SliderBar"),SELECTION:f("Selection"),SELECTIONBOX:f("SelectionBox"),SELECTIONMENU:f("SelectionMenu"),SELECTIONDIVIDER:f("SelectionDivider"),SELECTIONITEM:f("SelectionItem")},t.HtmlAttrs={COUNTER:v("Counter"),KEYDOWNFUNC:v("keydownFunc"),CONTEXTMENUFUNC:v("contextmenuFunc"),OLDTAB:v("Oldtabindex"),TOUCHFUNC:v("TouchFunc")}},4922:function(A,t,d){var f,v=this&&this.__extends||(f=function(Q,o){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n])},f(Q,o)},function(Q,o){function r(){this.constructor=Q}f(Q,o),Q.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;var g=d(5179),l=d(2165),u=function(Q){function o(r,e,n){var i=Q.call(this)||this;return i.title=r,i.signature=n,i.className=l.HtmlClasses.INFO,i.role="dialog",i.contentDiv=i.generateContent(),i.close=i.generateClose(),i.content=e||function(){return""},i}return v(o,Q),o.prototype.attachMenu=function(r){this.menu=r},o.prototype.generateHtml=function(){Q.prototype.generateHtml.call(this);var r=this.html;r.appendChild(this.generateTitle()),r.appendChild(this.contentDiv),r.appendChild(this.generateSignature()),r.appendChild(this.close.html),r.setAttribute("tabindex","0")},o.prototype.post=function(){Q.prototype.post.call(this);var r=document.documentElement,e=this.html,n=window.innerHeight||r.clientHeight||r.scrollHeight||0,i=Math.floor(-e.offsetWidth/2),a=Math.floor((n-e.offsetHeight)/3);e.setAttribute("style","margin-left: "+i+"px; top: "+a+"px;"),window.event instanceof MouseEvent&&e.classList.add(l.HtmlClasses.MOUSEPOST),e.focus()},o.prototype.display=function(){this.menu.registerWidget(this),this.contentDiv.innerHTML=this.content();var r=this.menu.html;r.parentNode&&r.parentNode.removeChild(r),this.menu.frame.appendChild(this.html)},o.prototype.click=function(r){},o.prototype.keydown=function(r){this.bubbleKey(),Q.prototype.keydown.call(this,r)},o.prototype.escape=function(r){this.unpost()},o.prototype.unpost=function(){Q.prototype.unpost.call(this),this.html.classList.remove(l.HtmlClasses.MOUSEPOST),this.menu.unregisterWidget(this)},o.prototype.generateClose=function(){var r=new g.CloseButton(this),e=r.html;return e.classList.add(l.HtmlClasses.INFOCLOSE),e.setAttribute("aria-label","Close Dialog Box"),r},o.prototype.generateTitle=function(){var r=document.createElement("span");return r.innerHTML=this.title,r.classList.add(l.HtmlClasses.INFOTITLE),r},o.prototype.generateContent=function(){var r=document.createElement("div");return r.classList.add(l.HtmlClasses.INFOCONTENT),r.setAttribute("tabindex","0"),r},o.prototype.generateSignature=function(){var r=document.createElement("span");return r.innerHTML=this.signature,r.classList.add(l.HtmlClasses.INFOSIGNATURE),r},o.prototype.toJson=function(){return{type:""}},o}(d(8372).AbstractPostable);t.Info=u},1409:function(A,t,d){var f,v=this&&this.__extends||(f=function(o,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}
${j}
${b(w,k)}`},NUMERATOR:M,DENOMINATOR:M};function e(_){let x=v.tagName(_),O=r[x];return O?O(_):_.textContent}function n(_,x){if(!_||!x)return _+x;let O=a(_),S=a(x),V=O-S;_=V<0?T(_,S,s(_)):_,x=V>0?T(x,O,s(x)):x;let E=_.split(/\r\n|\r|\n/),w=x.split(/\r\n|\r|\n/),P=[];for(let C=0;C<E.length;C++)P.push(E[C]+w[C]);return P.join(`
`)}function i(_){let x="";for(let O of Array.from(_.childNodes))x=O.nodeType!==v.NodeType.TEXT_NODE?n(x,e(O)):n(x,O.textContent);return x}function a(_){return _.split(/\r\n|\r|\n/).length}function s(_){return _.split(/\r\n|\r|\n/).reduce((x,O)=>Math.max(O.length,x),0)}function T(_,x,O){return _=function(S,V){let E=V-a(S);return S+(E>0?new Array(E+1).join(`
`):"")}(_,x),function(S,V){let E=S.split(/\r\n|\r|\n/),w=[];for(let P of E){let C=V-P.length;w.push(P+(C>0?new Array(C+1).join("\u2800"):""))}return w.join(`
`)}(_,O)}function c(_){let x=Array.from(_.childNodes),O=[];for(let S of x)S.nodeType===v.NodeType.ELEMENT_NODE&&O.push(y(S));return O}function p(_){let x=_.reduce((S,V)=>Math.max(V.height,S),0),O=[];for(let S=0;S<_[0].width.length;S++)O.push(_.map(V=>V.width[S]).reduce((V,E)=>Math.max(V,E),0));return[x,O]}function h(_,x){let O=[];for(let S of _){if(S.height===0)continue;let V=[];for(let E=0;E<S.cells.length;E++)V.push(T(S.cells[E],S.height,x[E]));S.cells=V,O.push(S)}return O}function m(_,x){if(x===1)return _.map(S=>S.lfence+S.cells.join(S.sep)+S.rfence).join(`
`);let O=[];for(let S of _){let V=L(S.sep,S.height),E=S.cells.shift();for(;S.cells.length;)E=n(E,V),E=n(E,S.cells.shift());E=n(L(S.lfence,S.height),E),E=n(E,L(S.rfence,S.height)),O.push(E),O.push(S.lfence+new Array(s(E)-3).join(S.sep)+S.rfence)}return O.slice(0,-1).join(`
`)}function L(_,x){let O="";for(;x;)O+=_+`
`,x--;return O.slice(0,-1)}function H(_){return _.nodeType===v.NodeType.ELEMENT_NODE&&v.tagName(_)==="FENCE"?e(_):""}function y(_){let x=Array.from(_.childNodes),O=H(x[0]),S=H(x[x.length-1]);O&&x.shift(),S&&x.pop();let V="",E=[];for(let w of x){if(w.nodeType===v.NodeType.TEXT_NODE){V=w.textContent;continue}let P=e(w);E.push(P)}return{lfence:O,rfence:S,sep:V,cells:E,height:E.reduce((w,P)=>Math.max(a(P),w),0),width:E.map(s)}}function b(_,x){let O=(x-s(_))/2,[S,V]=Math.floor(O)===O?[O,O]:[Math.floor(O),Math.ceil(O)],E=_.split(/\r\n|\r|\n/),w=[],[P,C]=[new Array(S+1).join("\u2800"),new Array(V+1).join("\u2800")];for(let k of E)w.push(P+k+C);return w.join(`
`)}function M(_){let x=_.firstChild,O=i(_);if(x&&x.nodeType===v.NodeType.ELEMENT_NODE){if(v.tagName(x)==="ENGLISH")return"\u2830"+O;if(v.tagName(x)==="NUMBER")return"\u283C"+O}return O}},182:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupRenderer=void 0;let f=d(4440),v=d(3921);class g extends v.AbstractAudioRenderer{constructor(){super(...arguments),this.ignoreElements=[f.personalityProps.LAYOUT],this.scaleFunction=null}setScaleFunction(u,Q,o,r,e=0){this.scaleFunction=n=>{let i=(n-u)/(Q-u),a=o*(1-i)+r*i;return+(Math.round(a+"e+"+e)+"e-"+e)}}applyScaleFunction(u){return this.scaleFunction?this.scaleFunction(u):u}ignoreElement(u){return this.ignoreElements.indexOf(u)!==-1}}t.MarkupRenderer=g},8990:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.PunctuationRenderer=void 0;let f=d(4440),v=d(3921),g=d(3706);class l extends v.AbstractAudioRenderer{markup(Q){let o=g.personalityMarkup(Q),r="",e=null,n=!1;for(let i,a=0;i=o[a];a++)g.isMarkupElement(i)||(g.isPauseElement(i)?n&&(e=g.mergePause(e,i,Math.max)):(e&&(r+=this.pause(e[f.personalityProps.PAUSE]),e=null),r+=(n?this.getSeparator():"")+this.merge(i.span),n=!0));return r}pause(Q){let o;return o=typeof Q=="number"?Q<=250?"short":Q<=500?"medium":"long":Q,l.PAUSE_PUNCTUATION.get(o)||""}}t.PunctuationRenderer=l,l.PAUSE_PUNCTUATION=new Map([["short",","],["medium",";"],["long","."]])},6660:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.SableRenderer=void 0;let f=d(4440),v=d(2456);class g extends v.XmlRenderer{finalize(u){return'<?xml version="1.0"?><!DOCTYPE SABLE PUBLIC "-//SABLE//DTD SABLE speech mark up//EN" "Sable.v0_2.dtd" []><SABLE>'+this.getSeparator()+u+this.getSeparator()+"</SABLE>"}pause(u){return'<BREAK MSEC="'+this.pauseValue(u[f.personalityProps.PAUSE])+'"/>'}prosodyElement(u,Q){switch(Q=this.applyScaleFunction(Q),u){case f.personalityProps.PITCH:return'<PITCH RANGE="'+Q+'%">';case f.personalityProps.RATE:return'<RATE SPEED="'+Q+'%">';case f.personalityProps.VOLUME:return'<VOLUME LEVEL="'+Q+'%">';default:return"<"+u.toUpperCase()+' VALUE="'+Q+'">'}}closeTag(u){return"</"+u.toUpperCase()+">"}}t.SableRenderer=g},9536:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Span=void 0,t.Span=class{constructor(d,f){this.speech=d,this.attributes=f}}},7504:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.SsmlRenderer=void 0;let f=d(5897),v=d(4440),g=d(2456);class l extends g.XmlRenderer{finalize(Q){return'<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"><prosody rate="'+f.default.getInstance().getRate()+'%">'+this.getSeparator()+Q+this.getSeparator()+"</prosody></speak>"}pause(Q){return'<break time="'+this.pauseValue(Q[v.personalityProps.PAUSE])+'ms"/>'}prosodyElement(Q,o){let r=(o=Math.floor(this.applyScaleFunction(o)))<0?o.toString():"+"+o.toString();return"<prosody "+Q.toLowerCase()+'="'+r+(Q===v.personalityProps.VOLUME?">":'%">')}closeTag(Q){return"</prosody>"}}t.SsmlRenderer=l},3757:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.SsmlStepRenderer=void 0;let f=d(7504);class v extends f.SsmlRenderer{markup(l){return v.MARKS={},super.markup(l)}merge(l){let u=[];for(let Q=0;Q<l.length;Q++){let o=l[Q],r=o.attributes.extid;r&&!v.MARKS[r]&&(u.push('<mark name="'+r+'"/>'),v.MARKS[r]=!0),o.speech.length===1&&o.speech.match(/[a-zA-Z]/)?u.push('<say-as interpret-as="'+v.CHARACTER_ATTR+'">'+o.speech+"</say-as>"):u.push(o.speech)}return u.join(this.getSeparator())}}t.SsmlStepRenderer=v,v.CHARACTER_ATTR="character",v.MARKS={}},4032:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.StringRenderer=void 0;let f=d(3921),v=d(3706);class g extends f.AbstractAudioRenderer{markup(u){let Q="",o=(0,v.personalityMarkup)(u).filter(e=>e.span);if(!o.length)return Q;let r=o.length-1;for(let e,n=0;e=o[n];n++){if(e.span&&(Q+=this.merge(e.span)),n>=r)continue;let i=e.join;Q+=i===void 0?this.getSeparator():i}return Q}}t.StringRenderer=g},2456:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.XmlRenderer=void 0;let f=d(5897
`)}.bind(this),this.stream_.on("error",function(u){console.info("Invalid log file. Debug information sent to console."),this.outputFunction_=console.info}.bind(this)),this.stream_.on("finish",function(){console.info("Finalizing debug file.")})}output_(l){this.outputFunction_.apply(console.info===this.outputFunction_?console:this.outputFunction_,["Speech Rule Engine Debugger:"].concat(l))}}t.Debugger=v},5740:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeXml=t.cloneNode=t.tagName=t.querySelectorAll=t.querySelectorAllByAttrValue=t.querySelectorAllByAttr=t.formatXml=t.createTextNode=t.createElementNS=t.createElement=t.replaceNode=t.NodeType=t.parseInput=t.XML_ENTITIES=t.trimInput_=t.toArray=void 0;let f=d(5897),v=d(4440),g=d(2315),l=d(5274);function u(r){let e=[];for(let n=0,i=r.length;n<i;n++)e.push(r[n]);return e}function Q(r){return(r=r.replace(/&nbsp;/g,"\xA0")).replace(/>[ \f\n\r\t\v\u200b]+</g,"><").trim()}function o(r,e){if(!e)return[!1,""];let n=r.match(/^<([^> ]+).*>/),i=e.match(/^<\/([^>]+)>(.*)/);return n&&i&&n[1]===i[1]?[!0,i[2]]:[!1,""]}t.toArray=u,t.trimInput_=Q,t.XML_ENTITIES={"&lt;":!0,"&gt;":!0,"&amp;":!0,"&quot;":!0,"&apos;":!0},t.parseInput=function(r){let e=new g.default.xmldom.DOMParser,n=Q(r),i=!!n.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!n)throw new Error("Empty input!");try{let a=e.parseFromString(n,i?"text/html":"text/xml");return f.default.getInstance().mode===v.Mode.HTTP?(l.xpath.currentDocument=a,i?a.body.childNodes[0]:a.documentElement):a.documentElement}catch(a){throw new f.SREError("Illegal input: "+a.message)}},function(r){r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r[r.NOTATION_NODE=12]="NOTATION_NODE"}(t.NodeType||(t.NodeType={})),t.replaceNode=function(r,e){r.parentNode&&(r.parentNode.insertBefore(e,r),r.parentNode.removeChild(r))},t.createElement=function(r){return g.default.document.createElement(r)},t.createElementNS=function(r,e){return g.default.document.createElementNS(r,e)},t.createTextNode=function(r){return g.default.document.createTextNode(r)},t.formatXml=function(r){let e="",n=/(>)(<)(\/*)/g,i=0,a=(r=r.replace(n,`$1\r
$2$3`)).split(`\r
`);for(n=/(\.)*(<)(\/*)/g,a=a.map(s=>s.replace(n,`$1\r
$2$3`).split(`\r
`)).reduce((s,T)=>s.concat(T),[]);a.length;){let s=a.shift();if(!s)continue;let T=0;if(s.match(/^<\w[^>/]*>[^>]+$/)){let c=o(s,a[0]);c[0]?c[1]?(s+=a.shift().slice(0,-c[1].length),c[1].trim()&&a.unshift(c[1])):s+=a.shift():T=1}else if(s.match(/^<\/\w/))i!==0&&(i-=1);else if(s.match(/^<\w[^>]*[^/]>.*$/))T=1;else if(s.match(/^<\w[^>]*\/>.+$/)){let c=s.indexOf(">")+1;s.slice(c).trim()&&a.unshift(),s=s.slice(0,c)}else T=0;e+=new Array(i+1).join(" ")+s+`\r
`,i+=T}return e},t.querySelectorAllByAttr=function(r,e){return r.querySelectorAll?u(r.querySelectorAll(`[${e}]`)):l.evalXPath(`.//*[@${e}]`,r)},t.querySelectorAllByAttrValue=function(r,e,n){return r.querySelectorAll?u(r.querySelectorAll(`[${e}="${n}"]`)):l.evalXPath(`.//*[@${e}="${n}"]`,r)},t.querySelectorAll=function(r,e){return r.querySelectorAll?u(r.querySelectorAll(e)):l.evalXPath(`.//${e}`,r)},t.tagName=function(r){return r.tagName.toUpperCase()},t.cloneNode=function(r){return r.cloneNode(!0)},t.serializeXml=function(r){return new g.default.xmldom.XMLSerializer().serializeToString(r)}},5897:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.EnginePromise=t.SREError=void 0;let f=d(1676),v=d(4440),g=d(2057),l=d(1377);class u extends Error{constructor(e=""){super(),this.message=e,this.name="SRE Error"}}t.SREError=u;class Q{constructor(){this.customLoader=null,this.parsers={},this.comparator=null,this.mode=v.Mode.SYNC,this.init=!0,this.delay=!1,this.comparators={},this.domain="mathspeak",this.style=f.DynamicCstr.DEFAULT_VALUES[f.Axis.STYLE],this._defaultLocale=f.DynamicCstr.DEFAULT_VALUES[f.Axis.LOCALE],this.locale=this.defaultLocale,this.subiso="",this.modality=f.DynamicCstr.DEFAULT_VALUES[f.Axis.MODALITY],this.speech=v.Speech.NONE,this.markup=v.Markup.NONE,this.walker="Table",this.structure=!1,this.ruleSets=[],this.strict=!1,this.isIE=!1,this.isEdge=!1,this.rate="100",this.pprint=!1,this.config=!1,this.rules="",this.prune="",this.evaluator=Q.defaultEvaluator,this.defaultParser=new f.DynamicCstrParser(f.DynamicCstr.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=f.DynamicCstr.defaultCstr()}set defaultLocale(e){this._defaultLocale=l.Variables.ensureLocale(e,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return Q.instance=Q.instance||new Q,Q.instance}static defaultEvaluator(e,n){return e}static evaluateNode(e){return Q.nodeEvaluator(e)}getRate(){let e=parseInt(this.rate,10);return isNaN(e)?100:e}setDynamicCstr(e){if(this.defaultLocale&&(f.DynamicCstr.DEFAULT_VALUES[f.Axis.LOCALE]=this.defaultLocale),e){let T=Object.keys(e);for(let c=0;c<T.length;c++){let p=T[c];if(f.DynamicCstr.DEFAULT_ORDER.indexOf(p)!==-1){let h=e[p];this[p]=h}}}v.DOMAIN_TO_STYLES[this.domain]=this.style;let n=[this.locale,this.modality,this.domain,this.style].join("."),i=f.DynamicProperties.createProp([f.DynamicCstr.DEFAULT_VALUES[f.Axis.LOCALE]],[f.DynamicCstr.DEFAULT_VALUES[f.Axis.MODALITY]],[f.DynamicCstr.DEFAULT_VALUES[f.Axis.DOMAIN]],[f.DynamicCstr.DEFAULT_VALUES[f.Axis.STYLE]]),a=this.comparators[this.domain],s=this.parsers[this.domain];this.parser=s||this.defaultParser,this.dynamicCstr=this.parser.parse(n),this.dynamicCstr.updateProperties(i.getProperties()),this.comparator=a?a():new f.DefaultComparator(this.dynamicCstr)}configurate(e){this.mode!==v.Mode.HTTP||this.config||(function(n){let i=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');for(let a=0,s=i.length;a<s;a++){let T;try{T=i[a].innerHTML;let c=JSON.parse(T);for(let p in c)n[p]=c[p]}catch{g.Debugger.getInstance().output("Illegal configuration ",T)}}}(e),this.config=!0),function(n){if(typeof SREfeature<"u")for(let[i,a]of Object.entries(SREfeature))n[i]=a}(e)}setCustomLoader(e){e&&(this.customLoader=e)}}t.default=Q,Q.BINARY_FEATURES=["strict","structure","pprint"],Q.STRING_FEATURES=["markup","style","domain","speech","walker","defaultLocale","locale","delay","modality","rate","rules","subiso","prune"],Q.nodeEvaluator=function(r){return[]};class o{static get(e=Q.getInstance().locale){return o.promises[e]||Promise.resolve("")}static getall(){return Promise.all(Object.values(o.promises))}}t.EnginePromise=o,o.loaded={},o.promises={}},4440:function(A,t){var d;Object.defineProperty(t,"__esModule",{value:!0}),t.DOMAIN_TO_STYLES=t.Markup=t.Speech=t.personalityPropList=t.personalityProps=t.Mode=void 0,function(f){f.SYNC="sync",f.ASYNC="async",f.HTTP="http"}(t.Mode||(t.Mode={})),function(f){f.PITCH="pitch",f.RATE="rate",f.VOLUME="volume",f.PAUSE="pause",f.JOIN="join",f.LAYOUT="layout"}(d=t.person
==> `+this.getRule().action:this.constraint}}},4508:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.Trie=void 0;let f=d(4391),v=d(9701);class g{constructor(){this.root=(0,v.getNode)(f.TrieNodeKind.ROOT,"",null)}static collectRules_(u){let Q=[],o=[u];for(;o.length;){let r=o.shift();if(r.getKind()===f.TrieNodeKind.QUERY||r.getKind()===f.TrieNodeKind.BOOLEAN){let e=r.getRule();e&&Q.unshift(e)}o=o.concat(r.getChildren())}return Q}static printWithDepth_(u,Q,o){o+=new Array(Q+2).join(Q.toString())+": "+u.toString()+`
`;let r=u.getChildren();for(let e,n=0;e=r[n];n++)o=g.printWithDepth_(e,Q+1,o);return o}static order_(u){let Q=u.getChildren();if(!Q.length)return 0;let o=Math.max.apply(null,Q.map(g.order_));return Math.max(Q.length,o)}addRule(u){let Q=this.root,o=u.context,r=u.dynamicCstr.getValues();for(let n=0,i=r.length;n<i;n++)Q=this.addNode_(Q,r[n],f.TrieNodeKind.DYNAMIC,o);Q=this.addNode_(Q,u.precondition.query,f.TrieNodeKind.QUERY,o);let e=u.precondition.constraints;for(let n=0,i=e.length;n<i;n++)Q=this.addNode_(Q,e[n],f.TrieNodeKind.BOOLEAN,o);Q.setRule(u)}lookupRules(u,Q){let o=[this.root],r=[];for(;Q.length;){let e=Q.shift(),n=[];for(;o.length;)o.shift().getChildren().forEach(i=>{i.getKind()===f.TrieNodeKind.DYNAMIC&&e.indexOf(i.getConstraint())===-1||n.push(i)});o=n.slice()}for(;o.length;){let e=o.shift();if(e.getRule){let i=e.getRule();i&&r.push(i)}let n=e.findChildren(u);o=o.concat(n)}return r}hasSubtrie(u){let Q=this.root;for(let o=0,r=u.length;o<r;o++){let e=u[o];if(Q=Q.getChild(e),!Q)return!1}return!0}toString(){return g.printWithDepth_(this.root,0,"")}collectRules(){return g.collectRules_(this.root)}order(){return g.order_(this.root)}enumerate(u){return this.enumerate_(this.root,u)}byConstraint(u){let Q=this.root;for(;u.length&&Q;){let o=u.shift();Q=Q.getChild(o)}return Q||null}enumerate_(u,Q){Q=Q||{};let o=u.getChildren();for(let r,e=0;r=o[e];e++)r.kind===f.TrieNodeKind.DYNAMIC&&(Q[r.getConstraint()]=this.enumerate_(r,Q[r.getConstraint()]));return Q}addNode_(u,Q,o,r){let e=u.getChild(Q);return e||(e=(0,v.getNode)(o,Q,r),u.addChild(e)),e}}t.Trie=g},4391:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TrieNodeKind=void 0,function(d){d.ROOT="root",d.DYNAMIC="dynamic",d.QUERY="query",d.BOOLEAN="boolean",d.STATIC="static"}(t.TrieNodeKind||(t.TrieNodeKind={}))},9701:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanTrieNode=t.QueryTrieNode=t.constraintTest_=t.DynamicTrieNode=t.RootTrieNode=t.getNode=void 0;let f=d(5740),v=d(5274),g=d(2105),l=d(2780),u=d(7222),Q=d(7222),o=d(4391);t.getNode=function(T,c,p){switch(T){case o.TrieNodeKind.ROOT:return new r;case o.TrieNodeKind.DYNAMIC:return new e(c);case o.TrieNodeKind.QUERY:return new a(c,p);case o.TrieNodeKind.BOOLEAN:return new s(c,p);default:return null}};class r extends u.AbstractTrieNode{constructor(){super("",()=>!0),this.kind=o.TrieNodeKind.ROOT}}t.RootTrieNode=r;class e extends u.AbstractTrieNode{constructor(c){super(c,p=>p===c),this.kind=o.TrieNodeKind.DYNAMIC}}t.DynamicTrieNode=e;let n={"=":(T,c)=>T===c,"!=":(T,c)=>T!==c,"<":(T,c)=>T<c,">":(T,c)=>T>c,"<=":(T,c)=>T<=c,">=":(T,c)=>T>=c};function i(T){if(T.match(/^self::\*$/))return c=>!0;if(T.match(/^self::\w+$/)){let c=T.slice(6).toUpperCase();return p=>p.tagName&&f.tagName(p)===c}if(T.match(/^self::\w+:\w+$/)){let c=T.split(":"),p=v.resolveNameSpace(c[2]);if(!p)return null;let h=c[3].toUpperCase();return m=>m.localName&&m.localName.toUpperCase()===h&&m.namespaceURI===p}if(T.match(/^@\w+$/)){let c=T.slice(1);return p=>p.hasAttribute&&p.hasAttribute(c)}if(T.match(/^@\w+="[\w\d ]+"$/)){let c=T.split("="),p=c[0].slice(1),h=c[1].slice(1,-1);return m=>m.hasAttribute&&m.hasAttribute(p)&&m.getAttribute(p)===h}if(T.match(/^@\w+!="[\w\d ]+"$/)){let c=T.split("!="),p=c[0].slice(1),h=c[1].slice(1,-1);return m=>!m.hasAttribute||!m.hasAttribute(p)||m.getAttribute(p)!==h}if(T.match(/^contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)$/)){let c=T.split('"')[1];return p=>!!g.Grammar.getInstance().getParameter(c)}if(T.match(/^not\(\s*contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)\s*\)$/)){let c=T.split('"')[1];return p=>!g.Grammar.getInstance().getParameter(c)}if(T.match(/^name\(\.\.\/\.\.\)="\w+"$/)){let c=T.split('"')[1].toUpperCase();return p=>{var h,m;return((m=(h=p.parentNode)===null||h===void 0?void 0:h.parentNode)===null||m===void 0?void 0:m.tagName)&&f.tagName(p.parentNode.parentNode)===c}}if(T.match(/^count\(preceding-sibling::\*\)=\d+$/)){let c=T.split("="),p=parseInt(c[1],10);return h=>{var m;return((m=h.parentNode)===null||m===void 0?void 0:m.childNodes[p])===h}}if(T.match(/^.+\[@category!?=".
`)}}t.DynamicProperties=f;class v extends f{constructor(l,u){let Q={};for(let[o,r]of Object.entries(l))Q[o]=[r];super(Q,u),this.components=l}static createCstr(...l){let u=v.DEFAULT_ORDER,Q={};for(let o=0,r=l.length,e=u.length;o<r&&o<e;o++)Q[u[o]]=l[o];return new v(Q)}static defaultCstr(){return v.createCstr.apply(null,v.DEFAULT_ORDER.map(function(l){return v.DEFAULT_VALUES[l]}))}static validOrder(l){let u=v.DEFAULT_ORDER.slice();return l.every(Q=>{let o=u.indexOf(Q);return o!==-1&&u.splice(o,1)})}getComponents(){return this.components}getValue(l){return this.components[l]}getValues(){return this.order.map(l=>this.getValue(l))}allProperties(){let l=super.allProperties();for(let u,Q,o=0;u=l[o],Q=this.order[o];o++){let r=this.getValue(Q);u.indexOf(r)===-1&&u.unshift(r)}return l}toString(){return this.getValues().join(".")}equal(l){let u=l.getAxes();if(this.order.length!==u.length)return!1;for(let Q,o=0;Q=u[o];o++){let r=this.getValue(Q);if(!r||l.getValue(Q)!==r)return!1}return!0}}t.DynamicCstr=v,v.DEFAULT_ORDER=[d.LOCALE,d.MODALITY,d.DOMAIN,d.STYLE,d.TOPIC],v.BASE_LOCALE="base",v.DEFAULT_VALUE="default",v.DEFAULT_VALUES={[d.LOCALE]:"en",[d.DOMAIN]:v.DEFAULT_VALUE,[d.STYLE]:v.DEFAULT_VALUE,[d.TOPIC]:v.DEFAULT_VALUE,[d.MODALITY]:"speech"},t.DynamicCstrParser=class{constructor(g){this.order=g}parse(g){let l=g.split("."),u={};if(l.length>this.order.length)throw new Error("Invalid dynamic constraint: "+u);let Q=0;for(let o,r=0;o=this.order[r],l.length;r++,Q++){let e=l.shift();u[o]=e}return new v(u,this.order.slice(0,Q))}},t.DefaultComparator=class{constructor(g,l=new f(g.getProperties(),g.getOrder())){this.reference=g,this.fallback=l,this.order=this.reference.getOrder()}getReference(){return this.reference}setReference(g,l){this.reference=g,this.fallback=l||new f(g.getProperties(),g.getOrder()),this.order=this.reference.getOrder()}match(g){let l=g.getAxes();return l.length===this.reference.getAxes().length&&l.every(u=>{let Q=g.getValue(u);return Q===this.reference.getValue(u)||this.fallback.getProperty(u).indexOf(Q)!==-1})}compare(g,l){let u=!1;for(let Q,o=0;Q=this.order[o];o++){let r=g.getValue(Q),e=l.getValue(Q);if(!u){let s=this.reference.getValue(Q);if(s===r&&s!==e)return-1;if(s===e&&s!==r)return 1;if(s===r&&s===e)continue;s!==r&&s!==e&&(u=!0)}let n=this.fallback.getProperty(Q),i=n.indexOf(r),a=n.indexOf(e);if(i<a)return-1;if(a<i)return 1}return 0}toString(){return this.reference.toString()+`
`+this.fallback.toString()}}},2105:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.numbersToAlpha=t.Grammar=t.ATTRIBUTE=void 0;let f=d(5740),v=d(5897),g=d(2536),l=d(4356);t.ATTRIBUTE="grammar";class u{constructor(){this.currentFlags={},this.parameters_={},this.corrections_={},this.preprocessors_={},this.stateStack_=[]}static getInstance(){return u.instance=u.instance||new u,u.instance}static parseInput(e){let n={},i=e.split(":");for(let a=0,s=i.length;a<s;a++){let T=i[a].split("="),c=T[0].trim();T[1]?n[c]=T[1].trim():c.match(/^!/)?n[c.slice(1)]=!1:n[c]=!0}return n}static parseState(e){let n={},i=e.split(" ");for(let a=0,s=i.length;a<s;a++){let T=i[a].split(":"),c=T[0],p=T[1];n[c]=p||!0}return n}static translateString_(e){if(e.match(/:unit$/))return u.translateUnit_(e);let n=v.default.getInstance(),i=n.evaluator(e,n.dynamicCstr);return i=i===null?e:i,u.getInstance().getParameter("plural")&&(i=l.LOCALE.FUNCTIONS.plural(i)),i}static translateUnit_(e){e=u.prepareUnit_(e);let n=v.default.getInstance(),i=u.getInstance().getParameter("plural"),a=n.strict,s=`${n.locale}.${n.modality}.default`,T,c;return n.strict=!0,i&&(T=n.defaultParser.parse(s+".plural"),c=n.evaluator(e,T)),c?(n.strict=a,c):(T=n.defaultParser.parse(s+".default"),c=n.evaluator(e,T),n.strict=a,c?(i&&(c=l.LOCALE.FUNCTIONS.plural(c)),c):u.cleanUnit_(e))}static prepareUnit_(e){let n=e.match(/:unit$/);return n?e.slice(0,n.index).replace(/\s+/g," ")+e.slice(n.index):e}static cleanUnit_(e){return e.match(/:unit$/)?e.replace(/:unit$/,""):e}clear(){this.parameters_={},this.stateStack_=[]}setParameter(e,n){let i=this.parameters_[e];return n?this.parameters_[e]=n:delete this.parameters_[e],i}getParameter(e){return this.parameters_[e]}setCorrection(e,n){this.corrections_[e]=n}setPreprocessor(e,n){this.preprocessors_[e]=n}getCorrection(e){return this.corrections_[e]}getState(){let e=[];for(let n in this.parameters_){let i=this.parameters_[n];e.push(typeof i=="string"?n+":"+i:n)}return e.join(" ")}pushState(e){for(let n in e)e[n]=this.setParameter(n,e[n]);this.stateStack_.push(e)}popState(){let e=this.stateStack_.pop();for(let n in e)this.setParameter(n,e[n])}setAttribute(e){if(e&&e.nodeType===f.NodeType.ELEMENT_NODE){let n=this.getState();n&&e.setAttribute(t.ATTRIBUTE,n)}}preprocess(e){return this.runProcessors_(e,this.preprocessors_)}correct(e){return this.runProcessors_(e,this.corrections_)}apply(e,n){return this.currentFlags=n||{},e=this.currentFlags.adjust||this.currentFlags.preprocess?u.getInstance().preprocess(e):e,(this.parameters_.translate||this.currentFlags.translate)&&(e=u.translateString_(e)),e=this.currentFlags.adjust||this.currentFlags.correct?u.getInstance().correct(e):e,this.currentFlags={},e}runProcessors_(e,n){for(let i in this.parameters_){let a=n[i];if(!a)continue;let s=this.parameters_[i];e=s===!0?a(e):a(e,s)}return e}}function Q(r,e){if(!e||!r)return r;let n=l.LOCALE.FUNCTIONS.fontRegexp(g.localFont(e));return r.replace(n,"")}function o(r){return r.match(/\d+/)?l.LOCALE.NUMBERS.numberToWords(parseInt(r,10)):r}t.Grammar=u,t.numbersToAlpha=o,u.getInstance().setCorrection("localFont",g.localFont),u.getInstance().setCorrection("localRole",g.localRole),u.getInstance().setCorrection("localEnclose",g.localEnclose),u.getInstance().setCorrection("ignoreFont",Q),u.getInstance().setPreprocessor("annotation",function(r,e){return r+":"+e}),u.getInstance().setPreprocessor("noTranslateText",function(r){return r.match(new RegExp("^["+l.LOCALE.MESSAGES.regexp.TEXT+"]+$"))&&(u.getInstance().currentFlags.translate=!1),r}),u.getInstance().setCorrection("ignoreCaps",function(r){let e=l.LOCALE.ALPHABETS.capPrefix[v.default.getInstance().domain];return e===void 0&&(e=l.LOCALE.ALPHABETS.capPrefix.default),Q(r,e)}),u.getInstance().setPreprocessor("numbers2alpha",o)},2780:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.enumerate=t.lookupString=t.lookupCategory=t.lookupRule=t.addSiUnitRules=t.addUnitRules=t.addFunctionRules=t.addSymbolRules=t.defineRule=t.defineRules=t.setSiPrefixes=void 0;let f=d(2057),v=d(5897),g=d(7491),l=d(4658),u=d(1676
`)}runInSetting(L,H){let y=l.default.getInstance(),b={};for(let _ in L)b[_]=y[_],y[_]=L[_];y.setDynamicCstr();let M=H();for(let _ in b)y[_]=b[_];return y.setDynamicCstr(),M}addStore(L){let H=h(L);H.kind!=="abstract"&&H.getSpeechRules().forEach(y=>this.trie.addRule(y)),this.addEvaluator(H)}processGrammar(L,H,y){let b={};for(let M in y){let _=y[M];b[M]=typeof _=="string"?L.constructString(H,_):_}i.Grammar.getInstance().pushState(b)}addEvaluator(L){let H=L.evaluateDefault.bind(L),y=this.evaluators_[L.locale];if(y)return void(y[L.modality]=H);let b={};b[L.modality]=H,this.evaluators_[L.locale]=b}getEvaluator(L,H){let y=this.evaluators_[L]||this.evaluators_[n.DynamicCstr.DEFAULT_VALUES[n.Axis.LOCALE]];return y[H]||y[n.DynamicCstr.DEFAULT_VALUES[n.Axis.MODALITY]]}enumerate(L){return this.trie.enumerate(L)}evaluateNode_(L){return L?(this.updateConstraint_(),this.evaluateTree_(L)):[]}evaluateTree_(L){let H=l.default.getInstance(),y;v.Debugger.getInstance().output(H.mode!==u.Mode.HTTP?L.toString():L),i.Grammar.getInstance().setAttribute(L);let b=this.lookupRule(L,H.dynamicCstr);if(!b)return H.strict?[]:(y=this.getEvaluator(H.locale,H.modality)(L),L.attributes&&this.addPersonality_(y,{},!1,L),y);v.Debugger.getInstance().generateOutput(()=>["Apply Rule:",b.name,b.dynamicCstr.toString(),(H.mode,u.Mode.HTTP,L).toString()]);let M=b.context,_=b.action.components;y=[];for(let x,O=0;x=_[O];O++){let S=[],V=x.content||"",E=x.attributes||{},w=!1;x.grammar&&this.processGrammar(M,L,x.grammar);let P=null;if(E.engine){P=l.default.getInstance().dynamicCstr.getComponents();let C=i.Grammar.parseInput(E.engine);l.default.getInstance().setDynamicCstr(C)}switch(x.type){case s.ActionType.NODE:{let C=M.applyQuery(L,V);C&&(S=this.evaluateTree_(C))}break;case s.ActionType.MULTI:{w=!0;let C=M.applySelector(L,V);C.length>0&&(S=this.evaluateNodeList_(M,C,E.sepFunc,M.constructString(L,E.separator),E.ctxtFunc,M.constructString(L,E.context)))}break;case s.ActionType.TEXT:{let C=E.span,k={};if(C){let Z=(0,Q.evalXPath)(C,L);Z.length&&(k.extid=Z[0].getAttribute("extid"))}let j=M.constructString(L,V);(j||j==="")&&(S=Array.isArray(j)?j.map(function(Z){return f.AuditoryDescription.create({text:Z.speech,attributes:Z.attributes},{adjust:!0})}):[f.AuditoryDescription.create({text:j,attributes:k},{adjust:!0})])}break;case s.ActionType.PERSONALITY:default:S=[f.AuditoryDescription.create({text:V})]}S[0]&&!w&&(E.context&&(S[0].context=M.constructString(L,E.context)+(S[0].context||"")),E.annotation&&(S[0].annotation=E.annotation)),this.addLayout(S,E,w),x.grammar&&i.Grammar.getInstance().popState(),y=y.concat(this.addPersonality_(S,E,w,L)),P&&l.default.getInstance().setDynamicCstr(P)}return y}evaluateNodeList_(L,H,y,b,M,_){if(!H.length)return[];let x=b||"",O=_||"",S=L.contextFunctions.lookup(M),V=S?S(H,O):function(){return O},E=L.contextFunctions.lookup(y),w=E?E(H,x):function(){return[f.AuditoryDescription.create({text:x},{translate:!0})]},P=[];for(let C,k=0;C=H[k];k++){let j=this.evaluateTree_(C);if(j.length>0&&(j[0].context=V()+(j[0].context||""),P=P.concat(j),k<H.length-1)){let Z=w();P=P.concat(Z)}}return P}addLayout(L,H,y){let b=H.layout;b&&(b.match(/^begin/)?L.unshift(new f.AuditoryDescription({text:"",layout:b})):b.match(/^end/)?L.push(new f.AuditoryDescription({text:"",layout:b})):(L.unshift(new f.AuditoryDescription({text:"",layout:`begin${b}`})),L.push(new f.AuditoryDescription({text:"",layout:`end${b}`}))))}addPersonality_(L,H,y,b){let M={},_=null;for(let x of u.personalityPropList){let O=H[x];if(O===void 0)continue;let S=parseFloat(O),V=isNaN(S)?O.charAt(0)==='"'?O.slice(1,-1):O:S;x===u.personalityProps.PAUSE?_=V:M[x]=V}for(let x,O=0;x=L[O];O++)this.addRelativePersonality_(x,M),this.addExternalAttributes_(x,b);if(y&&L.length&&delete L[L.length-1].personality[u.personalityProps.JOIN],_&&L.length){let x=L[L.length-1];x.text||Object.keys(x.personality).length?L.push(f.AuditoryDescription.create({text:"",personality:{pause:_}})):x.personality[u.personalityProps.PAUSE]=_}return L}addExternalAttributes_(L,H){if(H.hasAttributes()){let y=H.attributes;for(let b=y.length-1
`+n))}return r.join(`
`)}collateMeaning(){let r=new Q;for(let e in this.map)r.map[e]=this.map[e].map(function(n){return n.meaning()});return r}}t.SemanticNodeCollator=u;class Q extends l{copyCollator(){return new Q}add(r,e){let n=this.retrieve(r,e.font);if(!n||!n.find(function(i){return f.equal(i,e)})){let i=g.key(r,e.font);super.add(i,e)}}addNode(r){this.add(r.textContent,r.meaning())}toString(){let r=[];for(let e in this.map){let n=Array(e.length+3).join(" "),i=this.map[e],a=[];for(let s,T=0;s=i[T];T++)a.push("{type: "+s.type+", role: "+s.role+", font: "+s.font+"}");r.push(e+": "+a.join(`
`+n))}return r.join(`
`)}reduce(){for(let r in this.map)this.map[r].length!==1&&(this.map[r]=(0,v.reduce)(this.map[r]))}default(){let r=new g;for(let e in this.map)this.map[e].length===1&&(r.map[e]=this.map[e][0]);return r}newDefault(){let r=this.default();this.reduce();let e=this.default();return r.size()!==e.size()?e:null}}t.SemanticMeaningCollator=Q},9911:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticMultiHeuristic=t.SemanticTreeHeuristic=t.SemanticAbstractHeuristic=void 0;class d{constructor(v,g,l=u=>!1){this.name=v,this.apply=g,this.applicable=l}}t.SemanticAbstractHeuristic=d,t.SemanticTreeHeuristic=class extends d{},t.SemanticMultiHeuristic=class extends d{}},7516:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lookup=t.run=t.add=t.blacklist=t.flags=t.updateFactory=t.factory=void 0,t.factory=null,t.updateFactory=function(v){t.factory=v};let d=new Map;function f(v){return d.get(v)}t.flags={combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},t.blacklist={},t.add=function(v){let g=v.name;d.set(g,v),t.flags[g]||(t.flags[g]=!1)},t.run=function(v,g,l){let u=f(v);return u&&!t.blacklist[v]&&(t.flags[v]||u.applicable(g))?u.apply(g):l?l(g):g},t.lookup=f},94:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0});let f=d(2057),v=d(5897),g=d(3588),l=d(7516),u=d(9911),Q=d(5609),o=d(3308),r=d(4795);function e(i,a,s){let T=null;if(!i.length)return T;let c=s[s.length-1],p=c&&c.length,h=a&&a.length,m=o.default.getInstance();if(p&&h){if(a[0].type==="infixop"&&a[0].role==="implicit")return T=i.pop(),c.push(m.postfixNode_(c.pop(),i)),T;T=i.shift();let L=m.prefixNode_(a.shift(),i);return a.unshift(L),T}return p?(c.push(m.postfixNode_(c.pop(),i)),T):(h&&a.unshift(m.prefixNode_(a.shift(),i)),T)}function n(i,a,s){if(!a.length)return i;let T=i.pop(),c=a.shift(),p=s.shift();if(Q.isImplicitOp(c)){f.Debugger.getInstance().output("Juxta Heuristic Case 2");let L=(T?[T,c]:[c]).concat(p);return n(i.concat(L),a,s)}if(!T)return f.Debugger.getInstance().output("Juxta Heuristic Case 3"),n([c].concat(p),a,s);let h=p.shift();if(!h){f.Debugger.getInstance().output("Juxta Heuristic Case 9");let L=l.factory.makeBranchNode("infixop",[T,a.shift()],[c],c.textContent);return L.role="implicit",l.run("combine_juxtaposition",L),a.unshift(L),n(i,a,s)}if(Q.isOperator(T)||Q.isOperator(h))return f.Debugger.getInstance().output("Juxta Heuristic Case 4"),n(i.concat([T,c,h]).concat(p),a,s);let m=null;return Q.isImplicitOp(T)&&Q.isImplicitOp(h)?(f.Debugger.getInstance().output("Juxta Heuristic Case 5"),T.contentNodes.push(c),T.contentNodes=T.contentNodes.concat(h.contentNodes),T.childNodes.push(h),T.childNodes=T.childNodes.concat(h.childNodes),h.childNodes.forEach(L=>L.parent=T),c.parent=T,T.addMathmlNodes(c.mathml),T.addMathmlNodes(h.mathml),m=T):Q.isImplicitOp(T)?(f.Debugger.getInstance().output("Juxta Heuristic Case 6"),T.contentNodes.push(c),T.childNodes.push(h),h.parent=T,c.parent=T,T.addMathmlNodes(c.mathml),T.addMathmlNodes(h.mathml),m=T):Q.isImplicitOp(h)?(f.Debugger.getInstance().output("Juxta Heuristic Case 7"),h.contentNodes.unshift(c),h.childNodes.unshift(T),T.parent=h,c.parent=h,h.addMathmlNodes(c.mathml),h.addMathmlNodes(T.mathml),m=h):(f.Debugger.getInstance().output("Juxta Heuristic Case 8"),m=l.factory.makeBranchNode("infixop",[T,h],[c],c.textContent),m.role="implicit"),i.push(m),n(i.concat(p),a,s)}l.add(new u.SemanticTreeHeuristic("combine_juxtaposition",function(i){for(let a,s=i.childNodes.length-1;a=i.childNodes[s];s--)Q.isImplicitOp(a)&&!a.nobreaking&&(i.childNodes.splice(s,1,...a.childNodes),i.contentNodes.splice(s,0,...a.contentNodes),a.childNodes.concat(a.contentNodes).forEach(function(T){T.parent=i}),i.addMathmlNodes(a.mathml));return i})),l.add(new u.SemanticTreeHeuristic("propagateSimpleFunction",i=>(i.type!=="infixop"&&i.type!=="fraction"||!i.childNodes.every(Q.isSimpleFunction)||(i.role="composed function"),i),i=>v.default.getInstance().domain==="clearspeak")),l.add(new u.SemanticTreeHeuristic("simpleNamedFunction",i=>(i.role!=="unit"&&["f","g","h","F","G","H"].indexOf(i.textContent)!==-1&&(i.r
`+o+this.toString(),r+=`
`+o+"MathmlTree:",r+=`
`+o+this.mathmlTreeString(),r+=`
`+o+"MathML:";for(let e,n=0;e=this.mathml[n];n++)r+=`
`+o+e.toString();return r+=`
`+o+"Begin Content",this.contentNodes.forEach(function(e){r+=e.displayTree_(Q)}),r+=`
`+o+"End Content",r+=`
`+o+"Begin Children",this.childNodes.forEach(function(e){r+=e.displayTree_(Q)}),r+=`
`+o+"End Children",r}mathmlTreeString(){return this.mathmlTree?this.mathmlTree.toString():"EMPTY"}addAnnotation_(Q,o){let r=this.annotation[Q];r?r.push(o):this.annotation[Q]=[o]}}t.SemanticNode=l},6537:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticNodeFactory=void 0;let f=d(8158),v=d(8158),g=d(5952);t.SemanticNodeFactory=class{constructor(){this.leafMap=new v.SemanticNodeCollator,this.defaultMap=new f.SemanticDefault,this.idCounter_=-1}makeNode(l){return this.createNode_(l)}makeUnprocessed(l){let u=this.createNode_();return u.mathml=[l],u.mathmlTree=l,u}makeEmptyNode(){let l=this.createNode_();return l.type="empty",l}makeContentNode(l){let u=this.createNode_();return u.updateContent(l),u}makeMultipleContentNodes(l,u){let Q=[];for(let o=0;o<l;o++)Q.push(this.makeContentNode(u));return Q}makeLeafNode(l,u){if(!l)return this.makeEmptyNode();let Q=this.makeContentNode(l);Q.font=u||Q.font;let o=this.defaultMap.retrieveNode(Q);return o&&(Q.type=o.type,Q.role=o.role,Q.font=o.font),this.leafMap.addNode(Q),Q}makeBranchNode(l,u,Q,o){let r=this.createNode_();return o&&r.updateContent(o),r.type=l,r.childNodes=u,r.contentNodes=Q,u.concat(Q).forEach(function(e){e.parent=r,r.addMathmlNodes(e.mathml)}),r}createNode_(l){return l!==void 0?this.idCounter_=Math.max(this.idCounter_,l):l=++this.idCounter_,new g.SemanticNode(l)}}},3882:function(A,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticComparator=t.reduce=t.sort=t.apply=t.add=void 0;let d=[];function f(u){d.push(u)}function v(u,Q){for(let o,r=0;o=d[r];r++){let e=o.compare(u,Q);if(e!==0)return e}return 0}function g(u){u.sort(v)}t.add=f,t.apply=v,t.sort=g,t.reduce=function(u){if(u.length<=1)return u;let Q=u.slice();g(Q);let o=[],r;do r=Q.pop(),o.push(r);while(r&&Q.length&&v(Q[Q.length-1],r)===0);return o};class l{constructor(Q,o=null){this.comparator=Q,this.type=o,f(this)}compare(Q,o){return this.type&&this.type===Q.type&&this.type===o.type?this.comparator(Q,o):0}}t.SemanticComparator=l,new l(function(u,Q){return u.role==="simple function"?1:Q.role==="simple function"?-1:0},"identifier")},5250:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticAbstractParser=void 0;let f=d(6537);t.SemanticAbstractParser=class{constructor(v){this.type=v,this.factory_=new f.SemanticNodeFactory}getFactory(){return this.factory_}setFactory(v){this.factory_=v}getType(){return this.type}parseList(v){let g=[];for(let l,u=0;l=v[u];u++)g.push(this.parse(l));return g}}},5609:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.isMembership=t.elligibleRightNeutral=t.elligibleLeftNeutral=t.compareNeutralFences=t.isNeutralFence=t.isImplicitOp=t.isImplicit=t.isPureUnit=t.isUnitCounter=t.isNumber=t.isSingletonSetContent=t.scriptedElement_=t.illegalSingleton_=t.isSetNode=t.isRightBrace=t.isLeftBrace=t.isSimpleFunction=t.singlePunctAtPosition=t.isSimpleFunctionHead=t.isLimitBase=t.isBinomial=t.lineIsLabelled=t.tableIsMultiline=t.tableIsCases=t.isFencedElement=t.tableIsMatrixOrVector=t.isTableOrMultiline=t.isElligibleEmbellishedFence=t.isFence=t.isPunctuation=t.isRelation=t.isOperator=t.isEmbellished=t.isGeneralFunctionBoundary=t.isIntegralDxBoundarySingle=t.isIntegralDxBoundary=t.isBigOpBoundary=t.isPrefixFunctionBoundary=t.isSimpleFunctionScope=t.isAccent=t.isRole=t.embellishedType=t.isType=void 0;let f=d(3588),v=d(4795);function g(m,L){return m.type===L}function l(m,L){return m.embellished===L}function u(m,L){return m.role===L}function Q(m){return r(m)||e(m)}function o(m){return g(m,"operator")||l(m,"operator")}function r(m){return g(m,"relation")||l(m,"relation")}function e(m){return g(m,"punctuation")||l(m,"punctuation")}function n(m){return g(m,"fence")||l(m,"fence")}function i(m){return!m.embellished||!function(L){return g(L,"tensor")&&(!g(L.childNodes[1],"empty")||!g(L.childNodes[2],"empty"))&&(!g(L.childNodes[3],"empty")||!g(L.childNodes[4],"empty"))}(m)&&(!u(m,"close")||!g(m,"tensor"))&&(!u(m,"open")||!g(m,"subscript")&&!g(m,"superscript"))&&i(m.childNodes[0])}function a(m){return!!m&&(g(m,"table")||g(m,"multiline"))}function s(m){r
`+g.map(function(u){return u.toString()});return v}}t.Levels=d},1214:function(A,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.RebuildStree=void 0;let f=d(5740),v=d(2298),g=d(3588),l=d(6537),u=d(3308),Q=d(5656),o=d(7075),r=d(4795),e=d(1204);class n{constructor(a){this.mathml=a,this.factory=new l.SemanticNodeFactory,this.nodeDict={},this.mmlRoot=e.getSemanticRoot(a),this.streeRoot=this.assembleTree(this.mmlRoot),this.stree=o.SemanticTree.fromNode(this.streeRoot,this.mathml),this.xml=this.stree.xml(),u.default.getInstance().setNodeFactory(this.factory)}static addAttributes(a,s,T){T&&s.childNodes.length===1&&s.childNodes[0].nodeType!==f.NodeType.TEXT_NODE&&r.addAttributes(a,s.childNodes[0]),r.addAttributes(a,s)}static textContent(a,s,T){if(!T&&s.textContent)return void(a.textContent=s.textContent);let c=e.splitAttribute(e.getAttribute(s,v.Attribute.OPERATOR));c.length>1&&(a.textContent=c[1])}static isPunctuated(a){return!Q.SemanticSkeleton.simpleCollapseStructure(a)&&a[1]&&Q.SemanticSkeleton.contentCollapseStructure(a[1])}getTree(){return this.stree}assembleTree(a){let s=this.makeNode(a),T=e.splitAttribute(e.getAttribute(a,v.Attribute.CHILDREN)),c=e.splitAttribute(e.getAttribute(a,v.Attribute.CONTENT));if(n.addAttributes(s,a,!(T.length||c.length)),c.length===0&&T.length===0)return n.textContent(s,a),s;if(c.length>0){let h=e.getBySemanticId(this.mathml,c[0]);h&&n.textContent(s,h,!0)}s.contentNodes=c.map(h=>this.setParent(h,s)),s.childNodes=T.map(h=>this.setParent(h,s));let p=e.getAttribute(a,v.Attribute.COLLAPSED);return p?this.postProcess(s,p):s}makeNode(a){let s=e.getAttribute(a,v.Attribute.TYPE),T=e.getAttribute(a,v.Attribute.ROLE),c=e.getAttribute(a,v.Attribute.FONT),p=e.getAttribute(a,v.Attribute.ANNOTATION)||"",h=e.getAttribute(a,v.Attribute.ID),m=e.getAttribute(a,v.Attribute.EMBELLISHED),L=e.getAttribute(a,v.Attribute.FENCEPOINTER),H=this.createNode(parseInt(h,10));return H.type=s,H.role=T,H.font=c||"unknown",H.parseAnnotation(p),L&&(H.fencePointer=L),m&&(H.embellished=m),H}makePunctuation(a){let s=this.createNode(a);return s.updateContent((0,g.invisibleComma)()),s.role="dummy",s}makePunctuated(a,s,T){let c=this.createNode(s[0]);c.type="punctuated",c.embellished=a.embellished,c.fencePointer=a.fencePointer,c.role=T;let p=s.splice(1,1)[0].slice(1);c.contentNodes=p.map(this.makePunctuation.bind(this)),this.collapsedChildren_(s)}makeEmpty(a,s,T){let c=this.createNode(s);c.type="empty",c.embellished=a.embellished,c.fencePointer=a.fencePointer,c.role=T}makeIndex(a,s,T){if(n.isPunctuated(s))return this.makePunctuated(a,s,T),void(s=s[0]);Q.SemanticSkeleton.simpleCollapseStructure(s)&&!this.nodeDict[s.toString()]&&this.makeEmpty(a,s,T)}postProcess(a,s){let T=Q.SemanticSkeleton.fromString(s).array;if(a.type==="subsup"){let c=this.createNode(T[1][0]);return c.type="subscript",c.role="subsup",a.type="superscript",c.embellished=a.embellished,c.fencePointer=a.fencePointer,this.makeIndex(a,T[1][2],"rightsub"),this.makeIndex(a,T[2],"rightsuper"),this.collapsedChildren_(T),a}if(a.type==="subscript")return this.makeIndex(a,T[2],"rightsub"),this.collapsedChildren_(T),a;if(a.type==="superscript")return this.makeIndex(a,T[2],"rightsuper"),this.collapsedChildren_(T),a;if(a.type==="tensor")return this.makeIndex(a,T[2],"leftsub"),this.makeIndex(a,T[3],"leftsuper"),this.makeIndex(a,T[4],"rightsub"),this.makeIndex(a,T[5],"rightsuper"),this.collapsedChildren_(T),a;if(a.type==="punctuated"){if(n.isPunctuated(T)){let c=T.splice(1,1)[0].slice(1);a.contentNodes=c.map(this.makePunctuation.bind(this))}return a}if(a.type==="underover"){let c=this.createNode(T[1][0]);return a.childNodes[1].role==="overaccent"?(c.type="overscore",a.type="underscore"):(c.type="underscore",a.type="overscore"),c.role="underover",c.embellished=a.embellished,c.fencePointer=a.fencePointer,this.collapsedChildren_(T),a}return a}createNode(a){let s=this.factory.makeNode(a);return this.nodeDict[a.toString()]=s,s}collapsedChildren_(a){let s=T=>{let c=this.nodeDict[T[0]];c.childNodes=[];for(let p=1,h=T.length;p<h;p++){let m=T[p];c.childNodes.push(Q.SemanticSkeleton.simple
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())),"[tex]/all-packages":Q};(0,A.combineDefaults)(MathJax.config.loader,"dependencies",u),(0,A.combineDefaults)(MathJax.config.loader,"paths",{tex:"[mathjax]/input/tex/extensions",mml:"[mathjax]/input/mml/extensions",sre:"[mathjax]/sre/mathmaps"}),(0,A.combineDefaults)(MathJax.config.loader,"provides",o),(0,A.combineDefaults)(MathJax.config.loader,"source",{"[tex]/amsCd":"[tex]/amscd","[tex]/colorV2":"[tex]/colorv2","[tex]/configMacros":"[tex]/configmacros","[tex]/tagFormat":"[tex]/tagformat"}),d.Loader.preLoad("loader","startup","core","input/tex-full","output/svg","output/svg/fonts/tex.js","ui/menu","a11y/assistive-mml");var r=__webpack_require__(444),e=__webpack_require__(6191),n=__webpack_require__(5009),i=__webpack_require__(3494),a=__webpack_require__(3670),s=__webpack_require__(805),T=__webpack_require__(9206),c=__webpack_require__(5722),p=__webpack_require__(4474),h=__webpack_require__(9e3),m=__webpack_require__(91),L=__webpack_require__(6336),H=__webpack_require__(1759),y=__webpack_require__(3909),b=__webpack_require__(9007),M=__webpack_require__(3948),_=__webpack_require__(9145),x=__webpack_require__(142),O=__webpack_require__(7590),S=__webpack_require__(3233),V=__webpack_require__(1334),E=__webpack_require__(6661),w=__webpack_require__(1581),P=__webpack_require__(5410),C=__webpack_require__(6850),k=__webpack_require__(3985),j=__webpack_require__(450),Z=__webpack_require__(6405),B=__webpack_require__(3050),D=__webpack_require__(2756),I=__webpack_require__(7238),N=__webpack_require__(5741),R=__webpack_require__(6145),F=__webpack_require__(9878),G=__webpack_require__(7265),q=__webpack_require__(6030),W=__webpack_require__(7131),z=__webpack_require__(1314),t1=__webpack_require__(4461),Y=__webpack_require__(1349),r1=__webpack_require__(4359),i1=__webpack_require__(4770),Q1=__webpack_require__(5022),s1=__webpack_require__(5184),u1=__webpack_require__(9102),n1=__webpack_require__(6325),T1=__webpack_require__(4082),o1=__webpack_require__(9259),a1=__webpack_require__(2975),c1=__webpack_require__(4574),f1=__webpack_require__(4596),m1=__webpack_require__(7860),L1=__webpack_require__(8823),x1=__webpack_require__(8912),y1=__webpack_require__(3811),g1=__webpack_require__(6272),b1=__webpack_require__(3683),v1=__webpack_require__(5138),H1=__webpack_require__(3726),O1=__webpack_require__(3363),S1=__webpack_require__(3335),V1=__webpack_require__(5713),E1=__webpack_require__(9923),d1=__webpack_require__(6469),M1=__webpack_require__(6751),_1=__webpack_require__(5368),p1=__webpack_require__(7525),$=__webpack_require__(103),K=__webpack_require__(7233),l1=__webpack_require__(8666),h1=__webpack_require__(4542),B1=__webpack_require__(4139),F1=__webpack_require__(8054),Z1=__webpack_require__(6010),G1=__webpack_require__(7875),q1=__webpack_require__(505);MathJax.loader&&MathJax.loader.checkVersion("core",t.VERSION,"core"),(0,A.combineWithMathJax)({_:{adaptors:{HTMLAdaptor:r,browserAdaptor:e},components:{global:A},core:{DOMAdaptor:n,FindMath:i,Handler:a,HandlerList:s,InputJax:T,MathDocument:c,MathItem:p,MathList:h,MmlTree:{Attributes:m,MML:L,MathMLVisitor:H,MmlFactory:y,MmlNode:b,MmlNodes:{TeXAtom:M,maction:_,maligngroup:x,malignmark:O,math:S,mathchoice:V,menclose:E,merror:w,mfenced:P,mfrac:C,mglyph:k,mi:j,mmultiscripts:Z,mn:B,mo:D,mpadded:I,mphantom:N,mroot:R,mrow:F,ms:G,mspace:q,msqrt:W,mstyle:z,msubsup:t1,mtable:Y,mtd:r1,mtext:i1,mtr:Q1,munderover:s1,semantics:u1},MmlVisitor:n1,OperatorDictionary:T1,SerializedMmlVisitor:o1},OutputJax:a1,Tree:{Factory:c1,Node:f1,NodeFactory:m1,Visitor:L1,Wrapper:x1,WrapperFactory:y1}},handlers:{html_ts:g1,html:{HTMLDocument:b1,HTMLDomStrings:v1,HTMLHandler:H1,HTMLMathItem:O1,HTMLMathList:S1}},mathjax:V1,util:{AsyncLoad:E1,BBox:d1,BitField:M1,Entities:_1,FunctionList:p1,LinkedList:$,Options:K,PrioritizedList:l1,Retries:h1,StyleList:B1,Styles:F1,lengths:Z1,numeric:G1,string:q1}}}),MathJax.startup&&(MathJax.startup.registerConstructor("HTMLHandler",H1.HTMLHandler),MathJax.startup.registerConstructor("browserAdaptor",e.b
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(A1.AllPackages)),!1),MathJax.loader&&MathJax.loader.preLoad("input/tex-base","[tex]/all-packages"),I1();var f3=__webpack_require__(5884),m3=__webpack_require__(5552),L3=__webpack_require__(3055),y3=__webpack_require__(7519),g3=__webpack_require__(4420),b3=__webpack_require__(9800),v3=__webpack_require__(1160),H3=__webpack_require__(1956),M3=__webpack_require__(7490),_3=__webpack_require__(7313),x3=__webpack_require__(7555),O3=__webpack_require__(2688),S3=__webpack_require__(5636),V3=__webpack_require__(5723),E3=__webpack_require__(8009),A3=__webpack_require__(5023),C3=__webpack_require__(7096),w3=__webpack_require__(6898),N3=__webpack_require__(9086),P3=__webpack_require__(8411),k3=__webpack_require__(4126),I3=__webpack_require__(258),R3=__webpack_require__(4093),D3=__webpack_require__(905),j3=__webpack_require__(6237),B3=__webpack_require__(5164),F3=__webpack_require__(6319),Z3=__webpack_require__(5766),G3=__webpack_require__(1971),q3=__webpack_require__(167),U3=__webpack_require__(5806),R1=__webpack_require__(4097),W3=__webpack_require__(2597),X3=__webpack_require__(768),z3=__webpack_require__(7620),$3=__webpack_require__(7079),K3=__webpack_require__(7826),J3=__webpack_require__(6368),Y3=__webpack_require__(131),t4=__webpack_require__(640),e4=__webpack_require__(988),r4=__webpack_require__(2438),n4=__webpack_require__(6614),o4=__webpack_require__(9375),i4=__webpack_require__(6670),a4=__webpack_require__(5535),Q4=__webpack_require__(9645),s4=__webpack_require__(1618),T4=__webpack_require__(9950),u4=__webpack_require__(5710),c4=__webpack_require__(5896),l4=__webpack_require__(7512),d4=__webpack_require__(3572),p4=__webpack_require__(7725),h4=__webpack_require__(3289),f4=__webpack_require__(3735),m4=__webpack_require__(6465),L4=__webpack_require__(1107),y4=__webpack_require__(4445),g4=__webpack_require__(2558),b4=__webpack_require__(8926),v4=__webpack_require__(3365),H4=__webpack_require__(3006),M4=__webpack_require__(8835),_4=__webpack_require__(6369),x4=__webpack_require__(2417);MathJax.loader&&MathJax.loader.checkVersion("output/svg",t.VERSION,"output"),(0,A.combineWithMathJax)({_:{output:{common:{FontData:f3,Notation:m3,OutputJax:L3,Wrapper:y3,WrapperFactory:g3,Wrappers:{TeXAtom:b3,TextNode:v3,maction:H3,math:M3,menclose:_3,mfenced:x3,mfrac:O3,mglyph:S3,mi:V3,mmultiscripts:E3,mn:A3,mo:C3,mpadded:w3,mroot:N3,mrow:P3,ms:k3,mspace:I3,msqrt:R3,msubsup:D3,mtable:j3,mtd:B3,mtext:F3,mtr:Z3,munderover:G3,scriptbase:q3,semantics:U3}},svg_ts:R1,svg:{FontCache:W3,FontData:X3,Notation:z3,Wrapper:$3,WrapperFactory:K3,Wrappers_ts:J3,Wrappers:{TeXAtom:Y3,TextNode:t4,maction:e4,math:r4,menclose:n4,merror:o4,mfenced:i4,mfrac:a4,mglyph:Q4,mi:s4,mmultiscripts:T4,mn:u4,mo:c4,mpadded:l4,mphantom:d4,mroot:p4,mrow:h4,ms:f4,mspace:m4,msqrt:L4,msubsup:y4,mtable:g4,mtd:b4,mtext:v4,mtr:H4,munderover:M4,scriptbase:_4,semantics:x4}}}}}),MathJax.loader&&(0,A.combineDefaults)(MathJax.config.loader,"output/svg",{checkReady:function(){return MathJax.loader.load("output/svg/fonts/tex")}}),MathJax.startup&&(MathJax.startup.registerConstructor("svg",R1.SVG),MathJax.startup.useOutput("svg"));var O4=__webpack_require__(5887),S4=__webpack_require__(1103),V4=__webpack_require__(9124),E4=__webpack_require__(6001),A4=__webpack_require__(3696),C4=__webpack_require__(9587),w4=__webpack_require__(8348),N4=__webpack_require__(1376),P4=__webpack_require__(1439),k4=__webpack_require__(331),I4=__webpack_require__(4886),R4=__webpack_require__(4471),D4=__webpack_require__(5181),j4=__webpack_require__(3526),B4=__webpack_require__(5649),F4=__webpack_require__(7153),Z4=__webpack_require__(5745),G4=__webpack_require__(1411),q4=__webpack_require__(6384),U4=__webpack_require__(6041),W4=__webpack_require__(8199),X4=__webpack_require__(9848),z4=__webpack_require__(7906),$4=__webpack_require__(2644),K4=__webpack_require__(4926),w1=__webpack_require__(42),J4=__webpack_require__(7040),Y4=__webpack_require__(2560),t6=__webpack_require__(6982),e6=__webpack_require__(175),r6=__webpack_require_
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(d.CONFIG.load)).then(function(){return d.CONFIG.ready()}).catch(function(X){return d.CONFIG.failed(X)})})()})()});export default _6();
/*! Bundled license information:
mathjax/es5/tex-svg-full.js:
(*!
*************************************************************************
*
* mhchemParser.ts
* 4.1.1
*
* Parser for the \ce command and \pu command for MathJax and Co.
*
* mhchem's \ce is a tool for writing beautiful chemical equations easily.
* mhchem's \pu is a tool for writing physical units easily.
*
* ----------------------------------------------------------------------
*
* Copyright (c) 2015-2021 Martin Hensel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ----------------------------------------------------------------------
*
* https://github.com/mhchem/mhchemParser
*
*)
*/
//# sourceMappingURL=tex-svg-full-SL33OL2J.min.js.map