+`+r+``+i+`>
+`}listitem(e){return`${this.parser.parse(e.tokens)}
+`}checkbox({checked:e}){return` `}paragraph({tokens:e}){return`${this.parser.parseInline(e)}
+`}table(e){let t=``,n=``;for(let t=0;t${r}`,`
+`}tablerow({text:e}){return`
+${e}
+`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`${n}>
+`}strong({tokens:e}){return`${this.parser.parseInline(e)} `}em({tokens:e}){return`${this.parser.parseInline(e)} `}codespan({text:e}){return`${sb(e,!0)}`}br(e){return` `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=cb(e);if(i===null)return r;e=i;let a=``+r+` `,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=cb(e);if(i===null)return sb(n);e=i;let a=` `,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:sb(e.text)}},vb=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},yb=class e{options;renderer;textRenderer;constructor(e){this.options=e||Gv,this.options.renderer=this.options.renderer||new _b,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vb}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t=``;for(let n=0;n{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new _b(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new hb(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new bb;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];bb.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&bb.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gb.lex(e,t??this.defaults)}parser(e,t){return yb.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?gb.lex:gb.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?yb.parse:yb.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?gb.lex:gb.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?yb.parse:yb.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
+Please report this to https://github.com/markedjs/marked.`,e){let e=`An error occurred:
`+sb(n.message+``,!0)+` `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Sb(e,t){return xb.parse(e,t)}Sb.options=Sb.setOptions=function(e){return xb.setOptions(e),Sb.defaults=xb.defaults,Kv(Sb.defaults),Sb},Sb.getDefaults=Wv,Sb.defaults=Gv,Sb.use=function(...e){return xb.use(...e),Sb.defaults=xb.defaults,Kv(Sb.defaults),Sb},Sb.walkTokens=function(e,t){return xb.walkTokens(e,t)},Sb.parseInline=xb.parseInline,Sb.Parser=yb,Sb.parser=yb.parse,Sb.Renderer=_b,Sb.TextRenderer=vb,Sb.Lexer=gb,Sb.lexer=gb.lex,Sb.Tokenizer=hb,Sb.Hooks=bb,Sb.parse=Sb,Sb.options,Sb.setOptions,Sb.use,Sb.walkTokens,Sb.parseInline,yb.parse,gb.lex;var Cb=`modulepreload`,wb=function(e){return`/`+e},Tb={};const Eb=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=wb(t,n),t in Tb)return;Tb[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Cb,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};var Db=300,Ob=`300px`,kb=500;function Ab(e={}){let{immediate:t=!1,debounceDelay:n=Db,rootMargin:r=Ob,idleTimeout:i=kb}=e,[a,o]=(0,y.useState)(!1),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(null),u=(0,y.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,y.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,y.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,y.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var jb=/\s/,Mb=/^\s+$/,Nb=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),Pb=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,Fb=e=>e.some(e=>Pb(e)&&Nb.has(e.tagName)),Ib=e=>{let t=[],n=``,r=!1;for(let i of e){let e=jb.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},Lb=e=>{let t=[],n=``;for(let r of e)jb.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},Rb=(e,t,n,r)=>({type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:`text`,value:e}]}),zb=(e,t,n)=>{let r=t.at(-1);if(!(r&&`children`in r))return;if(Fb(t))return Ne;let i=r,a=i.children.indexOf(e);if(a===-1)return;let o=e.value;if(!o.trim())return;let s=(n.sep===`char`?Lb(o):Ib(o)).map(e=>Mb.test(e)?{type:`text`,value:e}:Rb(e,n.animation,n.duration,n.easing));return i.children.splice(a,1,...s),a+s.length};function Bb(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`};return{name:`animate`,type:`animate`,rehypePlugin:()=>e=>{Pe(e,`text`,(e,n)=>zb(e,n,t))}}}Bb();var Vb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),Hb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),Ub=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),Wb=e=>(0,k.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,k.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Gb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),Kb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),qb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),Jb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Yb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),Xb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),Zb=(...e)=>Rh(gm(e)),Qb=(e,t,n)=>{let r=typeof t==`string`?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},$b=(0,y.createContext)({code:``}),ex=()=>(0,y.useContext)($b),tx=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(0),{code:u}=ex(),{isAnimating:d}=(0,y.useContext)(FS),f=a??u,p=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{s||(await navigator.clipboard.writeText(f),c(!0),e?.(),l.current=window.setTimeout(()=>c(!1),n))}catch(e){t?.(e)}};(0,y.useEffect)(()=>()=>{window.clearTimeout(l.current)},[]);let m=s?Vb:Hb;return(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:d,onClick:p,title:`Copy Code`,type:`button`,...o,children:r??(0,k.jsx)(m,{size:14})})},nx={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},rx=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let{code:s}=ex(),{isAnimating:c}=(0,y.useContext)(FS),l=a??s,u=`file.${n&&n in nx?nx[n]:`txt`}`,d=()=>{try{Qb(u,l,`text/plain`),e?.()}catch(e){t?.(e)}};return(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:c,onClick:d,title:`Download file`,type:`button`,...o,children:r??(0,k.jsx)(Ub,{size:14})})},ix=()=>(0,k.jsxs)(`div`,{className:`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`,children:[(0,k.jsx)(`div`,{className:`h-[46px] w-full bg-muted/80`}),(0,k.jsx)(`div`,{className:`flex w-full items-center justify-center p-4`,children:(0,k.jsx)(Wb,{className:`size-4 animate-spin`})})]}),ax=/\.[^/.]+$/,ox=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(ax,``)}.${i}`}Qb(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,k.jsxs)(`div`,{className:`group relative my-4 inline-block`,"data-streamdown":`image-wrapper`,children:[(0,k.jsx)(`img`,{alt:r,className:Zb(`max-w-full rounded-lg`,t),"data-streamdown":`image`,src:n,...i}),(0,k.jsx)(`div`,{className:`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`}),(0,k.jsx)(`button`,{className:Zb(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:a,title:`Download image`,type:`button`,children:(0,k.jsx)(Ub,{size:14})})]}):null},sx=0,cx=()=>{sx+=1,sx===1&&(document.body.style.overflow=`hidden`)},lx=()=>{sx=Math.max(0,sx-1),sx===0&&(document.body.style.overflow=``)},ux=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=(0,y.useState)(!1),o=(0,y.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),s=(0,y.useCallback)(()=>{r(),n()},[r,n]);return(0,y.useEffect)(()=>{if(t){cx();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),lx()}}},[t,n]),t?(0,k.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`,"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,k.jsxs)(`div`,{className:`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,k.jsx)(`button`,{className:`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`,onClick:n,title:`Close`,type:`button`,children:(0,k.jsx)(qb,{size:16})}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2 font-semibold text-lg`,children:[(0,k.jsx)(Jb,{size:20}),(0,k.jsx)(`span`,{children:`Open external link?`})]}),(0,k.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`You're about to visit an external website.`})]}),(0,k.jsx)(`div`,{className:Zb(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsx)(`button`,{className:`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`,onClick:o,type:`button`,children:i?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Vb,{size:14}),(0,k.jsx)(`span`,{children:`Copied`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Hb,{size:14}),(0,k.jsx)(`span`,{children:`Copy link`})]})}),(0,k.jsxs)(`button`,{className:`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`,onClick:s,type:`button`,children:[(0,k.jsx)(Jb,{size:14}),(0,k.jsx)(`span`,{children:`Open link`})]})]})]})}):null},dx=(0,y.createContext)(null),fx=()=>(0,y.useContext)(dx),px=()=>fx()?.code??null,mx=()=>fx()?.mermaid??null,hx=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),gx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[o,s]=(0,y.useState)(!1),c=(0,y.useRef)(null),{isAnimating:l}=(0,y.useContext)(FS),u=mx(),d=async t=>{try{if(t===`mmd`){Qb(`diagram.mmd`,e,`text/plain`),s(!1),r?.(t);return}if(!u){a?.(Error(`Mermaid plugin not available`));return}let n=u.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),c=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(c,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){Qb(`diagram.svg`,l,`image/svg+xml`),s(!1),r?.(t);return}if(t===`png`){Qb(`diagram.png`,await hx(l),`image/png`),r?.(t),s(!1);return}}catch(e){a?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();c.current&&!t.includes(c.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,k.jsxs)(`div`,{className:`relative`,ref:c,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:l,onClick:()=>s(!o),title:`Download diagram`,type:`button`,children:t??(0,k.jsx)(Ub,{size:14})}),o?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`svg`),title:`Download diagram as SVG`,type:`button`,children:`SVG`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`png`),title:`Download diagram as PNG`,type:`button`,children:`PNG`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`mmd`),title:`Download diagram as MMD`,type:`button`,children:`MMD`})]}):null]})},_x=0,vx=()=>{_x+=1,_x===1&&(document.body.style.overflow=`hidden`)},yx=()=>{_x=Math.max(0,_x-1),_x===0&&(document.body.style.overflow=``)},bx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[o,s]=(0,y.useState)(!1),{isAnimating:c,controls:l}=(0,y.useContext)(FS),u=(()=>{if(typeof l==`boolean`)return l;let e=l.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),d=()=>{s(!o)};return(0,y.useEffect)(()=>{if(o){vx();let e=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),yx()}}},[o]),(0,y.useEffect)(()=>{o?n?.():r&&r()},[o,n,r]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:c,onClick:d,title:`View fullscreen`,type:`button`,...a,children:(0,k.jsx)(Gb,{size:14})}),o?(0,k.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`,onClick:d,onKeyDown:e=>{e.key===`Escape`&&d()},role:`button`,tabIndex:0,children:[(0,k.jsx)(`button`,{className:`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`,onClick:d,title:`Exit fullscreen`,type:`button`,children:(0,k.jsx)(qb,{size:20})}),(0,k.jsx)(`div`,{className:`flex size-full items-center justify-center p-4`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,k.jsx)(BS,{chart:e,className:`size-full [&_svg]:h-auto [&_svg]:w-auto`,config:t,fullscreen:!0,showControls:u})})]}):null]})},xx=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},Sx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
+`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
+`)},Cx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
+`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
+`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
+`)},wx=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},Tx=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>wx(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;ewx(e)).join(` | `)} |`,i+=1;return r.join(`
+`)},Ex=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(null),u=(0,y.useRef)(0),{isAnimating:d}=(0,y.useContext)(FS),f=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(l.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=xx(t),s=e===`csv`?Sx(a):Cx(a),d=new ClipboardItem({"text/plain":new Blob([s],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([d]),c(!0),o(!1),n?.(e),u.current=window.setTimeout(()=>c(!1),i)}catch(e){r?.(e)}};(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(u.current)}},[]);let p=s?Vb:Hb;return(0,k.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:d,onClick:()=>o(!a),title:`Copy table`,type:`button`,children:e??(0,k.jsx)(p,{size:14})}),a?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>f(`csv`),title:`Copy table as CSV`,type:`button`,children:`CSV`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>f(`tsv`),title:`Copy table as TSV`,type:`button`,children:`TSV`})]}):null]})},Dx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=(0,y.useState)(!1),o=(0,y.useRef)(null),{isAnimating:s}=(0,y.useContext)(FS),c=e=>{try{let t=(o.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=xx(t),s=e===`csv`?Sx(i):Tx(i);Qb(`table.${e===`csv`?`csv`:`md`}`,s,e===`csv`?`text/csv`:`text/markdown`),a(!1),n?.(e)}catch(e){r?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();o.current&&!t.includes(o.current)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,k.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:s,onClick:()=>a(!i),title:`Download table`,type:`button`,children:e??(0,k.jsx)(Ub,{size:14})}),i?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>c(`csv`),title:`Download table as CSV`,type:`button`,children:`CSV`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>c(`markdown`),title:`Download table as Markdown`,type:`button`,children:`Markdown`})]}):null]})},Ox=({children:e,className:t,showControls:n,...r})=>(0,k.jsxs)(`div`,{className:`my-4 flex flex-col space-y-2`,"data-streamdown":`table-wrapper`,children:[n?(0,k.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,k.jsx)(Ex,{}),(0,k.jsx)(Dx,{})]}):null,(0,k.jsx)(`div`,{className:`overflow-x-auto overscroll-y-auto`,children:(0,k.jsx)(`table`,{className:Zb(`w-full border-collapse border border-border`,t),"data-streamdown":`table`,...r,children:e})})]}),kx=(0,y.lazy)(()=>Eb(()=>import(`./code-block-OCS4YCEC-Dmmx1Rax.js`),[]).then(e=>({default:e.CodeBlock}))),Ax=(0,y.lazy)(()=>Eb(()=>import(`./mermaid-NOHMQCX5-D0R4kLcg.js`),[]).then(e=>({default:e.Mermaid}))),jx=/language-([^\s]+)/;function Mx(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Nx(e,t){return e.className===t.className&&Mx(e.node,t.node)}var Px=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,Fx=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Ix=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`ol`,{className:Zb(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>Nx(e,t));Ix.displayName=`MarkdownOl`;var Lx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`li`,{className:Zb(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&Mx(e.node,t.node));Lx.displayName=`MarkdownLi`;var Rx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`ul`,{className:Zb(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>Nx(e,t));Rx.displayName=`MarkdownUl`;var zx=(0,y.memo)(({className:e,node:t,...n})=>(0,k.jsx)(`hr`,{className:Zb(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>Nx(e,t));zx.displayName=`MarkdownHr`;var Bx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`span`,{className:Zb(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>Nx(e,t));Bx.displayName=`MarkdownStrong`;var Vx=(0,y.memo)(({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=(0,y.useContext)(FS),[o,s]=(0,y.useState)(!1),c=n===`streamdown:incomplete-link`,l=(0,y.useCallback)(async e=>{if(!(!(a!=null&&a.enabled&&n)||c)){if(e.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}s(!0)}},[a,n,c]),u=(0,y.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),d=(0,y.useCallback)(()=>{s(!1)},[]),f={url:n??``,isOpen:o,onClose:d,onConfirm:u};return a!=null&&a.enabled&&n?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{className:Zb(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":c,"data-streamdown":`link`,onClick:l,type:`button`,children:e}),a.renderModal?a.renderModal(f):(0,k.jsx)(ux,{...f})]}):(0,k.jsx)(`a`,{className:Zb(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":c,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Nx(e,t)&&e.href===t.href);Vx.displayName=`MarkdownA`;var Hx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h1`,{className:Zb(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>Nx(e,t));Hx.displayName=`MarkdownH1`;var Ux=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h2`,{className:Zb(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>Nx(e,t));Ux.displayName=`MarkdownH2`;var Wx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h3`,{className:Zb(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>Nx(e,t));Wx.displayName=`MarkdownH3`;var Gx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h4`,{className:Zb(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>Nx(e,t));Gx.displayName=`MarkdownH4`;var Kx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h5`,{className:Zb(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>Nx(e,t));Kx.displayName=`MarkdownH5`;var qx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h6`,{className:Zb(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>Nx(e,t));qx.displayName=`MarkdownH6`;var Jx=(0,y.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,y.useContext)(FS);return(0,k.jsx)(Ox,{className:t,showControls:Px(i,`table`),...r,children:e})},(e,t)=>Nx(e,t));Jx.displayName=`MarkdownTable`;var Yx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`thead`,{className:Zb(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>Nx(e,t));Yx.displayName=`MarkdownThead`;var Xx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`tbody`,{className:Zb(`divide-y divide-border bg-muted/40`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>Nx(e,t));Xx.displayName=`MarkdownTbody`;var Zx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`tr`,{className:Zb(`border-border border-b`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>Nx(e,t));Zx.displayName=`MarkdownTr`;var Qx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`th`,{className:Zb(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>Nx(e,t));Qx.displayName=`MarkdownTh`;var $x=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`td`,{className:Zb(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>Nx(e,t));$x.displayName=`MarkdownTd`;var eS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`blockquote`,{className:Zb(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>Nx(e,t));eS.displayName=`MarkdownBlockquote`;var tS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`sup`,{className:Zb(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>Nx(e,t));tS.displayName=`MarkdownSup`;var nS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`sub`,{className:Zb(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>Nx(e,t));nS.displayName=`MarkdownSub`;var rS=(0,y.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,y.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,y.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,y.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,y.isValidElement)(e))return e;if(e.type===Ix){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,k.jsx)(`section`,{className:t,...r,children:i}):null}return(0,k.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Nx(e,t));rS.displayName=`MarkdownSection`;var iS=(0,y.memo)(({node:e,className:t,children:n,...r})=>{let i=!(`data-block`in r),{mermaid:a,controls:o}=(0,y.useContext)(FS),s=mx();if(i)return(0,k.jsx)(`code`,{className:Zb(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let c=(t?.match(jx))?.at(1)??``,l=``;if((0,y.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?l=n.props.children:typeof n==`string`&&(l=n),c===`mermaid`&&s){let e=Px(o,`mermaid`),n=Fx(o,`download`),r=Fx(o,`copy`),i=Fx(o,`fullscreen`),s=Fx(o,`panZoom`),c=e&&(n||r||i);return(0,k.jsx)(y.Suspense,{fallback:(0,k.jsx)(ix,{}),children:(0,k.jsxs)(`div`,{className:Zb(`group relative my-4 h-auto rounded-xl border p-4`,t),"data-streamdown":`mermaid-block`,children:[c?(0,k.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[n?(0,k.jsx)(gx,{chart:l,config:a?.config}):null,r?(0,k.jsx)(tx,{code:l}):null,i?(0,k.jsx)(bx,{chart:l,config:a?.config}):null]}):null,(0,k.jsx)(Ax,{chart:l,config:a?.config,showControls:s})]})})}let u=Px(o,`code`);return(0,k.jsx)(y.Suspense,{fallback:(0,k.jsx)(ix,{}),children:(0,k.jsx)(kx,{className:Zb(`overflow-x-auto border-border border-t`,t),code:l,language:c,children:u?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rx,{code:l,language:c}),(0,k.jsx)(tx,{})]}):null})})},(e,t)=>e.className===t.className&&Mx(e.node,t.node));iS.displayName=`MarkdownCode`;var aS=(0,y.memo)(ox,(e,t)=>e.className===t.className&&Mx(e.node,t.node));aS.displayName=`MarkdownImg`;var oS=(0,y.memo)(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(i.length===1&&(0,y.isValidElement)(i[0])){let t=i[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in i[0].props)return(0,k.jsx)(k.Fragment,{children:e})}return(0,k.jsx)(`p`,{className:t,...r,children:e})},(e,t)=>Nx(e,t));oS.displayName=`MarkdownParagraph`;var sS={ol:Ix,li:Lx,ul:Rx,hr:zx,strong:Bx,a:Vx,h1:Hx,h2:Ux,h3:Wx,h4:Gx,h5:Kx,h6:qx,table:Jx,thead:Yx,tbody:Xx,tr:Zx,th:Qx,td:$x,blockquote:eS,code:iS,img:aS,pre:({children:e})=>(0,y.isValidElement)(e)?(0,y.cloneElement)(e,{"data-block":`true`}):e,sup:tS,sub:nS,p:oS,section:rS},cS=()=>e=>{Ie(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},lS=[],uS={allowDangerousHtml:!0},dS=new WeakMap,fS=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=dS.get(e);n||(n=e.name,dS.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=dS.get(r);e||(e=r.name,dS.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},pS=e=>{let t=mS(e),n=e.children||``;return xS(t.runSync(t.parse(n),n),e)},mS=e=>{let t=fS.get(e);if(t)return t;let n=gS(e);return fS.set(e,n),n},hS=e=>e.some(e=>Array.isArray(e)?e[0]===is:e===is),gS=e=>{let t=e.rehypePlugins||lS,n=e.remarkPlugins||lS,r=hS(t)?n:[...n,cS],i=e.remarkRehypeOptions?{...uS,...e.remarkRehypeOptions}:uS;return Pv().use(h_).use(r).use(ov,i).use(t)},_S=e=>e,vS=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},yS=(e,t)=>{for(let n in Ag)if(Object.hasOwn(Ag,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=Ag[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},bS=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},xS=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||_S;Ie(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return vS(c,s,a,e.value),s;if(e.type===`element`&&(yS(e,t),bS(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return cg(e,{Fragment:k.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})},SS=/\[\^[\w-]{1,200}\](?!:)/,CS=/\[\^[\w-]{1,200}\]:/,wS=/<\/(\w+)>/,TS=/<(\w+)[\s>]/,ES=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),DS=e=>{let t=0;for(let n=0;n{let t=SS.test(e),n=CS.test(e);if(t||n)return[e];let r=gb.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){if(i[n-1]+=t,e.type===`html`){let e=t.match(wS);if(e){let t=e[1];a.at(-1)===t&&a.pop()}}continue}if(e.type===`html`&&e.block){let e=t.match(TS);if(e){let n=e[1];t.includes(`${n}>`)||ES.has(n.toLowerCase())||a.push(n)}}if(n>0&&!o){let e=i[n-1];if(DS(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},kS={...os,protocols:{...os.protocols,href:[...os.protocols?.href??[],`tel`]}},AS={raw:is,sanitize:[Cs,kS],harden:[Le,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},jS={gfm:[Vf,{}]},MS=Object.values(AS),NS=Object.values(jS),PS={block:` ▋`,circle:` ●`},FS=(0,y.createContext)({shikiTheme:[`github-light`,`github-dark`],controls:!0,isAnimating:!1,mode:`streaming`,mermaid:void 0,linkSafety:{enabled:!0}}),IS=(0,y.memo)(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>(0,k.jsx)(pS,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});IS.displayName=`Block`;var LS=[`github-light`,`github-dark`],RS=(0,y.memo)(({children:e,mode:t=`streaming`,parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=MS,remarkPlugins:a=NS,className:o,shikiTheme:s=LS,mermaid:c,controls:l=!0,isAnimating:u=!1,animated:d,BlockComponent:f=IS,parseMarkdownIntoBlocksFn:p=OS,caret:m,plugins:h,remend:g,linkSafety:_={enabled:!0},allowedTags:v,...b})=>{let x=(0,y.useId)(),[ee,S]=(0,y.useTransition)(),C=(0,y.useMemo)(()=>typeof e==`string`?t===`streaming`&&n?mm(e,g):e:``,[e,t,n,g]),w=(0,y.useMemo)(()=>p(C),[C,p]),[T,te]=(0,y.useState)(w);(0,y.useEffect)(()=>{t===`streaming`?S(()=>{te(w)}):te(w)},[w,t]);let ne=t===`streaming`?T:w,E=(0,y.useMemo)(()=>ne.map((e,t)=>`${x}-${t}`),[ne.length,x]),D=(0,y.useMemo)(()=>d?d===!0?Bb():Bb(d):null,[d]),re=(0,y.useMemo)(()=>({shikiTheme:(h?.code)?.getThemes()??s,controls:l,isAnimating:u,mode:t,mermaid:c,linkSafety:_}),[s,l,u,t,c,_,h?.code]),ie=(0,y.useMemo)(()=>({...sS,...r}),[r]),ae=(0,y.useMemo)(()=>{let e=[];return h!=null&&h.cjk&&(e=[...e,...h.cjk.remarkPluginsBefore]),e=[...e,...a],h!=null&&h.cjk&&(e=[...e,...h.cjk.remarkPluginsAfter]),h!=null&&h.math&&(e=[...e,h.math.remarkPlugin]),e},[a,h?.math,h?.cjk]),O=(0,y.useMemo)(()=>{let e=i;if(v&&Object.keys(v).length>0&&i===MS){let t={...kS,tagNames:[...kS.tagNames??[],...Object.keys(v)],attributes:{...kS.attributes,...v}};e=[AS.raw,[Cs,t],AS.harden]}return h!=null&&h.math&&(e=[...e,h.math.rehypePlugin]),D&&u&&(e=[...e,D.rehypePlugin]),e},[i,h?.math,D,u,v]),oe=(0,y.useMemo)(()=>m&&u?{"--streamdown-caret":`"${PS[m]}"`}:void 0,[m,u]);return t===`static`?(0,k.jsx)(dx.Provider,{value:h??null,children:(0,k.jsx)(FS.Provider,{value:re,children:(0,k.jsx)(`div`,{className:Zb(`space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0`,o),children:(0,k.jsx)(pS,{components:ie,rehypePlugins:O,remarkPlugins:ae,...b,children:e})})})}):(0,k.jsx)(dx.Provider,{value:h??null,children:(0,k.jsx)(FS.Provider,{value:re,children:(0,k.jsxs)(`div`,{className:Zb(`space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0`,m?`*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]`:null,o),style:oe,children:[ne.length===0&&m&&u&&(0,k.jsx)(`span`,{}),ne.map((e,t)=>(0,k.jsx)(f,{components:ie,content:e,index:t,rehypePlugins:O,remarkPlugins:ae,shouldParseIncompleteMarkdown:n,...b},E[t]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);RS.displayName=`Streamdown`;var zS=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let c=(0,y.useRef)(null),l=(0,y.useRef)(null),[u,d]=(0,y.useState)(o),[f,p]=(0,y.useState)({x:0,y:0}),[m,h]=(0,y.useState)(!1),[g,_]=(0,y.useState)({x:0,y:0}),[v,b]=(0,y.useState)({x:0,y:0}),x=(0,y.useCallback)(e=>{d(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),ee=(0,y.useCallback)(()=>{x(i)},[x,i]),S=(0,y.useCallback)(()=>{x(-i)},[x,i]),C=(0,y.useCallback)(()=>{d(o),p({x:0,y:0})},[o]),w=(0,y.useCallback)(e=>{e.preventDefault(),x(e.deltaY>0?-i:i)},[x,i]),T=(0,y.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;h(!0),_({x:e.clientX,y:e.clientY}),b(f);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[f]),te=(0,y.useCallback)(e=>{if(!m)return;e.preventDefault();let t=e.clientX-g.x,n=e.clientY-g.y;p({x:v.x+t,y:v.y+n})},[m,g,v]),ne=(0,y.useCallback)(e=>{h(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,y.useEffect)(()=>{let e=c.current;if(e)return e.addEventListener(`wheel`,w,{passive:!1}),()=>{e.removeEventListener(`wheel`,w)}},[w]),(0,y.useEffect)(()=>{let e=l.current;if(e&&m)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,te,{passive:!1}),e.addEventListener(`pointerup`,ne),e.addEventListener(`pointercancel`,ne),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,te),e.removeEventListener(`pointerup`,ne),e.removeEventListener(`pointercancel`,ne)}},[m,te,ne]),(0,k.jsxs)(`div`,{className:Zb(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:c,style:{cursor:m?`grabbing`:`grab`},children:[a?(0,k.jsxs)(`div`,{className:Zb(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,k.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,disabled:u>=r,onClick:ee,title:`Zoom in`,type:`button`,children:(0,k.jsx)(Yb,{size:16})}),(0,k.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,disabled:u<=n,onClick:S,title:`Zoom out`,type:`button`,children:(0,k.jsx)(Xb,{size:16})}),(0,k.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:C,title:`Reset zoom and pan`,type:`button`,children:(0,k.jsx)(Kb,{size:16})})]}):null,(0,k.jsx)(`div`,{className:Zb(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:T,ref:l,role:`application`,style:{transform:`translate(${f.x}px, ${f.y}px) scale(${u})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},BS=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,o]=(0,y.useState)(null),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(``),[d,f]=(0,y.useState)(``),[p,m]=(0,y.useState)(0),{mermaid:h}=(0,y.useContext)(FS),g=mx(),_=h?.errorComponent,{shouldRender:v,containerRef:b}=Ab({immediate:r});if((0,y.useEffect)(()=>{if(v){if(!g){o(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{o(null),c(!0);let t=g.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);u(a),f(a)}catch(e){d||l||o(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{c(!1)}})()}},[e,n,p,v,g]),!(v||l||d))return(0,k.jsx)(`div`,{className:Zb(`my-4 min-h-[200px]`,t),ref:b});if(s&&!l&&!d)return(0,k.jsx)(`div`,{className:Zb(`my-4 flex justify-center p-4`,t),ref:b,children:(0,k.jsxs)(`div`,{className:`flex items-center space-x-2 text-muted-foreground`,children:[(0,k.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-current border-b-2`}),(0,k.jsx)(`span`,{className:`text-sm`,children:`Loading diagram...`})]})});if(a&&!l&&!d)return _?(0,k.jsx)(`div`,{ref:b,children:(0,k.jsx)(_,{chart:e,error:a,retry:()=>m(e=>e+1)})}):(0,k.jsxs)(`div`,{className:Zb(`rounded-lg border border-red-200 bg-red-50 p-4`,t),ref:b,children:[(0,k.jsxs)(`p`,{className:`font-mono text-red-700 text-sm`,children:[`Mermaid Error: `,a]}),(0,k.jsxs)(`details`,{className:`mt-2`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer text-red-600 text-xs`,children:`Show Code`}),(0,k.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`,children:e})]})]});let x=l||d;return(0,k.jsx)(`div`,{className:Zb(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,k.jsx)(zS,{className:Zb(r?`size-full overflow-hidden`:`my-4 overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,k.jsx)(`div`,{"aria-label":`Mermaid chart`,className:Zb(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})};function VS(e,t){return HS(e,t||{})||{type:`root`,children:[]}}function HS(e,t){let n=US(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function US(e,t){switch(e.nodeType){case 1:return JS(e,t);case 3:return KS(e);case 8:return qS(e);case 9:return WS(e,t);case 10:return GS();case 11:return WS(e,t);default:return}}function WS(e,t){return{type:`root`,children:YS(e,t)}}function GS(){return{type:`doctype`}}function KS(e){return{type:`text`,value:e.nodeValue||``}}function qS(e){return{type:`comment`,value:e.nodeValue||``}}function JS(e,t){let n=e.namespaceURI,r=n===en.svg?Zt:Xt,i=n===en.html?e.tagName.toLowerCase():e.tagName,a=n===en.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++cl&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
+`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function hC(e,t,n){return e.type===`element`?gC(e,t,n):e.type===`text`?n.whitespace===`normal`?_C(e,n):vC(e):[]}function gC(e,t,n){let r=bC(e,n),i=e.children||[],a=-1,o=[];if(fC(e))return o;let s,c;for(cC(e)||dC(e)&&$S(t,e,dC)?c=`
+`:uC(e)?(s=2,c=2):pC(e)&&(s=1,c=1);++a15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15":`>`,"<":`<`,'"':`"`,"'":`'`},AC=/[&><"']/g;function jC(e){return String(e).replace(AC,e=>kC[e])}var MC=function e(t){return t.type===`ordgroup`||t.type===`color`?t.body.length===1?e(t.body[0]):t:t.type===`font`?e(t.body):t},NC=function(e){var t=MC(e);return t.type===`mathord`||t.type===`textord`||t.type===`atom`},PC=function(e){if(!e)throw Error(`Expected non-null, but got `+String(e));return e},FC={deflt:EC,escape:jC,hyphenate:OC,getBaseElem:MC,isCharacterBox:NC,protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|*58|*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`}},IC={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function LC(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!=`string`)return n.enum[0];switch(n){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{}}}var RC=class{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={},IC)if(IC.hasOwnProperty(t)){var n=IC[t];this[t]=e[t]===void 0?LC(n):n.processor?n.processor(e[t]):e[t]}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new z(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=FC.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},zC=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return JC[YC[this.id]]}sub(){return JC[XC[this.id]]}fracNum(){return JC[ZC[this.id]]}fracDen(){return JC[QC[this.id]]}cramp(){return JC[$C[this.id]]}text(){return JC[ew[this.id]]}isTight(){return this.size>=2}},BC=0,VC=1,HC=2,UC=3,WC=4,GC=5,KC=6,qC=7,JC=[new zC(BC,0,!1),new zC(VC,0,!0),new zC(HC,1,!1),new zC(UC,1,!0),new zC(WC,2,!1),new zC(GC,2,!0),new zC(KC,3,!1),new zC(qC,3,!0)],YC=[WC,GC,WC,GC,KC,qC,KC,qC],XC=[GC,GC,GC,GC,qC,qC,qC,qC],ZC=[HC,UC,WC,GC,KC,qC,KC,qC],QC=[UC,UC,GC,GC,qC,qC,qC,qC],$C=[VC,VC,UC,UC,GC,GC,qC,qC],ew=[BC,VC,HC,UC,HC,UC,HC,UC],tw={DISPLAY:JC[BC],TEXT:JC[HC],SCRIPT:JC[WC],SCRIPTSCRIPT:JC[KC]},nw=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function rw(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var iw=[];nw.forEach(e=>e.blocks.forEach(e=>iw.push(...e)));function aw(e){for(var t=0;t=iw[t]&&e<=iw[t+1])return!0;return!1}var ow=80,sw=function(e,t){return`M95,`+(622+e+t)+`
+c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
+c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
+c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
+s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
+c69,-144,104.5,-217.7,106.5,-221
+l`+e/2.075+` -`+e+`
+c5.3,-9.3,12,-14,20,-14
+H400000v`+(40+e)+`H845.2724
+s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
+c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
+M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},cw=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
+c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
+c340,-704.7,510.7,-1060.3,512,-1067
+l`+e/2.084+` -`+e+`
+c4.7,-7.3,11,-11,19,-11
+H40000v`+(40+e)+`H1012.3
+s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
+c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
+s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
+c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
+M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},lw=function(e,t){return`M983 `+(10+e+t)+`
+l`+e/3.13+` -`+e+`
+c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
+H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
+s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
+c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
+c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
+c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
+c53.7,-170.3,84.5,-266.8,92.5,-289.5z
+M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},uw=function(e,t){return`M424,`+(2398+e+t)+`
+c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
+c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
+s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
+s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
+l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
+v`+(40+e)+`H1014.6
+s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
+c-2,6,-10,9,-24,9
+c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
+h400000v`+(40+e)+`h-400000z`},dw=function(e,t){return`M473,`+(2713+e+t)+`
+c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
+c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
+s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
+c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
+c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
+s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
+606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},fw=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},pw=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
+H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
+h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
+c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
+219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},mw=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=sw(t,ow);break;case`sqrtSize1`:r=cw(t,ow);break;case`sqrtSize2`:r=lw(t,ow);break;case`sqrtSize3`:r=uw(t,ow);break;case`sqrtSize4`:r=dw(t,ow);break;case`sqrtTall`:r=pw(t,ow,n)}return r},hw=function(e,t){switch(e){case`⎜`:return`M291 0 H417 V`+t+` H291z M291 0 H417 V`+t+` H291z`;case`∣`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`;case`∥`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`+(`M367 0 H410 V`+t+` H367z M367 0 H410 V`+t+` H367z`);case`⎟`:return`M457 0 H583 V`+t+` H457z M457 0 H583 V`+t+` H457z`;case`⎢`:return`M319 0 H403 V`+t+` H319z M319 0 H403 V`+t+` H319z`;case`⎥`:return`M263 0 H347 V`+t+` H263z M263 0 H347 V`+t+` H263z`;case`⎪`:return`M384 0 H504 V`+t+` H384z M384 0 H504 V`+t+` H384z`;case`⏐`:return`M312 0 H355 V`+t+` H312z M312 0 H355 V`+t+` H312z`;case`‖`:return`M257 0 H300 V`+t+` H257z M257 0 H300 V`+t+` H257z`+(`M478 0 H521 V`+t+` H478z M478 0 H521 V`+t+` H478z`);default:return``}},gw={doubleleftarrow:`M262 157
+l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
+c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
+-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
+-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
+m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
+-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
+-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
+-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
+-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
+c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
+-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
+-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
+c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
+-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
+-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
+H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
+ 435 0h399565z`,leftgroupunder:`M400000 262
+H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
+-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
+-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
+-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
+-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
+-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
+m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
+-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
+-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
+v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
+-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
+-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
+M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
+M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
+-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
+c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
+M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
+c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
+-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
+c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
+-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
+-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
+m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
+60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
+-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
+m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
+c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
+-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
+m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
+85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
+-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
+m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
+c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
+-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
+-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
+-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
+-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
+s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
+c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
+-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
+-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
+-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
+-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
+m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
+-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
+-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
+-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
+m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
+-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
+M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
+-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
+-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
+-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
+-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
+-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
+c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
+-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
+-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
+-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
+-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
+c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
+-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
+-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
+3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
+10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
+-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
+-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
+H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
+c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
+c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
+-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
+c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
+c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
+s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
+121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
+s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
+c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
+M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
+-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
+13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
+-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
+-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
+-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
+151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
+c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
+c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
+c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
+c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
+M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
+c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
+-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
+c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
+M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
+c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
+1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
+-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
+M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
+c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
+-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
+c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
+M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},_w=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 h347 v-84
+H403z M403 1759 V0 H319 V1759 v`+t+` v1759 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
+M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
+M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
+MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
+MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
+M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
+M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
+c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
+-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
+949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
+c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
+-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
+l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
+-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
+63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
+c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
+c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
+c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
+c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
+c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
+l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
+-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},vw=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText()).join(``)}},yw={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},bw={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},xw={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Sw(e,t){yw[e]=t}function Cw(e,t,n){if(!yw[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=yw[t][r];if(!i&&e[0]in xw&&(r=xw[e[0]].charCodeAt(0),i=yw[t][r]),!i&&n===`text`&&aw(r)&&(i=yw[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var ww={};function Tw(e){var t=e>=5?0:e>=3?1:2;if(!ww[t]){var n=ww[t]={cssEmPerMu:bw.quad[t]/18};for(var r in bw)bw.hasOwnProperty(r)&&(n[r]=bw[r][t])}return ww[t]}var Ew=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Dw=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ow=function(e,t){return t.size<2?e:Ew[e-1][t.size-1]},kw=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Dw[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ow(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Dw[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Ow(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Tw(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};kw.BASESIZE=6;var Aw={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},jw={ex:!0,em:!0,mu:!0},Mw=function(e){return typeof e!=`string`&&(e=e.unit),e in Aw||e in jw||e===`ex`},Nw=function(e,t){var n;if(e.unit in Aw)n=Aw[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new z(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},B=function(e){return+e.toFixed(4)+`em`},Pw=function(e){return e.filter(e=>e).join(` `)},Fw=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Iw=function(e){var t=document.createElement(e);for(var n in t.className=Pw(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,Rw=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+FC.escape(Pw(this.classes))+`"`);var n=``;for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=FC.hyphenate(r)+`:`+this.style[r]+`;`);for(var i in n&&(t+=` style="`+FC.escape(n)+`"`),this.attributes)if(this.attributes.hasOwnProperty(i)){if(Lw.test(i))throw new z(`Invalid attribute name '`+i+`'`);t+=` `+i+`="`+FC.escape(this.attributes[i])+`"`}t+=`>`;for(var a=0;a`,t},zw=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Fw.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Iw.call(this,`span`)}toMarkup(){return Rw.call(this,`span`)}},Bw=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Fw.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Iw.call(this,`a`)}toMarkup(){return Rw.call(this,`a`)}},Vw=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);for(var t in e.src=this.src,e.alt=this.alt,e.className=`mord`,this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=` `,e}},Hw={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Uw=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=rw(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Hw[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=B(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Pw(this.classes)),this.style)this.style.hasOwnProperty(n)&&(t||=document.createElement(`span`),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+this.italic+`em;`),this.style)this.style.hasOwnProperty(r)&&(n+=FC.hyphenate(r)+`:`+this.style[r]+`;`);n&&(e=!0,t+=` style="`+FC.escape(n)+`"`);var i=FC.escape(this.text);return e?(t+=`>`,t+=i,t+=` `,t):i}},Ww=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},Gw=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,gw[this.pathName]),e}toMarkup(){return this.alternate?` `:` `}},Kw=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=` `,e}};function qw(e){if(e instanceof Uw)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Jw(e){if(e instanceof zw)return e;throw Error(`Expected span but got `+String(e)+`.`)}var Yw={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Xw={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Zw={math:{},text:{}};function V(e,t,n,r,i,a){Zw[e][i]={font:t,group:n,replace:r},a&&r&&(Zw[e][r]=Zw[e][i])}var H=`math`,U=`text`,W=`main`,G=`ams`,Qw=`accent-token`,$w=`bin`,eT=`close`,tT=`inner`,nT=`mathord`,rT=`op-token`,iT=`open`,aT=`punct`,K=`rel`,oT=`spacing`,q=`textord`;V(H,W,K,`≡`,`\\equiv`,!0),V(H,W,K,`≺`,`\\prec`,!0),V(H,W,K,`≻`,`\\succ`,!0),V(H,W,K,`∼`,`\\sim`,!0),V(H,W,K,`⊥`,`\\perp`),V(H,W,K,`⪯`,`\\preceq`,!0),V(H,W,K,`⪰`,`\\succeq`,!0),V(H,W,K,`≃`,`\\simeq`,!0),V(H,W,K,`∣`,`\\mid`,!0),V(H,W,K,`≪`,`\\ll`,!0),V(H,W,K,`≫`,`\\gg`,!0),V(H,W,K,`≍`,`\\asymp`,!0),V(H,W,K,`∥`,`\\parallel`),V(H,W,K,`⋈`,`\\bowtie`,!0),V(H,W,K,`⌣`,`\\smile`,!0),V(H,W,K,`⊑`,`\\sqsubseteq`,!0),V(H,W,K,`⊒`,`\\sqsupseteq`,!0),V(H,W,K,`≐`,`\\doteq`,!0),V(H,W,K,`⌢`,`\\frown`,!0),V(H,W,K,`∋`,`\\ni`,!0),V(H,W,K,`∝`,`\\propto`,!0),V(H,W,K,`⊢`,`\\vdash`,!0),V(H,W,K,`⊣`,`\\dashv`,!0),V(H,W,K,`∋`,`\\owns`),V(H,W,aT,`.`,`\\ldotp`),V(H,W,aT,`⋅`,`\\cdotp`),V(H,W,q,`#`,`\\#`),V(U,W,q,`#`,`\\#`),V(H,W,q,`&`,`\\&`),V(U,W,q,`&`,`\\&`),V(H,W,q,`ℵ`,`\\aleph`,!0),V(H,W,q,`∀`,`\\forall`,!0),V(H,W,q,`ℏ`,`\\hbar`,!0),V(H,W,q,`∃`,`\\exists`,!0),V(H,W,q,`∇`,`\\nabla`,!0),V(H,W,q,`♭`,`\\flat`,!0),V(H,W,q,`ℓ`,`\\ell`,!0),V(H,W,q,`♮`,`\\natural`,!0),V(H,W,q,`♣`,`\\clubsuit`,!0),V(H,W,q,`℘`,`\\wp`,!0),V(H,W,q,`♯`,`\\sharp`,!0),V(H,W,q,`♢`,`\\diamondsuit`,!0),V(H,W,q,`ℜ`,`\\Re`,!0),V(H,W,q,`♡`,`\\heartsuit`,!0),V(H,W,q,`ℑ`,`\\Im`,!0),V(H,W,q,`♠`,`\\spadesuit`,!0),V(H,W,q,`§`,`\\S`,!0),V(U,W,q,`§`,`\\S`),V(H,W,q,`¶`,`\\P`,!0),V(U,W,q,`¶`,`\\P`),V(H,W,q,`†`,`\\dag`),V(U,W,q,`†`,`\\dag`),V(U,W,q,`†`,`\\textdagger`),V(H,W,q,`‡`,`\\ddag`),V(U,W,q,`‡`,`\\ddag`),V(U,W,q,`‡`,`\\textdaggerdbl`),V(H,W,eT,`⎱`,`\\rmoustache`,!0),V(H,W,iT,`⎰`,`\\lmoustache`,!0),V(H,W,eT,`⟯`,`\\rgroup`,!0),V(H,W,iT,`⟮`,`\\lgroup`,!0),V(H,W,$w,`∓`,`\\mp`,!0),V(H,W,$w,`⊖`,`\\ominus`,!0),V(H,W,$w,`⊎`,`\\uplus`,!0),V(H,W,$w,`⊓`,`\\sqcap`,!0),V(H,W,$w,`∗`,`\\ast`),V(H,W,$w,`⊔`,`\\sqcup`,!0),V(H,W,$w,`◯`,`\\bigcirc`,!0),V(H,W,$w,`∙`,`\\bullet`,!0),V(H,W,$w,`‡`,`\\ddagger`),V(H,W,$w,`≀`,`\\wr`,!0),V(H,W,$w,`⨿`,`\\amalg`),V(H,W,$w,`&`,`\\And`),V(H,W,K,`⟵`,`\\longleftarrow`,!0),V(H,W,K,`⇐`,`\\Leftarrow`,!0),V(H,W,K,`⟸`,`\\Longleftarrow`,!0),V(H,W,K,`⟶`,`\\longrightarrow`,!0),V(H,W,K,`⇒`,`\\Rightarrow`,!0),V(H,W,K,`⟹`,`\\Longrightarrow`,!0),V(H,W,K,`↔`,`\\leftrightarrow`,!0),V(H,W,K,`⟷`,`\\longleftrightarrow`,!0),V(H,W,K,`⇔`,`\\Leftrightarrow`,!0),V(H,W,K,`⟺`,`\\Longleftrightarrow`,!0),V(H,W,K,`↦`,`\\mapsto`,!0),V(H,W,K,`⟼`,`\\longmapsto`,!0),V(H,W,K,`↗`,`\\nearrow`,!0),V(H,W,K,`↩`,`\\hookleftarrow`,!0),V(H,W,K,`↪`,`\\hookrightarrow`,!0),V(H,W,K,`↘`,`\\searrow`,!0),V(H,W,K,`↼`,`\\leftharpoonup`,!0),V(H,W,K,`⇀`,`\\rightharpoonup`,!0),V(H,W,K,`↙`,`\\swarrow`,!0),V(H,W,K,`↽`,`\\leftharpoondown`,!0),V(H,W,K,`⇁`,`\\rightharpoondown`,!0),V(H,W,K,`↖`,`\\nwarrow`,!0),V(H,W,K,`⇌`,`\\rightleftharpoons`,!0),V(H,G,K,`≮`,`\\nless`,!0),V(H,G,K,``,`\\@nleqslant`),V(H,G,K,``,`\\@nleqq`),V(H,G,K,`⪇`,`\\lneq`,!0),V(H,G,K,`≨`,`\\lneqq`,!0),V(H,G,K,``,`\\@lvertneqq`),V(H,G,K,`⋦`,`\\lnsim`,!0),V(H,G,K,`⪉`,`\\lnapprox`,!0),V(H,G,K,`⊀`,`\\nprec`,!0),V(H,G,K,`⋠`,`\\npreceq`,!0),V(H,G,K,`⋨`,`\\precnsim`,!0),V(H,G,K,`⪹`,`\\precnapprox`,!0),V(H,G,K,`≁`,`\\nsim`,!0),V(H,G,K,``,`\\@nshortmid`),V(H,G,K,`∤`,`\\nmid`,!0),V(H,G,K,`⊬`,`\\nvdash`,!0),V(H,G,K,`⊭`,`\\nvDash`,!0),V(H,G,K,`⋪`,`\\ntriangleleft`),V(H,G,K,`⋬`,`\\ntrianglelefteq`,!0),V(H,G,K,`⊊`,`\\subsetneq`,!0),V(H,G,K,``,`\\@varsubsetneq`),V(H,G,K,`⫋`,`\\subsetneqq`,!0),V(H,G,K,``,`\\@varsubsetneqq`),V(H,G,K,`≯`,`\\ngtr`,!0),V(H,G,K,``,`\\@ngeqslant`),V(H,G,K,``,`\\@ngeqq`),V(H,G,K,`⪈`,`\\gneq`,!0),V(H,G,K,`≩`,`\\gneqq`,!0),V(H,G,K,``,`\\@gvertneqq`),V(H,G,K,`⋧`,`\\gnsim`,!0),V(H,G,K,`⪊`,`\\gnapprox`,!0),V(H,G,K,`⊁`,`\\nsucc`,!0),V(H,G,K,`⋡`,`\\nsucceq`,!0),V(H,G,K,`⋩`,`\\succnsim`,!0),V(H,G,K,`⪺`,`\\succnapprox`,!0),V(H,G,K,`≆`,`\\ncong`,!0),V(H,G,K,``,`\\@nshortparallel`),V(H,G,K,`∦`,`\\nparallel`,!0),V(H,G,K,`⊯`,`\\nVDash`,!0),V(H,G,K,`⋫`,`\\ntriangleright`),V(H,G,K,`⋭`,`\\ntrianglerighteq`,!0),V(H,G,K,``,`\\@nsupseteqq`),V(H,G,K,`⊋`,`\\supsetneq`,!0),V(H,G,K,``,`\\@varsupsetneq`),V(H,G,K,`⫌`,`\\supsetneqq`,!0),V(H,G,K,``,`\\@varsupsetneqq`),V(H,G,K,`⊮`,`\\nVdash`,!0),V(H,G,K,`⪵`,`\\precneqq`,!0),V(H,G,K,`⪶`,`\\succneqq`,!0),V(H,G,K,``,`\\@nsubseteqq`),V(H,G,$w,`⊴`,`\\unlhd`),V(H,G,$w,`⊵`,`\\unrhd`),V(H,G,K,`↚`,`\\nleftarrow`,!0),V(H,G,K,`↛`,`\\nrightarrow`,!0),V(H,G,K,`⇍`,`\\nLeftarrow`,!0),V(H,G,K,`⇏`,`\\nRightarrow`,!0),V(H,G,K,`↮`,`\\nleftrightarrow`,!0),V(H,G,K,`⇎`,`\\nLeftrightarrow`,!0),V(H,G,K,`△`,`\\vartriangle`),V(H,G,q,`ℏ`,`\\hslash`),V(H,G,q,`▽`,`\\triangledown`),V(H,G,q,`◊`,`\\lozenge`),V(H,G,q,`Ⓢ`,`\\circledS`),V(H,G,q,`®`,`\\circledR`),V(U,G,q,`®`,`\\circledR`),V(H,G,q,`∡`,`\\measuredangle`,!0),V(H,G,q,`∄`,`\\nexists`),V(H,G,q,`℧`,`\\mho`),V(H,G,q,`Ⅎ`,`\\Finv`,!0),V(H,G,q,`⅁`,`\\Game`,!0),V(H,G,q,`‵`,`\\backprime`),V(H,G,q,`▲`,`\\blacktriangle`),V(H,G,q,`▼`,`\\blacktriangledown`),V(H,G,q,`■`,`\\blacksquare`),V(H,G,q,`⧫`,`\\blacklozenge`),V(H,G,q,`★`,`\\bigstar`),V(H,G,q,`∢`,`\\sphericalangle`,!0),V(H,G,q,`∁`,`\\complement`,!0),V(H,G,q,`ð`,`\\eth`,!0),V(U,W,q,`ð`,`ð`),V(H,G,q,`╱`,`\\diagup`),V(H,G,q,`╲`,`\\diagdown`),V(H,G,q,`□`,`\\square`),V(H,G,q,`□`,`\\Box`),V(H,G,q,`◊`,`\\Diamond`),V(H,G,q,`¥`,`\\yen`,!0),V(U,G,q,`¥`,`\\yen`,!0),V(H,G,q,`✓`,`\\checkmark`,!0),V(U,G,q,`✓`,`\\checkmark`),V(H,G,q,`ℶ`,`\\beth`,!0),V(H,G,q,`ℸ`,`\\daleth`,!0),V(H,G,q,`ℷ`,`\\gimel`,!0),V(H,G,q,`ϝ`,`\\digamma`,!0),V(H,G,q,`ϰ`,`\\varkappa`),V(H,G,iT,`┌`,`\\@ulcorner`,!0),V(H,G,eT,`┐`,`\\@urcorner`,!0),V(H,G,iT,`└`,`\\@llcorner`,!0),V(H,G,eT,`┘`,`\\@lrcorner`,!0),V(H,G,K,`≦`,`\\leqq`,!0),V(H,G,K,`⩽`,`\\leqslant`,!0),V(H,G,K,`⪕`,`\\eqslantless`,!0),V(H,G,K,`≲`,`\\lesssim`,!0),V(H,G,K,`⪅`,`\\lessapprox`,!0),V(H,G,K,`≊`,`\\approxeq`,!0),V(H,G,$w,`⋖`,`\\lessdot`),V(H,G,K,`⋘`,`\\lll`,!0),V(H,G,K,`≶`,`\\lessgtr`,!0),V(H,G,K,`⋚`,`\\lesseqgtr`,!0),V(H,G,K,`⪋`,`\\lesseqqgtr`,!0),V(H,G,K,`≑`,`\\doteqdot`),V(H,G,K,`≓`,`\\risingdotseq`,!0),V(H,G,K,`≒`,`\\fallingdotseq`,!0),V(H,G,K,`∽`,`\\backsim`,!0),V(H,G,K,`⋍`,`\\backsimeq`,!0),V(H,G,K,`⫅`,`\\subseteqq`,!0),V(H,G,K,`⋐`,`\\Subset`,!0),V(H,G,K,`⊏`,`\\sqsubset`,!0),V(H,G,K,`≼`,`\\preccurlyeq`,!0),V(H,G,K,`⋞`,`\\curlyeqprec`,!0),V(H,G,K,`≾`,`\\precsim`,!0),V(H,G,K,`⪷`,`\\precapprox`,!0),V(H,G,K,`⊲`,`\\vartriangleleft`),V(H,G,K,`⊴`,`\\trianglelefteq`),V(H,G,K,`⊨`,`\\vDash`,!0),V(H,G,K,`⊪`,`\\Vvdash`,!0),V(H,G,K,`⌣`,`\\smallsmile`),V(H,G,K,`⌢`,`\\smallfrown`),V(H,G,K,`≏`,`\\bumpeq`,!0),V(H,G,K,`≎`,`\\Bumpeq`,!0),V(H,G,K,`≧`,`\\geqq`,!0),V(H,G,K,`⩾`,`\\geqslant`,!0),V(H,G,K,`⪖`,`\\eqslantgtr`,!0),V(H,G,K,`≳`,`\\gtrsim`,!0),V(H,G,K,`⪆`,`\\gtrapprox`,!0),V(H,G,$w,`⋗`,`\\gtrdot`),V(H,G,K,`⋙`,`\\ggg`,!0),V(H,G,K,`≷`,`\\gtrless`,!0),V(H,G,K,`⋛`,`\\gtreqless`,!0),V(H,G,K,`⪌`,`\\gtreqqless`,!0),V(H,G,K,`≖`,`\\eqcirc`,!0),V(H,G,K,`≗`,`\\circeq`,!0),V(H,G,K,`≜`,`\\triangleq`,!0),V(H,G,K,`∼`,`\\thicksim`),V(H,G,K,`≈`,`\\thickapprox`),V(H,G,K,`⫆`,`\\supseteqq`,!0),V(H,G,K,`⋑`,`\\Supset`,!0),V(H,G,K,`⊐`,`\\sqsupset`,!0),V(H,G,K,`≽`,`\\succcurlyeq`,!0),V(H,G,K,`⋟`,`\\curlyeqsucc`,!0),V(H,G,K,`≿`,`\\succsim`,!0),V(H,G,K,`⪸`,`\\succapprox`,!0),V(H,G,K,`⊳`,`\\vartriangleright`),V(H,G,K,`⊵`,`\\trianglerighteq`),V(H,G,K,`⊩`,`\\Vdash`,!0),V(H,G,K,`∣`,`\\shortmid`),V(H,G,K,`∥`,`\\shortparallel`),V(H,G,K,`≬`,`\\between`,!0),V(H,G,K,`⋔`,`\\pitchfork`,!0),V(H,G,K,`∝`,`\\varpropto`),V(H,G,K,`◀`,`\\blacktriangleleft`),V(H,G,K,`∴`,`\\therefore`,!0),V(H,G,K,`∍`,`\\backepsilon`),V(H,G,K,`▶`,`\\blacktriangleright`),V(H,G,K,`∵`,`\\because`,!0),V(H,G,K,`⋘`,`\\llless`),V(H,G,K,`⋙`,`\\gggtr`),V(H,G,$w,`⊲`,`\\lhd`),V(H,G,$w,`⊳`,`\\rhd`),V(H,G,K,`≂`,`\\eqsim`,!0),V(H,W,K,`⋈`,`\\Join`),V(H,G,K,`≑`,`\\Doteq`,!0),V(H,G,$w,`∔`,`\\dotplus`,!0),V(H,G,$w,`∖`,`\\smallsetminus`),V(H,G,$w,`⋒`,`\\Cap`,!0),V(H,G,$w,`⋓`,`\\Cup`,!0),V(H,G,$w,`⩞`,`\\doublebarwedge`,!0),V(H,G,$w,`⊟`,`\\boxminus`,!0),V(H,G,$w,`⊞`,`\\boxplus`,!0),V(H,G,$w,`⋇`,`\\divideontimes`,!0),V(H,G,$w,`⋉`,`\\ltimes`,!0),V(H,G,$w,`⋊`,`\\rtimes`,!0),V(H,G,$w,`⋋`,`\\leftthreetimes`,!0),V(H,G,$w,`⋌`,`\\rightthreetimes`,!0),V(H,G,$w,`⋏`,`\\curlywedge`,!0),V(H,G,$w,`⋎`,`\\curlyvee`,!0),V(H,G,$w,`⊝`,`\\circleddash`,!0),V(H,G,$w,`⊛`,`\\circledast`,!0),V(H,G,$w,`⋅`,`\\centerdot`),V(H,G,$w,`⊺`,`\\intercal`,!0),V(H,G,$w,`⋒`,`\\doublecap`),V(H,G,$w,`⋓`,`\\doublecup`),V(H,G,$w,`⊠`,`\\boxtimes`,!0),V(H,G,K,`⇢`,`\\dashrightarrow`,!0),V(H,G,K,`⇠`,`\\dashleftarrow`,!0),V(H,G,K,`⇇`,`\\leftleftarrows`,!0),V(H,G,K,`⇆`,`\\leftrightarrows`,!0),V(H,G,K,`⇚`,`\\Lleftarrow`,!0),V(H,G,K,`↞`,`\\twoheadleftarrow`,!0),V(H,G,K,`↢`,`\\leftarrowtail`,!0),V(H,G,K,`↫`,`\\looparrowleft`,!0),V(H,G,K,`⇋`,`\\leftrightharpoons`,!0),V(H,G,K,`↶`,`\\curvearrowleft`,!0),V(H,G,K,`↺`,`\\circlearrowleft`,!0),V(H,G,K,`↰`,`\\Lsh`,!0),V(H,G,K,`⇈`,`\\upuparrows`,!0),V(H,G,K,`↿`,`\\upharpoonleft`,!0),V(H,G,K,`⇃`,`\\downharpoonleft`,!0),V(H,W,K,`⊶`,`\\origof`,!0),V(H,W,K,`⊷`,`\\imageof`,!0),V(H,G,K,`⊸`,`\\multimap`,!0),V(H,G,K,`↭`,`\\leftrightsquigarrow`,!0),V(H,G,K,`⇉`,`\\rightrightarrows`,!0),V(H,G,K,`⇄`,`\\rightleftarrows`,!0),V(H,G,K,`↠`,`\\twoheadrightarrow`,!0),V(H,G,K,`↣`,`\\rightarrowtail`,!0),V(H,G,K,`↬`,`\\looparrowright`,!0),V(H,G,K,`↷`,`\\curvearrowright`,!0),V(H,G,K,`↻`,`\\circlearrowright`,!0),V(H,G,K,`↱`,`\\Rsh`,!0),V(H,G,K,`⇊`,`\\downdownarrows`,!0),V(H,G,K,`↾`,`\\upharpoonright`,!0),V(H,G,K,`⇂`,`\\downharpoonright`,!0),V(H,G,K,`⇝`,`\\rightsquigarrow`,!0),V(H,G,K,`⇝`,`\\leadsto`),V(H,G,K,`⇛`,`\\Rrightarrow`,!0),V(H,G,K,`↾`,`\\restriction`),V(H,W,q,`‘`,"`"),V(H,W,q,`$`,`\\$`),V(U,W,q,`$`,`\\$`),V(U,W,q,`$`,`\\textdollar`),V(H,W,q,`%`,`\\%`),V(U,W,q,`%`,`\\%`),V(H,W,q,`_`,`\\_`),V(U,W,q,`_`,`\\_`),V(U,W,q,`_`,`\\textunderscore`),V(H,W,q,`∠`,`\\angle`,!0),V(H,W,q,`∞`,`\\infty`,!0),V(H,W,q,`′`,`\\prime`),V(H,W,q,`△`,`\\triangle`),V(H,W,q,`Γ`,`\\Gamma`,!0),V(H,W,q,`Δ`,`\\Delta`,!0),V(H,W,q,`Θ`,`\\Theta`,!0),V(H,W,q,`Λ`,`\\Lambda`,!0),V(H,W,q,`Ξ`,`\\Xi`,!0),V(H,W,q,`Π`,`\\Pi`,!0),V(H,W,q,`Σ`,`\\Sigma`,!0),V(H,W,q,`Υ`,`\\Upsilon`,!0),V(H,W,q,`Φ`,`\\Phi`,!0),V(H,W,q,`Ψ`,`\\Psi`,!0),V(H,W,q,`Ω`,`\\Omega`,!0),V(H,W,q,`A`,`Α`),V(H,W,q,`B`,`Β`),V(H,W,q,`E`,`Ε`),V(H,W,q,`Z`,`Ζ`),V(H,W,q,`H`,`Η`),V(H,W,q,`I`,`Ι`),V(H,W,q,`K`,`Κ`),V(H,W,q,`M`,`Μ`),V(H,W,q,`N`,`Ν`),V(H,W,q,`O`,`Ο`),V(H,W,q,`P`,`Ρ`),V(H,W,q,`T`,`Τ`),V(H,W,q,`X`,`Χ`),V(H,W,q,`¬`,`\\neg`,!0),V(H,W,q,`¬`,`\\lnot`),V(H,W,q,`⊤`,`\\top`),V(H,W,q,`⊥`,`\\bot`),V(H,W,q,`∅`,`\\emptyset`),V(H,G,q,`∅`,`\\varnothing`),V(H,W,nT,`α`,`\\alpha`,!0),V(H,W,nT,`β`,`\\beta`,!0),V(H,W,nT,`γ`,`\\gamma`,!0),V(H,W,nT,`δ`,`\\delta`,!0),V(H,W,nT,`ϵ`,`\\epsilon`,!0),V(H,W,nT,`ζ`,`\\zeta`,!0),V(H,W,nT,`η`,`\\eta`,!0),V(H,W,nT,`θ`,`\\theta`,!0),V(H,W,nT,`ι`,`\\iota`,!0),V(H,W,nT,`κ`,`\\kappa`,!0),V(H,W,nT,`λ`,`\\lambda`,!0),V(H,W,nT,`μ`,`\\mu`,!0),V(H,W,nT,`ν`,`\\nu`,!0),V(H,W,nT,`ξ`,`\\xi`,!0),V(H,W,nT,`ο`,`\\omicron`,!0),V(H,W,nT,`π`,`\\pi`,!0),V(H,W,nT,`ρ`,`\\rho`,!0),V(H,W,nT,`σ`,`\\sigma`,!0),V(H,W,nT,`τ`,`\\tau`,!0),V(H,W,nT,`υ`,`\\upsilon`,!0),V(H,W,nT,`ϕ`,`\\phi`,!0),V(H,W,nT,`χ`,`\\chi`,!0),V(H,W,nT,`ψ`,`\\psi`,!0),V(H,W,nT,`ω`,`\\omega`,!0),V(H,W,nT,`ε`,`\\varepsilon`,!0),V(H,W,nT,`ϑ`,`\\vartheta`,!0),V(H,W,nT,`ϖ`,`\\varpi`,!0),V(H,W,nT,`ϱ`,`\\varrho`,!0),V(H,W,nT,`ς`,`\\varsigma`,!0),V(H,W,nT,`φ`,`\\varphi`,!0),V(H,W,$w,`∗`,`*`,!0),V(H,W,$w,`+`,`+`),V(H,W,$w,`−`,`-`,!0),V(H,W,$w,`⋅`,`\\cdot`,!0),V(H,W,$w,`∘`,`\\circ`,!0),V(H,W,$w,`÷`,`\\div`,!0),V(H,W,$w,`±`,`\\pm`,!0),V(H,W,$w,`×`,`\\times`,!0),V(H,W,$w,`∩`,`\\cap`,!0),V(H,W,$w,`∪`,`\\cup`,!0),V(H,W,$w,`∖`,`\\setminus`,!0),V(H,W,$w,`∧`,`\\land`),V(H,W,$w,`∨`,`\\lor`),V(H,W,$w,`∧`,`\\wedge`,!0),V(H,W,$w,`∨`,`\\vee`,!0),V(H,W,q,`√`,`\\surd`),V(H,W,iT,`⟨`,`\\langle`,!0),V(H,W,iT,`∣`,`\\lvert`),V(H,W,iT,`∥`,`\\lVert`),V(H,W,eT,`?`,`?`),V(H,W,eT,`!`,`!`),V(H,W,eT,`⟩`,`\\rangle`,!0),V(H,W,eT,`∣`,`\\rvert`),V(H,W,eT,`∥`,`\\rVert`),V(H,W,K,`=`,`=`),V(H,W,K,`:`,`:`),V(H,W,K,`≈`,`\\approx`,!0),V(H,W,K,`≅`,`\\cong`,!0),V(H,W,K,`≥`,`\\ge`),V(H,W,K,`≥`,`\\geq`,!0),V(H,W,K,`←`,`\\gets`),V(H,W,K,`>`,`\\gt`,!0),V(H,W,K,`∈`,`\\in`,!0),V(H,W,K,``,`\\@not`),V(H,W,K,`⊂`,`\\subset`,!0),V(H,W,K,`⊃`,`\\supset`,!0),V(H,W,K,`⊆`,`\\subseteq`,!0),V(H,W,K,`⊇`,`\\supseteq`,!0),V(H,G,K,`⊈`,`\\nsubseteq`,!0),V(H,G,K,`⊉`,`\\nsupseteq`,!0),V(H,W,K,`⊨`,`\\models`),V(H,W,K,`←`,`\\leftarrow`,!0),V(H,W,K,`≤`,`\\le`),V(H,W,K,`≤`,`\\leq`,!0),V(H,W,K,`<`,`\\lt`,!0),V(H,W,K,`→`,`\\rightarrow`,!0),V(H,W,K,`→`,`\\to`),V(H,G,K,`≱`,`\\ngeq`,!0),V(H,G,K,`≰`,`\\nleq`,!0),V(H,W,oT,`\xA0`,`\\ `),V(H,W,oT,`\xA0`,`\\space`),V(H,W,oT,`\xA0`,`\\nobreakspace`),V(U,W,oT,`\xA0`,`\\ `),V(U,W,oT,`\xA0`,` `),V(U,W,oT,`\xA0`,`\\space`),V(U,W,oT,`\xA0`,`\\nobreakspace`),V(H,W,oT,null,`\\nobreak`),V(H,W,oT,null,`\\allowbreak`),V(H,W,aT,`,`,`,`),V(H,W,aT,`;`,`;`),V(H,G,$w,`⊼`,`\\barwedge`,!0),V(H,G,$w,`⊻`,`\\veebar`,!0),V(H,W,$w,`⊙`,`\\odot`,!0),V(H,W,$w,`⊕`,`\\oplus`,!0),V(H,W,$w,`⊗`,`\\otimes`,!0),V(H,W,q,`∂`,`\\partial`,!0),V(H,W,$w,`⊘`,`\\oslash`,!0),V(H,G,$w,`⊚`,`\\circledcirc`,!0),V(H,G,$w,`⊡`,`\\boxdot`,!0),V(H,W,$w,`△`,`\\bigtriangleup`),V(H,W,$w,`▽`,`\\bigtriangledown`),V(H,W,$w,`†`,`\\dagger`),V(H,W,$w,`⋄`,`\\diamond`),V(H,W,$w,`⋆`,`\\star`),V(H,W,$w,`◃`,`\\triangleleft`),V(H,W,$w,`▹`,`\\triangleright`),V(H,W,iT,`{`,`\\{`),V(U,W,q,`{`,`\\{`),V(U,W,q,`{`,`\\textbraceleft`),V(H,W,eT,`}`,`\\}`),V(U,W,q,`}`,`\\}`),V(U,W,q,`}`,`\\textbraceright`),V(H,W,iT,`{`,`\\lbrace`),V(H,W,eT,`}`,`\\rbrace`),V(H,W,iT,`[`,`\\lbrack`,!0),V(U,W,q,`[`,`\\lbrack`,!0),V(H,W,eT,`]`,`\\rbrack`,!0),V(U,W,q,`]`,`\\rbrack`,!0),V(H,W,iT,`(`,`\\lparen`,!0),V(H,W,eT,`)`,`\\rparen`,!0),V(U,W,q,`<`,`\\textless`,!0),V(U,W,q,`>`,`\\textgreater`,!0),V(H,W,iT,`⌊`,`\\lfloor`,!0),V(H,W,eT,`⌋`,`\\rfloor`,!0),V(H,W,iT,`⌈`,`\\lceil`,!0),V(H,W,eT,`⌉`,`\\rceil`,!0),V(H,W,q,`\\`,`\\backslash`),V(H,W,q,`∣`,`|`),V(H,W,q,`∣`,`\\vert`),V(U,W,q,`|`,`\\textbar`,!0),V(H,W,q,`∥`,`\\|`),V(H,W,q,`∥`,`\\Vert`),V(U,W,q,`∥`,`\\textbardbl`),V(U,W,q,`~`,`\\textasciitilde`),V(U,W,q,`\\`,`\\textbackslash`),V(U,W,q,`^`,`\\textasciicircum`),V(H,W,K,`↑`,`\\uparrow`,!0),V(H,W,K,`⇑`,`\\Uparrow`,!0),V(H,W,K,`↓`,`\\downarrow`,!0),V(H,W,K,`⇓`,`\\Downarrow`,!0),V(H,W,K,`↕`,`\\updownarrow`,!0),V(H,W,K,`⇕`,`\\Updownarrow`,!0),V(H,W,rT,`∐`,`\\coprod`),V(H,W,rT,`⋁`,`\\bigvee`),V(H,W,rT,`⋀`,`\\bigwedge`),V(H,W,rT,`⨄`,`\\biguplus`),V(H,W,rT,`⋂`,`\\bigcap`),V(H,W,rT,`⋃`,`\\bigcup`),V(H,W,rT,`∫`,`\\int`),V(H,W,rT,`∫`,`\\intop`),V(H,W,rT,`∬`,`\\iint`),V(H,W,rT,`∭`,`\\iiint`),V(H,W,rT,`∏`,`\\prod`),V(H,W,rT,`∑`,`\\sum`),V(H,W,rT,`⨂`,`\\bigotimes`),V(H,W,rT,`⨁`,`\\bigoplus`),V(H,W,rT,`⨀`,`\\bigodot`),V(H,W,rT,`∮`,`\\oint`),V(H,W,rT,`∯`,`\\oiint`),V(H,W,rT,`∰`,`\\oiiint`),V(H,W,rT,`⨆`,`\\bigsqcup`),V(H,W,rT,`∫`,`\\smallint`),V(U,W,tT,`…`,`\\textellipsis`),V(H,W,tT,`…`,`\\mathellipsis`),V(U,W,tT,`…`,`\\ldots`,!0),V(H,W,tT,`…`,`\\ldots`,!0),V(H,W,tT,`⋯`,`\\@cdots`,!0),V(H,W,tT,`⋱`,`\\ddots`,!0),V(H,W,q,`⋮`,`\\varvdots`),V(U,W,q,`⋮`,`\\varvdots`),V(H,W,Qw,`ˊ`,`\\acute`),V(H,W,Qw,`ˋ`,`\\grave`),V(H,W,Qw,`¨`,`\\ddot`),V(H,W,Qw,`~`,`\\tilde`),V(H,W,Qw,`ˉ`,`\\bar`),V(H,W,Qw,`˘`,`\\breve`),V(H,W,Qw,`ˇ`,`\\check`),V(H,W,Qw,`^`,`\\hat`),V(H,W,Qw,`⃗`,`\\vec`),V(H,W,Qw,`˙`,`\\dot`),V(H,W,Qw,`˚`,`\\mathring`),V(H,W,nT,``,`\\@imath`),V(H,W,nT,``,`\\@jmath`),V(H,W,q,`ı`,`ı`),V(H,W,q,`ȷ`,`ȷ`),V(U,W,q,`ı`,`\\i`,!0),V(U,W,q,`ȷ`,`\\j`,!0),V(U,W,q,`ß`,`\\ss`,!0),V(U,W,q,`æ`,`\\ae`,!0),V(U,W,q,`œ`,`\\oe`,!0),V(U,W,q,`ø`,`\\o`,!0),V(U,W,q,`Æ`,`\\AE`,!0),V(U,W,q,`Œ`,`\\OE`,!0),V(U,W,q,`Ø`,`\\O`,!0),V(U,W,Qw,`ˊ`,`\\'`),V(U,W,Qw,`ˋ`,"\\`"),V(U,W,Qw,`ˆ`,`\\^`),V(U,W,Qw,`˜`,`\\~`),V(U,W,Qw,`ˉ`,`\\=`),V(U,W,Qw,`˘`,`\\u`),V(U,W,Qw,`˙`,`\\.`),V(U,W,Qw,`¸`,`\\c`),V(U,W,Qw,`˚`,`\\r`),V(U,W,Qw,`ˇ`,`\\v`),V(U,W,Qw,`¨`,`\\"`),V(U,W,Qw,`˝`,`\\H`),V(U,W,Qw,`◯`,`\\textcircled`);var sT={"--":!0,"---":!0,"``":!0,"''":!0};V(U,W,q,`–`,`--`,!0),V(U,W,q,`–`,`\\textendash`),V(U,W,q,`—`,`---`,!0),V(U,W,q,`—`,`\\textemdash`),V(U,W,q,`‘`,"`",!0),V(U,W,q,`‘`,`\\textquoteleft`),V(U,W,q,`’`,`'`,!0),V(U,W,q,`’`,`\\textquoteright`),V(U,W,q,`“`,"``",!0),V(U,W,q,`“`,`\\textquotedblleft`),V(U,W,q,`”`,`''`,!0),V(U,W,q,`”`,`\\textquotedblright`),V(H,W,q,`°`,`\\degree`,!0),V(U,W,q,`°`,`\\degree`),V(U,W,q,`°`,`\\textdegree`,!0),V(H,W,q,`£`,`\\pounds`),V(H,W,q,`£`,`\\mathsterling`,!0),V(U,W,q,`£`,`\\pounds`),V(U,W,q,`£`,`\\textsterling`,!0),V(H,G,q,`✠`,`\\maltese`),V(U,G,q,`✠`,`\\maltese`);for(var cT=`0123456789/@."`,lT=0;lT0)return kT(i,c,r,t,a.concat(l));if(s){var u,d;if(s===`boldsymbol`){var f=jT(i,r,t,a,n);u=f.fontName,d=[f.fontClass]}else o?(u=KT[s].fontName,d=[s]):(u=GT(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(OT(i,u,r).metrics)return kT(i,u,r,t,a.concat(d));if(sT.hasOwnProperty(i)&&u.slice(0,10)===`Typewriter`){for(var p=[],m=0;m{if(Pw(e.classes)!==Pw(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},PT=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},IT=function(e,t,n,r){var i=new zw(e,t,n,r);return FT(i),i},LT=(e,t,n,r)=>new zw(e,t,n,r),RT=function(e,t,n){var r=IT([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=B(r.height),r.maxFontSize=1,r},zT=function(e,t,n,r){var i=new Bw(e,t,n,r);return FT(i),i},BT=function(e){var t=new vw(e);return FT(t),t},VT=function(e,t){return e instanceof vw?IT([],[e],t):e},HT=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=IT([`mspace`],[],t),r=Nw(e,t);return n.style.marginRight=B(r),n},GT=function(e,t,n){var r=``;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}var i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:t===`textit`?`Italic`:`Regular`;return r+`-`+i},KT={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},qT={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},J={fontMap:KT,makeSymbol:kT,mathsym:AT,makeSpan:IT,makeSvgSpan:LT,makeLineSpan:RT,makeAnchor:zT,makeFragment:BT,wrapFragment:VT,makeVList:UT,makeOrd:MT,makeGlue:WT,staticSvg:function(e,t){var[n,r,i]=qT[e],a=LT([`overlay`],[new Ww([new Gw(n)],{width:B(r),height:B(i),style:`width:`+B(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=B(i),a.style.width=B(r),a},svgData:qT,tryCombineChars:PT},JT={number:3,unit:`mu`},YT={number:4,unit:`mu`},XT={number:5,unit:`mu`},ZT={mord:{mop:JT,mbin:YT,mrel:XT,minner:JT},mop:{mord:JT,mop:JT,mrel:XT,minner:JT},mbin:{mord:YT,mop:YT,mopen:YT,minner:YT},mrel:{mord:XT,mop:XT,mopen:XT,minner:XT},mopen:{},mclose:{mop:JT,mbin:YT,mrel:XT,minner:JT},mpunct:{mord:JT,mop:JT,mrel:XT,mopen:JT,mclose:JT,mpunct:JT,minner:JT},minner:{mord:JT,mop:JT,mbin:YT,mrel:XT,mopen:JT,mpunct:JT,minner:JT}},QT={mord:{mop:JT},mop:{mord:JT,mop:JT},mbin:{},mrel:{},mopen:{},mclose:{mop:JT},mpunct:{},minner:{mop:JT}},$T={},eE={},tE={};function nE(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c{var n=t.classes[0],r=e.classes[0];n===`mbin`&&cE.includes(r)?t.classes[0]=`mord`:r===`mbin`&&sE.includes(n)&&(e.classes[0]=`mord`)},{node:u},d,f),fE(i,(e,t)=>{var n=hE(t),r=hE(e),i=n&&r?e.hasClass(`mtight`)?QT[n][r]:ZT[n][r]:null;if(i)return J.makeGlue(i,c)},{node:u},d,f),i},fE=function e(t,n,r,i,a){i&&t.push(i);for(var o=0;on=>{t.splice(e+1,0,n),o++})(o)}i&&t.pop()},pE=function(e){return e instanceof vw||e instanceof Bw||e instanceof zw&&e.hasClass(`enclosing`)?e:null},mE=function e(t,n){var r=pE(t);if(r){var i=r.children;if(i.length){if(n===`right`)return e(i[i.length-1],`right`);if(n===`left`)return e(i[0],`left`)}}return t},hE=function(e,t){return e?(t&&(e=mE(e,t)),uE[e.classes[0]]||null):null},gE=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return oE(t.concat(n))},_E=function(e,t,n){if(!e)return oE();if(eE[e.type]){var r=eE[e.type](e,t);if(n&&t.size!==n.size){r=oE(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new z(`Got group of unknown type: '`+e.type+`'`)};function vE(e,t){var n=oE([`base`],e,t),r=oE([`strut`]);return r.style.height=B(n.height+n.depth),n.depth&&(r.style.verticalAlign=B(-n.depth)),n.children.unshift(r),n}function yE(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=dE(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(vE(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(vE(o,t));var l;n?(l=vE(dE(n,t,!0)),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=oE([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=B(u.height+u.depth),u.depth&&(d.style.verticalAlign=B(-u.depth))}return u}function bE(e){return new vw(e)}var xE=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Pw(this.classes));for(var n=0;n0&&(e+=` class ="`+FC.escape(Pw(this.classes))+`"`),e+=`>`;for(var n=0;n`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},SE=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return FC.escape(this.toText())}toText(){return this.text}},Y={MathNode:xE,TextNode:SE,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=` `:e>=-.05556&&e<=-.05555?this.character=` `:e>=-.1667&&e<=-.1666?this.character=` `:e>=-.2223&&e<=-.2222?this.character=` `:e>=-.2778&&e<=-.2777?this.character=` `:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,B(this.width)),e}toMarkup(){return this.character?``+this.character+` `:` `}toText(){return this.character?this.character:` `}},newDocumentFragment:bE},CE=function(e,t,n){return Zw[t][e]&&Zw[t][e].replace&&e.charCodeAt(0)!==55349&&!(sT.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=Zw[t][e].replace),new Y.TextNode(e)},wE=function(e){return e.length===1?e[0]:new Y.MathNode(`mrow`,e)},TE=function(e,t){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`;var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode;if(n===`mathit`)return`italic`;if(n===`boldsymbol`)return e.type===`textord`?`bold`:`bold-italic`;if(n===`mathbf`)return`bold`;if(n===`mathbb`)return`double-struck`;if(n===`mathsfit`)return`sans-serif-italic`;if(n===`mathfrak`)return`fraktur`;if(n===`mathscr`||n===`mathcal`)return`script`;if(n===`mathsf`)return`sans-serif`;if(n===`mathtt`)return`monospace`;var i=e.text;if([`\\imath`,`\\jmath`].includes(i))return null;Zw[r][i]&&Zw[r][i].replace&&(i=Zw[r][i].replace);var a=J.fontMap[n].fontName;return Cw(i,a,r)?J.fontMap[n].variant:null};function EE(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof SE&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof SE&&n.text===`,`}else return!1}var DE=function(e,t,n){if(e.length===1){var r=kE(e[0],t);return n&&r instanceof xE&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||EE(a))){var c=s.children[0];c instanceof xE&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof SE&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof SE&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},OE=function(e,t,n){return wE(DE(e,t,n))},kE=function(e,t){if(!e)return new Y.MathNode(`mrow`);if(tE[e.type])return tE[e.type](e,t);throw new z(`Got group of unknown type: '`+e.type+`'`)};function AE(e,t,n,r,i){var a=DE(e,n),o=a.length===1&&a[0]instanceof xE&&[`mrow`,`mtable`].includes(a[0].type)?a[0]:new Y.MathNode(`mrow`,a),s=new Y.MathNode(`annotation`,[new Y.TextNode(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Y.MathNode(`semantics`,[o,s]),l=new Y.MathNode(`math`,[c]);l.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&l.setAttribute(`display`,`block`);var u=i?`katex`:`katex-mathml`;return J.makeSpan([u],[l])}var jE=function(e){return new kw({style:e.displayMode?tw.DISPLAY:tw.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ME=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=J.makeSpan(n,[e])}return e},NE=function(e,t,n){var r=jE(n),i;if(n.output===`mathml`)return AE(e,t,r,n.displayMode,!0);if(n.output===`html`){var a=yE(e,r);i=J.makeSpan([`katex`],[a])}else{var o=AE(e,t,r,n.displayMode,!1),s=yE(e,r);i=J.makeSpan([`katex`],[o,s])}return ME(i,n)},PE=function(e,t,n){var r=yE(e,jE(n));return ME(J.makeSpan([`katex`],[r]),n)},FE={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},IE=function(e){var t=new Y.MathNode(`mo`,[new Y.TextNode(FE[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},LE={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},RE=function(e){return e.type===`ordgroup`?e.body.length:1},zE={encloseSpan:function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=J.makeSpan([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Kw({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new Kw({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`}));var l=new Ww(c,{width:`100%`,height:B(o)});a=J.makeSvgSpan([],[l],i)}return a.height=o,a.style.height=B(o),a},mathMLnode:IE,svgSpan:function(e,t){function n(){var n=4e5,r=e.label.slice(1);if([`widehat`,`widecheck`,`widetilde`,`utilde`].includes(r)){var i=RE(e.base),a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}var l=new Ww([new Gw(o)],{width:`100%`,height:B(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`});return{span:J.makeSvgSpan([],[l],t),minWidth:0,height:s}}else{var u=[],d=LE[r],[f,p,m]=d,h=m/1e3,g=f.length,_,v;if(g===1){var y=d[3];_=[`hide-tail`],v=[y]}else if(g===2)_=[`halfarrow-left`,`halfarrow-right`],v=[`xMinYMin`,`xMaxYMin`];else if(g===3)_=[`brace-left`,`brace-center`,`brace-right`],v=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
+ `+g+` children.`);for(var b=0;b0&&(r.style.minWidth=B(i)),r}};function BE(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function VE(e){var t=HE(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function HE(e){return e&&(e.type===`atom`||Xw.hasOwnProperty(e.type))?e:null}var UE=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=BE(e.base,`accent`),n=r.base,e.base=n,i=Jw(_E(e,t)),e.base=r):(r=BE(e,`accent`),n=r.base);var a=_E(n,t.havingCrampedStyle()),o=r.isShifty&&FC.isCharacterBox(n),s=0;o&&(s=qw(_E(FC.getBaseElem(n),t.havingCrampedStyle())).skew);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=zE.svgSpan(r,t),u=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+B(2*s)+`)`,marginLeft:B(2*s)}:void 0}]},t);else{var d,f;r.label===`\\vec`?(d=J.staticSvg(`vec`,t),f=J.svgData.vec[1]):(d=J.makeOrd({mode:r.mode,text:r.label},t,`textord`),d=qw(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=J.makeSpan([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=B(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]},t)}var h=J.makeSpan([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},WE=(e,t)=>{var n=e.isStretchy?zE.mathMLnode(e.label):new Y.MathNode(`mo`,[CE(e.label,e.mode)]),r=new Y.MathNode(`mover`,[kE(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},GE=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));nE({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=iE(t[0]),r=!GE.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:UE,mathmlBuilder:WE}),nE({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:UE,mathmlBuilder:WE}),nE({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=_E(e.base,t),r=zE.svgSpan(e,t),i=e.label===`\\utilde`?.12:0,a=J.makeVList({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]},t);return J.makeSpan([`mord`,`accentunder`],[a],t)},mathmlBuilder:(e,t)=>{var n=zE.mathMLnode(e.label),r=new Y.MathNode(`munder`,[kE(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var KE=e=>{var t=new Y.MathNode(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};nE({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=J.wrapFragment(_E(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=J.wrapFragment(_E(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=zE.svgSpan(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c},{type:`elem`,elem:o,shift:d}]},t)}else u=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c}]},t);return u.children[0].children[0].children[1].classes.push(`svg-align`),J.makeSpan([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=zE.mathMLnode(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=KE(kE(e.body,t));if(e.below){var a=KE(kE(e.below,t));r=new Y.MathNode(`munderover`,[n,a,i])}else r=new Y.MathNode(`mover`,[n,i])}else if(e.below){var o=KE(kE(e.below,t));r=new Y.MathNode(`munder`,[n,o])}else r=KE(),r=new Y.MathNode(`mover`,[n,r]);return r}});var qE=J.makeSpan;function JE(e,t){var n=dE(e.body,t,!0);return qE([e.mclass],n,t)}function YE(e,t){var n,r=DE(e.body,t);return e.mclass===`minner`?n=new Y.MathNode(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Y.MathNode(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Y.MathNode(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}nE({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:aE(i),isCharacterBox:FC.isCharacterBox(i)}},htmlBuilder:JE,mathmlBuilder:YE});var XE=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};nE({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:XE(t[0]),body:aE(t[1]),isCharacterBox:FC.isCharacterBox(t[1])}}}),nE({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:XE(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:aE(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:FC.isCharacterBox(c)}},htmlBuilder:JE,mathmlBuilder:YE}),nE({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:XE(t[0]),body:aE(t[0])}},htmlBuilder(e,t){var n=dE(e.body,t,!0),r=J.makeSpan([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=DE(e.body,t),r=new Y.MathNode(`mstyle`,n);return r.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),r}});var ZE={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},QE=()=>({type:`styling`,body:[],mode:`math`,style:`display`}),$E=e=>e.type===`textord`&&e.text===`@`,eD=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function tD(e,t,n){var r=ZE[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function nD(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new z(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a-1))if(`<>AV`.indexOf(l)>-1)for(var d=0;d<2;d++){for(var f=!0,p=c+1;pAV=|." after @`,o[c]);var m={type:`styling`,body:[tD(l,u,e)],mode:`math`,style:`display`};r.push(m),s=QE()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}nE({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=J.wrapFragment(_E(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=B(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Y.MathNode(`mrow`,[kE(e.label,t)]);return n=new Y.MathNode(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Y.MathNode(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),nE({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=J.wrapFragment(_E(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Y.MathNode(`mrow`,[kE(e.fragment,t)])}}),nE({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=BE(t[0],`ordgroup`).body,i=``,a=0;a=1114111)throw new z(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var rD=(e,t)=>{var n=dE(e.body,t.withColor(e.color),!1);return J.makeFragment(n)},iD=(e,t)=>{var n=DE(e.body,t.withColor(e.color)),r=new Y.MathNode(`mstyle`,n);return r.setAttribute(`mathcolor`,e.color),r};nE({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=BE(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:aE(i)}},htmlBuilder:rD,mathmlBuilder:iD}),nE({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=BE(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:rD,mathmlBuilder:iD}),nE({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&BE(i,`size`).value}},htmlBuilder(e,t){var n=J.makeSpan([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=B(Nw(e.size,t)))),n},mathmlBuilder(e,t){var n=new Y.MathNode(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,B(Nw(e.size,t)))),n}});var aD={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},oD=e=>{var t=e.text;if(/^(?:[\\{}$^_]|EOF)$/.test(t))throw new z(`Expected a control sequence`,e);return t},sD=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},cD=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};nE({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(aD[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=aD[r.text]),BE(t.parseFunction(),`internal`);throw new z(`Invalid token after macro prefix`,r)}}),nE({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$^_]|EOF)$/.test(i))throw new z(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new z(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new z(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new z(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===aD[n]),{type:`internal`,mode:t.mode}}}),nE({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=oD(t.gullet.popToken());return t.gullet.consumeSpaces(),cD(t,r,sD(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),nE({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=oD(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return cD(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var lD=function(e,t,n){var r=Cw(Zw.math[e]&&Zw.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},uD=function(e,t,n,r){var i=n.havingBaseStyle(t),a=J.makeSpan(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},dD=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=B(i),e.height-=i,e.depth+=i},fD=function(e,t,n,r,i,a){var o=uD(J.makeSymbol(e,`Main-Regular`,i,r),t,r,a);return n&&dD(o,r,t),o},pD=function(e,t,n,r){return J.makeSymbol(e,`Size`+t+`-Regular`,n,r)},mD=function(e,t,n,r,i,a){var o=pD(e,t,i,r),s=uD(J.makeSpan([`delimsizing`,`size`+t],[o],r),tw.TEXT,r,a);return n&&dD(s,r,tw.TEXT),s},hD=function(e,t,n){var r=t===`Size1-Regular`?`delim-size1`:`delim-size4`;return{type:`elem`,elem:J.makeSpan([`delimsizinginner`,r],[J.makeSpan([],[J.makeSymbol(e,t,n)])])}},gD=function(e,t,n){var r=yw[`Size4-Regular`][e.charCodeAt(0)]?yw[`Size4-Regular`][e.charCodeAt(0)][4]:yw[`Size1-Regular`][e.charCodeAt(0)][4],i=new Ww([new Gw(`inner`,hw(e,Math.round(1e3*t)))],{width:B(r),height:B(t),style:`width:`+B(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`}),a=J.makeSvgSpan([],[i],n);return a.height=t,a.style.height=B(t),a.style.width=B(r),{type:`elem`,elem:a}},_D=.008,vD={type:`kern`,size:-1*_D},yD=[`|`,`\\lvert`,`\\rvert`,`\\vert`],bD=[`\\|`,`\\lVert`,`\\rVert`,`\\Vert`],xD=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):yD.includes(e)?(c=`∣`,u=`vert`,d=333):bD.includes(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=lD(o,f,i),m=p.height+p.depth,h=lD(c,f,i),g=h.height+h.depth,_=lD(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=lD(s,f,i);y=x.height+x.depth,b=2}var ee=m+v+y,S=ee+Math.max(0,Math.ceil((t-ee)/(b*g)))*b*g,C=r.fontMetrics().axisHeight;n&&(C*=r.sizeMultiplier);var w=S/2-C,T=[];if(u.length>0){var te=S-m-v,ne=Math.round(S*1e3),E=_w(u,Math.round(te*1e3)),D=new Gw(u,E),re=(d/1e3).toFixed(3)+`em`,ie=(ne/1e3).toFixed(3)+`em`,ae=new Ww([D],{width:re,height:ie,viewBox:`0 0 `+d+` `+ne}),O=J.makeSvgSpan([],[ae],r);O.height=ne/1e3,O.style.width=re,O.style.height=ie,T.push({type:`elem`,elem:O})}else{if(T.push(hD(l,f,i)),T.push(vD),s===null){var oe=S-m-v+2*_D;T.push(gD(c,oe,r))}else{var se=(S-m-v-y)/2+2*_D;T.push(gD(c,se,r)),T.push(vD),T.push(hD(s,f,i)),T.push(vD),T.push(gD(c,se,r))}T.push(vD),T.push(hD(o,f,i))}var ce=r.havingBaseStyle(tw.TEXT),le=J.makeVList({positionType:`bottom`,positionData:w,children:T},ce);return uD(J.makeSpan([`delimsizing`,`mult`],[le],ce),tw.TEXT,r,a)},SD=80,CD=.08,wD=function(e,t,n,r,i){var a=new Ww([new Gw(e,mw(e,r,n))],{width:`400em`,height:B(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`});return J.makeSvgSpan([`hide-tail`],[a],i)},TD=function(e,t){var n=t.havingBaseSizing(),r=FD(`\\surd`,e*n.sizeMultiplier,ND,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s=0,c=0,l=0,u;return r.type===`small`?(l=1e3+1e3*a+SD,e<1?i=1:e<1.4&&(i=.7),s=(1+a+CD)/i,c=(1+a)/i,o=wD(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+SD)*kD[r.size],c=(kD[r.size]+a)/i,s=(kD[r.size]+a+CD)/i,o=wD(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+CD,c=e+a,l=Math.floor(1e3*e+a)+SD,o=wD(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=B(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},ED=[`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`],DD=[`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`],OD=[`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`],kD=[0,1.2,1.8,2.4,3],AD=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),ED.includes(e)||OD.includes(e))return mD(e,t,!1,n,r,i);if(DD.includes(e))return xD(e,kD[t],!1,n,r,i);throw new z(`Illegal delimiter: '`+e+`'`)},jD=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],MD=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`stack`}],ND=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],PD=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;throw Error(`Add support for delim type '`+e.type+`' here.`)},FD=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return n[i]}return n[n.length-1]},ID=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=OD.includes(e)?jD:ED.includes(e)?ND:MD,s=FD(e,t,o,r);return s.type===`small`?fD(e,s.style,n,r,i,a):s.type===`large`?mD(e,s.size,n,r,i,a):xD(e,t,n,r,i,a)},LD={sqrtImage:TD,sizedDelim:AD,sizeToMaxHeight:kD,customSizedDelim:ID,leftRightDelim:function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return ID(e,Math.max(l/500*s,2*l-c),!0,r,i,a)}},RD={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},zD=`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`);function BD(e,t){var n=HE(e);if(n&&zD.includes(n.text))return n;throw n?new z(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new z(`Invalid delimiter type '`+e.type+`'`,e)}nE({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=BD(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:RD[e.funcName].size,mclass:RD[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?J.makeSpan([e.mclass]):LD.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(CE(e.delim,e.mode));var n=new Y.MathNode(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=B(LD.sizeToMaxHeight[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function VD(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}nE({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new z(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:BD(t[0],e).text,color:n}}}),nE({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=BD(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=BE(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{VD(e);for(var n=dE(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{VD(e);var n=DE(e.body,t);if(e.left!==`.`){var r=new Y.MathNode(`mo`,[CE(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Y.MathNode(`mo`,[CE(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return wE(n)}}),nE({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=BD(t[0],e);if(!e.parser.leftrightDepth)throw new z(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===`.`)n=gE(t,[]);else{n=LD.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim===`\\vert`||e.delim===`|`?CE(`|`,`text`):CE(e.delim,e.mode),r=new Y.MathNode(`mo`,[n]);return r.setAttribute(`fence`,`true`),r.setAttribute(`lspace`,`0.05em`),r.setAttribute(`rspace`,`0.05em`),r}});var HD=(e,t)=>{var n=J.wrapFragment(_E(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o=0,s=FC.isCharacterBox(e.body);if(r===`sout`)a=J.makeSpan([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Nw({number:.6,unit:`pt`},t),l=Nw({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=B(d/2+c);var f=Math.floor(1e3*d*i),p=new Ww([new Gw(`phase`,fw(f))],{width:`400em`,height:B(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`});a=J.makeSvgSpan([`hide-tail`],[p],t),a.style.height=B(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var m=0,h=0,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r===`colorbox`?0:g),h=m):r===`angl`?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*g,h=Math.max(0,.25-n.depth)):(m=s?.2:0,h=m),a=zE.encloseSpan(n,r,m,h,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=B(g)):r===`angl`&&g!==.049&&(a.style.borderTopWidth=B(g),a.style.borderRightWidth=B(g)),o=n.depth+h,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]},t);else{var v=/cancel|phase/.test(r)?[`svg-align`]:[];_=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:v}]},t)}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!s?J.makeSpan([`mord`,`cancel-lap`],[_],t):J.makeSpan([`mord`],[_],t)},UD=(e,t)=>{var n=0,r=new Y.MathNode(e.label.indexOf(`colorbox`)>-1?`mpadded`:`menclose`,[kE(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+i+`em solid `+String(e.borderColor))}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};nE({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=BE(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=BE(t[0],`color-token`).color,o=BE(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),nE({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\sout`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var WD={};function GD(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new z(`{`+e.envName+`} can be used only in display mode.`)};function YD(e){if(e.indexOf(`ed`)===-1)return e.indexOf(`*`)===-1}function XD(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new z(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new TC(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(qD(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup(),x={type:`ordgroup`,mode:e.mode,body:x},n&&(x={type:`styling`,mode:e.mode,style:n,body:[x]}),m.push(x);var ee=e.fetch().text;if(ee===`&`){if(d&&m.length===d){if(l||s)throw new z(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(ee===`\\end`){b(),m.length===1&&x.type===`styling`&&x.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n0&&(w+=g,xe))for(n=0;n=o)){var fe=void 0;(r>0||e.hskipBeforeAndAfter)&&(fe=FC.deflt(se.pregap,d),fe!==0&&(E=J.makeSpan([`arraycolsep`],[]),E.style.width=B(fe),ne.push(E)));var pe=[];for(n=0;n0){for(var _e=J.makeLineSpan(`hline`,t,l),ve=J.makeLineSpan(`hdashline`,t,l),ye=[{type:`elem`,elem:s,shift:0}];c.length>0;){var k=c.pop(),be=k.pos-T;k.isDashed?ye.push({type:`elem`,elem:ve,shift:be}):ye.push({type:`elem`,elem:_e,shift:be})}s=J.makeVList({positionType:`individualShift`,children:ye},t)}if(re.length===0)return J.makeSpan([`mord`],[s],t);var xe=J.makeVList({positionType:`individualShift`,children:re},t);return xe=J.makeSpan([`tag`],[xe],t),J.makeFragment([s,xe])},$D={c:`center `,l:`left `,r:`right `},eO=function(e,t){for(var n=[],r=new Y.MathNode(`mtd`,[],[`mtr-glue`]),i=new Y.MathNode(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++)p[v].type===`align`?(f+=$D[p[v].align],h&&(m+=`none `),h=!0):p[v].type===`separator`&&(h&&=(m+=p[v].separator===`|`?`solid `:`dashed `,!1));l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var y=e.cols||[],b=``,x=1;x0?`left `:``,d+=S[S.length-1].length>0?`right `:``;for(var C=1;C-1?`alignat`:`align`,i=e.envName===`split`,a=XD(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:YD(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};GD({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(HE(t[0])?[t[0]]:BE(t[0],`ordgroup`).body).map(function(e){var t=VE(e).text;if(`lcr`.indexOf(t)!==-1)return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new z(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return XD(e.parser,r,ZD(e.envName))},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,`lcr`.indexOf(n)===-1)throw new z(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=XD(e.parser,r,ZD(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=XD(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(HE(t[0])?[t[0]]:BE(t[0],`ordgroup`).body).map(function(e){var t=VE(e).text;if(`lc`.indexOf(t)!==-1)return{type:`align`,align:t};throw new z(`Unknown column alignment: `+t,e)});if(n.length>1)throw new z(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(r=XD(e.parser,r,`script`),r.body.length>0&&r.body[0].length>1)throw new z(`{subarray} can contain only one column`);return r},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=XD(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},ZD(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.indexOf(`r`)>-1?`.`:`\\{`,right:e.envName.indexOf(`r`)>-1?`\\}`:`.`,rightColor:void 0}},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:tO,htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){[`gather`,`gather*`].includes(e.envName)&&JD(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:YD(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return XD(e.parser,t,`display`)},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:tO,htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){JD(e);var t={autoTag:YD(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return XD(e.parser,t,`display`)},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return JD(e),nD(e.parser)},htmlBuilder:QD,mathmlBuilder:eO}),X(`\\nonumber`,`\\gdef\\@eqnsw{0}`),X(`\\notag`,`\\nonumber`),nE({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new z(e.funcName+` valid only within array environment`)}});var nO=WD;nE({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new z(`Invalid environment name`,i);for(var a=``,o=0;o{var n=e.font,r=t.withFont(n);return _E(e.body,r)},iO=(e,t)=>{var n=e.font,r=t.withFont(n);return kE(e.body,r)},aO={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`,"\\bm":`\\boldsymbol`};nE({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=iE(t[0]),a=r;return a in aO&&(a=aO[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:rO,mathmlBuilder:iO}),nE({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=FC.isCharacterBox(r);return{type:`mclass`,mode:n.mode,mclass:XE(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:i}}}),nE({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:rO,mathmlBuilder:iO});var oO=(e,t)=>{var n=t;return e===`display`?n=n.id>=tw.SCRIPT.id?n.text():tw.DISPLAY:e===`text`&&n.size===tw.DISPLAY.size?n=tw.TEXT:e===`script`?n=tw.SCRIPT:e===`scriptscript`&&(n=tw.SCRIPTSCRIPT),n},sO=(e,t)=>{var n=oO(e.size,t.style),r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=_E(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Y.MathNode(`mfrac`,[kE(e.numer,t),kE(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Nw(e.barSize,t);n.setAttribute(`linethickness`,B(r))}var i=oO(e.size,t.style);if(i.size!==t.style.size){n=new Y.MathNode(`mstyle`,[n]);var a=i.size===tw.DISPLAY.size?`true`:`false`;n.setAttribute(`displaystyle`,a),n.setAttribute(`scriptlevel`,`0`)}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var s=new Y.MathNode(`mo`,[new Y.TextNode(e.leftDelim.replace(`\\`,``))]);s.setAttribute(`fence`,`true`),o.push(s)}if(o.push(n),e.rightDelim!=null){var c=new Y.MathNode(`mo`,[new Y.TextNode(e.rightDelim.replace(`\\`,``))]);c.setAttribute(`fence`,`true`),o.push(c)}return wE(o)}return n};nE({type:`genfrac`,names:[`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null,l=`auto`;switch(r){case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}switch(r){case`\\dfrac`:case`\\dbinom`:l=`display`;break;case`\\tfrac`:case`\\tbinom`:l=`text`;break}return{type:`genfrac`,mode:n.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:s,rightDelim:c,size:l,barSize:null}},htmlBuilder:sO,mathmlBuilder:cO}),nE({type:`genfrac`,names:[`\\cfrac`],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:`genfrac`,mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:`display`,barSize:null}}}),nE({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var lO=[`display`,`text`,`script`,`scriptscript`],uO=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};nE({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=iE(t[0]),o=a.type===`atom`&&a.family===`open`?uO(a.text):null,s=iE(t[1]),c=s.type===`atom`&&s.family===`close`?uO(s.text):null,l=BE(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=`auto`,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=BE(p.body[0],`textord`);f=lO[Number(m.text)]}}else p=BE(p,`textord`),f=lO[Number(p.text)];return{type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c,size:f}},htmlBuilder:sO,mathmlBuilder:cO}),nE({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:BE(t[0],`size`).value,token:i}}}),nE({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=PC(BE(t[1],`infix`).size),o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:`auto`}},htmlBuilder:sO,mathmlBuilder:cO});var dO=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?_E(e.sup,t.havingStyle(n.sup()),t):_E(e.sub,t.havingStyle(n.sub()),t),i=BE(e.base,`horizBrace`)):i=BE(e,`horizBrace`);var a=_E(i.base,t.havingBaseStyle(tw.DISPLAY)),o=zE.svgSpan(i,t),s;if(i.isOver?(s=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o}]},t),s.children[0].children[0].children[1].classes.push(`svg-align`)):(s=J.makeVList({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o},{type:`kern`,size:.1},{type:`elem`,elem:a}]},t),s.children[0].children[0].children[0].classes.push(`svg-align`)),r){var c=J.makeSpan([`mord`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]},t):J.makeVList({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]},t)}return J.makeSpan([`mord`,i.isOver?`mover`:`munder`],[s],t)};nE({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:dO,mathmlBuilder:(e,t)=>{var n=zE.mathMLnode(e.label);return new Y.MathNode(e.isOver?`mover`:`munder`,[kE(e.base,t),n])}}),nE({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=BE(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:aE(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=dE(e.body,t,!1);return J.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=OE(e.body,t);return n instanceof xE||(n=new xE(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),nE({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=BE(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var{parser:n,funcName:r,token:i}=e,a=BE(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u{var n=dE(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=J.makeSpan(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>OE(e.body,t)}),nE({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:aE(t[0]),mathml:aE(t[1])}},htmlBuilder:(e,t)=>{var n=dE(e.html,t,!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>OE(e.mathml,t)});var fO=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new z(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Mw(n))throw new z(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};nE({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=BE(n[0],`raw`).string.split(`,`),l=0;l{var n=Nw(e.height,t),r=0;e.totalheight.number>0&&(r=Nw(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Nw(e.width,t));var a={height:B(n+r)};i>0&&(a.width=B(i)),r>0&&(a.verticalAlign=B(-r));var o=new Vw(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Y.MathNode(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Nw(e.height,t),i=0;if(e.totalheight.number>0&&(i=Nw(e.totalheight,t)-r,n.setAttribute(`valign`,B(-i))),n.setAttribute(`height`,B(r+i)),e.width.number>0){var a=Nw(e.width,t);n.setAttribute(`width`,B(a))}return n.setAttribute(`src`,e.src),n}}),nE({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=BE(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return J.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=Nw(e.dimension,t);return new Y.SpaceNode(n)}}),nE({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=J.makeSpan([],[_E(e.body,t)]),n=J.makeSpan([`inner`],[n],t)):n=J.makeSpan([`inner`],[_E(e.body,t)]);var r=J.makeSpan([`fix`],[]),i=J.makeSpan([e.alignment],[n,r],t),a=J.makeSpan([`strut`]);return a.style.height=B(i.height+i.depth),i.depth&&(a.style.verticalAlign=B(-i.depth)),i.children.unshift(a),i=J.makeSpan([`thinbox`],[i],t),J.makeSpan([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),nE({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,body:o}}}),nE({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new z(`Mismatched `+e.funcName)}});var pO=(e,t)=>{switch(t.style.size){case tw.DISPLAY.size:return e.display;case tw.TEXT.size:return e.text;case tw.SCRIPT.size:return e.script;case tw.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};nE({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:aE(t[0]),text:aE(t[1]),script:aE(t[2]),scriptscript:aE(t[3])}},htmlBuilder:(e,t)=>{var n=dE(pO(e,t),t,!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>OE(pO(e,t),t)});var mO=(e,t,n,r,i,a,o)=>{e=J.makeSpan([],[e]);var s=n&&FC.isCharacterBox(n),c,l;if(t){var u=_E(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=_E(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c){var p=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;f=J.makeVList({positionType:`bottom`,positionData:p,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:B(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:B(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else if(c){var m=e.height-o;f=J.makeVList({positionType:`top`,positionData:m,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:B(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]},r)}else if(l){var h=e.depth+o;f=J.makeVList({positionType:`bottom`,positionData:h,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:B(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var g=[f];if(c&&a!==0&&!s){var _=J.makeSpan([`mspace`],[],r);_.style.marginRight=B(a),g.unshift(_)}return J.makeSpan([`mop`,`op-limits`],g,r)},hO=[`\\smallint`],gO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=BE(e.base,`op`),i=!0):a=BE(e,`op`);var o=t.style,s=!1;o.size===tw.DISPLAY.size&&a.symbol&&!hO.includes(a.name)&&(s=!0);var c;if(a.symbol){var l=s?`Size2-Regular`:`Size1-Regular`,u=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(u=a.name.slice(1),a.name=u===`oiint`?`\\iint`:`\\iiint`),c=J.makeSymbol(a.name,l,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u.length>0){var d=c.italic,f=J.staticSvg(u+`Size`+(s?`2`:`1`),t);c=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]},t),a.name=`\\`+u,c.classes.unshift(`mop`),c.italic=d}}else if(a.body){var p=dE(a.body,t,!0);p.length===1&&p[0]instanceof Uw?(c=p[0],c.classes[0]=`mop`):c=J.makeSpan([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new xE(`mo`,[CE(e.name,e.mode)]),hO.includes(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new xE(`mo`,DE(e.body,t));else{n=new xE(`mi`,[new SE(e.name.slice(1))]);var r=new xE(`mo`,[CE(``,`text`)]);n=e.parentIsSupSub?new xE(`mrow`,[n,r]):bE([n,r])}return n},vO={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};nE({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=vO[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:aE(r)}},htmlBuilder:gO,mathmlBuilder:_O});var yO={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};nE({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=yO[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:gO,mathmlBuilder:_O});var bO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=BE(e.base,`operatorname`),i=!0):a=BE(e,`operatorname`);var o;if(a.body.length>0){for(var s=dE(a.body.map(e=>{var t=e.text;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:aE(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:bO,mathmlBuilder:(e,t)=>{for(var n=DE(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``);n=[new Y.TextNode(s)]}var c=new Y.MathNode(`mi`,n);c.setAttribute(`mathvariant`,`normal`);var l=new Y.MathNode(`mo`,[CE(``,`text`)]);return e.parentIsSupSub?new Y.MathNode(`mrow`,[c,l]):Y.newDocumentFragment([c,l])}}),X(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),rE({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?J.makeFragment(dE(e.body,t,!1)):J.makeSpan([`mord`],dE(e.body,t,!0),t)},mathmlBuilder(e,t){return OE(e.body,t,!0)}}),nE({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=_E(e.body,t.havingCrampedStyle()),r=J.makeLineSpan(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]},t);return J.makeSpan([`mord`,`overline`],[a],t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[new Y.TextNode(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y.MathNode(`mover`,[kE(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),nE({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:aE(r)}},htmlBuilder:(e,t)=>{var n=dE(e.body,t.withPhantom(),!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=DE(e.body,t);return new Y.MathNode(`mphantom`,n)}}),nE({type:`hphantom`,names:[`\\hphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`hphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=J.makeSpan([],[_E(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=DE(aE(e.body),t),r=new Y.MathNode(`mphantom`,n),i=new Y.MathNode(`mpadded`,[r]);return i.setAttribute(`height`,`0px`),i.setAttribute(`depth`,`0px`),i}}),nE({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=J.makeSpan([`inner`],[_E(e.body,t.withPhantom())]),r=J.makeSpan([`fix`],[]);return J.makeSpan([`mord`,`rlap`],[n,r],t)},mathmlBuilder:(e,t)=>{var n=DE(aE(e.body),t),r=new Y.MathNode(`mphantom`,n),i=new Y.MathNode(`mpadded`,[r]);return i.setAttribute(`width`,`0px`),i}}),nE({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=BE(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=_E(e.body,t),r=Nw(e.dy,t);return J.makeVList({positionType:`shift`,positionData:-r,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),nE({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),nE({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=BE(t[0],`size`),o=BE(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&BE(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=J.makeSpan([`mord`,`rule`],[],t),r=Nw(e.width,t),i=Nw(e.height,t),a=e.shift?Nw(e.shift,t):0;return n.style.borderRightWidth=B(r),n.style.borderTopWidth=B(i),n.style.bottom=B(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Nw(e.width,t),r=Nw(e.height,t),i=e.shift?Nw(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Y.MathNode(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,B(n)),o.setAttribute(`height`,B(r));var s=new Y.MathNode(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,B(i)):(s.setAttribute(`height`,B(i)),s.setAttribute(`depth`,B(-i))),s.setAttribute(`voffset`,B(i)),s}});function xO(e,t,n){for(var r=dE(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:SO.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return xO(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=DE(e.body,n),i=new Y.MathNode(`mstyle`,r);return i.setAttribute(`mathsize`,B(n.sizeMultiplier)),i}}),nE({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&BE(n[0],`ordgroup`);if(o)for(var s=``,c=0;c{var n=J.makeSpan([],[_E(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),nE({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=_E(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=J.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=B(l);var f=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]},t);if(e.index){var p=t.havingStyle(tw.SCRIPTSCRIPT),m=_E(e.index,p,t),h=.6*(f.height-f.depth),g=J.makeVList({positionType:`shift`,positionData:-h,children:[{type:`elem`,elem:m}]},t),_=J.makeSpan([`root`],[g]);return J.makeSpan([`mord`,`sqrt`],[_,f],t)}else return J.makeSpan([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Y.MathNode(`mroot`,[kE(n,t),kE(r,t)]):new Y.MathNode(`msqrt`,[kE(n,t)])}});var CO={display:tw.DISPLAY,text:tw.TEXT,script:tw.SCRIPT,scriptscript:tw.SCRIPTSCRIPT};nE({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=CO[e.style],r=t.havingStyle(n).withFont(``);return xO(e.body,r,t)},mathmlBuilder(e,t){var n=CO[e.style],r=t.havingStyle(n),i=DE(e.body,r),a=new Y.MathNode(`mstyle`,i),o={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return a.setAttribute(`scriptlevel`,o[0]),a.setAttribute(`displaystyle`,o[1]),a}});var wO=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===tw.DISPLAY.size||n.alwaysHandleSupSub)?gO:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===tw.DISPLAY.size||n.limits)?bO:null:n.type===`accent`?FC.isCharacterBox(n.base)?UE:null:n.type===`horizBrace`&&!e.sub===n.isOver?dO:null:null};rE({type:`supsub`,htmlBuilder(e,t){var n=wO(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=_E(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&FC.isCharacterBox(r);if(i){var p=t.havingStyle(t.style.sup());s=_E(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=_E(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===tw.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=B(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Uw||y)&&(v=B(-o.italic))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)0&&(u+=ee,d-=ee)}var S=[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}];b=J.makeVList({positionType:`individualShift`,children:S},t)}else if(c){d=Math.max(d,l.sub1,c.height-.8*l.xHeight);var C=[{type:`elem`,elem:c,marginLeft:v,marginRight:_}];b=J.makeVList({positionType:`shift`,positionData:d,children:C},t)}else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=J.makeVList({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]},t);else throw Error(`supsub must have either sup or sub.`);var w=hE(o,`right`)||`mord`;return J.makeSpan([w],[o,J.makeSpan([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[kE(e.base,t)];e.sub&&a.push(kE(e.sub,t)),e.sup&&a.push(kE(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===tw.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===tw.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===tw.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===tw.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===tw.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===tw.DISPLAY)?`munder`:`msub`}return new Y.MathNode(o,a)}}),rE({type:`atom`,htmlBuilder(e,t){return J.mathsym(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[CE(e.text,e.mode)]);if(e.family===`bin`){var r=TE(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var TO={mi:`italic`,mn:`normal`,mtext:`normal`};rE({type:`mathord`,htmlBuilder(e,t){return J.makeOrd(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Y.MathNode(`mi`,[CE(e.text,e.mode,t)]),r=TE(e,t)||`italic`;return r!==TO[n.type]&&n.setAttribute(`mathvariant`,r),n}}),rE({type:`textord`,htmlBuilder(e,t){return J.makeOrd(e,t,`textord`)},mathmlBuilder(e,t){var n=CE(e.text,e.mode,t),r=TE(e,t)||`normal`,i=e.mode===`text`?new Y.MathNode(`mtext`,[n]):/[0-9]/.test(e.text)?new Y.MathNode(`mn`,[n]):e.text===`\\prime`?new Y.MathNode(`mo`,[n]):new Y.MathNode(`mi`,[n]);return r!==TO[i.type]&&i.setAttribute(`mathvariant`,r),i}});var EO={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},DO={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};rE({type:`spacing`,htmlBuilder(e,t){if(DO.hasOwnProperty(e.text)){var n=DO[e.text].className||``;if(e.mode===`text`){var r=J.makeOrd(e,t,`textord`);return r.classes.push(n),r}else return J.makeSpan([`mspace`,n],[J.mathsym(e.text,e.mode,t)],t)}else if(EO.hasOwnProperty(e.text))return J.makeSpan([`mspace`,EO[e.text]],[],t);else throw new z(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(DO.hasOwnProperty(e.text))n=new Y.MathNode(`mtext`,[new Y.TextNode(`\xA0`)]);else if(EO.hasOwnProperty(e.text))return new Y.MathNode(`mspace`);else throw new z(`Unknown type of space "`+e.text+`"`);return n}});var OO=()=>{var e=new Y.MathNode(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};rE({type:`tag`,mathmlBuilder(e,t){var n=new Y.MathNode(`mtable`,[new Y.MathNode(`mtr`,[OO(),new Y.MathNode(`mtd`,[OE(e.body,t)]),OO(),new Y.MathNode(`mtd`,[OE(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var kO={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},AO={"\\textbf":`textbf`,"\\textmd":`textmd`},jO={"\\textit":`textit`,"\\textup":`textup`},MO=(e,t)=>{var n=e.font;return n?kO[n]?t.withTextFontFamily(kO[n]):AO[n]?t.withTextFontWeight(AO[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(jO[n]):t};nE({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:aE(i),font:r}},htmlBuilder(e,t){var n=MO(e,t),r=dE(e.body,n,!0);return J.makeSpan([`mord`,`text`],r,n)},mathmlBuilder(e,t){var n=MO(e,t);return OE(e.body,n)}}),nE({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_E(e.body,t),r=J.makeLineSpan(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=J.makeVList({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]},t);return J.makeSpan([`mord`,`underline`],[a],t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[new Y.TextNode(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y.MathNode(`munder`,[kE(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),nE({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_E(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return J.makeVList({positionType:`shift`,positionData:i,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){return new Y.MathNode(`mpadded`,[kE(e.body,t)],[`vcenter`])}}),nE({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new z(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=NO(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),PO=$T,FO=`[ \r
+ ]`,IO=`\\\\[a-zA-Z@]+`,LO=`\\\\[^\ud800-\udfff]`,RO=`(`+IO+`)`+FO+`*`,zO=`\\\\(
+|[ \r ]+
+?)[ \r ]*`,BO=`[̀-ͯ]`,VO=RegExp(BO+`+$`),HO=`(`+FO+`+)|`+(zO+`|`)+`([!-\\[\\]-‧-豈-]`+(BO+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(BO+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+RO)+(`|`+LO+`)`),UO=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(HO,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new TC(`EOF`,new wC(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new z(`Unexpected character: '`+e[t]+`'`,new TC(e[t],new wC(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
+`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new TC(r,new wC(this,t,this.tokenRegex.lastIndex))}},WO=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new z(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},GO=KD;X(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),X(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),X(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),X(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),X(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),X(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),X(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var KO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};X(`\\char`,function(e){var t=e.popToken(),n,r=``;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new z("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=KO[t.text],r==null||r>=n)throw new z(`Invalid base-`+n+` digit `+t.text);for(var i;(i=KO[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new z(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new z(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new z(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new z(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};X(`\\newcommand`,e=>qO(e,!1,!0,!1)),X(`\\renewcommand`,e=>qO(e,!0,!1,!1)),X(`\\providecommand`,e=>qO(e,!0,!0,!0)),X(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),X(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),X(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),PO[n],Zw.math[n],Zw.text[n]),``}),X(`\\bgroup`,`{`),X(`\\egroup`,`}`),X(`~`,`\\nobreakspace`),X(`\\lq`,"`"),X(`\\rq`,`'`),X(`\\aa`,`\\r a`),X(`\\AA`,`\\r A`),X(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),X(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),X(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),X(`ℬ`,`\\mathscr{B}`),X(`ℰ`,`\\mathscr{E}`),X(`ℱ`,`\\mathscr{F}`),X(`ℋ`,`\\mathscr{H}`),X(`ℐ`,`\\mathscr{I}`),X(`ℒ`,`\\mathscr{L}`),X(`ℳ`,`\\mathscr{M}`),X(`ℛ`,`\\mathscr{R}`),X(`ℭ`,`\\mathfrak{C}`),X(`ℌ`,`\\mathfrak{H}`),X(`ℨ`,`\\mathfrak{Z}`),X(`\\Bbbk`,`\\Bbb{k}`),X(`·`,`\\cdotp`),X(`\\llap`,`\\mathllap{\\textrm{#1}}`),X(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),X(`\\clap`,`\\mathclap{\\textrm{#1}}`),X(`\\mathstrut`,`\\vphantom{(}`),X(`\\underbar`,`\\underline{\\text{#1}}`),X(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}`),X(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),X(`\\ne`,`\\neq`),X(`≠`,`\\neq`),X(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),X(`∉`,`\\notin`),X(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),X(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),X(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),X(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),X(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),X(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),X(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),X(`⟂`,`\\perp`),X(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),X(`∌`,`\\notni`),X(`⌜`,`\\ulcorner`),X(`⌝`,`\\urcorner`),X(`⌞`,`\\llcorner`),X(`⌟`,`\\lrcorner`),X(`©`,`\\copyright`),X(`®`,`\\textregistered`),X(`️`,`\\textregistered`),X(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),X(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),X(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),X(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),X(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),X(`⋮`,`\\vdots`),X(`\\varGamma`,`\\mathit{\\Gamma}`),X(`\\varDelta`,`\\mathit{\\Delta}`),X(`\\varTheta`,`\\mathit{\\Theta}`),X(`\\varLambda`,`\\mathit{\\Lambda}`),X(`\\varXi`,`\\mathit{\\Xi}`),X(`\\varPi`,`\\mathit{\\Pi}`),X(`\\varSigma`,`\\mathit{\\Sigma}`),X(`\\varUpsilon`,`\\mathit{\\Upsilon}`),X(`\\varPhi`,`\\mathit{\\Phi}`),X(`\\varPsi`,`\\mathit{\\Psi}`),X(`\\varOmega`,`\\mathit{\\Omega}`),X(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),X(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),X(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),X(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),X(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),X(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),X(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),X(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var JO={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`};X(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in JO?t=JO[n]:(n.slice(0,4)===`\\not`||n in Zw.math&&[`bin`,`rel`].includes(Zw.math[n].group))&&(t=`\\dotsb`),t});var YO={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};X(`\\dotso`,function(e){return e.future().text in YO?`\\ldots\\,`:`\\ldots`}),X(`\\dotsc`,function(e){var t=e.future().text;return t in YO&&t!==`,`?`\\ldots\\,`:`\\ldots`}),X(`\\cdots`,function(e){return e.future().text in YO?`\\@cdots\\,`:`\\@cdots`}),X(`\\dotsb`,`\\cdots`),X(`\\dotsm`,`\\cdots`),X(`\\dotsi`,`\\!\\cdots`),X(`\\dotsx`,`\\ldots\\,`),X(`\\DOTSI`,`\\relax`),X(`\\DOTSB`,`\\relax`),X(`\\DOTSX`,`\\relax`),X(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),X(`\\,`,`\\tmspace+{3mu}{.1667em}`),X(`\\thinspace`,`\\,`),X(`\\>`,`\\mskip{4mu}`),X(`\\:`,`\\tmspace+{4mu}{.2222em}`),X(`\\medspace`,`\\:`),X(`\\;`,`\\tmspace+{5mu}{.2777em}`),X(`\\thickspace`,`\\;`),X(`\\!`,`\\tmspace-{3mu}{.1667em}`),X(`\\negthinspace`,`\\!`),X(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),X(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),X(`\\enspace`,`\\kern.5em `),X(`\\enskip`,`\\hskip.5em\\relax`),X(`\\quad`,`\\hskip1em\\relax`),X(`\\qquad`,`\\hskip2em\\relax`),X(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),X(`\\tag@paren`,`\\tag@literal{({#1})}`),X(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new z(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),X(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),X(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),X(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),X(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),X(`\\newline`,`\\\\\\relax`),X(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var XO=B(yw[`Main-Regular`][84][1]-.7*yw[`Main-Regular`][65][1]);X(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+XO+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),X(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+XO+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),X(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),X(`\\@hspace`,`\\hskip #1\\relax`),X(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),X(`\\ordinarycolon`,`:`),X(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),X(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),X(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),X(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),X(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),X(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),X(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),X(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),X(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),X(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),X(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),X(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),X(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),X(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),X(`∷`,`\\dblcolon`),X(`∹`,`\\eqcolon`),X(`≔`,`\\coloneqq`),X(`≕`,`\\eqqcolon`),X(`⩴`,`\\Coloneqq`),X(`\\ratio`,`\\vcentcolon`),X(`\\coloncolon`,`\\dblcolon`),X(`\\colonequals`,`\\coloneqq`),X(`\\coloncolonequals`,`\\Coloneqq`),X(`\\equalscolon`,`\\eqqcolon`),X(`\\equalscoloncolon`,`\\Eqqcolon`),X(`\\colonminus`,`\\coloneq`),X(`\\coloncolonminus`,`\\Coloneq`),X(`\\minuscolon`,`\\eqcolon`),X(`\\minuscoloncolon`,`\\Eqcolon`),X(`\\coloncolonapprox`,`\\Colonapprox`),X(`\\coloncolonsim`,`\\Colonsim`),X(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),X(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),X(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),X(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),X(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),X(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),X(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),X(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),X(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),X(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),X(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),X(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),X(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),X(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),X(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),X(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),X(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),X(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),X(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),X(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),X(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),X(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),X(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),X(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),X(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),X(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),X(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),X(`\\imath`,`\\html@mathml{\\@imath}{ı}`),X(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),X(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),X(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),X(`⟦`,`\\llbracket`),X(`⟧`,`\\rrbracket`),X(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),X(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),X(`⦃`,`\\lBrace`),X(`⦄`,`\\rBrace`),X(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),X(`⦵`,`\\minuso`),X(`\\darr`,`\\downarrow`),X(`\\dArr`,`\\Downarrow`),X(`\\Darr`,`\\Downarrow`),X(`\\lang`,`\\langle`),X(`\\rang`,`\\rangle`),X(`\\uarr`,`\\uparrow`),X(`\\uArr`,`\\Uparrow`),X(`\\Uarr`,`\\Uparrow`),X(`\\N`,`\\mathbb{N}`),X(`\\R`,`\\mathbb{R}`),X(`\\Z`,`\\mathbb{Z}`),X(`\\alef`,`\\aleph`),X(`\\alefsym`,`\\aleph`),X(`\\Alpha`,`\\mathrm{A}`),X(`\\Beta`,`\\mathrm{B}`),X(`\\bull`,`\\bullet`),X(`\\Chi`,`\\mathrm{X}`),X(`\\clubs`,`\\clubsuit`),X(`\\cnums`,`\\mathbb{C}`),X(`\\Complex`,`\\mathbb{C}`),X(`\\Dagger`,`\\ddagger`),X(`\\diamonds`,`\\diamondsuit`),X(`\\empty`,`\\emptyset`),X(`\\Epsilon`,`\\mathrm{E}`),X(`\\Eta`,`\\mathrm{H}`),X(`\\exist`,`\\exists`),X(`\\harr`,`\\leftrightarrow`),X(`\\hArr`,`\\Leftrightarrow`),X(`\\Harr`,`\\Leftrightarrow`),X(`\\hearts`,`\\heartsuit`),X(`\\image`,`\\Im`),X(`\\infin`,`\\infty`),X(`\\Iota`,`\\mathrm{I}`),X(`\\isin`,`\\in`),X(`\\Kappa`,`\\mathrm{K}`),X(`\\larr`,`\\leftarrow`),X(`\\lArr`,`\\Leftarrow`),X(`\\Larr`,`\\Leftarrow`),X(`\\lrarr`,`\\leftrightarrow`),X(`\\lrArr`,`\\Leftrightarrow`),X(`\\Lrarr`,`\\Leftrightarrow`),X(`\\Mu`,`\\mathrm{M}`),X(`\\natnums`,`\\mathbb{N}`),X(`\\Nu`,`\\mathrm{N}`),X(`\\Omicron`,`\\mathrm{O}`),X(`\\plusmn`,`\\pm`),X(`\\rarr`,`\\rightarrow`),X(`\\rArr`,`\\Rightarrow`),X(`\\Rarr`,`\\Rightarrow`),X(`\\real`,`\\Re`),X(`\\reals`,`\\mathbb{R}`),X(`\\Reals`,`\\mathbb{R}`),X(`\\Rho`,`\\mathrm{P}`),X(`\\sdot`,`\\cdot`),X(`\\sect`,`\\S`),X(`\\spades`,`\\spadesuit`),X(`\\sub`,`\\subset`),X(`\\sube`,`\\subseteq`),X(`\\supe`,`\\supseteq`),X(`\\Tau`,`\\mathrm{T}`),X(`\\thetasym`,`\\vartheta`),X(`\\weierp`,`\\wp`),X(`\\Zeta`,`\\mathrm{Z}`),X(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),X(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),X(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),X(`\\bra`,`\\mathinner{\\langle{#1}|}`),X(`\\ket`,`\\mathinner{|{#1}\\rangle}`),X(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),X(`\\Bra`,`\\left\\langle#1\\right|`),X(`\\Ket`,`\\left|#1\\right\\rangle`);var ZO=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};X(`\\bra@ket`,ZO(!1)),X(`\\bra@set`,ZO(!0)),X(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),X(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),X(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),X(`\\angln`,`{\\angl n}`),X(`\\blue`,`\\textcolor{##6495ed}{#1}`),X(`\\orange`,`\\textcolor{##ffa500}{#1}`),X(`\\pink`,`\\textcolor{##ff00af}{#1}`),X(`\\red`,`\\textcolor{##df0030}{#1}`),X(`\\green`,`\\textcolor{##28ae7b}{#1}`),X(`\\gray`,`\\textcolor{gray}{#1}`),X(`\\purple`,`\\textcolor{##9d38bd}{#1}`),X(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),X(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),X(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),X(`\\blueD`,`\\textcolor{##11accd}{#1}`),X(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),X(`\\tealA`,`\\textcolor{##94fff5}{#1}`),X(`\\tealB`,`\\textcolor{##26edd5}{#1}`),X(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),X(`\\tealD`,`\\textcolor{##01a995}{#1}`),X(`\\tealE`,`\\textcolor{##208170}{#1}`),X(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),X(`\\greenB`,`\\textcolor{##8af281}{#1}`),X(`\\greenC`,`\\textcolor{##74cf70}{#1}`),X(`\\greenD`,`\\textcolor{##1fab54}{#1}`),X(`\\greenE`,`\\textcolor{##0d923f}{#1}`),X(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),X(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),X(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),X(`\\goldD`,`\\textcolor{##e07d10}{#1}`),X(`\\goldE`,`\\textcolor{##a75a05}{#1}`),X(`\\redA`,`\\textcolor{##fca9a9}{#1}`),X(`\\redB`,`\\textcolor{##ff8482}{#1}`),X(`\\redC`,`\\textcolor{##f9685d}{#1}`),X(`\\redD`,`\\textcolor{##e84d39}{#1}`),X(`\\redE`,`\\textcolor{##bc2612}{#1}`),X(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),X(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),X(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),X(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),X(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),X(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),X(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),X(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),X(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),X(`\\purpleE`,`\\textcolor{##543b78}{#1}`),X(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),X(`\\mintB`,`\\textcolor{##edf2df}{#1}`),X(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),X(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),X(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),X(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),X(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),X(`\\grayE`,`\\textcolor{##babec2}{#1}`),X(`\\grayF`,`\\textcolor{##888d93}{#1}`),X(`\\grayG`,`\\textcolor{##626569}{#1}`),X(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),X(`\\grayI`,`\\textcolor{##21242c}{#1}`),X(`\\kaBlue`,`\\textcolor{##314453}{#1}`),X(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var QO={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},$O=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new WO(GO,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new UO(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else ({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new TC(`EOF`,n.loc)),this.pushTokens(r),new TC(``,wC.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new z(`Extra }`,i)}else if(i.text===`EOF`)throw new z(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new z(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new z(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new z(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new z(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new z(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}throw Error()}expandMacro(e){return this.macros.has(e)?this.expandTokens([new TC(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.indexOf(`#`)!==-1)for(var a=r.replace(/##/g,``);a.indexOf(`#`+(i+1))!==-1;)++i;for(var o=new UO(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||PO.hasOwnProperty(e)||Zw.math.hasOwnProperty(e)||Zw.text.hasOwnProperty(e)||QO.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?PO.hasOwnProperty(e)&&!PO[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},ek=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,tk=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),nk={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},rk={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},ik=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new $O(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new z(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new TC(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&PO[i.text]&&PO[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=0&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Zw[this.mode][t].group,s=wC.range(e),c;if(Yw.hasOwnProperty(o)){var l=o;c={type:`atom`,mode:this.mode,family:l,loc:s,text:t}}else c={type:o,mode:this.mode,loc:s,text:t};a=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(aw(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:wC.range(e),text:t};else return null;if(this.consume(),i)for(var u=0;u{i(t)},[t]),(0,k.jsxs)(`div`,{className:`mb-3`,children:[(0,k.jsxs)(`button`,{onClick:()=>i(e=>!e),className:`flex items-center gap-2 text-xs text-[#0A323580] hover:text-[#0A3235] transition-colors cursor-pointer`,children:[(0,k.jsx)(D,{className:`h-3.5 w-3.5`}),t?(0,k.jsx)(`span`,{className:`thinking-shimmer font-medium`,children:`Thinking…`}):(0,k.jsxs)(`span`,{children:[`Thought for `,n,`s`]}),(0,k.jsx)(ie,{className:`h-3 w-3 transition-transform duration-200 ${r?``:`-rotate-90`}`})]}),r&&(0,k.jsx)(`div`,{className:`mt-2 rounded-lg border border-[#0A32351a] bg-[#FAF2E9] px-3 py-2 text-xs text-[#0A323580] whitespace-pre-wrap`,children:e.trim()})]})}var kk=Dk({singleDollarTextMath:!0}),Ak=[{prefix:`\\boxed{`,args:1},{prefix:`\\text{`,args:1},{prefix:`\\textbf{`,args:1},{prefix:`\\mathbf{`,args:1},{prefix:`\\mathrm{`,args:1},{prefix:`\\frac{`,args:2}];function jk(e,t){let n=1,r=t;for(;r0;)e[r]===`{`?n++:e[r]===`}`&&n--,r++;return r}function Mk(e){let t=``,n=0,r=null;for(;ne.startsWith(t.prefix,n));if(i){let r=jk(e,n+i.prefix.length);for(let t=1;t{await navigator.clipboard.writeText(e.content),m(!0),setTimeout(()=>m(!1),2e3)},[e.content]);(0,y.useEffect)(()=>{l&&h.current&&(h.current.focus(),h.current.style.height=`auto`,h.current.style.height=h.current.scrollHeight+`px`)},[l]);let _=(0,y.useCallback)(()=>{f(e.content),u(!0)},[e.content]),v=(0,y.useCallback)(()=>{u(!1),f(e.content)},[e.content]),b=(0,y.useCallback)(()=>{let e=d.trim();e&&(u(!1),a(t,e))},[d,a,t]),x=(0,y.useCallback)(e=>{e.key===`Escape`&&v(),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),b())},[v,b]);return l?(0,k.jsx)(`div`,{className:`flex justify-end`,children:(0,k.jsxs)(`div`,{className:`w-full max-w-[80%] flex flex-col gap-2`,children:[(0,k.jsx)(`textarea`,{ref:h,value:d,onChange:e=>{f(e.target.value),e.target.style.height=`auto`,e.target.style.height=e.target.scrollHeight+`px`},onKeyDown:x,className:`w-full rounded-xl border border-[#0A32351a] bg-white px-4 py-3 text-sm text-[#0A3235] placeholder-[#0A323580] focus:border-[#105257] focus:outline-none focus:ring-1 focus:ring-[#105257] resize-none shadow-sm`,rows:1}),(0,k.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,k.jsxs)(`button`,{onClick:v,className:`flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[#0A323580] hover:text-[#0A3235] border border-[#0A32351a] hover:bg-[#0A32350d] transition-colors cursor-pointer`,children:[(0,k.jsx)(fe,{className:`h-3 w-3`}),`Cancel`]}),(0,k.jsxs)(`button`,{onClick:b,disabled:!d.trim(),className:`flex items-center gap-1.5 rounded-lg bg-[#0A3235] px-3 py-1.5 text-xs font-medium text-[#FAF2E9] hover:bg-[#105257] disabled:opacity-40 transition-colors cursor-pointer`,children:[(0,k.jsx)(re,{className:`h-3 w-3`}),`Update`]})]})]})}):(0,k.jsxs)(`div`,{className:`group flex items-start gap-2 ${s?`justify-end`:`justify-start`}`,children:[s&&!i&&(0,k.jsx)(`button`,{onClick:_,className:`mt-3 opacity-0 group-hover:opacity-100 transition-opacity text-[#0A323580] hover:text-[#0A3235] cursor-pointer`,title:`Edit message`,children:(0,k.jsx)(se,{className:`h-3.5 w-3.5`})}),(0,k.jsxs)(`div`,{className:`max-w-[80%] rounded-2xl px-4 py-3 text-sm leading-relaxed ${s?`bg-[#0A3235] text-[#FAF2E9] rounded-br-md whitespace-pre-wrap`:`bg-white text-[#0A3235] rounded-bl-md border border-[#0A32351a] shadow-sm`}`,children:[!s&&e.reasoning&&(0,k.jsx)(Ok,{reasoning:e.reasoning,isThinking:c,thinkingSeconds:r??0}),e.content?s?e.content:(0,k.jsx)(RS,{plugins:{math:kk},parseIncompleteMarkdown:!1,isAnimating:n,children:Nk(e.content)}):!s&&!n?(0,k.jsx)(`p`,{className:`italic text-[#0A323580]`,children:`No response`}):null]}),!s&&!n&&!i&&(0,k.jsxs)(`div`,{className:`mt-3 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:[e.content&&(0,k.jsx)(`button`,{onClick:g,className:`rounded-md p-1 text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-colors cursor-pointer`,title:`Copy response`,children:p?(0,k.jsx)(ae,{className:`h-3.5 w-3.5`}):(0,k.jsx)(O,{className:`h-3.5 w-3.5`})}),(0,k.jsx)(`button`,{onClick:()=>o(t),className:`rounded-md p-1 text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-colors cursor-pointer`,title:`Retry`,children:(0,k.jsx)(le,{className:`h-3.5 w-3.5`})})]})]})}function Fk(){let{status:e,tps:t,isGenerating:n}=Ce();return e.state===`loading`?(0,k.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-12 text-[#0A323580]`,children:[(0,k.jsx)(oe,{className:`h-8 w-8 animate-spin text-[#F0529C]`}),(0,k.jsx)(`p`,{className:`text-sm`,children:e.message??`Loading model…`}),e.progress!=null&&(0,k.jsx)(`div`,{className:`w-64 h-2 bg-[#0A32351a] rounded-full overflow-hidden`,children:(0,k.jsx)(`div`,{className:`h-full bg-[#F0529C]`,style:{width:`${e.progress}%`}})})]}):e.state===`error`?(0,k.jsxs)(`div`,{className:`py-12 text-center text-sm text-red-600`,children:[`Error loading model: `,e.error]}):n&&t>0?(0,k.jsxs)(`div`,{className:`text-center text-xs text-[#0A323580] py-1`,children:[t,` tokens/s`]}):null}var Ik=[{label:`Solve x² + x - 12 = 0`,prompt:`Solve x^2 + x - 12 = 0`},{label:`Explain quantum computing`,prompt:`Explain quantum computing in simple terms. What makes it different from classical computing, and what are some real-world applications?`},{label:`Write a Python quicksort`,prompt:`Write a clean, well-commented Python implementation of the quicksort algorithm. Include an example of how to use it.`},{label:`Solve a logic puzzle`,prompt:`Five people were eating apples, A finished before B, but behind C. D finished before E, but behind B. What was the finishing order?`}];function Lk({showDisclaimer:e,animated:t}){let{send:n,stop:r,status:i,isGenerating:a}=Ce(),o=i.state===`ready`,[s,c]=(0,y.useState)(``),l=(0,y.useRef)(null),u=(0,y.useCallback)(e=>{e?.preventDefault();let t=s.trim();!t||!o||a||(c(``),l.current&&(l.current.style.height=`7.5rem`),n(t))},[s,o,a,n]),d=(0,y.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),u())},[u]);return(0,k.jsxs)(`div`,{className:`w-full ${t?`animate-rise-in-delayed`:``}`,children:[(0,k.jsx)(`form`,{onSubmit:u,className:`mx-auto max-w-3xl`,children:(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(`textarea`,{ref:l,className:`w-full rounded-xl border border-[#0A32351a] bg-white px-4 py-3 pb-11 text-[15px] text-[#0A3235] placeholder-[#0A323580] focus:border-[#105257] focus:outline-none focus:ring-1 focus:ring-[#105257] disabled:opacity-50 resize-none max-h-40 shadow-sm`,style:{minHeight:`7.5rem`,height:`7.5rem`},placeholder:o?`Type a message…`:`Loading model…`,value:s,onChange:e=>{c(e.target.value),e.target.style.height=`7.5rem`,e.target.style.height=Math.max(e.target.scrollHeight,120)+`px`},onKeyDown:d,disabled:!o,autoFocus:!0}),(0,k.jsx)(`div`,{className:`absolute bottom-2 left-2 right-2 flex items-center justify-end pb-3 px-2`,children:a?(0,k.jsx)(`button`,{type:`button`,onClick:r,className:`flex items-center justify-center rounded-lg text-[#0A323580] hover:text-[#0A3235] transition-colors cursor-pointer`,title:`Stop generating`,children:(0,k.jsx)(de,{className:`h-4 w-4 fill-current`})}):(0,k.jsx)(`button`,{type:`submit`,disabled:!o||!s.trim(),className:`flex items-center justify-center rounded-lg text-[#0A323580] hover:text-[#0A3235] disabled:opacity-30 transition-colors cursor-pointer`,title:`Send message`,children:(0,k.jsx)(ue,{className:`h-4 w-4`})})})]})}),e&&(0,k.jsx)(`p`,{className:`mx-auto max-w-3xl mt-1 text-center text-xs text-[#0A323580]`,children:`No chats are sent to a server. Everything runs locally in your browser. AI can make mistakes. Check important info.`})]})}function Rk({onGoHome:e}){let{messages:t,isGenerating:n,send:r,status:i,clearChat:a}=Ce(),o=(0,y.useRef)(null),[s,c]=(0,y.useState)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(new Map),d=(0,y.useRef)(!1),f=(0,y.useRef)(t),p=(0,y.useRef)(s);f.current=t,p.current=s;let m=i.state===`ready`,h=t.length>0,g=m&&h&&!n;(0,y.useEffect)(()=>{let e=o.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[t]),(0,y.useEffect)(()=>{if(d.current&&!n){let e=f.current.at(-1);e?.role===`assistant`&&e.reasoning&&p.current>0&&u.current.set(e.id,p.current)}d.current=n},[n]),(0,y.useEffect)(()=>{if(!n){l.current=null;return}l.current=Date.now(),c(0);let e=setInterval(()=>{l.current&&c(Math.round((Date.now()-l.current)/1e3))},500);return()=>clearInterval(e)},[n]);let _=t.at(-1);return(0,y.useEffect)(()=>{n&&_?.role===`assistant`&&_.content&&(l.current=null)},[n,_?.role,_?.content]),(0,k.jsxs)(`div`,{className:`flex h-full flex-col brand-surface text-[#0A3235]`,children:[(0,k.jsxs)(`header`,{className:`flex-none flex items-center justify-between border-b border-[#0A32351a] px-6 py-3 h-14`,children:[(0,k.jsx)(`button`,{onClick:e,className:`cursor-pointer transition-transform duration-300 hover:scale-[1.02]`,title:`Back to home`,children:(0,k.jsx)(`img`,{src:`/ai2.svg`,alt:`AI2`,className:`h-6 w-auto`,draggable:!1})}),(0,k.jsxs)(`button`,{onClick:a,className:`flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-opacity duration-300 cursor-pointer ${g?`opacity-100`:`opacity-0 pointer-events-none`}`,title:`New chat`,children:[(0,k.jsx)(ce,{className:`h-3.5 w-3.5`}),`New chat`]})]}),h?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`main`,{ref:o,className:`min-h-0 flex-1 overflow-y-auto px-4 py-6 animate-fade-in`,children:(0,k.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col gap-4`,children:[!m&&(0,k.jsx)(Fk,{}),t.map((e,r)=>{let i=r===t.length-1&&e.role===`assistant`;return(0,k.jsx)(Pk,{msg:e,index:r,isStreaming:n&&i,thinkingSeconds:i?s:u.current.get(e.id),isGenerating:n},e.id)})]})}),(0,k.jsxs)(`footer`,{className:`flex-none px-4 py-3 animate-fade-in relative`,children:[m&&(0,k.jsx)(`div`,{className:`absolute bottom-full left-0 right-0 flex justify-center pointer-events-none mb-[-8px]`,children:(0,k.jsx)(`div`,{className:`pointer-events-auto`,children:(0,k.jsx)(Fk,{})})}),(0,k.jsx)(Lk,{showDisclaimer:!0,animated:!0})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center px-4`,children:[(0,k.jsx)(`div`,{className:`mb-8 text-center animate-rise-in`,children:(0,k.jsx)(`p`,{className:`text-3xl font-medium text-[#0A3235]`,children:`What can I help you with?`})}),(0,k.jsx)(Lk,{showDisclaimer:!1,animated:!0}),(0,k.jsx)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2 max-w-3xl animate-rise-in-delayed`,children:Ik.map(({label:e,prompt:t})=>(0,k.jsx)(`button`,{onClick:()=>r(t),className:`rounded-lg border border-[#0A32351a] bg-white px-3 py-2 text-xs text-[#0A323580] hover:text-[#0A3235] hover:border-[#105257] transition-colors cursor-pointer shadow-sm`,children:e},e))})]})]})}function zk(){let{status:e,loadModel:t,selectedModel:n,setSelectedModel:r,loadedModelId:i}=Ce(),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=e.state===`ready`&&i===n.id,u=a&&!l&&e.state!==`error`;return(0,y.useEffect)(()=>{l&&a&&c(!0)},[l,a]),(0,k.jsxs)(`div`,{className:`relative h-screen w-screen bg-[#0A3235]`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 z-10 transition-opacity duration-700 ${a?`opacity-0 pointer-events-none`:`opacity-100`}`,children:(0,k.jsx)(Se,{onStart:()=>{o(!0),t()},isLoading:u,showChat:s,selectedModel:n,onSelectModel:r,loadedModelId:i})}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-10 transition-opacity duration-700 ${s?`opacity-100`:`opacity-0 pointer-events-none`}`,children:a&&(0,k.jsx)(Rk,{onGoHome:()=>{c(!1),setTimeout(()=>o(!1),700)}})}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center transition-opacity duration-700 bg-[#0A3235] ${u?`opacity-100`:`opacity-0 pointer-events-none`}`,children:(0,k.jsxs)(`div`,{className:`flex w-full max-w-md flex-col items-center px-6 transition-all duration-700 ${u?`opacity-100 translate-y-0`:`opacity-0 translate-y-4`}`,children:[(0,k.jsx)(`img`,{src:`/ai2.svg`,alt:`AI2`,className:`mb-8 h-9 w-auto`,draggable:!1}),(0,k.jsx)(oe,{className:`h-10 w-10 animate-spin text-[#F0529C]`}),(0,k.jsx)(`p`,{className:`mt-4 text-sm tracking-wide text-[#FAF2E9b3]`,children:e.state===`loading`?e.message??`Loading model…`:e.state===`error`?`Error`:`Initializing…`}),(0,k.jsx)(`div`,{className:`mt-4 h-1.5 w-full rounded-full bg-[#FAF2E91a] overflow-hidden`,children:(0,k.jsx)(`div`,{className:`h-full rounded-full bg-[linear-gradient(90deg,#105257_0%,#F0529C_60%,#B11BE8_100%)] transition-[width] ease-out`,style:{width:`${e.state===`ready`?100:e.state===`loading`&&e.progress!=null?e.progress:0}%`}})}),e.state===`error`&&(0,k.jsx)(`p`,{className:`mt-3 text-sm text-red-400`,children:e.error})]})})]})}var Bk=s({InferenceSession:()=>VA,TRACE:()=>MA,TRACE_EVENT_BEGIN:()=>IA,TRACE_EVENT_END:()=>LA,TRACE_FUNC_BEGIN:()=>PA,TRACE_FUNC_END:()=>FA,Tensor:()=>AA,default:()=>vN,env:()=>cA,registerBackend:()=>Qk}),Vk=Object.defineProperty,Hk=Object.getOwnPropertyDescriptor,Uk=Object.getOwnPropertyNames,Wk=Object.prototype.hasOwnProperty,Gk=(e=>typeof u<`u`?u:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof u<`u`?u:e)[t]}):e)(function(e){if(typeof u<`u`)return u.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),Kk=(e,t)=>()=>(e&&(t=e(e=0)),t),qk=(e,t)=>{for(var n in t)Vk(e,n,{get:t[n],enumerable:!0})},Jk=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Uk(t))!Wk.call(e,i)&&i!==n&&Vk(e,i,{get:()=>t[i],enumerable:!(r=Hk(t,i))||r.enumerable});return e},Yk=e=>Jk(Vk({},`__esModule`,{value:!0}),e),Xk,Zk,Qk,$k,eA,tA=Kk(()=>{Xk=new Map,Zk=[],Qk=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let r=Xk.get(e);if(r===void 0)Xk.set(e,{backend:t,priority:n});else{if(r.priority>n)return;if(r.priority===n&&r.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`)}if(n>=0){let t=Zk.indexOf(e);t!==-1&&Zk.splice(t,1);for(let t=0;t{let t=Xk.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},eA=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?Zk:n,i,a=[],o=new Set;for(let e of r){let t=await $k(e);typeof t==`string`?a.push({name:e,err:t}):(i||=t,i===t&&o.add(e))}if(!i)throw Error(`no available backend found. ERR: ${a.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of a)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let s=t.filter(e=>o.has(typeof e==`string`?e:e.name));return[i,new Proxy(e,{get:(e,t)=>t===`executionProviders`?s:Reflect.get(e,t)})]}}),nA=Kk(()=>{tA()}),rA,iA=Kk(()=>{rA=`1.24.0-dev.20251116-b39e144322`}),aA,oA,sA=Kk(()=>{iA(),aA=`warning`,oA={wasm:{},webgl:{},webgpu:{},versions:{common:rA},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);aA=e}},get logLevel(){return aA}},Object.defineProperty(oA,`logLevel`,{enumerable:!0})}),cA,lA=Kk(()=>{sA(),cA=oA}),uA,dA,fA=Kk(()=>{uA=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t!==void 0&&t.format!==void 0?t.format:`RGB`,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t {kA(),pA=(e,t)=>{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:`RGB`,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,pA(o,s)}else throw Error(`Can not access image data`)}else{if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(pA(e.data,s))}});throw Error(`Input data provided is not supported - aborted tensor creation`)}if(o!==void 0)return pA(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},hA=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new OA({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},gA=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new OA({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_A=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new OA({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},vA=(e,t,n)=>new OA({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]})}),bA,xA,SA,CA,wA=Kk(()=>{bA=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),xA=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]),SA=!1,CA=()=>{if(!SA){SA=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=typeof n<`u`&&n.from;e&&(bA.set(`int64`,BigInt64Array),xA.set(BigInt64Array,`int64`)),t&&(bA.set(`uint64`,BigUint64Array),xA.set(BigUint64Array,`uint64`)),r?(bA.set(`float16`,n),xA.set(n,`float16`)):bA.set(`float16`,Uint16Array)}}}),TA,EA,DA=Kk(()=>{kA(),TA=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new OA(e.type,e.data,t);case`cpu-pinned`:return new OA({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new OA({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new OA({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new OA({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}}}),OA,kA=Kk(()=>{fA(),yA(),wA(),DA(),OA=class{constructor(e,t,n){CA();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=bA.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=bA.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=xA.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=TA(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return mA(e,t)}static fromTexture(e,t){return hA(e,t)}static fromGpuBuffer(e,t){return gA(e,t)}static fromMLTensor(e,t){return _A(e,t)}static fromPinnedBuffer(e,t,n){return vA(e,t,n)}toDataURL(e){return uA(this,e)}toImageData(e){return dA(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return EA(this,e)}}}),AA,jA=Kk(()=>{kA(),AA=OA}),MA,NA,PA,FA,IA,LA,RA=Kk(()=>{sA(),MA=(e,t)=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.timeStamp(`${e}::ORT::${t}`)},NA=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||NA(`BEGIN`,e)},FA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||NA(`END`,e)},IA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.time(`ORT::${e}`)},LA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.timeEnd(`ORT::${e}`)}}),zA,BA=Kk(()=>{tA(),jA(),RA(),zA=class e{constructor(e){this.handler=e}async run(e,t,n){PA(),IA(`InferenceSession.run`);let r={},i={};if(typeof e!=`object`||!e||e instanceof AA||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof AA)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof AA)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else i=t}}else if(typeof t<`u`)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(typeof e[t]>`u`)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof AA?s[e]=t:s[e]=new AA(t.type,t.data,t.dims)}return LA(`InferenceSession.run`),FA(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){PA(),IA(`InferenceSession.create`);let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(typeof i<`u`)throw TypeError(`'options' must be an object.`)}else if(typeof r<`u`)throw TypeError(`'byteLength' must be a number.`)}else if(typeof n<`u`)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[s,c]=await eA(o),l=await s.createInferenceSessionHandler(a,c);return LA(`InferenceSession.create`),FA(),new e(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}}),VA,HA=Kk(()=>{BA(),VA=zA}),UA=Kk(()=>{}),WA=Kk(()=>{}),GA=Kk(()=>{}),KA=Kk(()=>{}),qA={};qk(qA,{InferenceSession:()=>VA,TRACE:()=>MA,TRACE_EVENT_BEGIN:()=>IA,TRACE_EVENT_END:()=>LA,TRACE_FUNC_BEGIN:()=>PA,TRACE_FUNC_END:()=>FA,Tensor:()=>AA,env:()=>cA,registerBackend:()=>Qk});var JA=Kk(()=>{nA(),lA(),HA(),jA(),UA(),WA(),RA(),GA(),KA()}),YA=Kk(()=>{}),XA={};qk(XA,{default:()=>$A});var ZA,QA,$A,ej=Kk(()=>{HM(),Aj(),bj(),ZA=`ort-wasm-proxy-worker`,QA=globalThis.self?.name===ZA,QA&&(self.onmessage=e=>{let{type:t,in:n}=e.data;try{switch(t){case`init-wasm`:Oj(n.wasm).then(()=>{AM(n).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})})},e=>{postMessage({type:t,err:e})});break;case`init-ep`:{let{epName:e,env:r}=n;jM(r,e).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})});break}case`copy-from`:{let{buffer:e}=n,r=FM(e);postMessage({type:t,out:r});break}case`create`:{let{model:e,options:r}=n;IM(e,r).then(e=>{postMessage({type:t,out:e})},e=>{postMessage({type:t,err:e})});break}case`release`:LM(n),postMessage({type:t});break;case`run`:{let{sessionId:e,inputIndices:r,inputs:i,outputIndices:a,options:o}=n;zM(e,r,i,a,Array(a.length).fill(null),o).then(e=>{e.some(e=>e[3]!==`cpu`)?postMessage({type:t,err:`Proxy does not support non-cpu tensor location.`}):postMessage({type:t,out:e},VM([...i,...e]))},e=>{postMessage({type:t,err:e})});break}case`end-profiling`:BM(n),postMessage({type:t});break;default:}}catch(e){postMessage({type:t,err:e})}}),$A=QA?null:e=>new Worker(e??lj,{type:`module`,name:ZA})}),tj={};qk(tj,{default:()=>rj});async function nj(e={}){var t=e,n=!!globalThis.window,r=!!globalThis.WorkerGlobalScope,i=r&&self.name?.startsWith(`em-pthread`);t.mountExternalData=(e,n)=>{e.startsWith(`./`)&&(e=e.substring(2)),(t.Uc||=new Map).set(e,n)},t.unmountExternalData=()=>{delete t.Uc},globalThis.SharedArrayBuffer??new WebAssembly.Memory({initial:0,maximum:0,Be:!0}).buffer.constructor;let a=()=>{let e=e=>(...t)=>{let n=ln;return t=e(...t),ln==n?t:new Promise((e,t)=>{gn={resolve:e,reject:t}})};(()=>{for(let n of[`_OrtAppendExecutionProvider`,`_OrtCreateSession`,`_OrtRun`,`_OrtRunWithBinding`,`_OrtBindInput`])t[n]=e(t[n])})(),typeof jsepRunAsync<`u`&&(t._OrtRun=jsepRunAsync(t._OrtRun),t._OrtRunWithBinding=jsepRunAsync(t._OrtRunWithBinding)),a=void 0};t.asyncInit=()=>{a?.()};var o,s,c=(e,t)=>{throw t},l=import.meta.url,u=``;if(n||r){try{u=new URL(`.`,l).href}catch{}r&&(s=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),o=async e=>{if(ee(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var d,f,p,m,h,g,_=console.log.bind(console),v=console.error.bind(console),y=_,b=v,x=!1,ee=e=>e.startsWith(`file://`);function S(){je.buffer!=w.buffer&&ce()}if(i){let e=function(n){try{var r=n.data,i=r.Oc;if(i===`load`){let n=[];self.onmessage=e=>n.push(e),g=()=>{postMessage({Oc:`loaded`});for(let t of n)e(t);self.onmessage=e};for(let e of r.de)t[e]&&!t[e].proxy||(t[e]=(...t)=>{postMessage({Oc:`callHandler`,ce:e,args:t})},e==`print`&&(y=t[e]),e==`printErr`&&(b=t[e]));je=r.je,ce(),f=r.ke,fe(),Lo()}else if(i===`run`){(function(e){var t=(S(),D)[e+52>>>2>>>0];e=(S(),D)[e+56>>>2>>>0],ta(t,t-e),na(t)})(r.Nc),Gi(r.Nc,0,0,1,0,0),Oe(),Zt(r.Nc),C||=(Si(),!0);try{Me(r.he,r.Wc)}catch(e){if(e!=`unwind`)throw e}}else r.target!==`setimmediate`&&(i===`checkMailbox`?C&&Qt():i&&(b(`worker: received unknown command ${i}`),b(r)))}catch(e){throw Ki(),e}};var C=!1;self.onunhandledrejection=e=>{throw e.reason||e},self.onmessage=e}var w,T,te,ne,E,D,re,ie,ae,O,oe,se=!1;function ce(){var e=je.buffer;t.HEAP8=w=new Int8Array(e),te=new Int16Array(e),t.HEAPU8=T=new Uint8Array(e),ne=new Uint16Array(e),t.HEAP32=E=new Int32Array(e),t.HEAPU32=D=new Uint32Array(e),re=new Float32Array(e),ie=new Float64Array(e),ae=new BigInt64Array(e),O=new BigUint64Array(e)}function le(){se=!0,i?g():Xa._b()}function ue(e){throw b(e=`Aborted(`+e+`)`),x=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),h?.(e),e}function de(){return{a:{f:Ie,J:Re,k:Ue,p:We,l:Ge,ta:Ke,b:qe,ca:Je,Ka:Xe,s:Ze,da:nt,_a:rt,Ga:it,Ia:at,$a:ot,Ya:st,Ra:ct,Xa:lt,pa:ut,Ha:A,Yb:dt,Za:ft,Fa:pt,eb:mt,Da:St,Tb:Ct,Rb:jt,Ca:Nt,M:Pt,H:Ft,Sb:Rt,ka:Kt,Ub:qt,Ua:Jt,Wb:$t,La:tn,Pb:nn,la:rn,Ta:Zt,bb:an,U:yn,n:En,c:Et,sb:Dn,w:On,L:j,z:kn,j:An,o:jn,tb:Mn,G:Nn,T:Pn,g:M,u:Fn,m:In,i:Ln,Oa:Rn,Pa:Hn,Qa:Un,Ma:Wn,Na:Gn,Qb:Jn,fb:Yn,db:Qn,Y:er,rb:P,ma:F,cb:Xn,gb:tr,ab:nr,Xb:I,N:qn,hb:rr,X:ir,Vb:L,ob:Er,C:Dr,sa:Or,ra:kr,qb:Ar,W:jr,v:Mr,nb:Nr,mb:Pr,lb:Fr,pb:Ir,kb:Lr,jb:Rr,ib:zr,Va:Ur,Wa:Wr,Ja:Se,ea:Gr,oa:Kr,Sa:qr,na:Yr,Db:Fo,xa:Do,Eb:Po,ya:Eo,F:go,e:no,r:eo,x:$a,D:po,Ib:Co,ba:xo,B:io,za:wo,$:Oo,ha:So,Fb:Mo,Gb:jo,Ba:_o,Aa:bo,Jb:vo,wa:No,aa:To,d:ro,A:ao,q:to,Cb:Io,t:so,y:mo,I:oo,E:co,K:ho,S:ko,ja:fo,_:Ao,Kb:uo,Lb:lo,P:yo,h:Xr,a:je,Ob:be,Hb:Zr,ia:Qr,O:$r,qa:ei,Mb:ti,Q:ni,zb:ri,Ab:ii,ua:ai,fa:oi,R:si,Ea:R,va:ci,Z:li,xb:ui,Zb:di,V:fi,Bb:pi,ub:mi,vb:gi,wb:_i,ga:vi,yb:yi,Nb:bi}}}async function fe(){function e(e,n){var r=Xa=e.exports;e={};for(let[t,n]of Object.entries(r))typeof n==`function`?(r=sn(n),e[t]=r):e[t]=n;return Xa=e,Xa=function(){var e=Xa,t=e=>t=>e(t)>>>0,n=e=>()=>e()>>>0;return(e=Object.assign({},e)).$b=t(e.$b),e.Cc=n(e.Cc),e.Ec=t(e.Ec),e.rd=(e=>(t,n)=>e(t,n)>>>0)(e.rd),e.wd=t(e.wd),e.xd=n(e.xd),e.Bd=t(e.Bd),e}(),Te.push(Xa.id),xi=(e=Xa).$b,Si=e.ac,t._OrtInit=e.bc,t._OrtGetLastError=e.cc,t._OrtCreateSessionOptions=e.dc,t._OrtAppendExecutionProvider=e.ec,t._OrtAddFreeDimensionOverride=e.fc,t._OrtAddSessionConfigEntry=e.gc,t._OrtReleaseSessionOptions=e.hc,t._OrtCreateSession=e.ic,t._OrtReleaseSession=e.jc,t._OrtGetInputOutputCount=e.kc,t._OrtGetInputOutputMetadata=e.lc,t._OrtFree=e.mc,t._OrtCreateTensor=e.nc,t._OrtGetTensorData=e.oc,t._OrtReleaseTensor=e.pc,t._OrtCreateRunOptions=e.qc,t._OrtAddRunConfigEntry=e.rc,t._OrtReleaseRunOptions=e.sc,t._OrtCreateBinding=e.tc,t._OrtBindInput=e.uc,t._OrtBindOutput=e.vc,t._OrtClearBoundOutputs=e.wc,t._OrtReleaseBinding=e.xc,t._OrtRunWithBinding=e.yc,t._OrtRun=e.zc,t._OrtEndProfiling=e.Ac,Ci=t._OrtGetWebGpuDevice=e.Bc,wi=e.Cc,Ti=t._free=e.Dc,Ei=t._malloc=e.Ec,Di=t._wgpuBufferRelease=e.Fc,Oi=t._wgpuCreateInstance=e.Gc,ki=e.Hc,Ai=e.Ic,ji=e.Jc,Mi=e.Kc,Ni=e.Lc,Pi=e.Pc,Fi=e.Zc,Ii=e._c,Li=e.$c,Ri=e.bd,zi=e.cd,Bi=e.dd,Vi=e.ed,Hi=e.fd,Ui=e.gd,Wi=e.hd,Gi=e.kd,Ki=e.ld,qi=e.md,Ji=e.nd,Yi=e.od,Xi=e.pd,Zi=e.qd,Qi=e.rd,$i=e.sd,ea=e.td,ta=e.ud,na=e.vd,ra=e.wd,ia=e.xd,aa=e.yd,oa=e.zd,sa=e.Ad,ca=e.Bd,la=e.Cd,ua=e.Dd,da=e.Ed,fa=e.Fd,pa=e.Gd,ma=e.Hd,ha=e.Id,ga=e.Jd,_a=e.Kd,va=e.Ld,ya=e.Md,ba=e.Nd,xa=e.Od,Sa=e.Pd,Ca=e.Qd,wa=e.Rd,Ta=e.Td,Ea=e.Ud,Da=e.Vd,Oa=e.Wd,ka=e.Yd,Aa=e.Zd,ja=e._d,Ma=e.$d,Na=e.ae,Pa=e.be,Fa=e.pe,Ia=e.qe,La=e.re,Ra=e.se,za=e.te,Ba=e.ue,Va=e.ve,Ha=e.we,Ua=e.xe,Wa=e.ye,Ga=e.ze,Ka=e.Xe,qa=e.Ye,Ja=e.Ze,Ya=e._e,f=n,Xa}var n,r=de();return t.instantiateWasm?new Promise(n=>{t.instantiateWasm(r,(t,r)=>{n(e(t,r))})}):i?e(new WebAssembly.Instance(f,de()),f):(oe??=t.locateFile?t.locateFile?t.locateFile(`ort-wasm-simd-threaded.asyncify.wasm`,u):u+`ort-wasm-simd-threaded.asyncify.wasm`:new URL(`/assets/ort-wasm-simd-threaded.asyncify-COni_aV6.wasm`,``+import.meta.url).href,n=await async function(e){var t=oe;if(!d&&!ee(t))try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){b(`wasm streaming compile failed: ${e}`),b(`falling back to ArrayBuffer instantiation`)}return async function(e,t){try{var n=await async function(e){if(!d)try{var t=await o(e);return new Uint8Array(t)}catch{}if(e==oe&&d)e=new Uint8Array(d);else{if(!s)throw`both async and sync fetching of the wasm failed`;e=s(e)}return e}(e);return await WebAssembly.instantiate(n,t)}catch(e){b(`failed to asynchronously prepare wasm: ${e}`),ue(e)}}(t,e)}(r),e(n.instance,n.module))}class pe{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var me=e=>{e.terminate(),e.onmessage=()=>{}},he=[],ge=0,_e=null,ve=e=>{Ce.length==0&&(Ae(),ke(Ce[0]));var t=Ce.pop();if(!t)return 6;we.push(t),Ee[e.Nc]=t,t.Nc=e.Nc;var n={Oc:`run`,he:e.ge,Wc:e.Wc,Nc:e.Nc};return t.postMessage(n,e.Yc),0},ye=0,k=(e,t,...n)=>{var r,i=16*n.length,a=ia(),o=ra(i),s=o>>>3;for(r of n)typeof r==`bigint`?((S(),ae)[s++>>>0]=1n,(S(),ae)[s++>>>0]=r):((S(),ae)[s++>>>0]=0n,(S(),ie)[s++>>>0]=r);return e=qi(e,0,i,o,t),na(a),e};function be(e){if(i)return k(0,1,e);if(p=e,!(0{if(p=e,i)throw xe(e),`unwind`;be(e)},Ce=[],we=[],Te=[],Ee={},De=e=>{var t=e.Nc;delete Ee[t],Ce.push(e),we.splice(we.indexOf(e),1),e.Nc=0,Ji(t)};function Oe(){Te.forEach(e=>e())}var ke=e=>new Promise(n=>{e.onmessage=r=>{var i=r.data;if(r=i.Oc,i.Vc&&i.Vc!=wi()){var a=Ee[i.Vc];a?a.postMessage(i,i.Yc):b(`Internal error! Worker sent a message "${r}" to target pthread ${i.Vc}, but that thread no longer exists!`)}else r===`checkMailbox`?Qt():r===`spawnThread`?ve(i):r===`cleanupThread`?Yt(()=>{De(Ee[i.ie])}):r===`loaded`?(e.loaded=!0,n(e)):i.target===`setimmediate`?e.postMessage(i):r===`uncaughtException`?e.onerror(i.error):r===`callHandler`?t[i.ce](...i.args):r&&b(`worker sent an unknown command ${r}`)},e.onerror=e=>{throw b(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r,i=[];for(r of[])t.propertyIsEnumerable(r)&&i.push(r);e.postMessage({Oc:`load`,de:i,je,ke:f})});function Ae(){var e=new Worker((()=>{let e=URL;return import.meta.url>`file:`&&import.meta.url<`file;`?new e(`ort.webgpu.bundle.min.mjs`,import.meta.url):new URL(import.meta.url)})(),{type:`module`,workerData:`em-pthread`,name:`em-pthread`});Ce.push(e)}var je,Me=(e,t)=>{ye=0,e=ua(e,t),0-9007199254740992>e||9007199254740992>>=0);return(S(),w)[t.Qc+12>>>0]==0&&(ze(t,!0),Pe--),Be(t,!1),Ne.push(t),ca(e)}var Le=0,Re=()=>{$i(0,0);var e=Ne.pop();aa(e.Xc),Le=0};function ze(e,t){t=t?1:0,(S(),w)[e.Qc+12>>>0]=t}function Be(e,t){t=t?1:0,(S(),w)[e.Qc+13>>>0]=t}class Ve{constructor(e){this.Xc=e,this.Qc=e-24}}var He=e=>{var t=Le;if(!t)return ea(0),0;var n=new Ve(t);(S(),D)[n.Qc+16>>>2>>>0]=t;var r=(S(),D)[n.Qc+4>>>2>>>0];if(!r)return ea(0),t;for(var i of e){if(i===0||i===r)break;if(sa(i,r,n.Qc+16))return ea(i),t}return ea(r),t};function Ue(){return He([])}function We(e){return He([e>>>0])}function Ge(e,t,n,r){return He([e>>>0,t>>>0,n>>>0,r>>>0])}var Ke=()=>{var e=Ne.pop();e||ue(`no exception to throw`);var t=e.Xc;throw(S(),w)[e.Qc+13>>>0]==0&&(Ne.push(e),Be(e,!0),ze(e,!1),Pe++),oa(t),Le=t};function qe(e,t,n){var r=new Ve(e>>>=0);throw t>>>=0,n>>>=0,(S(),D)[r.Qc+16>>>2>>>0]=0,(S(),D)[r.Qc+4>>>2>>>0]=t,(S(),D)[r.Qc+8>>>2>>>0]=n,oa(e),Pe++,Le=e}var Je=()=>Pe;function Ye(e,t,n,r){return i?k(2,1,e,t,n,r):Xe(e,t,n,r)}function Xe(e,t,n,r){if(e>>>=0,t>>>=0,n>>>=0,r>>>=0,!globalThis.SharedArrayBuffer)return 6;var a=[];return i&&a.length===0?Ye(e,t,n,r):(e={ge:n,Nc:e,Wc:r,Yc:a},i?(e.Oc=`spawnThread`,postMessage(e,a),0):ve(e))}function Ze(e){throw Le||=e>>>0,Le}var Qe=globalThis.TextDecoder&&new TextDecoder,$e=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},et=(e,t=0,n,r)=>{if(16<(n=$e(e,t>>>=0,n,r))-t&&e.buffer&&Qe)return Qe.decode(e.buffer instanceof ArrayBuffer?e.subarray(t,n):e.slice(t,n));for(r=``;t(i=(240&i)==224?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},tt=(e,t,n)=>(e>>>=0)?et((S(),T),e,t,n):``;function nt(e,t,n){return i?k(3,1,e,t,n):0}function rt(e,t){if(i)return k(4,1,e,t)}function it(e,t){if(i)return k(5,1,e,t)}function at(e,t,n){if(i)return k(6,1,e,t,n)}function ot(e,t,n){return i?k(7,1,e,t,n):0}function st(e,t){if(i)return k(8,1,e,t)}function ct(e,t,n){if(i)return k(9,1,e,t,n)}function lt(e,t,n,r){if(i)return k(10,1,e,t,n,r)}function ut(e,t,n,r){if(i)return k(11,1,e,t,n,r)}function A(e,t,n,r){if(i)return k(12,1,e,t,n,r)}function dt(e){if(i)return k(13,1,e)}function ft(e,t){if(i)return k(14,1,e,t)}function pt(e,t,n){if(i)return k(15,1,e,t,n)}var mt=()=>ue(``),ht=e=>{e>>>=0;for(var t=``;;){var n=(S(),T)[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},gt={},_t={},vt={},yt=class extends Error{constructor(e){super(e),this.name=`BindingError`}};function bt(e,t,n={}){return function(e,t,n={}){var r=t.name;if(!e)throw new yt(`type "${r}" must have a positive integer typeid pointer`);if(_t.hasOwnProperty(e)){if(n.ee)return;throw new yt(`Cannot register type '${r}' twice`)}_t[e]=t,delete vt[e],gt.hasOwnProperty(e)&&(t=gt[e],delete gt[e],t.forEach(e=>e()))}(e,t,n)}var xt=(e,t,n)=>{switch(t){case 1:return n?e=>(S(),w)[e>>>0]:e=>(S(),T)[e>>>0];case 2:return n?e=>(S(),te)[e>>>1>>>0]:e=>(S(),ne)[e>>>1>>>0];case 4:return n?e=>(S(),E)[e>>>2>>>0]:e=>(S(),D)[e>>>2>>>0];case 8:return n?e=>(S(),ae)[e>>>3>>>0]:e=>(S(),O)[e>>>3>>>0];default:throw TypeError(`invalid integer width (${t}): ${e}`)}};function St(e,t,n,r,i){e>>>=0,n>>>=0,t=ht(t>>>0);let a=e=>e;if(r=r===0n){let e=8*n;a=t=>BigInt.asUintN(e,t),i=a(i)}bt(e,{name:t,Mc:a,Sc:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),Rc:xt(t,n,!r),Tc:null})}function Ct(e,t,n,r){bt(e>>>=0,{name:t=ht(t>>>0),Mc:function(e){return!!e},Sc:function(e,t){return t?n:r},Rc:function(e){return this.Mc((S(),T)[e>>>0])},Tc:null})}var wt=[],Tt=[0,1,,1,null,1,!0,1,!1,1];function Et(e){9<(e>>>=0)&&--Tt[e+1]==0&&(Tt[e]=void 0,wt.push(e))}var Dt=e=>{if(!e)throw new yt(`Cannot use deleted val. handle = ${e}`);return Tt[e]},Ot=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=wt.pop()||Tt.length;return Tt[t]=e,Tt[t+1]=1,t}};function kt(e){return this.Mc((S(),D)[e>>>2>>>0])}var At={name:`emscripten::val`,Mc:e=>{var t=Dt(e);return Et(e),t},Sc:(e,t)=>Ot(t),Rc:kt,Tc:null};function jt(e){return bt(e>>>0,At)}var Mt=(e,t)=>{switch(t){case 4:return function(e){return this.Mc((S(),re)[e>>>2>>>0])};case 8:return function(e){return this.Mc((S(),ie)[e>>>3>>>0])};default:throw TypeError(`invalid float width (${t}): ${e}`)}};function Nt(e,t,n){n>>>=0,bt(e>>>=0,{name:t=ht(t>>>0),Mc:e=>e,Sc:(e,t)=>t,Rc:Mt(t,n),Tc:null})}function Pt(e,t,n,r,i){e>>>=0,n>>>=0,t=ht(t>>>0);let a=e=>e;if(r===0){var o=32-8*n;a=e=>e<>>o,i=a(i)}bt(e,{name:t,Mc:a,Sc:(e,t)=>t,Rc:xt(t,n,r!==0),Tc:null})}function Ft(e,t,n){function r(e){var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],new i((S(),w).buffer,e,t)}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];bt(e>>>=0,{name:n=ht(n>>>0),Mc:r,Rc:r},{ee:!0})}var It=(e,t,n)=>{var r=(S(),T);if(t>>>=0,0=o){if(t>=n)break;r[t++>>>0]=o}else if(2047>=o){if(t+1>=n)break;r[t++>>>0]=192|o>>6,r[t++>>>0]=128|63&o}else if(65535>=o){if(t+2>=n)break;r[t++>>>0]=224|o>>12,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o}else{if(t+3>=n)break;r[t++>>>0]=240|o>>18,r[t++>>>0]=128|o>>12&63,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o,a++}}r[t>>>0]=0,e=t-i}else e=0;return e},Lt=e=>{for(var t=0,n=0;n=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t};function Rt(e,t){bt(e>>>=0,{name:t=ht(t>>>0),Mc(e){var t=(S(),D)[e>>>2>>>0];return t=tt(e+4,t,!0),Ti(e),t},Sc(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n=typeof t==`string`;if(!(n||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1))throw new yt(`Cannot pass non-string to std::string`);var r=n?Lt(t):t.length,i=Ei(4+r+1),a=i+4;return(S(),D)[i>>>2>>>0]=r,n?It(t,a,r+1):(S(),T).set(t,a>>>0),e!==null&&e.push(Ti,i),i},Rc:kt,Tc(e){Ti(e)}})}var zt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Bt=(e,t,n)=>{if(e>>>=1,16<(t=$e((S(),ne),e,t/2,n))-e&&zt)return zt.decode((S(),ne).slice(e,t));for(n=``;e>>0];n+=String.fromCharCode(r)}return n},Vt=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i>>1>>>0]=a,t+=2}return(S(),te)[t>>>1>>>0]=0,t-r},Ht=e=>2*e.length,Ut=(e,t,n)=>{var r=``;e>>>=2;for(var i=0;!(i>=t/4);i++){var a=(S(),D)[e+i>>>0];if(!a&&!n)break;r+=String.fromCodePoint(a)}return r},Wt=(e,t,n)=>{if(t>>>=0,n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i>>2>>>0]=a,(t+=4)+4>n)break}return(S(),E)[t>>>2>>>0]=0,t-r},Gt=e=>{for(var t=0,n=0;n>>=0,t>>>=0,n=ht(n>>>=0),t===2)var r=Bt,i=Vt,a=Ht;else r=Ut,i=Wt,a=Gt;bt(e,{name:n,Mc:e=>{var n=(S(),D)[e>>>2>>>0];return n=r(e+4,n*t,!0),Ti(e),n},Sc:(e,r)=>{if(typeof r!=`string`)throw new yt(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Ei(4+o+t);return(S(),D)[s>>>2>>>0]=o/t,i(r,s+4,o+t),e!==null&&e.push(Ti,s),s},Rc:kt,Tc(e){Ti(e)}})}function qt(e,t){bt(e>>>=0,{fe:!0,name:t=ht(t>>>0),Mc:()=>{},Sc:()=>{}})}function Jt(e){Gi(e>>>0,!r,1,!n,131072,!1),Oe()}var Yt=e=>{if(!x)try{if(e(),!(0Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]);function Zt(e){e>>>=0,Xt||(Atomics.waitAsync((S(),E),e>>>2,e).value.then(Qt),e+=128,Atomics.store((S(),E),e>>>2,1))}var Qt=()=>Yt(()=>{var e=wi();e&&(Zt(e),Zi())});function $t(e,t){(e>>>=0)==t>>>0?setTimeout(Qt):i?postMessage({Vc:e,Oc:`checkMailbox`}):(e=Ee[e])&&e.postMessage({Oc:`checkMailbox`})}var en=[];function tn(e,t,n,r,i){for(t>>>=0,i>>>=0,en.length=0,n=i>>>3,r=i+r>>>3;n>>0]?(S(),ae)[n++>>>0]:(S(),ie)[n++>>>0];en.push(a)}return(t?Qa[t]:Za[e])(...en)}var nn=()=>{ye=0};function rn(e){e>>>=0,i?postMessage({Oc:`cleanupThread`,ie:e}):De(Ee[e])}function an(e){}var on=e=>{try{e()}catch(e){ue(e)}};function sn(e){var t=(...t)=>{dn.push(e);try{return e(...t)}finally{x||(dn.pop(),ln&&cn===1&&dn.length===0&&(cn=0,ye+=1,on(qa),typeof Fibers<`u`&&Fibers.De()))}};return mn.set(e,t),t}var cn=0,ln=null,un=0,dn=[],fn=new Map,pn=new Map,mn=new Map,hn=0,gn=null,_n=[],vn=e=>function(e){if(!x){if(cn===0){var t=!1,n=!1;e((e=0)=>{if(!x&&(un=e,t=!0,n)){cn=2,on(()=>Ja(ln)),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.resume(),e=!1;try{var r=function(){var e=(S(),E)[ln+8>>>2>>>0];return e=pn.get(e),e=mn.get(e),--ye,e()}()}catch(t){r=t,e=!0}var i=!1;if(!ln){var a=gn;a&&(gn=null,(e?a.reject:a.resolve)(r),i=!0)}if(e&&!i)throw r}}),n=!0,t||(cn=1,ln=function(){var e=Ei(65548),t=e+12;if((S(),D)[e>>>2>>>0]=t,(S(),D)[e+4>>>2>>>0]=t+65536,t=dn[0],!fn.has(t)){var n=hn++;fn.set(t,n),pn.set(n,t)}return t=fn.get(t),(S(),E)[e+8>>>2>>>0]=t,e}(),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.pause(),on(()=>Ka(ln)))}else cn===2?(cn=0,on(Ya),Ti(ln),ln=null,_n.forEach(Yt)):ue(`invalid state: ${cn}`);return un}}(t=>{e().then(t)});function yn(e){return e>>>=0,vn(async()=>Ot(await Dt(e)))}var bn=[],xn=e=>{var t=bn.length;return bn.push(e),t},Sn=(e,t)=>{for(var n=Array(e),r=0;r>>2>>>0],o=_t[a];if(o===void 0)throw e=`parameter ${r}`,a=xi(a),t=ht(a),Ti(a),new yt(`${e} has unknown type ${t}`);n[i]=o}return n},Cn=(e,t,n)=>{var r=[];return e=e(r,n),r.length&&((S(),D)[t>>>2>>>0]=Ot(r)),e},wn={},Tn=e=>{var t=wn[e];return t===void 0?ht(e):t};function En(e,t,n){var[r,...i]=Sn(e,t>>>0);t=r.Sc.bind(r);var a=i.map(e=>e.Rc.bind(e));e--;var o={toValue:Dt};switch(e=a.map((e,t)=>{var n=`argFromPtr${t}`;return o[n]=e,`${n}(args${t?`+`+8*t:``})`}),n){case 0:var s=`toValue(handle)`;break;case 2:s=`new (toValue(handle))`;break;case 3:s=``;break;case 1:o.getStringOrSymbol=Tn,s=`toValue(handle)[getStringOrSymbol(methodName)]`}return s+=`(${e})`,r.fe||(o.toReturnWire=t,o.emval_returnValue=Cn,s=`return emval_returnValue(toReturnWire, destructorsRef, ${s})`),s=`return function (handle, methodName, destructorsRef, args) {
+ ${s}
+ }`,n=Function(Object.keys(o),s)(...Object.values(o)),s=`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,xn(Object.defineProperty(n,`name`,{value:s}))}function Dn(e,t){return t>>>=0,(e=Dt(e>>>0))==Dt(t)}function On(e){return(e>>>=0)?(e=Tn(e),Ot(globalThis[e])):Ot(globalThis)}function j(e){return e=Tn(e>>>0),Ot(t[e])}function kn(e,t){return t>>>=0,e=Dt(e>>>0),t=Dt(t),Ot(e[t])}function An(e){9<(e>>>=0)&&(Tt[e+1]+=1)}function jn(e,t,n,r,i){return bn[e>>>0](t>>>0,n>>>0,r>>>0,i>>>0)}function Mn(e,t,n,r,i){return jn(e>>>0,t>>>0,n>>>0,r>>>0,i>>>0)}function Nn(){return Ot([])}function Pn(e){e=Dt(e>>>0);for(var t=Array(e.length),n=0;n>>0))}function Fn(){return Ot({})}function In(e){for(var t=Dt(e>>>=0);t.length;){var n=t.pop();t.pop()(n)}Et(e)}function Ln(e,t,n){t>>>=0,n>>>=0,e=Dt(e>>>0),t=Dt(t),n=Dt(n),e[t]=n}function Rn(e,t){e=Fe(e),t>>>=0,e=new Date(1e3*e),(S(),E)[t>>>2>>>0]=e.getUTCSeconds(),(S(),E)[t+4>>>2>>>0]=e.getUTCMinutes(),(S(),E)[t+8>>>2>>>0]=e.getUTCHours(),(S(),E)[t+12>>>2>>>0]=e.getUTCDate(),(S(),E)[t+16>>>2>>>0]=e.getUTCMonth(),(S(),E)[t+20>>>2>>>0]=e.getUTCFullYear()-1900,(S(),E)[t+24>>>2>>>0]=e.getUTCDay(),e=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,(S(),E)[t+28>>>2>>>0]=e}var zn=e=>e%4==0&&(e%100!=0||e%400==0),Bn=[0,31,60,91,121,152,182,213,244,274,305,335],Vn=[0,31,59,90,120,151,181,212,243,273,304,334];function Hn(e,t){e=Fe(e),t>>>=0,e=new Date(1e3*e),(S(),E)[t>>>2>>>0]=e.getSeconds(),(S(),E)[t+4>>>2>>>0]=e.getMinutes(),(S(),E)[t+8>>>2>>>0]=e.getHours(),(S(),E)[t+12>>>2>>>0]=e.getDate(),(S(),E)[t+16>>>2>>>0]=e.getMonth(),(S(),E)[t+20>>>2>>>0]=e.getFullYear()-1900,(S(),E)[t+24>>>2>>>0]=e.getDay();var n=(zn(e.getFullYear())?Bn:Vn)[e.getMonth()]+e.getDate()-1|0;(S(),E)[t+28>>>2>>>0]=n,(S(),E)[t+36>>>2>>>0]=-60*e.getTimezoneOffset(),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();e=0|(n!=r&&e.getTimezoneOffset()==Math.min(r,n)),(S(),E)[t+32>>>2>>>0]=e}function Un(e){e>>>=0;var t=new Date((S(),E)[e+20>>>2>>>0]+1900,(S(),E)[e+16>>>2>>>0],(S(),E)[e+12>>>2>>>0],(S(),E)[e+8>>>2>>>0],(S(),E)[e+4>>>2>>>0],(S(),E)[e>>>2>>>0],0),n=(S(),E)[e+32>>>2>>>0],r=t.getTimezoneOffset(),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=new Date(t.getFullYear(),0,1).getTimezoneOffset(),o=Math.min(a,i);return 0>n?(S(),E)[e+32>>>2>>>0]=+(i!=a&&o==r):0>>2>>>0]=t.getDay(),n=(zn(t.getFullYear())?Bn:Vn)[t.getMonth()]+t.getDate()-1|0,(S(),E)[e+28>>>2>>>0]=n,(S(),E)[e>>>2>>>0]=t.getSeconds(),(S(),E)[e+4>>>2>>>0]=t.getMinutes(),(S(),E)[e+8>>>2>>>0]=t.getHours(),(S(),E)[e+12>>>2>>>0]=t.getDate(),(S(),E)[e+16>>>2>>>0]=t.getMonth(),(S(),E)[e+20>>>2>>>0]=t.getYear(),e=t.getTime(),BigInt(isNaN(e)?-1:e/1e3)}function Wn(e,t,n,r,a,o,s){return i?k(16,1,e,t,n,r,a,o,s):-52}function Gn(e,t,n,r,a,o){if(i)return k(17,1,e,t,n,r,a,o)}var Kn={},qn=()=>performance.timeOrigin+performance.now();function Jn(e,t){return i?k(18,1,e,t):(Kn[e]&&(clearTimeout(Kn[e].id),delete Kn[e]),t&&(Kn[e]={id:setTimeout(()=>{delete Kn[e],Yt(()=>Xi(e,performance.timeOrigin+performance.now()))},t),Ce:t}),0)}function Yn(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset();var o=Math.max(a,i);(S(),D)[e>>>2>>>0]=60*o,(S(),E)[t>>>2>>>0]=+(a!=i),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`})(a),t=t(i),iDate.now(),Zn=1;function Qn(e,t,n){if(n>>>=0,!(0<=e&&3>=e))return 28;if(e===0)e=Date.now();else{if(!Zn)return 52;e=performance.timeOrigin+performance.now()}return e=Math.round(1e6*e),(S(),ae)[n>>>3>>>0]=BigInt(e),0}var N=[],$n=(e,t)=>{N.length=0;for(var n;n=(S(),T)[e++>>>0];){var r=n!=105;t+=(r&=n!=112)&&t%8?4:0,N.push(n==112?(S(),D)[t>>>2>>>0]:n==106?(S(),ae)[t>>>3>>>0]:n==105?(S(),E)[t>>>2>>>0]:(S(),ie)[t>>>3>>>0]),t+=r?8:4}return N};function er(e,t,n){return e>>>=0,t=$n(t>>>0,n>>>0),Qa[e](...t)}function P(e,t,n){return e>>>=0,t=$n(t>>>0,n>>>0),Qa[e](...t)}var F=()=>{};function tr(e,t){return b(tt(e>>>0,t>>>0))}var nr=()=>{throw ye+=1,`unwind`};function I(){return 4294901760}var rr=()=>1,ir=()=>navigator.hardwareConcurrency;function L(e){e>>>=0;var t=(S(),T).length;if(e<=t||4294901760=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);e:{r=(Math.min(4294901760,65536*Math.ceil(Math.max(e,r)/65536))-je.buffer.byteLength+65535)/65536|0;try{je.grow(r),ce();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1}var ar=e=>{var t=Lt(e)+1,n=ra(t);return It(e,n,t),n},or=(e,t)=>{(S(),D)[e>>>2>>>0]=t;var n=(S(),D)[e>>>2>>>0];(S(),D)[e+4>>>2>>>0]=(t-n)/4294967296},sr=e=>(S(),D)[e>>>2>>>0]+4294967296*(S(),E)[e+4>>>2>>>0],cr=[],lr=(e,t)=>{cr[e>>>0]=t},ur=[],dr=[],fr=(e,t)=>{dr[e]=new Promise(n=>t.finally(()=>n(e)))},pr=e=>{if(e)return cr[e>>>0]},mr=(e,t)=>{for(e=(S(),D)[e>>>2>>>0];e;e=(S(),D)[e>>>2>>>0])t[(S(),E)[e+4>>>2>>>0]](e)},hr=(e,t,n)=>{(S(),D)[e>>>2>>>0]=t,(S(),D)[e+4>>>2>>>0]=n},gr=e=>{var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],tt(t,e)},_r=e=>{var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],t?tt(t,e):e===0?``:void 0},vr=e=>{var t=_r(e+4),n=(n=(S(),D)[e+12>>>2>>>0])?pr(n):`auto`;if(e+=16){var r=pr((S(),D)[e+4>>>2>>>0]),i=(S(),D)[e+16>>>2>>>0],a=(S(),D)[e+20>>>2>>>0];if(i){for(var o={},s=0;s>>3>>>0]}i=o}else i=void 0;e={module:r,constants:i,entryPoint:_r(e+8)}}else e=void 0;return{label:t,layout:n,compute:e}},yr=(e,t)=>{function n(n,r){n=e[n],(S(),D)[t+r>>>2>>>0]=n}n(`maxTextureDimension1D`,4),n(`maxTextureDimension2D`,8),n(`maxTextureDimension3D`,12),n(`maxTextureArrayLayers`,16),n(`maxBindGroups`,20),n(`maxBindGroupsPlusVertexBuffers`,24),n(`maxBindingsPerBindGroup`,28),n(`maxDynamicUniformBuffersPerPipelineLayout`,32),n(`maxDynamicStorageBuffersPerPipelineLayout`,36),n(`maxSampledTexturesPerShaderStage`,40),n(`maxSamplersPerShaderStage`,44),n(`maxStorageBuffersPerShaderStage`,48),n(`maxStorageTexturesPerShaderStage`,52),n(`maxUniformBuffersPerShaderStage`,56),n(`minUniformBufferOffsetAlignment`,80),n(`minStorageBufferOffsetAlignment`,84),or(t+64,e.maxUniformBufferBindingSize),or(t+72,e.maxStorageBufferBindingSize),n(`maxVertexBuffers`,88),or(t+96,e.maxBufferSize),n(`maxVertexAttributes`,104),n(`maxVertexBufferArrayStride`,108),n(`maxInterStageShaderVariables`,112),n(`maxColorAttachments`,116),n(`maxColorAttachmentBytesPerSample`,120),n(`maxComputeWorkgroupStorageSize`,124),n(`maxComputeInvocationsPerWorkgroup`,128),n(`maxComputeWorkgroupSizeX`,132),n(`maxComputeWorkgroupSizeY`,136),n(`maxComputeWorkgroupSizeZ`,140),n(`maxComputeWorkgroupsPerDimension`,144),e.Ae!==void 0&&n(`maxImmediateSize`,148)},br=[,`validation`,`out-of-memory`,`internal`],xr=[,`compatibility`,`core`],Sr={1:`core-features-and-limits`,2:`depth-clip-control`,3:`depth32float-stencil8`,4:`texture-compression-bc`,5:`texture-compression-bc-sliced-3d`,6:`texture-compression-etc2`,7:`texture-compression-astc`,8:`texture-compression-astc-sliced-3d`,9:`timestamp-query`,10:`indirect-first-instance`,11:`shader-f16`,12:`rg11b10ufloat-renderable`,13:`bgra8unorm-storage`,14:`float32-filterable`,15:`float32-blendable`,16:`clip-distances`,17:`dual-source-blending`,18:`subgroups`,19:`texture-formats-tier1`,20:`texture-formats-tier2`,21:`primitive-index`,22:`texture-component-swizzle`,327692:`chromium-experimental-unorm16-texture-formats`,327729:`chromium-experimental-multi-draw-indirect`},Cr=[,`low-power`,`high-performance`],wr=[,`occlusion`,`timestamp`],Tr={undefined:1,unknown:1,destroyed:2};function Er(e,t,n,r,i,a){t=Fe(t),n=Fe(n),r>>>=0,i>>>=0,a>>>=0;var o=pr(e>>>0);if(e={},a){var s=(S(),D)[a+12>>>2>>>0];if(s){var c=(S(),D)[a+16>>>2>>>0];e.requiredFeatures=Array.from((S(),D).subarray(c>>>2>>>0,c+4*s>>>2>>>0),e=>Sr[e])}var l=(S(),D)[a+20>>>2>>>0];if(l){let t=function(e,t,n=!1){t=l+t,(t=(S(),D)[t>>>2>>>0])==4294967295||n&&t==0||(u[e]=t)},n=function(e,t){t=l+t;var n=(S(),D)[t>>>2>>>0],r=(S(),D)[t+4>>>2>>>0];n==4294967295&&r==4294967295||(u[e]=sr(t))};var u={};t(`maxTextureDimension1D`,4),t(`maxTextureDimension2D`,8),t(`maxTextureDimension3D`,12),t(`maxTextureArrayLayers`,16),t(`maxBindGroups`,20),t(`maxBindGroupsPlusVertexBuffers`,24),t(`maxDynamicUniformBuffersPerPipelineLayout`,32),t(`maxDynamicStorageBuffersPerPipelineLayout`,36),t(`maxSampledTexturesPerShaderStage`,40),t(`maxSamplersPerShaderStage`,44),t(`maxStorageBuffersPerShaderStage`,48),t(`maxStorageTexturesPerShaderStage`,52),t(`maxUniformBuffersPerShaderStage`,56),t(`minUniformBufferOffsetAlignment`,80),t(`minStorageBufferOffsetAlignment`,84),n(`maxUniformBufferBindingSize`,64),n(`maxStorageBufferBindingSize`,72),t(`maxVertexBuffers`,88),n(`maxBufferSize`,96),t(`maxVertexAttributes`,104),t(`maxVertexBufferArrayStride`,108),t(`maxInterStageShaderVariables`,112),t(`maxColorAttachments`,116),t(`maxColorAttachmentBytesPerSample`,120),t(`maxComputeWorkgroupStorageSize`,124),t(`maxComputeInvocationsPerWorkgroup`,128),t(`maxComputeWorkgroupSizeX`,132),t(`maxComputeWorkgroupSizeY`,136),t(`maxComputeWorkgroupSizeZ`,140),t(`maxComputeWorkgroupsPerDimension`,144),t(`maxImmediateSize`,148,!0),e.requiredLimits=u}(s=(S(),D)[a+24>>>2>>>0])&&(s={label:_r(s+4)},e.defaultQueue=s),e.label=_r(a+4)}ye+=1,fr(t,o.requestDevice(e).then(e=>{--ye,Yt(()=>{cr[i>>>0]=e.queue,cr[r>>>0]=e,fr(n,e.lost.then(t=>{Yt(()=>{e.onuncapturederror=()=>{};var r=ia(),i=ar(t.message);zi(n,Tr[t.reason],i),na(r)})})),e.onuncapturederror=e=>{var t=5;e.error instanceof GPUValidationError?t=2:e.error instanceof GPUOutOfMemoryError?t=3:e.error instanceof GPUInternalError&&(t=4);var n=ia();e=ar(e.error.message),Wi(r,t,e),na(n)},`adapterInfo`in e||(e.adapterInfo=o.info),Ui(t,1,r,0)})},e=>{--ye,Yt(()=>{var i=ia(),a=ar(e.message);Ui(t,3,r,a),n&&zi(n,4,a),na(i)})}))}function Dr(e){var t=pr(e>>>=0),n=ur[e];if(n){for(var r=0;r>>=0;var r=pr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=Qi(16,i.byteLength);return(S(),T).set(new Uint8Array(i),a>>>0),ur[e].push(()=>Ti(a)),a}function kr(e,t,n){n>>>=0;var r=pr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=Qi(16,i.byteLength);return(S(),T).fill(0,a,i.byteLength),ur[e].push(()=>{new Uint8Array(i).set((S(),T).subarray(a>>>0,a+i.byteLength>>>0)),Ti(a)}),a}function Ar(e,t,n,r,i){e>>>=0,t=Fe(t),n=Fe(n),i>>>=0;var a=pr(e);ur[e]=[],i==4294967295&&(i=void 0),ye+=1,fr(t,a.mapAsync(n,r>>>0,i).then(()=>{--ye,Yt(()=>{Bi(t,1,0)})},n=>{--ye,Yt(()=>{ia();var r=ar(n.message);Bi(t,n.name===`AbortError`?4:n.name===`OperationError`?3:0,r),delete ur[e]})}))}function jr(e){var t=pr(e>>>=0),n=ur[e];if(n){for(var r=0;r>>0]}function Nr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=!!(S(),D)[t+32>>>2>>>0];t={label:_r(t+4),usage:(S(),D)[t+16>>>2>>>0],size:sr(t+24),mappedAtCreation:r},e=pr(e);try{var i=e.createBuffer(t)}catch{return!1}return cr[n>>>0]=i,r&&(ur[n]=[]),!0}function Pr(e,t,n,r){e>>>=0,t=Fe(t),r>>>=0,n=vr(n>>>0),e=pr(e),ye+=1,fr(t,e.createComputePipelineAsync(n).then(e=>{--ye,Yt(()=>{cr[r>>>0]=e,Ri(t,1,r,0)})},e=>{--ye,Yt(()=>{var n=ia(),i=ar(e.message);Ri(t,e.reason===`validation`?3:e.reason===`internal`?4:0,r,i),na(n)})}))}function Fr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=(S(),D)[t>>>2>>>0],i=(S(),E)[r+4>>>2>>>0];t={label:_r(t+4),code:``},i===2&&(t.code=gr(r+8)),e=pr(e).createShaderModule(t),cr[n>>>0]=e}var Ir=e=>{(e=pr(e)).onuncapturederror=null,e.destroy()};function Lr(e,t){t=Fe(t),e=pr(e>>>0),ye+=1,fr(t,e.popErrorScope().then(e=>{--ye,Yt(()=>{var n=5;e?e instanceof GPUValidationError?n=2:e instanceof GPUOutOfMemoryError?n=3:e instanceof GPUInternalError&&(n=4):n=1;var r=ia(),i=e?ar(e.message):0;Vi(t,1,n,i),na(r)})},e=>{--ye,Yt(()=>{var n=ia(),r=ar(e.message);Vi(t,1,5,r),na(n)})}))}function Rr(e,t,n,r){if(t=Fe(t),r>>>=0,n>>>=0){var i={featureLevel:xr[(S(),E)[n+4>>>2>>>0]],powerPreference:Cr[(S(),E)[n+8>>>2>>>0]],forceFallbackAdapter:!!(S(),D)[n+12>>>2>>>0]};(e=(S(),D)[n>>>2>>>0])!==0&&(S(),i.Fe=!!(S(),D)[e+8>>>2>>>0])}`gpu`in navigator?(ye+=1,fr(t,navigator.gpu.requestAdapter(i).then(e=>{--ye,Yt(()=>{if(e)cr[r>>>0]=e,Hi(t,1,r,0);else{var n=ia(),i=ar(`WebGPU not available on this browser (requestAdapter returned null)`);Hi(t,3,r,i),na(n)}})},e=>{--ye,Yt(()=>{var n=ia(),i=ar(e.message);Hi(t,4,r,i),na(n)})}))):(i=ia(),e=ar(`WebGPU not available on this browser (navigator.gpu is not available)`),Hi(t,3,r,e),na(i))}function zr(e,t,n){return e>>>=0,t>>>=0,n>>>=0,vn(async()=>{var r=[];if(n){var i=(S(),E)[n>>>2>>>0];r.length=t+1,r[t]=new Promise(e=>setTimeout(e,i,0))}else r.length=t;for(var a=0;a{if(!Br){var e,t={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:`./this.program`};for(e in Vr)Vr[e]===void 0?delete t[e]:t[e]=Vr[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);Br=n}return Br};function Ur(e,t){if(i)return k(19,1,e,t);e>>>=0,t>>>=0;var n,r=0,a=0;for(n of Hr()){var o=t+r;(S(),D)[e+a>>>2>>>0]=o,r+=It(n,o,1/0)+1,a+=4}return 0}function Wr(e,t){if(i)return k(20,1,e,t);e>>>=0,t>>>=0;var n=Hr();for(var r of((S(),D)[e>>>2>>>0]=n.length,e=0,n))e+=Lt(r)+1;return(S(),D)[t>>>2>>>0]=e,0}function Gr(e){return i?k(21,1,e):52}function Kr(e,t,n,r){return i?k(22,1,e,t,n,r):52}function qr(e,t,n,r){return i?k(23,1,e,t,n,r):70}var Jr=[null,[],[]];function Yr(e,t,n,r){if(i)return k(24,1,e,t,n,r);t>>>=0,n>>>=0,r>>>=0;for(var a=0,o=0;o>>2>>>0],c=(S(),D)[t+4>>>2>>>0];t+=8;for(var l=0;l>>0],f=Jr[u];d===0||d===10?((u===1?y:b)(et(f)),f.length=0):f.push(d)}a+=c}return(S(),D)[r>>>2>>>0]=a,0}function Xr(e){return e>>>0}function Zr(e,t){return yr(pr(e>>>0).limits,t>>>0),1}function Qr(e,t){return pr(e>>>0).features.has(Sr[t])}function $r(e){return BigInt(pr(e>>>0).size)}function ei(e){return BigInt(pr(e>>>0).usage)}function ti(e,t){if(e>>>=0,t>>>=0){var n=_r(t+4);n={label:n,timestampWrites:t=(t=(S(),D)[t+12>>>2>>>0])===0?void 0:{querySet:pr((S(),D)[t+4>>>2>>>0]),beginningOfPassWriteIndex:(S(),D)[t+8>>>2>>>0],endOfPassWriteIndex:(S(),D)[t+12>>>2>>>0]}}}return t=pr(e),e=Ni(0),n=t.beginComputePass(n),cr[e>>>0]=n,e}function ni(e,t,n,r,i,a){n=Fe(n),i=Fe(i),a=Fe(a),pr(e>>>0).copyBufferToBuffer(pr(t>>>0),n,pr(r>>>0),i,a)}function ri(e){var t=pr(e>>>0);return e=ji(0),t=t.finish(),cr[e>>>0]=t,e}function ii(e,t,n,r,i,a){a=Fe(a),pr(e>>>0).resolveQuerySet(pr(t>>>0),n,r,pr(i>>>0),a)}function ai(e,t,n,r){pr(e>>>0).dispatchWorkgroups(t,n,r)}function oi(e,t,n){n=Fe(n),pr(e>>>0).dispatchWorkgroupsIndirect(pr(t>>>0),n)}function si(e){pr(e>>>0).end()}function R(e,t,n,r,i){r>>>=0,i>>>=0,e=pr(e>>>0),n=pr(n>>>0),r==0?e.setBindGroup(t,n):e.setBindGroup(t,n,(S(),D),i>>>2,r)}function ci(e,t){pr(e>>>0).setPipeline(pr(t>>>0))}function li(e,t,n){pr(e>>>0).Ee(pr(t>>>0),n)}function ui(e,t){var n=pr(e>>>0);return e=Ai(0),t=n.getBindGroupLayout(t),cr[e>>>0]=t,e}function di(e,t){function n(e){var t=(S(),D)[e+8>>>2>>>0],n=(S(),D)[e+32>>>2>>>0],r=(S(),D)[e+36>>>2>>>0],i=0;return mr(e,{327681:e=>{i=(S(),D)[e+8>>>2>>>0]}}),t?((n=sr(e+24))==-1&&(n=void 0),t={buffer:pr(t),offset:sr(e+16),size:n}):t=pr(n||r||i),{binding:(S(),D)[e+4>>>2>>>0],resource:t}}e>>>=0,t={label:_r(4+(t>>>=0)),layout:pr((S(),D)[t+12>>>2>>>0]),entries:function(e,t){for(var r=[],i=0;i>>2>>>0],(S(),D)[t+20>>>2>>>0])},e=pr(e);var r=ki(0);return lr(r,e.createBindGroup(t)),r}function fi(e,t){var n;return e>>>=0,(t>>>=0)&&(n={label:_r(t+4)}),t=pr(e),e=Mi(0),n=t.createCommandEncoder(n),cr[e>>>0]=n,e}function pi(e,t){e>>>=0,t>>>=0,t={type:wr[(S(),E)[t+12>>>2>>>0]],count:(S(),D)[t+16>>>2>>>0]};var n=pr(e);return e=Pi(0),t=n.createQuerySet(t),cr[e>>>0]=t,e}function mi(e,t){e=pr(e>>>0).adapterInfo,t>>>=0,(S(),D)[t+52>>>2>>>0]=e.subgroupMinSize,(S(),D)[t+56>>>2>>>0]=e.subgroupMaxSize;var n=e.vendor+e.architecture+e.device+e.description,r=Lt(n)+1,i=Ei(r);return i&&It(n,i,r),n=i,r=Lt(e.vendor),hr(t+4,n,r),n+=r,r=Lt(e.architecture),hr(t+12,n,r),n+=r,r=Lt(e.device),hr(t+20,n,r),hr(t+28,n+r,Lt(e.description)),(S(),E)[t+36>>>2>>>0]=2,e=e.isFallbackAdapter?3:4,(S(),E)[t+40>>>2>>>0]=e,(S(),D)[t+44>>>2>>>0]=0,(S(),D)[t+48>>>2>>>0]=0,1}var hi={"core-features-and-limits":1,"depth-clip-control":2,"depth32float-stencil8":3,"texture-compression-bc":4,"texture-compression-bc-sliced-3d":5,"texture-compression-etc2":6,"texture-compression-astc":7,"texture-compression-astc-sliced-3d":8,"timestamp-query":9,"indirect-first-instance":10,"shader-f16":11,"rg11b10ufloat-renderable":12,"bgra8unorm-storage":13,"float32-filterable":14,"float32-blendable":15,"clip-distances":16,"dual-source-blending":17,subgroups:18,"texture-formats-tier1":19,"texture-formats-tier2":20,"primitive-index":21,"texture-component-swizzle":22,"chromium-experimental-unorm16-texture-formats":327692,"chromium-experimental-multi-draw-indirect":327729};function gi(e,t){t>>>=0;var n=pr(e>>>0);e=Ei(4*n.features.size);var r=0,i=0;for(let t of n.features)0<=(n=hi[t])&&((S(),E)[e+r>>>2>>>0]=n,r+=4,i++);(S(),D)[t+4>>>2>>>0]=e,(S(),D)[t>>>2>>>0]=i}function _i(e,t){return yr(pr(e>>>0).limits,t>>>0),1}function vi(e,t){pr(e>>>0).pushErrorScope(br[t])}function yi(e,t,n){t>>>=0,n>>>=0,e=pr(e>>>0),t=Array.from((S(),E).subarray(n>>>2>>>0,n+4*t>>>2>>>0),e=>pr(e)),e.submit(t)}function bi(e,t,n,r,i){n=Fe(n),r>>>=0,i>>>=0,e=pr(e>>>0),t=pr(t>>>0),r=(S(),T).subarray(r>>>0,r+i>>>0),e.writeBuffer(t,n,r,0,i)}i||function(){for(var e=t.numThreads-1;e--;)Ae();he.push(async()=>{var e=async function(){if(!i)return Promise.all(Ce.map(ke))}();ge++,await e,--ge==0&&_e&&(e=_e,_e=null,e())})}(),i||(je=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),ce()),t.wasmBinary&&(d=t.wasmBinary),t.stackSave=()=>ia(),t.stackRestore=e=>na(e),t.stackAlloc=e=>ra(e),t.setValue=function(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:case`i8`:(S(),w)[e>>>0]=t;break;case`i16`:(S(),te)[e>>>1>>>0]=t;break;case`i32`:(S(),E)[e>>>2>>>0]=t;break;case`i64`:(S(),ae)[e>>>3>>>0]=BigInt(t);break;case`float`:(S(),re)[e>>>2>>>0]=t;break;case`double`:(S(),ie)[e>>>3>>>0]=t;break;case`*`:(S(),D)[e>>>2>>>0]=t;break;default:ue(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:case`i8`:return(S(),w)[e>>>0];case`i16`:return(S(),te)[e>>>1>>>0];case`i32`:return(S(),E)[e>>>2>>>0];case`i64`:return(S(),ae)[e>>>3>>>0];case`float`:return(S(),re)[e>>>2>>>0];case`double`:return(S(),ie)[e>>>3>>>0];case`*`:return(S(),D)[e>>>2>>>0];default:ue(`invalid type for getValue: ${t}`)}},t.UTF8ToString=tt,t.stringToUTF8=It,t.lengthBytesUTF8=Lt;var xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za=[be,xe,Ye,nt,rt,it,at,ot,st,ct,lt,ut,A,dt,ft,pt,Wn,Gn,Jn,Ur,Wr,Gr,Kr,qr,Yr],Qa={923180:(e,n,r,i,a)=>{if(t===void 0||!t.Uc)return 1;if((e=tt(Number(e>>>0))).startsWith(`./`)&&(e=e.substring(2)),!(e=t.Uc.get(e)))return 2;if(n=Number(n>>>0),r=Number(r>>>0),i=Number(i>>>0),n+r>e.byteLength)return 3;try{let o=e.subarray(n,n+r);switch(a){case 0:(S(),T).set(o,i>>>0);break;case 1:t.ad?t.ad(i,o):t.oe(i,o);break;default:return 4}return 0}catch{return 4}},924004:(e,n,r)=>{t.Sd(e,(S(),T).subarray(n>>>0,n+r>>>0))},924068:()=>t.me(),924110:e=>{t.jd(e)},924147:()=>typeof wasmOffsetConverter<`u`};function $a(e,t,n,r){var i=ia();try{return va(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function eo(e,t,n){var r=ia();try{return ha(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function to(e,t,n){var r=ia();try{la(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function no(e,t){var n=ia();try{return ua(e,t)}catch(e){if(na(n),e!==e+0)throw e;$i(1,0)}}function ro(e){var t=ia();try{da(e)}catch(e){if(na(t),e!==e+0)throw e;$i(1,0)}}function io(e,t,n,r,i,a,o){var s=ia();try{return ma(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function ao(e,t){var n=ia();try{ya(e,t)}catch(e){if(na(n),e!==e+0)throw e;$i(1,0)}}function oo(e,t,n,r,i,a){var o=ia();try{fa(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function so(e,t,n,r){var i=ia();try{_a(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function co(e,t,n,r,i,a,o){var s=ia();try{xa(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function lo(e,t,n,r,i,a,o){var s=ia();try{Sa(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function uo(e,t,n,r,i,a,o,s){var c=ia();try{ja(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function fo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ia();try{Ca(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(na(f),e!==e+0)throw e;$i(1,0)}}function po(e,t,n,r,i){var a=ia();try{return ba(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function mo(e,t,n,r,i){var a=ia();try{pa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function ho(e,t,n,r,i,a,o,s){var c=ia();try{ga(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function go(e){var t=ia();try{return Ma(e)}catch(e){if(na(t),e!==e+0)throw e;$i(1,0)}}function _o(e,t,n){var r=ia();try{return Na(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function vo(e,t){var n=ia();try{return Ga(e,t)}catch(e){if(na(n),e!==e+0)throw e;return $i(1,0),0n}}function yo(e,t,n,r,i){var a=ia();try{Pa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function bo(e){var t=ia();try{return wa(e)}catch(e){if(na(t),e!==e+0)throw e;return $i(1,0),0n}}function xo(e,t,n,r,i,a){var o=ia();try{return ka(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function So(e,t,n,r,i,a){var o=ia();try{return Fa(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function Co(e,t,n,r,i,a){var o=ia();try{return Ia(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function wo(e,t,n,r,i,a,o,s){var c=ia();try{return Aa(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function To(e,t,n,r,i){var a=ia();try{return La(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;return $i(1,0),0n}}function Eo(e,t,n,r){var i=ia();try{return Ra(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Do(e,t,n,r){var i=ia();try{return za(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Oo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ia();try{return Ba(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(na(f),e!==e+0)throw e;$i(1,0)}}function ko(e,t,n,r,i,a,o,s,c,l,u){var d=ia();try{Va(e,t,n,r,i,a,o,s,c,l,u)}catch(e){if(na(d),e!==e+0)throw e;$i(1,0)}}function Ao(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=ia();try{Ha(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(na(g),e!==e+0)throw e;$i(1,0)}}function jo(e,t,n,r){var i=ia();try{return Ua(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Mo(e,t,n,r,i){var a=ia();try{return Wa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function No(e,t,n){var r=ia();try{return Ea(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;return $i(1,0),0n}}function Po(e,t,n){var r=ia();try{return Ta(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function Fo(e,t,n){var r=ia();try{return Da(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function Io(e,t,n,r){var i=ia();try{Oa(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Lo(){if(0{let n=new WeakMap,r,i,a=1;t.webgpuRegisterDevice=e=>{if(i!==void 0)throw Error(`another WebGPU EP inference session is being created.`);if(e){var t=n.get(e);if(!t){let r=((e,t=0)=>{var n=Li(t);return t=Ii(t,n),cr[n>>>0]=e.queue,cr[t>>>0]=e,t})(e,t=Oi(0));t=[a++,t,r],n.set(e,t)}return r=e,i=t[0],t}r=void 0,i=0};let o=new Map;t.webgpuOnCreateSession=t=>{if(i!==void 0){var n=i;if(i=void 0,t){let i=Ci(n);o.set(t,i),n===0&&e(r??pr(i))}r=void 0}},t.webgpuOnReleaseSession=e=>{o.delete(e)};let s=Symbol(`gpuBufferMetadata`);t.webgpuRegisterBuffer=(e,t,n)=>{if(n)return e[s]=[n,NaN],n;if(n=e[s])return n[1]++,n[0];if((t=o.get(t))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);return t=((e,t=0)=>(e.mapState===`unmapped`||ue(),t=Fi(t),cr[t>>>0]=e,t))(e,t),e[s]=[t,1],t},t.webgpuUnregisterBuffer=e=>{let t=e[s];if(!t)throw Error(`Buffer is not registered`);t[1]--,t[1]===0&&(Di(t[0]),delete e[s])},t.webgpuGetBuffer=e=>pr(e),t.webgpuCreateDownloader=(e,t,n)=>{if((n=o.get(n))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);let r=pr(n),i=16*Math.ceil(Number(t)/16);return async()=>{let n=r.createBuffer({size:i,usage:9});try{let a=r.createCommandEncoder();return a.copyBufferToBuffer(e,0,n,0,i),r.queue.submit([a.finish()]),await n.mapAsync(GPUMapMode.READ),n.getMappedRange().slice(0,t)}finally{n.destroy()}}},t.ad=(e,t)=>{var n=t.buffer;let a=t.byteOffset,o=t.byteLength;if(t=16*Math.ceil(Number(o)/16),e=pr(e),!r){var s=Ci(i);r=pr(s)}let c=(s=r.createBuffer({mappedAtCreation:!0,size:t,usage:6})).getMappedRange();new Uint8Array(c).set(new Uint8Array(n,a,o)),s.unmap(),(n=r.createCommandEncoder()).copyBufferToBuffer(s,0,e,0,t),r.queue.submit([n.finish()]),s.destroy()}},t.webnnInit=e=>{let n=e[0];[t.me,t.jd,t.webnnEnsureTensor,t.Sd,t.webnnDownloadTensor,t.le,t.webnnEnableTraceEvent]=e.slice(1),t.webnnReleaseTensorId=t.jd,t.webnnUploadTensor=t.Sd,t.webnnRegisterMLContext=t.le,t.webnnOnRunStart=e=>n.onRunStart(e),t.webnnOnRunEnd=n.onRunEnd.bind(n),t.webnnOnReleaseSession=e=>{n.onReleaseSession(e)},t.webnnCreateMLTensorDownloader=(e,t)=>n.createMLTensorDownloader(e,t),t.webnnRegisterMLTensor=(e,t,r,i)=>n.registerMLTensor(e,t,r,i),t.webnnCreateMLContext=e=>n.createMLContext(e),t.webnnRegisterMLConstant=(e,r,i,a,o,s)=>n.registerMLConstant(e,r,i,a,o,t.Uc,s),t.webnnRegisterGraphInput=n.registerGraphInput.bind(n),t.webnnIsGraphInput=n.isGraphInput.bind(n),t.webnnRegisterGraphOutput=n.registerGraphOutput.bind(n),t.webnnIsGraphOutput=n.isGraphOutput.bind(n),t.webnnCreateTemporaryTensor=n.createTemporaryTensor.bind(n),t.webnnIsGraphInputOutputTypeSupported=n.isGraphInputOutputTypeSupported.bind(n)},se?t:new Promise((e,t)=>{m=e,h=t})}var rj,ij,aj=Kk(()=>{rj=nj,ij=globalThis.self?.name?.startsWith(`em-pthread`),ij&&nj()}),oj,sj,cj,lj,uj,dj,fj,pj,mj,hj,gj,_j,vj,yj,bj=Kk(()=>{YA(),oj=typeof location>`u`?void 0:location.origin,sj=import.meta.url>`file:`&&import.meta.url<`file;`,cj=()=>{if(sj){let e=URL;return new URL(new e(`ort.webgpu.bundle.min.mjs`,import.meta.url).href,oj).href}return import.meta.url},lj=cj(),uj=()=>{if(lj&&!lj.startsWith(`blob:`))return lj.substring(0,lj.lastIndexOf(`/`)+1)},dj=(e,t)=>{try{let n=t??lj;return(n?new URL(e,n):new URL(e)).origin===oj}catch{return!1}},fj=(e,t)=>{let n=t??lj;try{return(n?new URL(e,n):new URL(e)).href}catch{return}},pj=(e,t)=>`${t??`./`}${e}`,mj=async e=>{let t=await(await fetch(e,{credentials:`same-origin`})).blob();return URL.createObjectURL(t)},hj=async e=>(await Eb(async()=>{let{default:t}=await import(e);return{default:t}},[])).default,gj=(ej(),Yk(XA)).default,_j=async()=>{if(!lj)throw Error(`Failed to load proxy worker: cannot determine the script source URL.`);if(dj(lj))return[void 0,gj()];let e=await mj(lj);return[e,gj(e)]},vj=(aj(),Yk(tj)).default,yj=async(e,t,n,r)=>{let i=vj&&!(e||t);if(i)if(lj)i=dj(lj)||r&&!n;else if(r&&!n)i=!0;else throw Error(`cannot determine the script source URL.`);if(i)return[void 0,vj];{let r=`ort-wasm-simd-threaded.asyncify.mjs`,i=e??fj(r,t),a=n&&i&&!dj(i,t),o=a?await mj(i):i??pj(r,t);return[a?o:void 0,await hj(o)]}}}),xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj=Kk(()=>{bj(),Sj=!1,Cj=!1,wj=!1,Tj=()=>{if(typeof SharedArrayBuffer>`u`)return!1;try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},Ej=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},Dj=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},Oj=async e=>{if(Sj)return Promise.resolve();if(Cj)throw Error(`multiple calls to 'initializeWebAssembly()' detected.`);if(wj)throw Error(`previous call to 'initializeWebAssembly()' failed.`);Cj=!0;let t=e.initTimeout,n=e.numThreads;if(e.simd!==!1){if(e.simd===`relaxed`){if(!Dj())throw Error(`Relaxed WebAssembly SIMD is not supported in the current environment.`)}else if(!Ej())throw Error(`WebAssembly SIMD is not supported in the current environment.`)}let r=Tj();n>1&&!r&&(typeof self<`u`&&!self.crossOriginIsolated&&console.warn(`env.wasm.numThreads is set to `+n+`, but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info.`),console.warn(`WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading.`),e.numThreads=n=1);let i=e.wasmPaths,a=typeof i==`string`?i:void 0,o=i?.mjs,s=o?.href??o,c=i?.wasm,l=c?.href??c,u=e.wasmBinary,[d,f]=await yj(s,a,n>1,!!u||!!l),p=!1,m=[];if(t>0&&m.push(new Promise(e=>{setTimeout(()=>{p=!0,e()},t)})),m.push(new Promise((e,t)=>{let r={numThreads:n};if(u)r.wasmBinary=u,r.locateFile=e=>e;else if(l||a)r.locateFile=e=>l??a+e;else if(s&&s.indexOf(`blob:`)!==0)r.locateFile=e=>new URL(e,s).href;else if(d){let e=uj();e&&(r.locateFile=t=>e+t)}f(r).then(t=>{Cj=!1,Sj=!0,xj=t,e(),d&&URL.revokeObjectURL(d)},e=>{Cj=!1,wj=!0,t(e)})})),await Promise.race(m),p)throw Error(`WebAssembly backend initializing failed due to timeout: ${t}ms`)},kj=()=>{if(Sj&&xj)return xj;throw Error(`WebAssembly is not initialized yet.`)}}),jj,Mj,Nj,Pj=Kk(()=>{Aj(),jj=(e,t)=>{let n=kj(),r=n.lengthBytesUTF8(e)+1,i=n._malloc(r);return n.stringToUTF8(e,i,r),t.push(i),i},Mj=(e,t,n,r)=>{if(typeof e==`object`&&e){if(n.has(e))throw Error(`Circular reference in options`);n.add(e)}Object.entries(e).forEach(([e,i])=>{let a=t?t+e:e;if(typeof i==`object`)Mj(i,a+`.`,n,r);else if(typeof i==`string`||typeof i==`number`)r(a,i.toString());else if(typeof i==`boolean`)r(a,i?`1`:`0`);else throw Error(`Can't handle extra config type: ${typeof i}`)})},Nj=e=>{let t=kj(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetLastError(r,r+n);let i=Number(t.getValue(r,n===4?`i32`:`i64`)),a=t.getValue(r+n,`*`),o=a?t.UTF8ToString(a):``;throw Error(`${e} ERROR_CODE: ${i}, ERROR_MESSAGE: ${o}`)}finally{t.stackRestore(n)}}}),Fj,Ij=Kk(()=>{Aj(),Pj(),Fj=e=>{let t=kj(),n=0,r=[],i=e||{};try{if(e?.logSeverityLevel===void 0)i.logSeverityLevel=2;else if(typeof e.logSeverityLevel!=`number`||!Number.isInteger(e.logSeverityLevel)||e.logSeverityLevel<0||e.logSeverityLevel>4)throw Error(`log severity level is not valid: ${e.logSeverityLevel}`);if(e?.logVerbosityLevel===void 0)i.logVerbosityLevel=0;else if(typeof e.logVerbosityLevel!=`number`||!Number.isInteger(e.logVerbosityLevel))throw Error(`log verbosity level is not valid: ${e.logVerbosityLevel}`);e?.terminate===void 0&&(i.terminate=!1);let a=0;return e?.tag!==void 0&&(a=jj(e.tag,r)),n=t._OrtCreateRunOptions(i.logSeverityLevel,i.logVerbosityLevel,!!i.terminate,a),n===0&&Nj(`Can't create run options.`),e?.extra!==void 0&&Mj(e.extra,``,new WeakSet,(e,i)=>{let a=jj(e,r),o=jj(i,r);t._OrtAddRunConfigEntry(n,a,o)!==0&&Nj(`Can't set a run config entry: ${e} - ${i}.`)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseRunOptions(n),r.forEach(e=>t._free(e)),e}}}),Lj,Rj,zj,Bj,Vj,Hj,Uj,Wj=Kk(()=>{Aj(),Pj(),Lj=e=>{switch(e){case`disabled`:return 0;case`basic`:return 1;case`extended`:return 2;case`layout`:return 3;case`all`:return 99;default:throw Error(`unsupported graph optimization level: ${e}`)}},Rj=e=>{switch(e){case`sequential`:return 0;case`parallel`:return 1;default:throw Error(`unsupported execution mode: ${e}`)}},zj=e=>{e.extra||={},e.extra.session||(e.extra.session={});let t=e.extra.session;t.use_ort_model_bytes_directly||=`1`,e.executionProviders&&e.executionProviders.some(e=>(typeof e==`string`?e:e.name)===`webgpu`)&&(e.enableMemPattern=!1)},Bj=(e,t,n,r)=>{let i=jj(t,r),a=jj(n,r);kj()._OrtAddSessionConfigEntry(e,i,a)!==0&&Nj(`Can't set a session config entry: ${t} - ${n}.`)},Vj=(e,t,n,r)=>{let i=jj(t,r),a=jj(n,r);e.push([i,a])},Hj=async(e,t,n)=>{let r=t.executionProviders;for(let i of r){let r=typeof i==`string`?i:i.name,a=[];switch(r){case`webnn`:if(r=`WEBNN`,typeof i!=`string`){let t=i?.deviceType;t&&Bj(e,`deviceType`,t,n)}break;case`webgpu`:{r=`WebGPU`;let e;if(typeof i!=`string`){let r=i;if(r.device)if(typeof GPUDevice<`u`&&r.device instanceof GPUDevice)e=r.device;else throw Error(`Invalid GPU device set in WebGPU EP options.`);let{enableGraphCapture:o}=t;if(typeof o==`boolean`&&o&&Vj(a,`enableGraphCapture`,`1`,n),typeof r.preferredLayout==`string`&&Vj(a,`preferredLayout`,r.preferredLayout,n),r.forceCpuNodeNames){let e=Array.isArray(r.forceCpuNodeNames)?r.forceCpuNodeNames:[r.forceCpuNodeNames];Vj(a,`forceCpuNodeNames`,e.join(`
+`),n)}r.validationMode&&Vj(a,`validationMode`,r.validationMode,n)}let o=kj().webgpuRegisterDevice(e);if(o){let[e,t,r]=o;Vj(a,`deviceId`,e.toString(),n),Vj(a,`webgpuInstance`,t.toString(),n),Vj(a,`webgpuDevice`,r.toString(),n)}}break;case`wasm`:case`cpu`:continue;default:throw Error(`not supported execution provider: ${r}`)}let o=jj(r,n),s=a.length,c=0,l=0;if(s>0){c=kj()._malloc(s*kj().PTR_SIZE),n.push(c),l=kj()._malloc(s*kj().PTR_SIZE),n.push(l);for(let e=0;e{let t=kj(),n=0,r=[],i=e||{};zj(i);try{let e=Lj(i.graphOptimizationLevel??`all`),a=Rj(i.executionMode??`sequential`),o=typeof i.logId==`string`?jj(i.logId,r):0,s=i.logSeverityLevel??2;if(!Number.isInteger(s)||s<0||s>4)throw Error(`log severity level is not valid: ${s}`);let c=i.logVerbosityLevel??0;if(!Number.isInteger(c)||c<0||c>4)throw Error(`log verbosity level is not valid: ${c}`);let l=typeof i.optimizedModelFilePath==`string`?jj(i.optimizedModelFilePath,r):0;if(n=t._OrtCreateSessionOptions(e,!!i.enableCpuMemArena,!!i.enableMemPattern,a,!!i.enableProfiling,0,o,s,c,l),n===0&&Nj(`Can't create session options.`),i.executionProviders&&await Hj(n,i,r),i.enableGraphCapture!==void 0){if(typeof i.enableGraphCapture!=`boolean`)throw Error(`enableGraphCapture must be a boolean value: ${i.enableGraphCapture}`);Bj(n,`enableGraphCapture`,i.enableGraphCapture.toString(),r)}if(i.freeDimensionOverrides)for(let[e,a]of Object.entries(i.freeDimensionOverrides)){if(typeof e!=`string`)throw Error(`free dimension override name must be a string: ${e}`);if(typeof a!=`number`||!Number.isInteger(a)||a<0)throw Error(`free dimension override value must be a non-negative integer: ${a}`);let i=jj(e,r);t._OrtAddFreeDimensionOverride(n,i,a)!==0&&Nj(`Can't set a free dimension override: ${e} - ${a}.`)}return i.extra!==void 0&&Mj(i.extra,``,new WeakSet,(e,t)=>{Bj(n,e,t,r)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseSessionOptions(n)!==0&&Nj(`Can't release session options.`),r.forEach(e=>t._free(e)),e}}}),Gj,Kj,qj,Jj,Yj,Xj,Zj,Qj,$j=Kk(()=>{Gj=e=>{switch(e){case`int8`:return 3;case`uint8`:return 2;case`bool`:return 9;case`int16`:return 5;case`uint16`:return 4;case`int32`:return 6;case`uint32`:return 12;case`float16`:return 10;case`float32`:return 1;case`float64`:return 11;case`string`:return 8;case`int64`:return 7;case`uint64`:return 13;case`int4`:return 22;case`uint4`:return 21;default:throw Error(`unsupported data type: ${e}`)}},Kj=e=>{switch(e){case 3:return`int8`;case 2:return`uint8`;case 9:return`bool`;case 5:return`int16`;case 4:return`uint16`;case 6:return`int32`;case 12:return`uint32`;case 10:return`float16`;case 1:return`float32`;case 11:return`float64`;case 8:return`string`;case 7:return`int64`;case 13:return`uint64`;case 22:return`int4`;case 21:return`uint4`;default:throw Error(`unsupported data type: ${e}`)}},qj=(e,t)=>{let n=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][e],r=typeof t==`number`?t:t.reduce((e,t)=>e*t,1);return n>0?Math.ceil(r*n):void 0},Jj=e=>{switch(e){case`float16`:return typeof Float16Array<`u`&&Float16Array.from?Float16Array:Uint16Array;case`float32`:return Float32Array;case`uint8`:return Uint8Array;case`int8`:return Int8Array;case`uint16`:return Uint16Array;case`int16`:return Int16Array;case`int32`:return Int32Array;case`bool`:return Uint8Array;case`float64`:return Float64Array;case`uint32`:return Uint32Array;case`int64`:return BigInt64Array;case`uint64`:return BigUint64Array;default:throw Error(`unsupported type: ${e}`)}},Yj=e=>{switch(e){case`verbose`:return 0;case`info`:return 1;case`warning`:return 2;case`error`:return 3;case`fatal`:return 4;default:throw Error(`unsupported logging level: ${e}`)}},Xj=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,Zj=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint64`||e===`int8`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,Qj=e=>{switch(e){case`none`:return 0;case`cpu`:return 1;case`cpu-pinned`:return 2;case`texture`:return 3;case`gpu-buffer`:return 4;case`ml-tensor`:return 5;default:throw Error(`unsupported data location: ${e}`)}}}),eM,tM=Kk(()=>{YA(),eM=async e=>{if(typeof e==`string`){let t=await fetch(e);if(!t.ok)throw Error(`failed to load external data file: ${e}`);let n=t.headers.get(`Content-Length`),r=n?parseInt(n,10):0;if(r<1073741824)return new Uint8Array(await t.arrayBuffer());{if(!t.body)throw Error(`failed to load external data file: ${e}, no response body.`);let n=t.body.getReader(),i;try{i=new ArrayBuffer(r)}catch(e){if(e instanceof RangeError){let e=Math.ceil(r/65536);i=new WebAssembly.Memory({initial:e,maximum:e}).buffer}else throw e}let a=0;for(;;){let{done:e,value:t}=await n.read();if(e)break;let r=t.byteLength;new Uint8Array(i,a,r).set(t),a+=r}return new Uint8Array(i,0,r)}}else return e instanceof Blob?new Uint8Array(await e.arrayBuffer()):e instanceof Uint8Array?e:new Uint8Array(e)}}),nM,rM=Kk(()=>{$j(),nM=(e,t)=>new(Jj(t))(e)}),iM,aM,oM,sM,cM,lM,uM,dM=Kk(()=>{$j(),iM=[`V`,`I`,`W`,`E`,`F`],aM=(e,t)=>{console.log(`[${iM[e]},${new Date().toISOString()}]${t}`)},cM=(e,t)=>{oM=e,sM=t},lM=(e,t)=>{let n=Yj(e);n>=Yj(oM)&&aM(n,typeof t==`function`?t():t)},uM=(...e)=>{sM&&lM(...e)}}),fM,pM,mM,hM,gM,_M,vM,yM,bM,xM,SM,CM=Kk(()=>{$j(),dM(),fM=new Map([[`float32`,32],[`float16`,16],[`int32`,32],[`uint32`,32],[`int64`,64],[`uint64`,64],[`int8`,8],[`uint8`,8],[`int4`,4],[`uint4`,4]]),pM=(e,t)=>{if(t===`int32`)return e;let n=fM.get(t);if(!n)throw Error(`WebNN backend does not support data type: ${t}`);let r=n/8;if(e.byteLength%r!==0)throw Error(`Invalid Uint8Array length - must be a multiple of ${r}.`);let i=e.byteLength/r,a=new(Jj(t))(e.buffer,e.byteOffset,i);switch(t){case`int64`:case`uint64`:{let e=new Int32Array(i);for(let t=0;t2147483647n||n<-2147483648n)throw Error(`Can not convert int64 data to int32 - value out of range.`);e[t]=Number(n)}return new Uint8Array(e.buffer)}case`int8`:case`uint8`:case`uint32`:{if(t===`uint32`&&a.some(e=>e>2147483647))throw Error(`Can not convert uint32 data to int32 - value out of range.`);let e=Int32Array.from(a,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from ${t} to 'int32'`)}},mM=(e,t)=>{if(t===`int32`)return e;if(e.byteLength%4!=0)throw Error(`Invalid Uint8Array length - must be a multiple of 4 (int32).`);let n=e.byteLength/4,r=new Int32Array(e.buffer,e.byteOffset,n);switch(t){case`int64`:{let e=BigInt64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`uint64`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uin64 - negative value found.`);let e=BigUint64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`int8`:{if(r.some(e=>e<-128||e>127))throw Error(`Can not convert int32 data to int8 - value out of range.`);let e=Int8Array.from(r,Number);return new Uint8Array(e.buffer)}case`uint8`:if(r.some(e=>e<0||e>255))throw Error(`Can not convert int32 data to uint8 - value out of range.`);return Uint8Array.from(r,Number);case`uint32`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uint32 - negative value found.`);let e=Uint32Array.from(r,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from 'int32' to ${t}`)}},hM=1,gM=()=>hM++,_M=new Map([[`int8`,`int32`],[`uint8`,`int32`],[`uint32`,`int32`],[`int64`,`int32`]]),vM=(e,t)=>{let n=fM.get(e);if(!n)throw Error(`WebNN backend does not support data type: ${e}`);return t.length>0?Math.ceil(t.reduce((e,t)=>e*t)*n/8):0},yM=class{constructor(e){this.isDataConverted=!1;let{sessionId:t,context:n,tensor:r,dataType:i,shape:a,fallbackDataType:o}=e;this.sessionId=t,this.mlContext=n,this.mlTensor=r,this.dataType=i,this.tensorShape=a,this.fallbackDataType=o}get tensor(){return this.mlTensor}get type(){return this.dataType}get fallbackType(){return this.fallbackDataType}get shape(){return this.tensorShape}get byteLength(){return vM(this.dataType,this.tensorShape)}destroy(){uM(`verbose`,()=>`[WebNN] TensorWrapper.destroy`),this.mlTensor.destroy()}write(e){this.mlContext.writeTensor(this.mlTensor,e)}async read(e){if(this.fallbackDataType){let t=await this.mlContext.readTensor(this.mlTensor),n=mM(new Uint8Array(t),this.dataType);if(e){(e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).set(n);return}else return n.buffer}else return e?this.mlContext.readTensor(this.mlTensor,e):this.mlContext.readTensor(this.mlTensor)}canReuseTensor(e,t,n){return this.mlContext===e&&this.dataType===t&&this.tensorShape.length===n.length&&this.tensorShape.every((e,t)=>e===n[t])}setIsDataConverted(e){this.isDataConverted=e}},bM=class{constructor(e,t){this.tensorManager=e,this.wrapper=t}get tensorWrapper(){return this.wrapper}releaseTensor(){this.tensorWrapper&&(this.tensorManager.releaseTensor(this.tensorWrapper),this.wrapper=void 0)}async ensureTensor(e,t,n,r){let i=this.tensorManager.getMLContext(e),a=this.tensorManager.getMLOpSupportLimits(e),o;if(!a?.input.dataTypes.includes(t)){if(o=_M.get(t),!o||a?.input.dataTypes.includes(o))throw Error(`WebNN backend does not support data type: ${t}`);uM(`verbose`,()=>`[WebNN] TensorIdTracker.ensureTensor: fallback dataType from ${t} to ${o}`)}if(this.wrapper){if(this.wrapper.canReuseTensor(i,t,n))return this.wrapper.tensor;if(r){if(this.wrapper.byteLength!==vM(t,n))throw Error(`Unable to copy data to tensor with different size.`);this.activeUpload=new Uint8Array(await this.wrapper.read())}this.tensorManager.releaseTensor(this.wrapper)}let s=typeof MLTensorUsage>`u`?void 0:MLTensorUsage.READ|MLTensorUsage.WRITE;return this.wrapper=await this.tensorManager.getCachedTensor(e,t,n,s,!0,!0,o),r&&this.activeUpload&&(this.wrapper.write(this.activeUpload),this.activeUpload=void 0),this.wrapper.tensor}upload(e){let t=e;if(this.wrapper){if(this.wrapper.fallbackType)if(this.wrapper.fallbackType===`int32`)t=pM(e,this.wrapper.type),this.wrapper.setIsDataConverted(!0);else throw Error(`Unsupported fallback data type: ${this.wrapper.fallbackType}`);if(e.byteLength===this.wrapper.byteLength){this.wrapper.write(t);return}else uM(`verbose`,()=>`Data size does not match tensor size. Releasing tensor.`),this.releaseTensor()}this.activeUpload?this.activeUpload.set(t):this.activeUpload=new Uint8Array(t)}async download(e){if(this.activeUpload){let t=this.wrapper?.isDataConverted?mM(this.activeUpload,this.wrapper?.type):this.activeUpload;if(e){e instanceof ArrayBuffer?new Uint8Array(e).set(t):new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(t);return}else return t.buffer}if(!this.wrapper)throw Error(`Tensor has not been created.`);return e?this.wrapper.read(e):this.wrapper.read()}},xM=class{constructor(e){this.backend=e,this.tensorTrackersById=new Map,this.freeTensors=[],this.externalTensors=new Set}getMLContext(e){let t=this.backend.getMLContext(e);if(!t)throw Error(`MLContext not found for session.`);return t}getMLOpSupportLimits(e){return this.backend.getMLOpSupportLimits(e)}reserveTensorId(){let e=gM();return this.tensorTrackersById.set(e,new bM(this)),e}releaseTensorId(e){let t=this.tensorTrackersById.get(e);t&&(this.tensorTrackersById.delete(e),t.tensorWrapper&&this.releaseTensor(t.tensorWrapper))}async ensureTensor(e,t,n,r,i){uM(`verbose`,()=>`[WebNN] TensorManager.ensureTensor {tensorId: ${t}, dataType: ${n}, shape: ${r}, copyOld: ${i}}`);let a=this.tensorTrackersById.get(t);if(!a)throw Error(`Tensor not found.`);return a.ensureTensor(e,n,r,i)}upload(e,t){let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);n.upload(t)}async download(e,t){uM(`verbose`,()=>`[WebNN] TensorManager.download {tensorId: ${e}, dstBuffer: ${t?.byteLength}}`);let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);return n.download(t)}releaseTensorsForSession(e){for(let t of this.freeTensors)t.sessionId===e&&t.destroy();this.freeTensors=this.freeTensors.filter(t=>t.sessionId!==e)}registerTensor(e,t,n,r){let i=this.getMLContext(e),a=gM(),o=new yM({sessionId:e,context:i,tensor:t,dataType:n,shape:r});return this.tensorTrackersById.set(a,new bM(this,o)),this.externalTensors.add(o),a}async getCachedTensor(e,t,n,r,i,a,o){let s=this.getMLContext(e);for(let[r,i]of this.freeTensors.entries())if(i.canReuseTensor(s,t,n)){uM(`verbose`,()=>`[WebNN] Reusing tensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}`);let i=this.freeTensors.splice(r,1)[0];return i.sessionId=e,i}uM(`verbose`,()=>`[WebNN] MLContext.createTensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}}`);let c=await s.createTensor({dataType:o??t,shape:n,dimensions:n,usage:r,writable:i,readable:a});return new yM({sessionId:e,context:s,tensor:c,dataType:t,shape:n,fallbackDataType:o})}releaseTensor(e){this.externalTensors.has(e)&&this.externalTensors.delete(e),this.freeTensors.push(e)}},SM=(...e)=>new xM(...e)}),wM={};qk(wM,{WebNNBackend:()=>DM});var TM,EM,DM,OM=Kk(()=>{$j(),Aj(),rM(),CM(),dM(),TM=new Map([[1,`float32`],[10,`float16`],[6,`int32`],[12,`uint32`],[7,`int64`],[13,`uint64`],[22,`int4`],[21,`uint4`],[3,`int8`],[2,`uint8`],[9,`uint8`]]),EM=(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((n,i)=>n===r[i]&&e[n]===t[n])},DM=class{constructor(e){this.tensorManager=SM(this),this.mlContextBySessionId=new Map,this.sessionIdsByMLContext=new Map,this.mlContextCache=[],this.sessionGraphInputs=new Map,this.sessionGraphOutputs=new Map,this.temporaryGraphInputs=[],this.temporaryGraphOutputs=[],this.temporarySessionTensorIds=new Map,this.mlOpSupportLimitsBySessionId=new Map,cM(e.logLevel,!!e.debug)}get currentSessionId(){if(this.activeSessionId===void 0)throw Error(`No active session`);return this.activeSessionId}onRunStart(e){uM(`verbose`,()=>`[WebNN] onRunStart {sessionId: ${e}}`),this.activeSessionId=e}onRunEnd(e){uM(`verbose`,()=>`[WebNN] onRunEnd {sessionId: ${e}}`);let t=this.temporarySessionTensorIds.get(e);if(t){for(let e of t)uM(`verbose`,()=>`[WebNN] releasing temporary tensor {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e);this.temporarySessionTensorIds.delete(e),this.activeSessionId=void 0}}async createMLContext(e){if(e instanceof GPUDevice){let t=this.mlContextCache.findIndex(t=>t.gpuDevice===e);if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({gpuDevice:e,mlContext:t}),t}}else if(e===void 0){let e=this.mlContextCache.findIndex(e=>e.options===void 0&&e.gpuDevice===void 0);if(e!==-1)return this.mlContextCache[e].mlContext;{let e=await navigator.ml.createContext();return this.mlContextCache.push({mlContext:e}),e}}let t=this.mlContextCache.findIndex(t=>EM(t.options,e));if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({options:e,mlContext:t}),t}}registerMLContext(e,t){this.mlContextBySessionId.set(e,t);let n=this.sessionIdsByMLContext.get(t);n||(n=new Set,this.sessionIdsByMLContext.set(t,n)),n.add(e),this.mlOpSupportLimitsBySessionId.has(e)||this.mlOpSupportLimitsBySessionId.set(e,t.opSupportLimits()),this.temporaryGraphInputs.length>0&&(this.sessionGraphInputs.set(e,this.temporaryGraphInputs),this.temporaryGraphInputs=[]),this.temporaryGraphOutputs.length>0&&(this.sessionGraphOutputs.set(e,this.temporaryGraphOutputs),this.temporaryGraphOutputs=[])}onReleaseSession(e){this.sessionGraphInputs.delete(e),this.sessionGraphOutputs.delete(e);let t=this.mlContextBySessionId.get(e);if(!t)return;this.tensorManager.releaseTensorsForSession(e),this.mlContextBySessionId.delete(e),this.mlOpSupportLimitsBySessionId.delete(e);let n=this.sessionIdsByMLContext.get(t);if(n.delete(e),n.size===0){this.sessionIdsByMLContext.delete(t);let e=this.mlContextCache.findIndex(e=>e.mlContext===t);e!==-1&&this.mlContextCache.splice(e,1)}}getMLContext(e){return this.mlContextBySessionId.get(e)}getMLOpSupportLimits(e){return this.mlOpSupportLimitsBySessionId.get(e)}reserveTensorId(){return this.tensorManager.reserveTensorId()}releaseTensorId(e){uM(`verbose`,()=>`[WebNN] releaseTensorId {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e)}async ensureTensor(e,t,n,r,i){let a=TM.get(n);if(!a)throw Error(`Unsupported ONNX data type: ${n}`);return this.tensorManager.ensureTensor(e??this.currentSessionId,t,a,r,i)}async createTemporaryTensor(e,t,n){uM(`verbose`,()=>`[WebNN] createTemporaryTensor {onnxDataType: ${t}, shape: ${n}}`);let r=TM.get(t);if(!r)throw Error(`Unsupported ONNX data type: ${t}`);let i=this.tensorManager.reserveTensorId();await this.tensorManager.ensureTensor(e,i,r,n,!1);let a=this.temporarySessionTensorIds.get(e);return a?a.push(i):this.temporarySessionTensorIds.set(e,[i]),i}uploadTensor(e,t){if(!kj().shouldTransferToMLTensor)throw Error(`Trying to upload to a MLTensor while shouldTransferToMLTensor is false`);uM(`verbose`,()=>`[WebNN] uploadTensor {tensorId: ${e}, data: ${t.byteLength}}`),this.tensorManager.upload(e,t)}async downloadTensor(e,t){return this.tensorManager.download(e,t)}createMLTensorDownloader(e,t){return async()=>{let n=await this.tensorManager.download(e);return nM(n,t)}}registerMLTensor(e,t,n,r){let i=TM.get(n);if(!i)throw Error(`Unsupported ONNX data type: ${n}`);let a=this.tensorManager.registerTensor(e,t,i,r);return uM(`verbose`,()=>`[WebNN] registerMLTensor {tensor: ${t}, dataType: ${i}, dimensions: ${r}} -> {tensorId: ${a}}`),a}registerMLConstant(e,t,n,r,i,a,o=!1){if(!a)throw Error(`External mounted files are not available.`);let s=e;e.startsWith(`./`)&&(s=e.substring(2));let c=a.get(s);if(!c)throw Error(`File with name ${s} not found in preloaded files.`);if(t+n>c.byteLength)throw Error(`Out of bounds: data offset and length exceed the external file data size.`);let l=c.slice(t,t+n).buffer,u;switch(i.dataType){case`float32`:u=new Float32Array(l);break;case`float16`:u=typeof Float16Array<`u`&&Float16Array.from?new Float16Array(l):new Uint16Array(l);break;case`int32`:u=new Int32Array(l);break;case`uint32`:u=new Uint32Array(l);break;case`int64`:if(o){let e=pM(new Uint8Array(l),`int64`);u=new Int32Array(e.buffer),i.dataType=`int32`}else u=new BigInt64Array(l);break;case`uint64`:u=new BigUint64Array(l);break;case`int8`:u=new Int8Array(l);break;case`int4`:case`uint4`:case`uint8`:u=new Uint8Array(l);break;default:throw Error(`Unsupported data type: ${i.dataType} in creating WebNN Constant from external data.`)}return uM(`verbose`,()=>`[WebNN] registerMLConstant {dataType: ${i.dataType}, shape: ${i.shape}}} ${o?`(Note: it was int64 data type and registered to int32 as workaround)`:``}`),r.constant(i,u)}registerGraphInput(e){this.temporaryGraphInputs.push(e)}registerGraphOutput(e){this.temporaryGraphOutputs.push(e)}isGraphInput(e,t){let n=this.sessionGraphInputs.get(e);return n?n.includes(t):!1}isGraphOutput(e,t){let n=this.sessionGraphOutputs.get(e);return n?n.includes(t):!1}isGraphInputOutputTypeSupported(e,t,n=!0){let r=TM.get(Gj(t)),i=this.mlOpSupportLimitsBySessionId.get(e);return typeof r>`u`?!1:n?!!i?.input.dataTypes.includes(r):!!i?.output.dataTypes.includes(r)}flush(){}}}),kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,zM,BM,VM,HM=Kk(()=>{JA(),Ij(),Wj(),$j(),Aj(),Pj(),tM(),kM=(e,t)=>{kj()._OrtInit(e,t)!==0&&Nj(`Can't initialize onnxruntime.`)},AM=async e=>{kM(e.wasm.numThreads,Yj(e.logLevel))},jM=async(e,t)=>{kj().asyncInit?.();let n=e.webgpu.adapter;if(t===`webgpu`){if(typeof navigator>`u`||!navigator.gpu)throw Error(`WebGPU is not supported in current environment`);if(n){if(typeof n.limits!=`object`||typeof n.features!=`object`||typeof n.requestDevice!=`function`)throw Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let t=e.webgpu.powerPreference;if(t!==void 0&&t!==`low-power`&&t!==`high-performance`)throw Error(`Invalid powerPreference setting: "${t}"`);let r=e.webgpu.forceFallbackAdapter;if(r!==void 0&&typeof r!=`boolean`)throw Error(`Invalid forceFallbackAdapter setting: "${r}"`);if(n=await navigator.gpu.requestAdapter({powerPreference:t,forceFallbackAdapter:r}),!n)throw Error(`Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.`)}}if(t===`webnn`&&(typeof navigator>`u`||!navigator.ml))throw Error(`WebNN is not supported in current environment`);if(t===`webgpu`&&kj().webgpuInit(t=>{e.webgpu.device=t}),t===`webnn`){let t=new(OM(),Yk(wM)).WebNNBackend(e);kj().webnnInit([t,()=>t.reserveTensorId(),e=>t.releaseTensorId(e),async(e,n,r,i,a)=>t.ensureTensor(e,n,r,i,a),(e,n)=>{t.uploadTensor(e,n)},async(e,n)=>t.downloadTensor(e,n),(e,n)=>t.registerMLContext(e,n),!!e.trace])}},MM=new Map,NM=e=>{let t=kj(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetInputOutputCount(e,r,r+n)!==0&&Nj(`Can't get session input/output count.`);let i=n===4?`i32`:`i64`;return[Number(t.getValue(r,i)),Number(t.getValue(r+n,i))]}finally{t.stackRestore(n)}},PM=(e,t)=>{let n=kj(),r=n.stackSave(),i=0;try{let r=n.PTR_SIZE,a=n.stackAlloc(2*r);n._OrtGetInputOutputMetadata(e,t,a,a+r)!==0&&Nj(`Can't get session input/output metadata.`);let o=Number(n.getValue(a,`*`));i=Number(n.getValue(a+r,`*`));let s=n.HEAP32[i/4];if(s===0)return[o,0];let c=n.HEAPU32[i/4+1],l=[];for(let e=0;e{let t=kj(),n=t._malloc(e.byteLength);if(n===0)throw Error(`Can't create a session. failed to allocate a buffer of size ${e.byteLength}.`);return t.HEAPU8.set(e,n),[n,e.byteLength]},IM=async(e,t)=>{let n,r,i=kj();Array.isArray(e)?[n,r]=e:e.buffer===i.HEAPU8.buffer?[n,r]=[e.byteOffset,e.byteLength]:[n,r]=FM(e);let a=0,o=0,s=0,c=[],l=[],u=[];try{if([o,c]=await Uj(t),t?.externalData&&i.mountExternalData){let e=[];for(let n of t.externalData){let t=typeof n==`string`?n:n.path;e.push(eM(typeof n==`string`?n:n.data).then(e=>{i.mountExternalData(t,e)}))}await Promise.all(e)}for(let e of t?.executionProviders??[])if((typeof e==`string`?e:e.name)===`webnn`){if(i.shouldTransferToMLTensor=!1,typeof e!=`string`){let t=e,n=t?.context,r=t?.gpuDevice,a=t?.deviceType,o=t?.powerPreference;n?i.currentContext=n:r?i.currentContext=await i.webnnCreateMLContext(r):i.currentContext=await i.webnnCreateMLContext({deviceType:a,powerPreference:o})}else i.currentContext=await i.webnnCreateMLContext();break}a=await i._OrtCreateSession(n,r,o),i.webgpuOnCreateSession?.(a),a===0&&Nj(`Can't create a session.`),i.jsepOnCreateSession?.(),i.currentContext&&(i.webnnRegisterMLContext(a,i.currentContext),i.currentContext=void 0,i.shouldTransferToMLTensor=!0);let[e,d]=NM(a),f=!!t?.enableGraphCapture,p=[],m=[],h=[],g=[],_=[];for(let t=0;te===`gpu-buffer`||e===`ml-tensor`||e===`ml-tensor-cpu-output`)&&(s=i._OrtCreateBinding(a),s===0&&Nj(`Can't create IO binding.`),v={handle:s,outputPreferredLocations:_,outputPreferredLocationsEncoded:_.map(e=>e===`ml-tensor-cpu-output`?`ml-tensor`:e).map(e=>Qj(e))}),MM.set(a,[a,l,u,v,f,!1]),[a,p,m,h,g]}catch(e){throw l.forEach(e=>i._OrtFree(e)),u.forEach(e=>i._OrtFree(e)),s!==0&&i._OrtReleaseBinding(s)!==0&&Nj(`Can't release IO binding.`),a!==0&&i._OrtReleaseSession(a)!==0&&Nj(`Can't release session.`),e}finally{i._free(n),o!==0&&i._OrtReleaseSessionOptions(o)!==0&&Nj(`Can't release session options.`),c.forEach(e=>i._free(e)),i.unmountExternalData?.()}},LM=e=>{let t=kj(),n=MM.get(e);if(!n)throw Error(`cannot release session. invalid session id: ${e}`);let[r,i,a,o,s]=n;o&&(s&&t._OrtClearBoundOutputs(o.handle)!==0&&Nj(`Can't clear bound outputs.`),t._OrtReleaseBinding(o.handle)!==0&&Nj(`Can't release IO binding.`)),t.jsepOnReleaseSession?.(e),t.webnnOnReleaseSession?.(e),t.webgpuOnReleaseSession?.(e),i.forEach(e=>t._OrtFree(e)),a.forEach(e=>t._OrtFree(e)),t._OrtReleaseSession(r)!==0&&Nj(`Can't release session.`),MM.delete(e)},RM=async(e,t,n,r,i,a,o=!1)=>{if(!e){t.push(0);return}let s=kj(),c=s.PTR_SIZE,l=e[0],u=e[1],d=e[3],f=d,p,m;if(l===`string`&&(d===`gpu-buffer`||d===`ml-tensor`))throw Error(`String tensor is not supported on GPU.`);if(o&&d!==`gpu-buffer`)throw Error(`External buffer must be provided for input/output index ${a} when enableGraphCapture is true.`);if(d===`gpu-buffer`){let t=e[2].gpuBuffer;m=qj(Gj(l),u);{let e=s.webgpuRegisterBuffer;if(!e)throw Error(`Tensor location "gpu-buffer" is not supported without using WebGPU.`);p=e(t,r)}}else if(d===`ml-tensor`){let t=e[2].mlTensor;m=qj(Gj(l),u);let n=s.webnnRegisterMLTensor;if(!n)throw Error(`Tensor location "ml-tensor" is not supported without using WebNN.`);p=n(r,t,Gj(l),u)}else{let t=e[2];if(Array.isArray(t)){m=c*t.length,p=s._malloc(m),n.push(p);for(let e=0;es.setValue(g+t*c,e,c===4?`i32`:`i64`));let e=s._OrtCreateTensor(Gj(l),p,m,g,u.length,Qj(f));e===0&&Nj(`Can't create tensor for input/output. session=${r}, index=${a}.`),t.push(e)}finally{s.stackRestore(h)}},zM=async(e,t,n,r,i,a)=>{let o=kj(),s=o.PTR_SIZE,c=MM.get(e);if(!c)throw Error(`cannot run inference. invalid session id: ${e}`);let l=c[0],u=c[1],d=c[2],f=c[3],p=c[4],m=c[5],h=t.length,g=r.length,_=0,v=[],y=[],b=[],x=[],ee=[],S=o.stackSave(),C=o.stackAlloc(h*s),w=o.stackAlloc(h*s),T=o.stackAlloc(g*s),te=o.stackAlloc(g*s);try{[_,v]=Fj(a),IA(`wasm prepareInputOutputTensor`);for(let r=0;re*t,1);u=Kj(a);let _=f?.outputPreferredLocations[r[t]];if(u===`string`){if(_===`gpu-buffer`||_===`ml-tensor`)throw Error(`String tensor is not supported on GPU.`);let e=[];for(let t=0;t0){let t=o.webgpuGetBuffer;if(!t)throw Error(`preferredLocation "gpu-buffer" is not supported without using WebGPU.`);let r=t(d),i=qj(a,g);if(i===void 0||!Xj(u))throw Error(`Unsupported data type: ${u}`);l=!0;{o.webgpuRegisterBuffer(r,e,d);let t=o.webgpuCreateDownloader(r,i,e);S.push([u,h,{gpuBuffer:r,download:async()=>{let e=await t();return new(Jj(u))(e)},dispose:()=>{o._OrtReleaseTensor(n)!==0&&Nj(`Can't release tensor.`)}},`gpu-buffer`])}}else if(_===`ml-tensor`&&g>0){let t=o.webnnEnsureTensor,r=o.webnnIsGraphInputOutputTypeSupported;if(!t||!r)throw Error(`preferredLocation "ml-tensor" is not supported without using WebNN.`);if(qj(a,g)===void 0||!Zj(u))throw Error(`Unsupported data type: ${u}`);if(!r(e,u,!1))throw Error(`preferredLocation "ml-tensor" for ${u} output is not supported by current WebNN Context.`);let i=await t(e,d,a,h,!1);l=!0,S.push([u,h,{mlTensor:i,download:o.webnnCreateMLTensorDownloader(d,u),dispose:()=>{o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n)}},`ml-tensor`])}else if(_===`ml-tensor-cpu-output`&&g>0){let e=o.webnnCreateMLTensorDownloader(d,u)(),t=S.length;l=!0,ne.push((async()=>{let r=[t,await e];return o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n),r})()),S.push([u,h,[],`cpu`])}else{let e=new(Jj(u))(g);new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(o.HEAPU8.subarray(d,d+e.byteLength)),S.push([u,h,e,`cpu`])}}finally{o.stackRestore(a),u===`string`&&d&&o._free(d),l||o._OrtReleaseTensor(n)}}f&&!p&&(o._OrtClearBoundOutputs(f.handle)!==0&&Nj(`Can't clear bound outputs.`),MM.set(e,[l,u,d,f,p,!1]));for(let[e,t]of await Promise.all(ne))S[e][2]=t;return LA(`wasm ProcessOutputTensor`),S}finally{o.webnnOnRunEnd?.(l),o.stackRestore(S),n.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),i.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),y.forEach(e=>o._OrtReleaseTensor(e)),b.forEach(e=>o._OrtReleaseTensor(e)),x.forEach(e=>o._free(e)),_!==0&&o._OrtReleaseRunOptions(_),v.forEach(e=>o._free(e))}},BM=e=>{let t=kj(),n=MM.get(e);if(!n)throw Error(`invalid session id`);let r=n[0],i=t._OrtEndProfiling(r);i===0&&Nj(`Can't get an profile file name.`),t._OrtFree(i)},VM=e=>{let t=[];for(let n of e){let e=n[2];!Array.isArray(e)&&`buffer`in e&&t.push(e.buffer)}return t}}),UM,WM,GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN=Kk(()=>{JA(),HM(),Aj(),bj(),UM=()=>!!cA.wasm.proxy&&typeof document<`u`,GM=!1,KM=!1,qM=!1,XM=new Map,ZM=(e,t)=>{let n=XM.get(e);n?n.push(t):XM.set(e,[t])},QM=()=>{if(GM||!KM||qM||!WM)throw Error(`worker not ready`)},$M=e=>{switch(e.data.type){case`init-wasm`:GM=!1,e.data.err?(qM=!0,YM[1](e.data.err)):(KM=!0,YM[0]()),JM&&=(URL.revokeObjectURL(JM),void 0);break;case`init-ep`:case`copy-from`:case`create`:case`release`:case`run`:case`end-profiling`:{let t=XM.get(e.data.type);e.data.err?t.shift()[1](e.data.err):t.shift()[0](e.data.out);break}default:}},eN=async()=>{if(!KM){if(GM)throw Error(`multiple calls to 'initWasm()' detected.`);if(qM)throw Error(`previous call to 'initWasm()' failed.`);if(GM=!0,UM())return new Promise((e,t)=>{WM?.terminate(),_j().then(([n,r])=>{try{WM=r,WM.onerror=e=>t(e),WM.onmessage=$M,YM=[e,t];let i={type:`init-wasm`,in:cA};!i.in.wasm.wasmPaths&&(n||sj)&&(i.in.wasm.wasmPaths={wasm:new URL(`/assets/ort-wasm-simd-threaded.asyncify-COni_aV6.wasm`,``+import.meta.url).href}),WM.postMessage(i),JM=n}catch(e){t(e)}},t)});try{await Oj(cA.wasm),await AM(cA),KM=!0}catch(e){throw qM=!0,e}finally{GM=!1}}},tN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`init-ep`,[t,n]);let r={type:`init-ep`,in:{epName:e,env:cA}};WM.postMessage(r)});await jM(cA,e)},nN=async e=>UM()?(QM(),new Promise((t,n)=>{ZM(`copy-from`,[t,n]);let r={type:`copy-from`,in:{buffer:e}};WM.postMessage(r,[e.buffer])})):FM(e),rN=async(e,t)=>{if(UM()){if(t?.preferredOutputLocation)throw Error(`session option "preferredOutputLocation" is not supported for proxy.`);return QM(),new Promise((n,r)=>{ZM(`create`,[n,r]);let i={type:`create`,in:{model:e,options:{...t}}},a=[];e instanceof Uint8Array&&a.push(e.buffer),WM.postMessage(i,a)})}else return IM(e,t)},iN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`release`,[t,n]);let r={type:`release`,in:e};WM.postMessage(r)});LM(e)},aN=async(e,t,n,r,i,a)=>{if(UM()){if(n.some(e=>e[3]!==`cpu`))throw Error(`input tensor on GPU is not supported for proxy.`);if(i.some(e=>e))throw Error(`pre-allocated output tensor is not supported for proxy.`);return QM(),new Promise((i,o)=>{ZM(`run`,[i,o]);let s=n,c={type:`run`,in:{sessionId:e,inputIndices:t,inputs:s,outputIndices:r,options:a}};WM.postMessage(c,VM(s))})}else return zM(e,t,n,r,i,a)},oN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`end-profiling`,[t,n]);let r={type:`end-profiling`,in:e};WM.postMessage(r)});BM(e)}}),cN,lN,uN,dN=Kk(()=>{JA(),sN(),$j(),YA(),tM(),cN=(e,t)=>{switch(e.location){case`cpu`:return[e.type,e.dims,e.data,`cpu`];case`gpu-buffer`:return[e.type,e.dims,{gpuBuffer:e.gpuBuffer},`gpu-buffer`];case`ml-tensor`:return[e.type,e.dims,{mlTensor:e.mlTensor},`ml-tensor`];default:throw Error(`invalid data location: ${e.location} for ${t()}`)}},lN=e=>{switch(e[3]){case`cpu`:return new AA(e[0],e[2],e[1]);case`gpu-buffer`:{let t=e[0];if(!Xj(t))throw Error(`not supported data type: ${t} for deserializing GPU tensor`);let{gpuBuffer:n,download:r,dispose:i}=e[2];return AA.fromGpuBuffer(n,{dataType:t,dims:e[1],download:r,dispose:i})}case`ml-tensor`:{let t=e[0];if(!Zj(t))throw Error(`not supported data type: ${t} for deserializing MLTensor tensor`);let{mlTensor:n,download:r,dispose:i}=e[2];return AA.fromMLTensor(n,{dataType:t,dims:e[1],download:r,dispose:i})}default:throw Error(`invalid data location: ${e[3]}`)}},uN=class{async fetchModelAndCopyToWasmMemory(e){return nN(await eM(e))}async loadModel(e,t){PA();let n;n=typeof e==`string`?await this.fetchModelAndCopyToWasmMemory(e):e,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await rN(n,t),FA()}async dispose(){return iN(this.sessionId)}async run(e,t,n){PA();let r=[],i=[];Object.entries(e).forEach(e=>{let t=e[0],n=e[1],a=this.inputNames.indexOf(t);if(a===-1)throw Error(`invalid input '${t}'`);r.push(n),i.push(a)});let a=[],o=[];Object.entries(t).forEach(e=>{let t=e[0],n=e[1],r=this.outputNames.indexOf(t);if(r===-1)throw Error(`invalid output '${t}'`);a.push(n),o.push(r)});let s=r.map((e,t)=>cN(e,()=>`input "${this.inputNames[i[t]]}"`)),c=a.map((e,t)=>e?cN(e,()=>`output "${this.outputNames[o[t]]}"`):null),l=await aN(this.sessionId,i,s,o,c,n),u={};for(let e=0;emN,initializeFlags:()=>pN,wasmBackend:()=>hN});var pN,mN,hN,gN=Kk(()=>{JA(),sN(),dN(),pN=()=>{(typeof cA.wasm.initTimeout!=`number`||cA.wasm.initTimeout<0)&&(cA.wasm.initTimeout=0);let e=cA.wasm.simd;if(typeof e!=`boolean`&&e!==void 0&&e!==`fixed`&&e!==`relaxed`&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${e}". Reset it to \`false\` and ignore SIMD feature checking.`),cA.wasm.simd=!1),typeof cA.wasm.proxy!=`boolean`&&(cA.wasm.proxy=!1),typeof cA.wasm.trace!=`boolean`&&(cA.wasm.trace=!1),typeof cA.wasm.numThreads!=`number`||!Number.isInteger(cA.wasm.numThreads)||cA.wasm.numThreads<=0)if(typeof self<`u`&&!self.crossOriginIsolated)cA.wasm.numThreads=1;else{let e=typeof navigator>`u`?Gk(`node:os`).cpus().length:navigator.hardwareConcurrency;cA.wasm.numThreads=Math.min(4,Math.ceil((e||1)/2))}},mN=class{async init(e){pN(),await eN(),await tN(e)}async createInferenceSessionHandler(e,t){let n=new uN;return await n.loadModel(e,t),n}},hN=new mN});JA(),JA(),JA();var _N=`1.25.0-dev.20260303-e7e64dc112`,vN=qA;{let e=(gN(),Yk(fN)).wasmBackend;Qk(`webgpu`,e,5),Qk(`webnn`,e,5),Qk(`cpu`,e,10),Qk(`wasm`,e,10)}Object.defineProperty(cA.versions,`web`,{value:_N,enumerable:!0});var yN=`warning`;Object.defineProperty({wasm:{},webgl:{},webgpu:{},versions:{common:`1.24.3`},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);yN=e}},get logLevel(){return yN}},`logLevel`,{enumerable:!0});const bN=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t {if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,SN(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(SN(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return SN(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},wN=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new PN({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},TN=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new PN({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},EN=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new PN({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},DN=(e,t,n)=>new PN({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),ON=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),kN=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);var AN=!1;const jN=()=>{if(!AN){AN=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(ON.set(`int64`,BigInt64Array),kN.set(BigInt64Array,`int64`)),t&&(ON.set(`uint64`,BigUint64Array),kN.set(BigUint64Array,`uint64`)),r?(ON.set(`float16`,n),kN.set(n,`float16`)):ON.set(`float16`,Uint16Array)}},MN=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new PN(e.type,e.data,t);case`cpu-pinned`:return new PN({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new PN({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new PN({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new PN({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var PN=class{constructor(e,t,n){jN();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=ON.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=ON.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=kN.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=MN(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return CN(e,t)}static fromTexture(e,t){return wN(e,t)}static fromGpuBuffer(e,t){return TN(e,t)}static fromMLTensor(e,t){return EN(e,t)}static fromPinnedBuffer(e,t,n){return DN(e,t,n)}toDataURL(e){return bN(this,e)}toImageData(e){return xN(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return NN(this,e)}};const FN=PN;var IN=Object.defineProperty,LN=(e,t)=>{for(var n in t)IN(e,n,{get:t[n],enumerable:!0})},RN={},zN={},BN={},VN=`4.0.0-next.6`,HN=typeof self<`u`,UN=!hP(RN),WN=!hP(zN),GN=HN&&`caches`in self,KN=globalThis.Deno!==void 0;globalThis.Bun;var qN=KN&&GN&&!UN,JN=typeof process<`u`,YN=JN&&process?.release?.name===`node`&&!qN,XN=typeof window<`u`&&window.document!==void 0,ZN=HN&&[`DedicatedWorkerGlobalScope`,`ServiceWorkerGlobalScope`,`SharedWorkerGlobalScope`].includes(self.constructor?.name),QN=XN||ZN||qN,$N=YN||typeof navigator<`u`&&`gpu`in navigator,eP=typeof navigator<`u`&&`ml`in navigator,tP=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,nP=typeof chrome<`u`&&chrome.runtime!==void 0&&typeof chrome.runtime.id==`string`,rP=typeof ServiceWorkerGlobalScope<`u`&&HN&&self instanceof ServiceWorkerGlobalScope,iP=(()=>{if(typeof navigator>`u`)return!1;let e=navigator.userAgent,t=(navigator.vendor||``).indexOf(`Apple`)>-1,n=!e.match(/CriOS|FxiOS|EdgiOS|OPiOS|mercury|brave/i)&&!e.includes(`Chrome`)&&!e.includes(`Android`);return t&&n})(),aP=Object.freeze({IS_BROWSER_ENV:XN,IS_WEBWORKER_ENV:ZN,IS_WEB_ENV:QN,IS_SERVICE_WORKER_ENV:rP,IS_DENO_WEB_RUNTIME:qN,IS_WEB_CACHE_AVAILABLE:GN,IS_WEBGPU_AVAILABLE:$N,IS_WEBNN_AVAILABLE:eP,IS_SAFARI:iP,IS_PROCESS_AVAILABLE:JN,IS_NODE_ENV:YN,IS_FS_AVAILABLE:UN,IS_PATH_AVAILABLE:WN,IS_CRYPTO_AVAILABLE:tP,IS_CHROME_AVAILABLE:nP}),oP=UN&&WN,sP=`./`;if(oP){let e=Object(import.meta).url;e?sP=zN.dirname(zN.dirname(BN.fileURLToPath(e))):typeof __dirname<`u`&&(sP=zN.dirname(__dirname))}var cP=oP?zN.join(sP,`/.cache/`):null,lP=`/models/`,uP=oP?zN.join(sP,lP):lP,dP=typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0,fP=Object.freeze({DEBUG:10,INFO:20,WARNING:30,ERROR:40,NONE:50}),pP=fP.WARNING,mP={version:VN,backends:{onnx:{}},get logLevel(){return pP},set logLevel(e){pP=e,mP.backends.onnx?.setLogLevel?.(e)},allowRemoteModels:!0,remoteHost:`https://huggingface.co/`,remotePathTemplate:`{model}/resolve/{revision}/`,allowLocalModels:!(XN||ZN||qN),localModelPath:uP,useFS:UN,useBrowserCache:GN,useFSCache:UN,cacheDir:cP,useCustomCache:!1,customCache:null,useWasmCache:GN||UN,cacheKey:`transformers-cache`,fetch:dP};function hP(e){return Object.keys(e).length===0}function gP(e,t){e&&e(t)}function _P(e){return Number.isInteger(e)||typeof e==`bigint`}function vP(e){return e==null||e===-1}function yP(e){let t=[],n=e;for(;Array.isArray(n);)t.push(n.length),n=n[0];return t}function bP(...e){return Array.prototype.concat.apply([],e)}function xP(...e){return e.reduce((e,t)=>e.flatMap(e=>t.map(t=>[e,t])))}function SP(e,t){return Math.abs((e+t)%(2*t)-t)}function CP(e,t){return Object.assign({},...t.map(t=>{if(e[t]!==void 0)return{[t]:e[t]}}))}function wP(e,t){let n=0;for(let r of e)r===t&&++n;return n}var TP={error(...e){mP.logLevel<=fP.ERROR&&console.error(...e)},warn(...e){mP.logLevel<=fP.WARNING&&console.warn(...e)},info(...e){mP.logLevel<=fP.INFO&&console.log(...e)},debug(...e){mP.logLevel<=fP.DEBUG&&console.log(...e)},log(...e){this.info(...e)}},EP=class{constructor(e){this.trie=this._build_trie(e)}_build_trie(e){let t=Object.create(null);for(let n of e){let e=t;for(let t=0;tr&&t.push(e.slice(r,i)),t.push(o),i+=o.length,r=i):++i}return r{let e=[...Array.from({length:94},(e,t)=>t+33),...Array.from({length:12},(e,t)=>t+161),...Array.from({length:82},(e,t)=>t+174)],t=e.slice(),n=0;for(let r=0;r<256;++r)e.includes(r)||(e.push(r),t.push(256+n),n+=1);let r=t.map(e=>String.fromCharCode(e));return Object.fromEntries(e.map((e,t)=>[e,r[t]]))})(),kP=(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])))(OP),AP=`.,!?…。,、।۔،`,jP=new Map([[`(?i:'s|'t|'re|'ve|'m|'ll|'d)`,`(?:'([sS]|[tT]|[rR][eE]|[vV][eE]|[mM]|[lL][lL]|[dD]))`],[`(?i:[sdmt]|ll|ve|re)`,`(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])`],[`[^\\r\\n\\p{L}\\p{N}]?+`,`[^\\r\\n\\p{L}\\p{N}]?`],[`[^\\s\\p{L}\\p{N}]++`,`[^\\s\\p{L}\\p{N}]+`],[`(?>\\p{Nd}{510})`,`(?:\\p{Nd}{510})`],[`\\p{Nd}{3}+`,`(?:\\p{Nd}{3})+`],[`\\G`,``],[` ?[^(\\s|[${AP}])]+`,` ?[^\\s${AP}]+`]]),MP=`\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E`,NP=e=>e.replace(/ \./g,`.`).replace(/ \?/g,`?`).replace(/ \!/g,`!`).replace(/ ,/g,`,`).replace(/ \' /g,`'`).replace(/ n't/g,`n't`).replace(/ 'm/g,`'m`).replace(/ 's/g,`'s`).replace(/ 've/g,`'ve`).replace(/ 're/g,`'re`),PP=(e,t=!0)=>{if(e.Regex!==void 0){let t=e.Regex.replace(/\\([#&~])/g,`$1`);t=t.replace(/\\A/g,`^`).replace(/\\z/g,`$`).replace(/\\Z/g,`(?=\\r?\\n?$)`);for(let[e,n]of jP)t=t.replaceAll(e,n);try{return new RegExp(t,`gu`)}catch(e){if(!(e instanceof SyntaxError)||!e.message.toLowerCase().includes(`invalid property name`))throw e;let n=!1,r=t.replace(/(\\[pP])\{([^}=]+)\}/g,(e,t,r)=>{try{return RegExp(`\\p{${r}}`,`u`),`${t}{${r}}`}catch{return n=!0,`${t}{Script=${r}}`}});if(!n)throw e;try{return new RegExp(r,`gu`)}catch{throw e}}}else if(e.String!==void 0){let n=FP(e.String);return new RegExp(t?n:`(${n})`,`gu`)}else return console.warn(`Unknown pattern type:`,e),null},FP=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),IP=(e,t,n)=>{let r=[],i=0;for(;ie>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=63744&&e<=64255||e>=194560&&e<=195103,RP=e=>Number.isInteger(e)||typeof e==`bigint`,zP=e=>{let t=0;for(let n of e)++t;return t},BP=e=>WP(e.toLowerCase()),VP=(...e)=>Array.prototype.concat.apply([],e),HP=e=>new Map(Object.entries(e)),UP=(e,t)=>{let n=[],r=0;for(let i of e.matchAll(t)){let t=i[0];r0&&n.push(t),r=i.index+t.length}return re.replace(/\p{M}/gu,``),GP=(e,t,n=[])=>{if(!e||Array.isArray(e)||typeof e!=`object`)return`${t} must be a valid object`;for(let r of n)if(!(r in e))return`${t} must contain a "${r}" property`;return null},KP=e=>e.match(/\S+/g)||[],qP=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}},JP=class extends qP{constructor(e){super(),this.config=e}_call(e){return this.normalize(e)}},YP=class extends JP{tokenize_chinese_chars(e){let t=[];for(let n=0;n