(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{JsdomAdaptor:()=>u,jsdomAdaptor:()=>h});const o=("undefined"!=typeof window?window:global).MathJax._.components.global,n=(o.GLOBAL,o.isObject,o.combineConfig,o.combineDefaults,o.combineWithMathJax),r=(o.MathJax,MathJax._.adaptors.HTMLAdaptor.HTMLAdaptor),a=MathJax._.util.Options,s=(a.isObject,a.APPEND,a.REMOVE,a.OPTIONS,a.Expandable,a.expandable,a.makeArray,a.keys,a.copy,a.insert,a.defaultOptions),i=a.userOptions,d=(a.selectOptions,a.selectOptionsFromKeys,a.separateOptions,a.lookup,MathJax._.util.AsyncLoad.asyncLoad);var c=function(t,e,o,n){return new(o||(o=Promise))((function(r,a){function s(t){try{d(n.next(t))}catch(t){a(t)}}function i(t){try{d(n.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(s,i)}d((n=n.apply(t,e||[])).next())}))};const p={badCSS:!0,badSizes:!0};class u extends(function(t,e={}){var o;return e=i(s({},p),e),(o=class extends t{constructor(...t){super(t[0]),this.canMeasureNodes=!1;const e=this.constructor;this.options=i(s({},e.OPTIONS),t[1])}fontSize(t){return e.badCSS?this.options.fontSize:super.fontSize(t)}fontFamily(t){return e.badCSS?this.options.fontFamily:super.fontFamily(t)}nodeSize(t,n=1,r=null){if(!e.badSizes)return super.nodeSize(t,n,r);const a=this.textContent(t),s=Array.from(a.replace(o.cjkPattern,"")).length;return[(Array.from(a).length-s)*this.options.cjkCharWidth+s*this.options.unknownCharWidth,this.options.unknownCharHeight]}nodeBBox(t){return e.badSizes?{left:0,right:0,top:0,bottom:0}:super.nodeBBox(t)}createWorker(t,e){return c(this,void 0,void 0,(function*(){const{Worker:o}=yield d("node:worker_threads");const{path:n,maps:r}=e,a=`${n}/${e.worker}`,s=new class{constructor(t,e={}){this.worker=new o(t,e)}addEventListener(t,e){this.worker.on(t,e)}postMessage(t){this.worker.postMessage({data:t})}terminate(){this.worker.terminate()}}(a,{type:"module",workerData:{maps:r}});return s.addEventListener("message",t),s}))}}).OPTIONS=Object.assign(Object.assign({},e.badCSS?{fontSize:16,fontFamily:"Times"}:{}),e.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),o.cjkPattern=new RegExp(["[","\u1100-\u115f","\u2329\u232a","\u2e80-\u303e","\u3040-\u3247","\u3250-\u4dbf","\u4e00-\ua4c6","\ua960-\ua97c","\uac00-\ud7a3","\uf900-\ufaff","\ufe10-\ufe19","\ufe30-\ufe6b","\uff01-\uff60\uffe0-\uffe6","\u{1b000}-\u{1b001}","\u{1f200}-\u{1f251}","\u{20000}-\u{3fffd}","]"].join(""),"gu"),o}(r)){}function h(t,e=null){return new u((new t).window,e)}MathJax.loader&&MathJax.loader.checkVersion("adaptors/jsdom","4.0.0","adaptors"),n({_:{adaptors:{jsdomAdaptor:e}}}),MathJax.startup&&(MathJax.startup.registerConstructor("jsdomAdaptor",(t=>h(MathJax.config.JSDOM,t))),MathJax.startup.useAdaptor("jsdomAdaptor",!0))})();