@agentsky/desktop-ui 0.4.116 → 0.4.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/app.js +28 -28
  2. package/package.json +2 -2
package/dist/app.js CHANGED
@@ -501,15 +501,15 @@ ${a.trimStart()}`:e+a,n=!1)}return e}function uM(t){let e=t.messageId??t.id,n=Ar
501
501
  <${Fn} title="Let the agent browse this page?" busy=${e} confirmLabel="Share and Ask the Agent" busyLabel="Sharing…" onClose=${n} onConfirm=${s}>
502
502
  <p class="sheet-text">The agent loads pages in a browser that runs outside the sandbox, so localhost:${t} will be open to anyone who has its address until you stop sharing. The address is long and random, but it is not a sign-in. The agent is then asked to load the page; that load is billed like any other use of its tools.</p>
503
503
  <//>
504
- `}function Wk({chat:t,thread:e,payload:n,active:s=!0}){let a=t.sessionId,i=Fe(()=>f9(a),[a]),{tabs:r,activeId:o}=m9(i),l=r.find($e=>$e.id===o)??null,c=Fe(()=>im(e.items).actions.length>0,[e.items]),d=Fe(()=>Ak(e.items),[e.items]),[h,p]=y([]),[f,m]=y(()=>new Set),[b,g]=y(!1),[$,v]=y(n?.view==="activity"?"activity":l?"page":"start"),[w,x]=y(l?Jl(l):""),[T,k]=y(null),[A,E]=y(null),[S,_]=y(!1),[I,R]=y(!1),[P,O]=y(null),[Z,z]=y(""),[V,q]=y([]),[B,J]=y(""),[j,se]=y(!1),X=Q(null),H=Q(null),oe=e.status==="running"||e.status==="provisioning";D(()=>{let $e=!0;return Ia.ports({sessionId:a}).then(Oe=>{$e&&(p(Oe.ports.map(Re=>Re.port)),m(new Set(Oe.ports.filter(Re=>Re.shared).map(Re=>Re.port))),g(Oe.agentBrowses===!0))},()=>{}),()=>{$e=!1}},[a]),D(()=>{n?.view==="activity"?v("activity"):Number.isInteger(n?.port)&&(i.open({port:n.port,path:typeof n.path=="string"?n.path:"/"}),v("page"))},[n,i]);let ce=l?Jl(l):"";D(()=>{if(!o){v($e=>$e==="page"?"start":$e);return}document.activeElement!==X.current&&x(ce)},[o,ce]);let le=$==="page"&&l!==null,ae=le&&l.live&&l.ready&&!l.problem,de=ae&&s?l.id:null;_o(H,{shown:de!==null,place:$e=>Ia.place({tabId:$e?de:null,bounds:$e}),snapshot:()=>Ia.snapshot({tabId:de})},[de]);let he=$e=>{k(null),le?i.navigate(l.id,$e):i.open($e),v("page")},qe=$e=>{$e.preventDefault();let Oe=Pd(w);Oe.kind==="port"?he({port:Oe.port,path:Oe.path}):Oe.kind==="path"&&le?he({port:l.port,path:Oe.path}):Oe.kind==="external"?k({kind:"external",url:Oe.url}):k({kind:"error",text:`Enter an address in this chat's sandbox, like ${pm}.`}),X.current?.blur()},St=()=>Ia.openOutside({sessionId:a,port:l.port,path:l.path}).catch($e=>k({kind:"error",text:$e.message})),bt=async $e=>{_(!0);try{let{address:Oe}=await Ia.share({sessionId:a,port:$e.port,shared:!0});if(!Oe)throw new Error("The port could not be shared.");m(Re=>new Set([...Re,$e.port])),await xt.send({chatId:t.id,text:[`Load the page you serve at http://${Jl($e)} in a real browser and tell me what it shows.`,`I opened that port to the outside for this; its public address is ${Oe}${$e.path}.`,`Run: actl capability web.fetch url="${Oe}${$e.path}" --vendor tinyfish`].join(" ")})}catch(Oe){k({kind:"error",text:Oe.message})}finally{_(!1),E(null)}},Ue=async $e=>{_(!0);try{await Ia.share({sessionId:a,port:$e,shared:!1}),m(Oe=>new Set([...Oe].filter(Re=>Re!==$e)))}catch(Oe){k({kind:"error",text:Oe.message})}finally{_(!1)}},sn=async()=>{if(I){Ia.cancelPick({tabId:l.id}).catch(()=>{});return}k(null),R(!0);try{let $e=await Ia.pick({tabId:l.id});$e&&(O($e),z(""))}catch($e){k({kind:"error",text:$e.message})}finally{R(!1)}},We=$e=>{$e.preventDefault(),!(!P||!Z.trim())&&(q(Oe=>[...Oe,{text:Z.trim(),selections:[P]}]),O(null),z(""))},Nt=async()=>{se(!0),k(null);try{await xt.watch({id:a}).catch(()=>{}),await Ia.annotate({sessionId:a,annotations:V,request:B}),q([]),J("")}catch($e){k({kind:"error",text:$e.message})}finally{se(!1)}},Bt=()=>{v("start"),x(""),k(null),X.current?.focus()},Ft=$e=>{$e.metaKey&&$e.key.toLowerCase()==="l"?($e.preventDefault(),X.current?.focus()):$e.metaKey&&$e.key.toLowerCase()==="r"&&le?($e.preventDefault(),i.command(l.id,"reload")):($e.altKey||$e.metaKey)&&($e.key==="ArrowLeft"||$e.key==="ArrowRight")&&le&&$e.target!==X.current&&($e.preventDefault(),i.command(l.id,$e.key==="ArrowLeft"?"back":"forward"))},zt=[...new Set([...d,...h])],At=le&&f.has(l.port);return u`
504
+ `}function Wk({chat:t,thread:e,payload:n,active:s=!0}){let a=t.sessionId,i=Fe(()=>f9(a),[a]),{tabs:r,activeId:o}=m9(i),l=r.find($e=>$e.id===o)??null,c=Fe(()=>im(e.items).actions.length>0,[e.items]),d=Fe(()=>Ak(e.items),[e.items]),[h,p]=y([]),[f,m]=y(()=>new Set),[b,g]=y(!1),[$,v]=y(n?.view==="activity"?"activity":l?"page":"start"),[w,x]=y(l?Jl(l):""),[T,k]=y(null),[A,E]=y(null),[S,_]=y(!1),[I,R]=y(!1),[P,O]=y(null),[Z,z]=y(""),[V,q]=y([]),[B,J]=y(""),[j,se]=y(!1),X=Q(null),H=Q(null),oe=e.status==="running"||e.status==="provisioning";D(()=>{let $e=!0;return Ia.ports({sessionId:a}).then(Ne=>{$e&&(p(Ne.ports.map(Re=>Re.port)),m(new Set(Ne.ports.filter(Re=>Re.shared).map(Re=>Re.port))),g(Ne.agentBrowses===!0))},()=>{}),()=>{$e=!1}},[a]),D(()=>{n?.view==="activity"?v("activity"):Number.isInteger(n?.port)&&(i.open({port:n.port,path:typeof n.path=="string"?n.path:"/"}),v("page"))},[n,i]);let ce=l?Jl(l):"";D(()=>{if(!o){v($e=>$e==="page"?"start":$e);return}document.activeElement!==X.current&&x(ce)},[o,ce]);let le=$==="page"&&l!==null,ae=le&&l.live&&l.ready&&!l.problem,de=ae&&s?l.id:null;_o(H,{shown:de!==null,place:$e=>Ia.place({tabId:$e?de:null,bounds:$e}),snapshot:()=>Ia.snapshot({tabId:de})},[de]);let he=$e=>{k(null),le?i.navigate(l.id,$e):i.open($e),v("page")},qe=$e=>{$e.preventDefault();let Ne=Pd(w);Ne.kind==="port"?he({port:Ne.port,path:Ne.path}):Ne.kind==="path"&&le?he({port:l.port,path:Ne.path}):Ne.kind==="external"?k({kind:"external",url:Ne.url}):k({kind:"error",text:`Enter an address in this chat's sandbox, like ${pm}.`}),X.current?.blur()},St=()=>Ia.openOutside({sessionId:a,port:l.port,path:l.path}).catch($e=>k({kind:"error",text:$e.message})),bt=async $e=>{_(!0);try{let{address:Ne}=await Ia.share({sessionId:a,port:$e.port,shared:!0});if(!Ne)throw new Error("The port could not be shared.");m(Re=>new Set([...Re,$e.port])),await xt.send({chatId:t.id,text:[`Load the page you serve at http://${Jl($e)} in a real browser and tell me what it shows.`,`I opened that port to the outside for this; its public address is ${Ne}${$e.path}.`,`Run: actl capability web.fetch url="${Ne}${$e.path}" --vendor tinyfish`].join(" ")})}catch(Ne){k({kind:"error",text:Ne.message})}finally{_(!1),E(null)}},Ue=async $e=>{_(!0);try{await Ia.share({sessionId:a,port:$e,shared:!1}),m(Ne=>new Set([...Ne].filter(Re=>Re!==$e)))}catch(Ne){k({kind:"error",text:Ne.message})}finally{_(!1)}},sn=async()=>{if(I){Ia.cancelPick({tabId:l.id}).catch(()=>{});return}k(null),R(!0);try{let $e=await Ia.pick({tabId:l.id});$e&&(O($e),z(""))}catch($e){k({kind:"error",text:$e.message})}finally{R(!1)}},We=$e=>{$e.preventDefault(),!(!P||!Z.trim())&&(q(Ne=>[...Ne,{text:Z.trim(),selections:[P]}]),O(null),z(""))},Nt=async()=>{se(!0),k(null);try{await xt.watch({id:a}).catch(()=>{}),await Ia.annotate({sessionId:a,annotations:V,request:B}),q([]),J("")}catch($e){k({kind:"error",text:$e.message})}finally{se(!1)}},Bt=()=>{v("start"),x(""),k(null),X.current?.focus()},Ft=$e=>{$e.metaKey&&$e.key.toLowerCase()==="l"?($e.preventDefault(),X.current?.focus()):$e.metaKey&&$e.key.toLowerCase()==="r"&&le?($e.preventDefault(),i.command(l.id,"reload")):($e.altKey||$e.metaKey)&&($e.key==="ArrowLeft"||$e.key==="ArrowRight")&&le&&$e.target!==X.current&&($e.preventDefault(),i.command(l.id,$e.key==="ArrowLeft"?"back":"forward"))},zt=[...new Set([...d,...h])],At=le&&f.has(l.port);return u`
505
505
  <div class="browser" onKeyDown=${Ft}>
506
506
  ${c||r.length>0?u`
507
507
  <div class="browser-tabs" role="tablist" aria-label="Browser tabs">
508
508
  ${c?u`<button type="button" role="tab" class=${`browser-tab browser-tab-activity ${$==="activity"?"is-on":""}`} aria-selected=${$==="activity"} onClick=${()=>v("activity")}><${F} name="history" size=${13} />Agent activity</button>`:null}
509
509
  <div class="browser-tab-row">
510
- ${r.map($e=>{let Oe=le&&$e.id===o,Re=Jl($e),hn=$e.title||Re;return u`
511
- <div key=${$e.id} class=${`browser-tab ${Oe?"is-on":""}`}>
512
- <button type="button" role="tab" aria-selected=${Oe} data-tooltip=${Re} onClick=${()=>{i.select($e.id),v("page"),x(Re),k(null)}}>${hn}</button>
510
+ ${r.map($e=>{let Ne=le&&$e.id===o,Re=Jl($e),hn=$e.title||Re;return u`
511
+ <div key=${$e.id} class=${`browser-tab ${Ne?"is-on":""}`}>
512
+ <button type="button" role="tab" aria-selected=${Ne} data-tooltip=${Re} onClick=${()=>{i.select($e.id),v("page"),x(Re),k(null)}}>${hn}</button>
513
513
  <button type="button" class="browser-tab-close" aria-label=${`Close ${hn}`} onClick=${()=>i.close($e.id)}><${F} name="close" size=${11} /></button>
514
514
  </div>
515
515
  `})}
@@ -551,7 +551,7 @@ ${a.trimStart()}`:e+a,n=!1)}return e}function uM(t){let e=t.messageId??t.id,n=Ar
551
551
  <div class="page-comments" data-page-comments>
552
552
  ${V.length>0?u`
553
553
  <ol>
554
- ${V.map(($e,Oe)=>u`<li key=${Oe}><span class="page-comment-target">${$e.selections[0].label}</span><span class="page-comment-text">${$e.text}</span><button type="button" class="tool-button" aria-label=${`Remove comment ${Oe+1}`} data-tooltip="Remove" onClick=${()=>q(Re=>Re.filter((hn,gt)=>gt!==Oe))}><${F} name="close" size=${11} /></button></li>`)}
554
+ ${V.map(($e,Ne)=>u`<li key=${Ne}><span class="page-comment-target">${$e.selections[0].label}</span><span class="page-comment-text">${$e.text}</span><button type="button" class="tool-button" aria-label=${`Remove comment ${Ne+1}`} data-tooltip="Remove" onClick=${()=>q(Re=>Re.filter((hn,gt)=>gt!==Ne))}><${F} name="close" size=${11} /></button></li>`)}
555
555
  </ol>
556
556
  `:null}
557
557
  ${P?u`
@@ -777,7 +777,7 @@ ${t}</tr>
777
777
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
778
778
  `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${na(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:a}){let i=a?na(n,!0):this.parser.parseInline(s),r=c3(t);if(r===null)return i;t=na(r,a);let o='<a href="'+t+'"';return e&&(o+=' title="'+na(e)+'"'),o+=">"+i+"</a>",o}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let a=c3(t);if(a===null)return na(n);t=a;let i=`<img src="${na(t)}" alt="${na(n)}"`;return e&&(i+=` title="${na(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:na(t.text)}},wb=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Wa=class pb{options;renderer;textRenderer;constructor(e){this.options=e||Qr,this.options.renderer=this.options.renderer||new Fh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wb}static parse(e,n){return new pb(n).parse(e)}static parseInline(e,n){return new pb(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let a=e[s];if(this.options.extensions?.renderers?.[a.type]){let r=a,o=this.options.extensions.renderers[r.type].call({parser:this},r);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(r.type)){n+=o||"";continue}}let i=a;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let r='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let a=0;a<e.length;a++){let i=e[a];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=o||"";continue}}let r=i;switch(r.type){case"escape":{s+=n.text(r);break}case"html":{s+=n.html(r);break}case"link":{s+=n.link(r);break}case"image":{s+=n.image(r);break}case"checkbox":{s+=n.checkbox(r);break}case"strong":{s+=n.strong(r);break}case"em":{s+=n.em(r);break}case"codespan":{s+=n.codespan(r);break}case"br":{s+=n.br(r);break}case"del":{s+=n.del(r);break}case"text":{s+=n.text(r);break}default:{let o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},Rc=class{options;block;constructor(t){this.options=t||Qr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?qa.lex:qa.lexInline}provideParser(t=this.block){return t?Wa.parse:Wa.parseInline}},fI=class{defaults=fb();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Wa;Renderer=Fh;TextRenderer=wb;Lexer=qa;Tokenizer=Bh;Hooks=Rc;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let a=s;for(let i of a.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of a.rows)for(let r of i)n=n.concat(this.walkTokens(r.tokens,e));break}case"list":{let a=s;n=n.concat(this.walkTokens(a.items,e));break}default:{let a=s;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(i=>{let r=a[i].flat(1/0);n=n.concat(this.walkTokens(r,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=e.renderers[a.name];i?e.renderers[a.name]=function(...r){let o=a.renderer.apply(this,r);return o===!1&&(o=i.apply(this,r)),o}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[a.level];i?i.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),s.extensions=e),n.renderer){let a=this.defaults.renderer||new Fh(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let r=i,o=n.renderer[r],l=a[r];a[r]=(...c)=>{let d=o.apply(a,c);return d===!1&&(d=l.apply(a,c)),d||""}}s.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Bh(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let r=i,o=n.tokenizer[r],l=a[r];a[r]=(...c)=>{let d=o.apply(a,c);return d===!1&&(d=l.apply(a,c)),d}}s.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Rc;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let r=i,o=n.hooks[r],l=a[r];Rc.passThroughHooks.has(i)?a[r]=c=>{if(this.defaults.async&&Rc.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await o.call(a,c);return l.call(a,h)})();let d=o.call(a,c);return l.call(a,d)}:a[r]=(...c)=>{if(this.defaults.async)return(async()=>{let h=await o.apply(a,c);return h===!1&&(h=await l.apply(a,c)),h})();let d=o.apply(a,c);return d===!1&&(d=l.apply(a,c)),d}}s.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(r){let o=[];return o.push(i.call(this,r)),a&&(o=o.concat(a.call(this,r))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return qa.lex(t,e??this.defaults)}parser(t,e){return Wa.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},a={...this.defaults,...s},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return i(new 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 e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let r=a.hooks?await a.hooks.preprocess(e):e,o=await(a.hooks?await a.hooks.provideLexer(t):t?qa.lex:qa.lexInline)(r,a),l=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(l,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser(t):t?Wa.parse:Wa.parseInline)(l,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(i);try{a.hooks&&(e=a.hooks.preprocess(e));let r=(a.hooks?a.hooks.provideLexer(t):t?qa.lex:qa.lexInline)(e,a);a.hooks&&(r=a.hooks.processAllTokens(r)),a.walkTokens&&this.walkTokens(r,a.walkTokens);let o=(a.hooks?a.hooks.provideParser(t):t?Wa.parse:Wa.parseInline)(r,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(r){return i(r)}}}onError(t,e){return n=>{if(n.message+=`
779
779
  Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+na(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},Zr=new fI;function Dt(t,e){return Zr.parse(t,e)}Dt.options=Dt.setOptions=function(t){return Zr.setOptions(t),Dt.defaults=Zr.defaults,m3(Dt.defaults),Dt};Dt.getDefaults=fb;Dt.defaults=Qr;function mI(...t){return Zr.use(...t),Dt.defaults=Zr.defaults,m3(Dt.defaults),Dt}Dt.use=mI;Dt.walkTokens=function(t,e){return Zr.walkTokens(t,e)};Dt.parseInline=Zr.parseInline;Dt.Parser=Wa;Dt.parser=Wa.parse;Dt.Renderer=Fh;Dt.TextRenderer=wb;Dt.Lexer=qa;Dt.lexer=qa.lex;Dt.Tokenizer=Bh;Dt.Hooks=Rc;Dt.parse=Dt;var Tj=Dt.options,Ej=Dt.setOptions,Mj=Dt.walkTokens,_j=Dt.parseInline;var Ij=Wa.parse,Rj=qa.lex;function gI(t,e){this.v=t,this.k=e}function S3(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,s=Array(e);n<e;n++)s[n]=t[n];return s}function bI(t){if(Array.isArray(t))return t}function $I(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var s,a,i,r,o=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(s=i.call(n)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(d){c=!0,a=d}finally{try{if(!l&&n.return!=null&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw a}}return o}}function yI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
780
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vI(t,e){return bI(t)||$I(t,e)||wI(t,e)||yI()}function wI(t,e){if(t){if(typeof t=="string")return S3(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S3(t,e):void 0}}function zh(t){var e,n;function s(i,r){try{var o=t[i](r),l=o.value,c=l instanceof gI;Promise.resolve(c?l.v:l).then(function(d){if(c){var h=i==="return"&&l.k?i:"next";if(!l.k||d.done)return s(h,d);d=t[h](d).value}a(!!o.done,d)},function(d){s("throw",d)})}catch(d){a(2,d)}}function a(i,r){i===2?e.reject(r):e.resolve({value:r,done:i}),(e=e.next)?s(e.key,e.arg):n=null}this._invoke=function(i,r){return new Promise(function(o,l){var c={key:i,arg:r,resolve:o,reject:l,next:null};n?n=n.next=c:(e=n=c,s(i,r))})},typeof t.return!="function"&&(this.return=void 0)}zh.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},zh.prototype.next=function(t){return this._invoke("next",t)},zh.prototype.throw=function(t){return this._invoke("throw",t)},zh.prototype.return=function(t){return this._invoke("return",t)};var F3=Object.entries,A3=Object.setPrototypeOf,kI=Object.isFrozen,xI=Object.getPrototypeOf,SI=Object.getOwnPropertyDescriptor,Un=Object.freeze,Xn=Object.seal,tl=Object.create,z3=typeof Reflect<"u"&&Reflect,Eb=z3.apply,Mb=z3.construct;Un||(Un=function(e){return e});Xn||(Xn=function(e){return e});Eb||(Eb=function(e,n){for(var s=arguments.length,a=new Array(s>2?s-2:0),i=2;i<s;i++)a[i-2]=arguments[i];return e.apply(n,a)});Mb||(Mb=function(e){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return new e(...s)});var Jr=Rn(Array.prototype.forEach);Array.prototype.indexOf;var AI=Rn(Array.prototype.lastIndexOf),C3=Rn(Array.prototype.pop),Oc=Rn(Array.prototype.push);Array.prototype.slice;var CI=Rn(Array.prototype.splice),nl=Array.isArray,Fc=Rn(String.prototype.toLowerCase),kb=Rn(String.prototype.toString),T3=Rn(String.prototype.match),Nc=Rn(String.prototype.replace),E3=Rn(String.prototype.indexOf),TI=Rn(String.prototype.trim),EI=Rn(Number.prototype.toString),MI=Rn(Boolean.prototype.toString),M3=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),_3=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),Bs=Rn(Object.prototype.hasOwnProperty),Bc=Rn(Object.prototype.toString),ps=Rn(RegExp.prototype.test),or=_I(TypeError);function Rn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return Eb(t,e,s)}}function _I(t){return function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return Mb(t,n)}}function Mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fc;if(A3&&A3(t,null),!nl(e))return t;let s=e.length;for(;s--;){let a=e[s];if(typeof a=="string"){let i=n(a);i!==a&&(kI(e)||(e[s]=i),a=i)}t[a]=!0}return t}function II(t){for(let e=0;e<t.length;e++)Bs(t,e)||(t[e]=null);return t}function aa(t){let e=tl(null);for(let s of F3(t)){var n=vI(s,2);let a=n[0],i=n[1];Bs(t,a)&&(nl(i)?e[a]=II(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=aa(i):e[a]=i)}return e}function RI(t){switch(typeof t){case"string":return t;case"number":return EI(t);case"boolean":return MI(t);case"bigint":return M3?M3(t):"0";case"symbol":return _3?_3(t):"Symbol()";case"undefined":return Bc(t);case"function":case"object":{if(t===null)return Bc(t);let e=t,n=ka(e,"toString");if(typeof n=="function"){let s=n(e);return typeof s=="string"?s:Bc(s)}return Bc(t)}default:return Bc(t)}}function ka(t,e){for(;t!==null;){let s=SI(t,e);if(s){if(s.get)return Rn(s.get);if(typeof s.value=="function")return Rn(s.value)}t=xI(t)}function n(){return null}return n}function PI(t){try{return ps(t,""),!0}catch{return!1}}var I3=Un(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xb=Un(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Sb=Un(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),DI=Un(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ab=Un(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),LI=Un(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R3=Un(["#text"]),P3=Un(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Cb=Un(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D3=Un(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Uh=Un(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OI=Xn(/{{[\w\W]*|^[\w\W]*}}/g),NI=Xn(/<%[\w\W]*|^[\w\W]*%>/g),BI=Xn(/\${[\w\W]*/g),FI=Xn(/^data-[\-\w.\u00B7-\uFFFF]+$/),zI=Xn(/^aria-[\-\w]+$/),L3=Xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UI=Xn(/^(?:\w+script|data):/i),HI=Xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qI=Xn(/^html$/i),WI=Xn(/^[a-z][.\w]*(-[.\w]+)+$/i),O3=Xn(/<[/\w!]/g),N3=Xn(/<[/\w]/g),GI=Xn(/<\/no(script|embed|frames)/i),jI=Xn(/\/>/i),sa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},U3=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],VI=Un(Mt({},U3)),YI=(function(){let t={};return Jr(U3,e=>{t[e]=Xn(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),Un(t)})(),KI=function(){return typeof window>"u"?null:window},XI=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(s=n.getAttribute(a));let i="dompurify"+(s?"#"+s:"");try{return e.createPolicy(i,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},B3=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},lr=function(e,n,s,a){return Bs(e,n)&&nl(e[n])?Mt(a.base?aa(a.base):{},e[n],a.transform):s},Tb=function(e,n,s){let a=Bs(e,n)?e[n]:void 0;return a&&typeof a=="object"?aa(a):s()};function H3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KI(),e=ke=>H3(ke);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==sa.document||!t.Element)return e.isSupported=!1,e;let n=t.document,s=n,a=s.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,r=t.Node,o=t.Element,l=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let c=t.DOMParser,d=t.trustedTypes,h=o.prototype,p=ka(h,"cloneNode"),f=ka(h,"remove"),m=ka(h,"removeAttributeNode"),b=ka(h,"nextSibling"),g=ka(h,"childNodes"),$=ka(h,"parentNode"),v=ka(h,"shadowRoot"),w=ka(h,"attributes"),x=r&&r.prototype?ka(r.prototype,"nodeType"):null,T=r&&r.prototype?ka(r.prototype,"nodeName"):null,k=r&&r.prototype?ka(r.prototype,"ownerDocument"):null,A=function(U){return x?x(U):U.nodeType},E=function(U){return T?T(U):U.nodeName};if(typeof i=="function"){let ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,_="",I,R=!1,P=0,O=function(){if(P>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Z=function(U){O(),P++;try{return S.createHTML(U)}finally{P--}},z=function(U){O(),P++;try{return S.createScriptURL(U)}finally{P--}},V=function(){return R||(I=XI(d,a),R=!0),I},q=n,B=q.implementation,J=q.createNodeIterator,j=q.createDocumentFragment,se=q.getElementsByTagName,X=s.importNode,H=B3();e.isSupported=typeof F3=="function"&&typeof $=="function"&&B&&B.createHTMLDocument!==void 0;let oe=OI,ce=NI,le=BI,ae=FI,de=zI,he=UI,qe=HI,St=WI,bt=L3,Ue=null,sn=Mt({},[...I3,...xb,...Sb,...Ab,...R3]),We=null,Nt=Mt({},[...P3,...Cb,...D3,...Uh]),Bt=Object.seal(tl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ft=null,zt=null,At=Object.seal(tl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),$e=!0,Oe=!0,Re=!1,hn=!0,gt=!1,It=!0,Te=!1,Qe=!1,bn=null,Vn=null,at=!1,Qn=!1,Is=!1,$n=!1,Jn=!0,Rs=!1,yn="user-content-",vn=!0,rs=!1,we={},ht=null,Ct=Mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Ne=null,An=Mt({},["audio","video","img","source","image","track"]),an=null,js=Mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),da="http://www.w3.org/1998/Math/MathML",Vs="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml",tn=ue,Se=!1,Rt=null,ha=Mt({},[da,Vs,ue],kb),qi=Un(["mi","mo","mn","ms","mtext"]),mi=Mt({},qi),gi=Un(["annotation-xml"]),Cl=Mt({},gi),Tl=Mt({},["title","style","font","a","script"]),Ma=null,Ya=["application/xhtml+xml","text/html"],El="text/html",rn=null,Wi=null,Fu=n.createElement("form"),bi=function(U){return U instanceof RegExp||U instanceof Function},po=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wi&&Wi===U)return;(!U||typeof U!="object")&&(U={}),U=aa(U),Ma=Ya.indexOf(U.PARSER_MEDIA_TYPE)===-1?El:U.PARSER_MEDIA_TYPE,rn=Ma==="application/xhtml+xml"?kb:Fc,Ue=lr(U,"ALLOWED_TAGS",sn,{transform:rn}),We=lr(U,"ALLOWED_ATTR",Nt,{transform:rn}),Rt=lr(U,"ALLOWED_NAMESPACES",ha,{transform:kb}),an=lr(U,"ADD_URI_SAFE_ATTR",js,{transform:rn,base:js}),Ne=lr(U,"ADD_DATA_URI_TAGS",An,{transform:rn,base:An}),ht=lr(U,"FORBID_CONTENTS",Ct,{transform:rn}),Ft=lr(U,"FORBID_TAGS",aa({}),{transform:rn}),zt=lr(U,"FORBID_ATTR",aa({}),{transform:rn}),we=Bs(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?aa(U.USE_PROFILES):U.USE_PROFILES:!1,$e=U.ALLOW_ARIA_ATTR!==!1,Oe=U.ALLOW_DATA_ATTR!==!1,Re=U.ALLOW_UNKNOWN_PROTOCOLS||!1,hn=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gt=U.SAFE_FOR_TEMPLATES||!1,It=U.SAFE_FOR_XML!==!1,Te=U.WHOLE_DOCUMENT||!1,Qn=U.RETURN_DOM||!1,Is=U.RETURN_DOM_FRAGMENT||!1,$n=U.RETURN_TRUSTED_TYPE||!1,at=U.FORCE_BODY||!1,Jn=U.SANITIZE_DOM!==!1,Rs=U.SANITIZE_NAMED_PROPS||!1,vn=U.KEEP_CONTENT!==!1,rs=U.IN_PLACE||!1,bt=PI(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:L3,tn=typeof U.NAMESPACE=="string"?U.NAMESPACE:ue,mi=Tb(U,"MATHML_TEXT_INTEGRATION_POINTS",()=>Mt({},qi)),Cl=Tb(U,"HTML_INTEGRATION_POINTS",()=>Mt({},gi));let ie=Tb(U,"CUSTOM_ELEMENT_HANDLING",()=>tl(null));if(Bt=tl(null),Bs(ie,"tagNameCheck")&&bi(ie.tagNameCheck)&&(Bt.tagNameCheck=ie.tagNameCheck),Bs(ie,"attributeNameCheck")&&bi(ie.attributeNameCheck)&&(Bt.attributeNameCheck=ie.attributeNameCheck),Bs(ie,"allowCustomizedBuiltInElements")&&typeof ie.allowCustomizedBuiltInElements=="boolean"&&(Bt.allowCustomizedBuiltInElements=ie.allowCustomizedBuiltInElements),Xn(Bt),gt&&(Oe=!1),Is&&(Qn=!0),we&&(Ue=Mt({},R3),We=tl(null),we.html===!0&&(Mt(Ue,I3),Mt(We,P3)),we.svg===!0&&(Mt(Ue,xb),Mt(We,Cb),Mt(We,Uh)),we.svgFilters===!0&&(Mt(Ue,Sb),Mt(We,Cb),Mt(We,Uh)),we.mathMl===!0&&(Mt(Ue,Ab),Mt(We,D3),Mt(We,Uh))),At.tagCheck=null,At.attributeCheck=null,Bs(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?At.tagCheck=U.ADD_TAGS:nl(U.ADD_TAGS)&&(Ue===sn&&(Ue=aa(Ue)),Mt(Ue,U.ADD_TAGS,rn))),Bs(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?At.attributeCheck=U.ADD_ATTR:nl(U.ADD_ATTR)&&(We===Nt&&(We=aa(We)),Mt(We,U.ADD_ATTR,rn))),Bs(U,"ADD_FORBID_CONTENTS")&&nl(U.ADD_FORBID_CONTENTS)&&(ht===Ct&&(ht=aa(ht)),Mt(ht,U.ADD_FORBID_CONTENTS,rn)),vn&&(Ue["#text"]=!0),Te&&Mt(Ue,["html","head","body"]),Ue.table&&(Mt(Ue,["tbody"]),delete Ft.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let be=S;S=U.TRUSTED_TYPES_POLICY;try{_=Z("")}catch(Ee){throw S=be,Ee}}else U.TRUSTED_TYPES_POLICY===null?(S=void 0,_=""):(S===void 0&&(S=V()),S&&typeof _=="string"&&(_=Z("")));Un&&Un(U),Wi=U},zu=Mt({},[...xb,...Sb,...DI]),Uu=Mt({},[...Ab,...LI]),Ml=function(U,ie,be){return ie.namespaceURI===ue?U==="svg":ie.namespaceURI===da?U==="svg"&&(be==="annotation-xml"||mi[be]):!!zu[U]},G0=function(U,ie,be){return ie.namespaceURI===ue?U==="math":ie.namespaceURI===Vs?U==="math"&&Cl[be]:!!Uu[U]},j0=function(U,ie,be){return ie.namespaceURI===Vs&&!Cl[be]||ie.namespaceURI===da&&!mi[be]?!1:!Uu[U]&&(Tl[U]||!zu[U])},Hu=function(U){let ie=$(U);(!ie||!ie.tagName)&&(ie={namespaceURI:tn,tagName:"template"});let be=Fc(U.tagName),Ee=Fc(ie.tagName);return Rt[U.namespaceURI]?U.namespaceURI===Vs?Ml(be,ie,Ee):U.namespaceURI===da?G0(be,ie,Ee):U.namespaceURI===ue?j0(be,ie,Ee):!!(Ma==="application/xhtml+xml"&&Rt[U.namespaceURI]):!1},Ka=function(U){Oc(e.removed,{element:U});try{$(U).removeChild(U)}catch{if(f(U),!$(U))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qu=function(U,ie,be){try{m(U,ie)}catch{try{U.removeAttribute(be)}catch{}}},Ar=function(U){re(U);let ie=g(U);if(ie){let Ee=[];Jr(ie,Ke=>{Oc(Ee,Ke)}),Jr(Ee,Ke=>{try{f(Ke)}catch{}})}let be=w(U);if(be)for(let Ee=be.length-1;Ee>=0;--Ee){let Ke=be[Ee],$t=Ke&&Ke.name;typeof $t=="string"&&qu(U,Ke,$t)}},pa=function(U,ie,be){if(!be)try{be=ie.getAttributeNode(U)}catch{be=null}Oc(e.removed,{attribute:be||null,from:ie});try{be?m(ie,be):ie.removeAttribute(U)}catch{try{ie.removeAttribute(U)}catch{}}if(U==="is")if(Qn||Is)try{Ka(ie)}catch{}else try{ie.setAttribute(U,"")}catch{}},W=function(U){let ie=w(U);if(ie)for(let be=ie.length-1;be>=0;--be){let Ee=ie[be],Ke=Ee&&Ee.name;typeof Ke!="string"||We[rn(Ke)]||qu(U,Ee,Ke)}},re=function(U){let ie=[U];for(;ie.length>0;){let be=ie.pop();A(be)===sa.element&&W(be);let Ee=g(be);if(Ee)for(let Ke=Ee.length-1;Ke>=0;--Ke)ie.push(Ee[Ke])}},pe=function(U,ie){return It?U==="patchsrc"?!0:U==="for"&&ie!=="label"&&ie!=="output":!1},me=function(U){if(!It)return;let ie=[U];for(;ie.length>0;){let be=ie.pop(),Ee=A(be);if(Ee===sa.processingInstruction||Ee===sa.comment&&ps(N3,be.data)){try{f(be)}catch{}continue}if(Ee===sa.element){let $t=be,kt=rn(E(be));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&pe("for",kt)&&$t.removeAttribute("for")}catch{}}let Ke=g(be);if(Ke)for(let $t=Ke.length-1;$t>=0;--$t)ie.push(Ke[$t])}},Me=function(U){let ie=null,be=null;if(at)U="<remove></remove>"+U;else{let $t=T3(U,/^[\r\n\t ]+/);be=$t&&$t[0]}Ma==="application/xhtml+xml"&&tn===ue&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");let Ee=S?Z(U):U;if(tn===ue)try{ie=new c().parseFromString(Ee,Ma)}catch{}if(!ie||!ie.documentElement){ie=B.createDocument(tn,"template",null);try{ie.documentElement.innerHTML=Se?_:Ee}catch{}}let Ke=ie.body||ie.documentElement;return U&&be&&Ke.insertBefore(n.createTextNode(be),Ke.childNodes[0]||null),tn===ue?se.call(ie,Te?"html":"body")[0]:Te?ie.documentElement:Ke},Ie=function(U){let ie=k?k(U):U.ownerDocument;return J.call(ie||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ge=function(U){return U=Nc(U,oe," "),U=Nc(U,ce," "),U=Nc(U,le," "),U},wt=function(U){var ie;U.normalize();let be=k?k(U):U.ownerDocument,Ee=J.call(be||U,U,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Ke=Ee.nextNode();for(;Ke;)Ke.data=Ge(Ke.data),Ke=Ee.nextNode();let $t=(ie=U.querySelectorAll)===null||ie===void 0?void 0:ie.call(U,"template");$t&&Jr($t,kt=>{lt(kt.content)&&wt(kt.content)})},it=function(U){let ie=T?T(U):null;return typeof ie!="string"||rn(ie)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==w(U)||typeof U.removeAttribute!="function"||typeof U.removeAttributeNode!="function"||typeof U.getAttributeNode!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==x(U)||U.childNodes!==g(U)},lt=function(U){if(!x||typeof U!="object"||U===null)return!1;try{return x(U)===sa.documentFragment}catch{return!1}},Vt=function(U){if(!x||typeof U!="object"||U===null)return!1;try{return typeof x(U)=="number"}catch{return!1}};function Ln(ke,U,ie){ke.length!==0&&Jr(ke,be=>{be.call(e,U,ie,Wi)})}let Cr=function(U,ie){return!!(It&&U.hasChildNodes()&&!Vt(U.firstElementChild)&&ps(O3,U.textContent)&&ps(O3,U.innerHTML)||It&&U.namespaceURI===ue&&VI[ie]&&(Vt(U.firstElementChild)||typeof U.textContent=="string"&&ps(YI[ie],U.textContent))||U.nodeType===sa.processingInstruction||It&&U.nodeType===sa.comment&&ps(N3,U.data))},On=function(U,ie){if(U instanceof RegExp)return ps(U,ie);if(U instanceof Function){for(var be=arguments.length,Ee=new Array(be>2?be-2:0),Ke=2;Ke<be;Ke++)Ee[Ke-2]=arguments[Ke];return!!U(ie,...Ee)}return!1},Wu=function(U,ie,be){if(!Ft[ie]&&Sv(ie)&&On(Bt.tagNameCheck,ie))return!1;if(vn&&!ht[ie]){let Ee=$(U),Ke=g(U);if(Ke&&Ee){let $t=Ke.length;for(let kt=$t-1;kt>=0;--kt){let wn=U===be?p(Ke[kt],!0):Ke[kt];Ee.insertBefore(wn,b(U))}}}return Ka(U),!0},_l=function(U,ie,be,Ee){return U.length===0?ie:ie===be||ie===Ee?aa(ie):ie},Gi=function(U,ie){return U===ie||$(U)!==null?!1:(rs&&re(U),!0)},$s=function(U,ie){if(Ln(H.beforeSanitizeElements,U,null),Gi(U,ie))return!0;if(it(U))return Ka(U),!0;let be=rn(E(U));if(Ue=_l(H.uponSanitizeElement,Ue,sn,bn),Ln(H.uponSanitizeElement,U,{tagName:be,allowedTags:Ue}),Gi(U,ie))return!0;if(Cr(U,be))return Ka(U),!0;if(Ft[be]||!(At.tagCheck instanceof Function&&At.tagCheck(be))&&!Ue[be]){let Ee=Wu(U,be,ie);return Ee===!1&&(Ln(H.afterSanitizeElements,U,null),Gi(U,ie))?!0:Ee}if(A(U)===sa.element&&!Hu(U)||(be==="noscript"||be==="noembed"||be==="noframes")&&ps(GI,U.innerHTML))return Ka(U),!0;if(gt&&U.nodeType===sa.text){let Ee=Ge(U.textContent);U.textContent!==Ee&&(Oc(e.removed,{element:U.cloneNode()}),U.textContent=Ee)}return Ln(H.afterSanitizeElements,U,null),Gi(U,ie)},Tr=function(U,ie,be){if(zt[ie]||pe(ie,U)||Jn&&(ie==="id"||ie==="name")&&(be in n||be in Fu))return!1;let Ee=We[ie]||At.attributeCheck instanceof Function&&At.attributeCheck(ie,U);return Oe&&ps(ae,ie)||$e&&ps(de,ie)?!0:Ee?an[ie]||ps(bt,Nc(be,qe,""))||(ie==="src"||ie==="xlink:href"||ie==="href")&&U!=="script"&&E3(be,"data:")===0&&Ne[U]||Re&&!ps(he,Nc(be,qe,""))?!0:!be:Sv(U)&&On(Bt.tagNameCheck,U)&&On(Bt.attributeNameCheck,ie,U)||ie==="is"&&Bt.allowCustomizedBuiltInElements&&On(Bt.tagNameCheck,be)},ji=Mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sv=function(U){return!ji[Fc(U)]&&ps(St,U)},DT=function(U,ie,be,Ee){if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!be)switch(d.getAttributeType(U,ie)){case"TrustedHTML":return Z(Ee);case"TrustedScriptURL":return z(Ee)}return Ee},LT=function(U,ie,be,Ee){try{return be?U.setAttributeNS(be,ie,Ee):U.setAttribute(ie,Ee),it(U)?(Ka(U),!1):!0}catch{return pa(ie,U),!1}},Av=function(U,ie){if(Ln(H.beforeSanitizeAttributes,U,null),Gi(U,ie))return;let be=U.attributes;if(!be||it(U))return;We=_l(H.uponSanitizeAttribute,We,Nt,Vn);let Ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:We,forceKeepAttr:void 0},Ke=be.length,$t=rn(U.nodeName);for(;Ke--;){let kt=be[Ke],wn=kt.name,fa=kt.namespaceURI,Ys=kt.value,fo=rn(wn),Y0=Ys,ys=wn==="value"?Y0:TI(Y0),Cv=!1;if(Ee.attrName=fo,Ee.attrValue=ys,Ee.keepAttr=!0,Ee.forceKeepAttr=void 0,Ln(H.uponSanitizeAttribute,U,Ee),ys=Ee.attrValue,Rs&&(fo==="id"||fo==="name")&&E3(ys,yn)!==0&&(pa(wn,U,kt),ys=yn+ys,Cv=!0),It&&ps(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ys)){pa(wn,U,kt);continue}if(fo==="attributename"&&T3(ys,"href")){pa(wn,U,kt);continue}if(!Ee.forceKeepAttr){if(!Ee.keepAttr){pa(wn,U,kt);continue}if(!hn&&ps(jI,ys)){pa(wn,U,kt);continue}if(gt&&(ys=Ge(ys)),!Tr($t,fo,ys)){pa(wn,U,kt);continue}ys=DT($t,fo,fa,ys),ys!==Y0&&LT(U,wn,fa,ys)&&Cv&&C3(e.removed)}}Ln(H.afterSanitizeAttributes,U,null),Gi(U,ie)},Gu=function(U){let ie=null,be=Ie(U);for(Ln(H.beforeSanitizeShadowDOM,U,null);ie=be.nextNode();)if(Ln(H.uponSanitizeShadowNode,ie,null),$s(ie,U),Av(ie,U),lt(ie.content)&&Gu(ie.content),A(ie)===sa.element){let Ee=v(ie);lt(Ee)&&(V0(Ee),Gu(Ee))}Ln(H.afterSanitizeShadowDOM,U,null)},V0=function(U){let ie=[{node:U,shadow:null}];for(;ie.length>0;){let be=ie.pop();if(be.shadow){Gu(be.shadow);continue}let Ee=be.node,Ke=A(Ee)===sa.element,$t=g(Ee);if($t)for(let kt=$t.length-1;kt>=0;--kt)ie.push({node:$t[kt],shadow:null});if(Ke){let kt=T?T(Ee):null;if(typeof kt=="string"&&rn(kt)==="template"){let wn=Ee.content;lt(wn)&&ie.push({node:wn,shadow:null})}}if(Ke){let kt=v(Ee);lt(kt)&&ie.push({node:null,shadow:kt},{node:kt,shadow:null})}}};return e.sanitize=function(ke){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,be=null,Ee=null,Ke=null;if(Se=!ke,Se&&(ke="<!-->"),typeof ke!="string"&&!Vt(ke)&&(ke=RI(ke),typeof ke!="string"))throw or("dirty is not a string, aborting");if(!e.isSupported)return ke;Qe?(Ue=bn,We=Vn):po(U),(H.uponSanitizeElement.length>0||H.uponSanitizeAttribute.length>0)&&(Ue=aa(Ue)),H.uponSanitizeAttribute.length>0&&(We=aa(We)),e.removed=[];let $t=rs&&typeof ke!="string"&&Vt(ke);if($t){me(ke);let fa=E(ke);if(typeof fa=="string"){let Ys=rn(fa);if(!Ue[Ys]||Ft[Ys])throw Ar(ke),or("root node is forbidden and cannot be sanitized in-place")}if(it(ke))throw Ar(ke),or("root node is clobbered and cannot be sanitized in-place");try{V0(ke)}catch(Ys){throw Ar(ke),Ys}}else if(Vt(ke))ie=Me("<!---->"),be=ie.ownerDocument.importNode(ke,!0),be.nodeType===sa.element&&be.nodeName==="BODY"||be.nodeName==="HTML"?ie=be:ie.appendChild(be),V0(ie);else{if(!Qn&&!gt&&!Te&&ke.indexOf("<")===-1)return S&&$n?Z(ke):ke;if(ie=Me(ke),!ie)return Qn?null:$n?_:""}ie&&at&&Ka(ie.firstChild);let kt=$t?ke:ie;try{let fa=Ie(kt);for(;Ee=fa.nextNode();)$s(Ee,kt),Av(Ee,kt),lt(Ee.content)&&Gu(Ee.content)}catch(fa){throw $t&&(Ar(ke),Jr(e.removed,Ys=>{Ys.element&&re(Ys.element)})),fa}if($t){let fa=!1;if(Jr(e.removed,Ys=>{Ys.element&&(Ys.element===ke&&(fa=!0),re(Ys.element))}),fa)throw or("a node selected for removal could not be safely returned; refusing to sanitize in place");return gt&&wt(ke),ke}if(Qn){if(gt&&wt(ie),Is)for(Ke=j.call(ie.ownerDocument);ie.firstChild;)Ke.appendChild(ie.firstChild);else Ke=ie;return(We.shadowroot||We.shadowrootmode)&&(Ke=X.call(s,Ke,!0)),Ke}let wn=Te?ie.outerHTML:ie.innerHTML;return Te&&Ue["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&ps(qI,ie.ownerDocument.doctype.name)&&(wn="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
780
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vI(t,e){return bI(t)||$I(t,e)||wI(t,e)||yI()}function wI(t,e){if(t){if(typeof t=="string")return S3(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S3(t,e):void 0}}function zh(t){var e,n;function s(i,r){try{var o=t[i](r),l=o.value,c=l instanceof gI;Promise.resolve(c?l.v:l).then(function(d){if(c){var h=i==="return"&&l.k?i:"next";if(!l.k||d.done)return s(h,d);d=t[h](d).value}a(!!o.done,d)},function(d){s("throw",d)})}catch(d){a(2,d)}}function a(i,r){i===2?e.reject(r):e.resolve({value:r,done:i}),(e=e.next)?s(e.key,e.arg):n=null}this._invoke=function(i,r){return new Promise(function(o,l){var c={key:i,arg:r,resolve:o,reject:l,next:null};n?n=n.next=c:(e=n=c,s(i,r))})},typeof t.return!="function"&&(this.return=void 0)}zh.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},zh.prototype.next=function(t){return this._invoke("next",t)},zh.prototype.throw=function(t){return this._invoke("throw",t)},zh.prototype.return=function(t){return this._invoke("return",t)};var F3=Object.entries,A3=Object.setPrototypeOf,kI=Object.isFrozen,xI=Object.getPrototypeOf,SI=Object.getOwnPropertyDescriptor,Un=Object.freeze,Xn=Object.seal,tl=Object.create,z3=typeof Reflect<"u"&&Reflect,Eb=z3.apply,Mb=z3.construct;Un||(Un=function(e){return e});Xn||(Xn=function(e){return e});Eb||(Eb=function(e,n){for(var s=arguments.length,a=new Array(s>2?s-2:0),i=2;i<s;i++)a[i-2]=arguments[i];return e.apply(n,a)});Mb||(Mb=function(e){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return new e(...s)});var Jr=Rn(Array.prototype.forEach);Array.prototype.indexOf;var AI=Rn(Array.prototype.lastIndexOf),C3=Rn(Array.prototype.pop),Oc=Rn(Array.prototype.push);Array.prototype.slice;var CI=Rn(Array.prototype.splice),nl=Array.isArray,Fc=Rn(String.prototype.toLowerCase),kb=Rn(String.prototype.toString),T3=Rn(String.prototype.match),Nc=Rn(String.prototype.replace),E3=Rn(String.prototype.indexOf),TI=Rn(String.prototype.trim),EI=Rn(Number.prototype.toString),MI=Rn(Boolean.prototype.toString),M3=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),_3=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),Bs=Rn(Object.prototype.hasOwnProperty),Bc=Rn(Object.prototype.toString),ps=Rn(RegExp.prototype.test),or=_I(TypeError);function Rn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return Eb(t,e,s)}}function _I(t){return function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return Mb(t,n)}}function Mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fc;if(A3&&A3(t,null),!nl(e))return t;let s=e.length;for(;s--;){let a=e[s];if(typeof a=="string"){let i=n(a);i!==a&&(kI(e)||(e[s]=i),a=i)}t[a]=!0}return t}function II(t){for(let e=0;e<t.length;e++)Bs(t,e)||(t[e]=null);return t}function aa(t){let e=tl(null);for(let s of F3(t)){var n=vI(s,2);let a=n[0],i=n[1];Bs(t,a)&&(nl(i)?e[a]=II(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=aa(i):e[a]=i)}return e}function RI(t){switch(typeof t){case"string":return t;case"number":return EI(t);case"boolean":return MI(t);case"bigint":return M3?M3(t):"0";case"symbol":return _3?_3(t):"Symbol()";case"undefined":return Bc(t);case"function":case"object":{if(t===null)return Bc(t);let e=t,n=ka(e,"toString");if(typeof n=="function"){let s=n(e);return typeof s=="string"?s:Bc(s)}return Bc(t)}default:return Bc(t)}}function ka(t,e){for(;t!==null;){let s=SI(t,e);if(s){if(s.get)return Rn(s.get);if(typeof s.value=="function")return Rn(s.value)}t=xI(t)}function n(){return null}return n}function PI(t){try{return ps(t,""),!0}catch{return!1}}var I3=Un(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xb=Un(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Sb=Un(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),DI=Un(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ab=Un(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),LI=Un(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R3=Un(["#text"]),P3=Un(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Cb=Un(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D3=Un(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Uh=Un(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OI=Xn(/{{[\w\W]*|^[\w\W]*}}/g),NI=Xn(/<%[\w\W]*|^[\w\W]*%>/g),BI=Xn(/\${[\w\W]*/g),FI=Xn(/^data-[\-\w.\u00B7-\uFFFF]+$/),zI=Xn(/^aria-[\-\w]+$/),L3=Xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UI=Xn(/^(?:\w+script|data):/i),HI=Xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qI=Xn(/^html$/i),WI=Xn(/^[a-z][.\w]*(-[.\w]+)+$/i),O3=Xn(/<[/\w!]/g),N3=Xn(/<[/\w]/g),GI=Xn(/<\/no(script|embed|frames)/i),jI=Xn(/\/>/i),sa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},U3=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],VI=Un(Mt({},U3)),YI=(function(){let t={};return Jr(U3,e=>{t[e]=Xn(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),Un(t)})(),KI=function(){return typeof window>"u"?null:window},XI=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(s=n.getAttribute(a));let i="dompurify"+(s?"#"+s:"");try{return e.createPolicy(i,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},B3=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},lr=function(e,n,s,a){return Bs(e,n)&&nl(e[n])?Mt(a.base?aa(a.base):{},e[n],a.transform):s},Tb=function(e,n,s){let a=Bs(e,n)?e[n]:void 0;return a&&typeof a=="object"?aa(a):s()};function H3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KI(),e=ke=>H3(ke);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==sa.document||!t.Element)return e.isSupported=!1,e;let n=t.document,s=n,a=s.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,r=t.Node,o=t.Element,l=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let c=t.DOMParser,d=t.trustedTypes,h=o.prototype,p=ka(h,"cloneNode"),f=ka(h,"remove"),m=ka(h,"removeAttributeNode"),b=ka(h,"nextSibling"),g=ka(h,"childNodes"),$=ka(h,"parentNode"),v=ka(h,"shadowRoot"),w=ka(h,"attributes"),x=r&&r.prototype?ka(r.prototype,"nodeType"):null,T=r&&r.prototype?ka(r.prototype,"nodeName"):null,k=r&&r.prototype?ka(r.prototype,"ownerDocument"):null,A=function(U){return x?x(U):U.nodeType},E=function(U){return T?T(U):U.nodeName};if(typeof i=="function"){let ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,_="",I,R=!1,P=0,O=function(){if(P>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Z=function(U){O(),P++;try{return S.createHTML(U)}finally{P--}},z=function(U){O(),P++;try{return S.createScriptURL(U)}finally{P--}},V=function(){return R||(I=XI(d,a),R=!0),I},q=n,B=q.implementation,J=q.createNodeIterator,j=q.createDocumentFragment,se=q.getElementsByTagName,X=s.importNode,H=B3();e.isSupported=typeof F3=="function"&&typeof $=="function"&&B&&B.createHTMLDocument!==void 0;let oe=OI,ce=NI,le=BI,ae=FI,de=zI,he=UI,qe=HI,St=WI,bt=L3,Ue=null,sn=Mt({},[...I3,...xb,...Sb,...Ab,...R3]),We=null,Nt=Mt({},[...P3,...Cb,...D3,...Uh]),Bt=Object.seal(tl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ft=null,zt=null,At=Object.seal(tl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),$e=!0,Ne=!0,Re=!1,hn=!0,gt=!1,It=!0,Te=!1,Qe=!1,bn=null,Vn=null,at=!1,Qn=!1,Is=!1,$n=!1,Jn=!0,Rs=!1,yn="user-content-",vn=!0,rs=!1,we={},ht=null,Ct=Mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Oe=null,An=Mt({},["audio","video","img","source","image","track"]),an=null,js=Mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),da="http://www.w3.org/1998/Math/MathML",Vs="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml",tn=ue,Se=!1,Rt=null,ha=Mt({},[da,Vs,ue],kb),qi=Un(["mi","mo","mn","ms","mtext"]),mi=Mt({},qi),gi=Un(["annotation-xml"]),Cl=Mt({},gi),Tl=Mt({},["title","style","font","a","script"]),Ma=null,Ya=["application/xhtml+xml","text/html"],El="text/html",rn=null,Wi=null,Fu=n.createElement("form"),bi=function(U){return U instanceof RegExp||U instanceof Function},po=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wi&&Wi===U)return;(!U||typeof U!="object")&&(U={}),U=aa(U),Ma=Ya.indexOf(U.PARSER_MEDIA_TYPE)===-1?El:U.PARSER_MEDIA_TYPE,rn=Ma==="application/xhtml+xml"?kb:Fc,Ue=lr(U,"ALLOWED_TAGS",sn,{transform:rn}),We=lr(U,"ALLOWED_ATTR",Nt,{transform:rn}),Rt=lr(U,"ALLOWED_NAMESPACES",ha,{transform:kb}),an=lr(U,"ADD_URI_SAFE_ATTR",js,{transform:rn,base:js}),Oe=lr(U,"ADD_DATA_URI_TAGS",An,{transform:rn,base:An}),ht=lr(U,"FORBID_CONTENTS",Ct,{transform:rn}),Ft=lr(U,"FORBID_TAGS",aa({}),{transform:rn}),zt=lr(U,"FORBID_ATTR",aa({}),{transform:rn}),we=Bs(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?aa(U.USE_PROFILES):U.USE_PROFILES:!1,$e=U.ALLOW_ARIA_ATTR!==!1,Ne=U.ALLOW_DATA_ATTR!==!1,Re=U.ALLOW_UNKNOWN_PROTOCOLS||!1,hn=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gt=U.SAFE_FOR_TEMPLATES||!1,It=U.SAFE_FOR_XML!==!1,Te=U.WHOLE_DOCUMENT||!1,Qn=U.RETURN_DOM||!1,Is=U.RETURN_DOM_FRAGMENT||!1,$n=U.RETURN_TRUSTED_TYPE||!1,at=U.FORCE_BODY||!1,Jn=U.SANITIZE_DOM!==!1,Rs=U.SANITIZE_NAMED_PROPS||!1,vn=U.KEEP_CONTENT!==!1,rs=U.IN_PLACE||!1,bt=PI(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:L3,tn=typeof U.NAMESPACE=="string"?U.NAMESPACE:ue,mi=Tb(U,"MATHML_TEXT_INTEGRATION_POINTS",()=>Mt({},qi)),Cl=Tb(U,"HTML_INTEGRATION_POINTS",()=>Mt({},gi));let ie=Tb(U,"CUSTOM_ELEMENT_HANDLING",()=>tl(null));if(Bt=tl(null),Bs(ie,"tagNameCheck")&&bi(ie.tagNameCheck)&&(Bt.tagNameCheck=ie.tagNameCheck),Bs(ie,"attributeNameCheck")&&bi(ie.attributeNameCheck)&&(Bt.attributeNameCheck=ie.attributeNameCheck),Bs(ie,"allowCustomizedBuiltInElements")&&typeof ie.allowCustomizedBuiltInElements=="boolean"&&(Bt.allowCustomizedBuiltInElements=ie.allowCustomizedBuiltInElements),Xn(Bt),gt&&(Ne=!1),Is&&(Qn=!0),we&&(Ue=Mt({},R3),We=tl(null),we.html===!0&&(Mt(Ue,I3),Mt(We,P3)),we.svg===!0&&(Mt(Ue,xb),Mt(We,Cb),Mt(We,Uh)),we.svgFilters===!0&&(Mt(Ue,Sb),Mt(We,Cb),Mt(We,Uh)),we.mathMl===!0&&(Mt(Ue,Ab),Mt(We,D3),Mt(We,Uh))),At.tagCheck=null,At.attributeCheck=null,Bs(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?At.tagCheck=U.ADD_TAGS:nl(U.ADD_TAGS)&&(Ue===sn&&(Ue=aa(Ue)),Mt(Ue,U.ADD_TAGS,rn))),Bs(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?At.attributeCheck=U.ADD_ATTR:nl(U.ADD_ATTR)&&(We===Nt&&(We=aa(We)),Mt(We,U.ADD_ATTR,rn))),Bs(U,"ADD_FORBID_CONTENTS")&&nl(U.ADD_FORBID_CONTENTS)&&(ht===Ct&&(ht=aa(ht)),Mt(ht,U.ADD_FORBID_CONTENTS,rn)),vn&&(Ue["#text"]=!0),Te&&Mt(Ue,["html","head","body"]),Ue.table&&(Mt(Ue,["tbody"]),delete Ft.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let be=S;S=U.TRUSTED_TYPES_POLICY;try{_=Z("")}catch(Ee){throw S=be,Ee}}else U.TRUSTED_TYPES_POLICY===null?(S=void 0,_=""):(S===void 0&&(S=V()),S&&typeof _=="string"&&(_=Z("")));Un&&Un(U),Wi=U},zu=Mt({},[...xb,...Sb,...DI]),Uu=Mt({},[...Ab,...LI]),Ml=function(U,ie,be){return ie.namespaceURI===ue?U==="svg":ie.namespaceURI===da?U==="svg"&&(be==="annotation-xml"||mi[be]):!!zu[U]},G0=function(U,ie,be){return ie.namespaceURI===ue?U==="math":ie.namespaceURI===Vs?U==="math"&&Cl[be]:!!Uu[U]},j0=function(U,ie,be){return ie.namespaceURI===Vs&&!Cl[be]||ie.namespaceURI===da&&!mi[be]?!1:!Uu[U]&&(Tl[U]||!zu[U])},Hu=function(U){let ie=$(U);(!ie||!ie.tagName)&&(ie={namespaceURI:tn,tagName:"template"});let be=Fc(U.tagName),Ee=Fc(ie.tagName);return Rt[U.namespaceURI]?U.namespaceURI===Vs?Ml(be,ie,Ee):U.namespaceURI===da?G0(be,ie,Ee):U.namespaceURI===ue?j0(be,ie,Ee):!!(Ma==="application/xhtml+xml"&&Rt[U.namespaceURI]):!1},Ka=function(U){Oc(e.removed,{element:U});try{$(U).removeChild(U)}catch{if(f(U),!$(U))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qu=function(U,ie,be){try{m(U,ie)}catch{try{U.removeAttribute(be)}catch{}}},Ar=function(U){re(U);let ie=g(U);if(ie){let Ee=[];Jr(ie,Ke=>{Oc(Ee,Ke)}),Jr(Ee,Ke=>{try{f(Ke)}catch{}})}let be=w(U);if(be)for(let Ee=be.length-1;Ee>=0;--Ee){let Ke=be[Ee],$t=Ke&&Ke.name;typeof $t=="string"&&qu(U,Ke,$t)}},pa=function(U,ie,be){if(!be)try{be=ie.getAttributeNode(U)}catch{be=null}Oc(e.removed,{attribute:be||null,from:ie});try{be?m(ie,be):ie.removeAttribute(U)}catch{try{ie.removeAttribute(U)}catch{}}if(U==="is")if(Qn||Is)try{Ka(ie)}catch{}else try{ie.setAttribute(U,"")}catch{}},W=function(U){let ie=w(U);if(ie)for(let be=ie.length-1;be>=0;--be){let Ee=ie[be],Ke=Ee&&Ee.name;typeof Ke!="string"||We[rn(Ke)]||qu(U,Ee,Ke)}},re=function(U){let ie=[U];for(;ie.length>0;){let be=ie.pop();A(be)===sa.element&&W(be);let Ee=g(be);if(Ee)for(let Ke=Ee.length-1;Ke>=0;--Ke)ie.push(Ee[Ke])}},pe=function(U,ie){return It?U==="patchsrc"?!0:U==="for"&&ie!=="label"&&ie!=="output":!1},me=function(U){if(!It)return;let ie=[U];for(;ie.length>0;){let be=ie.pop(),Ee=A(be);if(Ee===sa.processingInstruction||Ee===sa.comment&&ps(N3,be.data)){try{f(be)}catch{}continue}if(Ee===sa.element){let $t=be,kt=rn(E(be));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&pe("for",kt)&&$t.removeAttribute("for")}catch{}}let Ke=g(be);if(Ke)for(let $t=Ke.length-1;$t>=0;--$t)ie.push(Ke[$t])}},Me=function(U){let ie=null,be=null;if(at)U="<remove></remove>"+U;else{let $t=T3(U,/^[\r\n\t ]+/);be=$t&&$t[0]}Ma==="application/xhtml+xml"&&tn===ue&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");let Ee=S?Z(U):U;if(tn===ue)try{ie=new c().parseFromString(Ee,Ma)}catch{}if(!ie||!ie.documentElement){ie=B.createDocument(tn,"template",null);try{ie.documentElement.innerHTML=Se?_:Ee}catch{}}let Ke=ie.body||ie.documentElement;return U&&be&&Ke.insertBefore(n.createTextNode(be),Ke.childNodes[0]||null),tn===ue?se.call(ie,Te?"html":"body")[0]:Te?ie.documentElement:Ke},Ie=function(U){let ie=k?k(U):U.ownerDocument;return J.call(ie||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ge=function(U){return U=Nc(U,oe," "),U=Nc(U,ce," "),U=Nc(U,le," "),U},wt=function(U){var ie;U.normalize();let be=k?k(U):U.ownerDocument,Ee=J.call(be||U,U,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Ke=Ee.nextNode();for(;Ke;)Ke.data=Ge(Ke.data),Ke=Ee.nextNode();let $t=(ie=U.querySelectorAll)===null||ie===void 0?void 0:ie.call(U,"template");$t&&Jr($t,kt=>{lt(kt.content)&&wt(kt.content)})},it=function(U){let ie=T?T(U):null;return typeof ie!="string"||rn(ie)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==w(U)||typeof U.removeAttribute!="function"||typeof U.removeAttributeNode!="function"||typeof U.getAttributeNode!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==x(U)||U.childNodes!==g(U)},lt=function(U){if(!x||typeof U!="object"||U===null)return!1;try{return x(U)===sa.documentFragment}catch{return!1}},Vt=function(U){if(!x||typeof U!="object"||U===null)return!1;try{return typeof x(U)=="number"}catch{return!1}};function Ln(ke,U,ie){ke.length!==0&&Jr(ke,be=>{be.call(e,U,ie,Wi)})}let Cr=function(U,ie){return!!(It&&U.hasChildNodes()&&!Vt(U.firstElementChild)&&ps(O3,U.textContent)&&ps(O3,U.innerHTML)||It&&U.namespaceURI===ue&&VI[ie]&&(Vt(U.firstElementChild)||typeof U.textContent=="string"&&ps(YI[ie],U.textContent))||U.nodeType===sa.processingInstruction||It&&U.nodeType===sa.comment&&ps(N3,U.data))},On=function(U,ie){if(U instanceof RegExp)return ps(U,ie);if(U instanceof Function){for(var be=arguments.length,Ee=new Array(be>2?be-2:0),Ke=2;Ke<be;Ke++)Ee[Ke-2]=arguments[Ke];return!!U(ie,...Ee)}return!1},Wu=function(U,ie,be){if(!Ft[ie]&&Sv(ie)&&On(Bt.tagNameCheck,ie))return!1;if(vn&&!ht[ie]){let Ee=$(U),Ke=g(U);if(Ke&&Ee){let $t=Ke.length;for(let kt=$t-1;kt>=0;--kt){let wn=U===be?p(Ke[kt],!0):Ke[kt];Ee.insertBefore(wn,b(U))}}}return Ka(U),!0},_l=function(U,ie,be,Ee){return U.length===0?ie:ie===be||ie===Ee?aa(ie):ie},Gi=function(U,ie){return U===ie||$(U)!==null?!1:(rs&&re(U),!0)},$s=function(U,ie){if(Ln(H.beforeSanitizeElements,U,null),Gi(U,ie))return!0;if(it(U))return Ka(U),!0;let be=rn(E(U));if(Ue=_l(H.uponSanitizeElement,Ue,sn,bn),Ln(H.uponSanitizeElement,U,{tagName:be,allowedTags:Ue}),Gi(U,ie))return!0;if(Cr(U,be))return Ka(U),!0;if(Ft[be]||!(At.tagCheck instanceof Function&&At.tagCheck(be))&&!Ue[be]){let Ee=Wu(U,be,ie);return Ee===!1&&(Ln(H.afterSanitizeElements,U,null),Gi(U,ie))?!0:Ee}if(A(U)===sa.element&&!Hu(U)||(be==="noscript"||be==="noembed"||be==="noframes")&&ps(GI,U.innerHTML))return Ka(U),!0;if(gt&&U.nodeType===sa.text){let Ee=Ge(U.textContent);U.textContent!==Ee&&(Oc(e.removed,{element:U.cloneNode()}),U.textContent=Ee)}return Ln(H.afterSanitizeElements,U,null),Gi(U,ie)},Tr=function(U,ie,be){if(zt[ie]||pe(ie,U)||Jn&&(ie==="id"||ie==="name")&&(be in n||be in Fu))return!1;let Ee=We[ie]||At.attributeCheck instanceof Function&&At.attributeCheck(ie,U);return Ne&&ps(ae,ie)||$e&&ps(de,ie)?!0:Ee?an[ie]||ps(bt,Nc(be,qe,""))||(ie==="src"||ie==="xlink:href"||ie==="href")&&U!=="script"&&E3(be,"data:")===0&&Oe[U]||Re&&!ps(he,Nc(be,qe,""))?!0:!be:Sv(U)&&On(Bt.tagNameCheck,U)&&On(Bt.attributeNameCheck,ie,U)||ie==="is"&&Bt.allowCustomizedBuiltInElements&&On(Bt.tagNameCheck,be)},ji=Mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sv=function(U){return!ji[Fc(U)]&&ps(St,U)},DT=function(U,ie,be,Ee){if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!be)switch(d.getAttributeType(U,ie)){case"TrustedHTML":return Z(Ee);case"TrustedScriptURL":return z(Ee)}return Ee},LT=function(U,ie,be,Ee){try{return be?U.setAttributeNS(be,ie,Ee):U.setAttribute(ie,Ee),it(U)?(Ka(U),!1):!0}catch{return pa(ie,U),!1}},Av=function(U,ie){if(Ln(H.beforeSanitizeAttributes,U,null),Gi(U,ie))return;let be=U.attributes;if(!be||it(U))return;We=_l(H.uponSanitizeAttribute,We,Nt,Vn);let Ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:We,forceKeepAttr:void 0},Ke=be.length,$t=rn(U.nodeName);for(;Ke--;){let kt=be[Ke],wn=kt.name,fa=kt.namespaceURI,Ys=kt.value,fo=rn(wn),Y0=Ys,ys=wn==="value"?Y0:TI(Y0),Cv=!1;if(Ee.attrName=fo,Ee.attrValue=ys,Ee.keepAttr=!0,Ee.forceKeepAttr=void 0,Ln(H.uponSanitizeAttribute,U,Ee),ys=Ee.attrValue,Rs&&(fo==="id"||fo==="name")&&E3(ys,yn)!==0&&(pa(wn,U,kt),ys=yn+ys,Cv=!0),It&&ps(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ys)){pa(wn,U,kt);continue}if(fo==="attributename"&&T3(ys,"href")){pa(wn,U,kt);continue}if(!Ee.forceKeepAttr){if(!Ee.keepAttr){pa(wn,U,kt);continue}if(!hn&&ps(jI,ys)){pa(wn,U,kt);continue}if(gt&&(ys=Ge(ys)),!Tr($t,fo,ys)){pa(wn,U,kt);continue}ys=DT($t,fo,fa,ys),ys!==Y0&&LT(U,wn,fa,ys)&&Cv&&C3(e.removed)}}Ln(H.afterSanitizeAttributes,U,null),Gi(U,ie)},Gu=function(U){let ie=null,be=Ie(U);for(Ln(H.beforeSanitizeShadowDOM,U,null);ie=be.nextNode();)if(Ln(H.uponSanitizeShadowNode,ie,null),$s(ie,U),Av(ie,U),lt(ie.content)&&Gu(ie.content),A(ie)===sa.element){let Ee=v(ie);lt(Ee)&&(V0(Ee),Gu(Ee))}Ln(H.afterSanitizeShadowDOM,U,null)},V0=function(U){let ie=[{node:U,shadow:null}];for(;ie.length>0;){let be=ie.pop();if(be.shadow){Gu(be.shadow);continue}let Ee=be.node,Ke=A(Ee)===sa.element,$t=g(Ee);if($t)for(let kt=$t.length-1;kt>=0;--kt)ie.push({node:$t[kt],shadow:null});if(Ke){let kt=T?T(Ee):null;if(typeof kt=="string"&&rn(kt)==="template"){let wn=Ee.content;lt(wn)&&ie.push({node:wn,shadow:null})}}if(Ke){let kt=v(Ee);lt(kt)&&ie.push({node:null,shadow:kt},{node:kt,shadow:null})}}};return e.sanitize=function(ke){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,be=null,Ee=null,Ke=null;if(Se=!ke,Se&&(ke="<!-->"),typeof ke!="string"&&!Vt(ke)&&(ke=RI(ke),typeof ke!="string"))throw or("dirty is not a string, aborting");if(!e.isSupported)return ke;Qe?(Ue=bn,We=Vn):po(U),(H.uponSanitizeElement.length>0||H.uponSanitizeAttribute.length>0)&&(Ue=aa(Ue)),H.uponSanitizeAttribute.length>0&&(We=aa(We)),e.removed=[];let $t=rs&&typeof ke!="string"&&Vt(ke);if($t){me(ke);let fa=E(ke);if(typeof fa=="string"){let Ys=rn(fa);if(!Ue[Ys]||Ft[Ys])throw Ar(ke),or("root node is forbidden and cannot be sanitized in-place")}if(it(ke))throw Ar(ke),or("root node is clobbered and cannot be sanitized in-place");try{V0(ke)}catch(Ys){throw Ar(ke),Ys}}else if(Vt(ke))ie=Me("<!---->"),be=ie.ownerDocument.importNode(ke,!0),be.nodeType===sa.element&&be.nodeName==="BODY"||be.nodeName==="HTML"?ie=be:ie.appendChild(be),V0(ie);else{if(!Qn&&!gt&&!Te&&ke.indexOf("<")===-1)return S&&$n?Z(ke):ke;if(ie=Me(ke),!ie)return Qn?null:$n?_:""}ie&&at&&Ka(ie.firstChild);let kt=$t?ke:ie;try{let fa=Ie(kt);for(;Ee=fa.nextNode();)$s(Ee,kt),Av(Ee,kt),lt(Ee.content)&&Gu(Ee.content)}catch(fa){throw $t&&(Ar(ke),Jr(e.removed,Ys=>{Ys.element&&re(Ys.element)})),fa}if($t){let fa=!1;if(Jr(e.removed,Ys=>{Ys.element&&(Ys.element===ke&&(fa=!0),re(Ys.element))}),fa)throw or("a node selected for removal could not be safely returned; refusing to sanitize in place");return gt&&wt(ke),ke}if(Qn){if(gt&&wt(ie),Is)for(Ke=j.call(ie.ownerDocument);ie.firstChild;)Ke.appendChild(ie.firstChild);else Ke=ie;return(We.shadowroot||We.shadowrootmode)&&(Ke=X.call(s,Ke,!0)),Ke}let wn=Te?ie.outerHTML:ie.innerHTML;return Te&&Ue["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&ps(qI,ie.ownerDocument.doctype.name)&&(wn="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
781
781
  `+wn),gt&&(wn=Ge(wn)),S&&$n?Z(wn):wn},e.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};po(ke),Qe=!0,bn=Ue,Vn=We},e.clearConfig=function(){Wi=null,Qe=!1,bn=null,Vn=null,S=I,_=""},e.isValidAttribute=function(ke,U,ie){Wi||po({});let be=rn(ke),Ee=rn(U);return Tr(be,Ee,ie)},e.addHook=function(ke,U){typeof U=="function"&&Bs(H,ke)&&Oc(H[ke],U)},e.removeHook=function(ke,U){if(Bs(H,ke)){if(U!==void 0){let ie=AI(H[ke],U);return ie===-1?void 0:CI(H[ke],ie,1)[0]}return C3(H[ke])}},e.removeHooks=function(ke){Bs(H,ke)&&(H[ke]=[])},e.removeAllHooks=function(){H=B3()},e}var Hh=H3();var xe=class t extends Error{constructor(e,n){var s="KaTeX parse error: "+e,a,i,r=n&&n.loc;if(r&&r.start<=r.end){var o=r.lexer.input;a=r.start,i=r.end,a===o.length?s+=" at end of input: ":s+=" at position "+(a+1)+": ";var l=o.slice(a,i).replace(/[^]/g,"$&\u0332"),c;a>15?c="\u2026"+o.slice(a-15,a):c=o.slice(0,a);var d;i+15<o.length?d=o.slice(i,i+15)+"\u2026":d=o.slice(i),s+=c+l+d}super(s),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,t.prototype),this.position=a,a!=null&&i!=null&&(this.length=i-a),this.rawMessage=e}},ZI=/([A-Z])/g,QI=t=>t.replace(ZI,"-$1").toLowerCase(),JI={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},eR=/[&><"']/g,ms=t=>String(t).replace(eR,e=>JI[e]),Jh=t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?Jh(t.body[0]):t:t.type==="font"?Jh(t.body):t,tR=new Set(["mathord","textord","atom"]),Pi=t=>tR.has(Jh(t).type),nR=t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},Wb={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 <type>"},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 <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:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",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:t=>Math.max(0,t),cli:"-s, --max-size <n>",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:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function sR(t){if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function aR(t){if(t.default!==void 0)return t.default;var e=Array.isArray(t.type)?t.type[0]:t.type;return sR(e)}function iR(t,e,n,s){var a=n[e];t[e]=a!==void 0?s.processor?s.processor(a):a:aR(s)}var Wc=class{constructor(e){e===void 0&&(e={}),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=e||{};for(var n of Object.keys(Wb)){var s=Wb[n];s&&iR(this,n,e,s)}}reportNonstrict(e,n,s){var a=this.strict;if(typeof a=="function"&&(a=a(e,n,s)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new xe("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),s);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,s){var a=this.strict;if(typeof a=="function")try{a=a(e,n,s)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var n=nR(e.url);if(n==null)return!1;e.protocol=n}var s=typeof this.trust=="function"?this.trust(e):this.trust;return!!s}},si=class{constructor(e,n,s){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=s}sup(){return ai[rR[this.id]]}sub(){return ai[oR[this.id]]}fracNum(){return ai[lR[this.id]]}fracDen(){return ai[cR[this.id]]}cramp(){return ai[uR[this.id]]}text(){return ai[dR[this.id]]}isTight(){return this.size>=2}},d1=0,tp=1,al=2,Ri=3,Gc=4,xa=5,il=6,As=7,ai=[new si(d1,0,!1),new si(tp,0,!0),new si(al,1,!1),new si(Ri,1,!0),new si(Gc,2,!1),new si(xa,2,!0),new si(il,3,!1),new si(As,3,!0)],rR=[Gc,xa,Gc,xa,il,As,il,As],oR=[xa,xa,xa,xa,As,As,As,As],lR=[al,Ri,Gc,xa,il,As,il,As],cR=[Ri,Ri,xa,xa,As,As,As,As],uR=[tp,tp,Ri,Ri,xa,xa,As,As],dR=[d1,tp,al,Ri,al,Ri,al,Ri],rt={DISPLAY:ai[d1],TEXT:ai[al],SCRIPT:ai[Gc],SCRIPTSCRIPT:ai[il]},Gb=[{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 hR(t){for(var e=0;e<Gb.length;e++)for(var n=Gb[e],s=0;s<n.blocks.length;s++){var a=n.blocks[s];if(t>=a[0]&&t<=a[1])return n.name}return null}var ep=[];Gb.forEach(t=>t.blocks.forEach(e=>ep.push(...e)));function Sx(t){for(var e=0;e<ep.length;e+=2)if(t>=ep[e]&&t<=ep[e+1])return!0;return!1}var Hn=t=>t+" "+t,sl=80,pR=function(e,n){return"M95,"+(622+e+n)+`
782
782
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
783
783
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
@@ -1029,7 +1029,7 @@ 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
1029
1029
  c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
1030
1030
  l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
1031
1031
  -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function xR(t){return"toText"in t}var dr=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(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){return this.children.map(e=>{if(xR(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}},jb={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},SR={ex:!0,em:!0,mu:!0},Ax=function(e){return typeof e!="string"&&(e=e.unit),e in jb||e in SR||e==="ex"},gn=function(e,n){var s;if(e.unit in jb)s=jb[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit==="mu")s=n.fontMetrics().cssEmPerMu;else{var a;if(n.style.isTight()?a=n.havingStyle(n.style.text()):a=n,e.unit==="ex")s=a.fontMetrics().xHeight;else if(e.unit==="em")s=a.fontMetrics().quad;else throw new xe("Invalid unit: '"+e.unit+"'");a!==n&&(s*=a.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*s,n.maxSize)},Ce=function(e){return+e.toFixed(4)+"em"},hr=function(e){return e.filter(n=>n).join(" ")},h1=function(e){var n="";for(var s of Object.keys(e)){var a=e[s];a!==void 0&&(n+=QI(s)+":"+a+";")}return n},Cx=function(e,n,s){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=s||{},n){n.style.isTight()&&this.classes.push("mtight");var a=n.getColor();a&&(this.style.color=a)}},Tx=function(e){var n=document.createElement(e);n.className=hr(this.classes),Object.assign(n.style,this.style);for(var s of Object.keys(this.attributes))n.setAttribute(s,this.attributes[s]);for(var a=0;a<this.children.length;a++)n.appendChild(this.children[a].toNode());return n},AR=/[\s"'>/=\x00-\x1f]/,Ex=function(e){var n="<"+e;this.classes.length&&(n+=' class="'+ms(hr(this.classes))+'"');var s=h1(this.style);s&&(n+=' style="'+ms(s)+'"');for(var a of Object.keys(this.attributes)){if(AR.test(a))throw new xe("Invalid attribute name '"+a+"'");n+=" "+a+'="'+ms(this.attributes[a])+'"'}n+=">";for(var i=0;i<this.children.length;i++)n+=this.children[i].toMarkup();return n+="</"+e+">",n},pr=class{constructor(e,n,s,a){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,this.italic=void 0,Cx.call(this,e,s,a),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return this.classes.includes(e)}toNode(){return Tx.call(this,"span")}toMarkup(){return Ex.call(this,"span")}},rl=class{constructor(e,n,s,a){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,Cx.call(this,n,a),this.children=s||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return this.classes.includes(e)}toNode(){return Tx.call(this,"a")}toMarkup(){return Ex.call(this,"a")}},Vb=class{constructor(e,n,s){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=n,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=s}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+ms(this.src)+'"'+(' alt="'+ms(this.alt)+'"'),n=h1(this.style);return n&&(e+=' style="'+ms(n)+'"'),e+="'/>",e}},CR={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},Cs=class{constructor(e,n,s,a,i,r,o,l){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=n||0,this.depth=s||0,this.italic=a||0,this.skew=i||0,this.width=r||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var c=hR(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=CR[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=Ce(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=hr(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="<span";this.classes.length&&(e=!0,n+=' class="',n+=ms(hr(this.classes)),n+='"');var s="";this.italic>0&&(s+="margin-right:"+Ce(this.italic)+";"),s+=h1(this.style),s&&(e=!0,n+=' style="'+ms(s)+'"');var a=ms(this.text);return e?(n+=">",n+=a,n+="</span>",n):a}},Ga=class{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var s of Object.keys(this.attributes))n.setAttribute(s,this.attributes[s]);for(var a=0;a<this.children.length;a++)n.appendChild(this.children[a].toNode());return n}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))e+=" "+n+'="'+ms(this.attributes[n])+'"';e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</svg>",e}},ri=class{constructor(e,n){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=n}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",q3[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+ms(this.alternate)+'"/>':'<path d="'+ms(q3[this.pathName])+'"/>'}},jc=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var s of Object.keys(this.attributes))n.setAttribute(s,this.attributes[s]);return n}toMarkup(){var e="<line";for(var n of Object.keys(this.attributes))e+=" "+n+'="'+ms(this.attributes[n])+'"';return e+="/>",e}};function TR(t){if(t instanceof Cs)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function ER(t){if(t instanceof pr)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var MR=t=>t instanceof pr||t instanceof rl||t instanceof dr,ii={"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]}},qh={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]},W3={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function _R(t,e){ii[t]=e}function p1(t,e,n){if(!ii[e])throw new Error("Font metrics not found for font: "+e+".");var s=t.charCodeAt(0),a=ii[e][s];if(!a&&t[0]in W3&&(s=W3[t[0]].charCodeAt(0),a=ii[e][s]),!a&&n==="text"&&Sx(s)&&(a=ii[e][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var _b={};function IR(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!_b[e]){var n=_b[e]={cssEmPerMu:qh.quad[e]/18};for(var s in qh)qh.hasOwnProperty(s)&&(n[s]=qh[s][e])}return _b[e]}var un={math:{},text:{}};function C(t,e,n,s,a,i){un[t][a]={font:e,group:n,replace:s},i&&s&&(un[t][s]=un[t][a])}var M="math",ge="text",L="main",Y="ams",dn="accent-token",Le="bin",Ts="close",cl="inner",Ze="mathord",Dn="op-token",ra="open",Yc="punct",K="rel",Di="spacing",te="textord";C(M,L,K,"\u2261","\\equiv",!0);C(M,L,K,"\u227A","\\prec",!0);C(M,L,K,"\u227B","\\succ",!0);C(M,L,K,"\u223C","\\sim",!0);C(M,L,K,"\u22A5","\\perp");C(M,L,K,"\u2AAF","\\preceq",!0);C(M,L,K,"\u2AB0","\\succeq",!0);C(M,L,K,"\u2243","\\simeq",!0);C(M,L,K,"\u2223","\\mid",!0);C(M,L,K,"\u226A","\\ll",!0);C(M,L,K,"\u226B","\\gg",!0);C(M,L,K,"\u224D","\\asymp",!0);C(M,L,K,"\u2225","\\parallel");C(M,L,K,"\u22C8","\\bowtie",!0);C(M,L,K,"\u2323","\\smile",!0);C(M,L,K,"\u2291","\\sqsubseteq",!0);C(M,L,K,"\u2292","\\sqsupseteq",!0);C(M,L,K,"\u2250","\\doteq",!0);C(M,L,K,"\u2322","\\frown",!0);C(M,L,K,"\u220B","\\ni",!0);C(M,L,K,"\u221D","\\propto",!0);C(M,L,K,"\u22A2","\\vdash",!0);C(M,L,K,"\u22A3","\\dashv",!0);C(M,L,K,"\u220B","\\owns");C(M,L,Yc,".","\\ldotp");C(M,L,Yc,"\u22C5","\\cdotp");C(M,L,Yc,"\u22C5","\xB7");C(ge,L,te,"\u22C5","\xB7");C(M,L,te,"#","\\#");C(ge,L,te,"#","\\#");C(M,L,te,"&","\\&");C(ge,L,te,"&","\\&");C(M,L,te,"\u2135","\\aleph",!0);C(M,L,te,"\u2200","\\forall",!0);C(M,L,te,"\u210F","\\hbar",!0);C(M,L,te,"\u2203","\\exists",!0);C(M,L,te,"\u2207","\\nabla",!0);C(M,L,te,"\u266D","\\flat",!0);C(M,L,te,"\u2113","\\ell",!0);C(M,L,te,"\u266E","\\natural",!0);C(M,L,te,"\u2663","\\clubsuit",!0);C(M,L,te,"\u2118","\\wp",!0);C(M,L,te,"\u266F","\\sharp",!0);C(M,L,te,"\u2662","\\diamondsuit",!0);C(M,L,te,"\u211C","\\Re",!0);C(M,L,te,"\u2661","\\heartsuit",!0);C(M,L,te,"\u2111","\\Im",!0);C(M,L,te,"\u2660","\\spadesuit",!0);C(M,L,te,"\xA7","\\S",!0);C(ge,L,te,"\xA7","\\S");C(M,L,te,"\xB6","\\P",!0);C(ge,L,te,"\xB6","\\P");C(M,L,te,"\u2020","\\dag");C(ge,L,te,"\u2020","\\dag");C(ge,L,te,"\u2020","\\textdagger");C(M,L,te,"\u2021","\\ddag");C(ge,L,te,"\u2021","\\ddag");C(ge,L,te,"\u2021","\\textdaggerdbl");C(M,L,Ts,"\u23B1","\\rmoustache",!0);C(M,L,ra,"\u23B0","\\lmoustache",!0);C(M,L,Ts,"\u27EF","\\rgroup",!0);C(M,L,ra,"\u27EE","\\lgroup",!0);C(M,L,Le,"\u2213","\\mp",!0);C(M,L,Le,"\u2296","\\ominus",!0);C(M,L,Le,"\u228E","\\uplus",!0);C(M,L,Le,"\u2293","\\sqcap",!0);C(M,L,Le,"\u2217","\\ast");C(M,L,Le,"\u2294","\\sqcup",!0);C(M,L,Le,"\u25EF","\\bigcirc",!0);C(M,L,Le,"\u2219","\\bullet",!0);C(M,L,Le,"\u2021","\\ddagger");C(M,L,Le,"\u2240","\\wr",!0);C(M,L,Le,"\u2A3F","\\amalg");C(M,L,Le,"&","\\And");C(M,L,K,"\u27F5","\\longleftarrow",!0);C(M,L,K,"\u21D0","\\Leftarrow",!0);C(M,L,K,"\u27F8","\\Longleftarrow",!0);C(M,L,K,"\u27F6","\\longrightarrow",!0);C(M,L,K,"\u21D2","\\Rightarrow",!0);C(M,L,K,"\u27F9","\\Longrightarrow",!0);C(M,L,K,"\u2194","\\leftrightarrow",!0);C(M,L,K,"\u27F7","\\longleftrightarrow",!0);C(M,L,K,"\u21D4","\\Leftrightarrow",!0);C(M,L,K,"\u27FA","\\Longleftrightarrow",!0);C(M,L,K,"\u21A6","\\mapsto",!0);C(M,L,K,"\u27FC","\\longmapsto",!0);C(M,L,K,"\u2197","\\nearrow",!0);C(M,L,K,"\u21A9","\\hookleftarrow",!0);C(M,L,K,"\u21AA","\\hookrightarrow",!0);C(M,L,K,"\u2198","\\searrow",!0);C(M,L,K,"\u21BC","\\leftharpoonup",!0);C(M,L,K,"\u21C0","\\rightharpoonup",!0);C(M,L,K,"\u2199","\\swarrow",!0);C(M,L,K,"\u21BD","\\leftharpoondown",!0);C(M,L,K,"\u21C1","\\rightharpoondown",!0);C(M,L,K,"\u2196","\\nwarrow",!0);C(M,L,K,"\u21CC","\\rightleftharpoons",!0);C(M,Y,K,"\u226E","\\nless",!0);C(M,Y,K,"\uE010","\\@nleqslant");C(M,Y,K,"\uE011","\\@nleqq");C(M,Y,K,"\u2A87","\\lneq",!0);C(M,Y,K,"\u2268","\\lneqq",!0);C(M,Y,K,"\uE00C","\\@lvertneqq");C(M,Y,K,"\u22E6","\\lnsim",!0);C(M,Y,K,"\u2A89","\\lnapprox",!0);C(M,Y,K,"\u2280","\\nprec",!0);C(M,Y,K,"\u22E0","\\npreceq",!0);C(M,Y,K,"\u22E8","\\precnsim",!0);C(M,Y,K,"\u2AB9","\\precnapprox",!0);C(M,Y,K,"\u2241","\\nsim",!0);C(M,Y,K,"\uE006","\\@nshortmid");C(M,Y,K,"\u2224","\\nmid",!0);C(M,Y,K,"\u22AC","\\nvdash",!0);C(M,Y,K,"\u22AD","\\nvDash",!0);C(M,Y,K,"\u22EA","\\ntriangleleft");C(M,Y,K,"\u22EC","\\ntrianglelefteq",!0);C(M,Y,K,"\u228A","\\subsetneq",!0);C(M,Y,K,"\uE01A","\\@varsubsetneq");C(M,Y,K,"\u2ACB","\\subsetneqq",!0);C(M,Y,K,"\uE017","\\@varsubsetneqq");C(M,Y,K,"\u226F","\\ngtr",!0);C(M,Y,K,"\uE00F","\\@ngeqslant");C(M,Y,K,"\uE00E","\\@ngeqq");C(M,Y,K,"\u2A88","\\gneq",!0);C(M,Y,K,"\u2269","\\gneqq",!0);C(M,Y,K,"\uE00D","\\@gvertneqq");C(M,Y,K,"\u22E7","\\gnsim",!0);C(M,Y,K,"\u2A8A","\\gnapprox",!0);C(M,Y,K,"\u2281","\\nsucc",!0);C(M,Y,K,"\u22E1","\\nsucceq",!0);C(M,Y,K,"\u22E9","\\succnsim",!0);C(M,Y,K,"\u2ABA","\\succnapprox",!0);C(M,Y,K,"\u2246","\\ncong",!0);C(M,Y,K,"\uE007","\\@nshortparallel");C(M,Y,K,"\u2226","\\nparallel",!0);C(M,Y,K,"\u22AF","\\nVDash",!0);C(M,Y,K,"\u22EB","\\ntriangleright");C(M,Y,K,"\u22ED","\\ntrianglerighteq",!0);C(M,Y,K,"\uE018","\\@nsupseteqq");C(M,Y,K,"\u228B","\\supsetneq",!0);C(M,Y,K,"\uE01B","\\@varsupsetneq");C(M,Y,K,"\u2ACC","\\supsetneqq",!0);C(M,Y,K,"\uE019","\\@varsupsetneqq");C(M,Y,K,"\u22AE","\\nVdash",!0);C(M,Y,K,"\u2AB5","\\precneqq",!0);C(M,Y,K,"\u2AB6","\\succneqq",!0);C(M,Y,K,"\uE016","\\@nsubseteqq");C(M,Y,Le,"\u22B4","\\unlhd");C(M,Y,Le,"\u22B5","\\unrhd");C(M,Y,K,"\u219A","\\nleftarrow",!0);C(M,Y,K,"\u219B","\\nrightarrow",!0);C(M,Y,K,"\u21CD","\\nLeftarrow",!0);C(M,Y,K,"\u21CF","\\nRightarrow",!0);C(M,Y,K,"\u21AE","\\nleftrightarrow",!0);C(M,Y,K,"\u21CE","\\nLeftrightarrow",!0);C(M,Y,K,"\u25B3","\\vartriangle");C(M,Y,te,"\u210F","\\hslash");C(M,Y,te,"\u25BD","\\triangledown");C(M,Y,te,"\u25CA","\\lozenge");C(M,Y,te,"\u24C8","\\circledS");C(M,Y,te,"\xAE","\\circledR");C(ge,Y,te,"\xAE","\\circledR");C(M,Y,te,"\u2221","\\measuredangle",!0);C(M,Y,te,"\u2204","\\nexists");C(M,Y,te,"\u2127","\\mho");C(M,Y,te,"\u2132","\\Finv",!0);C(M,Y,te,"\u2141","\\Game",!0);C(M,Y,te,"\u2035","\\backprime");C(M,Y,te,"\u25B2","\\blacktriangle");C(M,Y,te,"\u25BC","\\blacktriangledown");C(M,Y,te,"\u25A0","\\blacksquare");C(M,Y,te,"\u29EB","\\blacklozenge");C(M,Y,te,"\u2605","\\bigstar");C(M,Y,te,"\u2222","\\sphericalangle",!0);C(M,Y,te,"\u2201","\\complement",!0);C(M,Y,te,"\xF0","\\eth",!0);C(ge,L,te,"\xF0","\xF0");C(M,Y,te,"\u2571","\\diagup");C(M,Y,te,"\u2572","\\diagdown");C(M,Y,te,"\u25A1","\\square");C(M,Y,te,"\u25A1","\\Box");C(M,Y,te,"\u25CA","\\Diamond");C(M,Y,te,"\xA5","\\yen",!0);C(ge,Y,te,"\xA5","\\yen",!0);C(M,Y,te,"\u2713","\\checkmark",!0);C(ge,Y,te,"\u2713","\\checkmark");C(M,Y,te,"\u2136","\\beth",!0);C(M,Y,te,"\u2138","\\daleth",!0);C(M,Y,te,"\u2137","\\gimel",!0);C(M,Y,te,"\u03DD","\\digamma",!0);C(M,Y,te,"\u03F0","\\varkappa");C(M,Y,ra,"\u250C","\\@ulcorner",!0);C(M,Y,Ts,"\u2510","\\@urcorner",!0);C(M,Y,ra,"\u2514","\\@llcorner",!0);C(M,Y,Ts,"\u2518","\\@lrcorner",!0);C(M,Y,K,"\u2266","\\leqq",!0);C(M,Y,K,"\u2A7D","\\leqslant",!0);C(M,Y,K,"\u2A95","\\eqslantless",!0);C(M,Y,K,"\u2272","\\lesssim",!0);C(M,Y,K,"\u2A85","\\lessapprox",!0);C(M,Y,K,"\u224A","\\approxeq",!0);C(M,Y,Le,"\u22D6","\\lessdot");C(M,Y,K,"\u22D8","\\lll",!0);C(M,Y,K,"\u2276","\\lessgtr",!0);C(M,Y,K,"\u22DA","\\lesseqgtr",!0);C(M,Y,K,"\u2A8B","\\lesseqqgtr",!0);C(M,Y,K,"\u2251","\\doteqdot");C(M,Y,K,"\u2253","\\risingdotseq",!0);C(M,Y,K,"\u2252","\\fallingdotseq",!0);C(M,Y,K,"\u223D","\\backsim",!0);C(M,Y,K,"\u22CD","\\backsimeq",!0);C(M,Y,K,"\u2AC5","\\subseteqq",!0);C(M,Y,K,"\u22D0","\\Subset",!0);C(M,Y,K,"\u228F","\\sqsubset",!0);C(M,Y,K,"\u227C","\\preccurlyeq",!0);C(M,Y,K,"\u22DE","\\curlyeqprec",!0);C(M,Y,K,"\u227E","\\precsim",!0);C(M,Y,K,"\u2AB7","\\precapprox",!0);C(M,Y,K,"\u22B2","\\vartriangleleft");C(M,Y,K,"\u22B4","\\trianglelefteq");C(M,Y,K,"\u22A8","\\vDash",!0);C(M,Y,K,"\u22AA","\\Vvdash",!0);C(M,Y,K,"\u2323","\\smallsmile");C(M,Y,K,"\u2322","\\smallfrown");C(M,Y,K,"\u224F","\\bumpeq",!0);C(M,Y,K,"\u224E","\\Bumpeq",!0);C(M,Y,K,"\u2267","\\geqq",!0);C(M,Y,K,"\u2A7E","\\geqslant",!0);C(M,Y,K,"\u2A96","\\eqslantgtr",!0);C(M,Y,K,"\u2273","\\gtrsim",!0);C(M,Y,K,"\u2A86","\\gtrapprox",!0);C(M,Y,Le,"\u22D7","\\gtrdot");C(M,Y,K,"\u22D9","\\ggg",!0);C(M,Y,K,"\u2277","\\gtrless",!0);C(M,Y,K,"\u22DB","\\gtreqless",!0);C(M,Y,K,"\u2A8C","\\gtreqqless",!0);C(M,Y,K,"\u2256","\\eqcirc",!0);C(M,Y,K,"\u2257","\\circeq",!0);C(M,Y,K,"\u225C","\\triangleq",!0);C(M,Y,K,"\u223C","\\thicksim");C(M,Y,K,"\u2248","\\thickapprox");C(M,Y,K,"\u2AC6","\\supseteqq",!0);C(M,Y,K,"\u22D1","\\Supset",!0);C(M,Y,K,"\u2290","\\sqsupset",!0);C(M,Y,K,"\u227D","\\succcurlyeq",!0);C(M,Y,K,"\u22DF","\\curlyeqsucc",!0);C(M,Y,K,"\u227F","\\succsim",!0);C(M,Y,K,"\u2AB8","\\succapprox",!0);C(M,Y,K,"\u22B3","\\vartriangleright");C(M,Y,K,"\u22B5","\\trianglerighteq");C(M,Y,K,"\u22A9","\\Vdash",!0);C(M,Y,K,"\u2223","\\shortmid");C(M,Y,K,"\u2225","\\shortparallel");C(M,Y,K,"\u226C","\\between",!0);C(M,Y,K,"\u22D4","\\pitchfork",!0);C(M,Y,K,"\u221D","\\varpropto");C(M,Y,K,"\u25C0","\\blacktriangleleft");C(M,Y,K,"\u2234","\\therefore",!0);C(M,Y,K,"\u220D","\\backepsilon");C(M,Y,K,"\u25B6","\\blacktriangleright");C(M,Y,K,"\u2235","\\because",!0);C(M,Y,K,"\u22D8","\\llless");C(M,Y,K,"\u22D9","\\gggtr");C(M,Y,Le,"\u22B2","\\lhd");C(M,Y,Le,"\u22B3","\\rhd");C(M,Y,K,"\u2242","\\eqsim",!0);C(M,L,K,"\u22C8","\\Join");C(M,Y,K,"\u2251","\\Doteq",!0);C(M,Y,Le,"\u2214","\\dotplus",!0);C(M,Y,Le,"\u2216","\\smallsetminus");C(M,Y,Le,"\u22D2","\\Cap",!0);C(M,Y,Le,"\u22D3","\\Cup",!0);C(M,Y,Le,"\u2A5E","\\doublebarwedge",!0);C(M,Y,Le,"\u229F","\\boxminus",!0);C(M,Y,Le,"\u229E","\\boxplus",!0);C(M,Y,Le,"\u22C7","\\divideontimes",!0);C(M,Y,Le,"\u22C9","\\ltimes",!0);C(M,Y,Le,"\u22CA","\\rtimes",!0);C(M,Y,Le,"\u22CB","\\leftthreetimes",!0);C(M,Y,Le,"\u22CC","\\rightthreetimes",!0);C(M,Y,Le,"\u22CF","\\curlywedge",!0);C(M,Y,Le,"\u22CE","\\curlyvee",!0);C(M,Y,Le,"\u229D","\\circleddash",!0);C(M,Y,Le,"\u229B","\\circledast",!0);C(M,Y,Le,"\u22C5","\\centerdot");C(M,Y,Le,"\u22BA","\\intercal",!0);C(M,Y,Le,"\u22D2","\\doublecap");C(M,Y,Le,"\u22D3","\\doublecup");C(M,Y,Le,"\u22A0","\\boxtimes",!0);C(M,Y,K,"\u21E2","\\dashrightarrow",!0);C(M,Y,K,"\u21E0","\\dashleftarrow",!0);C(M,Y,K,"\u21C7","\\leftleftarrows",!0);C(M,Y,K,"\u21C6","\\leftrightarrows",!0);C(M,Y,K,"\u21DA","\\Lleftarrow",!0);C(M,Y,K,"\u219E","\\twoheadleftarrow",!0);C(M,Y,K,"\u21A2","\\leftarrowtail",!0);C(M,Y,K,"\u21AB","\\looparrowleft",!0);C(M,Y,K,"\u21CB","\\leftrightharpoons",!0);C(M,Y,K,"\u21B6","\\curvearrowleft",!0);C(M,Y,K,"\u21BA","\\circlearrowleft",!0);C(M,Y,K,"\u21B0","\\Lsh",!0);C(M,Y,K,"\u21C8","\\upuparrows",!0);C(M,Y,K,"\u21BF","\\upharpoonleft",!0);C(M,Y,K,"\u21C3","\\downharpoonleft",!0);C(M,L,K,"\u22B6","\\origof",!0);C(M,L,K,"\u22B7","\\imageof",!0);C(M,Y,K,"\u22B8","\\multimap",!0);C(M,Y,K,"\u21AD","\\leftrightsquigarrow",!0);C(M,Y,K,"\u21C9","\\rightrightarrows",!0);C(M,Y,K,"\u21C4","\\rightleftarrows",!0);C(M,Y,K,"\u21A0","\\twoheadrightarrow",!0);C(M,Y,K,"\u21A3","\\rightarrowtail",!0);C(M,Y,K,"\u21AC","\\looparrowright",!0);C(M,Y,K,"\u21B7","\\curvearrowright",!0);C(M,Y,K,"\u21BB","\\circlearrowright",!0);C(M,Y,K,"\u21B1","\\Rsh",!0);C(M,Y,K,"\u21CA","\\downdownarrows",!0);C(M,Y,K,"\u21BE","\\upharpoonright",!0);C(M,Y,K,"\u21C2","\\downharpoonright",!0);C(M,Y,K,"\u21DD","\\rightsquigarrow",!0);C(M,Y,K,"\u21DD","\\leadsto");C(M,Y,K,"\u21DB","\\Rrightarrow",!0);C(M,Y,K,"\u21BE","\\restriction");C(M,L,te,"\u2018","`");C(M,L,te,"$","\\$");C(ge,L,te,"$","\\$");C(ge,L,te,"$","\\textdollar");C(M,L,te,"%","\\%");C(ge,L,te,"%","\\%");C(M,L,te,"_","\\_");C(ge,L,te,"_","\\_");C(ge,L,te,"_","\\textunderscore");C(M,L,te,"\u2220","\\angle",!0);C(M,L,te,"\u221E","\\infty",!0);C(M,L,te,"\u2032","\\prime");C(M,L,te,"\u25B3","\\triangle");C(M,L,te,"\u0393","\\Gamma",!0);C(M,L,te,"\u0394","\\Delta",!0);C(M,L,te,"\u0398","\\Theta",!0);C(M,L,te,"\u039B","\\Lambda",!0);C(M,L,te,"\u039E","\\Xi",!0);C(M,L,te,"\u03A0","\\Pi",!0);C(M,L,te,"\u03A3","\\Sigma",!0);C(M,L,te,"\u03A5","\\Upsilon",!0);C(M,L,te,"\u03A6","\\Phi",!0);C(M,L,te,"\u03A8","\\Psi",!0);C(M,L,te,"\u03A9","\\Omega",!0);C(M,L,te,"A","\u0391");C(M,L,te,"B","\u0392");C(M,L,te,"E","\u0395");C(M,L,te,"Z","\u0396");C(M,L,te,"H","\u0397");C(M,L,te,"I","\u0399");C(M,L,te,"K","\u039A");C(M,L,te,"M","\u039C");C(M,L,te,"N","\u039D");C(M,L,te,"O","\u039F");C(M,L,te,"P","\u03A1");C(M,L,te,"T","\u03A4");C(M,L,te,"X","\u03A7");C(M,L,te,"\xAC","\\neg",!0);C(M,L,te,"\xAC","\\lnot");C(M,L,te,"\u22A4","\\top");C(M,L,te,"\u22A5","\\bot");C(M,L,te,"\u2205","\\emptyset");C(M,Y,te,"\u2205","\\varnothing");C(M,L,Ze,"\u03B1","\\alpha",!0);C(M,L,Ze,"\u03B2","\\beta",!0);C(M,L,Ze,"\u03B3","\\gamma",!0);C(M,L,Ze,"\u03B4","\\delta",!0);C(M,L,Ze,"\u03F5","\\epsilon",!0);C(M,L,Ze,"\u03B6","\\zeta",!0);C(M,L,Ze,"\u03B7","\\eta",!0);C(M,L,Ze,"\u03B8","\\theta",!0);C(M,L,Ze,"\u03B9","\\iota",!0);C(M,L,Ze,"\u03BA","\\kappa",!0);C(M,L,Ze,"\u03BB","\\lambda",!0);C(M,L,Ze,"\u03BC","\\mu",!0);C(M,L,Ze,"\u03BD","\\nu",!0);C(M,L,Ze,"\u03BE","\\xi",!0);C(M,L,Ze,"\u03BF","\\omicron",!0);C(M,L,Ze,"\u03C0","\\pi",!0);C(M,L,Ze,"\u03C1","\\rho",!0);C(M,L,Ze,"\u03C3","\\sigma",!0);C(M,L,Ze,"\u03C4","\\tau",!0);C(M,L,Ze,"\u03C5","\\upsilon",!0);C(M,L,Ze,"\u03D5","\\phi",!0);C(M,L,Ze,"\u03C7","\\chi",!0);C(M,L,Ze,"\u03C8","\\psi",!0);C(M,L,Ze,"\u03C9","\\omega",!0);C(M,L,Ze,"\u03B5","\\varepsilon",!0);C(M,L,Ze,"\u03D1","\\vartheta",!0);C(M,L,Ze,"\u03D6","\\varpi",!0);C(M,L,Ze,"\u03F1","\\varrho",!0);C(M,L,Ze,"\u03C2","\\varsigma",!0);C(M,L,Ze,"\u03C6","\\varphi",!0);C(M,L,Le,"\u2217","*",!0);C(M,L,Le,"+","+");C(M,L,Le,"\u2212","-",!0);C(M,L,Le,"\u22C5","\\cdot",!0);C(M,L,Le,"\u2218","\\circ",!0);C(M,L,Le,"\xF7","\\div",!0);C(M,L,Le,"\xB1","\\pm",!0);C(M,L,Le,"\xD7","\\times",!0);C(M,L,Le,"\u2229","\\cap",!0);C(M,L,Le,"\u222A","\\cup",!0);C(M,L,Le,"\u2216","\\setminus",!0);C(M,L,Le,"\u2227","\\land");C(M,L,Le,"\u2228","\\lor");C(M,L,Le,"\u2227","\\wedge",!0);C(M,L,Le,"\u2228","\\vee",!0);C(M,L,te,"\u221A","\\surd");C(M,L,ra,"\u27E8","\\langle",!0);C(M,L,ra,"\u2223","\\lvert");C(M,L,ra,"\u2225","\\lVert");C(M,L,Ts,"?","?");C(M,L,Ts,"!","!");C(M,L,Ts,"\u27E9","\\rangle",!0);C(M,L,Ts,"\u2223","\\rvert");C(M,L,Ts,"\u2225","\\rVert");C(M,L,K,"=","=");C(M,L,K,":",":");C(M,L,K,"\u2248","\\approx",!0);C(M,L,K,"\u2245","\\cong",!0);C(M,L,K,"\u2265","\\ge");C(M,L,K,"\u2265","\\geq",!0);C(M,L,K,"\u2190","\\gets");C(M,L,K,">","\\gt",!0);C(M,L,K,"\u2208","\\in",!0);C(M,L,K,"\uE020","\\@not");C(M,L,K,"\u2282","\\subset",!0);C(M,L,K,"\u2283","\\supset",!0);C(M,L,K,"\u2286","\\subseteq",!0);C(M,L,K,"\u2287","\\supseteq",!0);C(M,Y,K,"\u2288","\\nsubseteq",!0);C(M,Y,K,"\u2289","\\nsupseteq",!0);C(M,L,K,"\u22A8","\\models");C(M,L,K,"\u2190","\\leftarrow",!0);C(M,L,K,"\u2264","\\le");C(M,L,K,"\u2264","\\leq",!0);C(M,L,K,"<","\\lt",!0);C(M,L,K,"\u2192","\\rightarrow",!0);C(M,L,K,"\u2192","\\to");C(M,Y,K,"\u2271","\\ngeq",!0);C(M,Y,K,"\u2270","\\nleq",!0);C(M,L,Di,"\xA0","\\ ");C(M,L,Di,"\xA0","\\space");C(M,L,Di,"\xA0","\\nobreakspace");C(ge,L,Di,"\xA0","\\ ");C(ge,L,Di,"\xA0"," ");C(ge,L,Di,"\xA0","\\space");C(ge,L,Di,"\xA0","\\nobreakspace");C(M,L,Di,"","\\nobreak");C(M,L,Di,"","\\allowbreak");C(M,L,Yc,",",",");C(M,L,Yc,";",";");C(M,Y,Le,"\u22BC","\\barwedge",!0);C(M,Y,Le,"\u22BB","\\veebar",!0);C(M,L,Le,"\u2299","\\odot",!0);C(M,L,Le,"\u2295","\\oplus",!0);C(M,L,Le,"\u2297","\\otimes",!0);C(M,L,te,"\u2202","\\partial",!0);C(M,L,Le,"\u2298","\\oslash",!0);C(M,Y,Le,"\u229A","\\circledcirc",!0);C(M,Y,Le,"\u22A1","\\boxdot",!0);C(M,L,Le,"\u25B3","\\bigtriangleup");C(M,L,Le,"\u25BD","\\bigtriangledown");C(M,L,Le,"\u2020","\\dagger");C(M,L,Le,"\u22C4","\\diamond");C(M,L,Le,"\u22C6","\\star");C(M,L,Le,"\u25C3","\\triangleleft");C(M,L,Le,"\u25B9","\\triangleright");C(M,L,ra,"{","\\{");C(ge,L,te,"{","\\{");C(ge,L,te,"{","\\textbraceleft");C(M,L,Ts,"}","\\}");C(ge,L,te,"}","\\}");C(ge,L,te,"}","\\textbraceright");C(M,L,ra,"{","\\lbrace");C(M,L,Ts,"}","\\rbrace");C(M,L,ra,"[","\\lbrack",!0);C(ge,L,te,"[","\\lbrack",!0);C(M,L,Ts,"]","\\rbrack",!0);C(ge,L,te,"]","\\rbrack",!0);C(M,L,ra,"(","\\lparen",!0);C(M,L,Ts,")","\\rparen",!0);C(ge,L,te,"<","\\textless",!0);C(ge,L,te,">","\\textgreater",!0);C(M,L,ra,"\u230A","\\lfloor",!0);C(M,L,Ts,"\u230B","\\rfloor",!0);C(M,L,ra,"\u2308","\\lceil",!0);C(M,L,Ts,"\u2309","\\rceil",!0);C(M,L,te,"\\","\\backslash");C(M,L,te,"\u2223","|");C(M,L,te,"\u2223","\\vert");C(ge,L,te,"|","\\textbar",!0);C(M,L,te,"\u2225","\\|");C(M,L,te,"\u2225","\\Vert");C(ge,L,te,"\u2225","\\textbardbl");C(ge,L,te,"~","\\textasciitilde");C(ge,L,te,"\\","\\textbackslash");C(ge,L,te,"^","\\textasciicircum");C(M,L,K,"\u2191","\\uparrow",!0);C(M,L,K,"\u21D1","\\Uparrow",!0);C(M,L,K,"\u2193","\\downarrow",!0);C(M,L,K,"\u21D3","\\Downarrow",!0);C(M,L,K,"\u2195","\\updownarrow",!0);C(M,L,K,"\u21D5","\\Updownarrow",!0);C(M,L,Dn,"\u2210","\\coprod");C(M,L,Dn,"\u22C1","\\bigvee");C(M,L,Dn,"\u22C0","\\bigwedge");C(M,L,Dn,"\u2A04","\\biguplus");C(M,L,Dn,"\u22C2","\\bigcap");C(M,L,Dn,"\u22C3","\\bigcup");C(M,L,Dn,"\u222B","\\int");C(M,L,Dn,"\u222B","\\intop");C(M,L,Dn,"\u222C","\\iint");C(M,L,Dn,"\u222D","\\iiint");C(M,L,Dn,"\u220F","\\prod");C(M,L,Dn,"\u2211","\\sum");C(M,L,Dn,"\u2A02","\\bigotimes");C(M,L,Dn,"\u2A01","\\bigoplus");C(M,L,Dn,"\u2A00","\\bigodot");C(M,L,Dn,"\u222E","\\oint");C(M,L,Dn,"\u222F","\\oiint");C(M,L,Dn,"\u2230","\\oiiint");C(M,L,Dn,"\u2A06","\\bigsqcup");C(M,L,Dn,"\u222B","\\smallint");C(ge,L,cl,"\u2026","\\textellipsis");C(M,L,cl,"\u2026","\\mathellipsis");C(ge,L,cl,"\u2026","\\ldots",!0);C(M,L,cl,"\u2026","\\ldots",!0);C(M,L,cl,"\u22EF","\\@cdots",!0);C(M,L,cl,"\u22F1","\\ddots",!0);C(M,L,te,"\u22EE","\\varvdots");C(ge,L,te,"\u22EE","\\varvdots");C(M,L,dn,"\u02CA","\\acute");C(M,L,dn,"\u02CB","\\grave");C(M,L,dn,"\xA8","\\ddot");C(M,L,dn,"~","\\tilde");C(M,L,dn,"\u02C9","\\bar");C(M,L,dn,"\u02D8","\\breve");C(M,L,dn,"\u02C7","\\check");C(M,L,dn,"^","\\hat");C(M,L,dn,"\u20D7","\\vec");C(M,L,dn,"\u02D9","\\dot");C(M,L,dn,"\u02DA","\\mathring");C(M,L,Ze,"\uE131","\\@imath");C(M,L,Ze,"\uE237","\\@jmath");C(M,L,te,"\u0131","\u0131");C(M,L,te,"\u0237","\u0237");C(ge,L,te,"\u0131","\\i",!0);C(ge,L,te,"\u0237","\\j",!0);C(ge,L,te,"\xDF","\\ss",!0);C(ge,L,te,"\xE6","\\ae",!0);C(ge,L,te,"\u0153","\\oe",!0);C(ge,L,te,"\xF8","\\o",!0);C(ge,L,te,"\xC6","\\AE",!0);C(ge,L,te,"\u0152","\\OE",!0);C(ge,L,te,"\xD8","\\O",!0);C(ge,L,dn,"\u02CA","\\'");C(ge,L,dn,"\u02CB","\\`");C(ge,L,dn,"\u02C6","\\^");C(ge,L,dn,"\u02DC","\\~");C(ge,L,dn,"\u02C9","\\=");C(ge,L,dn,"\u02D8","\\u");C(ge,L,dn,"\u02D9","\\.");C(ge,L,dn,"\xB8","\\c");C(ge,L,dn,"\u02DA","\\r");C(ge,L,dn,"\u02C7","\\v");C(ge,L,dn,"\xA8",'\\"');C(ge,L,dn,"\u02DD","\\H");C(ge,L,dn,"\u25EF","\\textcircled");var Mx={"--":!0,"---":!0,"``":!0,"''":!0};C(ge,L,te,"\u2013","--",!0);C(ge,L,te,"\u2013","\\textendash");C(ge,L,te,"\u2014","---",!0);C(ge,L,te,"\u2014","\\textemdash");C(ge,L,te,"\u2018","`",!0);C(ge,L,te,"\u2018","\\textquoteleft");C(ge,L,te,"\u2019","'",!0);C(ge,L,te,"\u2019","\\textquoteright");C(ge,L,te,"\u201C","``",!0);C(ge,L,te,"\u201C","\\textquotedblleft");C(ge,L,te,"\u201D","''",!0);C(ge,L,te,"\u201D","\\textquotedblright");C(M,L,te,"\xB0","\\degree",!0);C(ge,L,te,"\xB0","\\degree");C(ge,L,te,"\xB0","\\textdegree",!0);C(M,L,te,"\xA3","\\pounds");C(M,L,te,"\xA3","\\mathsterling",!0);C(ge,L,te,"\xA3","\\pounds");C(ge,L,te,"\xA3","\\textsterling",!0);C(M,Y,te,"\u2720","\\maltese");C(ge,Y,te,"\u2720","\\maltese");var G3='0123456789/@."';for(Wh=0;Wh<G3.length;Wh++)Ib=G3.charAt(Wh),C(M,L,te,Ib,Ib);var Ib,Wh,j3='0123456789!@*()-=+";:?/.,';for(Gh=0;Gh<j3.length;Gh++)Rb=j3.charAt(Gh),C(ge,L,te,Rb,Rb);var Rb,Gh,np="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(jh=0;jh<np.length;jh++)zc=np.charAt(jh),C(M,L,Ze,zc,zc),C(ge,L,te,zc,zc);var zc,jh;C(M,Y,te,"C","\u2102");C(ge,Y,te,"C","\u2102");C(M,Y,te,"H","\u210D");C(ge,Y,te,"H","\u210D");C(M,Y,te,"N","\u2115");C(ge,Y,te,"N","\u2115");C(M,Y,te,"P","\u2119");C(ge,Y,te,"P","\u2119");C(M,Y,te,"Q","\u211A");C(ge,Y,te,"Q","\u211A");C(M,Y,te,"R","\u211D");C(ge,Y,te,"R","\u211D");C(M,Y,te,"Z","\u2124");C(ge,Y,te,"Z","\u2124");C(M,L,Ze,"h","\u210E");C(ge,L,Ze,"h","\u210E");var et;for(fs=0;fs<np.length;fs++)fn=np.charAt(fs),et=String.fromCharCode(55349,56320+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56372+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56424+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56580+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56684+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56736+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56788+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56840+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56944+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),fs<26&&(et=String.fromCharCode(55349,56632+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et),et=String.fromCharCode(55349,56476+fs),C(M,L,Ze,fn,et),C(ge,L,te,fn,et));var fn,fs;et="\u{1D55C}";C(M,L,Ze,"k",et);C(ge,L,te,"k",et);for(cr=0;cr<10;cr++)_i=cr.toString(),et=String.fromCharCode(55349,57294+cr),C(M,L,Ze,_i,et),C(ge,L,te,_i,et),et=String.fromCharCode(55349,57314+cr),C(M,L,Ze,_i,et),C(ge,L,te,_i,et),et=String.fromCharCode(55349,57324+cr),C(M,L,Ze,_i,et),C(ge,L,te,_i,et),et=String.fromCharCode(55349,57334+cr),C(M,L,Ze,_i,et),C(ge,L,te,_i,et);var _i,cr,Yb="\xD0\xDE\xFE";for(Vh=0;Vh<Yb.length;Vh++)Uc=Yb.charAt(Vh),C(M,L,Ze,Uc,Uc),C(ge,L,te,Uc,Uc);var Uc,Vh,Kb={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},V3={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Y3={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},RR={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},to={mathClass:"",textClass:"",font:""},K3={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},X3={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Z3={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Xb={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Zb={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Q3={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Qb={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},J3=[Kb,Kb,V3,V3,Y3,Y3,RR,to,to,to,K3,K3,X3,X3,Z3,Z3,Xb,Xb,Zb,Zb,Q3,Q3,to,to,Qb,Qb],PR=[Kb,to,Xb,Zb,Qb],DR=t=>{var e=t.charCodeAt(0),n=t.charCodeAt(1),s=(e-55296)*1024+(n-56320)+65536;if(119808<=s&&s<120484){var a=Math.floor((s-119808)/26);return J3[a]}else if(120782<=s&&s<=120831){var i=Math.floor((s-120782)/10);return PR[i]}else{if(s===120485||s===120486)return J3[0];if(120486<s&&s<120782)return to;throw new xe("Unsupported character: "+t)}},up=function(e,n,s){if(un[s][e]){var a=un[s][e].replace;a&&(e=a)}return{value:e,metrics:p1(e,n,s)}},Ss=function(e,n,s,a,i){var r=up(e,n,s),o=r.metrics;e=r.value;var l;if(o){var c=o.italic;(s==="text"||a&&a.font==="mathit")&&(c=0),l=new Cs(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+n+"' and mode '"+s+"'")),l=new Cs(e,0,0,0,0,0,i);if(a){l.maxFontSize=a.sizeMultiplier,a.style.isTight()&&l.classes.push("mtight");var d=a.getColor();d&&(l.style.color=d)}return l},f1=function(e,n,s,a){return a===void 0&&(a=[]),s.font==="boldsymbol"&&up(e,"Main-Bold",n).metrics?Ss(e,"Main-Bold",n,s,a.concat(["mathbf"])):e==="\\"||un[n][e].font==="main"?Ss(e,"Main-Regular",n,s,a):Ss(e,"AMS-Regular",n,s,a.concat(["amsrm"]))},LR=function(e,n,s){return s!=="textord"&&up(e,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},dp=function(e,n,s){var a=e.mode,i=e.text,r=["mord"],{font:o,fontFamily:l,fontWeight:c,fontShape:d}=n,h=a==="math"||a==="text"&&!!o,p=h?o:l,f="",m="";if(i.charCodeAt(0)===55349){var b=DR(i);f=b.font,m=b[a+"Class"]}if(f)return Ss(i,f,a,n,r.concat(m));if(p){var g,$;if(p==="boldsymbol"){var v=LR(i,a,s);g=v.fontName,$=[v.fontClass]}else h?(g=Jb[o].fontName,$=[o]):(g=Yh(l,c,d),$=[l,c,d]);if(up(i,g,a).metrics)return Ss(i,g,a,n,r.concat($));if(Mx.hasOwnProperty(i)&&g.slice(0,10)==="Typewriter"){for(var w=[],x=0;x<i.length;x++)w.push(Ss(i[x],g,a,n,r.concat($)));return Li(w)}}if(s==="mathord")return Ss(i,"Math-Italic",a,n,r.concat(["mathnormal"]));if(s==="textord"){var T=un[a][i]&&un[a][i].font;if(T==="ams"){var k=Yh("amsrm",c,d);return Ss(i,k,a,n,r.concat("amsrm",c,d))}else if(T==="main"||!T){var A=Yh("textrm",c,d);return Ss(i,A,a,n,r.concat(c,d))}else{var E=Yh(T,c,d);return Ss(i,E,a,n,r.concat(E,c,d))}}else throw new Error("unexpected type: "+s+" in makeOrd")},OR=(t,e)=>{if(hr(t.classes)!==hr(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||t.italic!==0&&t.hasClass("mathnormal"))return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var s of Object.keys(t.style))if(t.style[s]!==e.style[s])return!1;for(var a of Object.keys(e.style))if(t.style[a]!==e.style[a])return!1;return!0},_x=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],s=t[e+1];n instanceof Cs&&s instanceof Cs&&OR(n,s)&&(n.text+=s.text,n.height=Math.max(n.height,s.height),n.depth=Math.max(n.depth,s.depth),n.italic=s.italic,t.splice(e+1,1),e--)}return t},m1=function(e){for(var n=0,s=0,a=0,i=0;i<e.children.length;i++){var r=e.children[i];r.height>n&&(n=r.height),r.depth>s&&(s=r.depth),r.maxFontSize>a&&(a=r.maxFontSize)}e.height=n,e.depth=s,e.maxFontSize=a},ye=function(e,n,s,a){var i=new pr(e,n,s,a);return m1(i),i},fr=(t,e,n,s)=>new pr(t,e,n,s),ol=function(e,n,s){var a=ye([e],[],n);return a.height=Math.max(s||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),a.style.borderBottomWidth=Ce(a.height),a.maxFontSize=1,a},NR=function(e,n,s,a){var i=new rl(e,n,s,a);return m1(i),i},Li=function(e){var n=new dr(e);return m1(n),n},ll=function(e,n){return e instanceof dr?ye([],[e],n):e},BR=function(e){if(e.positionType==="individualShift"){for(var n=e.children,s=[n[0]],a=-n[0].shift-n[0].elem.depth,i=a,r=1;r<n.length;r++){var o=-n[r].shift-i-n[r].elem.depth,l=o-(n[r-1].elem.height+n[r-1].elem.depth);i=i+o,s.push({type:"kern",size:l}),s.push(n[r])}return{children:s,depth:a}}var c;if(e.positionType==="top"){for(var d=e.positionData,h=0;h<e.children.length;h++){var p=e.children[h];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var f=e.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-f.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},Lt=function(e,n){for(var{children:s,depth:a}=BR(e),i=0,r=0;r<s.length;r++){var o=s[r];if(o.type==="elem"){var l=o.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var c=ye(["pstrut"],[]);c.style.height=Ce(i);for(var d=[],h=a,p=a,f=a,m=0;m<s.length;m++){var b=s[m];if(b.type==="kern")f+=b.size;else{var g=b.elem,$=b.wrapperClasses||[],v=b.wrapperStyle||{},w=ye($,[c,g],void 0,v);w.style.top=Ce(-i-f-g.depth),b.marginLeft&&(w.style.marginLeft=b.marginLeft),b.marginRight&&(w.style.marginRight=b.marginRight),d.push(w),f+=g.height+g.depth}h=Math.min(h,f),p=Math.max(p,f)}var x=ye(["vlist"],d);x.style.height=Ce(p);var T;if(h<0){var k=ye([],[]),A=ye(["vlist"],[k]);A.style.height=Ce(-h);var E=ye(["vlist-s"],[new Cs("\u200B")]);T=[ye(["vlist-r"],[x,E]),ye(["vlist-r"],[A])]}else T=[ye(["vlist-r"],[x])];var S=ye(["vlist-t"],T);return T.length===2&&S.classes.push("vlist-t2"),S.height=p,S.depth=-h,S},Ix=(t,e)=>{var n=ye(["mspace"],[],e),s=gn(t,e);return n.style.marginRight=Ce(s),n},Yh=(t,e,n)=>{var s,a;switch(t){case"amsrm":s="AMS";break;case"textrm":s="Main";break;case"textsf":s="SansSerif";break;case"texttt":s="Typewriter";break;default:s=t}return e==="textbf"&&n==="textit"?a="BoldItalic":e==="textbf"?a="Bold":n==="textit"?a="Italic":a="Regular",s+"-"+a},Jb={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"}},Rx={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Px=function(e,n){var[s,a,i]=Rx[e],r=new ri(s),o=new Ga([r],{width:Ce(a),height:Ce(i),style:"width:"+Ce(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=fr(["overlay"],[o],n);return l.height=i,l.style.height=Ce(i),l.style.width=Ce(a),l},mn={number:3,unit:"mu"},eo={number:4,unit:"mu"},Ii={number:5,unit:"mu"},FR={mord:{mop:mn,mbin:eo,mrel:Ii,minner:mn},mop:{mord:mn,mop:mn,mrel:Ii,minner:mn},mbin:{mord:eo,mop:eo,mopen:eo,minner:eo},mrel:{mord:Ii,mop:Ii,mopen:Ii,minner:Ii},mopen:{},mclose:{mop:mn,mbin:eo,mrel:Ii,minner:mn},mpunct:{mord:mn,mop:mn,mrel:Ii,mopen:mn,mclose:mn,mpunct:mn,minner:mn},minner:{mord:mn,mop:mn,mbin:eo,mrel:Ii,mopen:mn,mpunct:mn,minner:mn}},zR={mord:{mop:mn},mop:{mord:mn,mop:mn},mbin:{},mrel:{},mopen:{},mclose:{mop:mn},mpunct:{},minner:{mop:mn}},Dx={},sp={},ap={};function De(t){for(var{type:e,names:n,props:s,handler:a,htmlBuilder:i,mathmlBuilder:r}=t,o={type:e,numArgs:s.numArgs,argTypes:s.argTypes,allowedInArgument:!!s.allowedInArgument,allowedInText:!!s.allowedInText,allowedInMath:s.allowedInMath===void 0?!0:s.allowedInMath,numOptionalArgs:s.numOptionalArgs||0,infix:!!s.infix,primitive:!!s.primitive,handler:a},l=0;l<n.length;++l)Dx[n[l]]=o;e&&(i&&(sp[e]=i),r&&(ap[e]=r))}function no(t){var{type:e,htmlBuilder:n,mathmlBuilder:s}=t;De({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:s})}var ip=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Pn=function(e){return e.type==="ordgroup"?e.body:[e]},UR=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),HR=new Set(["rightmost","mrel","mclose","mpunct"]),qR={display:rt.DISPLAY,text:rt.TEXT,script:rt.SCRIPT,scriptscript:rt.SCRIPTSCRIPT},WR={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qn=function(e,n,s,a){a===void 0&&(a=[null,null]);for(var i=[],r=0;r<e.length;r++){var o=Ot(e[r],n);if(o instanceof dr){var l=o.children;i.push(...l)}else i.push(o)}if(_x(i),!s)return i;var c=n;if(e.length===1){var d=e[0];d.type==="sizing"?c=n.havingSize(d.size):d.type==="styling"&&(c=n.havingStyle(qR[d.style]))}var h=ye([a[0]||"leftmost"],[],n),p=ye([a[1]||"rightmost"],[],n),f=s==="root";return e1(i,(m,b)=>{var g=b.classes[0],$=m.classes[0];g==="mbin"&&HR.has($)?b.classes[0]="mord":$==="mbin"&&UR.has(g)&&(m.classes[0]="mord")},{node:h},p,f),e1(i,(m,b)=>{var g,$,v=n1(b),w=n1(m),x=v&&w?m.hasClass("mtight")?(g=zR[v])==null?void 0:g[w]:($=FR[v])==null?void 0:$[w]:null;if(x)return Ix(x,c)},{node:h},p,f),i},e1=function(e,n,s,a,i){a&&e.push(a);for(var r=0;r<e.length;r++){var o=e[r],l=Lx(o);if(l){e1(l.children,n,s,null,i);continue}var c=!o.hasClass("mspace");if(c){var d=n(o,s.node);d&&(s.insertAfter?s.insertAfter(d):(e.unshift(d),r++))}c?s.node=o:i&&o.hasClass("newline")&&(s.node=ye(["leftmost"])),s.insertAfter=(h=>p=>{e.splice(h+1,0,p),r++})(r)}a&&e.pop()},Lx=function(e){return e instanceof dr||e instanceof rl||e instanceof pr&&e.hasClass("enclosing")?e:null},t1=function(e,n){var s=Lx(e);if(s){var a=s.children;if(a.length){if(n==="right")return t1(a[a.length-1],"right");if(n==="left")return t1(a[0],"left")}}return e},n1=function(e,n){if(!e)return null;n&&(e=t1(e,n));var s=e.classes[0];return WR[s]||null},Vc=function(e,n){var s=["nulldelimiter"].concat(e.baseSizingClasses());return ye(n.concat(s))},Ot=function(e,n,s){if(!e)return ye();if(sp[e.type]){var a=sp[e.type](e,n);if(s&&n.size!==s.size){a=ye(n.sizingClasses(s),[a],n);var i=n.sizeMultiplier/s.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new xe("Got group of unknown type: '"+e.type+"'")};function Kh(t,e){var n=ye(["base"],t,e),s=ye(["strut"]);return s.style.height=Ce(n.height+n.depth),n.depth&&(s.style.verticalAlign=Ce(-n.depth)),n.children.unshift(s),n}function s1(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var s=qn(t,e,"root"),a;s.length===2&&s[1].hasClass("tag")&&(a=s.pop());for(var i=[],r=[],o=0;o<s.length;o++)if(r.push(s[o]),s[o].hasClass("mbin")||s[o].hasClass("mrel")||s[o].hasClass("allowbreak")){for(var l=!1;o<s.length-1&&s[o+1].hasClass("mspace")&&!s[o+1].hasClass("newline");)o++,r.push(s[o]),s[o].hasClass("nobreak")&&(l=!0);l||(i.push(Kh(r,e)),r=[])}else s[o].hasClass("newline")&&(r.pop(),r.length>0&&(i.push(Kh(r,e)),r=[]),i.push(s[o]));r.length>0&&i.push(Kh(r,e));var c;n?(c=Kh(qn(n,e,!0),e),c.classes=["tag"],i.push(c)):a&&i.push(a);var d=ye(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),c){var h=c.children[0];h.style.height=Ce(d.height+d.depth),d.depth&&(h.style.verticalAlign=Ce(-d.depth))}return d}function Ox(t){return new dr(t)}var ve=class{constructor(e,n,s){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=s||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=hr(this.classes));for(var s=0;s<this.children.length;s++)if(this.children[s]instanceof Sn&&this.children[s+1]instanceof Sn){for(var a=this.children[s].toText()+this.children[++s].toText();this.children[s+1]instanceof Sn;)a+=this.children[++s].toText();e.appendChild(new Sn(a).toNode())}else e.appendChild(this.children[s].toNode());return e}toMarkup(){var e="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="',e+=ms(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+ms(hr(this.classes))+'"'),e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Sn=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ms(this.toText())}toText(){return this.text}},rp=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":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",Ce(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ce(this.width)+'"/>'}toText(){return this.character?this.character:" "}},GR=new Set(["\\imath","\\jmath"]),jR=new Set(["mrow","mtable"]),Sa=function(e,n,s){return un[n][e]&&un[n][e].replace&&e.charCodeAt(0)!==55349&&!(Mx.hasOwnProperty(e)&&s&&(s.fontFamily&&s.fontFamily.slice(4,6)==="tt"||s.font&&s.font.slice(4,6)==="tt"))&&(e=un[n][e].replace),new Sn(e)},g1=function(e){return e.length===1?e[0]:new ve("mrow",e)},VR={mathit:"italic",boldsymbol:t=>t.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},b1=(t,e)=>{if(t.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var n=e.font;if(!n||n==="mathnormal")return null;var s=t.mode,a=VR[n];if(a)return typeof a=="function"?a(t):a;var i=t.text;if(GR.has(i))return null;if(un[s][i]){var r=un[s][i].replace;r&&(i=r)}var o=Jb[n].fontName;return p1(i,o,s)?Jb[n].variant:null};function Pb(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof Sn&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof Sn&&n.text===","}else return!1}var oa=function(e,n,s){if(e.length===1){var a=Kt(e[0],n);return s&&a instanceof ve&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],r,o=0;o<e.length;o++){var l=Kt(e[o],n);if(l instanceof ve&&r instanceof ve){if(l.type==="mtext"&&r.type==="mtext"&&l.getAttribute("mathvariant")===r.getAttribute("mathvariant")){r.children.push(...l.children);continue}else if(l.type==="mn"&&r.type==="mn"){r.children.push(...l.children);continue}else if(Pb(l)&&r.type==="mn"){r.children.push(...l.children);continue}else if(l.type==="mn"&&Pb(r))l.children=[...r.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(r.type==="mn"||Pb(r))){var c=l.children[0];c instanceof ve&&c.type==="mn"&&(c.children=[...r.children,...c.children],i.pop())}else if(r.type==="mi"&&r.children.length===1){var d=r.children[0];if(d instanceof Sn&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof Sn&&h.text.length>0&&(h.text=h.text.slice(0,1)+"\u0338"+h.text.slice(1),i.pop())}}}i.push(l),r=l}return i},mr=function(e,n,s){return g1(oa(e,n,s))},Kt=function(e,n){if(!e)return new ve("mrow");if(ap[e.type])return ap[e.type](e,n);throw new xe("Got group of unknown type: '"+e.type+"'")};function ex(t,e,n,s,a){var i=oa(t,n),r;i.length===1&&i[0]instanceof ve&&jR.has(i[0].type)?r=i[0]:r=new ve("mrow",i);var o=new ve("annotation",[new Sn(e)]);o.setAttribute("encoding","application/x-tex");var l=new ve("semantics",[r,o]),c=new ve("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),s&&c.setAttribute("display","block");var d=a?"katex":"katex-mathml";return ye([d],[c])}var YR=[[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]],tx=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],nx=function(e,n){return n.size<2?e:YR[e-1][n.size-1]},op=class t{constructor(e){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=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=tx[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){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};return Object.assign(n,e),new t(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:nx(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:tx[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=nx(t.BASESIZE,e);return this.size===n&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,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!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=IR(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};op.BASESIZE=6;var Nx=function(e){return new op({style:e.displayMode?rt.DISPLAY:rt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Bx=function(e,n){if(n.displayMode){var s=["katex-display"];n.leqno&&s.push("leqno"),n.fleqn&&s.push("fleqn"),e=ye(s,[e])}return e},KR=function(e,n,s){var a=Nx(s),i;if(s.output==="mathml")return ex(e,n,a,s.displayMode,!0);if(s.output==="html"){var r=s1(e,a);i=ye(["katex"],[r])}else{var o=ex(e,n,a,s.displayMode,!1),l=s1(e,a);i=ye(["katex"],[o,l])}return Bx(i,s)},XR=function(e,n,s){var a=Nx(s),i=s1(e,a),r=ye(["katex"],[i]);return Bx(r,s)},ZR={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},hp=function(e){var n=new ve("mo",[new Sn(ZR[e.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},QR={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],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],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]},JR=new Set(["widehat","widecheck","widetilde","utilde"]),pp=function(e,n){function s(){var o=4e5,l=e.label.slice(1);if(JR.has(l)&&"base"in e){var c=e.base.type==="ordgroup"?e.base.body.length:1,d,h,p;if(c>5)l==="widehat"||l==="widecheck"?(d=420,o=2364,p=.42,h=l+"4"):(d=312,o=2340,p=.34,h="tilde4");else{var f=[1,1,2,2,3,3][c];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][f],d=[0,239,300,360,420][f],p=[0,.24,.3,.3,.36,.42][f],h=l+f):(o=[0,600,1033,2339,2340][f],d=[0,260,286,306,312][f],p=[0,.26,.286,.3,.306,.34][f],h="tilde"+f)}var m=new ri(h),b=new Ga([m],{width:"100%",height:Ce(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:fr([],[b],n),minWidth:0,height:p}}else{var g=[],$=QR[l];if(!$)throw new Error('No SVG data for "'+l+'".');var[v,w,x]=$,T=x/1e3,k=v.length,A,E;if(k===1){if($.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');A=["hide-tail"],E=[$[3]]}else if(k===2)A=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(k===3)A=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
1032
- `+k+" children.");for(var S=0;S<k;S++){var _=new ri(v[S]),I=new Ga([_],{width:"400em",height:Ce(T),viewBox:"0 0 "+o+" "+x,preserveAspectRatio:E[S]+" slice"}),R=fr([A[S]],[I],n);if(k===1)return{span:R,minWidth:w,height:T};R.style.height=Ce(T),g.push(R)}return{span:ye(["stretchy"],g,n),minWidth:w,height:T}}}var{span:a,minWidth:i,height:r}=s();return a.height=r,a.style.height=Ce(r),i>0&&(a.style.minWidth=Ce(i)),a},eP=function(e,n,s,a,i){var r,o=e.height+e.depth+s+a;if(/fbox|color|angl/.test(n)){if(r=ye(["stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();l&&(r.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new jc({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new jc({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ga(c,{width:"100%",height:Ce(o)});r=fr([],[d],i)}return r.height=o,r.style.height=Ce(o),r},tP={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nP={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function sP(t){return t in tP}function ft(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function fp(t){var e=mp(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function mp(t){return t&&(t.type==="atom"||nP.hasOwnProperty(t.type))?t:null}var Fx=t=>{if(t instanceof Cs)return t;if(MR(t)&&t.children.length===1)return Fx(t.children[0])},$1=(t,e)=>{var n,s,a;t&&t.type==="supsub"?(s=ft(t.base,"accent"),n=s.base,t.base=n,a=ER(Ot(t,e)),t.base=s):(s=ft(t,"accent"),n=s.base);var i=Ot(n,e.havingCrampedStyle()),r=s.isShifty&&Pi(n),o=0;if(r){var l,c;o=(l=(c=Fx(i))==null?void 0:c.skew)!=null?l:0}var d=s.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(s.isStretchy)p=pp(s,e),p=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Ce(2*o)+")",marginLeft:Ce(2*o)}:void 0}]});else{var f,m;s.label==="\\vec"?(f=Px("vec",e),m=Rx.vec[1]):(f=dp({type:"textord",mode:s.mode,text:s.label},e,"textord"),f=TR(f),f.italic=0,m=f.width,d&&(h+=f.depth)),p=ye(["accent-body"],[f]);var b=s.label==="\\textcircled";b&&(p.classes.push("accent-full"),h=i.height);var g=o;b||(g-=m/2),p.style.left=Ce(g),s.label==="\\textcircled"&&(p.style.top=".2em"),p=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:p}]})}var $=ye(["mord","accent"],[p],e);return a?(a.children[0]=$,a.height=Math.max($.height,a.height),a.classes[0]="mord",a):$},zx=(t,e)=>{var n=t.isStretchy?hp(t.label):new ve("mo",[Sa(t.label,t.mode)]),s=new ve("mover",[Kt(t.base,e),n]);return s.setAttribute("accent","true"),s},aP=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));De({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:(t,e)=>{var n=ip(e[0]),s=!aP.test(t.funcName),a=!s||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:s,isShifty:a,base:n}},htmlBuilder:$1,mathmlBuilder:zx});De({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],s=t.parser.mode;return s==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),s="text"),{type:"accent",mode:s,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:$1,mathmlBuilder:zx});De({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"accentUnder",mode:n.mode,label:s,base:a}},htmlBuilder:(t,e)=>{var n=Ot(t.base,e),s=pp(t,e),a=t.label==="\\utilde"?.12:0,i=Lt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]});return ye(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var n=hp(t.label),s=new ve("munder",[Kt(t.base,e),n]);return s.setAttribute("accentunder","true"),s}});var Xh=t=>{var e=new ve("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};De({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(t,e,n){var{parser:s,funcName:a}=t;return{type:"xArrow",mode:s.mode,label:a,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,s=e.havingStyle(n.sup()),a=ll(Ot(t.body,s,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var r;t.below&&(s=e.havingStyle(n.sub()),r=ll(Ot(t.below,s,e),e),r.classes.push(i+"-arrow-pad"));var o=pp(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(c-=a.depth);var d;if(r){var h=-e.fontMetrics().axisHeight+r.height+.5*o.height+.111;d=Lt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:r,shift:h}]})}else d=Lt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return ye(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var n=hp(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var s;if(t.body){var a=Xh(Kt(t.body,e));if(t.below){var i=Xh(Kt(t.below,e));s=new ve("munderover",[n,i,a])}else s=new ve("mover",[n,a])}else if(t.below){var r=Xh(Kt(t.below,e));s=new ve("munder",[n,r])}else s=Xh(),s=new ve("mover",[n,s]);return s}});function Ux(t,e){var n=qn(t.body,e,!0);return ye([t.mclass],n,e)}function Hx(t,e){var n,s=oa(t.body,e);return t.mclass==="minner"?n=new ve("mpadded",s):t.mclass==="mord"?t.isCharacterBox?(n=s[0],n.type="mi"):n=new ve("mi",s):(t.isCharacterBox?(n=s[0],n.type="mo"):n=new ve("mo",s),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}De({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+s.slice(5),body:Pn(a),isCharacterBox:Pi(a)}},htmlBuilder:Ux,mathmlBuilder:Hx});var gp=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};De({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:gp(e[0]),body:Pn(e[1]),isCharacterBox:Pi(e[1])}}});De({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:s}=t,a=e[1],i=e[0],r;s!=="\\stackrel"?r=gp(a):r="mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:s!=="\\stackrel",body:Pn(a)},l={type:"supsub",mode:i.mode,base:o,sup:s==="\\underset"?null:i,sub:s==="\\underset"?i:null};return{type:"mclass",mode:n.mode,mclass:r,body:[l],isCharacterBox:Pi(l)}},htmlBuilder:Ux,mathmlBuilder:Hx});De({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:gp(e[0]),body:Pn(e[0])}},htmlBuilder(t,e){var n=qn(t.body,e,!0),s=ye([t.mclass],n,e);return s.style.textShadow="0.02em 0.01em 0.04px",s},mathmlBuilder(t,e){var n=oa(t.body,e),s=new ve("mstyle",n);return s.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),s}});var iP={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},sx=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),ax=t=>t.type==="textord"&&t.text==="@",rP=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function oP(t,e,n){var s=iP[t];switch(s){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(s,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=n.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:s,mode:"math",family:"rel"},r=n.callFunction("\\Big",[i],[]),o=n.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[a,r,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function lP(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new xe("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var s=[],a=[s],i=0;i<e.length;i++){for(var r=e[i],o=sx(),l=0;l<r.length;l++)if(!ax(r[l]))o.body.push(r[l]);else{s.push(o),l+=1;var c=fp(r[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(c))if("<>AV".includes(c))for(var h=0;h<2;h++){for(var p=!0,f=l+1;f<r.length;f++){if(rP(r[f],c)){p=!1,l=f;break}if(ax(r[f]))throw new xe("Missing a "+c+" character to complete a CD arrow.",r[f]);d[h].body.push(r[f])}if(p)throw new xe("Missing a "+c+" character to complete a CD arrow.",r[l])}else throw new xe('Expected one of "<>AV=|." after @',r[l]);var m=oP(c,d,t),b={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};s.push(b),o=sx()}i%2===0?s.push(o):s.shift(),s=[],a.push(s)}t.gullet.endGroup(),t.gullet.endGroup();var g=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:g,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}De({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t;return{type:"cdlabel",mode:n.mode,side:s.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),s=ll(Ot(t.label,n,e),e);return s.classes.push("cd-label-"+t.side),s.style.bottom=Ce(.8-s.depth),s.height=0,s.depth=0,s},mathmlBuilder(t,e){var n=new ve("mrow",[Kt(t.label,e)]);return n=new ve("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ve("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});De({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=ll(Ot(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new ve("mrow",[Kt(t.fragment,e)])}});De({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,s=ft(e[0],"ordgroup"),a=s.body,i="",r=0;r<a.length;r++){var o=ft(a[r],"textord");i+=o.text}var l=parseInt(i),c;if(isNaN(l))throw new xe("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new xe("\\@char with invalid code point "+i);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var qx=(t,e)=>{var n=qn(t.body,e.withColor(t.color),!1);return Li(n)},Wx=(t,e)=>{var n=oa(t.body,e.withColor(t.color)),s=new ve("mstyle",n);return s.setAttribute("mathcolor",t.color),s};De({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,s=ft(e[0],"color-token").color,a=e[1];return{type:"color",mode:n.mode,color:s,body:Pn(a)}},htmlBuilder:qx,mathmlBuilder:Wx});De({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:s}=t,a=ft(e[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var i=n.parseExpression(!0,s);return{type:"color",mode:n.mode,color:a,body:i}},htmlBuilder:qx,mathmlBuilder:Wx});De({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:s}=t,a=s.gullet.future().text==="["?s.parseSizeGroup(!0):null,i=!s.settings.displayMode||!s.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:s.mode,newLine:i,size:a&&ft(a,"size").value}},htmlBuilder(t,e){var n=ye(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=Ce(gn(t.size,e)))),n},mathmlBuilder(t,e){var n=new ve("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",Ce(gn(t.size,e)))),n}});var a1={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gx=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new xe("Expected a control sequence",t);return e},cP=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},jx=(t,e,n,s)=>{var a=t.gullet.macros.get(n.text);a==null&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,a,s)};De({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var s=e.fetch();if(a1[s.text])return(n==="\\global"||n==="\\\\globallong")&&(s.text=a1[s.text]),ft(e.parseFunction(),"internal");throw new xe("Invalid token after macro prefix",s)}});De({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=e.gullet.popToken(),a=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new xe("Expected a control sequence",s);for(var i=0,r,o=[[]];e.gullet.future().text!=="{";)if(s=e.gullet.popToken(),s.text==="#"){if(e.gullet.future().text==="{"){r=e.gullet.future(),o[i].push("{");break}if(s=e.gullet.popToken(),!/^[1-9]$/.test(s.text))throw new xe('Invalid argument number "'+s.text+'"');if(parseInt(s.text)!==i+1)throw new xe('Argument number "'+s.text+'" out of order');i++,o.push([])}else{if(s.text==="EOF")throw new xe("Expected a macro definition");o[i].push(s.text)}var{tokens:l}=e.gullet.consumeArg();return r&&l.unshift(r),(n==="\\edef"||n==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:o},n===a1[n]),{type:"internal",mode:e.mode}}});De({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=Gx(e.gullet.popToken());e.gullet.consumeSpaces();var a=cP(e);return jx(e,s,a,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});De({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=Gx(e.gullet.popToken()),a=e.gullet.popToken(),i=e.gullet.popToken();return jx(e,s,i,n==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});var Hc=function(e,n,s){var a=un.math[e]&&un.math[e].replace,i=p1(a||e,n,s);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return i},y1=function(e,n,s,a){var i=s.havingBaseStyle(n),r=ye(a.concat(i.sizingClasses(s)),[e],s),o=i.sizeMultiplier/s.sizeMultiplier;return r.height*=o,r.depth*=o,r.maxFontSize=i.sizeMultiplier,r},Vx=function(e,n,s){var a=n.havingBaseStyle(s),i=(1-n.sizeMultiplier/a.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Ce(i),e.height-=i,e.depth+=i},uP=function(e,n,s,a,i,r){var o=Ss(e,"Main-Regular",i,a),l=y1(o,n,a,r);return s&&Vx(l,a,n),l},dP=function(e,n,s,a){return Ss(e,"Size"+n+"-Regular",s,a)},Yx=function(e,n,s,a,i,r){var o=dP(e,n,i,a),l=y1(ye(["delimsizing","size"+n],[o],a),rt.TEXT,a,r);return s&&Vx(l,a,rt.TEXT),l},Db=function(e,n,s){var a;n==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=ye(["delimsizinginner",a],[ye([],[Ss(e,n,s)])]);return{type:"elem",elem:i}},Lb=function(e,n,s){var a=ii["Size4-Regular"][e.charCodeAt(0)]?ii["Size4-Regular"][e.charCodeAt(0)][4]:ii["Size1-Regular"][e.charCodeAt(0)][4],i=new ri("inner",wR(e,Math.round(1e3*n))),r=new Ga([i],{width:Ce(a),height:Ce(n),style:"width:"+Ce(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=fr([],[r],s);return o.height=n,o.style.height=Ce(n),o.style.width=Ce(a),{type:"elem",elem:o}},i1=.008,Zh={type:"kern",size:-1*i1},hP=new Set(["|","\\lvert","\\rvert","\\vert"]),pP=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Kx=function(e,n,s,a,i,r){var o,l,c,d,h="",p=0;o=c=d=e,l=null;var f="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?o=c="\u23D0":e==="\\Downarrow"?o=c="\u2016":e==="\\updownarrow"?(o="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="\u2016",d="\\Downarrow"):hP.has(e)?(c="\u2223",h="vert",p=333):pP.has(e)?(c="\u2225",h="doublevert",p=556):e==="["||e==="\\lbrack"?(o="\u23A1",c="\u23A2",d="\u23A3",f="Size4-Regular",h="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="\u23A4",c="\u23A5",d="\u23A6",f="Size4-Regular",h="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(c=o="\u23A2",d="\u23A3",f="Size4-Regular",h="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",c=d="\u23A2",f="Size4-Regular",h="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(c=o="\u23A5",d="\u23A6",f="Size4-Regular",h="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",c=d="\u23A5",f="Size4-Regular",h="rceil",p=667):e==="("||e==="\\lparen"?(o="\u239B",c="\u239C",d="\u239D",f="Size4-Regular",h="lparen",p=875):e===")"||e==="\\rparen"?(o="\u239E",c="\u239F",d="\u23A0",f="Size4-Regular",h="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",d="\u23AD",c="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",d="\u23A9",c="\u23AA",f="Size4-Regular");var m=Hc(o,f,i),b=m.height+m.depth,g=Hc(c,f,i),$=g.height+g.depth,v=Hc(d,f,i),w=v.height+v.depth,x=0,T=1;if(l!==null){var k=Hc(l,f,i);x=k.height+k.depth,T=2}var A=b+w+x,E=Math.max(0,Math.ceil((n-A)/(T*$))),S=A+E*T*$,_=a.fontMetrics().axisHeight;s&&(_*=a.sizeMultiplier);var I=S/2-_,R=[];if(h.length>0){var P=S-b-w,O=Math.round(S*1e3),Z=kR(h,Math.round(P*1e3)),z=new ri(h,Z),V=Ce(p/1e3),q=Ce(O/1e3),B=new Ga([z],{width:V,height:q,viewBox:"0 0 "+p+" "+O}),J=fr([],[B],a);J.height=O/1e3,J.style.width=V,J.style.height=q,R.push({type:"elem",elem:J})}else{if(R.push(Db(d,f,i)),R.push(Zh),l===null){var j=S-b-w+2*i1;R.push(Lb(c,j,a))}else{var se=(S-b-w-x)/2+2*i1;R.push(Lb(c,se,a)),R.push(Zh),R.push(Db(l,f,i)),R.push(Zh),R.push(Lb(c,se,a))}R.push(Zh),R.push(Db(o,f,i))}var X=a.havingBaseStyle(rt.TEXT),H=Lt({positionType:"bottom",positionData:I,children:R});return y1(ye(["delimsizing","mult"],[H],X),rt.TEXT,a,r)},Ob=80,Nb=.08,Bb=function(e,n,s,a,i){var r=vR(e,a,s),o=new ri(e,r),l=new Ga([o],{width:"400em",height:Ce(n),viewBox:"0 0 400000 "+s,preserveAspectRatio:"xMinYMin slice"});return fr(["hide-tail"],[l],i)},fP=function(e,n){var s=n.havingBaseSizing(),a=eS("\\surd",e*s.sizeMultiplier,Jx,s),i=s.sizeMultiplier,r=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l,c,d,h;return a.type==="small"?(d=1e3+1e3*r+Ob,e<1?i=1:e<1.4&&(i=.7),l=(1+r+Nb)/i,c=(1+r)/i,o=Bb("sqrtMain",l,d,r,n),o.style.minWidth="0.853em",h=.833/i):a.type==="large"?(d=(1e3+Ob)*qc[a.size],c=(qc[a.size]+r)/i,l=(qc[a.size]+r+Nb)/i,o=Bb("sqrtSize"+a.size,l,d,r,n),o.style.minWidth="1.02em",h=1/i):(l=e+r+Nb,c=e+r,d=Math.floor(1e3*e+r)+Ob,o=Bb("sqrtTall",l,d,r,n),o.style.minWidth="0.742em",h=1.056),o.height=c,o.style.height=Ce(l),{span:o,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+r)*i}},Xx=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),mP=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),Zx=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),qc=[0,1.2,1.8,2.4,3],Qx=function(e,n,s,a,i){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Xx.has(e)||Zx.has(e))return Yx(e,n,!1,s,a,i);if(mP.has(e))return Kx(e,qc[n],!1,s,a,i);throw new xe("Illegal delimiter: '"+e+"'")},gP=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],bP=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"stack"}],Jx=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],$P=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";var n=e.type;throw new Error("Add support for delim type '"+n+"' here.")},eS=function(e,n,s,a){for(var i=Math.min(2,3-a.style.size),r=i;r<s.length;r++){var o=s[r];if(o.type==="stack")break;var l=Hc(e,$P(o),"math"),c=l.height+l.depth;if(o.type==="small"){var d=a.havingBaseStyle(o.style);c*=d.sizeMultiplier}if(c>n)return o}return s[s.length-1]},r1=function(e,n,s,a,i,r){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;Zx.has(e)?o=gP:Xx.has(e)?o=Jx:o=bP;var l=eS(e,n,o,a);return l.type==="small"?uP(e,l.style,s,a,i,r):l.type==="large"?Yx(e,l.size,s,a,i,r):Kx(e,n,s,a,i,r)},Fb=function(e,n,s,a,i,r){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=901,c=5/a.fontMetrics().ptPerEm,d=Math.max(n-o,s+o),h=Math.max(d/500*l,2*d-c);return r1(e,h,!0,a,i,r)},ix={"\\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}},yP=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function rx(t){return"isMiddle"in t}function bp(t,e){var n=mp(t);if(n&&yP.has(n.text))return n;throw n?new xe("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new xe("Invalid delimiter type '"+t.type+"'",t)}De({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:(t,e)=>{var n=bp(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:ix[t.funcName].size,mclass:ix[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?ye([t.mclass]):Qx(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Sa(t.delim,t.mode));var n=new ve("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var s=Ce(qc[t.size]);return n.setAttribute("minsize",s),n.setAttribute("maxsize",s),n}});function ox(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}De({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new xe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:bp(e[0],t).text,color:n}}});De({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=bp(e[0],t),s=t.parser;++s.leftrightDepth;var a=s.parseExpression(!1);--s.leftrightDepth,s.expect("\\right",!1);var i=ft(s.parseFunction(),"leftright-right");return{type:"leftright",mode:s.mode,body:a,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{ox(t);for(var n=qn(t.body,e,!0,["mopen","mclose"]),s=0,a=0,i=!1,r=0;r<n.length;r++){var o=n[r];rx(o)?i=!0:(s=Math.max(n[r].height,s),a=Math.max(n[r].depth,a))}s*=e.sizeMultiplier,a*=e.sizeMultiplier;var l;if(t.left==="."?l=Vc(e,["mopen"]):l=Fb(t.left,s,a,e,t.mode,["mopen"]),n.unshift(l),i)for(var c=1;c<n.length;c++){var d=n[c];if(rx(d)){var h=d.isMiddle;n[c]=Fb(h.delim,s,a,h.options,t.mode,[])}}var p;if(t.right===".")p=Vc(e,["mclose"]);else{var f=t.rightColor?e.withColor(t.rightColor):e;p=Fb(t.right,s,a,f,t.mode,["mclose"])}return n.push(p),ye(["minner"],n,e)},mathmlBuilder:(t,e)=>{ox(t);var n=oa(t.body,e);if(t.left!=="."){var s=new ve("mo",[Sa(t.left,t.mode)]);s.setAttribute("fence","true"),n.unshift(s)}if(t.right!=="."){var a=new ve("mo",[Sa(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),n.push(a)}return g1(n)}});De({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=bp(e[0],t);if(!t.parser.leftrightDepth)throw new xe("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;return t.delim==="."?n=Vc(e,[]):(n=Qx(t.delim,1,e,t.mode,[]),n.isMiddle={delim:t.delim,options:e}),n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?Sa("|","text"):Sa(t.delim,t.mode),s=new ve("mo",[n]);return s.setAttribute("fence","true"),s.setAttribute("lspace","0.05em"),s.setAttribute("rspace","0.05em"),s}});var $p=(t,e)=>{var n=ll(Ot(t.body,e),e),s=t.label.slice(1),a=e.sizeMultiplier,i,r,o=Pi(t.body);if(s==="sout")i=ye(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/a,r=-.5*e.fontMetrics().xHeight;else if(s==="phase"){var l=gn({number:.6,unit:"pt"},e),c=gn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();a=a/d.sizeMultiplier;var h=n.height+n.depth+l+c;n.style.paddingLeft=Ce(h/2+l);var p=Math.floor(1e3*h*a),f=$R(p),m=new Ga([new ri("phase",f)],{width:"400em",height:Ce(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=fr(["hide-tail"],[m],e),i.style.height=Ce(h),r=n.depth+l+c}else{/cancel/.test(s)?o||n.classes.push("cancel-pad"):s==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var b,g,$=0;/box/.test(s)?($=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),b=e.fontMetrics().fboxsep+(s==="colorbox"?0:$),g=b):s==="angl"?($=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),b=4*$,g=Math.max(0,.25-n.depth)):(b=o?.2:0,g=b),i=eP(n,s,b,g,e),/fbox|boxed|fcolorbox/.test(s)?(i.style.borderStyle="solid",i.style.borderWidth=Ce($)):s==="angl"&&$!==.049&&(i.style.borderTopWidth=Ce($),i.style.borderRightWidth=Ce($)),r=n.depth+g,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var v;if(t.backgroundColor)v=Lt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:r},{type:"elem",elem:n,shift:0}]});else{var w=/cancel|phase/.test(s)?["svg-align"]:[];v=Lt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:r,wrapperClasses:w}]})}return/cancel/.test(s)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(s)&&!o?ye(["mord","cancel-lap"],[v],e):ye(["mord"],[v],e)},yp=(t,e)=>{var n,s=new ve(t.label.includes("colorbox")?"mpadded":"menclose",[Kt(t.body,e)]);switch(t.label){case"\\cancel":s.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":s.setAttribute("notation","downdiagonalstrike");break;case"\\phase":s.setAttribute("notation","phasorangle");break;case"\\sout":s.setAttribute("notation","horizontalstrike");break;case"\\fbox":s.setAttribute("notation","box");break;case"\\angl":s.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,s.setAttribute("width","+"+2*n+"pt"),s.setAttribute("height","+"+2*n+"pt"),s.setAttribute("lspace",n+"pt"),s.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);s.setAttribute("style","border: "+Ce(a)+" solid "+t.borderColor)}break;case"\\xcancel":s.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&s.setAttribute("mathbackground",t.backgroundColor),s};De({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,n){var{parser:s,funcName:a}=t,i=ft(e[0],"color-token").color,r=e[1];return{type:"enclose",mode:s.mode,label:a,backgroundColor:i,body:r}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,n){var{parser:s,funcName:a}=t,i=ft(e[0],"color-token").color,r=ft(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:s.mode,label:a,backgroundColor:r,borderColor:i,body:o}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});De({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"enclose",mode:n.mode,label:s,body:a}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=e[0];return{type:"enclose",mode:n.mode,label:s,body:a}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var tS={};function oi(t){for(var{type:e,names:n,props:s,handler:a,htmlBuilder:i,mathmlBuilder:r}=t,o={type:e,numArgs:s.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<n.length;++l)tS[n[l]]=o;i&&(sp[e]=i),r&&(ap[e]=r)}var nS={};function N(t,e){nS[t]=e}var Fs=class t{constructor(e,n,s){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=s}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new t(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}},ia=class t{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new t(n,Fs.range(this,e))}};function lx(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var vp=t=>{var e=t.parser.settings;if(!e.displayMode)throw new xe("{"+t.envName+"} can be used only in display mode.")},vP=new Set(["gather","gather*"]);function v1(t){if(!t.includes("ed"))return!t.includes("*")}function gr(t,e,n){var{hskipBeforeAndAfter:s,addJot:a,cols:i,arraystretch:r,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:h,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!r){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)r=1;else if(r=parseFloat(f),!r||r<0)throw new xe("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var m=[],b=[m],g=[],$=[],v=l!=null?[]:void 0;function w(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){v&&(t.gullet.macros.get("\\df@tag")?(v.push(t.subparse([new ia("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),$.push(lx(t));;){var T=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup();var k={type:"ordgroup",mode:t.mode,body:T};n&&(k={type:"styling",mode:t.mode,style:n,resetFont:!0,body:[k]}),m.push(k);var A=t.fetch().text;if(A==="&"){if(h&&m.length===h){if(c||o)throw new xe("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(A==="\\end"){x(),m.length===1&&k.type==="styling"&&k.body.length===1&&k.body[0].type==="ordgroup"&&k.body[0].body.length===0&&(b.length>1||!d)&&b.pop(),$.length<b.length+1&&$.push([]);break}else if(A==="\\\\"){t.consume();var E=void 0;t.gullet.future().text!==" "&&(E=t.parseSizeGroup(!0)),g.push(E?E.value:null),x(),$.push(lx(t)),m=[],b.push(m),w()}else throw new xe("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:r,body:b,cols:i,rowGaps:g,hskipBeforeAndAfter:s,hLinesBeforeRow:$,colSeparationType:o,tags:v,leqno:p}}function w1(t){return t.slice(0,1)==="d"?"display":"text"}var li=function(e,n){var s,a,i=e.body.length,r=e.hLinesBeforeRow,o=0,l=new Array(i),c=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,p=5*h;if(e.colSeparationType&&e.colSeparationType==="small"){var f=n.havingStyle(rt.SCRIPT).sizeMultiplier;p=.2778*(f/n.sizeMultiplier)}var m=e.colSeparationType==="CD"?gn({number:3,unit:"ex"},n):12*h,b=3*h,g=e.arraystretch*m,$=.7*g,v=.3*g,w=0;function x(Te){for(var Qe=0;Qe<Te.length;++Qe)Qe>0&&(w+=.25),c.push({pos:w,isDashed:Te[Qe]})}for(x(r[0]),s=0;s<e.body.length;++s){var T=e.body[s],k=$,A=v;o<T.length&&(o=T.length);var E={cells:new Array(T.length),height:0,depth:0,pos:0};for(a=0;a<T.length;++a){var S=Ot(T[a],n);A<S.depth&&(A=S.depth),k<S.height&&(k=S.height),E.cells[a]=S}var _=e.rowGaps[s],I=0;_&&(I=gn(_,n),I>0&&(I+=v,A<I&&(A=I),I=0)),e.addJot&&s<e.body.length-1&&(A+=b),E.height=k,E.depth=A,w+=k,E.pos=w,w+=A+I,l[s]=E,x(r[s+1])}var R=w/2+n.fontMetrics().axisHeight,P=e.cols||[],O=[],Z,z,V=[];if(e.tags&&e.tags.some(Te=>Te))for(s=0;s<i;++s){var q=l[s],B=q.pos-R,J=e.tags[s],j=void 0;J===!0?j=ye(["eqn-num"],[],n):J===!1?j=ye([],[],n):j=ye([],qn(J,n,!0),n),j.depth=q.depth,j.height=q.height,V.push({type:"elem",elem:j,shift:B})}for(a=0,z=0;a<o||z<P.length;++a,++z){for(var se,X=P[z],H=!0;((oe=X)==null?void 0:oe.type)==="separator";){var oe;if(H||(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(n.fontMetrics().doubleRuleSep),O.push(Z)),X.separator==="|"||X.separator===":"){var ce=X.separator==="|"?"solid":"dashed",le=ye(["vertical-separator"],[],n);le.style.height=Ce(w),le.style.borderRightWidth=Ce(d),le.style.borderRightStyle=ce,le.style.margin="0 "+Ce(-d/2);var ae=w-R;ae&&(le.style.verticalAlign=Ce(-ae)),O.push(le)}else throw new xe("Invalid separator type: "+X.separator);z++,X=P[z],H=!1}if(!(a>=o)){var de=void 0;if(a>0||e.hskipBeforeAndAfter){var he,qe;de=(he=(qe=X)==null?void 0:qe.pregap)!=null?he:p,de!==0&&(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(de),O.push(Z))}var St=[];for(s=0;s<i;++s){var bt=l[s],Ue=bt.cells[a];if(Ue){var sn=bt.pos-R;Ue.depth=bt.depth,Ue.height=bt.height,St.push({type:"elem",elem:Ue,shift:sn})}}var We=Lt({positionType:"individualShift",children:St}),Nt=ye(["col-align-"+(((se=X)==null?void 0:se.align)||"c")],[We]);if(O.push(Nt),a<o-1||e.hskipBeforeAndAfter){var Bt,Ft;de=(Bt=(Ft=X)==null?void 0:Ft.postgap)!=null?Bt:p,de!==0&&(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(de),O.push(Z))}}}var zt=ye(["mtable"],O);if(c.length>0){for(var At=ol("hline",n,d),$e=ol("hdashline",n,d),Oe=[{type:"elem",elem:zt,shift:0}];c.length>0;){var Re=c.pop(),hn=Re.pos-R;Re.isDashed?Oe.push({type:"elem",elem:$e,shift:hn}):Oe.push({type:"elem",elem:At,shift:hn})}zt=Lt({positionType:"individualShift",children:Oe})}if(V.length===0)return ye(["mord"],[zt],n);var gt=Lt({positionType:"individualShift",children:V}),It=ye(["tag"],[gt],n);return Li([zt,It])},wP={c:"center ",l:"left ",r:"right "},ci=function(e,n){for(var s=[],a=new ve("mtd",[],["mtr-glue"]),i=new ve("mtd",[],["mml-eqn-num"]),r=0;r<e.body.length;r++){for(var o=e.body[r],l=[],c=0;c<o.length;c++)l.push(new ve("mtd",[Kt(o[c],n)]));e.tags&&e.tags[r]&&(l.unshift(a),l.push(a),e.leqno?l.unshift(i):l.push(i)),s.push(new ve("mtr",l))}var d=new ve("mtable",s),h=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",Ce(h));var p="",f="";if(e.cols&&e.cols.length>0){var m=e.cols,b="",g=!1,$=0,v=m.length;m[0].type==="separator"&&(p+="top ",$=1),m[m.length-1].type==="separator"&&(p+="bottom ",v-=1);for(var w=$;w<v;w++){var x=m[w];x.type==="align"?(f+=wP[x.align],g&&(b+="none "),g=!0):x.type==="separator"&&g&&(b+=x.separator==="|"?"solid ":"dashed ",g=!1)}d.setAttribute("columnalign",f.trim()),/[sd]/.test(b)&&d.setAttribute("columnlines",b.trim())}if(e.colSeparationType==="align"){for(var T=e.cols||[],k="",A=1;A<T.length;A++)k+=A%2?"0em ":"1em ";d.setAttribute("columnspacing",k.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var E="",S=e.hLinesBeforeRow;p+=S[0].length>0?"left ":"",p+=S[S.length-1].length>0?"right ":"";for(var _=1;_<S.length-1;_++)E+=S[_].length===0?"none ":S[_][0]?"dashed ":"solid ";return/[sd]/.test(E)&&d.setAttribute("rowlines",E.trim()),p!==""&&(d=new ve("menclose",[d]),d.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(d=new ve("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},sS=function(e,n){e.envName.includes("ed")||vp(e);var s=[],a=e.envName.includes("at")?"alignat":"align",i=e.envName==="split",r=gr(e.parser,{cols:s,addJot:!0,autoTag:i?void 0:v1(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var d="",h=0;h<n[0].body.length;h++){var p=ft(n[0].body[h],"textord");d+=p.text}o=Number(d),l=o*2}var f=!l;r.body.forEach(function($){for(var v=1;v<$.length;v+=2){var w=ft($[v],"styling"),x=ft(w.body[0],"ordgroup");x.body.unshift(c)}if(f)l<$.length&&(l=$.length);else{var T=$.length/2;if(o<T)throw new xe("Too many math in a row: "+("expected "+o+", but got "+T),$[0])}});for(var m=0;m<l;++m){var b="r",g=0;m%2===1?b="l":m>0&&f&&(g=1),s[m]={type:"align",align:b,pregap:g,postgap:0}}return r.colSeparationType=f?"align":"alignat",r};oi({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=mp(e[0]),s=n?[e[0]]:ft(e[0],"ordgroup").body,a=s.map(function(r){var o=fp(r),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new xe("Unknown column alignment: "+l,r)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return gr(t.parser,i,w1(t.envName))},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",s={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,!"lcr".includes(n))throw new xe("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),s.cols=[{type:"align",align:n}]}}var i=gr(t.parser,s,w1(t.envName)),r=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(r).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=gr(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=mp(e[0]),s=n?[e[0]]:ft(e[0],"ordgroup").body,a=s.map(function(o){var l=fp(o),c=l.text;if("lc".includes(c))return{type:"align",align:c};throw new xe("Unknown column alignment: "+c,o)});if(a.length>1)throw new xe("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},r=gr(t.parser,i,"script");if(r.body.length>0&&r.body[0].length>1)throw new xe("{subarray} can contain only one column");return r},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=gr(t.parser,e,w1(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:sS,htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){vP.has(t.envName)&&vp(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:v1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return gr(t.parser,e,"display")},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:sS,htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){vp(t);var e={autoTag:v1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return gr(t.parser,e,"display")},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["CD"],props:{numArgs:0},handler(t){return vp(t),lP(t.parser)},htmlBuilder:li,mathmlBuilder:ci});N("\\nonumber","\\gdef\\@eqnsw{0}");N("\\notag","\\nonumber");De({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new xe(t.funcName+" valid only within array environment")}});var cx=tS;De({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];if(a.type!=="ordgroup")throw new xe("Invalid environment name",a);for(var i="",r=0;r<a.body.length;++r)i+=ft(a.body[r],"textord").text;if(s==="\\begin"){if(!cx.hasOwnProperty(i))throw new xe("No such environment: "+i,a);var o=cx[i],{args:l,optArgs:c}=n.parseArguments("\\begin{"+i+"}",o),d={mode:n.mode,envName:i,parser:n},h=o.handler(d,l,c);n.expect("\\end",!1);var p=n.nextToken,f=ft(n.parseFunction(),"environment");if(f.name!==i)throw new xe("Mismatch: \\begin{"+i+"} matched by \\end{"+f.name+"}",p);return h}return{type:"environment",mode:n.mode,name:i,nameGroup:a}}});var aS=(t,e)=>{var n=t.font,s=e.withFont(n);return Ot(t.body,s)},iS=(t,e)=>{var n=t.font,s=e.withFont(n);return Kt(t.body,s)},ux={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};De({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=ip(e[0]),i=s;return i in ux&&(i=ux[i]),{type:"font",mode:n.mode,font:i.slice(1),body:a}},htmlBuilder:aS,mathmlBuilder:iS});De({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"mclass",mode:n.mode,mclass:gp(s),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:s}],isCharacterBox:Pi(s)}}});De({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s,breakOnTokenText:a}=t,{mode:i}=n,r=n.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+s.slice(1),body:{type:"ordgroup",mode:n.mode,body:r}}},htmlBuilder:aS,mathmlBuilder:iS});var kP=(t,e)=>{var n=e.style,s=n.fracNum(),a=n.fracDen(),i;i=e.havingStyle(s);var r=Ot(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;r.height=r.height<o?o:r.height,r.depth=r.depth<l?l:r.depth}i=e.havingStyle(a);var c=Ot(t.denom,i,e),d,h,p;t.hasBarLine?(t.barSize?(h=gn(t.barSize,e),d=ol("frac-line",e,h)):d=ol("frac-line",e),h=d.height,p=d.height):(d=null,h=0,p=e.fontMetrics().defaultRuleThickness);var f,m,b;n.size===rt.DISPLAY.size?(f=e.fontMetrics().num1,h>0?m=3*p:m=7*p,b=e.fontMetrics().denom1):(h>0?(f=e.fontMetrics().num2,m=p):(f=e.fontMetrics().num3,m=3*p),b=e.fontMetrics().denom2);var g;if(d){var v=e.fontMetrics().axisHeight;f-r.depth-(v+.5*h)<m&&(f+=m-(f-r.depth-(v+.5*h))),v-.5*h-(c.height-b)<m&&(b+=m-(v-.5*h-(c.height-b)));var w=-(v-.5*h);g=Lt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:b},{type:"elem",elem:d,shift:w},{type:"elem",elem:r,shift:-f}]})}else{var $=f-r.depth-(c.height-b);$<m&&(f+=.5*(m-$),b+=.5*(m-$)),g=Lt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:b},{type:"elem",elem:r,shift:-f}]})}i=e.havingStyle(n),g.height*=i.sizeMultiplier/e.sizeMultiplier,g.depth*=i.sizeMultiplier/e.sizeMultiplier;var x;n.size===rt.DISPLAY.size?x=e.fontMetrics().delim1:n.size===rt.SCRIPTSCRIPT.size?x=e.havingStyle(rt.SCRIPT).fontMetrics().delim2:x=e.fontMetrics().delim2;var T,k;return t.leftDelim==null?T=Vc(e,["mopen"]):T=r1(t.leftDelim,x,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?k=ye([]):t.rightDelim==null?k=Vc(e,["mclose"]):k=r1(t.rightDelim,x,!0,e.havingStyle(n),t.mode,["mclose"]),ye(["mord"].concat(i.sizingClasses(e)),[T,ye(["mfrac"],[g]),k],e)},xP=(t,e)=>{var n=new ve("mfrac",[Kt(t.numer,e),Kt(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var s=gn(t.barSize,e);n.setAttribute("linethickness",Ce(s))}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var i=new ve("mo",[new Sn(t.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(n),t.rightDelim!=null){var r=new ve("mo",[new Sn(t.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),a.push(r)}return g1(a)}return n},rS=(t,e)=>{if(!e)return t;var n={type:"styling",mode:t.mode,style:e,body:[t]};return n};De({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0],i=e[1],r,o=null,l=null;switch(s){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,o="(",l=")";break;case"\\\\bracefrac":r=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c=s==="\\cfrac",d=null;return c||s.startsWith("\\d")?d="display":s.startsWith("\\t")&&(d="text"),rS({type:"genfrac",mode:n.mode,numer:a,denom:i,continued:c,hasBarLine:r,leftDelim:o,rightDelim:l,barSize:null},d)},htmlBuilder:kP,mathmlBuilder:xP});De({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:s}=t,a;switch(n){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:s}}});var dx=["display","text","script","scriptscript"],hx=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};De({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,s=e[4],a=e[5],i=ip(e[0]),r=i.type==="atom"&&i.family==="open"?hx(i.text):null,o=ip(e[1]),l=o.type==="atom"&&o.family==="close"?hx(o.text):null,c=ft(e[2],"size"),d,h=null;c.isBlank?d=!0:(h=c.value,d=h.number>0);var p=null,f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=ft(f.body[0],"textord");p=dx[Number(m.text)]}}else f=ft(f,"textord"),p=dx[Number(f.text)];return rS({type:"genfrac",mode:n.mode,numer:s,denom:a,continued:!1,hasBarLine:d,barSize:h,leftDelim:r,rightDelim:l},p)}});De({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:s,token:a}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:ft(e[0],"size").value,token:a}}});De({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0],i=ft(e[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var r=e[2],o=i.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:r,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var oS=(t,e)=>{var n=e.style,s,a;t.type==="supsub"?(s=t.sup?Ot(t.sup,e.havingStyle(n.sup()),e):Ot(t.sub,e.havingStyle(n.sub()),e),a=ft(t.base,"horizBrace")):a=ft(t,"horizBrace");var i=Ot(a.base,e.havingBaseStyle(rt.DISPLAY)),r=pp(a,e),o;if(a.isOver?o=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:r,wrapperClasses:["svg-align"]}]}):o=Lt({positionType:"bottom",positionData:i.depth+.1+r.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),s){var l=ye(["minner",a.isOver?"mover":"munder"],[o],e);a.isOver?o=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:s}]}):o=Lt({positionType:"bottom",positionData:l.depth+.2+s.height+s.depth,children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:l}]})}return ye(["minner",a.isOver?"mover":"munder"],[o],e)},SP=(t,e)=>{var n=hp(t.label);return new ve(t.isOver?"mover":"munder",[Kt(t.base,e),n])};De({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t;return{type:"horizBrace",mode:n.mode,label:s,isOver:s.includes("\\over"),base:e[0]}},htmlBuilder:oS,mathmlBuilder:SP});De({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[1],a=ft(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Pn(s)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=qn(t.body,e,!1);return NR(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=mr(t.body,e);return n instanceof ve||(n=new ve("mrow",[n])),n.setAttribute("href",t.href),n}});De({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=ft(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:s}))return n.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<s.length;i++){var r=s[i];r==="~"&&(r="\\textasciitilde"),a.push({type:"textord",mode:"text",text:r})}var o={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:s,body:Pn(o)}}});De({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:Pn(e[0])}},htmlBuilder(t,e){var n=qn(t.body,e.withFont(""),!1);return Li(n)},mathmlBuilder(t,e){return new ve("mrow",oa(t.body,e.withFont("")))}});De({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s,token:a}=t,i=ft(e[0],"raw").string,r=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(s){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var c=i.split(","),d=0;d<c.length;d++){var h=c[d],p=h.indexOf("=");if(p<0)throw new xe("\\htmlData key/value '"+h+"' missing equals sign");var f=h.slice(0,p),m=h.slice(p+1);l["data-"+f.trim()]=m}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(o)?{type:"html",mode:n.mode,attributes:l,body:Pn(r)}:n.formatUnsupportedCmd(s)},htmlBuilder:(t,e)=>{var n=qn(t.body,e,!1),s=["enclosing"];t.attributes.class&&s.push(...t.attributes.class.trim().split(/\s+/));var a=ye(s,n,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&a.setAttribute(i,t.attributes[i]);return a},mathmlBuilder:(t,e)=>mr(t.body,e)});De({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:Pn(e[0]),mathml:Pn(e[1])}},htmlBuilder:(t,e)=>{var n=qn(t.html,e,!1);return Li(n)},mathmlBuilder:(t,e)=>mr(t.mathml,e)});var zb=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new xe("Invalid size: '"+e+"' in \\includegraphics");var s={number:+(n[1]+n[2]),unit:n[3]};if(!Ax(s))throw new xe("Invalid unit: '"+s.unit+"' in \\includegraphics.");return s};De({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:s}=t,a={number:0,unit:"em"},i={number:.9,unit:"em"},r={number:0,unit:"em"},o="";if(n[0])for(var l=ft(n[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var h=c[d].split("=");if(h.length===2){var p=h[1].trim();switch(h[0].trim()){case"alt":o=p;break;case"width":a=zb(p);break;case"height":i=zb(p);break;case"totalheight":r=zb(p);break;default:throw new xe("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=ft(e[0],"url").url;return o===""&&(o=f,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),s.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:s.mode,alt:o,width:a,height:i,totalheight:r,src:f}:s.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=gn(t.height,e),s=0;t.totalheight.number>0&&(s=gn(t.totalheight,e)-n);var a=0;t.width.number>0&&(a=gn(t.width,e));var i={height:Ce(n+s)};a>0&&(i.width=Ce(a)),s>0&&(i.verticalAlign=Ce(-s));var r=new Vb(t.src,t.alt,i);return r.height=n,r.depth=s,r},mathmlBuilder:(t,e)=>{var n=new ve("mglyph",[]);n.setAttribute("alt",t.alt);var s=gn(t.height,e),a=0;if(t.totalheight.number>0&&(a=gn(t.totalheight,e)-s,n.setAttribute("valign",Ce(-a))),n.setAttribute("height",Ce(s+a)),t.width.number>0){var i=gn(t.width,e);n.setAttribute("width",Ce(i))}return n.setAttribute("src",t.src),n}});De({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t,a=ft(e[0],"size");if(n.settings.strict){var i=s[1]==="m",r=a.value.unit==="mu";i?(r||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" supports only mu units, "+("not "+a.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" works only in math mode")):r&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder(t,e){return Ix(t.dimension,e)},mathmlBuilder(t,e){var n=gn(t.dimension,e);return new rp(n)}});De({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"lap",mode:n.mode,alignment:s.slice(5),body:a}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=ye([],[Ot(t.body,e)]),n=ye(["inner"],[n],e)):n=ye(["inner"],[Ot(t.body,e)]);var s=ye(["fix"],[]),a=ye([t.alignment],[n,s],e),i=ye(["strut"]);return i.style.height=Ce(a.height+a.depth),a.depth&&(i.style.verticalAlign=Ce(-a.depth)),a.children.unshift(i),a=ye(["thinbox"],[a],e),ye(["mord","vbox"],[a],e)},mathmlBuilder:(t,e)=>{var n=new ve("mpadded",[Kt(t.body,e)]);if(t.alignment!=="rlap"){var s=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",s+"width")}return n.setAttribute("width","0px"),n}});De({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:s}=t,a=s.mode;s.switchMode("math");var i=n==="\\("?"\\)":"$",r=s.parseExpression(!1,i);return s.expect(i),s.switchMode(a),{type:"styling",mode:s.mode,style:"text",resetFont:!0,body:r}}});De({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new xe("Mismatched "+t.funcName)}});var px=(t,e)=>{switch(e.style.size){case rt.DISPLAY.size:return t.display;case rt.TEXT.size:return t.text;case rt.SCRIPT.size:return t.script;case rt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};De({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:Pn(e[0]),text:Pn(e[1]),script:Pn(e[2]),scriptscript:Pn(e[3])}},htmlBuilder:(t,e)=>{var n=px(t,e),s=qn(n,e,!1);return Li(s)},mathmlBuilder:(t,e)=>{var n=px(t,e);return mr(n,e)}});var lS=(t,e,n,s,a,i,r)=>{t=ye([],[t]);var o=n&&Pi(n),l,c;if(e){var d=Ot(e,s.havingStyle(a.sup()),s);c={elem:d,kern:Math.max(s.fontMetrics().bigOpSpacing1,s.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=Ot(n,s.havingStyle(a.sub()),s);l={elem:h,kern:Math.max(s.fontMetrics().bigOpSpacing2,s.fontMetrics().bigOpSpacing4-h.height)}}var p;if(c&&l){var f=s.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+r;p=Lt({positionType:"bottom",positionData:f,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ce(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]})}else if(l){var m=t.height-r;p=Lt({positionType:"top",positionData:m,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]})}else if(c){var b=t.depth+r;p=Lt({positionType:"bottom",positionData:b,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ce(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]})}else return t;var g=[p];if(l&&i!==0&&!o){var $=ye(["mspace"],[],s);$.style.marginRight=Ce(i),g.unshift($)}return ye(["mop","op-limits"],g,s)},cS=new Set(["\\smallint"]),ul=(t,e)=>{var n,s,a=!1,i;t.type==="supsub"?(n=t.sup,s=t.sub,i=ft(t.base,"op"),a=!0):i=ft(t,"op");var r=e.style,o=!1;r.size===rt.DISPLAY.size&&i.symbol&&!cS.has(i.name)&&(o=!0);var l,c;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",h="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(h=i.name.slice(1),i.name=h==="oiint"?"\\iint":"\\iiint"),l=Ss(i.name,d,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),c=l.italic,h.length>0){var p=Px(h+"Size"+(o?"2":"1"),e);l=Lt({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+h,l.classes.unshift("mop"),l.italic=c}}else if(i.body){var f=qn(i.body,e,!0);f.length===1&&f[0]instanceof Cs?(l=f[0],l.classes[0]="mop"):l=ye(["mop"],f,e)}else{for(var m=[],b=1;b<i.name.length;b++)m.push(f1(i.name[b],i.mode,e));l=ye(["mop"],m,e)}var g=0,$=0;if((l instanceof Cs||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var v;g=(l.height-l.depth)/2-e.fontMetrics().axisHeight,$=(v=l.italic)!=null?v:0}return a?lS(l,n,s,e,r,$,g):(g&&(l.style.position="relative",l.style.top=Ce(g)),l)},Kc=(t,e)=>{var n;if(t.symbol)n=new ve("mo",[Sa(t.name,t.mode)]),cS.has(t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new ve("mo",oa(t.body,e));else{n=new ve("mi",[new Sn(t.name.slice(1))]);var s=new ve("mo",[Sa("\u2061","text")]);t.parentIsSupSub?n=new ve("mrow",[n,s]):n=Ox([n,s])}return n},AP={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};De({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=s;return a.length===1&&(a=AP[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Pn(s)}},htmlBuilder:ul,mathmlBuilder:Kc});var CP={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};De({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"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:n}=t,s=n;return s.length===1&&(s=CP[s]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ul,mathmlBuilder:Kc});var uS=(t,e)=>{var n,s,a=!1,i;t.type==="supsub"?(n=t.sup,s=t.sub,i=ft(t.base,"operatorname"),a=!0):i=ft(t,"operatorname");var r;if(i.body.length>0){for(var o=i.body.map(h=>{var p="text"in h?h.text:void 0;return typeof p=="string"?{type:"textord",mode:h.mode,text:p}:h}),l=qn(o,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof Cs&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}r=ye(["mop"],l,e)}else r=ye(["mop"],[],e);return a?lS(r,n,s,e,e.style,0,0):r},TP=(t,e)=>{for(var n=oa(t.body,e.withFont("mathrm")),s=!0,a=0;a<n.length;a++){var i=n[a];if(!(i instanceof rp))if(i instanceof ve)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var r=i.children[0];i.children.length===1&&r instanceof Sn?r.text=r.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):s=!1;break}default:s=!1}else s=!1}if(s){var o=n.map(d=>d.toText()).join("");n=[new Sn(o)]}var l=new ve("mi",n);l.setAttribute("mathvariant","normal");var c=new ve("mo",[Sa("\u2061","text")]);return t.parentIsSupSub?new ve("mrow",[l,c]):Ox([l,c])};De({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"operatorname",mode:n.mode,body:Pn(a),alwaysHandleSupSub:s==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:uS,mathmlBuilder:TP});N("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");no({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Li(qn(t.body,e,!1)):ye(["mord"],qn(t.body,e,!0),e)},mathmlBuilder(t,e){return mr(t.body,e,!0)}});De({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,s=e[0];return{type:"overline",mode:n.mode,body:s}},htmlBuilder(t,e){var n=Ot(t.body,e.havingCrampedStyle()),s=ol("overline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:s},{type:"kern",size:a}]});return ye(["mord","overline"],[i],e)},mathmlBuilder(t,e){var n=new ve("mo",[new Sn("\u203E")]);n.setAttribute("stretchy","true");var s=new ve("mover",[Kt(t.body,e),n]);return s.setAttribute("accent","true"),s}});De({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"phantom",mode:n.mode,body:Pn(s)}},htmlBuilder:(t,e)=>{var n=qn(t.body,e.withPhantom(),!1);return Li(n)},mathmlBuilder:(t,e)=>{var n=oa(t.body,e);return new ve("mphantom",n)}});N("\\hphantom","\\smash{\\phantom{#1}}");De({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"vphantom",mode:n.mode,body:s}},htmlBuilder:(t,e)=>{var n=ye(["inner"],[Ot(t.body,e.withPhantom())]),s=ye(["fix"],[]);return ye(["mord","rlap"],[n,s],e)},mathmlBuilder:(t,e)=>{var n=oa(Pn(t.body),e),s=new ve("mphantom",n),a=new ve("mpadded",[s]);return a.setAttribute("width","0px"),a}});De({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,s=ft(e[0],"size").value,a=e[1];return{type:"raisebox",mode:n.mode,dy:s,body:a}},htmlBuilder(t,e){var n=Ot(t.body,e),s=gn(t.dy,e);return Lt({positionType:"shift",positionData:-s,children:[{type:"elem",elem:n}]})},mathmlBuilder(t,e){var n=new ve("mpadded",[Kt(t.body,e)]),s=t.dy.number+t.dy.unit;return n.setAttribute("voffset",s),n}});De({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});De({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:s}=t,a=n[0],i=ft(e[0],"size"),r=ft(e[1],"size");return{type:"rule",mode:s.mode,shift:a&&ft(a,"size").value,width:i.value,height:r.value}},htmlBuilder(t,e){var n=ye(["mord","rule"],[],e),s=gn(t.width,e),a=gn(t.height,e),i=t.shift?gn(t.shift,e):0;return n.style.borderRightWidth=Ce(s),n.style.borderTopWidth=Ce(a),n.style.bottom=Ce(i),n.width=s,n.height=a+i,n.depth=-i,n.maxFontSize=a*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=gn(t.width,e),s=gn(t.height,e),a=t.shift?gn(t.shift,e):0,i=e.color&&e.getColor()||"black",r=new ve("mspace");r.setAttribute("mathbackground",i),r.setAttribute("width",Ce(n)),r.setAttribute("height",Ce(s));var o=new ve("mpadded",[r]);return a>=0?o.setAttribute("height",Ce(a)):(o.setAttribute("height",Ce(a)),o.setAttribute("depth",Ce(-a))),o.setAttribute("voffset",Ce(a)),o}});function dS(t,e,n){for(var s=qn(t,e,!1),a=e.sizeMultiplier/n.sizeMultiplier,i=0;i<s.length;i++){var r=s[i].classes.indexOf("sizing");r<0?Array.prototype.push.apply(s[i].classes,e.sizingClasses(n)):s[i].classes[r+1]==="reset-size"+e.size&&(s[i].classes[r+1]="reset-size"+n.size),s[i].height*=a,s[i].depth*=a}return Li(s)}var fx=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],EP=(t,e)=>{var n=e.havingSize(t.size);return dS(t.body,n,e)};De({type:"sizing",names:fx,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:s,parser:a}=t,i=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:fx.indexOf(s)+1,body:i}},htmlBuilder:EP,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),s=oa(t.body,n),a=new ve("mstyle",s);return a.setAttribute("mathsize",Ce(n.sizeMultiplier)),a}});De({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:s}=t,a=!1,i=!1,r=n[0]&&ft(n[0],"ordgroup");if(r)for(var o,l=0;l<r.body.length;++l){var c=r.body[l];if(o=fp(c).text,o==="t")a=!0;else if(o==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var d=e[0];return{type:"smash",mode:s.mode,body:d,smashHeight:a,smashDepth:i}},htmlBuilder:(t,e)=>{var n=ye([],[Ot(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0),t.smashDepth&&(n.depth=0),t.smashHeight&&t.smashDepth)return ye(["mord","smash"],[n],e);if(n.children)for(var s=0;s<n.children.length;s++)t.smashHeight&&(n.children[s].height=0),t.smashDepth&&(n.children[s].depth=0);var a=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ye(["mord"],[a],e)},mathmlBuilder:(t,e)=>{var n=new ve("mpadded",[Kt(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});De({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:s}=t,a=n[0],i=e[0];return{type:"sqrt",mode:s.mode,body:i,index:a}},htmlBuilder(t,e){var n=Ot(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=ll(n,e);var s=e.fontMetrics(),a=s.defaultRuleThickness,i=a;e.style.id<rt.TEXT.id&&(i=e.fontMetrics().xHeight);var r=a+i/4,o=n.height+n.depth+r+a,{span:l,ruleWidth:c,advanceWidth:d}=fP(o,e),h=l.height-c;h>n.height+n.depth+r&&(r=(r+h-n.height-n.depth)/2);var p=l.height-n.height-r-c;n.style.paddingLeft=Ce(d);var f=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]});if(t.index){var m=e.havingStyle(rt.SCRIPTSCRIPT),b=Ot(t.index,m,e),g=.6*(f.height-f.depth),$=Lt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:b}]}),v=ye(["root"],[$]);return ye(["mord","sqrt"],[v,f],e)}else return ye(["mord","sqrt"],[f],e)},mathmlBuilder(t,e){var{body:n,index:s}=t;return s?new ve("mroot",[Kt(n,e),Kt(s,e)]):new ve("msqrt",[Kt(n,e)])}});var o1={display:rt.DISPLAY,text:rt.TEXT,script:rt.SCRIPT,scriptscript:rt.SCRIPTSCRIPT};function MP(t){return t in o1}De({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:s,parser:a}=t,i=a.parseExpression(!0,n),r=s.slice(1,s.length-5);if(!MP(r))throw new Error("Unknown style: "+r);return{type:"styling",mode:a.mode,style:r,body:i}},htmlBuilder(t,e){var n=o1[t.style],s=e.havingStyle(n);return t.resetFont&&(s=s.withFont("")),dS(t.body,s,e)},mathmlBuilder(t,e){var n=o1[t.style],s=e.havingStyle(n);t.resetFont&&(s=s.withFont(""));var a=oa(t.body,s),i=new ve("mstyle",a),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=r[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var _P=function(e,n){var s=e.base;if(s)if(s.type==="op"){var a=s.limits&&(n.style.size===rt.DISPLAY.size||s.alwaysHandleSupSub);return a?ul:null}else if(s.type==="operatorname"){var i=s.alwaysHandleSupSub&&(n.style.size===rt.DISPLAY.size||s.limits);return i?uS:null}else{if(s.type==="accent")return Pi(s.base)?$1:null;if(s.type==="horizBrace"){var r=!e.sub;return r===s.isOver?oS:null}else return null}else return null};no({type:"supsub",htmlBuilder(t,e){var n=_P(t,e);if(n)return n(t,e);var{base:s,sup:a,sub:i}=t,r=Ot(s,e),o,l,c=e.fontMetrics(),d=0,h=0,p=s&&Pi(s);if(a){var f=e.havingStyle(e.style.sup());o=Ot(a,f,e),p||(d=r.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(i){var m=e.havingStyle(e.style.sub());l=Ot(i,m,e),p||(h=r.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var b;e.style===rt.DISPLAY?b=c.sup1:e.style.cramped?b=c.sup3:b=c.sup2;var g=e.sizeMultiplier,$=Ce(.5/c.ptPerEm/g),v=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");if(r instanceof Cs||w){var x;v=Ce(-((x=r.italic)!=null?x:0))}}var T;if(o&&l){d=Math.max(d,b,o.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var k=c.defaultRuleThickness,A=4*k;if(d-o.depth-(l.height-h)<A){h=A-(d-o.depth)+l.height;var E=.8*c.xHeight-(d-o.depth);E>0&&(d+=E,h-=E)}var S=[{type:"elem",elem:l,shift:h,marginRight:$,marginLeft:v},{type:"elem",elem:o,shift:-d,marginRight:$}];T=Lt({positionType:"individualShift",children:S})}else if(l){h=Math.max(h,c.sub1,l.height-.8*c.xHeight);var _=[{type:"elem",elem:l,marginLeft:v,marginRight:$}];T=Lt({positionType:"shift",positionData:h,children:_})}else if(o)d=Math.max(d,b,o.depth+.25*c.xHeight),T=Lt({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:$}]});else throw new Error("supsub must have either sup or sub.");var I=n1(r,"right")||"mord";return ye([I],[r,ye(["msupsub"],[T])],e)},mathmlBuilder(t,e){var n=!1,s,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===t.base.isOver&&(n=!0,s=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[Kt(t.base,e)];t.sub&&i.push(Kt(t.sub,e)),t.sup&&i.push(Kt(t.sup,e));var r;if(n)r=s?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===rt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===rt.DISPLAY||c.limits)?r="munderover":r="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===rt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===rt.DISPLAY)?r="munder":r="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===rt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===rt.DISPLAY)?r="mover":r="msup"}return new ve(r,i)}});no({type:"atom",htmlBuilder(t,e){return f1(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new ve("mo",[Sa(t.text,t.mode)]);if(t.family==="bin"){var s=b1(t,e);s==="bold-italic"&&n.setAttribute("mathvariant",s)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var hS={mi:"italic",mn:"normal",mtext:"normal"};no({type:"mathord",htmlBuilder(t,e){return dp(t,e,"mathord")},mathmlBuilder(t,e){var n=new ve("mi",[Sa(t.text,t.mode,e)]),s=b1(t,e)||"italic";return s!==hS[n.type]&&n.setAttribute("mathvariant",s),n}});no({type:"textord",htmlBuilder(t,e){return dp(t,e,"textord")},mathmlBuilder(t,e){var n=Sa(t.text,t.mode,e),s=b1(t,e)||"normal",a;return t.mode==="text"?a=new ve("mtext",[n]):/[0-9]/.test(t.text)?a=new ve("mn",[n]):t.text==="\\prime"?a=new ve("mo",[n]):a=new ve("mi",[n]),s!==hS[a.type]&&a.setAttribute("mathvariant",s),a}});var Ub={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hb={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};no({type:"spacing",htmlBuilder(t,e){if(Hb.hasOwnProperty(t.text)){var n=Hb[t.text].className||"";if(t.mode==="text"){var s=dp(t,e,"textord");return s.classes.push(n),s}else return ye(["mspace",n],[f1(t.text,t.mode,e)],e)}else{if(Ub.hasOwnProperty(t.text))return ye(["mspace",Ub[t.text]],[],e);throw new xe('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(Hb.hasOwnProperty(t.text))n=new ve("mtext",[new Sn("\xA0")]);else{if(Ub.hasOwnProperty(t.text))return new ve("mspace");throw new xe('Unknown type of space "'+t.text+'"')}return n}});var mx=()=>{var t=new ve("mtd",[]);return t.setAttribute("width","50%"),t};no({type:"tag",mathmlBuilder(t,e){var n=new ve("mtable",[new ve("mtr",[mx(),new ve("mtd",[mr(t.body,e)]),mx(),new ve("mtd",[mr(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var gx={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},bx={"\\textbf":"textbf","\\textmd":"textmd"},IP={"\\textit":"textit","\\textup":"textup"},$x=(t,e)=>{var n=t.font;if(n){if(gx[n])return e.withTextFontFamily(gx[n]);if(bx[n])return e.withTextFontWeight(bx[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(IP[n])};De({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"text",mode:n.mode,body:Pn(a),font:s}},htmlBuilder(t,e){var n=$x(t,e),s=qn(t.body,n,!0);return ye(["mord","text"],s,n)},mathmlBuilder(t,e){var n=$x(t,e);return mr(t.body,n)}});De({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ot(t.body,e),s=ol("underline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Lt({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:s},{type:"kern",size:3*a},{type:"elem",elem:n}]});return ye(["mord","underline"],[i],e)},mathmlBuilder(t,e){var n=new ve("mo",[new Sn("\u203E")]);n.setAttribute("stretchy","true");var s=new ve("munder",[Kt(t.body,e),n]);return s.setAttribute("accentunder","true"),s}});De({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ot(t.body,e),s=e.fontMetrics().axisHeight,a=.5*(n.height-s-(n.depth+s));return Lt({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]})},mathmlBuilder(t,e){var n=new ve("mpadded",[Kt(t.body,e)],["vcenter"]);return new ve("mrow",[n])}});De({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new xe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=yx(t),s=[],a=e.havingStyle(e.style.text()),i=0;i<n.length;i++){var r=n[i];r==="~"&&(r="\\textasciitilde"),s.push(Ss(r,"Typewriter-Regular",t.mode,a,["mord","texttt"]))}return ye(["mord","text"].concat(a.sizingClasses(e)),_x(s),a)},mathmlBuilder(t,e){var n=new Sn(yx(t)),s=new ve("mtext",[n]);return s.setAttribute("mathvariant","monospace"),s}});var yx=t=>t.body.replace(/ /g,t.star?"\u2423":"\xA0"),ur=Dx,pS=`[ \r
1032
+ `+k+" children.");for(var S=0;S<k;S++){var _=new ri(v[S]),I=new Ga([_],{width:"400em",height:Ce(T),viewBox:"0 0 "+o+" "+x,preserveAspectRatio:E[S]+" slice"}),R=fr([A[S]],[I],n);if(k===1)return{span:R,minWidth:w,height:T};R.style.height=Ce(T),g.push(R)}return{span:ye(["stretchy"],g,n),minWidth:w,height:T}}}var{span:a,minWidth:i,height:r}=s();return a.height=r,a.style.height=Ce(r),i>0&&(a.style.minWidth=Ce(i)),a},eP=function(e,n,s,a,i){var r,o=e.height+e.depth+s+a;if(/fbox|color|angl/.test(n)){if(r=ye(["stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();l&&(r.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new jc({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new jc({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ga(c,{width:"100%",height:Ce(o)});r=fr([],[d],i)}return r.height=o,r.style.height=Ce(o),r},tP={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nP={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function sP(t){return t in tP}function ft(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function fp(t){var e=mp(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function mp(t){return t&&(t.type==="atom"||nP.hasOwnProperty(t.type))?t:null}var Fx=t=>{if(t instanceof Cs)return t;if(MR(t)&&t.children.length===1)return Fx(t.children[0])},$1=(t,e)=>{var n,s,a;t&&t.type==="supsub"?(s=ft(t.base,"accent"),n=s.base,t.base=n,a=ER(Ot(t,e)),t.base=s):(s=ft(t,"accent"),n=s.base);var i=Ot(n,e.havingCrampedStyle()),r=s.isShifty&&Pi(n),o=0;if(r){var l,c;o=(l=(c=Fx(i))==null?void 0:c.skew)!=null?l:0}var d=s.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(s.isStretchy)p=pp(s,e),p=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Ce(2*o)+")",marginLeft:Ce(2*o)}:void 0}]});else{var f,m;s.label==="\\vec"?(f=Px("vec",e),m=Rx.vec[1]):(f=dp({type:"textord",mode:s.mode,text:s.label},e,"textord"),f=TR(f),f.italic=0,m=f.width,d&&(h+=f.depth)),p=ye(["accent-body"],[f]);var b=s.label==="\\textcircled";b&&(p.classes.push("accent-full"),h=i.height);var g=o;b||(g-=m/2),p.style.left=Ce(g),s.label==="\\textcircled"&&(p.style.top=".2em"),p=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:p}]})}var $=ye(["mord","accent"],[p],e);return a?(a.children[0]=$,a.height=Math.max($.height,a.height),a.classes[0]="mord",a):$},zx=(t,e)=>{var n=t.isStretchy?hp(t.label):new ve("mo",[Sa(t.label,t.mode)]),s=new ve("mover",[Kt(t.base,e),n]);return s.setAttribute("accent","true"),s},aP=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));De({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:(t,e)=>{var n=ip(e[0]),s=!aP.test(t.funcName),a=!s||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:s,isShifty:a,base:n}},htmlBuilder:$1,mathmlBuilder:zx});De({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],s=t.parser.mode;return s==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),s="text"),{type:"accent",mode:s,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:$1,mathmlBuilder:zx});De({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"accentUnder",mode:n.mode,label:s,base:a}},htmlBuilder:(t,e)=>{var n=Ot(t.base,e),s=pp(t,e),a=t.label==="\\utilde"?.12:0,i=Lt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]});return ye(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var n=hp(t.label),s=new ve("munder",[Kt(t.base,e),n]);return s.setAttribute("accentunder","true"),s}});var Xh=t=>{var e=new ve("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};De({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(t,e,n){var{parser:s,funcName:a}=t;return{type:"xArrow",mode:s.mode,label:a,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,s=e.havingStyle(n.sup()),a=ll(Ot(t.body,s,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var r;t.below&&(s=e.havingStyle(n.sub()),r=ll(Ot(t.below,s,e),e),r.classes.push(i+"-arrow-pad"));var o=pp(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(c-=a.depth);var d;if(r){var h=-e.fontMetrics().axisHeight+r.height+.5*o.height+.111;d=Lt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:r,shift:h}]})}else d=Lt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return ye(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var n=hp(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var s;if(t.body){var a=Xh(Kt(t.body,e));if(t.below){var i=Xh(Kt(t.below,e));s=new ve("munderover",[n,i,a])}else s=new ve("mover",[n,a])}else if(t.below){var r=Xh(Kt(t.below,e));s=new ve("munder",[n,r])}else s=Xh(),s=new ve("mover",[n,s]);return s}});function Ux(t,e){var n=qn(t.body,e,!0);return ye([t.mclass],n,e)}function Hx(t,e){var n,s=oa(t.body,e);return t.mclass==="minner"?n=new ve("mpadded",s):t.mclass==="mord"?t.isCharacterBox?(n=s[0],n.type="mi"):n=new ve("mi",s):(t.isCharacterBox?(n=s[0],n.type="mo"):n=new ve("mo",s),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}De({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+s.slice(5),body:Pn(a),isCharacterBox:Pi(a)}},htmlBuilder:Ux,mathmlBuilder:Hx});var gp=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};De({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:gp(e[0]),body:Pn(e[1]),isCharacterBox:Pi(e[1])}}});De({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:s}=t,a=e[1],i=e[0],r;s!=="\\stackrel"?r=gp(a):r="mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:s!=="\\stackrel",body:Pn(a)},l={type:"supsub",mode:i.mode,base:o,sup:s==="\\underset"?null:i,sub:s==="\\underset"?i:null};return{type:"mclass",mode:n.mode,mclass:r,body:[l],isCharacterBox:Pi(l)}},htmlBuilder:Ux,mathmlBuilder:Hx});De({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:gp(e[0]),body:Pn(e[0])}},htmlBuilder(t,e){var n=qn(t.body,e,!0),s=ye([t.mclass],n,e);return s.style.textShadow="0.02em 0.01em 0.04px",s},mathmlBuilder(t,e){var n=oa(t.body,e),s=new ve("mstyle",n);return s.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),s}});var iP={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},sx=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),ax=t=>t.type==="textord"&&t.text==="@",rP=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function oP(t,e,n){var s=iP[t];switch(s){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(s,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=n.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:s,mode:"math",family:"rel"},r=n.callFunction("\\Big",[i],[]),o=n.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[a,r,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function lP(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new xe("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var s=[],a=[s],i=0;i<e.length;i++){for(var r=e[i],o=sx(),l=0;l<r.length;l++)if(!ax(r[l]))o.body.push(r[l]);else{s.push(o),l+=1;var c=fp(r[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(c))if("<>AV".includes(c))for(var h=0;h<2;h++){for(var p=!0,f=l+1;f<r.length;f++){if(rP(r[f],c)){p=!1,l=f;break}if(ax(r[f]))throw new xe("Missing a "+c+" character to complete a CD arrow.",r[f]);d[h].body.push(r[f])}if(p)throw new xe("Missing a "+c+" character to complete a CD arrow.",r[l])}else throw new xe('Expected one of "<>AV=|." after @',r[l]);var m=oP(c,d,t),b={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};s.push(b),o=sx()}i%2===0?s.push(o):s.shift(),s=[],a.push(s)}t.gullet.endGroup(),t.gullet.endGroup();var g=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:g,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}De({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t;return{type:"cdlabel",mode:n.mode,side:s.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),s=ll(Ot(t.label,n,e),e);return s.classes.push("cd-label-"+t.side),s.style.bottom=Ce(.8-s.depth),s.height=0,s.depth=0,s},mathmlBuilder(t,e){var n=new ve("mrow",[Kt(t.label,e)]);return n=new ve("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ve("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});De({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=ll(Ot(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new ve("mrow",[Kt(t.fragment,e)])}});De({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,s=ft(e[0],"ordgroup"),a=s.body,i="",r=0;r<a.length;r++){var o=ft(a[r],"textord");i+=o.text}var l=parseInt(i),c;if(isNaN(l))throw new xe("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new xe("\\@char with invalid code point "+i);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var qx=(t,e)=>{var n=qn(t.body,e.withColor(t.color),!1);return Li(n)},Wx=(t,e)=>{var n=oa(t.body,e.withColor(t.color)),s=new ve("mstyle",n);return s.setAttribute("mathcolor",t.color),s};De({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,s=ft(e[0],"color-token").color,a=e[1];return{type:"color",mode:n.mode,color:s,body:Pn(a)}},htmlBuilder:qx,mathmlBuilder:Wx});De({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:s}=t,a=ft(e[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var i=n.parseExpression(!0,s);return{type:"color",mode:n.mode,color:a,body:i}},htmlBuilder:qx,mathmlBuilder:Wx});De({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:s}=t,a=s.gullet.future().text==="["?s.parseSizeGroup(!0):null,i=!s.settings.displayMode||!s.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:s.mode,newLine:i,size:a&&ft(a,"size").value}},htmlBuilder(t,e){var n=ye(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=Ce(gn(t.size,e)))),n},mathmlBuilder(t,e){var n=new ve("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",Ce(gn(t.size,e)))),n}});var a1={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gx=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new xe("Expected a control sequence",t);return e},cP=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},jx=(t,e,n,s)=>{var a=t.gullet.macros.get(n.text);a==null&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,a,s)};De({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var s=e.fetch();if(a1[s.text])return(n==="\\global"||n==="\\\\globallong")&&(s.text=a1[s.text]),ft(e.parseFunction(),"internal");throw new xe("Invalid token after macro prefix",s)}});De({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=e.gullet.popToken(),a=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new xe("Expected a control sequence",s);for(var i=0,r,o=[[]];e.gullet.future().text!=="{";)if(s=e.gullet.popToken(),s.text==="#"){if(e.gullet.future().text==="{"){r=e.gullet.future(),o[i].push("{");break}if(s=e.gullet.popToken(),!/^[1-9]$/.test(s.text))throw new xe('Invalid argument number "'+s.text+'"');if(parseInt(s.text)!==i+1)throw new xe('Argument number "'+s.text+'" out of order');i++,o.push([])}else{if(s.text==="EOF")throw new xe("Expected a macro definition");o[i].push(s.text)}var{tokens:l}=e.gullet.consumeArg();return r&&l.unshift(r),(n==="\\edef"||n==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:o},n===a1[n]),{type:"internal",mode:e.mode}}});De({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=Gx(e.gullet.popToken());e.gullet.consumeSpaces();var a=cP(e);return jx(e,s,a,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});De({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,s=Gx(e.gullet.popToken()),a=e.gullet.popToken(),i=e.gullet.popToken();return jx(e,s,i,n==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});var Hc=function(e,n,s){var a=un.math[e]&&un.math[e].replace,i=p1(a||e,n,s);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return i},y1=function(e,n,s,a){var i=s.havingBaseStyle(n),r=ye(a.concat(i.sizingClasses(s)),[e],s),o=i.sizeMultiplier/s.sizeMultiplier;return r.height*=o,r.depth*=o,r.maxFontSize=i.sizeMultiplier,r},Vx=function(e,n,s){var a=n.havingBaseStyle(s),i=(1-n.sizeMultiplier/a.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Ce(i),e.height-=i,e.depth+=i},uP=function(e,n,s,a,i,r){var o=Ss(e,"Main-Regular",i,a),l=y1(o,n,a,r);return s&&Vx(l,a,n),l},dP=function(e,n,s,a){return Ss(e,"Size"+n+"-Regular",s,a)},Yx=function(e,n,s,a,i,r){var o=dP(e,n,i,a),l=y1(ye(["delimsizing","size"+n],[o],a),rt.TEXT,a,r);return s&&Vx(l,a,rt.TEXT),l},Db=function(e,n,s){var a;n==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=ye(["delimsizinginner",a],[ye([],[Ss(e,n,s)])]);return{type:"elem",elem:i}},Lb=function(e,n,s){var a=ii["Size4-Regular"][e.charCodeAt(0)]?ii["Size4-Regular"][e.charCodeAt(0)][4]:ii["Size1-Regular"][e.charCodeAt(0)][4],i=new ri("inner",wR(e,Math.round(1e3*n))),r=new Ga([i],{width:Ce(a),height:Ce(n),style:"width:"+Ce(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=fr([],[r],s);return o.height=n,o.style.height=Ce(n),o.style.width=Ce(a),{type:"elem",elem:o}},i1=.008,Zh={type:"kern",size:-1*i1},hP=new Set(["|","\\lvert","\\rvert","\\vert"]),pP=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Kx=function(e,n,s,a,i,r){var o,l,c,d,h="",p=0;o=c=d=e,l=null;var f="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?o=c="\u23D0":e==="\\Downarrow"?o=c="\u2016":e==="\\updownarrow"?(o="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="\u2016",d="\\Downarrow"):hP.has(e)?(c="\u2223",h="vert",p=333):pP.has(e)?(c="\u2225",h="doublevert",p=556):e==="["||e==="\\lbrack"?(o="\u23A1",c="\u23A2",d="\u23A3",f="Size4-Regular",h="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="\u23A4",c="\u23A5",d="\u23A6",f="Size4-Regular",h="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(c=o="\u23A2",d="\u23A3",f="Size4-Regular",h="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",c=d="\u23A2",f="Size4-Regular",h="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(c=o="\u23A5",d="\u23A6",f="Size4-Regular",h="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",c=d="\u23A5",f="Size4-Regular",h="rceil",p=667):e==="("||e==="\\lparen"?(o="\u239B",c="\u239C",d="\u239D",f="Size4-Regular",h="lparen",p=875):e===")"||e==="\\rparen"?(o="\u239E",c="\u239F",d="\u23A0",f="Size4-Regular",h="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",d="\u23AD",c="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",d="\u23A9",c="\u23AA",f="Size4-Regular");var m=Hc(o,f,i),b=m.height+m.depth,g=Hc(c,f,i),$=g.height+g.depth,v=Hc(d,f,i),w=v.height+v.depth,x=0,T=1;if(l!==null){var k=Hc(l,f,i);x=k.height+k.depth,T=2}var A=b+w+x,E=Math.max(0,Math.ceil((n-A)/(T*$))),S=A+E*T*$,_=a.fontMetrics().axisHeight;s&&(_*=a.sizeMultiplier);var I=S/2-_,R=[];if(h.length>0){var P=S-b-w,O=Math.round(S*1e3),Z=kR(h,Math.round(P*1e3)),z=new ri(h,Z),V=Ce(p/1e3),q=Ce(O/1e3),B=new Ga([z],{width:V,height:q,viewBox:"0 0 "+p+" "+O}),J=fr([],[B],a);J.height=O/1e3,J.style.width=V,J.style.height=q,R.push({type:"elem",elem:J})}else{if(R.push(Db(d,f,i)),R.push(Zh),l===null){var j=S-b-w+2*i1;R.push(Lb(c,j,a))}else{var se=(S-b-w-x)/2+2*i1;R.push(Lb(c,se,a)),R.push(Zh),R.push(Db(l,f,i)),R.push(Zh),R.push(Lb(c,se,a))}R.push(Zh),R.push(Db(o,f,i))}var X=a.havingBaseStyle(rt.TEXT),H=Lt({positionType:"bottom",positionData:I,children:R});return y1(ye(["delimsizing","mult"],[H],X),rt.TEXT,a,r)},Ob=80,Nb=.08,Bb=function(e,n,s,a,i){var r=vR(e,a,s),o=new ri(e,r),l=new Ga([o],{width:"400em",height:Ce(n),viewBox:"0 0 400000 "+s,preserveAspectRatio:"xMinYMin slice"});return fr(["hide-tail"],[l],i)},fP=function(e,n){var s=n.havingBaseSizing(),a=eS("\\surd",e*s.sizeMultiplier,Jx,s),i=s.sizeMultiplier,r=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l,c,d,h;return a.type==="small"?(d=1e3+1e3*r+Ob,e<1?i=1:e<1.4&&(i=.7),l=(1+r+Nb)/i,c=(1+r)/i,o=Bb("sqrtMain",l,d,r,n),o.style.minWidth="0.853em",h=.833/i):a.type==="large"?(d=(1e3+Ob)*qc[a.size],c=(qc[a.size]+r)/i,l=(qc[a.size]+r+Nb)/i,o=Bb("sqrtSize"+a.size,l,d,r,n),o.style.minWidth="1.02em",h=1/i):(l=e+r+Nb,c=e+r,d=Math.floor(1e3*e+r)+Ob,o=Bb("sqrtTall",l,d,r,n),o.style.minWidth="0.742em",h=1.056),o.height=c,o.style.height=Ce(l),{span:o,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+r)*i}},Xx=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),mP=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),Zx=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),qc=[0,1.2,1.8,2.4,3],Qx=function(e,n,s,a,i){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Xx.has(e)||Zx.has(e))return Yx(e,n,!1,s,a,i);if(mP.has(e))return Kx(e,qc[n],!1,s,a,i);throw new xe("Illegal delimiter: '"+e+"'")},gP=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],bP=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"stack"}],Jx=[{type:"small",style:rt.SCRIPTSCRIPT},{type:"small",style:rt.SCRIPT},{type:"small",style:rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],$P=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";var n=e.type;throw new Error("Add support for delim type '"+n+"' here.")},eS=function(e,n,s,a){for(var i=Math.min(2,3-a.style.size),r=i;r<s.length;r++){var o=s[r];if(o.type==="stack")break;var l=Hc(e,$P(o),"math"),c=l.height+l.depth;if(o.type==="small"){var d=a.havingBaseStyle(o.style);c*=d.sizeMultiplier}if(c>n)return o}return s[s.length-1]},r1=function(e,n,s,a,i,r){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;Zx.has(e)?o=gP:Xx.has(e)?o=Jx:o=bP;var l=eS(e,n,o,a);return l.type==="small"?uP(e,l.style,s,a,i,r):l.type==="large"?Yx(e,l.size,s,a,i,r):Kx(e,n,s,a,i,r)},Fb=function(e,n,s,a,i,r){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=901,c=5/a.fontMetrics().ptPerEm,d=Math.max(n-o,s+o),h=Math.max(d/500*l,2*d-c);return r1(e,h,!0,a,i,r)},ix={"\\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}},yP=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function rx(t){return"isMiddle"in t}function bp(t,e){var n=mp(t);if(n&&yP.has(n.text))return n;throw n?new xe("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new xe("Invalid delimiter type '"+t.type+"'",t)}De({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:(t,e)=>{var n=bp(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:ix[t.funcName].size,mclass:ix[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?ye([t.mclass]):Qx(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Sa(t.delim,t.mode));var n=new ve("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var s=Ce(qc[t.size]);return n.setAttribute("minsize",s),n.setAttribute("maxsize",s),n}});function ox(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}De({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new xe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:bp(e[0],t).text,color:n}}});De({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=bp(e[0],t),s=t.parser;++s.leftrightDepth;var a=s.parseExpression(!1);--s.leftrightDepth,s.expect("\\right",!1);var i=ft(s.parseFunction(),"leftright-right");return{type:"leftright",mode:s.mode,body:a,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{ox(t);for(var n=qn(t.body,e,!0,["mopen","mclose"]),s=0,a=0,i=!1,r=0;r<n.length;r++){var o=n[r];rx(o)?i=!0:(s=Math.max(n[r].height,s),a=Math.max(n[r].depth,a))}s*=e.sizeMultiplier,a*=e.sizeMultiplier;var l;if(t.left==="."?l=Vc(e,["mopen"]):l=Fb(t.left,s,a,e,t.mode,["mopen"]),n.unshift(l),i)for(var c=1;c<n.length;c++){var d=n[c];if(rx(d)){var h=d.isMiddle;n[c]=Fb(h.delim,s,a,h.options,t.mode,[])}}var p;if(t.right===".")p=Vc(e,["mclose"]);else{var f=t.rightColor?e.withColor(t.rightColor):e;p=Fb(t.right,s,a,f,t.mode,["mclose"])}return n.push(p),ye(["minner"],n,e)},mathmlBuilder:(t,e)=>{ox(t);var n=oa(t.body,e);if(t.left!=="."){var s=new ve("mo",[Sa(t.left,t.mode)]);s.setAttribute("fence","true"),n.unshift(s)}if(t.right!=="."){var a=new ve("mo",[Sa(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),n.push(a)}return g1(n)}});De({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=bp(e[0],t);if(!t.parser.leftrightDepth)throw new xe("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;return t.delim==="."?n=Vc(e,[]):(n=Qx(t.delim,1,e,t.mode,[]),n.isMiddle={delim:t.delim,options:e}),n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?Sa("|","text"):Sa(t.delim,t.mode),s=new ve("mo",[n]);return s.setAttribute("fence","true"),s.setAttribute("lspace","0.05em"),s.setAttribute("rspace","0.05em"),s}});var $p=(t,e)=>{var n=ll(Ot(t.body,e),e),s=t.label.slice(1),a=e.sizeMultiplier,i,r,o=Pi(t.body);if(s==="sout")i=ye(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/a,r=-.5*e.fontMetrics().xHeight;else if(s==="phase"){var l=gn({number:.6,unit:"pt"},e),c=gn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();a=a/d.sizeMultiplier;var h=n.height+n.depth+l+c;n.style.paddingLeft=Ce(h/2+l);var p=Math.floor(1e3*h*a),f=$R(p),m=new Ga([new ri("phase",f)],{width:"400em",height:Ce(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=fr(["hide-tail"],[m],e),i.style.height=Ce(h),r=n.depth+l+c}else{/cancel/.test(s)?o||n.classes.push("cancel-pad"):s==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var b,g,$=0;/box/.test(s)?($=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),b=e.fontMetrics().fboxsep+(s==="colorbox"?0:$),g=b):s==="angl"?($=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),b=4*$,g=Math.max(0,.25-n.depth)):(b=o?.2:0,g=b),i=eP(n,s,b,g,e),/fbox|boxed|fcolorbox/.test(s)?(i.style.borderStyle="solid",i.style.borderWidth=Ce($)):s==="angl"&&$!==.049&&(i.style.borderTopWidth=Ce($),i.style.borderRightWidth=Ce($)),r=n.depth+g,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var v;if(t.backgroundColor)v=Lt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:r},{type:"elem",elem:n,shift:0}]});else{var w=/cancel|phase/.test(s)?["svg-align"]:[];v=Lt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:r,wrapperClasses:w}]})}return/cancel/.test(s)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(s)&&!o?ye(["mord","cancel-lap"],[v],e):ye(["mord"],[v],e)},yp=(t,e)=>{var n,s=new ve(t.label.includes("colorbox")?"mpadded":"menclose",[Kt(t.body,e)]);switch(t.label){case"\\cancel":s.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":s.setAttribute("notation","downdiagonalstrike");break;case"\\phase":s.setAttribute("notation","phasorangle");break;case"\\sout":s.setAttribute("notation","horizontalstrike");break;case"\\fbox":s.setAttribute("notation","box");break;case"\\angl":s.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,s.setAttribute("width","+"+2*n+"pt"),s.setAttribute("height","+"+2*n+"pt"),s.setAttribute("lspace",n+"pt"),s.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);s.setAttribute("style","border: "+Ce(a)+" solid "+t.borderColor)}break;case"\\xcancel":s.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&s.setAttribute("mathbackground",t.backgroundColor),s};De({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,n){var{parser:s,funcName:a}=t,i=ft(e[0],"color-token").color,r=e[1];return{type:"enclose",mode:s.mode,label:a,backgroundColor:i,body:r}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,n){var{parser:s,funcName:a}=t,i=ft(e[0],"color-token").color,r=ft(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:s.mode,label:a,backgroundColor:r,borderColor:i,body:o}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});De({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"enclose",mode:n.mode,label:s,body:a}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=e[0];return{type:"enclose",mode:n.mode,label:s,body:a}},htmlBuilder:$p,mathmlBuilder:yp});De({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var tS={};function oi(t){for(var{type:e,names:n,props:s,handler:a,htmlBuilder:i,mathmlBuilder:r}=t,o={type:e,numArgs:s.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<n.length;++l)tS[n[l]]=o;i&&(sp[e]=i),r&&(ap[e]=r)}var nS={};function N(t,e){nS[t]=e}var Fs=class t{constructor(e,n,s){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=s}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new t(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}},ia=class t{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new t(n,Fs.range(this,e))}};function lx(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var vp=t=>{var e=t.parser.settings;if(!e.displayMode)throw new xe("{"+t.envName+"} can be used only in display mode.")},vP=new Set(["gather","gather*"]);function v1(t){if(!t.includes("ed"))return!t.includes("*")}function gr(t,e,n){var{hskipBeforeAndAfter:s,addJot:a,cols:i,arraystretch:r,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:h,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!r){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)r=1;else if(r=parseFloat(f),!r||r<0)throw new xe("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var m=[],b=[m],g=[],$=[],v=l!=null?[]:void 0;function w(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){v&&(t.gullet.macros.get("\\df@tag")?(v.push(t.subparse([new ia("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),$.push(lx(t));;){var T=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup();var k={type:"ordgroup",mode:t.mode,body:T};n&&(k={type:"styling",mode:t.mode,style:n,resetFont:!0,body:[k]}),m.push(k);var A=t.fetch().text;if(A==="&"){if(h&&m.length===h){if(c||o)throw new xe("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(A==="\\end"){x(),m.length===1&&k.type==="styling"&&k.body.length===1&&k.body[0].type==="ordgroup"&&k.body[0].body.length===0&&(b.length>1||!d)&&b.pop(),$.length<b.length+1&&$.push([]);break}else if(A==="\\\\"){t.consume();var E=void 0;t.gullet.future().text!==" "&&(E=t.parseSizeGroup(!0)),g.push(E?E.value:null),x(),$.push(lx(t)),m=[],b.push(m),w()}else throw new xe("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:r,body:b,cols:i,rowGaps:g,hskipBeforeAndAfter:s,hLinesBeforeRow:$,colSeparationType:o,tags:v,leqno:p}}function w1(t){return t.slice(0,1)==="d"?"display":"text"}var li=function(e,n){var s,a,i=e.body.length,r=e.hLinesBeforeRow,o=0,l=new Array(i),c=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,p=5*h;if(e.colSeparationType&&e.colSeparationType==="small"){var f=n.havingStyle(rt.SCRIPT).sizeMultiplier;p=.2778*(f/n.sizeMultiplier)}var m=e.colSeparationType==="CD"?gn({number:3,unit:"ex"},n):12*h,b=3*h,g=e.arraystretch*m,$=.7*g,v=.3*g,w=0;function x(Te){for(var Qe=0;Qe<Te.length;++Qe)Qe>0&&(w+=.25),c.push({pos:w,isDashed:Te[Qe]})}for(x(r[0]),s=0;s<e.body.length;++s){var T=e.body[s],k=$,A=v;o<T.length&&(o=T.length);var E={cells:new Array(T.length),height:0,depth:0,pos:0};for(a=0;a<T.length;++a){var S=Ot(T[a],n);A<S.depth&&(A=S.depth),k<S.height&&(k=S.height),E.cells[a]=S}var _=e.rowGaps[s],I=0;_&&(I=gn(_,n),I>0&&(I+=v,A<I&&(A=I),I=0)),e.addJot&&s<e.body.length-1&&(A+=b),E.height=k,E.depth=A,w+=k,E.pos=w,w+=A+I,l[s]=E,x(r[s+1])}var R=w/2+n.fontMetrics().axisHeight,P=e.cols||[],O=[],Z,z,V=[];if(e.tags&&e.tags.some(Te=>Te))for(s=0;s<i;++s){var q=l[s],B=q.pos-R,J=e.tags[s],j=void 0;J===!0?j=ye(["eqn-num"],[],n):J===!1?j=ye([],[],n):j=ye([],qn(J,n,!0),n),j.depth=q.depth,j.height=q.height,V.push({type:"elem",elem:j,shift:B})}for(a=0,z=0;a<o||z<P.length;++a,++z){for(var se,X=P[z],H=!0;((oe=X)==null?void 0:oe.type)==="separator";){var oe;if(H||(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(n.fontMetrics().doubleRuleSep),O.push(Z)),X.separator==="|"||X.separator===":"){var ce=X.separator==="|"?"solid":"dashed",le=ye(["vertical-separator"],[],n);le.style.height=Ce(w),le.style.borderRightWidth=Ce(d),le.style.borderRightStyle=ce,le.style.margin="0 "+Ce(-d/2);var ae=w-R;ae&&(le.style.verticalAlign=Ce(-ae)),O.push(le)}else throw new xe("Invalid separator type: "+X.separator);z++,X=P[z],H=!1}if(!(a>=o)){var de=void 0;if(a>0||e.hskipBeforeAndAfter){var he,qe;de=(he=(qe=X)==null?void 0:qe.pregap)!=null?he:p,de!==0&&(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(de),O.push(Z))}var St=[];for(s=0;s<i;++s){var bt=l[s],Ue=bt.cells[a];if(Ue){var sn=bt.pos-R;Ue.depth=bt.depth,Ue.height=bt.height,St.push({type:"elem",elem:Ue,shift:sn})}}var We=Lt({positionType:"individualShift",children:St}),Nt=ye(["col-align-"+(((se=X)==null?void 0:se.align)||"c")],[We]);if(O.push(Nt),a<o-1||e.hskipBeforeAndAfter){var Bt,Ft;de=(Bt=(Ft=X)==null?void 0:Ft.postgap)!=null?Bt:p,de!==0&&(Z=ye(["arraycolsep"],[]),Z.style.width=Ce(de),O.push(Z))}}}var zt=ye(["mtable"],O);if(c.length>0){for(var At=ol("hline",n,d),$e=ol("hdashline",n,d),Ne=[{type:"elem",elem:zt,shift:0}];c.length>0;){var Re=c.pop(),hn=Re.pos-R;Re.isDashed?Ne.push({type:"elem",elem:$e,shift:hn}):Ne.push({type:"elem",elem:At,shift:hn})}zt=Lt({positionType:"individualShift",children:Ne})}if(V.length===0)return ye(["mord"],[zt],n);var gt=Lt({positionType:"individualShift",children:V}),It=ye(["tag"],[gt],n);return Li([zt,It])},wP={c:"center ",l:"left ",r:"right "},ci=function(e,n){for(var s=[],a=new ve("mtd",[],["mtr-glue"]),i=new ve("mtd",[],["mml-eqn-num"]),r=0;r<e.body.length;r++){for(var o=e.body[r],l=[],c=0;c<o.length;c++)l.push(new ve("mtd",[Kt(o[c],n)]));e.tags&&e.tags[r]&&(l.unshift(a),l.push(a),e.leqno?l.unshift(i):l.push(i)),s.push(new ve("mtr",l))}var d=new ve("mtable",s),h=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",Ce(h));var p="",f="";if(e.cols&&e.cols.length>0){var m=e.cols,b="",g=!1,$=0,v=m.length;m[0].type==="separator"&&(p+="top ",$=1),m[m.length-1].type==="separator"&&(p+="bottom ",v-=1);for(var w=$;w<v;w++){var x=m[w];x.type==="align"?(f+=wP[x.align],g&&(b+="none "),g=!0):x.type==="separator"&&g&&(b+=x.separator==="|"?"solid ":"dashed ",g=!1)}d.setAttribute("columnalign",f.trim()),/[sd]/.test(b)&&d.setAttribute("columnlines",b.trim())}if(e.colSeparationType==="align"){for(var T=e.cols||[],k="",A=1;A<T.length;A++)k+=A%2?"0em ":"1em ";d.setAttribute("columnspacing",k.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var E="",S=e.hLinesBeforeRow;p+=S[0].length>0?"left ":"",p+=S[S.length-1].length>0?"right ":"";for(var _=1;_<S.length-1;_++)E+=S[_].length===0?"none ":S[_][0]?"dashed ":"solid ";return/[sd]/.test(E)&&d.setAttribute("rowlines",E.trim()),p!==""&&(d=new ve("menclose",[d]),d.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(d=new ve("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},sS=function(e,n){e.envName.includes("ed")||vp(e);var s=[],a=e.envName.includes("at")?"alignat":"align",i=e.envName==="split",r=gr(e.parser,{cols:s,addJot:!0,autoTag:i?void 0:v1(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var d="",h=0;h<n[0].body.length;h++){var p=ft(n[0].body[h],"textord");d+=p.text}o=Number(d),l=o*2}var f=!l;r.body.forEach(function($){for(var v=1;v<$.length;v+=2){var w=ft($[v],"styling"),x=ft(w.body[0],"ordgroup");x.body.unshift(c)}if(f)l<$.length&&(l=$.length);else{var T=$.length/2;if(o<T)throw new xe("Too many math in a row: "+("expected "+o+", but got "+T),$[0])}});for(var m=0;m<l;++m){var b="r",g=0;m%2===1?b="l":m>0&&f&&(g=1),s[m]={type:"align",align:b,pregap:g,postgap:0}}return r.colSeparationType=f?"align":"alignat",r};oi({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=mp(e[0]),s=n?[e[0]]:ft(e[0],"ordgroup").body,a=s.map(function(r){var o=fp(r),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new xe("Unknown column alignment: "+l,r)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return gr(t.parser,i,w1(t.envName))},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",s={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,!"lcr".includes(n))throw new xe("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),s.cols=[{type:"align",align:n}]}}var i=gr(t.parser,s,w1(t.envName)),r=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(r).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=gr(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=mp(e[0]),s=n?[e[0]]:ft(e[0],"ordgroup").body,a=s.map(function(o){var l=fp(o),c=l.text;if("lc".includes(c))return{type:"align",align:c};throw new xe("Unknown column alignment: "+c,o)});if(a.length>1)throw new xe("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},r=gr(t.parser,i,"script");if(r.body.length>0&&r.body[0].length>1)throw new xe("{subarray} can contain only one column");return r},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=gr(t.parser,e,w1(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:sS,htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){vP.has(t.envName)&&vp(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:v1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return gr(t.parser,e,"display")},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:sS,htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){vp(t);var e={autoTag:v1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return gr(t.parser,e,"display")},htmlBuilder:li,mathmlBuilder:ci});oi({type:"array",names:["CD"],props:{numArgs:0},handler(t){return vp(t),lP(t.parser)},htmlBuilder:li,mathmlBuilder:ci});N("\\nonumber","\\gdef\\@eqnsw{0}");N("\\notag","\\nonumber");De({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new xe(t.funcName+" valid only within array environment")}});var cx=tS;De({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];if(a.type!=="ordgroup")throw new xe("Invalid environment name",a);for(var i="",r=0;r<a.body.length;++r)i+=ft(a.body[r],"textord").text;if(s==="\\begin"){if(!cx.hasOwnProperty(i))throw new xe("No such environment: "+i,a);var o=cx[i],{args:l,optArgs:c}=n.parseArguments("\\begin{"+i+"}",o),d={mode:n.mode,envName:i,parser:n},h=o.handler(d,l,c);n.expect("\\end",!1);var p=n.nextToken,f=ft(n.parseFunction(),"environment");if(f.name!==i)throw new xe("Mismatch: \\begin{"+i+"} matched by \\end{"+f.name+"}",p);return h}return{type:"environment",mode:n.mode,name:i,nameGroup:a}}});var aS=(t,e)=>{var n=t.font,s=e.withFont(n);return Ot(t.body,s)},iS=(t,e)=>{var n=t.font,s=e.withFont(n);return Kt(t.body,s)},ux={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};De({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=ip(e[0]),i=s;return i in ux&&(i=ux[i]),{type:"font",mode:n.mode,font:i.slice(1),body:a}},htmlBuilder:aS,mathmlBuilder:iS});De({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"mclass",mode:n.mode,mclass:gp(s),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:s}],isCharacterBox:Pi(s)}}});De({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s,breakOnTokenText:a}=t,{mode:i}=n,r=n.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+s.slice(1),body:{type:"ordgroup",mode:n.mode,body:r}}},htmlBuilder:aS,mathmlBuilder:iS});var kP=(t,e)=>{var n=e.style,s=n.fracNum(),a=n.fracDen(),i;i=e.havingStyle(s);var r=Ot(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;r.height=r.height<o?o:r.height,r.depth=r.depth<l?l:r.depth}i=e.havingStyle(a);var c=Ot(t.denom,i,e),d,h,p;t.hasBarLine?(t.barSize?(h=gn(t.barSize,e),d=ol("frac-line",e,h)):d=ol("frac-line",e),h=d.height,p=d.height):(d=null,h=0,p=e.fontMetrics().defaultRuleThickness);var f,m,b;n.size===rt.DISPLAY.size?(f=e.fontMetrics().num1,h>0?m=3*p:m=7*p,b=e.fontMetrics().denom1):(h>0?(f=e.fontMetrics().num2,m=p):(f=e.fontMetrics().num3,m=3*p),b=e.fontMetrics().denom2);var g;if(d){var v=e.fontMetrics().axisHeight;f-r.depth-(v+.5*h)<m&&(f+=m-(f-r.depth-(v+.5*h))),v-.5*h-(c.height-b)<m&&(b+=m-(v-.5*h-(c.height-b)));var w=-(v-.5*h);g=Lt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:b},{type:"elem",elem:d,shift:w},{type:"elem",elem:r,shift:-f}]})}else{var $=f-r.depth-(c.height-b);$<m&&(f+=.5*(m-$),b+=.5*(m-$)),g=Lt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:b},{type:"elem",elem:r,shift:-f}]})}i=e.havingStyle(n),g.height*=i.sizeMultiplier/e.sizeMultiplier,g.depth*=i.sizeMultiplier/e.sizeMultiplier;var x;n.size===rt.DISPLAY.size?x=e.fontMetrics().delim1:n.size===rt.SCRIPTSCRIPT.size?x=e.havingStyle(rt.SCRIPT).fontMetrics().delim2:x=e.fontMetrics().delim2;var T,k;return t.leftDelim==null?T=Vc(e,["mopen"]):T=r1(t.leftDelim,x,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?k=ye([]):t.rightDelim==null?k=Vc(e,["mclose"]):k=r1(t.rightDelim,x,!0,e.havingStyle(n),t.mode,["mclose"]),ye(["mord"].concat(i.sizingClasses(e)),[T,ye(["mfrac"],[g]),k],e)},xP=(t,e)=>{var n=new ve("mfrac",[Kt(t.numer,e),Kt(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var s=gn(t.barSize,e);n.setAttribute("linethickness",Ce(s))}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var i=new ve("mo",[new Sn(t.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(n),t.rightDelim!=null){var r=new ve("mo",[new Sn(t.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),a.push(r)}return g1(a)}return n},rS=(t,e)=>{if(!e)return t;var n={type:"styling",mode:t.mode,style:e,body:[t]};return n};De({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0],i=e[1],r,o=null,l=null;switch(s){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,o="(",l=")";break;case"\\\\bracefrac":r=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c=s==="\\cfrac",d=null;return c||s.startsWith("\\d")?d="display":s.startsWith("\\t")&&(d="text"),rS({type:"genfrac",mode:n.mode,numer:a,denom:i,continued:c,hasBarLine:r,leftDelim:o,rightDelim:l,barSize:null},d)},htmlBuilder:kP,mathmlBuilder:xP});De({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:s}=t,a;switch(n){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:s}}});var dx=["display","text","script","scriptscript"],hx=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};De({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,s=e[4],a=e[5],i=ip(e[0]),r=i.type==="atom"&&i.family==="open"?hx(i.text):null,o=ip(e[1]),l=o.type==="atom"&&o.family==="close"?hx(o.text):null,c=ft(e[2],"size"),d,h=null;c.isBlank?d=!0:(h=c.value,d=h.number>0);var p=null,f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=ft(f.body[0],"textord");p=dx[Number(m.text)]}}else f=ft(f,"textord"),p=dx[Number(f.text)];return rS({type:"genfrac",mode:n.mode,numer:s,denom:a,continued:!1,hasBarLine:d,barSize:h,leftDelim:r,rightDelim:l},p)}});De({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:s,token:a}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:ft(e[0],"size").value,token:a}}});De({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0],i=ft(e[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var r=e[2],o=i.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:r,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var oS=(t,e)=>{var n=e.style,s,a;t.type==="supsub"?(s=t.sup?Ot(t.sup,e.havingStyle(n.sup()),e):Ot(t.sub,e.havingStyle(n.sub()),e),a=ft(t.base,"horizBrace")):a=ft(t,"horizBrace");var i=Ot(a.base,e.havingBaseStyle(rt.DISPLAY)),r=pp(a,e),o;if(a.isOver?o=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:r,wrapperClasses:["svg-align"]}]}):o=Lt({positionType:"bottom",positionData:i.depth+.1+r.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),s){var l=ye(["minner",a.isOver?"mover":"munder"],[o],e);a.isOver?o=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:s}]}):o=Lt({positionType:"bottom",positionData:l.depth+.2+s.height+s.depth,children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:l}]})}return ye(["minner",a.isOver?"mover":"munder"],[o],e)},SP=(t,e)=>{var n=hp(t.label);return new ve(t.isOver?"mover":"munder",[Kt(t.base,e),n])};De({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:s}=t;return{type:"horizBrace",mode:n.mode,label:s,isOver:s.includes("\\over"),base:e[0]}},htmlBuilder:oS,mathmlBuilder:SP});De({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[1],a=ft(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Pn(s)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=qn(t.body,e,!1);return NR(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=mr(t.body,e);return n instanceof ve||(n=new ve("mrow",[n])),n.setAttribute("href",t.href),n}});De({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=ft(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:s}))return n.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<s.length;i++){var r=s[i];r==="~"&&(r="\\textasciitilde"),a.push({type:"textord",mode:"text",text:r})}var o={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:s,body:Pn(o)}}});De({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:Pn(e[0])}},htmlBuilder(t,e){var n=qn(t.body,e.withFont(""),!1);return Li(n)},mathmlBuilder(t,e){return new ve("mrow",oa(t.body,e.withFont("")))}});De({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s,token:a}=t,i=ft(e[0],"raw").string,r=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(s){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var c=i.split(","),d=0;d<c.length;d++){var h=c[d],p=h.indexOf("=");if(p<0)throw new xe("\\htmlData key/value '"+h+"' missing equals sign");var f=h.slice(0,p),m=h.slice(p+1);l["data-"+f.trim()]=m}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(o)?{type:"html",mode:n.mode,attributes:l,body:Pn(r)}:n.formatUnsupportedCmd(s)},htmlBuilder:(t,e)=>{var n=qn(t.body,e,!1),s=["enclosing"];t.attributes.class&&s.push(...t.attributes.class.trim().split(/\s+/));var a=ye(s,n,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&a.setAttribute(i,t.attributes[i]);return a},mathmlBuilder:(t,e)=>mr(t.body,e)});De({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:Pn(e[0]),mathml:Pn(e[1])}},htmlBuilder:(t,e)=>{var n=qn(t.html,e,!1);return Li(n)},mathmlBuilder:(t,e)=>mr(t.mathml,e)});var zb=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new xe("Invalid size: '"+e+"' in \\includegraphics");var s={number:+(n[1]+n[2]),unit:n[3]};if(!Ax(s))throw new xe("Invalid unit: '"+s.unit+"' in \\includegraphics.");return s};De({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:s}=t,a={number:0,unit:"em"},i={number:.9,unit:"em"},r={number:0,unit:"em"},o="";if(n[0])for(var l=ft(n[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var h=c[d].split("=");if(h.length===2){var p=h[1].trim();switch(h[0].trim()){case"alt":o=p;break;case"width":a=zb(p);break;case"height":i=zb(p);break;case"totalheight":r=zb(p);break;default:throw new xe("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=ft(e[0],"url").url;return o===""&&(o=f,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),s.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:s.mode,alt:o,width:a,height:i,totalheight:r,src:f}:s.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=gn(t.height,e),s=0;t.totalheight.number>0&&(s=gn(t.totalheight,e)-n);var a=0;t.width.number>0&&(a=gn(t.width,e));var i={height:Ce(n+s)};a>0&&(i.width=Ce(a)),s>0&&(i.verticalAlign=Ce(-s));var r=new Vb(t.src,t.alt,i);return r.height=n,r.depth=s,r},mathmlBuilder:(t,e)=>{var n=new ve("mglyph",[]);n.setAttribute("alt",t.alt);var s=gn(t.height,e),a=0;if(t.totalheight.number>0&&(a=gn(t.totalheight,e)-s,n.setAttribute("valign",Ce(-a))),n.setAttribute("height",Ce(s+a)),t.width.number>0){var i=gn(t.width,e);n.setAttribute("width",Ce(i))}return n.setAttribute("src",t.src),n}});De({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t,a=ft(e[0],"size");if(n.settings.strict){var i=s[1]==="m",r=a.value.unit==="mu";i?(r||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" supports only mu units, "+("not "+a.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" works only in math mode")):r&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+s+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder(t,e){return Ix(t.dimension,e)},mathmlBuilder(t,e){var n=gn(t.dimension,e);return new rp(n)}});De({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"lap",mode:n.mode,alignment:s.slice(5),body:a}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=ye([],[Ot(t.body,e)]),n=ye(["inner"],[n],e)):n=ye(["inner"],[Ot(t.body,e)]);var s=ye(["fix"],[]),a=ye([t.alignment],[n,s],e),i=ye(["strut"]);return i.style.height=Ce(a.height+a.depth),a.depth&&(i.style.verticalAlign=Ce(-a.depth)),a.children.unshift(i),a=ye(["thinbox"],[a],e),ye(["mord","vbox"],[a],e)},mathmlBuilder:(t,e)=>{var n=new ve("mpadded",[Kt(t.body,e)]);if(t.alignment!=="rlap"){var s=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",s+"width")}return n.setAttribute("width","0px"),n}});De({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:s}=t,a=s.mode;s.switchMode("math");var i=n==="\\("?"\\)":"$",r=s.parseExpression(!1,i);return s.expect(i),s.switchMode(a),{type:"styling",mode:s.mode,style:"text",resetFont:!0,body:r}}});De({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new xe("Mismatched "+t.funcName)}});var px=(t,e)=>{switch(e.style.size){case rt.DISPLAY.size:return t.display;case rt.TEXT.size:return t.text;case rt.SCRIPT.size:return t.script;case rt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};De({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:Pn(e[0]),text:Pn(e[1]),script:Pn(e[2]),scriptscript:Pn(e[3])}},htmlBuilder:(t,e)=>{var n=px(t,e),s=qn(n,e,!1);return Li(s)},mathmlBuilder:(t,e)=>{var n=px(t,e);return mr(n,e)}});var lS=(t,e,n,s,a,i,r)=>{t=ye([],[t]);var o=n&&Pi(n),l,c;if(e){var d=Ot(e,s.havingStyle(a.sup()),s);c={elem:d,kern:Math.max(s.fontMetrics().bigOpSpacing1,s.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=Ot(n,s.havingStyle(a.sub()),s);l={elem:h,kern:Math.max(s.fontMetrics().bigOpSpacing2,s.fontMetrics().bigOpSpacing4-h.height)}}var p;if(c&&l){var f=s.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+r;p=Lt({positionType:"bottom",positionData:f,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ce(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]})}else if(l){var m=t.height-r;p=Lt({positionType:"top",positionData:m,children:[{type:"kern",size:s.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]})}else if(c){var b=t.depth+r;p=Lt({positionType:"bottom",positionData:b,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ce(i)},{type:"kern",size:s.fontMetrics().bigOpSpacing5}]})}else return t;var g=[p];if(l&&i!==0&&!o){var $=ye(["mspace"],[],s);$.style.marginRight=Ce(i),g.unshift($)}return ye(["mop","op-limits"],g,s)},cS=new Set(["\\smallint"]),ul=(t,e)=>{var n,s,a=!1,i;t.type==="supsub"?(n=t.sup,s=t.sub,i=ft(t.base,"op"),a=!0):i=ft(t,"op");var r=e.style,o=!1;r.size===rt.DISPLAY.size&&i.symbol&&!cS.has(i.name)&&(o=!0);var l,c;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",h="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(h=i.name.slice(1),i.name=h==="oiint"?"\\iint":"\\iiint"),l=Ss(i.name,d,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),c=l.italic,h.length>0){var p=Px(h+"Size"+(o?"2":"1"),e);l=Lt({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+h,l.classes.unshift("mop"),l.italic=c}}else if(i.body){var f=qn(i.body,e,!0);f.length===1&&f[0]instanceof Cs?(l=f[0],l.classes[0]="mop"):l=ye(["mop"],f,e)}else{for(var m=[],b=1;b<i.name.length;b++)m.push(f1(i.name[b],i.mode,e));l=ye(["mop"],m,e)}var g=0,$=0;if((l instanceof Cs||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var v;g=(l.height-l.depth)/2-e.fontMetrics().axisHeight,$=(v=l.italic)!=null?v:0}return a?lS(l,n,s,e,r,$,g):(g&&(l.style.position="relative",l.style.top=Ce(g)),l)},Kc=(t,e)=>{var n;if(t.symbol)n=new ve("mo",[Sa(t.name,t.mode)]),cS.has(t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new ve("mo",oa(t.body,e));else{n=new ve("mi",[new Sn(t.name.slice(1))]);var s=new ve("mo",[Sa("\u2061","text")]);t.parentIsSupSub?n=new ve("mrow",[n,s]):n=Ox([n,s])}return n},AP={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};De({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=s;return a.length===1&&(a=AP[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Pn(s)}},htmlBuilder:ul,mathmlBuilder:Kc});var CP={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};De({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"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:Kc});De({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:n}=t,s=n;return s.length===1&&(s=CP[s]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ul,mathmlBuilder:Kc});var uS=(t,e)=>{var n,s,a=!1,i;t.type==="supsub"?(n=t.sup,s=t.sub,i=ft(t.base,"operatorname"),a=!0):i=ft(t,"operatorname");var r;if(i.body.length>0){for(var o=i.body.map(h=>{var p="text"in h?h.text:void 0;return typeof p=="string"?{type:"textord",mode:h.mode,text:p}:h}),l=qn(o,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof Cs&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}r=ye(["mop"],l,e)}else r=ye(["mop"],[],e);return a?lS(r,n,s,e,e.style,0,0):r},TP=(t,e)=>{for(var n=oa(t.body,e.withFont("mathrm")),s=!0,a=0;a<n.length;a++){var i=n[a];if(!(i instanceof rp))if(i instanceof ve)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var r=i.children[0];i.children.length===1&&r instanceof Sn?r.text=r.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):s=!1;break}default:s=!1}else s=!1}if(s){var o=n.map(d=>d.toText()).join("");n=[new Sn(o)]}var l=new ve("mi",n);l.setAttribute("mathvariant","normal");var c=new ve("mo",[Sa("\u2061","text")]);return t.parentIsSupSub?new ve("mrow",[l,c]):Ox([l,c])};De({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:s}=t,a=e[0];return{type:"operatorname",mode:n.mode,body:Pn(a),alwaysHandleSupSub:s==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:uS,mathmlBuilder:TP});N("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");no({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Li(qn(t.body,e,!1)):ye(["mord"],qn(t.body,e,!0),e)},mathmlBuilder(t,e){return mr(t.body,e,!0)}});De({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,s=e[0];return{type:"overline",mode:n.mode,body:s}},htmlBuilder(t,e){var n=Ot(t.body,e.havingCrampedStyle()),s=ol("overline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:s},{type:"kern",size:a}]});return ye(["mord","overline"],[i],e)},mathmlBuilder(t,e){var n=new ve("mo",[new Sn("\u203E")]);n.setAttribute("stretchy","true");var s=new ve("mover",[Kt(t.body,e),n]);return s.setAttribute("accent","true"),s}});De({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"phantom",mode:n.mode,body:Pn(s)}},htmlBuilder:(t,e)=>{var n=qn(t.body,e.withPhantom(),!1);return Li(n)},mathmlBuilder:(t,e)=>{var n=oa(t.body,e);return new ve("mphantom",n)}});N("\\hphantom","\\smash{\\phantom{#1}}");De({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,s=e[0];return{type:"vphantom",mode:n.mode,body:s}},htmlBuilder:(t,e)=>{var n=ye(["inner"],[Ot(t.body,e.withPhantom())]),s=ye(["fix"],[]);return ye(["mord","rlap"],[n,s],e)},mathmlBuilder:(t,e)=>{var n=oa(Pn(t.body),e),s=new ve("mphantom",n),a=new ve("mpadded",[s]);return a.setAttribute("width","0px"),a}});De({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,s=ft(e[0],"size").value,a=e[1];return{type:"raisebox",mode:n.mode,dy:s,body:a}},htmlBuilder(t,e){var n=Ot(t.body,e),s=gn(t.dy,e);return Lt({positionType:"shift",positionData:-s,children:[{type:"elem",elem:n}]})},mathmlBuilder(t,e){var n=new ve("mpadded",[Kt(t.body,e)]),s=t.dy.number+t.dy.unit;return n.setAttribute("voffset",s),n}});De({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});De({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:s}=t,a=n[0],i=ft(e[0],"size"),r=ft(e[1],"size");return{type:"rule",mode:s.mode,shift:a&&ft(a,"size").value,width:i.value,height:r.value}},htmlBuilder(t,e){var n=ye(["mord","rule"],[],e),s=gn(t.width,e),a=gn(t.height,e),i=t.shift?gn(t.shift,e):0;return n.style.borderRightWidth=Ce(s),n.style.borderTopWidth=Ce(a),n.style.bottom=Ce(i),n.width=s,n.height=a+i,n.depth=-i,n.maxFontSize=a*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=gn(t.width,e),s=gn(t.height,e),a=t.shift?gn(t.shift,e):0,i=e.color&&e.getColor()||"black",r=new ve("mspace");r.setAttribute("mathbackground",i),r.setAttribute("width",Ce(n)),r.setAttribute("height",Ce(s));var o=new ve("mpadded",[r]);return a>=0?o.setAttribute("height",Ce(a)):(o.setAttribute("height",Ce(a)),o.setAttribute("depth",Ce(-a))),o.setAttribute("voffset",Ce(a)),o}});function dS(t,e,n){for(var s=qn(t,e,!1),a=e.sizeMultiplier/n.sizeMultiplier,i=0;i<s.length;i++){var r=s[i].classes.indexOf("sizing");r<0?Array.prototype.push.apply(s[i].classes,e.sizingClasses(n)):s[i].classes[r+1]==="reset-size"+e.size&&(s[i].classes[r+1]="reset-size"+n.size),s[i].height*=a,s[i].depth*=a}return Li(s)}var fx=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],EP=(t,e)=>{var n=e.havingSize(t.size);return dS(t.body,n,e)};De({type:"sizing",names:fx,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:s,parser:a}=t,i=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:fx.indexOf(s)+1,body:i}},htmlBuilder:EP,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),s=oa(t.body,n),a=new ve("mstyle",s);return a.setAttribute("mathsize",Ce(n.sizeMultiplier)),a}});De({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:s}=t,a=!1,i=!1,r=n[0]&&ft(n[0],"ordgroup");if(r)for(var o,l=0;l<r.body.length;++l){var c=r.body[l];if(o=fp(c).text,o==="t")a=!0;else if(o==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var d=e[0];return{type:"smash",mode:s.mode,body:d,smashHeight:a,smashDepth:i}},htmlBuilder:(t,e)=>{var n=ye([],[Ot(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0),t.smashDepth&&(n.depth=0),t.smashHeight&&t.smashDepth)return ye(["mord","smash"],[n],e);if(n.children)for(var s=0;s<n.children.length;s++)t.smashHeight&&(n.children[s].height=0),t.smashDepth&&(n.children[s].depth=0);var a=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ye(["mord"],[a],e)},mathmlBuilder:(t,e)=>{var n=new ve("mpadded",[Kt(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});De({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:s}=t,a=n[0],i=e[0];return{type:"sqrt",mode:s.mode,body:i,index:a}},htmlBuilder(t,e){var n=Ot(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=ll(n,e);var s=e.fontMetrics(),a=s.defaultRuleThickness,i=a;e.style.id<rt.TEXT.id&&(i=e.fontMetrics().xHeight);var r=a+i/4,o=n.height+n.depth+r+a,{span:l,ruleWidth:c,advanceWidth:d}=fP(o,e),h=l.height-c;h>n.height+n.depth+r&&(r=(r+h-n.height-n.depth)/2);var p=l.height-n.height-r-c;n.style.paddingLeft=Ce(d);var f=Lt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]});if(t.index){var m=e.havingStyle(rt.SCRIPTSCRIPT),b=Ot(t.index,m,e),g=.6*(f.height-f.depth),$=Lt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:b}]}),v=ye(["root"],[$]);return ye(["mord","sqrt"],[v,f],e)}else return ye(["mord","sqrt"],[f],e)},mathmlBuilder(t,e){var{body:n,index:s}=t;return s?new ve("mroot",[Kt(n,e),Kt(s,e)]):new ve("msqrt",[Kt(n,e)])}});var o1={display:rt.DISPLAY,text:rt.TEXT,script:rt.SCRIPT,scriptscript:rt.SCRIPTSCRIPT};function MP(t){return t in o1}De({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:s,parser:a}=t,i=a.parseExpression(!0,n),r=s.slice(1,s.length-5);if(!MP(r))throw new Error("Unknown style: "+r);return{type:"styling",mode:a.mode,style:r,body:i}},htmlBuilder(t,e){var n=o1[t.style],s=e.havingStyle(n);return t.resetFont&&(s=s.withFont("")),dS(t.body,s,e)},mathmlBuilder(t,e){var n=o1[t.style],s=e.havingStyle(n);t.resetFont&&(s=s.withFont(""));var a=oa(t.body,s),i=new ve("mstyle",a),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=r[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var _P=function(e,n){var s=e.base;if(s)if(s.type==="op"){var a=s.limits&&(n.style.size===rt.DISPLAY.size||s.alwaysHandleSupSub);return a?ul:null}else if(s.type==="operatorname"){var i=s.alwaysHandleSupSub&&(n.style.size===rt.DISPLAY.size||s.limits);return i?uS:null}else{if(s.type==="accent")return Pi(s.base)?$1:null;if(s.type==="horizBrace"){var r=!e.sub;return r===s.isOver?oS:null}else return null}else return null};no({type:"supsub",htmlBuilder(t,e){var n=_P(t,e);if(n)return n(t,e);var{base:s,sup:a,sub:i}=t,r=Ot(s,e),o,l,c=e.fontMetrics(),d=0,h=0,p=s&&Pi(s);if(a){var f=e.havingStyle(e.style.sup());o=Ot(a,f,e),p||(d=r.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(i){var m=e.havingStyle(e.style.sub());l=Ot(i,m,e),p||(h=r.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var b;e.style===rt.DISPLAY?b=c.sup1:e.style.cramped?b=c.sup3:b=c.sup2;var g=e.sizeMultiplier,$=Ce(.5/c.ptPerEm/g),v=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");if(r instanceof Cs||w){var x;v=Ce(-((x=r.italic)!=null?x:0))}}var T;if(o&&l){d=Math.max(d,b,o.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var k=c.defaultRuleThickness,A=4*k;if(d-o.depth-(l.height-h)<A){h=A-(d-o.depth)+l.height;var E=.8*c.xHeight-(d-o.depth);E>0&&(d+=E,h-=E)}var S=[{type:"elem",elem:l,shift:h,marginRight:$,marginLeft:v},{type:"elem",elem:o,shift:-d,marginRight:$}];T=Lt({positionType:"individualShift",children:S})}else if(l){h=Math.max(h,c.sub1,l.height-.8*c.xHeight);var _=[{type:"elem",elem:l,marginLeft:v,marginRight:$}];T=Lt({positionType:"shift",positionData:h,children:_})}else if(o)d=Math.max(d,b,o.depth+.25*c.xHeight),T=Lt({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:$}]});else throw new Error("supsub must have either sup or sub.");var I=n1(r,"right")||"mord";return ye([I],[r,ye(["msupsub"],[T])],e)},mathmlBuilder(t,e){var n=!1,s,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===t.base.isOver&&(n=!0,s=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[Kt(t.base,e)];t.sub&&i.push(Kt(t.sub,e)),t.sup&&i.push(Kt(t.sup,e));var r;if(n)r=s?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===rt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===rt.DISPLAY||c.limits)?r="munderover":r="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===rt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===rt.DISPLAY)?r="munder":r="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===rt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===rt.DISPLAY)?r="mover":r="msup"}return new ve(r,i)}});no({type:"atom",htmlBuilder(t,e){return f1(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new ve("mo",[Sa(t.text,t.mode)]);if(t.family==="bin"){var s=b1(t,e);s==="bold-italic"&&n.setAttribute("mathvariant",s)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var hS={mi:"italic",mn:"normal",mtext:"normal"};no({type:"mathord",htmlBuilder(t,e){return dp(t,e,"mathord")},mathmlBuilder(t,e){var n=new ve("mi",[Sa(t.text,t.mode,e)]),s=b1(t,e)||"italic";return s!==hS[n.type]&&n.setAttribute("mathvariant",s),n}});no({type:"textord",htmlBuilder(t,e){return dp(t,e,"textord")},mathmlBuilder(t,e){var n=Sa(t.text,t.mode,e),s=b1(t,e)||"normal",a;return t.mode==="text"?a=new ve("mtext",[n]):/[0-9]/.test(t.text)?a=new ve("mn",[n]):t.text==="\\prime"?a=new ve("mo",[n]):a=new ve("mi",[n]),s!==hS[a.type]&&a.setAttribute("mathvariant",s),a}});var Ub={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hb={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};no({type:"spacing",htmlBuilder(t,e){if(Hb.hasOwnProperty(t.text)){var n=Hb[t.text].className||"";if(t.mode==="text"){var s=dp(t,e,"textord");return s.classes.push(n),s}else return ye(["mspace",n],[f1(t.text,t.mode,e)],e)}else{if(Ub.hasOwnProperty(t.text))return ye(["mspace",Ub[t.text]],[],e);throw new xe('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(Hb.hasOwnProperty(t.text))n=new ve("mtext",[new Sn("\xA0")]);else{if(Ub.hasOwnProperty(t.text))return new ve("mspace");throw new xe('Unknown type of space "'+t.text+'"')}return n}});var mx=()=>{var t=new ve("mtd",[]);return t.setAttribute("width","50%"),t};no({type:"tag",mathmlBuilder(t,e){var n=new ve("mtable",[new ve("mtr",[mx(),new ve("mtd",[mr(t.body,e)]),mx(),new ve("mtd",[mr(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var gx={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},bx={"\\textbf":"textbf","\\textmd":"textmd"},IP={"\\textit":"textit","\\textup":"textup"},$x=(t,e)=>{var n=t.font;if(n){if(gx[n])return e.withTextFontFamily(gx[n]);if(bx[n])return e.withTextFontWeight(bx[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(IP[n])};De({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:s}=t,a=e[0];return{type:"text",mode:n.mode,body:Pn(a),font:s}},htmlBuilder(t,e){var n=$x(t,e),s=qn(t.body,n,!0);return ye(["mord","text"],s,n)},mathmlBuilder(t,e){var n=$x(t,e);return mr(t.body,n)}});De({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ot(t.body,e),s=ol("underline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Lt({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:s},{type:"kern",size:3*a},{type:"elem",elem:n}]});return ye(["mord","underline"],[i],e)},mathmlBuilder(t,e){var n=new ve("mo",[new Sn("\u203E")]);n.setAttribute("stretchy","true");var s=new ve("munder",[Kt(t.body,e),n]);return s.setAttribute("accentunder","true"),s}});De({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ot(t.body,e),s=e.fontMetrics().axisHeight,a=.5*(n.height-s-(n.depth+s));return Lt({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]})},mathmlBuilder(t,e){var n=new ve("mpadded",[Kt(t.body,e)],["vcenter"]);return new ve("mrow",[n])}});De({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new xe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=yx(t),s=[],a=e.havingStyle(e.style.text()),i=0;i<n.length;i++){var r=n[i];r==="~"&&(r="\\textasciitilde"),s.push(Ss(r,"Typewriter-Regular",t.mode,a,["mord","texttt"]))}return ye(["mord","text"].concat(a.sizingClasses(e)),_x(s),a)},mathmlBuilder(t,e){var n=new Sn(yx(t)),s=new ve("mtext",[n]);return s.setAttribute("mathvariant","monospace"),s}});var yx=t=>t.body.replace(/ /g,t.star?"\u2423":"\xA0"),ur=Dx,pS=`[ \r
1033
1033
  ]`,RP="\\\\[a-zA-Z@]+",PP="\\\\[^\uD800-\uDFFF]",DP="("+RP+")"+pS+"*",LP=`\\\\(
1034
1034
  |[ \r ]+
1035
1035
  ?)[ \r ]*`,l1="[\u0300-\u036F]",OP=new RegExp(l1+"+$"),NP="("+pS+"+)|"+(LP+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(l1+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(l1+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+DP)+("|"+PP+")"),lp=class{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(NP,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new ia("EOF",new Fs(this,n,n));var s=this.tokenRegex.exec(e);if(s===null||s.index!==n)throw new xe("Unexpected character: '"+e[n]+"'",new ia(e[n],new Fs(this,n,n+1)));var a=s[6]||s[3]||(s[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=e.indexOf(`
@@ -2697,7 +2697,7 @@ ${e.slice(-y$)}`:e;return u`
2697
2697
  </div>
2698
2698
  `}function cy(){let[t,e]=y(null);return D(()=>{let n=!0,s=!1,a=_e("update:ready",i=>{s=!0,e(i?.version??"")});return ct.updateState().then(i=>{n&&!s&&e(i?.ready??null)},()=>{}),()=>{n=!1,a()}},[]),t}var sy=t=>typeof t=="number"?t:Date.parse(t??"")||0,TN=/\s+[—–-]\s+\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?Z?$/;function S0(t){return t&&(t.replace(TN,"")||t)}function EN(t){let e=sy(t);if(!e)return null;let n=Date.now()-e,s=Math.floor(n/6e4);if(s<60)return`${Math.max(1,s)}m`;let a=Math.floor(n/36e5);if(a<24)return`${a}h`;let i=Math.floor(n/864e5);return i<7?`${i}d`:new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}function VA(t,e){let n=[],s=0,a=0;for(;s<t.length||a<e.length;)a>=e.length||s<t.length&&sy(t[s].updatedAt)>=sy(e[a].updatedAt)?n.push(t[s++]):n.push(e[a++]);return n}var ay=50,MN=800;function _N(t,e){let[n,s]=y(ay),[a,i]=y(null),r=typeof IntersectionObserver>"u"?t:Math.min(t,Math.max(n,e));return D(()=>{if(!a)return;let o=new IntersectionObserver(l=>{l.some(c=>c.isIntersecting)&&s(c=>Math.max(c,r)+ay)},{root:a.closest(".rail-scroll"),rootMargin:`0px 0px ${MN}px 0px`});return o.observe(a),()=>o.disconnect()},[a,r]),{count:r,sentinel:r<t?u`<div ref=${i} aria-hidden="true" data-list-more></div>`:null}}function eC({page:t,onPage:e,chats:n,chatsError:s,selected:a,unread:i,working:r,agentName:o=T=>T.agentType,modelName:l=T=>T.llm,onSelect:c,onWarm:d=()=>{},onNew:h,onSettings:p,onRefresh:f=()=>{},onAdopt:m=()=>{},auth:b,localChats:g,localChatState:$={},onLocalDelete:v=()=>{},onLocalRefresh:w=()=>{},onLocalLift:x=()=>{}}){let T=cy(),[k,A]=y("active"),[E,S]=y(NA),_=ue=>{BA(ue),S(ue)},[I,R]=y(null),P=dN(k!=="active"&&b.signedIn===!0),O=hN(b.signedIn===!0),Z=Q({selected:a,page:t});Z.current={selected:a,page:t},D(()=>J6({refresh:f,leave:h,adopt:m,selected:()=>Z.current.page?null:Z.current.selected}),[f,h,m]),D(()=>eA(R),[]);let z=zA(k,n,P.rows),V=ue=>{ue.archived||!(n??[]).some(tn=>tn.id===ue.id)?m(ue):c(ue.id)},q=ue=>{let tn=(n??[]).find(Se=>Se.id===ue.id)??(P.rows??[]).find(Se=>Se.id===ue.id);V(tn??{id:ue.id,title:ue.label,agentType:"",llm:"",agentCount:1,updatedAt:new Date().toISOString(),working:!1,statusLine:null,sessionId:null,pinned:!1,archived:k==="archived",attention:null,agents:[]})},B=ue=>{if(ue.target instanceof HTMLInputElement||ue.key!=="ArrowDown"&&ue.key!=="ArrowUp")return;ue.preventDefault();let tn=z.findIndex(Rt=>Rt.id===a),Se=z[Math.min(z.length-1,Math.max(0,tn+(ue.key==="ArrowDown"?1:-1)))];Se&&V(Se)},J=ue=>ue.blind?ue.agentType||"Hidden until the vote":`${o(ue)} \xB7 ${l(ue)}`,j=ue=>{let tn=!t&&ue.id===a;return u`<${uN} key=${ue.id} chat=${ue} selected=${tn}
2699
2699
  state=${tA(ue,{working:r.has(ue.id),unread:i.has(ue.id),current:tn})}
2700
- renaming=${I===ue.id} onRenamed=${()=>R(null)} onOpen=${V} onWarm=${d} agentLabel=${J} />`},se=b.signedIn===!0&&P.rows===null&&!P.error,H=k==="archived"?se:n===null&&!s||k==="all"&&se,oe=k==="archived"?P.error:s??(k==="all"?P.error:null),ce=u`<${xN} filter=${k} onFilter=${A} /><${SN} scope=${E} onScope=${_} />`,[le,ae]=y(null),de=async ue=>{ae(ue.id),await d0(ue),ae(null)},he=k!=="archived",qe=he?UA(g,a):[],St=he?FA(E,O.threads?.team).map(ue=>({...ue,group:"team"})):[],bt=he?(O.threads?.shared??[]).map(ue=>({...ue,group:"shared"})):[],Ue=[...St,...bt],sn=ue=>u`<${CN} key=${ue.chatId} lc=${ue} selected=${a===ue.chatId} state=${$[ue.chatId]??null} onSelect=${c} onDelete=${v} onRefresh=${w} onLift=${x} />`,We=ue=>ue.pinned&&!ue.archived,Nt=he?z.filter(We):[],Bt=he?VA(z.filter(ue=>!We(ue)),qe).map(ue=>ue.chatId?sn(ue):j(ue)):z.map(j),Ft=O.workspaces.find(ue=>ue.slug===O.workspace)?.name??"Team",zt=St.length>0?[u`<${x0} key="heading:team" label=${Ft} />`,...St.map(ue=>u`<${jA} key=${`team:${ue.id}`} thread=${ue} opening=${le} onOpen=${de} />`)]:[],At=bt.length>0?[u`<${x0} key="heading:shared" label="Shared with me" />`,...bt.map(ue=>u`<${jA} key=${`shared:${ue.id}`} thread=${ue} opening=${le} onOpen=${de} />`)]:[],$e=he?[...Bt,...zt,...At]:z.map(j),Oe=_N($e.length,$e.findIndex(ue=>ue.key===a)+ay),Re=$e.slice(0,Oe.count),hn=z.length===0&&qe.length===0&&Ue.length===0,gt=u2().filter(ue=>!aN.has(ue.id)).sort((ue,tn)=>HA(ue.id)-HA(tn.id)),It=he?[...Nt,...VA(z.filter(ue=>!We(ue)),qe)].map(ue=>ue.chatId?{kind:"local",lc:ue}:{kind:"chat",chat:ue}):z.map(ue=>({kind:"chat",chat:ue})),Te=ue=>ue.kind==="chat"?o(ue.chat):ue.lc.agent==="codex"?"Codex":"Claude Code",Qe=ue=>EN(ue.kind==="chat"?ue.chat.updatedAt:ue.lc.updatedAt??ue.lc.createdAt),bn=ue=>{ue==="new-chat"?h():ue==="library"||ue==="arena"?e(ue):p()},Vn=pN(b.signedIn===!0),at=Vn?.name??b.email??"Account",[Qn,Is]=y(!1),[$n,Jn]=y(!1),[Rs,yn]=y(null),vn=Q({menu:null,at:0}),rs=fN(b.signedIn===!0),{balance:we,read:ht}=$N(b.signedIn===!0),Ct=async(ue,tn,Se)=>{if(vn.current.menu===ue&&Date.now()-vn.current.at<300)return;let Rt=tn.currentTarget.getBoundingClientRect(),ha=ue==="account"?Is:Jn;ha(!0),await ls({anchor:Rt,...Se}),ha(!1),vn.current={menu:ue,at:Date.now()}},Ne=ue=>{ht(),Ct("account",ue,{width:256,label:G("Account menu for {name}",{name:at}),rows:vN({team:O,connected:rs,balance:we,onSettings:p,onNewWorkspace:()=>yn("new-workspace"),onSignOut:()=>yn("sign-out")})})},An=ue=>{Ct("apps",ue,{width:288,label:ey,rows:wN({connected:rs,onSettings:p})})},an=cs.filter(ue=>rs?.has(ue.id)),js=mN(b.signedIn===!0,t),da=js?G("Connectors \xB7 {count} connected",{count:js}):G("Connectors"),Vs=O.workspaces.find(ue=>ue.slug===O.workspace)?.name??null;return u`
2700
+ renaming=${I===ue.id} onRenamed=${()=>R(null)} onOpen=${V} onWarm=${d} agentLabel=${J} />`},se=b.signedIn===!0&&P.rows===null&&!P.error,H=k==="archived"?se:n===null&&!s||k==="all"&&se,oe=k==="archived"?P.error:s??(k==="all"?P.error:null),ce=u`<${xN} filter=${k} onFilter=${A} /><${SN} scope=${E} onScope=${_} />`,[le,ae]=y(null),de=async ue=>{ae(ue.id),await d0(ue),ae(null)},he=k!=="archived",qe=he?UA(g,a):[],St=he?FA(E,O.threads?.team).map(ue=>({...ue,group:"team"})):[],bt=he?(O.threads?.shared??[]).map(ue=>({...ue,group:"shared"})):[],Ue=[...St,...bt],sn=ue=>u`<${CN} key=${ue.chatId} lc=${ue} selected=${a===ue.chatId} state=${$[ue.chatId]??null} onSelect=${c} onDelete=${v} onRefresh=${w} onLift=${x} />`,We=ue=>ue.pinned&&!ue.archived,Nt=he?z.filter(We):[],Bt=he?VA(z.filter(ue=>!We(ue)),qe).map(ue=>ue.chatId?sn(ue):j(ue)):z.map(j),Ft=O.workspaces.find(ue=>ue.slug===O.workspace)?.name??"Team",zt=St.length>0?[u`<${x0} key="heading:team" label=${Ft} />`,...St.map(ue=>u`<${jA} key=${`team:${ue.id}`} thread=${ue} opening=${le} onOpen=${de} />`)]:[],At=bt.length>0?[u`<${x0} key="heading:shared" label="Shared with me" />`,...bt.map(ue=>u`<${jA} key=${`shared:${ue.id}`} thread=${ue} opening=${le} onOpen=${de} />`)]:[],$e=he?[...Bt,...zt,...At]:z.map(j),Ne=_N($e.length,$e.findIndex(ue=>ue.key===a)+ay),Re=$e.slice(0,Ne.count),hn=z.length===0&&qe.length===0&&Ue.length===0,gt=u2().filter(ue=>!aN.has(ue.id)).sort((ue,tn)=>HA(ue.id)-HA(tn.id)),It=he?[...Nt,...VA(z.filter(ue=>!We(ue)),qe)].map(ue=>ue.chatId?{kind:"local",lc:ue}:{kind:"chat",chat:ue}):z.map(ue=>({kind:"chat",chat:ue})),Te=ue=>ue.kind==="chat"?o(ue.chat):ue.lc.agent==="codex"?"Codex":"Claude Code",Qe=ue=>EN(ue.kind==="chat"?ue.chat.updatedAt:ue.lc.updatedAt??ue.lc.createdAt),bn=ue=>{ue==="new-chat"?h():ue==="library"||ue==="arena"?e(ue):p()},Vn=pN(b.signedIn===!0),at=Vn?.name??b.email??"Account",[Qn,Is]=y(!1),[$n,Jn]=y(!1),[Rs,yn]=y(null),vn=Q({menu:null,at:0}),rs=fN(b.signedIn===!0),{balance:we,read:ht}=$N(b.signedIn===!0),Ct=async(ue,tn,Se)=>{if(vn.current.menu===ue&&Date.now()-vn.current.at<300)return;let Rt=tn.currentTarget.getBoundingClientRect(),ha=ue==="account"?Is:Jn;ha(!0),await ls({anchor:Rt,...Se}),ha(!1),vn.current={menu:ue,at:Date.now()}},Oe=ue=>{ht(),Ct("account",ue,{width:256,label:G("Account menu for {name}",{name:at}),rows:vN({team:O,connected:rs,balance:we,onSettings:p,onNewWorkspace:()=>yn("new-workspace"),onSignOut:()=>yn("sign-out")})})},An=ue=>{Ct("apps",ue,{width:288,label:ey,rows:wN({connected:rs,onSettings:p})})},an=cs.filter(ue=>rs?.has(ue.id)),js=mN(b.signedIn===!0,t),da=js?G("Connectors \xB7 {count} connected",{count:js}):G("Connectors"),Vs=O.workspaces.find(ue=>ue.slug===O.workspace)?.name??null;return u`
2701
2701
  <nav class="sidebar" aria-label=${G("Chats")}>
2702
2702
  <div class="sidebar-top">
2703
2703
  <span class="sidebar-top-space"></span>
@@ -2719,7 +2719,7 @@ ${e.slice(-y$)}`:e;return u`
2719
2719
  ${Nt.length?u`<${x0} label=${G("Pinned")} action=${ce} />${Nt.map(j)}`:null}
2720
2720
  ${Nt.length&&Re.length===0?null:u`<${x0} label=${k==="archived"?G("Archived"):G("Recents")} action=${Nt.length?null:ce} />`}
2721
2721
  ${Re}
2722
- ${Oe.sentinel}
2722
+ ${Ne.sentinel}
2723
2723
  ${H?u`<p class="rail-note"><${ee} /> ${G("Loading\u2026")}</p>`:null}
2724
2724
  ${oe?u`<p class="alert rail-note" role="alert">${oe}</p>`:null}
2725
2725
  ${!H&&!oe&&hn?u`<p class="rail-note">${G(k==="archived"?yu.emptyArchived:yu.empty)}</p>`:null}
@@ -2734,7 +2734,7 @@ ${e.slice(-y$)}`:e;return u`
2734
2734
  <div class="rail-footer">
2735
2735
  ${Rs==="new-workspace"?u`<${kN} team=${O} onClose=${()=>yn(null)} />`:null}
2736
2736
  ${Rs==="sign-out"?u`<${ly} onClose=${()=>yn(null)} />`:null}
2737
- <button type="button" class=${`account ${Qn?"is-open":""}`} aria-haspopup="menu" aria-expanded=${Qn} aria-label=${G("Account menu for {name}",{name:at})} data-tooltip=${b.email??at} onClick=${Ne}>
2737
+ <button type="button" class=${`account ${Qn?"is-open":""}`} aria-haspopup="menu" aria-expanded=${Qn} aria-label=${G("Account menu for {name}",{name:at})} data-tooltip=${b.email??at} onClick=${Oe}>
2738
2738
  ${Vn?.avatarUrl?u`<img class="account-avatar" src=${Vn.avatarUrl} alt="" referrerpolicy="no-referrer" />`:u`<span class="account-badge">${at.slice(0,1).toUpperCase()}</span>`}
2739
2739
  <span class="account-name">${at}${Vs?u`<span class="account-workspace"> · ${Vs}</span>`:null}</span>
2740
2740
  </button>
@@ -3899,7 +3899,7 @@ ${e.slice(-y$)}`:e;return u`
3899
3899
  </span>
3900
3900
  `:e?u`<button type="button" class="attachment-remove" aria-label=${`Remove ${t.name}`} data-tooltip="Remove" onClick=${e}><${F} name="lucide-x" size=${12} /></button>`:null}
3901
3901
  </span>
3902
- `}function kr({value:t,onChange:e,onSend:n,onStop:s=null,running:a=!1,busy:i=!1,sendDisabled:r=!1,placeholder:o,focusKey:l,attachments:c=null,goal:d=null,mode:h=null,menu:p=[],start:f=null,end:m=null,thread:b=!1,compact:g=!1,sessionId:$=null,mentions:v=null,hints:w=null,tab:x=null,extra:T=null}){let k=Q(null),[A,E]=y(0),[S,_]=y(!1),I=Q(null),R=Q(""),P=Q(!1),[O,Z]=y(!1),[z,V]=y(null),[q,B]=y(null),[J,j]=y(!1),se=t,X=e,H=Q(""),oe=Q(""),ce=Q({listening:!1,following:!0});oe.current=t;let le=Td(we=>X(`${R.current}${R.current&&we?" ":""}${we}`),{onRestart:()=>{R.current=oe.current.trim()}}),ae=!!d?.mode,de=!!h,he=de&&h.value==="plan",qe=de&&h.chosen?h.value:void 0,St=c?.staged??[],bt=St.length>0,Ue=se.trim().length>0,sn=Ue||bt,We=!!d&&!ae&&F2(se)&&z!==se,Nt=!!d?.continuing&&!he,Bt=ae&&bt,Ft=i||O,zt=Y6({sessionId:ae?null:v,text:se,setText:X,input:k}),At=jC({sessionId:$,read:()=>k.current?.value??"",write:we=>X(we)}),$e=At.pending!==null,Oe=!r&&sn&&!Ft&&!Nt&&!(ae&&(!Ue||d.busy))&&!Bt&&!$e,Re=!!w?.length&&!Ue&&!S&&!Ft&&!a;D(()=>{if(!Re)return;let we=setInterval(()=>E(ht=>(ht+1)%w.length),3500);return()=>clearInterval(we)},[Re,w?.length]);let hn=G(ae&&d.loading?"Loading goal\u2026":Bt?"Remove the attachments to set a goal":Nt?"Continuing goal\u2026":Ft?"Sending":"Send"),gt=ae?G(D2):o,It=!ae&&w?.length?w[A%w.length]:gt;Xt(()=>{let we=k.current,ht=ce.current;le.listening&&!ht.listening&&(ht.following=!0),ht.listening=le.listening;let Ct=we.scrollTop;we.style.height="auto";let Ne=Number.parseFloat(getComputedStyle(we).maxHeight);we.style.height=`${Number.isFinite(Ne)?Math.min(we.scrollHeight,Ne):we.scrollHeight}px`,le.listening&&(we.scrollTop=ht.following?we.scrollHeight:Ct)},[se,le.listening]),D(()=>{k.current?.focus()},[l]);let Te=async we=>{if(!P.current){P.current=!0,Z(!0);try{await we()}catch{}finally{P.current=!1,Z(!1),k.current?.focus()}}},Qe=()=>{le.stop(),e(""),V(null),d.setMode(!0),k.current?.focus()},bn=we=>Te(async()=>{e(""),d.setMode(!1),!await d.set(we)&&(e(we),d.setMode(!0))}),Vn=()=>{let we=se.trim();if(d&&!ae&&(We||we==="/goal")){Qe();return}if(ae){if(!Ue||d.busy||Nt||Bt)return;d.live?B(we):bn(we);return}let ht=$?XC(we):null;if(ht!==null){_0({question:ht}),e("");return}Oe&&(le.stop(),Te(async()=>{let Ct=c?await c.deliver():{ok:!0,files:[]};Ct.ok&&await n(we,Ct.files,qe)!==!1&&c?.commit(Ct.files)}))},at=we=>{if(!(!le.listening&&zt.onKeyDown(we))){if(le.listening&&(we.key==="Escape"||we.key==="Enter"&&!we.isComposing)){we.preventDefault(),we.key==="Escape"?(le.cancel(),X(H.current)):le.stop();return}if(we.key==="Escape"){We?V(se):ae&&d.setMode(!1);return}we.key!=="Enter"||we.shiftKey||we.isComposing||(we.preventDefault(),sn||We?Vn():a&&s&&s())}},Qn=we=>{ae&&d.setMode(!1),h.choose(we),k.current?.focus()},Is=[...de?[{...he?wl.planModeOff:wl.planMode,disabled:a,run:()=>Qn(he?"build":"plan")}]:[],...c?[{...wl.attachFile,disabled:ae,run:()=>I.current?.click()}]:[],...p],$n=Q(0),Jn=async we=>{if(J||Date.now()-$n.current<250)return;j(!0);let ht=await ls({anchor:we.currentTarget.getBoundingClientRect(),rows:Is.map(Ct=>({label:Ct.label,glyph:u`<${F} name=${Ct.icon} size=${16} />`,disabled:Ct.disabled}))});$n.current=Date.now(),j(!1),ht!==null&&Is[ht].run()},Rs=!!c&&!ae,yn=Q(null);rk({listening:le.listening,stop:()=>le.stop(),toggle:()=>{le.listening||(H.current=oe.current,R.current=oe.current.trim()),le.toggle()}},yn);let vn=c?.drop;D(()=>{let we=b?yn.current?.closest(".messages-column")??yn.current:yn.current;if(!we||!vn)return;let ht=Ne=>Ne.preventDefault(),Ct=Rs?[["dragenter",vn.enter],["dragover",vn.over],["dragleave",vn.leave],["drop",vn.drop]]:[["dragover",ht],["drop",ht]];for(let[Ne,An]of Ct)we.addEventListener(Ne,An);return()=>{for(let[Ne,An]of Ct)we.removeEventListener(Ne,An)}},[b,Rs,vn]);let rs=!!s&&a&&!sn&&!ae&&!Nt;return u`
3902
+ `}function kr({value:t,onChange:e,onSend:n,onStop:s=null,running:a=!1,busy:i=!1,sendDisabled:r=!1,placeholder:o,focusKey:l,attachments:c=null,goal:d=null,mode:h=null,menu:p=[],start:f=null,end:m=null,thread:b=!1,compact:g=!1,sessionId:$=null,mentions:v=null,hints:w=null,tab:x=null,extra:T=null}){let k=Q(null),[A,E]=y(0),[S,_]=y(!1),I=Q(null),R=Q(""),P=Q(!1),[O,Z]=y(!1),[z,V]=y(null),[q,B]=y(null),[J,j]=y(!1),se=t,X=e,H=Q(""),oe=Q(""),ce=Q({listening:!1,following:!0});oe.current=t;let le=Td(we=>X(`${R.current}${R.current&&we?" ":""}${we}`),{onRestart:()=>{R.current=oe.current.trim()}}),ae=!!d?.mode,de=!!h,he=de&&h.value==="plan",qe=de&&h.chosen?h.value:void 0,St=c?.staged??[],bt=St.length>0,Ue=se.trim().length>0,sn=Ue||bt,We=!!d&&!ae&&F2(se)&&z!==se,Nt=!!d?.continuing&&!he,Bt=ae&&bt,Ft=i||O,zt=Y6({sessionId:ae?null:v,text:se,setText:X,input:k}),At=jC({sessionId:$,read:()=>k.current?.value??"",write:we=>X(we)}),$e=At.pending!==null,Ne=!r&&sn&&!Ft&&!Nt&&!(ae&&(!Ue||d.busy))&&!Bt&&!$e,Re=!!w?.length&&!Ue&&!S&&!Ft&&!a;D(()=>{if(!Re)return;let we=setInterval(()=>E(ht=>(ht+1)%w.length),3500);return()=>clearInterval(we)},[Re,w?.length]);let hn=G(ae&&d.loading?"Loading goal\u2026":Bt?"Remove the attachments to set a goal":Nt?"Continuing goal\u2026":Ft?"Sending":"Send"),gt=ae?G(D2):o,It=!ae&&w?.length?w[A%w.length]:gt;Xt(()=>{let we=k.current,ht=ce.current;le.listening&&!ht.listening&&(ht.following=!0),ht.listening=le.listening;let Ct=we.scrollTop;we.style.height="auto";let Oe=Number.parseFloat(getComputedStyle(we).maxHeight);we.style.height=`${Number.isFinite(Oe)?Math.min(we.scrollHeight,Oe):we.scrollHeight}px`,le.listening&&(we.scrollTop=ht.following?we.scrollHeight:Ct)},[se,le.listening]),D(()=>{k.current?.focus()},[l]);let Te=async we=>{if(!P.current){P.current=!0,Z(!0);try{await we()}catch{}finally{P.current=!1,Z(!1),k.current?.focus()}}},Qe=()=>{le.stop(),e(""),V(null),d.setMode(!0),k.current?.focus()},bn=we=>Te(async()=>{e(""),d.setMode(!1),!await d.set(we)&&(e(we),d.setMode(!0))}),Vn=()=>{let we=se.trim();if(d&&!ae&&(We||we==="/goal")){Qe();return}if(ae){if(!Ue||d.busy||Nt||Bt)return;d.live?B(we):bn(we);return}let ht=$?XC(we):null;if(ht!==null){_0({question:ht}),e("");return}Ne&&(le.stop(),Te(async()=>{let Ct=c?await c.deliver():{ok:!0,files:[]};Ct.ok&&await n(we,Ct.files,qe)!==!1&&c?.commit(Ct.files)}))},at=we=>{if(!(!le.listening&&zt.onKeyDown(we))){if(le.listening&&(we.key==="Escape"||we.key==="Enter"&&!we.isComposing)){we.preventDefault(),we.key==="Escape"?(le.cancel(),X(H.current)):le.stop();return}if(we.key==="Escape"){We?V(se):ae&&d.setMode(!1);return}we.key!=="Enter"||we.shiftKey||we.isComposing||(we.preventDefault(),sn||We?Vn():a&&s&&s())}},Qn=we=>{ae&&d.setMode(!1),h.choose(we),k.current?.focus()},Is=[...de?[{...he?wl.planModeOff:wl.planMode,disabled:a,run:()=>Qn(he?"build":"plan")}]:[],...c?[{...wl.attachFile,disabled:ae,run:()=>I.current?.click()}]:[],...p],$n=Q(0),Jn=async we=>{if(J||Date.now()-$n.current<250)return;j(!0);let ht=await ls({anchor:we.currentTarget.getBoundingClientRect(),rows:Is.map(Ct=>({label:Ct.label,glyph:u`<${F} name=${Ct.icon} size=${16} />`,disabled:Ct.disabled}))});$n.current=Date.now(),j(!1),ht!==null&&Is[ht].run()},Rs=!!c&&!ae,yn=Q(null);rk({listening:le.listening,stop:()=>le.stop(),toggle:()=>{le.listening||(H.current=oe.current,R.current=oe.current.trim()),le.toggle()}},yn);let vn=c?.drop;D(()=>{let we=b?yn.current?.closest(".messages-column")??yn.current:yn.current;if(!we||!vn)return;let ht=Oe=>Oe.preventDefault(),Ct=Rs?[["dragenter",vn.enter],["dragover",vn.over],["dragleave",vn.leave],["drop",vn.drop]]:[["dragover",ht],["drop",ht]];for(let[Oe,An]of Ct)we.addEventListener(Oe,An);return()=>{for(let[Oe,An]of Ct)we.removeEventListener(Oe,An)}},[b,Rs,vn]);let rs=!!s&&a&&!sn&&!ae&&!Nt;return u`
3903
3903
  ${x?u`<div class="composer-tab" data-composer-tab>${x}</div>`:null}
3904
3904
  <div ref=${yn} class=${`composer-card ${b||g?"is-thread":"is-landing"} ${g?"is-compact":""} ${x?"has-tab":""} ${Rs&&c.dropActive?"is-drop":""}`}>
3905
3905
  ${bt?u`
@@ -3975,7 +3975,7 @@ ${e.slice(-y$)}`:e;return u`
3975
3975
  aria-busy=${le.state==="starting"}
3976
3976
  onClick=${()=>{le.listening||(H.current=se),R.current=se.trim(),le.toggle()}}
3977
3977
  >${le.state==="starting"?u`<${ee} />`:u`<${F} name=${le.state==="blocked"?"lucide-mic-off":"lucide-mic"} size=${16} />`}</button>
3978
- ${rs?u`<button type="button" class="round-button" aria-label="Stop" data-tooltip="Stop generating" onClick=${s}><${F} name="lucide-square" size=${12} /></button>`:u`<button type="button" class="round-button" aria-label=${hn} data-tooltip=${hn} disabled=${!Oe} tabIndex=${sn?0:-1} onClick=${()=>Vn()}>${Ft||ae&&d.loading?u`<${ee} />`:u`<${F} name="lucide-arrow-up" size=${16} />`}</button>`}
3978
+ ${rs?u`<button type="button" class="round-button" aria-label="Stop" data-tooltip="Stop generating" onClick=${s}><${F} name="lucide-square" size=${12} /></button>`:u`<button type="button" class="round-button" aria-label=${hn} data-tooltip=${hn} disabled=${!Ne} tabIndex=${sn?0:-1} onClick=${()=>Vn()}>${Ft||ae&&d.loading?u`<${ee} />`:u`<${F} name="lucide-arrow-up" size=${16} />`}</button>`}
3979
3979
  </span>
3980
3980
  </div>
3981
3981
  `}
@@ -4090,9 +4090,9 @@ ${e.slice(-y$)}`:e;return u`
4090
4090
  ${r==="needs_connection"?u`<button type="button" class="link" data-pr-record-status onClick=${()=>Yt.connectGithub()}>Connect GitHub to save result</button>`:u`<span class="quiet" role="status" data-pr-record-status title=${r==="unknown"?"Your PR was created successfully. Session activity may already be saved, but its acknowledgement could not be confirmed.":r==="failed"?e.recording.reason==="expired"?"Your PR was created successfully. The recording window expired, so its session activity was not synced.":"Your PR was created successfully, but its session activity was not synced.":"Your PR is ready."}>${r==="pending"?"Saving result\u2026":r==="recorded"?"Result saved":r==="unknown"?"PR created \xB7 sync unconfirmed":"PR created \xB7 activity not synced"}</span>`}
4091
4091
  </span>
4092
4092
  `}var y7="agentsky:new-chat-place";function uz(){try{return localStorage.getItem(y7)}catch{return null}}function dz(t){try{localStorage.setItem(y7,t)}catch{}}var qy="agentsky:local-engine";function hz(t){try{return JSON.parse(localStorage.getItem(qy)??"{}")[t]??{model:"",effort:""}}catch{return{model:"",effort:""}}}function pz(t,e){try{let n=JSON.parse(localStorage.getItem(qy)??"{}");localStorage.setItem(qy,JSON.stringify({...n,[t]:e}))}catch{}}function v7(t,e,n=""){let[s,a]=y(null),[i,r]=y(0),o=fe(()=>r(d=>d+1),[]);D(()=>{if(a(null),!t)return;let d=!0;return Ht.models({agent:t}).then(h=>{d&&a({agent:t,models:Array.isArray(h)?h:[],error:null})},h=>{d&&a({agent:t,models:[],error:h.message})}),()=>{d=!1}},[t,i]);let l=s?.agent===t?s:null,c=[...l?.models??[]];return n&&!c.some(d=>d.id===n)&&c.push({id:n,name:n,efforts:[]}),{agent:t?J2(t,e,c):null,error:l?.error,loading:!!(t&&!l),retry:o}}function w7({state:t}){return t.error?u`<p class="composer-notice alert" role="alert">${t.error} <button type="button" class="link" onClick=${t.retry}>Retry models</button></p>`:null}function fz({engineAgent:t,engine:e,disabled:n,onChange:s}){return t?u`<${ki} entries=${[]} agent=${t} llm=${e.model??""} effort=${e.effort??""} defaultEffort="Default thinking" locked=${n}
4093
- onModel=${a=>s({model:a,effort:""})} onEffort=${a=>s({...e,effort:a})} />`:null}function Gy({draftPicker:t=null,options:e,optionsError:n,onRetryOptions:s,choice:a,onChoose:i,draft:r,onDraft:o,error:l,creditRefused:c=!1,onStart:d,focusKey:h,localDetect:p,workspaceKey:f="",market:m=null,intro:b=null,belowCard:g=null,onStartFailure:$=null}){let v=Ta(),[w,x]=y(!1),[T,k]=y(0),[A,E]=y(null),[S,_]=y(null),[I,R]=y(!1),[P,O]=y(0),Z=h7(!0);D(()=>{let Se=()=>Z.acceptFiles(Ev());return Se(),window.addEventListener("agentsky:dock-files",Se),()=>window.removeEventListener("agentsky:dock-files",Se)},[Z.acceptFiles]);let z=p7("new-chat"),V=e!==null,q=I0(c7,null,V),B=I0(u7,[],V),[J,j]=y(Hy),[se,X]=y(xr??null),[H,oe]=y(!1),ce=vl(),le=R0(),ae=le?.screenAllowed===!0;D(()=>{N2(se,le)&&(xr=null,X(null))},[se,le]);let[de,he]=y(!1),[qe,St]=y(null),bt=()=>mt.screenState().then(St,()=>{}),[Ue,sn]=y(!1);D(()=>{ae&&bt()},[ae]);let We=de&&ae&&Cu(qe),Nt=!A&&ce.length>0&&(H||We||se?.live),[Bt,Ft]=y(!1),zt=async()=>{if(de){he(!1);return}let Se=await mt.screenState().catch(()=>null);St(Se),Cu(Se)?he(!0):sn(!0)};D(()=>{!Bt||!ae||(Ft(!1),he(!0),bt())},[Bt,ae]);let At=Se=>mt.grantScreen({which:Se}).then(St,()=>{});D(()=>{if(!de)return;let Se=()=>{bt()};return window.addEventListener("focus",Se),()=>window.removeEventListener("focus",Se)},[de]);let $e=J??q?.defaultCapabilities??null,Oe=p?[...p.claude_code?.installed?[{id:"claude_code",name:"Claude Code",signedIn:p.claude_code.signedIn!==!1,billing:p.claude_code.billing}]:[],...p.codex?.installed?[{id:"codex",name:"Codex",signedIn:p.codex.signedIn!==!1,billing:p.codex.billing}]:[]]:[],Re="local:",hn=[...Oe.map(Se=>({value:`${Re}${Se.id}`,name:Se.signedIn?Se.name:`${Se.name} \xB7 not signed in`,group:j2(Se),icon:ks[Se.id]})),...v?[]:Sd(e??[],Ad).map((Se,Rt)=>Oe.length?{...Se,group:`Run in the cloud \xB7 ${G2(e[Rt],B,e[Rt].agentType===a?.agent.agentType?a.model:null)}`}:Se)],gt=A?`${Re}${A}`:a?.agent.agentType??"",It=Se=>{if(dz(Se.startsWith(Re)?Se:"cloud"),ht(Se.startsWith(Re)?null:we&&"declined"),Se.startsWith(Re)){E(Se.slice(Re.length));return}E(null),i({agentType:Se,llm:void 0,effort:void 0})},Te=A==="codex"?"Codex":"Claude Code",Qe=!!A&&Oe.some(Se=>Se.id===A&&!Se.signedIn),[bn,Vn]=y({model:"",effort:""}),at=v7(A,Te,bn.model);D(()=>{A&&Vn(hz(A))},[A]);let Qn=Se=>{Vn(Se),pz(A,Se)},Is=A?u`<${Vf} agentType=${A} name=${Te} />`:null;D(()=>{if(!V||xr!==void 0)return;let Se=!0;return d7().then(Rt=>{!Se||xr!==void 0||(xr=null,X(xr))},()=>{}),()=>{Se=!1}},[V]);let $n=Q(!1);D(()=>{if(!p)return;let Se=$n.current?A:Q2({stored:uz(),localOptions:Oe});$n.current=!0;let Rt=jf({macOnly:v,localAgent:Se,localOptions:Oe});Rt!==A&&E(Rt)},[p,v,A]);let Jn=jf({macOnly:v,localAgent:A,localOptions:Oe}),[Rs,yn]=y(!1);D(()=>{yn(!1)},[f]);let[vn,rs]=y(null),[we,ht]=y(null);D(()=>{if(!V)return;let Se=!0,Rt=()=>yt.credits().then(ha=>{Se&&rs(ha?.balanceUsd??null)},()=>{});return Rt(),window.addEventListener("focus",Rt),()=>{Se=!1,window.removeEventListener("focus",Rt)}},[V,f]),D(()=>{if(!A||S)return;let Se=!0;return Ht.defaultFolder().then(Rt=>{Se&&Rt&&_(Rt)},()=>{}),()=>{Se=!1}},[A,S]);let Ct=Gf({balanceUsd:vn,choice:a,plans:B,localOptions:Oe});D(()=>{Ct&&!A&&!we?(E(Ct),ht(Ct)):!Ct&&we&&A===we&&(E(null),ht(null))},[Ct]);let Ne=async(Se,Rt,ha)=>{x(!0);try{return!A&&Nt?!1:A?(await d(Se,{localAgent:{agent:A,folder:S,picked:I,model:bn.model||null,effort:bn.effort||null}}),!0):(await d(Se,{files:Rt,...ha?{interactionMode:ha}:{},...$e?{capabilities:$e}:{},...se?.local?{localProject:{folder:se.folder}}:se?{project:se}:{},...H?{browser:!0}:{},...We?{screen:!0}:{}},$),yn(!1),oe(!1),he(!0),z.reset(),!0)}catch(qi){let mi=!A&&Oa(qi?.code),gi=mi&&we!=="declined"?Gf({balanceUsd:0,choice:a,plans:B,localOptions:Oe}):null;return gi&&(rs(0),E(gi),ht(gi)),yn(mi&&!gi),!1}finally{x(!1)}},An=Se=>{let Rt=Kl(Se,$e??[]);Rt&&(Hy=Rt,j(Rt))},an=Se=>{xr=Se,X(Se)},js=async()=>{let Se=await Ht.chooseFolder().catch(()=>null);Se&&(_(Se),R(!0))},da=v===!0&&!A&&p!=null&&!Jn,Vs=!!m&&!g&&!b,ue=u`<span class="composer-place"><${nz} project=${se} onChange=${an} disabled=${w} openRequest=${P} /></span>`,tn=u`
4093
+ onModel=${a=>s({model:a,effort:""})} onEffort=${a=>s({...e,effort:a})} />`:null}function Gy({draftPicker:t=null,options:e,optionsError:n,onRetryOptions:s,choice:a,onChoose:i,draft:r,onDraft:o,error:l,creditRefused:c=!1,onStart:d,focusKey:h,localDetect:p,workspaceKey:f="",market:m=null,intro:b=null,belowCard:g=null,onStartFailure:$=null}){let v=Ta(),[w,x]=y(!1),[T,k]=y(0),[A,E]=y(null),[S,_]=y(null),[I,R]=y(!1),[P,O]=y(0),Z=h7(!0);D(()=>{let Se=()=>Z.acceptFiles(Ev());return Se(),window.addEventListener("agentsky:dock-files",Se),()=>window.removeEventListener("agentsky:dock-files",Se)},[Z.acceptFiles]);let z=p7("new-chat"),V=e!==null,q=I0(c7,null,V),B=I0(u7,[],V),[J,j]=y(Hy),[se,X]=y(xr??null),[H,oe]=y(!1),ce=vl(),le=R0(),ae=le?.screenAllowed===!0;D(()=>{N2(se,le)&&(xr=null,X(null))},[se,le]);let[de,he]=y(!1),[qe,St]=y(null),bt=()=>mt.screenState().then(St,()=>{}),[Ue,sn]=y(!1);D(()=>{ae&&bt()},[ae]);let We=de&&ae&&Cu(qe),Nt=!A&&ce.length>0&&(H||We||se?.live),[Bt,Ft]=y(!1),zt=async()=>{if(de){he(!1);return}let Se=await mt.screenState().catch(()=>null);St(Se),Cu(Se)?he(!0):sn(!0)};D(()=>{!Bt||!ae||(Ft(!1),he(!0),bt())},[Bt,ae]);let At=Se=>mt.grantScreen({which:Se}).then(St,()=>{});D(()=>{if(!de)return;let Se=()=>{bt()};return window.addEventListener("focus",Se),()=>window.removeEventListener("focus",Se)},[de]);let $e=J??q?.defaultCapabilities??null,Ne=p?[...p.claude_code?.installed?[{id:"claude_code",name:"Claude Code",signedIn:p.claude_code.signedIn!==!1,billing:p.claude_code.billing}]:[],...p.codex?.installed?[{id:"codex",name:"Codex",signedIn:p.codex.signedIn!==!1,billing:p.codex.billing}]:[]]:[],Re="local:",hn=[...Ne.map(Se=>({value:`${Re}${Se.id}`,name:Se.signedIn?Se.name:`${Se.name} \xB7 not signed in`,group:j2(Se),icon:ks[Se.id]})),...v?[]:Sd(e??[],Ad).map((Se,Rt)=>Ne.length?{...Se,group:`Run in the cloud \xB7 ${G2(e[Rt],B,e[Rt].agentType===a?.agent.agentType?a.model:null)}`}:Se)],gt=A?`${Re}${A}`:a?.agent.agentType??"",It=Se=>{if(dz(Se.startsWith(Re)?Se:"cloud"),ht(Se.startsWith(Re)?null:we&&"declined"),Se.startsWith(Re)){E(Se.slice(Re.length));return}E(null),i({agentType:Se,llm:void 0,effort:void 0})},Te=A==="codex"?"Codex":"Claude Code",Qe=!!A&&Ne.some(Se=>Se.id===A&&!Se.signedIn),[bn,Vn]=y({model:"",effort:""}),at=v7(A,Te,bn.model);D(()=>{A&&Vn(hz(A))},[A]);let Qn=Se=>{Vn(Se),pz(A,Se)},Is=A?u`<${Vf} agentType=${A} name=${Te} />`:null;D(()=>{if(!V||xr!==void 0)return;let Se=!0;return d7().then(Rt=>{!Se||xr!==void 0||(xr=null,X(xr))},()=>{}),()=>{Se=!1}},[V]);let $n=Q(!1);D(()=>{if(!p)return;let Se=$n.current?A:Q2({stored:uz(),localOptions:Ne});$n.current=!0;let Rt=jf({macOnly:v,localAgent:Se,localOptions:Ne});Rt!==A&&E(Rt)},[p,v,A]);let Jn=jf({macOnly:v,localAgent:A,localOptions:Ne}),[Rs,yn]=y(!1);D(()=>{yn(!1)},[f]);let[vn,rs]=y(null),[we,ht]=y(null);D(()=>{if(!V)return;let Se=!0,Rt=()=>yt.credits().then(ha=>{Se&&rs(ha?.balanceUsd??null)},()=>{});return Rt(),window.addEventListener("focus",Rt),()=>{Se=!1,window.removeEventListener("focus",Rt)}},[V,f]),D(()=>{if(!A||S)return;let Se=!0;return Ht.defaultFolder().then(Rt=>{Se&&Rt&&_(Rt)},()=>{}),()=>{Se=!1}},[A,S]);let Ct=Gf({balanceUsd:vn,choice:a,plans:B,localOptions:Ne});D(()=>{Ct&&!A&&!we?(E(Ct),ht(Ct)):!Ct&&we&&A===we&&(E(null),ht(null))},[Ct]);let Oe=async(Se,Rt,ha)=>{x(!0);try{return!A&&Nt?!1:A?(await d(Se,{localAgent:{agent:A,folder:S,picked:I,model:bn.model||null,effort:bn.effort||null}}),!0):(await d(Se,{files:Rt,...ha?{interactionMode:ha}:{},...$e?{capabilities:$e}:{},...se?.local?{localProject:{folder:se.folder}}:se?{project:se}:{},...H?{browser:!0}:{},...We?{screen:!0}:{}},$),yn(!1),oe(!1),he(!0),z.reset(),!0)}catch(qi){let mi=!A&&Oa(qi?.code),gi=mi&&we!=="declined"?Gf({balanceUsd:0,choice:a,plans:B,localOptions:Ne}):null;return gi&&(rs(0),E(gi),ht(gi)),yn(mi&&!gi),!1}finally{x(!1)}},An=Se=>{let Rt=Kl(Se,$e??[]);Rt&&(Hy=Rt,j(Rt))},an=Se=>{xr=Se,X(Se)},js=async()=>{let Se=await Ht.chooseFolder().catch(()=>null);Se&&(_(Se),R(!0))},da=v===!0&&!A&&p!=null&&!Jn,Vs=!!m&&!g&&!b,ue=u`<span class="composer-place"><${nz} project=${se} onChange=${an} disabled=${w} openRequest=${P} /></span>`,tn=u`
4094
4094
  ${Nt?u`<p class="composer-notice alert" role="alert">Choose one agent before lending this Mac. Comparisons use separate tasks; remove the other agents or remove Mac access.</p>`:null}
4095
- <${kr} sendDisabled=${Nt} value=${r} onChange=${o} onSend=${Ne} running=${!1} busy=${w||!A&&(v!==!1||!a&&Oe.length===0)} placeholder=${A?G("Message {agent} \xB7 this Mac",{agent:A==="codex"?"Codex":"Claude Code"}):G("Do anything")} focusKey=${h}
4095
+ <${kr} sendDisabled=${Nt} value=${r} onChange=${o} onSend=${Oe} running=${!1} busy=${w||!A&&(v!==!1||!a&&Ne.length===0)} placeholder=${A?G("Message {agent} \xB7 this Mac",{agent:A==="codex"?"Codex":"Claude Code"}):G("Do anything")} focusKey=${h}
4096
4096
  attachments=${A?void 0:Z}
4097
4097
  mode=${A?null:z}
4098
4098
  menu=${A?void 0:[{...wl.chooseRepo,disabled:w,run:()=>O(Se=>Se+1)},{label:H?"Don't use a browser on this Mac":"Use a browser on this Mac",icon:"lucide-globe",disabled:w,run:()=>oe(!H)},{label:de?"Don't lend this Mac's screen":"Lend this Mac's screen",icon:"lucide-monitor",disabled:w,run:()=>{zt()}},...a&&e?.length?[{...wl.compareAgents,disabled:w,run:()=>k(Se=>Se+1)}]:[],{label:"Connectors",icon:"lucide-plug",disabled:w,run:()=>Wt("connectors")}]}
@@ -5448,7 +5448,7 @@ export async function retry<T>(fn: () => Promise<T>, attempts = 3, delayMs = 100
5448
5448
  </span>
5449
5449
  </div>
5450
5450
  </header>
5451
- `}var dH=2500;function hH(t,e){let[n,s]=y(null);return D(()=>{if(s(null),!t||!e)return;let a=!0,i=null,r=()=>xt.bootStage({id:t}).then(o=>{a&&s(o?.stage??null)},()=>{}).finally(()=>{a&&(i=setTimeout(r,dH))});return r(),()=>{a=!1,clearTimeout(i)}},[t,e]),n}function j8({chat:t,localBilling:e,agentName:n,modelName:s,thread:a,error:i,draft:r,onDraft:o,onSend:l,onStop:c,onRetry:d,retryLabel:h="Try again",options:p,onChat:f,onFolderChange:m,onOpenLifted:b=null,openChat:g=null,onEarlier:$=null}){let[v,w]=y(!1),x=Q(null),T=Q(!0),k=Q(null),A=!t.local&&(t.columns?.length??0)>1,E=o8(A?t.columns:null),S=l8(A?t.columns:null,E),_=c8(t),I=A?ck(t.columns,S,p??[],E):[],R=!!(t.comparison?.pending&&t.comparison?.hidden),[P,O]=y(void 0),Z=P===void 0&&A?mk(t.columns,t.comparison,E):P,z=A&&Z===null&&!R,V=A?t.columns.find(Te=>Te.id===t.columnId)??t.columns[0]:null,q=Te=>{O(Te);let Qe=Te===null?null:t.columns.find(bn=>bn.id===Te);Qe&&g0(t,Qe,f).catch(()=>{})},B=t.readOnly?[]:v8(t.columns,t.comparison),[J,j]=y(null),se=B.length>0&&(J??!0),X=E8(t.columns),[H,oe]=y(!1);D(()=>{j(null),oe(!1),O(void 0)},[t.id]);let ce=wS(t,a);i8(t,a);let le=a.status==="running"||a.status==="provisioning",ae=hH(t.local?null:t.sessionId??null,a.status==="provisioning"),de=Vp(t.local?null:t.sessionId??null,le),he=Fe(()=>Ja(dd(a.items,de),{artifacts:ce,running:le,imported:a.imported}),[a.items,de,ce,le,a.imported]),qe=l6(he,a.loaded?t.id:null),St=Q(null),[bt,Ue]=y(!1),sn=()=>{let Te=x.current;if(St.current=Te?Te.scrollHeight-Te.scrollTop:null,qe.hidden||!$)return qe.showEarlier();qe.showEarlier(),Ue(!0),Promise.resolve($()).finally(()=>Ue(!1))},We=ce.length?ce.reduce((Te,Qe)=>Qe.publishedAt>Te.publishedAt?Qe:Te):null,Nt=q8(t,le),Ft={chat:t,agentName:n,modelName:s,thread:a,helpers:Nt,agentNames:Te=>p?.find(Qe=>Qe.agentType===Te)?.name??Te,openChat:g,onSend:Te=>It(Te),busy:v||!t.local&&!t.sessionId,latestArtifact:We?{source:{artifactId:We.artifactId,version:We.version},label:We.name}:null},[zt,At]=Fp(`chat:${t.id}`,t,Ft),[$e,Oe]=y(!1),Re=a.items.filter(Te=>Te.kind==="user").length,hn=Q(Re);Xt(()=>{let Te=x.current;Re>hn.current&&(T.current=!0),hn.current=Re,Te&&T.current&&(Te.scrollTop=Te.scrollHeight),Oe(!!Te&&!T.current)},[he,a.activity,a.status,Re]),Xt(()=>{let Te=x.current;St.current===null||!Te||(Te.scrollTop=Te.scrollHeight-St.current,St.current=null)},[qe.hidden]),D(()=>{hn.current=Re,T.current=!0},[t.id]);let gt=()=>{let Te=x.current;Te&&(T.current=!0,Te.scrollTop=Te.scrollHeight,Oe(!1))},It=async(Te,Qe)=>{w(!0),T.current=!0;try{return await l(Te,Qe),!0}catch{return!1}finally{w(!1)}};return u`
5451
+ `}var dH=2500;function hH(t,e){let[n,s]=y(null);return D(()=>{if(s(null),!t||!e)return;let a=!0,i=null,r=()=>xt.bootStage({id:t}).then(o=>{a&&s(o?.stage??null)},()=>{}).finally(()=>{a&&(i=setTimeout(r,dH))});return r(),()=>{a=!1,clearTimeout(i)}},[t,e]),n}function j8({chat:t,localBilling:e,agentName:n,modelName:s,thread:a,error:i,draft:r,onDraft:o,onSend:l,onStop:c,onRetry:d,retryLabel:h="Try again",options:p,onChat:f,onFolderChange:m,onOpenLifted:b=null,openChat:g=null,onEarlier:$=null}){let[v,w]=y(!1),x=Q(null),T=Q(!0),k=Q(null),A=!t.local&&(t.columns?.length??0)>1,E=o8(A?t.columns:null),S=l8(A?t.columns:null,E),_=c8(t),I=A?ck(t.columns,S,p??[],E):[],R=!!(t.comparison?.pending&&t.comparison?.hidden),[P,O]=y(void 0),Z=P===void 0&&A?mk(t.columns,t.comparison,E):P,z=A&&Z===null&&!R,V=A?t.columns.find(Te=>Te.id===t.columnId)??t.columns[0]:null,q=Te=>{O(Te);let Qe=Te===null?null:t.columns.find(bn=>bn.id===Te);Qe&&g0(t,Qe,f).catch(()=>{})},B=t.readOnly?[]:v8(t.columns,t.comparison),[J,j]=y(null),se=B.length>0&&(J??!0),X=E8(t.columns),[H,oe]=y(!1);D(()=>{j(null),oe(!1),O(void 0)},[t.id]);let ce=wS(t,a);i8(t,a);let le=a.status==="running"||a.status==="provisioning",ae=hH(t.local?null:t.sessionId??null,a.status==="provisioning"),de=Vp(t.local?null:t.sessionId??null,le),he=Fe(()=>Ja(dd(a.items,de),{artifacts:ce,running:le,imported:a.imported}),[a.items,de,ce,le,a.imported]),qe=l6(he,a.loaded?t.id:null),St=Q(null),[bt,Ue]=y(!1),sn=()=>{let Te=x.current;if(St.current=Te?Te.scrollHeight-Te.scrollTop:null,qe.hidden||!$)return qe.showEarlier();qe.showEarlier(),Ue(!0),Promise.resolve($()).finally(()=>Ue(!1))},We=ce.length?ce.reduce((Te,Qe)=>Qe.publishedAt>Te.publishedAt?Qe:Te):null,Nt=q8(t,le),Ft={chat:t,agentName:n,modelName:s,thread:a,helpers:Nt,agentNames:Te=>p?.find(Qe=>Qe.agentType===Te)?.name??Te,openChat:g,onSend:Te=>It(Te),busy:v||!t.local&&!t.sessionId,latestArtifact:We?{source:{artifactId:We.artifactId,version:We.version},label:We.name}:null},[zt,At]=Fp(`chat:${t.id}`,t,Ft),[$e,Ne]=y(!1),Re=a.items.filter(Te=>Te.kind==="user").length,hn=Q(Re);Xt(()=>{let Te=x.current;Re>hn.current&&(T.current=!0),hn.current=Re,Te&&T.current&&(Te.scrollTop=Te.scrollHeight),Ne(!!Te&&!T.current)},[he,a.activity,a.status,Re]),Xt(()=>{let Te=x.current;St.current===null||!Te||(Te.scrollTop=Te.scrollHeight-St.current,St.current=null)},[qe.hidden]),D(()=>{hn.current=Re,T.current=!0},[t.id]);let gt=()=>{let Te=x.current;Te&&(T.current=!0,Te.scrollTop=Te.scrollHeight,Ne(!1))},It=async(Te,Qe)=>{w(!0),T.current=!0;try{return await l(Te,Qe),!0}catch{return!1}finally{w(!1)}};return u`
5452
5452
  <main class="pane-solid conversation">
5453
5453
  <div class="conversation-body">
5454
5454
  ${A?u`<${d8} entries=${I} selected=${z?null:V?.id??null} resultLocked=${R} winnerSessionId=${_?.vote?.outcome==="win"?_.vote.winnerSessionId:null} onSelect=${q} />`:null}
@@ -5463,7 +5463,7 @@ export async function retry<T>(fn: () => Promise<T>, attempts = 3, delayMs = 100
5463
5463
  ${H&&X?u`<${M8} chat=${t} columns=${t.columns} />`:se?u`<${w8} chat=${t} columns=${B} onOpenTranscript=${Te=>{j(!1),g0(t,Te,f).catch(()=>{})}} />`:z?u`<${p8} chat=${t} entries=${I} match=${_} onSelect=${q} />`:u`<div class="messages-frame"><div
5464
5464
  class="messages"
5465
5465
  ref=${x}
5466
- onScroll=${Te=>{let Qe=Te.currentTarget;T.current=Qe.scrollHeight-Qe.scrollTop-Qe.clientHeight<80,Oe(!T.current)}}
5466
+ onScroll=${Te=>{let Qe=Te.currentTarget;T.current=Qe.scrollHeight-Qe.scrollTop-Qe.clientHeight<80,Ne(!T.current)}}
5467
5467
  >
5468
5468
  ${t.local||t.readOnly?null:u`<${a7} container=${x} />`}
5469
5469
  <div class="messages-inner" role="log" aria-label="Conversation" aria-live="polite" aria-relevant="additions text">
@@ -6608,7 +6608,7 @@ Tycoon`} value=${g} disabled=${!t} onInput=${w=>c(w.target.value)} onBlur=${()=>
6608
6608
  </div>
6609
6609
  </div>
6610
6610
  `}ts({id:"archived-chats",title:"Archived chats",nav:!1,render:t=>u`<${oW} openStarted=${t.openStarted} />`});function IT(t,e,n){return t===null||e===null||n===null||e.some(s=>s.id===t)||n.some(s=>s.chatId===t)}var Bu="agentsky:selected-chat",PT="agentsky:composer-choice",RT="agentsky:onboarded",jn=new URLSearchParams(window.location.search).get("draft")??"new",lW=4,cW=120,wv=t=>String(t).trim().split(`
6611
- `)[0].trim().slice(0,80)||"New chat",xv=t=>{try{return(t===Bu?sessionStorage:localStorage).getItem(t)}catch{return null}},W0=(t,e)=>{try{let n=t===Bu?sessionStorage:localStorage;e===null?n.removeItem(t):n.setItem(t,e)}catch{}},kv=()=>{try{return localStorage}catch{return null}},uW=()=>{try{return JSON.parse(xv(PT)??"null")??{}}catch{return{}}};function dW(t,e){let n=t?.find(i=>i.agentType===e.agentType)??(e.agentType?null:t?.find(i=>i.agentType==="hermes"))??t?.[0]??null;if(!n)return null;let s=n.models.find(i=>i.id===e.llm)??n.models.find(i=>i.id===n.defaultModel)??n.models[0],a=s.efforts.some(i=>i.value===e.effort)?e.effort:s.defaultEffort;return{agent:n,model:s,effort:a}}function hW(){D(()=>_e("app:prepare-close",async({requestId:W})=>{let re;try{re=await XS()}catch(pe){re={ready:!1,error:pe.message}}await ct.closeReady({requestId:W,...re})}),[]);let t=Ta(),e=Q(t);e.current=t;let[n,s]=y(null),[a,i]=y(null),[r,o]=y(null),[l,c]=y(null),[d,h]=y(null),[p,f]=y(null),[m,b]=y(null),[g,$]=y(()=>xv(Bu)),[v,w]=y({}),[x,T]=y({}),[k,A]=y({}),[E,S]=y(()=>U1(kv())),_=Q("");_.current=E[jn]??"";let I=Q(new Map),R=fe(W=>S(re=>{let pe=typeof W=="function"?W(re):W;return jS(kv(),re,pe),pe}),[]);D(()=>{let W=re=>{re.storageArea!==localStorage||re.key!==null&&!re.key.startsWith("draft:")||S(pe=>({...U1(kv()),[jn]:pe[jn]??""}))};return window.addEventListener("storage",W),()=>window.removeEventListener("storage",W)},[]);let P=fe((W,re,pe)=>{(I.current.get(W)??0)===pe&&R(me=>me[W]?me:{...me,[W]:re})},[R]),O=Q(new Set),Z=fe((W,re)=>{O.current.add(W),T(pe=>({...pe,[W]:re.message}))},[]),z=fe((W,re)=>{I.current.set(W,(I.current.get(W)??0)+1),R(pe=>({...pe,[W]:re})),O.current.delete(W)&&(Eo(W),T(pe=>pe[W]?{...pe,[W]:null}:pe))},[R]),[V,q]=y(()=>new Set),[B,J]=y(null);D(()=>d2(J),[]),D(()=>_T({onSetup:()=>he(1)}),[]);let[j,se]=y(null),[X,H]=y(null);Fe(()=>Z5(j),[j]);let[oe,ce]=y(uW),[le,ae]=y(0),[de,he]=y(()=>xv(RT)==="1"?null:1),[qe,St]=y(null),[bt,Ue]=y(null),sn=async(W,re)=>{try{await Ht.updateFolder({chatId:W,folder:re}),Ue(pe=>(pe??[]).map(me=>me.chatId===W?{...me,folder:re}:me)),A(pe=>({...pe,[W]:!1})),T(pe=>({...pe,[W]:null}))}catch(pe){T(me=>({...me,[W]:pe.message}))}},We=Q(new Set),Nt=Q(new Map),Bt=Q(()=>{}),Ft=Q(()=>{}),zt=Q(new Map),At=Q(new Map),$e=Q(new Map),Oe=Q(new Set),Re=Q({chats:null,selected:null,localChats:null,threads:{}});Re.current={chats:d,selected:g,localChats:bt,threads:v,page:B,authGeneration:n?.generation};let hn=Q(j);hn.current=j;let gt=n?.signedIn===!0,It=W=>`local:${W}`,Te=fe((W,re)=>{w(pe=>({...pe,[W]:re(pe[W]??on())}))},[]),Qe=fe((W,re)=>T(pe=>({...pe,[W]:re})),[]),bn=fe(W=>(O.current.has(W)||Qe(W,null),Ht.open({chatId:W}).then(({events:re})=>Te(It(W),pe=>ds(pe,re)),re=>Qe(W,re.message))),[Te,Qe]),Vn=fe((W,re=!1)=>(Oe.current.add(W),Qe(W,null),bo.open({id:W}).then(pe=>h(me=>(me??[]).map(Me=>Me.id===W?{...Me,sessionId:pe.sessionId,llm:pe.llm,reasoningEffort:pe.reasoningEffort,interactionMode:pe.interactionMode,experience:pe.experience}:Me)),pe=>{Oe.current.delete(W),re||Qe(W,pe.message)})),[Qe]),at=fe(W=>{if(J(null),$(W),W0(Bu,W),W===null){ae(re=>re+1);return}q(re=>{if(!re.has(W))return re;let pe=new Set(re);return pe.delete(W),pe})},[]),Qn=fe(W=>{We.current.add(W.id),Oe.current.add(W.id),h(re=>[W,...(re??[]).filter(pe=>pe.id!==W.id)]),at(W.id)},[at]),Is=fe(()=>at(null),[at]),$n=fe(()=>{if(t===null)return;if(t){h([]),b(null);return}let W=ut();bo.list({workspace:W}).then(re=>{if(e.current!==!1||W!==ut())return;let pe=new Set(re.map(me=>me.id));h(me=>[...(me??[]).filter(Me=>We.current.has(Me.id)&&!pe.has(Me.id)),...re]),b(null)},re=>{e.current!==!1||W!==ut()||(re?.code==="workspace_unavailable"&&ut()?Va(""):b(re.message))})},[t]);D(()=>{n?.signedIn===!1&&ut()&&Va("")},[n]);let Jn=fe((W,re)=>(Qe(W,null),xt.history({id:re,tail:!0}).then(({events:pe,session:me,earlier:Me})=>Te(re,Ie=>If(Ie,pe,me,Me)),pe=>Qe(W,pe.message))),[Te,Qe]),Rs=fe((W,re,pe)=>xt.history({id:re,before:pe}).then(({events:me,earlier:Me})=>Te(re,Ie=>Ie.earlier===pe?a2(Ie,me,Me):Ie),me=>Qe(W,me.message)),[Te,Qe]),yn=Q(new Set),vn=Q(new Set),rs=fe(W=>{let re=W?.sessionId;!re||W.local||vn.current.has(re)||Re.current.threads[re]?.loaded||(vn.current.add(re),xt.history({id:re,tail:!0}).then(({events:pe,session:me,earlier:Me})=>Te(re,Ie=>If(Ie,pe,me,Me)),()=>vn.current.delete(re)))},[Te]),we=fe(W=>{if(_.current&&_.current!==W){ct.openWindow({prefill:W}).catch(re=>je.alert({title:"Could not open the requested task",message:re.message}));return}at(null),R(re=>({...re,[jn]:W}))},[at]),ht=fe(W=>{if(W.view==="new")at(null);else if(W.view==="settings")J({id:"settings",payload:W.section?{section:W.section}:null});else if(W.view==="search")yA();else if(W.view==="market")J({id:"market",payload:null});else if(W.view==="session"){let re=Re.current.chats?.find(pe=>pe.sessionId===W.id);re?at(re.id):f(W.id)}else(W.view==="chat"||W.view==="local")&&at(W.id)},[at]);D(()=>{if(!p||!d)return;let W=d.find(re=>re.sessionId===p);f(null),W?at(W.id):d0({id:p,title:"Chat"})},[p,d,at]),D(()=>{_a.state().then(s),ct.info().then(c);let W=0,re=()=>{let me=++W;return Ht.detect().then(Me=>{me===W&&St(Me)}).catch(()=>{})};re(),window.addEventListener("focus",re),Ht.list().then(me=>Ue(me??[])).catch(()=>{});let pe=[()=>window.removeEventListener("focus",re),zk(ht),_e("auth:changed",me=>{Re.current.authGeneration=me.generation,s(me),re()}),_e("permissions:needed",({kind:me}={})=>i(typeof me=="string"?me:null)),_e("navigate",ht),_e("task:prefill",we),_e("chats:changed",({removed:me,renamed:Me,title:Ie})=>h(Ge=>(Ge??[]).filter(wt=>wt.id!==me).map(wt=>wt.id===Me?{...wt,title:Ie}:wt))),_e("session:connection",({sessionId:me,state:Me})=>Te(me,Ie=>hd(Ie,Me))),_e("session:event",({sessionId:me,event:Me})=>{Te(me,Ge=>Or(Ge,Me));let Ie=Re.current.chats?.find(Ge=>Ge.sessionId===me);Me.type==="session.status_running"&&Ie&&Jn(Ie.id,me),Me.type==="session.status_idle"&&Ie&&(Ie.id!==Re.current.selected||!document.hasFocus())&&q(Ge=>new Set(Ge).add(Ie.id))}),_e("local:event",({chatId:me,event:Me})=>{Re.current.localChats&&!Re.current.localChats.some(Ge=>Ge.chatId===me)&&Ht.list().then(Ue).catch(()=>{});let Ie=It(me);Te(Ie,Ge=>Or(Ge,Me)),Me.type==="session.status_idle"&&me!==Re.current.selected&&q(Ge=>new Set(Ge).add(me))}),_e("local:pressure",({chatId:me,notice:Me})=>v2(me,Me)),_e("local:pressure-lift",({chatId:me})=>{at(me),Bt.current(me)}),_e("local:done",({chatId:me,cliSessionId:Me,stopped:Ie,continuedIn:Ge,workspace:wt})=>{Nt.current.delete(me),Ge&&Ft.current(me,Ge,wt),w2(me);let it=It(me);Ie&&Te(it,lt=>({...lt.status==="running"?Or(lt,{type:"user.interrupt",id:`stop:local:${me}:${Date.now()}`}):lt,status:"idle",activity:""})),Ue(lt=>(lt??[]).map(Vt=>Vt.chatId===me?{...Vt,cliSessionId:Me,updatedAt:Date.now()}:Vt)),Ge||Ht.list().then(Ue).catch(()=>{})}),_e("local:error",({chatId:me,message:Me,code:Ie})=>{let Ge=It(me);Te(Ge,it=>({...it,status:"idle",activity:""}));let wt=Nt.current.get(me);wt?(P(me,wt.text,wt.revision),Z(me,new Error(Me))):T(it=>({...it,[me]:Me})),A(it=>({...it,[me]:Ie==="folder_gone"}))}),_e("thisMac:changed",()=>T({}))];return()=>pe.forEach(me=>me())},[ht,we,Te,Jn]),D(()=>{Oe.current.clear(),We.current.clear(),yn.current.clear(),vn.current.clear(),zt.current.clear(),At.current.clear();for(let me of $e.current.values())me();if($e.current.clear(),h(null),w(me=>Object.fromEntries(Object.entries(me).filter(([Me])=>Me.startsWith("local:")))),q(new Set),se(null),!gt)return;$n(),ct.takePrefill().then(({view:me,prefill:Me,grant:Ie,files:Ge})=>{typeof Ie=="string"&&i(Ie),Me?we(Me):me&&ht(me),Ge?.length&&Tv(Ge.map(wt=>new File([wt.bytes],wt.name)))}).catch(me=>je.alert({title:"Could not open the requested chat",message:me.message}).catch(()=>{}));let W=()=>{if(t!==!1){H(null);return}return Yt.options().then(me=>{e.current===!1&&(se(me),H(null))},me=>{e.current===!1&&H(me.message)})};W();let re=()=>{$n(),hn.current===null&&W()};window.addEventListener("focus",re);let pe=setInterval($n,3e4);return()=>{clearInterval(pe),window.removeEventListener("focus",re)}},[gt,n?.generation,$n,ht,we,t]),D(()=>nn(()=>{We.current.clear(),h(null),$n()}),[$n]),D(()=>{IT(g,d,bt)||(B?($(null),W0(Bu,null)):at(null))},[d,bt,g,at,B]);let Ct=bt?.find(W=>W.chatId===g)??null,Ne=Ct?{id:Ct.chatId,title:Ct.title??"Local chat",agentType:Ct.agent,local:!0,localMeta:Ct,readOnly:!!Ct.lifted,sessionId:null,llm:null,agentCount:1,updatedAt:new Date(Ct.updatedAt??0).toISOString(),working:!1,statusLine:null,pinned:!1,archived:!1,attention:null,agents:[]}:d?.find(W=>W.id===g)??null,An=Ne?.id??null,an=Ne?.local?null:Ne?.sessionId??null,js=Ne?.local?It(An):null,da=js?v[js]?.loaded===!0:an?v[an]?.loaded===!0:!1;sA(gt&&!B&&!Ne?.local&&!Ne?.pending?Ne:null,$n),D(()=>{!Ne?.local||!An||Re.current.threads[It(An)]?.loaded||bn(An)},[Ne?.local,An,gt,bn]),D(()=>{if(!gt||!An||Ne?.local||Ne?.pending||(Oe.current.has(An)||Vn(An,!!an),!an))return;xt.watch({id:an}).catch(()=>{});let W=!yn.current.has(an);yn.current.add(an),(!da||W)&&Jn(An,an)},[gt,An,an,da,Jn,Vn,Ne?.local]);let Vs=Q({});D(()=>{for(let W of d??[]){let re=W.sessionId?v[W.sessionId]:null;if(!re)continue;let pe=Vs.current[W.sessionId];Vs.current[W.sessionId]=re.connection,pe==="retrying"&&re.connection==="open"&&Jn(W.id,W.sessionId)}},[d,v,Jn]);let ue=fe(W=>j?.find(re=>re.agentType===W.agentType)?.name??W.agentType,[j]),tn=W=>j?.find(re=>re.agentType===W.agentType)?.models.find(re=>re.id===W.llm)?.name??W.llm,{previews:Se,working:Rt,ordered:ha}=Fe(()=>{let W={},re=new Set;for(let Me of d??[]){let Ie=vn.current.has(Me.sessionId)&&!yn.current.has(Me.sessionId),Ge=Me.sessionId&&!Ie?v[Me.sessionId]:null,wt=Ge?c2(Ge):null;wt&&(W[Me.id]=wt),(Ge&&(Ge.loaded||Ge.items.length)?Ge.status==="running"||Ge.status==="provisioning":Me.working)&&re.add(Me.id)}let pe=Me=>new Date(W[Me.id]?.at??Me.updatedAt??0).getTime(),me=d===null?null:[...d].sort((Me,Ie)=>pe(Ie)-pe(Me));return{previews:W,working:re,ordered:me}},[d,v]),qi=(ha??[]).filter(W=>W.sessionId&&!W.local&&W.id!==g).slice(0,lW).map(W=>W.id).join(" ");D(()=>{if(!gt||!qi)return;let re=qi.split(" ").map(pe=>Re.current.chats?.find(me=>me.id===pe)).filter(Boolean).map((pe,me)=>{let Me=null,Ie=setTimeout(()=>{Me=requestIdleCallback(()=>rs(pe))},me*cW);return()=>{clearTimeout(Ie),Me!==null&&cancelIdleCallback(Me)}});return()=>re.forEach(pe=>pe())},[gt,qi,rs]);let[mi,gi]=y([]);D(()=>gt?o0(gi):void 0,[gt]);let[Cl,Tl]=y(null);D(()=>{if(!gt||de===null){Tl(null);return}let W=!0;return Nn.composer().then(re=>{W&&Tl(re.length>0)},()=>{W&&Tl(!0)}),()=>{W=!1}},[gt,de]);let Ma=Fe(()=>l0(j,mi),[j,mi]),Ya=Fe(()=>dW(Ma,oe),[Ma,oe]),El=W=>{let re={...oe,...W};ce(re),W0(PT,JSON.stringify(re))},rn=async(W,re,pe={})=>{let me=I.current.get(W.id)??0;if(W.local){Qe(W.id,null);let Me=It(W.id);Nt.current.set(W.id,{text:re,revision:me}),Te(Me,Ie=>Hl(Ie,re)),pe.preserveDraft||R(Ie=>({...Ie,[W.id]:""}));try{await Ht.start({chatId:W.id,agent:W.agentType,folder:W.localMeta?.folder,text:re,cliSessionId:W.localMeta?.cliSessionId??null})}catch(Ie){throw Te(Me,Ge=>({...Ge,items:Ge.items.filter(wt=>!(wt.pending&&wt.text===re)),status:"idle",activity:""})),P(W.id,re,me),Z(W.id,Ie),Ie}return}try{Qe(W.id,null),Te(W.sessionId,Me=>re?Hl(Me,re):{...Me,status:"running",activity:"Thinking"}),R(Me=>({...Me,[W.id]:""})),await xt.send({chatId:W.id,text:re,files:pe.files,...pe.interactionMode?{interactionMode:pe.interactionMode}:{},...Array.isArray(pe.columnIds)?{columnIds:pe.columnIds}:aA(W)}),Qe(W.id,null),Jn(W.id,W.sessionId)}catch(Me){throw Te(W.sessionId,Ie=>({...Ie,items:Ie.items.filter(Ge=>!(Ge.pending&&Ge.text===re)),status:"idle",activity:""})),P(W.id,re,me),Z(W.id,Me),$d(W.id,Me),Me}},Wi=async(W,re={},pe=null)=>{if(re.localAgent){let{agent:it,folder:lt,picked:Vt,model:Ln=null,effort:Cr=null}=re.localAgent,On=`${Date.now()}-${Math.random().toString(36).slice(2)}`,Wu=It(On),_l=I.current.get(On)??0;Nt.current.set(On,{text:W,revision:_l});let Gi={chatId:On,agent:it,folder:lt,title:wv(W),updatedAt:Date.now(),cliSessionId:null,model:Ln,effort:Cr};Ue($s=>[Gi,...$s??[]]),Te(Wu,$s=>Hl($s,W)),R($s=>({...$s,[jn]:""})),Qe(jn,null),at(On);try{let $s=await Ht.start({chatId:On,agent:it,folder:lt,picked:Vt,text:W,cliSessionId:null,model:Ln,effort:Cr});$s?.folder&&$s.folder!==lt&&Ue(Tr=>(Tr??[]).map(ji=>ji.chatId===On?{...ji,folder:$s.folder}:ji))}catch($s){throw Te(Wu,Tr=>({...Tr,items:Tr.items.filter(ji=>!(ji.pending&&ji.text===W)),status:"idle",activity:""})),P(On,W,_l),Z(On,$s),$s}return}let me=I.current.get(jn)??0,Me=Ya.agent.engineType??Ya.agent.agentType,Ie=`pending:${crypto.randomUUID()}`,Ge={...on(),...W?Hl(on(),W):{},status:"provisioning"};We.current.add(Ie),w(it=>({...it,[Ie]:Ge})),h(it=>[{id:Ie,pending:!0,title:wv(W),agentType:Me,llm:Ya.model.id,agentCount:1,updatedAt:new Date().toISOString(),working:!0,statusLine:null,sessionId:null,pinned:!1,archived:!1,attention:null},...it??[]]),Qe(jn,null),Eo(jn),R(it=>({...it,[jn]:""})),at(Ie);let wt=()=>{We.current.delete(Ie),h(it=>(it??[]).filter(lt=>lt.id!==Ie)),w(({[Ie]:it,...lt})=>lt)};try{let it=await xt.start({...re,...rA(),...X6(),agentType:Me,agentId:Ya.agent.agentId,llm:Ya.model.id,reasoningEffort:Ya.effort??void 0,text:W});We.current.add(it.id),$7(it.id,it.localProject),b0(),w(({[Ie]:lt,...Vt})=>({...Vt,[it.sessionId]:{...Vt[it.sessionId]??lt??Ge,status:"provisioning"}})),We.current.delete(Ie),h(lt=>[it,...(lt??[]).filter(Vt=>Vt.id!==Ie&&Vt.id!==it.id)]),Re.current.selected===Ie&&at(it.id)}catch(it){throw wt(),P(jn,W,me),Re.current.selected===Ie&&!Re.current.page&&(at(null),pe?.()),Z(jn,it),$d(jn,it),it}},Fu=(W,re)=>{El({agentType:W,llm:re,effort:void 0}),at(null)},bi=async(W,{workspace:re=ut(),canOpen:pe=()=>!0}={})=>{let me=Re.current.authGeneration,Me=await bo.list({workspace:re});return me!==Re.current.authGeneration||ut()!==re||!pe()?!1:(Me&&h(Ie=>[...(Ie??[]).filter(Ge=>We.current.has(Ge.id)&&!Me.some(wt=>wt.id===Ge.id)),...Me]),at(W),!0)},po=async W=>{let re=Re.current.authGeneration,pe=It(W),me=Re.current.localChats?.find(Ie=>Ie.chatId===W),Me=typeof me?.workspace=="string"?me.workspace:ut();At.current.set(W,{workspace:Me,title:me?.title??"Chat"}),Qe(W,null),jl(W),Eo(W),Te(pe,Ie=>({...Ie,status:"running",activity:"Moving to the cloud"}));try{let Ie=await Ht.lift({chatId:W,stopRun:!0});if(re!==Re.current.authGeneration||(Te(pe,Ge=>({...Ge,status:"idle",activity:""})),!Ie))return;Ie.reusedContinuation&&Ds("Updated the existing cloud chat with your latest local context."),Ft.current(W,Ie.threadId)}catch(Ie){if(re!==Re.current.authGeneration)return;let Ge=!1,wt=lt=>{lt.chatId===W&&(Ge=!0)},it=[_e("local:event",lt=>{["session.status_running","session.status_idle","user.interrupt"].includes(lt.event?.type)&&wt(lt)}),_e("local:done",wt),_e("local:error",wt)];try{let lt=await Ht.open({chatId:W});if(re!==Re.current.authGeneration)return;Ge||Te(pe,Vt=>({...Vt,status:lt.running?"running":"idle",activity:lt.running?"Thinking":""}))}catch{re===Re.current.authGeneration&&!Ge&&Te(pe,lt=>({...lt,activity:lt.status==="running"?"Thinking":""}))}finally{it.forEach(lt=>lt())}if(re!==Re.current.authGeneration)return;if(Oa(Ie?.code)?$d(W,Ie):Qe(W,Ie.message),Ie?.code==="transfer_selection_changed"){let lt=await Ht.list().catch(()=>[]);if(re!==Re.current.authGeneration)return;let Vt=lt.find(On=>On.chatId===W)?.liftRequest,Ln=Vt?.target,Cr=On=>typeof On=="string"&&/^[A-Za-z0-9_-]{1,200}$/.test(On);if((Vt?.workspace??"")!==Me||!Cr(Ln?.threadId)||!Cr(Ln?.sessionId))return;$e.current.get(W)?.(),$e.current.set(W,Ds("This chat already has a cloud continuation.",{duration:0,action:{label:"Open",onClick:async()=>{re===Re.current.authGeneration&&(await Va(Me),re===Re.current.authGeneration&&await bi(Ln.threadId,{workspace:Me,canOpen:()=>re===Re.current.authGeneration}))}}}))}}};Bt.current=po,Ft.current=async(W,re,pe)=>{if(zt.current.get(W)===re)return;zt.current.set(W,re);let me=Re.current.localChats?.find(Ln=>Ln.chatId===W),Me=At.current.get(W),Ie=pe??Me?.workspace??me?.workspace??ut(),Ge=Me?.title??me?.title??"Chat",wt=Re.current.authGeneration,it=()=>wt===Re.current.authGeneration,lt=()=>it()&&Re.current.selected===W&&!Re.current.page&&ut()===Ie,Vt=()=>{it()&&($e.current.get(W)?.(),$e.current.set(W,Ds(`\u201C${Ge}\u201D continues in its original workspace.`,{duration:0,action:{label:"Open",onClick:async()=>{it()&&(await Va(Ie),await bi(re,{workspace:Ie,canOpen:it}))}}})))};try{lt()&&await bi(re,{workspace:Ie,canOpen:lt})||Vt()}catch{Vt()}finally{Ht.list().then(Ue).catch(()=>{})}},k2(W=>{at(W),po(W)});let zu=fe(()=>{e.current===!1&&(H(null),Yt.options().then(W=>{e.current===!1&&(se(W),H(null))},W=>{e.current===!1&&H(W.message)}))},[]),Uu=async W=>{let re=Nt.current.get(W.id)?.text;if(!O.current.has(W.id)||!re)return bn(W.id);let pe=!!(E[W.id]&&E[W.id]!==re);try{await rn(W,re,{preserveDraft:pe})}catch{}},Ml=VS(E,jn),G0=Ml.length?u`<${ne} variant="ghost" size="sm" onClick=${W=>{ls({anchor:W.currentTarget.getBoundingClientRect(),label:"Other unsent drafts",rows:Ml.map(({key:re,text:pe})=>({label:wv(pe),action:()=>{ct.openWindow({draftKey:re}).catch(me=>je.alert({title:"Could not open that draft",message:me.message}))}}))})}}>Other drafts (${Ml.length})</${ne}>`:null,j0=Vl(jn),Hu=(W={})=>u`<${Gy} options=${Ma} optionsError=${X} onRetryOptions=${zu} choice=${Ya} onChoose=${El}
6611
+ `)[0].trim().slice(0,80)||"New chat",xv=t=>{try{return(t===Bu?sessionStorage:localStorage).getItem(t)}catch{return null}},W0=(t,e)=>{try{let n=t===Bu?sessionStorage:localStorage;e===null?n.removeItem(t):n.setItem(t,e)}catch{}},kv=()=>{try{return localStorage}catch{return null}},uW=()=>{try{return JSON.parse(xv(PT)??"null")??{}}catch{return{}}};function dW(t,e){let n=t?.find(i=>i.agentType===e.agentType)??(e.agentType?null:t?.find(i=>i.agentType==="hermes"))??t?.[0]??null;if(!n)return null;let s=n.models.find(i=>i.id===e.llm)??n.models.find(i=>i.id===n.defaultModel)??n.models[0],a=s.efforts.some(i=>i.value===e.effort)?e.effort:s.defaultEffort;return{agent:n,model:s,effort:a}}function hW(){D(()=>_e("app:prepare-close",async({requestId:W})=>{let re;try{re=await XS()}catch(pe){re={ready:!1,error:pe.message}}await ct.closeReady({requestId:W,...re})}),[]);let t=Ta(),e=Q(t);e.current=t;let[n,s]=y(null),[a,i]=y(null),[r,o]=y(null),[l,c]=y(null),[d,h]=y(null),[p,f]=y(null),[m,b]=y(null),[g,$]=y(()=>xv(Bu)),[v,w]=y({}),[x,T]=y({}),[k,A]=y({}),[E,S]=y(()=>U1(kv())),_=Q("");_.current=E[jn]??"";let I=Q(new Map),R=fe(W=>S(re=>{let pe=typeof W=="function"?W(re):W;return jS(kv(),re,pe),pe}),[]);D(()=>{let W=re=>{re.storageArea!==localStorage||re.key!==null&&!re.key.startsWith("draft:")||S(pe=>({...U1(kv()),[jn]:pe[jn]??""}))};return window.addEventListener("storage",W),()=>window.removeEventListener("storage",W)},[]);let P=fe((W,re,pe)=>{(I.current.get(W)??0)===pe&&R(me=>me[W]?me:{...me,[W]:re})},[R]),O=Q(new Set),Z=fe((W,re)=>{O.current.add(W),T(pe=>({...pe,[W]:re.message}))},[]),z=fe((W,re)=>{I.current.set(W,(I.current.get(W)??0)+1),R(pe=>({...pe,[W]:re})),O.current.delete(W)&&(Eo(W),T(pe=>pe[W]?{...pe,[W]:null}:pe))},[R]),[V,q]=y(()=>new Set),[B,J]=y(null);D(()=>d2(J),[]),D(()=>_T({onSetup:()=>he(1)}),[]);let[j,se]=y(null),[X,H]=y(null);Fe(()=>Z5(j),[j]);let[oe,ce]=y(uW),[le,ae]=y(0),[de,he]=y(()=>xv(RT)==="1"?null:1),[qe,St]=y(null),[bt,Ue]=y(null),sn=async(W,re)=>{try{await Ht.updateFolder({chatId:W,folder:re}),Ue(pe=>(pe??[]).map(me=>me.chatId===W?{...me,folder:re}:me)),A(pe=>({...pe,[W]:!1})),T(pe=>({...pe,[W]:null}))}catch(pe){T(me=>({...me,[W]:pe.message}))}},We=Q(new Set),Nt=Q(new Map),Bt=Q(()=>{}),Ft=Q(()=>{}),zt=Q(new Map),At=Q(new Map),$e=Q(new Map),Ne=Q(new Set),Re=Q({chats:null,selected:null,localChats:null,threads:{}});Re.current={chats:d,selected:g,localChats:bt,threads:v,page:B,authGeneration:n?.generation};let hn=Q(j);hn.current=j;let gt=n?.signedIn===!0,It=W=>`local:${W}`,Te=fe((W,re)=>{w(pe=>({...pe,[W]:re(pe[W]??on())}))},[]),Qe=fe((W,re)=>T(pe=>({...pe,[W]:re})),[]),bn=fe(W=>(O.current.has(W)||Qe(W,null),Ht.open({chatId:W}).then(({events:re})=>Te(It(W),pe=>ds(pe,re)),re=>Qe(W,re.message))),[Te,Qe]),Vn=fe((W,re=!1)=>(Ne.current.add(W),Qe(W,null),bo.open({id:W}).then(pe=>h(me=>(me??[]).map(Me=>Me.id===W?{...Me,sessionId:pe.sessionId,llm:pe.llm,reasoningEffort:pe.reasoningEffort,interactionMode:pe.interactionMode,experience:pe.experience}:Me)),pe=>{Ne.current.delete(W),re||Qe(W,pe.message)})),[Qe]),at=fe(W=>{if(J(null),$(W),W0(Bu,W),W===null){ae(re=>re+1);return}q(re=>{if(!re.has(W))return re;let pe=new Set(re);return pe.delete(W),pe})},[]),Qn=fe(W=>{We.current.add(W.id),Ne.current.add(W.id),h(re=>[W,...(re??[]).filter(pe=>pe.id!==W.id)]),at(W.id)},[at]),Is=fe(()=>at(null),[at]),$n=fe(()=>{if(t===null)return;if(t){h([]),b(null);return}let W=ut();bo.list({workspace:W}).then(re=>{if(e.current!==!1||W!==ut())return;let pe=new Set(re.map(me=>me.id));h(me=>[...(me??[]).filter(Me=>We.current.has(Me.id)&&!pe.has(Me.id)),...re]),b(null)},re=>{e.current!==!1||W!==ut()||(re?.code==="workspace_unavailable"&&ut()?Va(""):b(re.message))})},[t]);D(()=>{n?.signedIn===!1&&ut()&&Va("")},[n]);let Jn=fe((W,re)=>(Qe(W,null),xt.history({id:re,tail:!0}).then(({events:pe,session:me,earlier:Me})=>Te(re,Ie=>If(Ie,pe,me,Me)),pe=>Qe(W,pe.message))),[Te,Qe]),Rs=fe((W,re,pe)=>xt.history({id:re,before:pe}).then(({events:me,earlier:Me})=>Te(re,Ie=>Ie.earlier===pe?a2(Ie,me,Me):Ie),me=>Qe(W,me.message)),[Te,Qe]),yn=Q(new Set),vn=Q(new Set),rs=fe(W=>{let re=W?.sessionId;!re||W.local||vn.current.has(re)||Re.current.threads[re]?.loaded||(vn.current.add(re),xt.history({id:re,tail:!0}).then(({events:pe,session:me,earlier:Me})=>Te(re,Ie=>If(Ie,pe,me,Me)),()=>vn.current.delete(re)))},[Te]),we=fe(W=>{if(_.current&&_.current!==W){ct.openWindow({prefill:W}).catch(re=>je.alert({title:"Could not open the requested task",message:re.message}));return}at(null),R(re=>({...re,[jn]:W}))},[at]),ht=fe(W=>{if(W.view==="new")at(null);else if(W.view==="settings")J({id:"settings",payload:W.section?{section:W.section}:null});else if(W.view==="search")yA();else if(W.view==="market")J({id:"market",payload:null});else if(W.view==="session"){let re=Re.current.chats?.find(pe=>pe.sessionId===W.id);re?at(re.id):f(W.id)}else(W.view==="chat"||W.view==="local")&&at(W.id)},[at]);D(()=>{if(!p||!d)return;let W=d.find(re=>re.sessionId===p);f(null),W?at(W.id):d0({id:p,title:"Chat"})},[p,d,at]),D(()=>{_a.state().then(s),ct.info().then(c);let W=0,re=()=>{let me=++W;return Ht.detect().then(Me=>{me===W&&St(Me)}).catch(()=>{})};re(),window.addEventListener("focus",re),Ht.list().then(me=>Ue(me??[])).catch(()=>{});let pe=[()=>window.removeEventListener("focus",re),zk(ht),_e("auth:changed",me=>{Re.current.authGeneration=me.generation,s(me),re()}),_e("permissions:needed",({kind:me}={})=>i(typeof me=="string"?me:null)),_e("navigate",ht),_e("task:prefill",we),_e("chats:changed",({removed:me,renamed:Me,title:Ie})=>h(Ge=>(Ge??[]).filter(wt=>wt.id!==me).map(wt=>wt.id===Me?{...wt,title:Ie}:wt))),_e("session:connection",({sessionId:me,state:Me})=>Te(me,Ie=>hd(Ie,Me))),_e("session:event",({sessionId:me,event:Me})=>{Te(me,Ge=>Or(Ge,Me));let Ie=Re.current.chats?.find(Ge=>Ge.sessionId===me);Me.type==="session.status_running"&&Ie&&Jn(Ie.id,me),Me.type==="session.status_idle"&&Ie&&(Ie.id!==Re.current.selected||!document.hasFocus())&&q(Ge=>new Set(Ge).add(Ie.id))}),_e("local:event",({chatId:me,event:Me})=>{Re.current.localChats&&!Re.current.localChats.some(Ge=>Ge.chatId===me)&&Ht.list().then(Ue).catch(()=>{});let Ie=It(me);Te(Ie,Ge=>Or(Ge,Me)),Me.type==="session.status_idle"&&me!==Re.current.selected&&q(Ge=>new Set(Ge).add(me))}),_e("local:pressure",({chatId:me,notice:Me})=>v2(me,Me)),_e("local:pressure-lift",({chatId:me})=>{at(me),Bt.current(me)}),_e("local:done",({chatId:me,cliSessionId:Me,stopped:Ie,continuedIn:Ge,workspace:wt})=>{Nt.current.delete(me),Ge&&Ft.current(me,Ge,wt),w2(me);let it=It(me);Ie&&Te(it,lt=>({...lt.status==="running"?Or(lt,{type:"user.interrupt",id:`stop:local:${me}:${Date.now()}`}):lt,status:"idle",activity:""})),Ue(lt=>(lt??[]).map(Vt=>Vt.chatId===me?{...Vt,cliSessionId:Me,updatedAt:Date.now()}:Vt)),Ge||Ht.list().then(Ue).catch(()=>{})}),_e("local:error",({chatId:me,message:Me,code:Ie})=>{let Ge=It(me);Te(Ge,it=>({...it,status:"idle",activity:""}));let wt=Nt.current.get(me);wt?(P(me,wt.text,wt.revision),Z(me,new Error(Me))):T(it=>({...it,[me]:Me})),A(it=>({...it,[me]:Ie==="folder_gone"}))}),_e("thisMac:changed",()=>T({}))];return()=>pe.forEach(me=>me())},[ht,we,Te,Jn]),D(()=>{Ne.current.clear(),We.current.clear(),yn.current.clear(),vn.current.clear(),zt.current.clear(),At.current.clear();for(let me of $e.current.values())me();if($e.current.clear(),h(null),w(me=>Object.fromEntries(Object.entries(me).filter(([Me])=>Me.startsWith("local:")))),q(new Set),se(null),!gt)return;$n(),ct.takePrefill().then(({view:me,prefill:Me,grant:Ie,files:Ge})=>{typeof Ie=="string"&&i(Ie),Me?we(Me):me&&ht(me),Ge?.length&&Tv(Ge.map(wt=>new File([wt.bytes],wt.name)))}).catch(me=>je.alert({title:"Could not open the requested chat",message:me.message}).catch(()=>{}));let W=()=>{if(t!==!1){H(null);return}return Yt.options().then(me=>{e.current===!1&&(se(me),H(null))},me=>{e.current===!1&&H(me.message)})};W();let re=()=>{$n(),hn.current===null&&W()};window.addEventListener("focus",re);let pe=setInterval($n,3e4);return()=>{clearInterval(pe),window.removeEventListener("focus",re)}},[gt,n?.generation,$n,ht,we,t]),D(()=>nn(()=>{We.current.clear(),h(null),$n()}),[$n]),D(()=>{IT(g,d,bt)||(B?($(null),W0(Bu,null)):at(null))},[d,bt,g,at,B]);let Ct=bt?.find(W=>W.chatId===g)??null,Oe=Ct?{id:Ct.chatId,title:Ct.title??"Local chat",agentType:Ct.agent,local:!0,localMeta:Ct,readOnly:!!Ct.lifted,sessionId:null,llm:null,agentCount:1,updatedAt:new Date(Ct.updatedAt??0).toISOString(),working:!1,statusLine:null,pinned:!1,archived:!1,attention:null,agents:[]}:d?.find(W=>W.id===g)??null,An=Oe?.id??null,an=Oe?.local?null:Oe?.sessionId??null,js=Oe?.local?It(An):null,da=js?v[js]?.loaded===!0:an?v[an]?.loaded===!0:!1;sA(gt&&!B&&!Oe?.local&&!Oe?.pending?Oe:null,$n),D(()=>{!Oe?.local||!An||Re.current.threads[It(An)]?.loaded||bn(An)},[Oe?.local,An,gt,bn]),D(()=>{if(!gt||!An||Oe?.local||Oe?.pending||(Ne.current.has(An)||Vn(An,!!an),!an))return;xt.watch({id:an}).catch(()=>{});let W=!yn.current.has(an);yn.current.add(an),(!da||W)&&Jn(An,an)},[gt,An,an,da,Jn,Vn,Oe?.local]);let Vs=Q({});D(()=>{for(let W of d??[]){let re=W.sessionId?v[W.sessionId]:null;if(!re)continue;let pe=Vs.current[W.sessionId];Vs.current[W.sessionId]=re.connection,pe==="retrying"&&re.connection==="open"&&Jn(W.id,W.sessionId)}},[d,v,Jn]);let ue=fe(W=>j?.find(re=>re.agentType===W.agentType)?.name??W.agentType,[j]),tn=W=>j?.find(re=>re.agentType===W.agentType)?.models.find(re=>re.id===W.llm)?.name??W.llm,{previews:Se,working:Rt,ordered:ha}=Fe(()=>{let W={},re=new Set;for(let Me of d??[]){let Ie=vn.current.has(Me.sessionId)&&!yn.current.has(Me.sessionId),Ge=Me.sessionId&&!Ie?v[Me.sessionId]:null,wt=Ge?c2(Ge):null;wt&&(W[Me.id]=wt),(Ge&&(Ge.loaded||Ge.items.length)?Ge.status==="running"||Ge.status==="provisioning":Me.working)&&re.add(Me.id)}let pe=Me=>new Date(W[Me.id]?.at??Me.updatedAt??0).getTime(),me=d===null?null:[...d].sort((Me,Ie)=>pe(Ie)-pe(Me));return{previews:W,working:re,ordered:me}},[d,v]),qi=(ha??[]).filter(W=>W.sessionId&&!W.local&&W.id!==g).slice(0,lW).map(W=>W.id).join(" ");D(()=>{if(!gt||!qi)return;let re=qi.split(" ").map(pe=>Re.current.chats?.find(me=>me.id===pe)).filter(Boolean).map((pe,me)=>{let Me=null,Ie=setTimeout(()=>{Me=requestIdleCallback(()=>rs(pe))},me*cW);return()=>{clearTimeout(Ie),Me!==null&&cancelIdleCallback(Me)}});return()=>re.forEach(pe=>pe())},[gt,qi,rs]);let[mi,gi]=y([]);D(()=>gt?o0(gi):void 0,[gt]);let[Cl,Tl]=y(null);D(()=>{if(!gt||de===null){Tl(null);return}let W=!0;return Nn.composer().then(re=>{W&&Tl(re.length>0)},()=>{W&&Tl(!0)}),()=>{W=!1}},[gt,de]);let Ma=Fe(()=>l0(j,mi),[j,mi]),Ya=Fe(()=>dW(Ma,oe),[Ma,oe]),El=W=>{let re={...oe,...W};ce(re),W0(PT,JSON.stringify(re))},rn=async(W,re,pe={})=>{let me=I.current.get(W.id)??0;if(W.local){Qe(W.id,null);let Me=It(W.id);Nt.current.set(W.id,{text:re,revision:me}),Te(Me,Ie=>Hl(Ie,re)),pe.preserveDraft||R(Ie=>({...Ie,[W.id]:""}));try{await Ht.start({chatId:W.id,agent:W.agentType,folder:W.localMeta?.folder,text:re,cliSessionId:W.localMeta?.cliSessionId??null})}catch(Ie){throw Te(Me,Ge=>({...Ge,items:Ge.items.filter(wt=>!(wt.pending&&wt.text===re)),status:"idle",activity:""})),P(W.id,re,me),Z(W.id,Ie),Ie}return}try{Qe(W.id,null),Te(W.sessionId,Me=>re?Hl(Me,re):{...Me,status:"running",activity:"Thinking"}),R(Me=>({...Me,[W.id]:""})),await xt.send({chatId:W.id,text:re,files:pe.files,...pe.interactionMode?{interactionMode:pe.interactionMode}:{},...Array.isArray(pe.columnIds)?{columnIds:pe.columnIds}:aA(W)}),Qe(W.id,null),Jn(W.id,W.sessionId)}catch(Me){throw Te(W.sessionId,Ie=>({...Ie,items:Ie.items.filter(Ge=>!(Ge.pending&&Ge.text===re)),status:"idle",activity:""})),P(W.id,re,me),Z(W.id,Me),$d(W.id,Me),Me}},Wi=async(W,re={},pe=null)=>{if(re.localAgent){let{agent:it,folder:lt,picked:Vt,model:Ln=null,effort:Cr=null}=re.localAgent,On=`${Date.now()}-${Math.random().toString(36).slice(2)}`,Wu=It(On),_l=I.current.get(On)??0;Nt.current.set(On,{text:W,revision:_l});let Gi={chatId:On,agent:it,folder:lt,title:wv(W),updatedAt:Date.now(),cliSessionId:null,model:Ln,effort:Cr};Ue($s=>[Gi,...$s??[]]),Te(Wu,$s=>Hl($s,W)),R($s=>({...$s,[jn]:""})),Qe(jn,null),at(On);try{let $s=await Ht.start({chatId:On,agent:it,folder:lt,picked:Vt,text:W,cliSessionId:null,model:Ln,effort:Cr});$s?.folder&&$s.folder!==lt&&Ue(Tr=>(Tr??[]).map(ji=>ji.chatId===On?{...ji,folder:$s.folder}:ji))}catch($s){throw Te(Wu,Tr=>({...Tr,items:Tr.items.filter(ji=>!(ji.pending&&ji.text===W)),status:"idle",activity:""})),P(On,W,_l),Z(On,$s),$s}return}let me=I.current.get(jn)??0,Me=Ya.agent.engineType??Ya.agent.agentType,Ie=`pending:${crypto.randomUUID()}`,Ge={...on(),...W?Hl(on(),W):{},status:"provisioning"};We.current.add(Ie),w(it=>({...it,[Ie]:Ge})),h(it=>[{id:Ie,pending:!0,title:wv(W),agentType:Me,llm:Ya.model.id,agentCount:1,updatedAt:new Date().toISOString(),working:!0,statusLine:null,sessionId:null,pinned:!1,archived:!1,attention:null},...it??[]]),Qe(jn,null),Eo(jn),R(it=>({...it,[jn]:""})),at(Ie);let wt=()=>{We.current.delete(Ie),h(it=>(it??[]).filter(lt=>lt.id!==Ie)),w(({[Ie]:it,...lt})=>lt)};try{let it=await xt.start({...re,...rA(),...X6(),agentType:Me,agentId:Ya.agent.agentId,llm:Ya.model.id,reasoningEffort:Ya.effort??void 0,text:W});We.current.add(it.id),$7(it.id,it.localProject),b0(),w(({[Ie]:lt,...Vt})=>({...Vt,[it.sessionId]:{...Vt[it.sessionId]??lt??Ge,status:"provisioning"}})),We.current.delete(Ie),h(lt=>[it,...(lt??[]).filter(Vt=>Vt.id!==Ie&&Vt.id!==it.id)]),Re.current.selected===Ie&&at(it.id)}catch(it){throw wt(),P(jn,W,me),Re.current.selected===Ie&&!Re.current.page&&(at(null),pe?.()),Z(jn,it),$d(jn,it),it}},Fu=(W,re)=>{El({agentType:W,llm:re,effort:void 0}),at(null)},bi=async(W,{workspace:re=ut(),canOpen:pe=()=>!0}={})=>{let me=Re.current.authGeneration,Me=await bo.list({workspace:re});return me!==Re.current.authGeneration||ut()!==re||!pe()?!1:(Me&&h(Ie=>[...(Ie??[]).filter(Ge=>We.current.has(Ge.id)&&!Me.some(wt=>wt.id===Ge.id)),...Me]),at(W),!0)},po=async W=>{let re=Re.current.authGeneration,pe=It(W),me=Re.current.localChats?.find(Ie=>Ie.chatId===W),Me=typeof me?.workspace=="string"?me.workspace:ut();At.current.set(W,{workspace:Me,title:me?.title??"Chat"}),Qe(W,null),jl(W),Eo(W),Te(pe,Ie=>({...Ie,status:"running",activity:"Moving to the cloud"}));try{let Ie=await Ht.lift({chatId:W,stopRun:!0});if(re!==Re.current.authGeneration||(Te(pe,Ge=>({...Ge,status:"idle",activity:""})),!Ie))return;Ie.reusedContinuation&&Ds("Updated the existing cloud chat with your latest local context."),Ft.current(W,Ie.threadId)}catch(Ie){if(re!==Re.current.authGeneration)return;let Ge=!1,wt=lt=>{lt.chatId===W&&(Ge=!0)},it=[_e("local:event",lt=>{["session.status_running","session.status_idle","user.interrupt"].includes(lt.event?.type)&&wt(lt)}),_e("local:done",wt),_e("local:error",wt)];try{let lt=await Ht.open({chatId:W});if(re!==Re.current.authGeneration)return;Ge||Te(pe,Vt=>({...Vt,status:lt.running?"running":"idle",activity:lt.running?"Thinking":""}))}catch{re===Re.current.authGeneration&&!Ge&&Te(pe,lt=>({...lt,activity:lt.status==="running"?"Thinking":""}))}finally{it.forEach(lt=>lt())}if(re!==Re.current.authGeneration)return;if(Oa(Ie?.code)?$d(W,Ie):Qe(W,{message:Ie.message,retry:()=>Bt.current(W),retryLabel:"Continue in the cloud"}),Ie?.code==="transfer_selection_changed"){let lt=await Ht.list().catch(()=>[]);if(re!==Re.current.authGeneration)return;let Vt=lt.find(On=>On.chatId===W)?.liftRequest,Ln=Vt?.target,Cr=On=>typeof On=="string"&&/^[A-Za-z0-9_-]{1,200}$/.test(On);if((Vt?.workspace??"")!==Me||!Cr(Ln?.threadId)||!Cr(Ln?.sessionId))return;$e.current.get(W)?.(),$e.current.set(W,Ds("This chat already has a cloud continuation.",{duration:0,action:{label:"Open",onClick:async()=>{re===Re.current.authGeneration&&(await Va(Me),re===Re.current.authGeneration&&await bi(Ln.threadId,{workspace:Me,canOpen:()=>re===Re.current.authGeneration}))}}}))}}};Bt.current=po,Ft.current=async(W,re,pe)=>{if(zt.current.get(W)===re)return;zt.current.set(W,re);let me=Re.current.localChats?.find(Ln=>Ln.chatId===W),Me=At.current.get(W),Ie=pe??Me?.workspace??me?.workspace??ut(),Ge=Me?.title??me?.title??"Chat",wt=Re.current.authGeneration,it=()=>wt===Re.current.authGeneration,lt=()=>it()&&Re.current.selected===W&&!Re.current.page&&ut()===Ie,Vt=()=>{it()&&($e.current.get(W)?.(),$e.current.set(W,Ds(`\u201C${Ge}\u201D continues in its original workspace.`,{duration:0,action:{label:"Open",onClick:async()=>{it()&&(await Va(Ie),await bi(re,{workspace:Ie,canOpen:it}))}}})))};try{lt()&&await bi(re,{workspace:Ie,canOpen:lt})||Vt()}catch{Vt()}finally{Ht.list().then(Ue).catch(()=>{})}},k2(W=>{at(W),po(W)});let zu=fe(()=>{e.current===!1&&(H(null),Yt.options().then(W=>{e.current===!1&&(se(W),H(null))},W=>{e.current===!1&&H(W.message)}))},[]),Uu=async W=>{let re=Nt.current.get(W.id)?.text;if(!O.current.has(W.id)||!re)return bn(W.id);let pe=!!(E[W.id]&&E[W.id]!==re);try{await rn(W,re,{preserveDraft:pe})}catch{}},Ml=VS(E,jn),G0=Ml.length?u`<${ne} variant="ghost" size="sm" onClick=${W=>{ls({anchor:W.currentTarget.getBoundingClientRect(),label:"Other unsent drafts",rows:Ml.map(({key:re,text:pe})=>({label:wv(pe),action:()=>{ct.openWindow({draftKey:re}).catch(me=>je.alert({title:"Could not open that draft",message:me.message}))}}))})}}>Other drafts (${Ml.length})</${ne}>`:null,j0=Vl(jn),Hu=(W={})=>u`<${Gy} options=${Ma} optionsError=${X} onRetryOptions=${zu} choice=${Ya} onChoose=${El}
6612
6612
  draftPicker=${G0} draft=${E[jn]??""} onDraft=${re=>z(jn,re)}
6613
6613
  error=${x[jn]} creditRefused=${Oa(j0?.code)} onStart=${Wi} focusKey=${le} localDetect=${qe} workspaceKey=${ut()??""} ...${W} />`,Ka=W=>R(re=>({...re,[jn]:W})),qu=XA(),Ar=oy();if(n===null)return u`<main class="centered"><${ee} /></main>`;let pa=gt?de:0;return u`
6614
6614
  <div class="titlebar"></div>
@@ -6621,17 +6621,17 @@ Tycoon`} value=${g} disabled=${!t} onInput=${w=>c(w.target.value)} onBlur=${()=>
6621
6621
  onLocalLift=${W=>Bt.current(W)} localChats=${bt} localChatState=${Object.fromEntries((bt??[]).map(W=>{let re=W.chatId;return v[It(re)]?.status==="running"?[re,"working"]:V.has(re)?[re,"done"]:[re,null]}))}
6622
6622
  onLocalDelete=${W=>{Ue(re=>(re??[]).filter(pe=>pe.chatId!==W)),w(re=>{let pe={...re};return delete pe[It(W)],pe}),g===W&&at(null)}}
6623
6623
  onLocalRefresh=${()=>Ht.list().then(Ue).catch(()=>{})} />
6624
- ${B&&Wl(B.id)?u`<div class="place" key=${B.id}><main class="pane-solid page">${Wl(B.id).render({payload:B.payload,options:j,agents:Ma,chooseAgent:Fu,choice:Ya,choose:El,newChatView:Hu,setNewDraft:Ka,openStarted:bi,openChat:at,newChat:W=>W?we(W):at(null),openPage:(W,re=null)=>J({id:W,payload:re}),close:()=>J(null)})}</main><${q5} place=${`page:${B.id}`} /></div>`:Ne?u`<${j8} key=${Ne.id} chat=${Ne} localBilling=${qe?.[Ne.agentType]?.billing} agentName=${Ne.local?Ne.agentType==="codex"?"Codex":"Claude Code":ue(Ne)} modelName=${Ne.local?"Local":tn(Ne)}
6625
- thread=${js?v[js]??on():an?v[an]??on():v[Ne.id]??on()} error=${x[Ne.id]}
6626
- draft=${E[Ne.id]??""} onDraft=${W=>z(Ne.id,W)}
6627
- onSend=${(W,re)=>rn(Ne,W,re)} options=${j} openChat=${at}
6628
- onEarlier=${!Ne.local&&an&&v[an]?.earlier?()=>Rs(Ne.id,an,v[an].earlier):null}
6629
- onChat=${Ne.local?()=>{}:W=>h(re=>(re??[]).map(pe=>pe.id===Ne.id?{...pe,...W}:pe))}
6630
- onStop=${Ne.local?()=>Ht.stop({chatId:Ne.id}).catch(()=>{}):()=>xt.interrupt({chatId:Ne.id}).catch(W=>Qe(Ne.id,W.message))}
6631
- onRetry=${Ne.local?k[Ne.id]?()=>Ht.chooseFolder().then(W=>{if(W)return sn(Ne.id,W)}).catch(W=>Qe(Ne.id,W.message)):()=>Uu(Ne):()=>an?Jn(Ne.id,an):Vn(Ne.id)}
6632
- retryLabel=${Ne.local&&k[Ne.id]?"Choose Folder":"Try again"}
6633
- onFolderChange=${Ne.local?W=>sn(Ne.id,W):null}
6634
- onOpenLifted=${Ne.localMeta?.lifted?.threadId?async()=>{let W=Re.current.authGeneration,re=Ne.localMeta.workspace??ut();await Va(re),W===Re.current.authGeneration&&await bi(Ne.localMeta.lifted.threadId,{workspace:re,canOpen:()=>W===Re.current.authGeneration})}:null} />`:g!==null&&d===null?u`<main class="centered pane-solid">${gt?u`<${ee} />`:null}</main>`:Hu({market:gt&&Wl("market")?Wl("market").render({payload:{embedded:!0},options:j,agents:Ma,chooseAgent:Fu,openStarted:bi,openChat:at,newChat:W=>W?we(W):at(null),openPage:(W,re=null)=>J({id:W,payload:re}),close:()=>{}}):null})}
6624
+ ${B&&Wl(B.id)?u`<div class="place" key=${B.id}><main class="pane-solid page">${Wl(B.id).render({payload:B.payload,options:j,agents:Ma,chooseAgent:Fu,choice:Ya,choose:El,newChatView:Hu,setNewDraft:Ka,openStarted:bi,openChat:at,newChat:W=>W?we(W):at(null),openPage:(W,re=null)=>J({id:W,payload:re}),close:()=>J(null)})}</main><${q5} place=${`page:${B.id}`} /></div>`:Oe?u`<${j8} key=${Oe.id} chat=${Oe} localBilling=${qe?.[Oe.agentType]?.billing} agentName=${Oe.local?Oe.agentType==="codex"?"Codex":"Claude Code":ue(Oe)} modelName=${Oe.local?"Local":tn(Oe)}
6625
+ thread=${js?v[js]??on():an?v[an]??on():v[Oe.id]??on()} error=${x[Oe.id]?.message??x[Oe.id]}
6626
+ draft=${E[Oe.id]??""} onDraft=${W=>z(Oe.id,W)}
6627
+ onSend=${(W,re)=>rn(Oe,W,re)} options=${j} openChat=${at}
6628
+ onEarlier=${!Oe.local&&an&&v[an]?.earlier?()=>Rs(Oe.id,an,v[an].earlier):null}
6629
+ onChat=${Oe.local?()=>{}:W=>h(re=>(re??[]).map(pe=>pe.id===Oe.id?{...pe,...W}:pe))}
6630
+ onStop=${Oe.local?()=>Ht.stop({chatId:Oe.id}).catch(()=>{}):()=>xt.interrupt({chatId:Oe.id}).catch(W=>Qe(Oe.id,W.message))}
6631
+ onRetry=${x[Oe.id]?.retry??(Oe.local?k[Oe.id]?()=>Ht.chooseFolder().then(W=>{if(W)return sn(Oe.id,W)}).catch(W=>Qe(Oe.id,W.message)):()=>Uu(Oe):()=>an?Jn(Oe.id,an):Vn(Oe.id))}
6632
+ retryLabel=${x[Oe.id]?.retryLabel??(Oe.local&&k[Oe.id]?"Choose Folder":"Try again")}
6633
+ onFolderChange=${Oe.local?W=>sn(Oe.id,W):null}
6634
+ onOpenLifted=${Oe.localMeta?.lifted?.threadId?async()=>{let W=Re.current.authGeneration,re=Oe.localMeta.workspace??ut();await Va(re),W===Re.current.authGeneration&&await bi(Oe.localMeta.lifted.threadId,{workspace:re,canOpen:()=>W===Re.current.authGeneration})}:null} />`:g!==null&&d===null?u`<main class="centered pane-solid">${gt?u`<${ee} />`:null}</main>`:Hu({market:gt&&Wl("market")?Wl("market").render({payload:{embedded:!0},options:j,agents:Ma,chooseAgent:Fu,openStarted:bi,openChat:at,newChat:W=>W?we(W):at(null),openPage:(W,re=null)=>J({id:W,payload:re}),close:()=>{}}):null})}
6635
6635
  </div>
6636
6636
  ${pa!==null?u`<${K8} auth=${n} authError=${r} step=${pa} hasAgents=${Cl}
6637
6637
  onCreate=${td.create}