isorite 0.1.0 → 0.1.1

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 (50) hide show
  1. package/dist/main.js +1 -1
  2. package/package.json +1 -1
  3. package/web/_app/immutable/assets/5.CUzWicH8.css +1 -0
  4. package/web/_app/immutable/assets/9.CFA9_nYZ.css +1 -0
  5. package/web/_app/immutable/assets/{NoteEditor.Bp-YDqYj.css → NoteEditor.CM4-yBF-.css} +1 -1
  6. package/web/_app/immutable/assets/Tutorial.BBInFlVA.css +1 -0
  7. package/web/_app/immutable/chunks/{gRYnlonl.js → 3kOo0zFs.js} +1 -1
  8. package/web/_app/immutable/chunks/{DN3dk6rD.js → 7G70dile.js} +3 -3
  9. package/web/_app/immutable/chunks/BC72R-M3.js +3 -0
  10. package/web/_app/immutable/chunks/{B-si2ell.js → BDArRuPR.js} +1 -1
  11. package/web/_app/immutable/chunks/BIIfi70-.js +1 -0
  12. package/web/_app/immutable/chunks/CRzLMJPS.js +1 -0
  13. package/web/_app/immutable/chunks/Cu92X5fL.js +1 -0
  14. package/web/_app/immutable/chunks/DZgc09PI.js +535 -0
  15. package/web/_app/immutable/chunks/{cmGruEKS.js → DhNgPNiM.js} +1 -1
  16. package/web/_app/immutable/chunks/DxgbXXT0.js +13 -0
  17. package/web/_app/immutable/chunks/VWXhPrtT.js +1 -0
  18. package/web/_app/immutable/chunks/czZbKOPp.js +1 -0
  19. package/web/_app/immutable/entry/app.CNsoor0D.js +2 -0
  20. package/web/_app/immutable/entry/start.DFtkKs7u.js +1 -0
  21. package/web/_app/immutable/nodes/0.156ZLyOF.js +2 -0
  22. package/web/_app/immutable/nodes/1.e1XDhJNT.js +1 -0
  23. package/web/_app/immutable/nodes/2.80TQrqQF.js +1 -0
  24. package/web/_app/immutable/nodes/3.Bk_l60Ut.js +13 -0
  25. package/web/_app/immutable/nodes/4.CektBUbm.js +2 -0
  26. package/web/_app/immutable/nodes/5.65PWTBsr.js +4 -0
  27. package/web/_app/immutable/nodes/6.a_57GKer.js +1 -0
  28. package/web/_app/immutable/nodes/7.DbM_N4_u.js +1 -0
  29. package/web/_app/immutable/nodes/8.CY3JWStn.js +1 -0
  30. package/web/_app/immutable/nodes/9.DurALis5.js +530 -0
  31. package/web/_app/version.json +1 -1
  32. package/web/index.html +19 -11
  33. package/web/_app/immutable/assets/5.BCvLF9Xz.css +0 -1
  34. package/web/_app/immutable/chunks/BD1Dpm2e.js +0 -3
  35. package/web/_app/immutable/chunks/C0fpmehI.js +0 -1
  36. package/web/_app/immutable/chunks/CWYACT2V.js +0 -1
  37. package/web/_app/immutable/chunks/CdQZ-ArP.js +0 -1
  38. package/web/_app/immutable/chunks/DtAOoM-T.js +0 -1
  39. package/web/_app/immutable/chunks/DykrN7z5.js +0 -535
  40. package/web/_app/immutable/entry/app.DgJiXIYs.js +0 -2
  41. package/web/_app/immutable/entry/start.l9vV7NaJ.js +0 -1
  42. package/web/_app/immutable/nodes/0.DWPeBju2.js +0 -1
  43. package/web/_app/immutable/nodes/1.CJVDS8FT.js +0 -1
  44. package/web/_app/immutable/nodes/2.o8ItfT-a.js +0 -1
  45. package/web/_app/immutable/nodes/3.uhHyOPGK.js +0 -13
  46. package/web/_app/immutable/nodes/4.BYKkAZTp.js +0 -2
  47. package/web/_app/immutable/nodes/5.BzEQO7Xv.js +0 -4
  48. package/web/_app/immutable/nodes/6.GxiAUa6J.js +0 -1
  49. package/web/_app/immutable/nodes/7.d2Ere8Jb.js +0 -1
  50. package/web/_app/immutable/nodes/8.CvPHZL8j.js +0 -1
@@ -0,0 +1,535 @@
1
+ import{A as e,C as t,D as n,E as r,H as i,I as a,J as o,K as s,N as c,O as l,P as u,Q as d,R as f,T as p,V as m,X as h,Y as g,Z as _,at as v,b as y,c as ee,dt as b,et as x,h as S,i as te,it as ne,k as C,lt as re,n as ie,nt as ae,pt as oe,q as se,s as ce,u as le,x as ue,z as de}from"./BC72R-M3.js";import{t as fe}from"./czZbKOPp.js";import"./xihTtKlq.js";import{i as pe,n as me,t as he}from"./3kOo0zFs.js";import{_ as ge,b as _e,c as ve,f as ye,g as be,l as xe,p as Se,s as Ce,t as we,u as w,v as Te,y as Ee}from"./7G70dile.js";import"./VWXhPrtT.js";var De=[`low`,`mid`,`max`];function Oe(){try{let e=localStorage.getItem(`isorite.tier`);if(e&&De.includes(e))return e}catch{}return`mid`}var ke=class{note;#e=d([]);get entries(){return a(this.#e)}set entries(e){_(this.#e,e)}#t=d(null);get prompt(){return a(this.#t)}set prompt(e){_(this.#t,e)}#n=d(null);get asking(){return a(this.#n)}set asking(e){_(this.#n,e)}#r=d(null);get failed(){return a(this.#r)}set failed(e){_(this.#r,e)}#i=d(h(Oe()));get tier(){return a(this.#i)}set tier(e){_(this.#i,e,!0)}#a=d(null);get cursor(){return a(this.#a)}set cursor(e){_(this.#a,e)}#o=d(``);get busy(){return a(this.#o)}set busy(e){_(this.#o,e,!0)}#s=d(null);get editing(){return a(this.#s)}set editing(e){_(this.#s,e,!0)}stop=null;constructor(e){this.note=e}#c=x(()=>Se(this.entries));get waiting(){return a(this.#c)}set waiting(e){_(this.#c,e)}#l=x(()=>this.waiting.filter(e=>e.form===`insert`));get proposals(){return a(this.#l)}set proposals(e){_(this.#l,e)}#u=x(()=>{let e=[],t=be(this.note.text);for(let n of this.waiting)if(n.form===`rewrite`)for(let r of n.open??[]){let i=n.regions[r],a=Ce(this.note.text,i.old),o=a?this.note.text.slice(0,a.from).split(`
2
+ `).length-1:-1,s=t.find(e=>e.from<=o&&o<e.to);e.push({key:`r:${n.id}:${r}`,proposal:n,k:r,at:a,block:/\n/.test(i.old.text.trim())||/\n/.test(i.new.trim()),code:!!(s&&/^\s*(```|~~~)/.test(s.text))})}return e.sort((e,t)=>(e.at?.from??1/0)-(t.at?.from??1/0))});get changes(){return a(this.#u)}set changes(e){_(this.#u,e)}#d=x(()=>{try{let e=Te(this.note.text)[0];return{lines:e.split(`
3
+ `).length-1,chars:e.length}}catch{return{lines:0,chars:0}}});get head(){return a(this.#d)}set head(e){_(this.#d,e)}get foot(){return this.note.text.split(`
4
+ `).length}spans(e){return e.flatMap(e=>{let t=Ce(this.note.text,e);return t?[t]:[]})}placed(e){return w(this.note.text,e)!==null}#f=x(()=>{let e=[];for(let t of this.proposals){let n=w(this.note.text,t);e.push({key:`p:${t.id}`,line:n?.form===`insert`?n.line:this.foot})}this.changes.some(e=>!e.at)&&e.push({key:`lost`,line:this.foot}),this.asking&&e.push({key:`asking`,line:this.asking.line}),this.failed&&e.push({key:`failed`,line:this.failed.line}),this.prompt&&e.push({key:`prompt`,line:this.prompt.line});let t=this.changes.filter(e=>e.at);for(let n of t)n.block&&e.push({key:n.key,line:this.note.text.slice(0,n.at.to).split(`
5
+ `).length});return{blocks:e,picked:this.spans(this.prompt?.regions??this.asking?.regions??[]),old:t.map(e=>e.at),inline:t.filter(e=>!e.block).map(e=>({key:e.key,at:e.at.to}))}});get layout(){return a(this.#f)}set layout(e){_(this.#f,e)}async open(){this.stop=he.on(e=>this.hear(e));try{this.entries=await he.api.journal(this.note.id)}catch{}}close(){this.stop?.()}hear(e){if(e.type===`journal`){if(e.id!==this.note.id||this.entries.some(t=>t.id===e.entry.id))return;this.entries=[...this.entries,e.entry];let t=e.entry.kind===`discard`||e.entry.kind===`change`?e.entry.proposal:void 0;t&&this.editing?.id===t&&(this.editing=null);return}if(e.type===`note-changed`||e.type===`record`||e.type===`agent-sent`||!(`note`in e)||e.note!==this.note.id)return;if(e.type===`iso-start`){if(e.place.form===`mark`)return;if(this.asking&&!this.asking.request){this.asking={...this.asking,request:e.request};return}let t=this.foot;if(e.place.form===`insert`||e.place.form===`rewrite`){let n=w(this.note.text,{form:`insert`,after:e.place.after,before:e.place.before});n?.form===`insert`&&(t=n.line)}this.asking={request:e.request,asked:e.asked,line:t,regions:e.place.form===`rewrite`?e.place.regions:[],text:``,steps:[]},this.failed=null,this.prompt=null;return}let t=this.asking;t&&t.request===e.request&&(e.type===`iso-text`?this.asking={...t,text:e.again?e.delta:t.text+e.delta}:e.type===`iso-step`?this.asking={...t,text:``,steps:[...t.steps,e.step]}:(e.type===`iso-failed`&&(this.failed={line:t.line,message:e.message}),this.asking=null))}promptAt(e,t){let n=be(this.note.text).find(t=>t.from<=e&&e<t.to);this.failed=null,this.prompt={line:n?n.to:e,mode:`insert`,regions:[]},t&&t.to>t.from&&(this.setMode(`rewrite`),this.pick([t]))}promptHere(){let e=this.cursor;e?this.promptAt(e.line,e):this.promptAt(this.foot)}setMode(e){this.prompt&&={...this.prompt,mode:e}}get picking(){return this.prompt?.mode===`rewrite`}pick(e){let t=this.prompt;if(!t)return;let n=this.note.text,r=this.spans(t.regions);for(let t of e){let{from:e,to:i}=t;for(;e<i&&/\s/.test(n[e]);)e++;for(;i>e&&/\s/.test(n[i-1]);)i--;if(i<=e||e<this.head.chars)continue;let a=r.filter(t=>t.from<=i&&e<=t.to);r=[...r.filter(e=>!a.includes(e)),{from:Math.min(e,...a.map(e=>e.from)),to:Math.max(i,...a.map(e=>e.to))}]}r.sort((e,t)=>e.from-t.from),this.prompt={...t,regions:r.map(e=>ye(n,e.from,e.to))}}unpick(e){let t=this.prompt;if(!t)return;let n=t.regions.filter(t=>{let n=Ce(this.note.text,t);return!n||e<n.from||e>=n.to});n.length!==t.regions.length&&(this.prompt={...t,regions:n})}clearPicked(){this.prompt&&={...this.prompt,regions:[]}}setTier(e){this.tier=e;try{localStorage.setItem(`isorite.tier`,e)}catch{}}async ask(e){let t=this.prompt;if(!t||!e.trim()||this.asking||t.mode===`rewrite`&&!t.regions.length)return;let n=t.mode===`rewrite`?t.regions:[];this.prompt=null,this.failed=null,this.asking={request:``,asked:e,line:t.line,regions:n,text:``,steps:[]};try{await this.note.save();let r=xe(this.note.text,t.line),{request:i}=await he.api.ask(n.length?{note:this.note.id,form:`rewrite`,regions:n,after:r.after,before:r.before,asked:e,tier:this.tier}:{note:this.note.id,...r,asked:e,tier:this.tier});this.asking&&!this.asking.request&&(this.asking={...this.asking,request:i})}catch(e){this.asking=null,this.failed={line:t.line,message:e.message}}}async send(e=`note`){if(this.asking)return``;this.failed=null,this.asking={request:``,asked:``,line:this.foot,regions:[],text:``,steps:[]};try{await this.note.save();let{request:t}=await he.api.ask({note:this.note.id,form:e,tier:this.tier});return this.asking&&!this.asking.request&&(this.asking={...this.asking,request:t}),t}catch(e){return this.asking=null,this.failed={line:this.foot,message:e.message},``}}halt(){let e=this.asking;if(!e)return;if(e.request){he.api.stop(e.request);return}let t=he.on(e=>{e.type===`iso-start`&&e.note===this.note.id&&(t(),he.api.stop(e.request))})}say(e,t){this.failed={line:e??this.foot,message:t.message}}lineOf(e){return this.layout.blocks.find(t=>t.key===`p:${e.id}`)?.line}edit(e){this.editing={id:e.id,text:e.text}}async done(e){let t=this.editing;if(t?.id===e.id)try{await he.api.revise(this.note.id,e.id,t.text),this.editing=null}catch(t){this.say(this.lineOf(e),t)}}async keep(e){this.busy=e.id;try{await this.note.save(),this.editing?.id===e.id&&await this.done(e),this.note.adopt(await he.api.keep(this.note.id,e.id))}catch(t){this.say(this.lineOf(e),t)}finally{this.busy=``}}async discard(e){this.busy=e.id;try{await he.api.discard(this.note.id,e.id)}catch(t){this.say(this.lineOf(e),t)}finally{this.busy=``}}async keepChange(e){this.busy=e.key;try{await this.note.save(),this.note.adopt(await he.api.keep(this.note.id,e.proposal.id,e.k))}catch(e){this.say(void 0,e)}finally{this.busy=``}}async discardChange(e){this.busy=e.key;try{await he.api.discard(this.note.id,e.proposal.id,e.k)}catch(e){this.say(void 0,e)}finally{this.busy=``}}async settleAll(e){this.busy=`all`;try{e&&await this.note.save();for(let t of[...this.changes].reverse())(!e||t.at)&&(e?this.note.adopt(await he.api.keep(this.note.id,t.proposal.id,t.k)):await he.api.discard(this.note.id,t.proposal.id,t.k))}catch(e){this.say(void 0,e)}finally{this.busy=``}}},Ae=b(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.katex=r():n.katex=r()})(typeof self<`u`?self:e,function(){return(function(){var e={};(function(){e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}})(),(function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var t={};e.d(t,{default:function(){return aa}});class n extends Error{constructor(e,t){let r=`KaTeX parse error: `+e,i,a,o=t&&t.loc;if(o&&o.start<=o.end){let e=o.lexer.input;i=o.start,a=o.end,i===e.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;let t=e.slice(i,a).replace(/[^]/g,`$&̲`),n;n=i>15?`…`+e.slice(i-15,i):e.slice(0,i);let s;s=a+15<e.length?e.slice(a,a+15)+`…`:e.slice(a),r+=n+t+s}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,n.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=e}}var r=n;let i=/([A-Z])/g,a=e=>e.replace(i,`-$1`).toLowerCase(),o={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},s=/[&><"']/g,c=e=>String(e).replace(s,e=>o[e]),l=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?l(e.body[0]):e:e.type===`font`?l(e.body):e,u=new Set([`mathord`,`textord`,`atom`]),d=e=>u.has(l(e).type),f=e=>{let t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},p={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:e=>`#`+e},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:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function m(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function h(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:m(Array.isArray(e.type)?e.type[0]:e.type)}function g(e,t,n,r){let i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?h(r):a?a(i):i}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||={};for(let t of Object.keys(p)){let n=p[t];n&&g(this,t,e,n)}}reportNonstrict(e,t,n){let i=this.strict;if(typeof i==`function`&&(i=i(e,t,n)),i&&i!==`ignore`){if(i===!0||i===`error`)throw new r(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);i===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+i+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){let r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){let t=f(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}}class v{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return y[ee[this.id]]}sub(){return y[b[this.id]]}fracNum(){return y[x[this.id]]}fracDen(){return y[S[this.id]]}cramp(){return y[te[this.id]]}text(){return y[ne[this.id]]}isTight(){return this.size>=2}}let y=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],ee=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],S=[3,3,5,5,7,7,7,7],te=[1,1,3,3,5,5,7,7],ne=[0,1,2,3,2,3,2,3];var C={DISPLAY:y[0],TEXT:y[2],SCRIPT:y[4],SCRIPTSCRIPT:y[6]};let re=[{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 ie(e){for(let t=0;t<re.length;t++){let n=re[t];for(let t=0;t<n.blocks.length;t++){let r=n.blocks[t];if(e>=r[0]&&e<=r[1])return n.name}}return null}let ae=[];re.forEach(e=>e.blocks.forEach(e=>ae.push(...e)));function oe(e){for(let t=0;t<ae.length;t+=2)if(e>=ae[t]&&e<=ae[t+1])return!0;return!1}let se=e=>e+` `+e,ce=function(e,t){return`M95,`+(622+e+t)+`
6
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
7
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
8
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
9
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
10
+ c69,-144,104.5,-217.7,106.5,-221
11
+ l`+e/2.075+` -`+e+`
12
+ c5.3,-9.3,12,-14,20,-14
13
+ H400000v`+(40+e)+`H845.2724
14
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
15
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
16
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},le=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
17
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
18
+ c340,-704.7,510.7,-1060.3,512,-1067
19
+ l`+e/2.084+` -`+e+`
20
+ c4.7,-7.3,11,-11,19,-11
21
+ H40000v`+(40+e)+`H1012.3
22
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
23
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
24
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
25
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
26
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},ue=function(e,t){return`M983 `+(10+e+t)+`
27
+ l`+e/3.13+` -`+e+`
28
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
29
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
30
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
31
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
32
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
33
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
34
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
35
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},de=function(e,t){return`M424,`+(2398+e+t)+`
36
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
37
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
38
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
39
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
40
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
41
+ v`+(40+e)+`H1014.6
42
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
43
+ c-2,6,-10,9,-24,9
44
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
45
+ h400000v`+(40+e)+`h-400000z`},fe=function(e,t){return`M473,`+(2713+e+t)+`
46
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
47
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
48
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
49
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
50
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
51
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
52
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},pe=function(e){let t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},me=function(e,t,n){let r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
53
+ H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
54
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
55
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
56
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},he=function(e,t,n){t=1e3*t;let r=``;switch(e){case`sqrtMain`:r=ce(t,80);break;case`sqrtSize1`:r=le(t,80);break;case`sqrtSize2`:r=ue(t,80);break;case`sqrtSize3`:r=de(t,80);break;case`sqrtSize4`:r=fe(t,80);break;case`sqrtTall`:r=me(t,80,n)}return r},ge=function(e,t){switch(e){case`⎜`:return se(`M291 0 H417 V`+t+` H291z`);case`∣`:return se(`M145 0 H188 V`+t+` H145z`);case`∥`:return se(`M145 0 H188 V`+t+` H145z`)+se(`M367 0 H410 V`+t+` H367z`);case`⎟`:return se(`M457 0 H583 V`+t+` H457z`);case`⎢`:return se(`M319 0 H403 V`+t+` H319z`);case`⎥`:return se(`M263 0 H347 V`+t+` H263z`);case`⎪`:return se(`M384 0 H504 V`+t+` H384z`);case`⏐`:return se(`M312 0 H355 V`+t+` H312z`);case`‖`:return se(`M257 0 H300 V`+t+` H257z`)+se(`M478 0 H521 V`+t+` H478z`);default:return``}},_e={doubleleftarrow:`M262 157
57
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
58
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
59
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
60
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
61
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
62
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
63
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
64
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
65
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
66
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
67
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
68
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
69
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
70
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
71
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
72
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
73
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
74
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
75
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
76
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
77
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
78
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
79
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
80
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
81
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
82
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
83
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
84
+ 435 0h399565z`,leftgroupunder:`M400000 262
85
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
86
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
87
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
88
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
89
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
90
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
91
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
92
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
93
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
94
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
95
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
96
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
97
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
98
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
99
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
100
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
101
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
102
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:se(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:se(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:se(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:se(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
103
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
104
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
105
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:se(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
106
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
107
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
108
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
109
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
110
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
111
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
112
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
113
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
114
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
115
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
116
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
117
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
118
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
119
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
120
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
121
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
122
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
123
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
124
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
125
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
126
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
127
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
128
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
129
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
130
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
131
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
132
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
133
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
134
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
135
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
136
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
137
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
138
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
139
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
140
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
141
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
142
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
143
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
144
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
145
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
146
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
147
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
148
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
149
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
150
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
151
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
152
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
153
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
154
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:se(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:se(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:se(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
155
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
156
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
157
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
158
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
159
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
160
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
161
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
162
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
163
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
164
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
165
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
166
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
167
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
168
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
169
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
170
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
171
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
172
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
173
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
174
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
175
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
176
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
177
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
178
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
179
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
180
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
181
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
182
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
183
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
184
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
185
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
186
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
187
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
188
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
189
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
190
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
191
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
192
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
193
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
194
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
195
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
196
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
197
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
198
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
199
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
200
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
201
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
202
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
203
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
204
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
205
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
206
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
207
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
208
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
209
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
210
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
211
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
212
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
213
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
214
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
215
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
216
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
217
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
218
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
219
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
220
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
221
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
222
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
223
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
224
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
225
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
226
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
227
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},ve=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
228
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
229
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
230
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
231
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
232
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
233
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
234
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
235
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
236
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
237
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
238
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
239
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
240
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
241
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
242
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
243
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
244
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
245
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
246
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
247
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
248
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
249
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
250
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
251
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
252
+ 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
253
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
254
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
255
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function ye(e){return`toText`in e}class be{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(){let e=document.createDocumentFragment();for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e=``;for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(ye(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}}let xe={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},Se={ex:!0,em:!0,mu:!0},Ce=function(e){return typeof e!=`string`&&(e=e.unit),e in xe||e in Se||e===`ex`},we=function(e,t){let n;if(e.unit in xe)n=xe[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{let i;if(i=t.style.isTight()?t.havingStyle(t.style.text()):t,e.unit===`ex`)n=i.fontMetrics().xHeight;else if(e.unit===`em`)n=i.fontMetrics().quad;else throw new r(`Invalid unit: '`+e.unit+`'`);i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},w=function(e){return+e.toFixed(4)+`em`},Te=function(e){return e.filter(e=>e).join(` `)},Ee=function(e){let t=``;for(let n of Object.keys(e)){let r=e[n];r!==void 0&&(t+=a(n)+`:`+r+`;`)}return t},De=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);let e=t.getColor();e&&(this.style.color=e)}},Oe=function(e){let t=document.createElement(e);t.className=Te(this.classes),Object.assign(t.style,this.style);for(let e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t},ke=/[\s"'>/=\x00-\x1f]/,Ae=function(e){let t=`<`+e;this.classes.length&&(t+=` class="`+c(Te(this.classes))+`"`);let n=Ee(this.style);n&&(t+=` style="`+c(n)+`"`);for(let e of Object.keys(this.attributes)){if(ke.test(e))throw new r(`Invalid attribute name '`+e+`'`);t+=` `+e+`="`+c(this.attributes[e])+`"`}t+=`>`;for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+=`</`+e+`>`,t};class je{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,De.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Oe.call(this,`span`)}toMarkup(){return Ae.call(this,`span`)}}class T{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,De.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Oe.call(this,`a`)}toMarkup(){return Ae.call(this,`a`)}}class Me{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){let e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){let e=`<img src="`+c(this.src)+`"`+(` alt="`+c(this.alt)+`"`),t=Ee(this.style);return t&&(e+=` style="`+c(t)+`"`),e+=`'/>`,e}}let Ne={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`};class Pe{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;let c=ie(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Ne[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){let e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=w(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Te(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=c(Te(this.classes)),t+=`"`);let n=``;this.italic>0&&(n+=`margin-right:`+w(this.italic)+`;`),n+=Ee(this.style),n&&(e=!0,t+=` style="`+c(n)+`"`);let r=c(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}}class Fe{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(let t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(let t of Object.keys(this.attributes))e+=` `+t+`="`+c(this.attributes[t])+`"`;e+=`>`;for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+=`</svg>`,e}}class Ie{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,_e[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+c(this.alternate)+`"/>`:`<path d="`+c(_e[this.pathName])+`"/>`}}class Le{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(let t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e=`<line`;for(let t of Object.keys(this.attributes))e+=` `+t+`="`+c(this.attributes[t])+`"`;return e+=`/>`,e}}function Re(e){if(e instanceof Pe)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function ze(e){if(e instanceof je)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}let Be=e=>e instanceof je||e instanceof T||e instanceof be;var Ve={"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]}};let He={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]},Ue={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function We(e,t){Ve[e]=t}function Ge(e,t,n){if(!Ve[t])throw Error(`Font metrics not found for font: `+t+`.`);let r=e.charCodeAt(0),i=Ve[t][r];if(!i&&e[0]in Ue&&(r=Ue[e[0]].charCodeAt(0),i=Ve[t][r]),!i&&n===`text`&&oe(r)&&(i=Ve[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}let Ke={};function qe(e){let t;if(t=e>=5?0:e>=3?1:2,!Ke[t]){let e=Ke[t]={cssEmPerMu:He.quad[t]/18};for(let n of Object.keys(He))e[n]=He[n][t]}return Ke[t]}let Je={math:{},text:{}};var Ye=Je;function E(e,t,n,r,i,a){Je[e][i]={font:t,group:n,replace:r},a&&r&&(Je[e][r]=Je[e][i])}let D=`math`,O=`text`,k=`main`,Xe=`accent-token`,Ze=`close`,Qe=`inner`,$e=`mathord`,et=`op-token`,tt=`open`,nt=`punct`,rt=`spacing`,A=`textord`;E(D,k,`rel`,`≡`,`\\equiv`,!0),E(D,k,`rel`,`≺`,`\\prec`,!0),E(D,k,`rel`,`≻`,`\\succ`,!0),E(D,k,`rel`,`∼`,`\\sim`,!0),E(D,k,`rel`,`⊥`,`\\perp`),E(D,k,`rel`,`⪯`,`\\preceq`,!0),E(D,k,`rel`,`⪰`,`\\succeq`,!0),E(D,k,`rel`,`≃`,`\\simeq`,!0),E(D,k,`rel`,`∣`,`\\mid`,!0),E(D,k,`rel`,`≪`,`\\ll`,!0),E(D,k,`rel`,`≫`,`\\gg`,!0),E(D,k,`rel`,`≍`,`\\asymp`,!0),E(D,k,`rel`,`∥`,`\\parallel`),E(D,k,`rel`,`⋈`,`\\bowtie`,!0),E(D,k,`rel`,`⌣`,`\\smile`,!0),E(D,k,`rel`,`⊑`,`\\sqsubseteq`,!0),E(D,k,`rel`,`⊒`,`\\sqsupseteq`,!0),E(D,k,`rel`,`≐`,`\\doteq`,!0),E(D,k,`rel`,`⌢`,`\\frown`,!0),E(D,k,`rel`,`∋`,`\\ni`,!0),E(D,k,`rel`,`∝`,`\\propto`,!0),E(D,k,`rel`,`⊢`,`\\vdash`,!0),E(D,k,`rel`,`⊣`,`\\dashv`,!0),E(D,k,`rel`,`∋`,`\\owns`),E(D,k,nt,`.`,`\\ldotp`),E(D,k,nt,`⋅`,`\\cdotp`),E(D,k,nt,`⋅`,`·`),E(O,k,A,`⋅`,`·`),E(D,k,A,`#`,`\\#`),E(O,k,A,`#`,`\\#`),E(D,k,A,`&`,`\\&`),E(O,k,A,`&`,`\\&`),E(D,k,A,`ℵ`,`\\aleph`,!0),E(D,k,A,`∀`,`\\forall`,!0),E(D,k,A,`ℏ`,`\\hbar`,!0),E(D,k,A,`∃`,`\\exists`,!0),E(D,k,A,`∇`,`\\nabla`,!0),E(D,k,A,`♭`,`\\flat`,!0),E(D,k,A,`ℓ`,`\\ell`,!0),E(D,k,A,`♮`,`\\natural`,!0),E(D,k,A,`♣`,`\\clubsuit`,!0),E(D,k,A,`℘`,`\\wp`,!0),E(D,k,A,`♯`,`\\sharp`,!0),E(D,k,A,`♢`,`\\diamondsuit`,!0),E(D,k,A,`ℜ`,`\\Re`,!0),E(D,k,A,`♡`,`\\heartsuit`,!0),E(D,k,A,`ℑ`,`\\Im`,!0),E(D,k,A,`♠`,`\\spadesuit`,!0),E(D,k,A,`§`,`\\S`,!0),E(O,k,A,`§`,`\\S`),E(D,k,A,`¶`,`\\P`,!0),E(O,k,A,`¶`,`\\P`),E(D,k,A,`†`,`\\dag`),E(O,k,A,`†`,`\\dag`),E(O,k,A,`†`,`\\textdagger`),E(D,k,A,`‡`,`\\ddag`),E(O,k,A,`‡`,`\\ddag`),E(O,k,A,`‡`,`\\textdaggerdbl`),E(D,k,Ze,`⎱`,`\\rmoustache`,!0),E(D,k,tt,`⎰`,`\\lmoustache`,!0),E(D,k,Ze,`⟯`,`\\rgroup`,!0),E(D,k,tt,`⟮`,`\\lgroup`,!0),E(D,k,`bin`,`∓`,`\\mp`,!0),E(D,k,`bin`,`⊖`,`\\ominus`,!0),E(D,k,`bin`,`⊎`,`\\uplus`,!0),E(D,k,`bin`,`⊓`,`\\sqcap`,!0),E(D,k,`bin`,`∗`,`\\ast`),E(D,k,`bin`,`⊔`,`\\sqcup`,!0),E(D,k,`bin`,`◯`,`\\bigcirc`,!0),E(D,k,`bin`,`∙`,`\\bullet`,!0),E(D,k,`bin`,`‡`,`\\ddagger`),E(D,k,`bin`,`≀`,`\\wr`,!0),E(D,k,`bin`,`⨿`,`\\amalg`),E(D,k,`bin`,`&`,`\\And`),E(D,k,`rel`,`⟵`,`\\longleftarrow`,!0),E(D,k,`rel`,`⇐`,`\\Leftarrow`,!0),E(D,k,`rel`,`⟸`,`\\Longleftarrow`,!0),E(D,k,`rel`,`⟶`,`\\longrightarrow`,!0),E(D,k,`rel`,`⇒`,`\\Rightarrow`,!0),E(D,k,`rel`,`⟹`,`\\Longrightarrow`,!0),E(D,k,`rel`,`↔`,`\\leftrightarrow`,!0),E(D,k,`rel`,`⟷`,`\\longleftrightarrow`,!0),E(D,k,`rel`,`⇔`,`\\Leftrightarrow`,!0),E(D,k,`rel`,`⟺`,`\\Longleftrightarrow`,!0),E(D,k,`rel`,`↦`,`\\mapsto`,!0),E(D,k,`rel`,`⟼`,`\\longmapsto`,!0),E(D,k,`rel`,`↗`,`\\nearrow`,!0),E(D,k,`rel`,`↩`,`\\hookleftarrow`,!0),E(D,k,`rel`,`↪`,`\\hookrightarrow`,!0),E(D,k,`rel`,`↘`,`\\searrow`,!0),E(D,k,`rel`,`↼`,`\\leftharpoonup`,!0),E(D,k,`rel`,`⇀`,`\\rightharpoonup`,!0),E(D,k,`rel`,`↙`,`\\swarrow`,!0),E(D,k,`rel`,`↽`,`\\leftharpoondown`,!0),E(D,k,`rel`,`⇁`,`\\rightharpoondown`,!0),E(D,k,`rel`,`↖`,`\\nwarrow`,!0),E(D,k,`rel`,`⇌`,`\\rightleftharpoons`,!0),E(D,`ams`,`rel`,`≮`,`\\nless`,!0),E(D,`ams`,`rel`,``,`\\@nleqslant`),E(D,`ams`,`rel`,``,`\\@nleqq`),E(D,`ams`,`rel`,`⪇`,`\\lneq`,!0),E(D,`ams`,`rel`,`≨`,`\\lneqq`,!0),E(D,`ams`,`rel`,``,`\\@lvertneqq`),E(D,`ams`,`rel`,`⋦`,`\\lnsim`,!0),E(D,`ams`,`rel`,`⪉`,`\\lnapprox`,!0),E(D,`ams`,`rel`,`⊀`,`\\nprec`,!0),E(D,`ams`,`rel`,`⋠`,`\\npreceq`,!0),E(D,`ams`,`rel`,`⋨`,`\\precnsim`,!0),E(D,`ams`,`rel`,`⪹`,`\\precnapprox`,!0),E(D,`ams`,`rel`,`≁`,`\\nsim`,!0),E(D,`ams`,`rel`,``,`\\@nshortmid`),E(D,`ams`,`rel`,`∤`,`\\nmid`,!0),E(D,`ams`,`rel`,`⊬`,`\\nvdash`,!0),E(D,`ams`,`rel`,`⊭`,`\\nvDash`,!0),E(D,`ams`,`rel`,`⋪`,`\\ntriangleleft`),E(D,`ams`,`rel`,`⋬`,`\\ntrianglelefteq`,!0),E(D,`ams`,`rel`,`⊊`,`\\subsetneq`,!0),E(D,`ams`,`rel`,``,`\\@varsubsetneq`),E(D,`ams`,`rel`,`⫋`,`\\subsetneqq`,!0),E(D,`ams`,`rel`,``,`\\@varsubsetneqq`),E(D,`ams`,`rel`,`≯`,`\\ngtr`,!0),E(D,`ams`,`rel`,``,`\\@ngeqslant`),E(D,`ams`,`rel`,``,`\\@ngeqq`),E(D,`ams`,`rel`,`⪈`,`\\gneq`,!0),E(D,`ams`,`rel`,`≩`,`\\gneqq`,!0),E(D,`ams`,`rel`,``,`\\@gvertneqq`),E(D,`ams`,`rel`,`⋧`,`\\gnsim`,!0),E(D,`ams`,`rel`,`⪊`,`\\gnapprox`,!0),E(D,`ams`,`rel`,`⊁`,`\\nsucc`,!0),E(D,`ams`,`rel`,`⋡`,`\\nsucceq`,!0),E(D,`ams`,`rel`,`⋩`,`\\succnsim`,!0),E(D,`ams`,`rel`,`⪺`,`\\succnapprox`,!0),E(D,`ams`,`rel`,`≆`,`\\ncong`,!0),E(D,`ams`,`rel`,``,`\\@nshortparallel`),E(D,`ams`,`rel`,`∦`,`\\nparallel`,!0),E(D,`ams`,`rel`,`⊯`,`\\nVDash`,!0),E(D,`ams`,`rel`,`⋫`,`\\ntriangleright`),E(D,`ams`,`rel`,`⋭`,`\\ntrianglerighteq`,!0),E(D,`ams`,`rel`,``,`\\@nsupseteqq`),E(D,`ams`,`rel`,`⊋`,`\\supsetneq`,!0),E(D,`ams`,`rel`,``,`\\@varsupsetneq`),E(D,`ams`,`rel`,`⫌`,`\\supsetneqq`,!0),E(D,`ams`,`rel`,``,`\\@varsupsetneqq`),E(D,`ams`,`rel`,`⊮`,`\\nVdash`,!0),E(D,`ams`,`rel`,`⪵`,`\\precneqq`,!0),E(D,`ams`,`rel`,`⪶`,`\\succneqq`,!0),E(D,`ams`,`rel`,``,`\\@nsubseteqq`),E(D,`ams`,`bin`,`⊴`,`\\unlhd`),E(D,`ams`,`bin`,`⊵`,`\\unrhd`),E(D,`ams`,`rel`,`↚`,`\\nleftarrow`,!0),E(D,`ams`,`rel`,`↛`,`\\nrightarrow`,!0),E(D,`ams`,`rel`,`⇍`,`\\nLeftarrow`,!0),E(D,`ams`,`rel`,`⇏`,`\\nRightarrow`,!0),E(D,`ams`,`rel`,`↮`,`\\nleftrightarrow`,!0),E(D,`ams`,`rel`,`⇎`,`\\nLeftrightarrow`,!0),E(D,`ams`,`rel`,`△`,`\\vartriangle`),E(D,`ams`,A,`ℏ`,`\\hslash`),E(D,`ams`,A,`▽`,`\\triangledown`),E(D,`ams`,A,`◊`,`\\lozenge`),E(D,`ams`,A,`Ⓢ`,`\\circledS`),E(D,`ams`,A,`®`,`\\circledR`),E(O,`ams`,A,`®`,`\\circledR`),E(D,`ams`,A,`∡`,`\\measuredangle`,!0),E(D,`ams`,A,`∄`,`\\nexists`),E(D,`ams`,A,`℧`,`\\mho`),E(D,`ams`,A,`Ⅎ`,`\\Finv`,!0),E(D,`ams`,A,`⅁`,`\\Game`,!0),E(D,`ams`,A,`‵`,`\\backprime`),E(D,`ams`,A,`▲`,`\\blacktriangle`),E(D,`ams`,A,`▼`,`\\blacktriangledown`),E(D,`ams`,A,`■`,`\\blacksquare`),E(D,`ams`,A,`⧫`,`\\blacklozenge`),E(D,`ams`,A,`★`,`\\bigstar`),E(D,`ams`,A,`∢`,`\\sphericalangle`,!0),E(D,`ams`,A,`∁`,`\\complement`,!0),E(D,`ams`,A,`ð`,`\\eth`,!0),E(O,k,A,`ð`,`ð`),E(D,`ams`,A,`╱`,`\\diagup`),E(D,`ams`,A,`╲`,`\\diagdown`),E(D,`ams`,A,`□`,`\\square`),E(D,`ams`,A,`□`,`\\Box`),E(D,`ams`,A,`◊`,`\\Diamond`),E(D,`ams`,A,`¥`,`\\yen`,!0),E(O,`ams`,A,`¥`,`\\yen`,!0),E(D,`ams`,A,`✓`,`\\checkmark`,!0),E(O,`ams`,A,`✓`,`\\checkmark`),E(D,`ams`,A,`ℶ`,`\\beth`,!0),E(D,`ams`,A,`ℸ`,`\\daleth`,!0),E(D,`ams`,A,`ℷ`,`\\gimel`,!0),E(D,`ams`,A,`ϝ`,`\\digamma`,!0),E(D,`ams`,A,`ϰ`,`\\varkappa`),E(D,`ams`,tt,`┌`,`\\@ulcorner`,!0),E(D,`ams`,Ze,`┐`,`\\@urcorner`,!0),E(D,`ams`,tt,`└`,`\\@llcorner`,!0),E(D,`ams`,Ze,`┘`,`\\@lrcorner`,!0),E(D,`ams`,`rel`,`≦`,`\\leqq`,!0),E(D,`ams`,`rel`,`⩽`,`\\leqslant`,!0),E(D,`ams`,`rel`,`⪕`,`\\eqslantless`,!0),E(D,`ams`,`rel`,`≲`,`\\lesssim`,!0),E(D,`ams`,`rel`,`⪅`,`\\lessapprox`,!0),E(D,`ams`,`rel`,`≊`,`\\approxeq`,!0),E(D,`ams`,`bin`,`⋖`,`\\lessdot`),E(D,`ams`,`rel`,`⋘`,`\\lll`,!0),E(D,`ams`,`rel`,`≶`,`\\lessgtr`,!0),E(D,`ams`,`rel`,`⋚`,`\\lesseqgtr`,!0),E(D,`ams`,`rel`,`⪋`,`\\lesseqqgtr`,!0),E(D,`ams`,`rel`,`≑`,`\\doteqdot`),E(D,`ams`,`rel`,`≓`,`\\risingdotseq`,!0),E(D,`ams`,`rel`,`≒`,`\\fallingdotseq`,!0),E(D,`ams`,`rel`,`∽`,`\\backsim`,!0),E(D,`ams`,`rel`,`⋍`,`\\backsimeq`,!0),E(D,`ams`,`rel`,`⫅`,`\\subseteqq`,!0),E(D,`ams`,`rel`,`⋐`,`\\Subset`,!0),E(D,`ams`,`rel`,`⊏`,`\\sqsubset`,!0),E(D,`ams`,`rel`,`≼`,`\\preccurlyeq`,!0),E(D,`ams`,`rel`,`⋞`,`\\curlyeqprec`,!0),E(D,`ams`,`rel`,`≾`,`\\precsim`,!0),E(D,`ams`,`rel`,`⪷`,`\\precapprox`,!0),E(D,`ams`,`rel`,`⊲`,`\\vartriangleleft`),E(D,`ams`,`rel`,`⊴`,`\\trianglelefteq`),E(D,`ams`,`rel`,`⊨`,`\\vDash`,!0),E(D,`ams`,`rel`,`⊪`,`\\Vvdash`,!0),E(D,`ams`,`rel`,`⌣`,`\\smallsmile`),E(D,`ams`,`rel`,`⌢`,`\\smallfrown`),E(D,`ams`,`rel`,`≏`,`\\bumpeq`,!0),E(D,`ams`,`rel`,`≎`,`\\Bumpeq`,!0),E(D,`ams`,`rel`,`≧`,`\\geqq`,!0),E(D,`ams`,`rel`,`⩾`,`\\geqslant`,!0),E(D,`ams`,`rel`,`⪖`,`\\eqslantgtr`,!0),E(D,`ams`,`rel`,`≳`,`\\gtrsim`,!0),E(D,`ams`,`rel`,`⪆`,`\\gtrapprox`,!0),E(D,`ams`,`bin`,`⋗`,`\\gtrdot`),E(D,`ams`,`rel`,`⋙`,`\\ggg`,!0),E(D,`ams`,`rel`,`≷`,`\\gtrless`,!0),E(D,`ams`,`rel`,`⋛`,`\\gtreqless`,!0),E(D,`ams`,`rel`,`⪌`,`\\gtreqqless`,!0),E(D,`ams`,`rel`,`≖`,`\\eqcirc`,!0),E(D,`ams`,`rel`,`≗`,`\\circeq`,!0),E(D,`ams`,`rel`,`≜`,`\\triangleq`,!0),E(D,`ams`,`rel`,`∼`,`\\thicksim`),E(D,`ams`,`rel`,`≈`,`\\thickapprox`),E(D,`ams`,`rel`,`⫆`,`\\supseteqq`,!0),E(D,`ams`,`rel`,`⋑`,`\\Supset`,!0),E(D,`ams`,`rel`,`⊐`,`\\sqsupset`,!0),E(D,`ams`,`rel`,`≽`,`\\succcurlyeq`,!0),E(D,`ams`,`rel`,`⋟`,`\\curlyeqsucc`,!0),E(D,`ams`,`rel`,`≿`,`\\succsim`,!0),E(D,`ams`,`rel`,`⪸`,`\\succapprox`,!0),E(D,`ams`,`rel`,`⊳`,`\\vartriangleright`),E(D,`ams`,`rel`,`⊵`,`\\trianglerighteq`),E(D,`ams`,`rel`,`⊩`,`\\Vdash`,!0),E(D,`ams`,`rel`,`∣`,`\\shortmid`),E(D,`ams`,`rel`,`∥`,`\\shortparallel`),E(D,`ams`,`rel`,`≬`,`\\between`,!0),E(D,`ams`,`rel`,`⋔`,`\\pitchfork`,!0),E(D,`ams`,`rel`,`∝`,`\\varpropto`),E(D,`ams`,`rel`,`◀`,`\\blacktriangleleft`),E(D,`ams`,`rel`,`∴`,`\\therefore`,!0),E(D,`ams`,`rel`,`∍`,`\\backepsilon`),E(D,`ams`,`rel`,`▶`,`\\blacktriangleright`),E(D,`ams`,`rel`,`∵`,`\\because`,!0),E(D,`ams`,`rel`,`⋘`,`\\llless`),E(D,`ams`,`rel`,`⋙`,`\\gggtr`),E(D,`ams`,`bin`,`⊲`,`\\lhd`),E(D,`ams`,`bin`,`⊳`,`\\rhd`),E(D,`ams`,`rel`,`≂`,`\\eqsim`,!0),E(D,k,`rel`,`⋈`,`\\Join`),E(D,`ams`,`rel`,`≑`,`\\Doteq`,!0),E(D,`ams`,`bin`,`∔`,`\\dotplus`,!0),E(D,`ams`,`bin`,`∖`,`\\smallsetminus`),E(D,`ams`,`bin`,`⋒`,`\\Cap`,!0),E(D,`ams`,`bin`,`⋓`,`\\Cup`,!0),E(D,`ams`,`bin`,`⩞`,`\\doublebarwedge`,!0),E(D,`ams`,`bin`,`⊟`,`\\boxminus`,!0),E(D,`ams`,`bin`,`⊞`,`\\boxplus`,!0),E(D,`ams`,`bin`,`⋇`,`\\divideontimes`,!0),E(D,`ams`,`bin`,`⋉`,`\\ltimes`,!0),E(D,`ams`,`bin`,`⋊`,`\\rtimes`,!0),E(D,`ams`,`bin`,`⋋`,`\\leftthreetimes`,!0),E(D,`ams`,`bin`,`⋌`,`\\rightthreetimes`,!0),E(D,`ams`,`bin`,`⋏`,`\\curlywedge`,!0),E(D,`ams`,`bin`,`⋎`,`\\curlyvee`,!0),E(D,`ams`,`bin`,`⊝`,`\\circleddash`,!0),E(D,`ams`,`bin`,`⊛`,`\\circledast`,!0),E(D,`ams`,`bin`,`⋅`,`\\centerdot`),E(D,`ams`,`bin`,`⊺`,`\\intercal`,!0),E(D,`ams`,`bin`,`⋒`,`\\doublecap`),E(D,`ams`,`bin`,`⋓`,`\\doublecup`),E(D,`ams`,`bin`,`⊠`,`\\boxtimes`,!0),E(D,`ams`,`rel`,`⇢`,`\\dashrightarrow`,!0),E(D,`ams`,`rel`,`⇠`,`\\dashleftarrow`,!0),E(D,`ams`,`rel`,`⇇`,`\\leftleftarrows`,!0),E(D,`ams`,`rel`,`⇆`,`\\leftrightarrows`,!0),E(D,`ams`,`rel`,`⇚`,`\\Lleftarrow`,!0),E(D,`ams`,`rel`,`↞`,`\\twoheadleftarrow`,!0),E(D,`ams`,`rel`,`↢`,`\\leftarrowtail`,!0),E(D,`ams`,`rel`,`↫`,`\\looparrowleft`,!0),E(D,`ams`,`rel`,`⇋`,`\\leftrightharpoons`,!0),E(D,`ams`,`rel`,`↶`,`\\curvearrowleft`,!0),E(D,`ams`,`rel`,`↺`,`\\circlearrowleft`,!0),E(D,`ams`,`rel`,`↰`,`\\Lsh`,!0),E(D,`ams`,`rel`,`⇈`,`\\upuparrows`,!0),E(D,`ams`,`rel`,`↿`,`\\upharpoonleft`,!0),E(D,`ams`,`rel`,`⇃`,`\\downharpoonleft`,!0),E(D,k,`rel`,`⊶`,`\\origof`,!0),E(D,k,`rel`,`⊷`,`\\imageof`,!0),E(D,`ams`,`rel`,`⊸`,`\\multimap`,!0),E(D,`ams`,`rel`,`↭`,`\\leftrightsquigarrow`,!0),E(D,`ams`,`rel`,`⇉`,`\\rightrightarrows`,!0),E(D,`ams`,`rel`,`⇄`,`\\rightleftarrows`,!0),E(D,`ams`,`rel`,`↠`,`\\twoheadrightarrow`,!0),E(D,`ams`,`rel`,`↣`,`\\rightarrowtail`,!0),E(D,`ams`,`rel`,`↬`,`\\looparrowright`,!0),E(D,`ams`,`rel`,`↷`,`\\curvearrowright`,!0),E(D,`ams`,`rel`,`↻`,`\\circlearrowright`,!0),E(D,`ams`,`rel`,`↱`,`\\Rsh`,!0),E(D,`ams`,`rel`,`⇊`,`\\downdownarrows`,!0),E(D,`ams`,`rel`,`↾`,`\\upharpoonright`,!0),E(D,`ams`,`rel`,`⇂`,`\\downharpoonright`,!0),E(D,`ams`,`rel`,`⇝`,`\\rightsquigarrow`,!0),E(D,`ams`,`rel`,`⇝`,`\\leadsto`),E(D,`ams`,`rel`,`⇛`,`\\Rrightarrow`,!0),E(D,`ams`,`rel`,`↾`,`\\restriction`),E(D,k,A,`‘`,"`"),E(D,k,A,`$`,`\\$`),E(O,k,A,`$`,`\\$`),E(O,k,A,`$`,`\\textdollar`),E(D,k,A,`%`,`\\%`),E(O,k,A,`%`,`\\%`),E(D,k,A,`_`,`\\_`),E(O,k,A,`_`,`\\_`),E(O,k,A,`_`,`\\textunderscore`),E(D,k,A,`∠`,`\\angle`,!0),E(D,k,A,`∞`,`\\infty`,!0),E(D,k,A,`′`,`\\prime`),E(D,k,A,`△`,`\\triangle`),E(D,k,A,`Γ`,`\\Gamma`,!0),E(D,k,A,`Δ`,`\\Delta`,!0),E(D,k,A,`Θ`,`\\Theta`,!0),E(D,k,A,`Λ`,`\\Lambda`,!0),E(D,k,A,`Ξ`,`\\Xi`,!0),E(D,k,A,`Π`,`\\Pi`,!0),E(D,k,A,`Σ`,`\\Sigma`,!0),E(D,k,A,`Υ`,`\\Upsilon`,!0),E(D,k,A,`Φ`,`\\Phi`,!0),E(D,k,A,`Ψ`,`\\Psi`,!0),E(D,k,A,`Ω`,`\\Omega`,!0),E(D,k,A,`A`,`Α`),E(D,k,A,`B`,`Β`),E(D,k,A,`E`,`Ε`),E(D,k,A,`Z`,`Ζ`),E(D,k,A,`H`,`Η`),E(D,k,A,`I`,`Ι`),E(D,k,A,`K`,`Κ`),E(D,k,A,`M`,`Μ`),E(D,k,A,`N`,`Ν`),E(D,k,A,`O`,`Ο`),E(D,k,A,`P`,`Ρ`),E(D,k,A,`T`,`Τ`),E(D,k,A,`X`,`Χ`),E(D,k,A,`¬`,`\\neg`,!0),E(D,k,A,`¬`,`\\lnot`),E(D,k,A,`⊤`,`\\top`),E(D,k,A,`⊥`,`\\bot`),E(D,k,A,`∅`,`\\emptyset`),E(D,`ams`,A,`∅`,`\\varnothing`),E(D,k,$e,`α`,`\\alpha`,!0),E(D,k,$e,`β`,`\\beta`,!0),E(D,k,$e,`γ`,`\\gamma`,!0),E(D,k,$e,`δ`,`\\delta`,!0),E(D,k,$e,`ϵ`,`\\epsilon`,!0),E(D,k,$e,`ζ`,`\\zeta`,!0),E(D,k,$e,`η`,`\\eta`,!0),E(D,k,$e,`θ`,`\\theta`,!0),E(D,k,$e,`ι`,`\\iota`,!0),E(D,k,$e,`κ`,`\\kappa`,!0),E(D,k,$e,`λ`,`\\lambda`,!0),E(D,k,$e,`μ`,`\\mu`,!0),E(D,k,$e,`ν`,`\\nu`,!0),E(D,k,$e,`ξ`,`\\xi`,!0),E(D,k,$e,`ο`,`\\omicron`,!0),E(D,k,$e,`π`,`\\pi`,!0),E(D,k,$e,`ρ`,`\\rho`,!0),E(D,k,$e,`σ`,`\\sigma`,!0),E(D,k,$e,`τ`,`\\tau`,!0),E(D,k,$e,`υ`,`\\upsilon`,!0),E(D,k,$e,`ϕ`,`\\phi`,!0),E(D,k,$e,`χ`,`\\chi`,!0),E(D,k,$e,`ψ`,`\\psi`,!0),E(D,k,$e,`ω`,`\\omega`,!0),E(D,k,$e,`ε`,`\\varepsilon`,!0),E(D,k,$e,`ϑ`,`\\vartheta`,!0),E(D,k,$e,`ϖ`,`\\varpi`,!0),E(D,k,$e,`ϱ`,`\\varrho`,!0),E(D,k,$e,`ς`,`\\varsigma`,!0),E(D,k,$e,`φ`,`\\varphi`,!0),E(D,k,`bin`,`∗`,`*`,!0),E(D,k,`bin`,`+`,`+`),E(D,k,`bin`,`−`,`-`,!0),E(D,k,`bin`,`⋅`,`\\cdot`,!0),E(D,k,`bin`,`∘`,`\\circ`,!0),E(D,k,`bin`,`÷`,`\\div`,!0),E(D,k,`bin`,`±`,`\\pm`,!0),E(D,k,`bin`,`×`,`\\times`,!0),E(D,k,`bin`,`∩`,`\\cap`,!0),E(D,k,`bin`,`∪`,`\\cup`,!0),E(D,k,`bin`,`∖`,`\\setminus`,!0),E(D,k,`bin`,`∧`,`\\land`),E(D,k,`bin`,`∨`,`\\lor`),E(D,k,`bin`,`∧`,`\\wedge`,!0),E(D,k,`bin`,`∨`,`\\vee`,!0),E(D,k,A,`√`,`\\surd`),E(D,k,tt,`⟨`,`\\langle`,!0),E(D,k,tt,`∣`,`\\lvert`),E(D,k,tt,`∥`,`\\lVert`),E(D,k,Ze,`?`,`?`),E(D,k,Ze,`!`,`!`),E(D,k,Ze,`⟩`,`\\rangle`,!0),E(D,k,Ze,`∣`,`\\rvert`),E(D,k,Ze,`∥`,`\\rVert`),E(D,k,`rel`,`=`,`=`),E(D,k,`rel`,`:`,`:`),E(D,k,`rel`,`≈`,`\\approx`,!0),E(D,k,`rel`,`≅`,`\\cong`,!0),E(D,k,`rel`,`≥`,`\\ge`),E(D,k,`rel`,`≥`,`\\geq`,!0),E(D,k,`rel`,`←`,`\\gets`),E(D,k,`rel`,`>`,`\\gt`,!0),E(D,k,`rel`,`∈`,`\\in`,!0),E(D,k,`rel`,``,`\\@not`),E(D,k,`rel`,`⊂`,`\\subset`,!0),E(D,k,`rel`,`⊃`,`\\supset`,!0),E(D,k,`rel`,`⊆`,`\\subseteq`,!0),E(D,k,`rel`,`⊇`,`\\supseteq`,!0),E(D,`ams`,`rel`,`⊈`,`\\nsubseteq`,!0),E(D,`ams`,`rel`,`⊉`,`\\nsupseteq`,!0),E(D,k,`rel`,`⊨`,`\\models`),E(D,k,`rel`,`←`,`\\leftarrow`,!0),E(D,k,`rel`,`≤`,`\\le`),E(D,k,`rel`,`≤`,`\\leq`,!0),E(D,k,`rel`,`<`,`\\lt`,!0),E(D,k,`rel`,`→`,`\\rightarrow`,!0),E(D,k,`rel`,`→`,`\\to`),E(D,`ams`,`rel`,`≱`,`\\ngeq`,!0),E(D,`ams`,`rel`,`≰`,`\\nleq`,!0),E(D,k,rt,`\xA0`,`\\ `),E(D,k,rt,`\xA0`,`\\space`),E(D,k,rt,`\xA0`,`\\nobreakspace`),E(O,k,rt,`\xA0`,`\\ `),E(O,k,rt,`\xA0`,` `),E(O,k,rt,`\xA0`,`\\space`),E(O,k,rt,`\xA0`,`\\nobreakspace`),E(D,k,rt,``,`\\nobreak`),E(D,k,rt,``,`\\allowbreak`),E(D,k,nt,`,`,`,`),E(D,k,nt,`;`,`;`),E(D,`ams`,`bin`,`⊼`,`\\barwedge`,!0),E(D,`ams`,`bin`,`⊻`,`\\veebar`,!0),E(D,k,`bin`,`⊙`,`\\odot`,!0),E(D,k,`bin`,`⊕`,`\\oplus`,!0),E(D,k,`bin`,`⊗`,`\\otimes`,!0),E(D,k,A,`∂`,`\\partial`,!0),E(D,k,`bin`,`⊘`,`\\oslash`,!0),E(D,`ams`,`bin`,`⊚`,`\\circledcirc`,!0),E(D,`ams`,`bin`,`⊡`,`\\boxdot`,!0),E(D,k,`bin`,`△`,`\\bigtriangleup`),E(D,k,`bin`,`▽`,`\\bigtriangledown`),E(D,k,`bin`,`†`,`\\dagger`),E(D,k,`bin`,`⋄`,`\\diamond`),E(D,k,`bin`,`⋆`,`\\star`),E(D,k,`bin`,`◃`,`\\triangleleft`),E(D,k,`bin`,`▹`,`\\triangleright`),E(D,k,tt,`{`,`\\{`),E(O,k,A,`{`,`\\{`),E(O,k,A,`{`,`\\textbraceleft`),E(D,k,Ze,`}`,`\\}`),E(O,k,A,`}`,`\\}`),E(O,k,A,`}`,`\\textbraceright`),E(D,k,tt,`{`,`\\lbrace`),E(D,k,Ze,`}`,`\\rbrace`),E(D,k,tt,`[`,`\\lbrack`,!0),E(O,k,A,`[`,`\\lbrack`,!0),E(D,k,Ze,`]`,`\\rbrack`,!0),E(O,k,A,`]`,`\\rbrack`,!0),E(D,k,tt,`(`,`\\lparen`,!0),E(D,k,Ze,`)`,`\\rparen`,!0),E(O,k,A,`<`,`\\textless`,!0),E(O,k,A,`>`,`\\textgreater`,!0),E(D,k,tt,`⌊`,`\\lfloor`,!0),E(D,k,Ze,`⌋`,`\\rfloor`,!0),E(D,k,tt,`⌈`,`\\lceil`,!0),E(D,k,Ze,`⌉`,`\\rceil`,!0),E(D,k,A,`\\`,`\\backslash`),E(D,k,A,`∣`,`|`),E(D,k,A,`∣`,`\\vert`),E(O,k,A,`|`,`\\textbar`,!0),E(D,k,A,`∥`,`\\|`),E(D,k,A,`∥`,`\\Vert`),E(O,k,A,`∥`,`\\textbardbl`),E(O,k,A,`~`,`\\textasciitilde`),E(O,k,A,`\\`,`\\textbackslash`),E(O,k,A,`^`,`\\textasciicircum`),E(D,k,`rel`,`↑`,`\\uparrow`,!0),E(D,k,`rel`,`⇑`,`\\Uparrow`,!0),E(D,k,`rel`,`↓`,`\\downarrow`,!0),E(D,k,`rel`,`⇓`,`\\Downarrow`,!0),E(D,k,`rel`,`↕`,`\\updownarrow`,!0),E(D,k,`rel`,`⇕`,`\\Updownarrow`,!0),E(D,k,et,`∐`,`\\coprod`),E(D,k,et,`⋁`,`\\bigvee`),E(D,k,et,`⋀`,`\\bigwedge`),E(D,k,et,`⨄`,`\\biguplus`),E(D,k,et,`⋂`,`\\bigcap`),E(D,k,et,`⋃`,`\\bigcup`),E(D,k,et,`∫`,`\\int`),E(D,k,et,`∫`,`\\intop`),E(D,k,et,`∬`,`\\iint`),E(D,k,et,`∭`,`\\iiint`),E(D,k,et,`∏`,`\\prod`),E(D,k,et,`∑`,`\\sum`),E(D,k,et,`⨂`,`\\bigotimes`),E(D,k,et,`⨁`,`\\bigoplus`),E(D,k,et,`⨀`,`\\bigodot`),E(D,k,et,`∮`,`\\oint`),E(D,k,et,`∯`,`\\oiint`),E(D,k,et,`∰`,`\\oiiint`),E(D,k,et,`⨆`,`\\bigsqcup`),E(D,k,et,`∫`,`\\smallint`),E(O,k,Qe,`…`,`\\textellipsis`),E(D,k,Qe,`…`,`\\mathellipsis`),E(O,k,Qe,`…`,`\\ldots`,!0),E(D,k,Qe,`…`,`\\ldots`,!0),E(D,k,Qe,`⋯`,`\\@cdots`,!0),E(D,k,Qe,`⋱`,`\\ddots`,!0),E(D,k,A,`⋮`,`\\varvdots`),E(O,k,A,`⋮`,`\\varvdots`),E(D,k,Xe,`ˊ`,`\\acute`),E(D,k,Xe,`ˋ`,`\\grave`),E(D,k,Xe,`¨`,`\\ddot`),E(D,k,Xe,`~`,`\\tilde`),E(D,k,Xe,`ˉ`,`\\bar`),E(D,k,Xe,`˘`,`\\breve`),E(D,k,Xe,`ˇ`,`\\check`),E(D,k,Xe,`^`,`\\hat`),E(D,k,Xe,`⃗`,`\\vec`),E(D,k,Xe,`˙`,`\\dot`),E(D,k,Xe,`˚`,`\\mathring`),E(D,k,$e,``,`\\@imath`),E(D,k,$e,``,`\\@jmath`),E(D,k,A,`ı`,`ı`),E(D,k,A,`ȷ`,`ȷ`),E(O,k,A,`ı`,`\\i`,!0),E(O,k,A,`ȷ`,`\\j`,!0),E(O,k,A,`ß`,`\\ss`,!0),E(O,k,A,`æ`,`\\ae`,!0),E(O,k,A,`œ`,`\\oe`,!0),E(O,k,A,`ø`,`\\o`,!0),E(O,k,A,`Æ`,`\\AE`,!0),E(O,k,A,`Œ`,`\\OE`,!0),E(O,k,A,`Ø`,`\\O`,!0),E(O,k,Xe,`ˊ`,`\\'`),E(O,k,Xe,`ˋ`,"\\`"),E(O,k,Xe,`ˆ`,`\\^`),E(O,k,Xe,`˜`,`\\~`),E(O,k,Xe,`ˉ`,`\\=`),E(O,k,Xe,`˘`,`\\u`),E(O,k,Xe,`˙`,`\\.`),E(O,k,Xe,`¸`,`\\c`),E(O,k,Xe,`˚`,`\\r`),E(O,k,Xe,`ˇ`,`\\v`),E(O,k,Xe,`¨`,`\\"`),E(O,k,Xe,`˝`,`\\H`),E(O,k,Xe,`◯`,`\\textcircled`);let it={"--":!0,"---":!0,"``":!0,"''":!0};E(O,k,A,`–`,`--`,!0),E(O,k,A,`–`,`\\textendash`),E(O,k,A,`—`,`---`,!0),E(O,k,A,`—`,`\\textemdash`),E(O,k,A,`‘`,"`",!0),E(O,k,A,`‘`,`\\textquoteleft`),E(O,k,A,`’`,`'`,!0),E(O,k,A,`’`,`\\textquoteright`),E(O,k,A,`“`,"``",!0),E(O,k,A,`“`,`\\textquotedblleft`),E(O,k,A,`”`,`''`,!0),E(O,k,A,`”`,`\\textquotedblright`),E(D,k,A,`°`,`\\degree`,!0),E(O,k,A,`°`,`\\degree`),E(O,k,A,`°`,`\\textdegree`,!0),E(D,k,A,`£`,`\\pounds`),E(D,k,A,`£`,`\\mathsterling`,!0),E(O,k,A,`£`,`\\pounds`),E(O,k,A,`£`,`\\textsterling`,!0),E(D,`ams`,A,`✠`,`\\maltese`),E(O,`ams`,A,`✠`,`\\maltese`);for(let e=0;e<14;e++){let t=`0123456789/@."`.charAt(e);E(D,k,A,t,t)}for(let e=0;e<25;e++){let t=`0123456789!@*()-=+";:?/.,`.charAt(e);E(O,k,A,t,t)}let at=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;for(let e=0;e<52;e++){let t=at.charAt(e);E(D,k,$e,t,t),E(O,k,A,t,t)}E(D,`ams`,A,`C`,`ℂ`),E(O,`ams`,A,`C`,`ℂ`),E(D,`ams`,A,`H`,`ℍ`),E(O,`ams`,A,`H`,`ℍ`),E(D,`ams`,A,`N`,`ℕ`),E(O,`ams`,A,`N`,`ℕ`),E(D,`ams`,A,`P`,`ℙ`),E(O,`ams`,A,`P`,`ℙ`),E(D,`ams`,A,`Q`,`ℚ`),E(O,`ams`,A,`Q`,`ℚ`),E(D,`ams`,A,`R`,`ℝ`),E(O,`ams`,A,`R`,`ℝ`),E(D,`ams`,A,`Z`,`ℤ`),E(O,`ams`,A,`Z`,`ℤ`),E(D,k,$e,`h`,`ℎ`),E(O,k,$e,`h`,`ℎ`);let ot;for(let e=0;e<52;e++){let t=at.charAt(e);ot=String.fromCharCode(55349,56320+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56372+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56424+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56580+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56684+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56736+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56788+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56840+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56944+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),e<26&&(ot=String.fromCharCode(55349,56632+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,56476+e),E(D,k,$e,t,ot),E(O,k,A,t,ot))}ot=String.fromCharCode(55349,56668),E(D,k,$e,`k`,ot),E(O,k,A,`k`,ot);for(let e=0;e<10;e++){let t=e.toString();ot=String.fromCharCode(55349,57294+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,57314+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,57324+e),E(D,k,$e,t,ot),E(O,k,A,t,ot),ot=String.fromCharCode(55349,57334+e),E(D,k,$e,t,ot),E(O,k,A,t,ot)}let st=`ÐÞþ`;for(let e=0;e<3;e++){let t=st.charAt(e);E(D,k,$e,t,t),E(O,k,A,t,t)}let ct={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},lt={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},ut={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},dt={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},ft={mathClass:``,textClass:``,font:``},pt={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},mt={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},ht={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},gt={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},_t={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},vt={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},yt={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},bt=[ct,ct,lt,lt,ut,ut,dt,ft,ft,ft,pt,pt,mt,mt,ht,ht,gt,gt,_t,_t,vt,vt,ft,ft,yt,yt],xt=[ct,ft,gt,_t,yt],St=e=>{let t=e.charCodeAt(0),n=e.charCodeAt(1),i=(t-55296)*1024+(n-56320)+65536;if(119808<=i&&i<120484){let e=Math.floor((i-119808)/26);return bt[e]}if(120782<=i&&i<=120831){let e=Math.floor((i-120782)/10);return xt[e]}if(i===120485||i===120486)return bt[0];if(120486<i&&i<120782)return ft;throw new r(`Unsupported character: `+e)},Ct=function(e,t,n){if(Ye[n][e]){let t=Ye[n][e].replace;t&&(e=t)}return{value:e,metrics:Ge(e,t,n)}},wt=function(e,t,n,r,i){let a=Ct(e,t,n),o=a.metrics;e=a.value;let s;if(o){let t=o.italic;(n===`text`||r&&r.font===`mathit`)&&(t=0),s=new Pe(e,o.height,o.depth,t,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new Pe(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);let e=r.getColor();e&&(s.style.color=e)}return s},Tt=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&Ct(e,`Main-Bold`,t).metrics?wt(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||Ye[t][e].font===`main`?wt(e,`Main-Regular`,t,n,r):wt(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},Et=function(e,t,n){return n!==`textord`&&Ct(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},j=function(e,t){let n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],o=t.font,s=t.fontFamily,c=t.fontWeight,l=t.fontShape,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){let e=St(i);f=e.font,p=e[r+`Class`]}if(f)return wt(i,f,r,t,a.concat(p));if(d){let e,f;if(d===`boldsymbol`){let t=Et(i,r,n);e=t.fontName,f=[t.fontClass]}else u?(e=zt[o].fontName,f=[o]):(e=Rt(s,c,l),f=[s,c,l]);if(Ct(i,e,r).metrics)return wt(i,e,r,t,a.concat(f));if(Object.prototype.hasOwnProperty.call(it,i)&&e.slice(0,10)===`Typewriter`){let n=[];for(let o=0;o<i.length;o++)n.push(wt(i[o],e,r,t,a.concat(f)));return Nt(n)}}if(n===`mathord`)return wt(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){let e=Ye[r][i]&&Ye[r][i].font;if(e===`ams`){let e=Rt(`amsrm`,c,l);return wt(i,e,r,t,a.concat(`amsrm`,c,l))}if(e===`main`||!e){let e=Rt(`textrm`,c,l);return wt(i,e,r,t,a.concat(c,l))}{let n=Rt(e,c,l);return wt(i,n,r,t,a.concat(n,c,l))}}throw Error(`unexpected type: `+n+` in makeOrd`)},Dt=(e,t)=>{if(Te(e.classes)!==Te(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){let t=e.classes[0];if(t===`mbin`||t===`mord`)return!1}for(let n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(let n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},Ot=e=>{for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];n instanceof Pe&&r instanceof Pe&&Dt(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},kt=function(e){let t=0,n=0,r=0;for(let i=0;i<e.children.length;i++){let a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},M=function(e,t,n,r){let i=new je(e,t,n,r);return kt(i),i},At=(e,t,n,r)=>new je(e,t,n,r),jt=function(e,t,n){let r=M([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=w(r.height),r.maxFontSize=1,r},Mt=function(e,t,n,r){let i=new T(e,t,n,r);return kt(i),i},Nt=function(e){let t=new be(e);return kt(t),t},Pt=function(e,t){return e instanceof be?M([],[e],t):e},Ft=function(e){if(e.positionType===`individualShift`){let t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r;for(let e=1;e<t.length;e++){let r=-t[e].shift-i-t[e].elem.depth,a=r-(t[e-1].elem.height+t[e-1].elem.depth);i+=r,n.push({type:`kern`,size:a}),n.push(t[e])}return{children:n,depth:r}}let t;if(e.positionType===`top`){let n=e.positionData;for(let t=0;t<e.children.length;t++){let r=e.children[t];n-=r.type===`kern`?r.size:r.elem.height+r.elem.depth}t=n}else if(e.positionType===`bottom`)t=-e.positionData;else{let n=e.children[0];if(n.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)t=-n.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)t=-n.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:t}},It=function(e,t){let n=Ft(e),r=n.children,i=n.depth,a=0;for(let e=0;e<r.length;e++){let t=r[e];if(t.type===`elem`){let e=t.elem;a=Math.max(a,e.maxFontSize,e.height)}}a+=2;let o=M([`pstrut`],[]);o.style.height=w(a);let s=[],c=i,l=i,u=i;for(let e=0;e<r.length;e++){let t=r[e];if(t.type===`kern`)u+=t.size;else{let e=t.elem,n=t.wrapperClasses||[],r=t.wrapperStyle||{},i=M(n,[o,e],void 0,r);i.style.top=w(-a-u-e.depth),t.marginLeft&&(i.style.marginLeft=t.marginLeft),t.marginRight&&(i.style.marginRight=t.marginRight),s.push(i),u+=e.height+e.depth}c=Math.min(c,u),l=Math.max(l,u)}let d=M([`vlist`],s);d.style.height=w(l);let f;if(c<0){let e=M([],[]),t=M([`vlist`],[e]);t.style.height=w(-c);let n=M([`vlist-s`],[new Pe(`​`)]);f=[M([`vlist-r`],[d,n]),M([`vlist-r`],[t])]}else f=[M([`vlist-r`],[d])];let p=M([`vlist-t`],f);return f.length===2&&p.classes.push(`vlist-t2`),p.height=l,p.depth=-c,p},Lt=(e,t)=>{let n=M([`mspace`],[],t),r=we(e,t);return n.style.marginRight=w(r),n},Rt=(e,t,n)=>{let r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},zt={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`}},Bt={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Vt=function(e,t){let n=Bt[e],r=n[0],i=n[1],a=n[2],o=new Ie(r),s=new Fe([o],{width:w(i),height:w(a),style:`width:`+w(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`}),c=At([`katex-overlay`],[s],t);return c.height=a,c.style.height=w(a),c.style.width=w(i),c},Ht={number:3,unit:`mu`},Ut={number:4,unit:`mu`},Wt={number:5,unit:`mu`},Gt={mord:{mop:Ht,mbin:Ut,mrel:Wt,minner:Ht},mop:{mord:Ht,mop:Ht,mrel:Wt,minner:Ht},mbin:{mord:Ut,mop:Ut,mopen:Ut,minner:Ut},mrel:{mord:Wt,mop:Wt,mopen:Wt,minner:Wt},mopen:{},mclose:{mop:Ht,mbin:Ut,mrel:Wt,minner:Ht},mpunct:{mord:Ht,mop:Ht,mrel:Wt,mopen:Ht,mclose:Ht,mpunct:Ht,minner:Ht},minner:{mord:Ht,mop:Ht,mbin:Ut,mrel:Wt,mopen:Ht,mpunct:Ht,minner:Ht}},Kt={mord:{mop:Ht},mop:{mord:Ht,mop:Ht},mbin:{},mrel:{},mopen:{},mclose:{mop:Ht},mpunct:{},minner:{mop:Ht}},qt={},Jt={},Yt={};function N(e){let t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder;for(let t=0;t<n.length;++t)qt[n[t]]=e;t&&(r&&(Jt[t]=r),i&&(Yt[t]=i))}function P(e){let t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(Jt[t]=n),r&&(Yt[t]=r)}let F=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},I=function(e){return e.type===`ordgroup`?e.body:[e]},L=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),R=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),Xt={display:C.DISPLAY,text:C.TEXT,script:C.SCRIPT,scriptscript:C.SCRIPTSCRIPT},z={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},Zt=function(e,t,n,r){r===void 0&&(r=[null,null]);let i=[];for(let n=0;n<e.length;n++){let r=B(e[n],t);if(r instanceof be){let e=r.children;i.push(...e)}else i.push(r)}if(Ot(i),!n)return i;let a=t;if(e.length===1){let n=e[0];n.type===`sizing`?a=t.havingSize(n.size):n.type===`styling`&&(a=t.havingStyle(Xt[n.style]))}let o=M([r[0]||`leftmost`],[],t),s=M([r[1]||`rightmost`],[],t),c=n===`root`;return Qt(i,(e,t)=>{let n=t.classes[0],r=e.classes[0];n===`mbin`&&R.has(r)?t.classes[0]=`mord`:r===`mbin`&&L.has(n)&&(e.classes[0]=`mord`)},{node:o},s,c),Qt(i,(e,t)=>{let n=tn(t),r=tn(e),i=n&&r?e.hasClass(`mtight`)?Kt[n]?.[r]:Gt[n]?.[r]:null;if(i)return Lt(i,a)},{node:o},s,c),i},Qt=function(e,t,n,r,i){r&&e.push(r);let a=0;for(;a<e.length;a++){let r=e[a],o=$t(r);if(o){Qt(o.children,t,n,null,i);continue}let s=!r.hasClass(`mspace`);if(s){let i=t(r,n.node);i&&(n.insertAfter?n.insertAfter(i):(e.unshift(i),a++))}s?n.node=r:i&&r.hasClass(`katex-newline`)&&(n.node=M([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},$t=function(e){return e instanceof be||e instanceof T||e instanceof je&&e.hasClass(`enclosing`)?e:null},en=function(e,t){let n=$t(e);if(n){let e=n.children;if(e.length){if(t===`right`)return en(e[e.length-1],`right`);if(t===`left`)return en(e[0],`left`)}}return e},tn=function(e,t){if(!e)return null;t&&(e=en(e,t));let n=e.classes[0];return z[n]||null},nn=function(e,t){let n=[`nulldelimiter`].concat(e.baseSizingClasses());return M(t.concat(n))},B=function(e,t,n){if(!e)return M();if(Jt[e.type]){let r=Jt[e.type](e,t);if(n&&t.size!==n.size){r=M(t.sizingClasses(n),[r],t);let e=t.sizeMultiplier/n.sizeMultiplier;r.height*=e,r.depth*=e}return r}throw new r(`Got group of unknown type: '`+e.type+`'`)};function rn(e,t){let n=M([`katex-base`],e,t),r=M([`katex-strut`]);return r.style.height=w(n.height+n.depth),n.depth&&(r.style.verticalAlign=w(-n.depth)),n.children.unshift(r),n}function V(e,t){let n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);let r=Zt(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());let a=[],o=[];for(let e=0;e<r.length;e++)if(o.push(r[e]),r[e].hasClass(`mbin`)||r[e].hasClass(`mrel`)||r[e].hasClass(`allowbreak`)){let n=!1;for(;e<r.length-1&&r[e+1].hasClass(`mspace`)&&!r[e+1].hasClass(`katex-newline`);)e++,o.push(r[e]),r[e].hasClass(`nobreak`)&&(n=!0);n||(a.push(rn(o,t)),o=[])}else r[e].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(rn(o,t)),o=[]),a.push(r[e]));o.length>0&&a.push(rn(o,t));let s;n?(s=rn(Zt(n,t,!0),t),s.classes=[`katex-tag`],a.push(s)):i&&a.push(i);let c=M([`katex-html`],a);if(c.setAttribute(`aria-hidden`,`true`),s){let e=s.children[0];e.style.height=w(c.height+c.depth),c.depth&&(e.style.verticalAlign=w(-c.depth))}return c}function an(e){return new be(e)}class H{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){let e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(let t of Object.entries(this.attributes)){let n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=Te(this.classes));for(let t=0;t<this.children.length;t++)if(this.children[t]instanceof on&&this.children[t+1]instanceof on){let n=this.children[t].toText()+this.children[++t].toText();for(;this.children[t+1]instanceof on;)n+=this.children[++t].toText();e.appendChild(new on(n).toNode())}else e.appendChild(this.children[t].toNode());return e}toMarkup(){let e=`<`+this.type;for(let t of Object.entries(this.attributes)){let n=t[0],r=t[1];e+=` `+n+`="`,e+=c(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+c(Te(this.classes))+`"`),e+=`>`;for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}}class on{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return c(this.toText())}toText(){return this.text}}class sn{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);{let e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,w(this.width)),e}}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+w(this.width)+`"/>`}toText(){return this.character?this.character:` `}}let cn=new Set([`\\imath`,`\\jmath`]),ln=new Set([`mrow`,`mtable`]),un=function(e,t,n){var r,i;return Ye[t][e]&&Ye[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(it,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=Ye[t][e].replace),new on(e)},dn=function(e){return e.length===1?e[0]:new H(`mrow`,e)},fn={mathit:`italic`,boldsymbol:e=>e.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`},pn=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}let n=t.font;if(!n||n===`mathnormal`)return null;let r=e.mode,i=fn[n];if(i)return typeof i==`function`?i(e):i;let a=e.text;if(cn.has(a))return null;if(Ye[r][a]){let e=Ye[r][a].replace;e&&(a=e)}let o=zt[n].fontName;return Ge(a,o,r)?zt[n].variant:null};function mn(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){let t=e.children[0];return t instanceof on&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){let t=e.children[0];return t instanceof on&&t.text===`,`}return!1}let hn=function(e,t,n){if(e.length===1){let r=_n(e[0],t);return n&&r instanceof H&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}let r=[],i;for(let n=0;n<e.length;n++){let a=_n(e[n],t);if(a instanceof H&&i instanceof H){if(a.type===`mtext`&&i.type===`mtext`&&a.getAttribute(`mathvariant`)===i.getAttribute(`mathvariant`)||a.type===`mn`&&i.type===`mn`||mn(a)&&i.type===`mn`){i.children.push(...a.children);continue}if(a.type===`mn`&&mn(i))a.children=[...i.children,...a.children],r.pop();else if((a.type===`msup`||a.type===`msub`)&&a.children.length>=1&&(i.type===`mn`||mn(i))){let e=a.children[0];e instanceof H&&e.type===`mn`&&(e.children=[...i.children,...e.children],r.pop())}else if(i.type===`mi`&&i.children.length===1){let e=i.children[0];if(e instanceof on&&e.text===`̸`&&(a.type===`mo`||a.type===`mi`||a.type===`mn`)){let e=a.children[0];e instanceof on&&e.text.length>0&&(e.text=e.text.slice(0,1)+`̸`+e.text.slice(1),r.pop())}}}r.push(a),i=a}return r},gn=function(e,t,n){return dn(hn(e,t,n))},_n=function(e,t){if(!e)return new H(`mrow`);if(Yt[e.type])return Yt[e.type](e,t);throw new r(`Got group of unknown type: '`+e.type+`'`)};function vn(e,t,n,r,i){let a=hn(e,n),o;o=a.length===1&&a[0]instanceof H&&ln.has(a[0].type)?a[0]:new H(`mrow`,a);let s=new H(`annotation`,[new on(t)]);s.setAttribute(`encoding`,`application/x-tex`);let c=new H(`semantics`,[o,s]),l=new H(`math`,[c]);return l.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&l.setAttribute(`display`,`block`),M([i?`katex`:`katex-mathml`],[l])}let yn=[[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]],bn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],xn=function(e,t){return t.size<2?e:yn[e-1][t.size-1]};class Sn{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||Sn.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=bn[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){let t={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(t,e),new Sn(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:xn(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:bn[e-1]})}havingBaseStyle(e){e||=this.style.text();let t=xn(Sn.BASESIZE,e);return this.size===t&&this.textSize===Sn.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let 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?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===Sn.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+Sn.BASESIZE]}fontMetrics(){return this._fontMetrics||=qe(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}}Sn.BASESIZE=6;var Cn=Sn;let wn=function(e){return new Cn({style:e.displayMode?C.DISPLAY:C.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Tn=function(e,t){if(t.displayMode){let n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=M(n,[e])}return e},En=function(e,t,n){let r=wn(n),i;if(n.output===`mathml`)return vn(e,t,r,n.displayMode,!0);if(n.output===`html`){let t=V(e,r);i=M([`katex`],[t])}else{let a=vn(e,t,r,n.displayMode,!1),o=V(e,r);i=M([`katex`],[a,o])}return Tn(i,n)},Dn=function(e,t,n){let r=V(e,wn(n)),i=M([`katex`],[r]);return Tn(i,n)},On={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},kn=function(e){let t=new H(`mo`,[new on(On[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},An={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]},jn=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Mn=function(e,t){function n(){let n=4e5,r=e.label.slice(1);if(jn.has(r)&&`base`in e){let i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{let e=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][e],a=[0,239,300,360,420][e],s=[0,.24,.3,.3,.36,.42][e],o=r+e):(n=[0,600,1033,2339,2340][e],a=[0,260,286,306,312][e],s=[0,.26,.286,.3,.306,.34][e],o=`tilde`+e)}let c=new Ie(o),l=new Fe([c],{width:`100%`,height:w(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`});return{span:At([],[l],t),minWidth:0,height:s}}{let e=[],i=An[r];if(!i)throw Error(`No SVG data for "`+r+`".`);let a=i[0],o=i[1],s=i[2],c=s/1e3,l=a.length,u,d;if(l===1){if(i.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);u=[`hide-tail`],d=[i[3]]}else if(l===2)u=[`halfarrow-left`,`halfarrow-right`],d=[`xMinYMin`,`xMaxYMin`];else if(l===3)u=[`brace-left`,`brace-center`,`brace-right`],d=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
256
+ `+l+` children.`);for(let r=0;r<l;r++){let i=new Ie(a[r]),f=new Fe([i],{width:`400em`,height:w(c),viewBox:`0 0 `+n+` `+s,preserveAspectRatio:d[r]+` slice`}),p=At([u[r]],[f],t);if(l===1)return{span:p,minWidth:o,height:c};p.style.height=w(c),e.push(p)}return{span:M([`katex-stretchy`],e,t),minWidth:o,height:c}}}let r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=w(o),a>0&&(i.style.minWidth=w(a)),i},Nn=function(e,t,n,r,i){let a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=M([`katex-stretchy`,t],[],i),t===`fbox`){let e=i.color&&i.getColor();e&&(a.style.borderColor=e)}}else{let e=[];/^[bx]cancel$/.test(t)&&e.push(new Le({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&e.push(new Le({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`}));let n=new Fe(e,{width:`100%`,height:w(o)});a=At([],[n],i)}return a.height=o,a.style.height=w(o),a},Pn=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],Fn=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],In=new Set(Pn),Ln=new Set(Fn);function Rn(e){return In.has(e)}function zn(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Bn(e){let t=Vn(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Vn(e){return e.type===`atom`||Ln.has(e.type)?e:null}function Hn(e,t,n){let i=``;for(let a of e.body)if(a.type===`textord`)i+=a.text;else if(n&&a.type===`spacing`&&a.text===` `)i+=` `;else throw new r(t,e);return i}let Un=e=>{if(e instanceof Pe)return e;if(Be(e)&&e.children.length===1)return Un(e.children[0])},Wn=(e,t)=>{let n,r,i;e&&e.type===`supsub`?(r=zn(e.base,`accent`),n=r.base,e.base=n,i=ze(B(e,t)),e.base=r):(r=zn(e,`accent`),n=r.base);let a=B(n,t.havingCrampedStyle()),o=r.isShifty&&d(n),s=0;o&&(s=Un(a)?.skew??0);let c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Mn(r,t),u=It({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+w(2*s)+`)`,marginLeft:w(2*s)}:void 0}]},t);else{let e,n;r.label===`\\vec`?(e=Vt(`vec`,t),n=Bt.vec[1]):(e=j({type:`textord`,mode:r.mode,text:r.label},t),e=Re(e),e.italic=0,n=e.width,c&&(l+=e.depth)),u=M([`accent-body`],[e]);let i=r.label===`\\textcircled`;i&&(u.classes.push(`accent-full`),l=a.height);let o=s;i||(o-=n/2),u.style.left=w(o),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=It({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]},t)}let f=M([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=f,i.height=Math.max(f.height,i.height),i.classes[0]=`mord`,i):f},U=(e,t)=>{let n=e.isStretchy?kn(e.label):new H(`mo`,[un(e.label,e.mode)]),r=new H(`mover`,[_n(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Gn=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));N({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`],numArgs:1,handler:(e,t)=>{let n=F(t[0]),r=!Gn.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Wn,mathmlBuilder:U}),N({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{let n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),N({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{let n=B(e.base,t),r=Mn(e,t),i=e.label===`\\utilde`?.12:0,a=It({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]},t);return M([`mord`,`accentunder`],[a],t)},mathmlBuilder:(e,t)=>{let n=kn(e.label),r=new H(`munder`,[_n(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});let Kn=e=>{let t=new H(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};N({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`],numArgs:1,numOptionalArgs:1,handler(e,t,n){let r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){let n=t.style,r=t.havingStyle(n.sup()),i=Pt(B(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);let o;e.below&&(r=t.havingStyle(n.sub()),o=Pt(B(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));let s=Mn(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);let u;if(o){let e=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=It({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:e}]},t)}else u=It({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]},t);return M([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){let n=kn(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);let r;if(e.body){let i=Kn(_n(e.body,t));if(e.below){let a=Kn(_n(e.below,t));r=new H(`munderover`,[n,a,i])}else r=new H(`mover`,[n,i])}else if(e.below){let i=Kn(_n(e.below,t));r=new H(`munder`,[n,i])}else r=Kn(),r=new H(`mover`,[n,r]);return r}});function qn(e,t){let n=Zt(e.body,t,!0);return M([e.mclass],n,t)}function Jn(e,t){let n,r=hn(e.body,t);return e.mclass===`minner`?n=new H(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new H(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new H(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}N({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){let n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:I(i),isCharacterBox:d(i)}},htmlBuilder:qn,mathmlBuilder:Jn});let Yn=e=>{let t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};N({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:Yn(t[0]),body:I(t[1]),isCharacterBox:d(t[1])}}}),N({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){let n=e.parser,r=e.funcName,i=t[1],a=t[0],o;o=r===`\\stackrel`?`mrel`:Yn(i);let s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:I(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:d(c)}}}),N({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:Yn(t[0]),body:I(t[0])}},htmlBuilder(e,t){let n=Zt(e.body,t,!0),r=M([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){let n=hn(e.body,t),r=new H(`mstyle`,n);return r.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),r}});let Xn={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Zn=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Qn=e=>e.type===`textord`&&e.text===`@`,$n=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function er(e,t,n){let r=Xn[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:{let e=n.callFunction(`\\\\cdleft`,[t[0]],[]),i={type:`atom`,text:r,mode:`math`,family:`rel`},a={type:`ordgroup`,mode:`math`,body:[e,n.callFunction(`\\Big`,[i],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[a],[])}case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function tr(e){let t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();let n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new r(`Expected \\\\ or \\cr or \\end`,e.nextToken)}let n=[],i=[n];for(let a=0;a<t.length;a++){let o=t[a],s=Zn();for(let t=0;t<o.length;t++)if(!Qn(o[t]))s.body.push(o[t]);else{n.push(s),t+=1;let i=Bn(o[t]).text,a=[,,];if(a[0]={type:`ordgroup`,mode:`math`,body:[]},a[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(i)){if(`<>AV`.includes(i))for(let e=0;e<2;e++){let n=!0;for(let s=t+1;s<o.length;s++){if($n(o[s],i)){n=!1,t=s;break}if(Qn(o[s]))throw new r(`Missing a `+i+` character to complete a CD arrow.`,o[s]);a[e].body.push(o[s])}if(n)throw new r(`Missing a `+i+` character to complete a CD arrow.`,o[t])}else throw new r(`Expected one of "<>AV=|." after @`,o[t])}let c={type:`styling`,body:[er(i,a,e)],mode:`math`,style:`display`,resetFont:!0};n.push(c),s=Zn()}a%2==0?n.push(s):n.shift(),n=[],i.push(n)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}N({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){let n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){let n=t.havingStyle(t.style.sup()),r=Pt(B(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=w(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){let n=new H(`mrow`,[_n(e.label,t)]);return n=new H(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new H(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),N({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){let n=Pt(B(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new H(`mrow`,[_n(e.fragment,t)])}}),N({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){let n=e.parser,i=Hn(zn(t[0],`ordgroup`),`\\@char has non-numeric argument`),a=parseInt(i),o;if(isNaN(a))throw new r(`\\@char has non-numeric argument `+i);if(a<0||a>1114111)throw new r(`\\@char with invalid code point `+i);return a<=65535?o=String.fromCharCode(a):(a-=65536,o=String.fromCharCode((a>>10)+55296,(a&1023)+56320)),{type:`textord`,mode:n.mode,text:o}}}),N({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){let n=e.parser,r=zn(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:I(i)}},htmlBuilder:(e,t)=>{let n=Zt(e.body,t.withColor(e.color),!1);return Nt(n)},mathmlBuilder:(e,t)=>{let n=hn(e.body,t.withColor(e.color)),r=new H(`mstyle`,n);return r.setAttribute(`mathcolor`,e.color),r}}),N({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){let n=e.parser,r=e.breakOnTokenText,i=zn(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);let a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),N({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){let r=e.parser,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&zn(i,`size`).value}},htmlBuilder(e,t){let n=M([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=w(we(e.size,t)))),n},mathmlBuilder(e,t){let n=new H(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,w(we(e.size,t)))),n}});let nr={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},rr=e=>{let t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r(`Expected a control sequence`,e);return t},ir=e=>{let t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},ar=(e,t,n,r)=>{let i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};N({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){let t=e.parser,n=e.funcName;t.consumeSpaces();let i=t.fetch();if(nr[i.text])return(n===`\\global`||n===`\\\\globallong`)&&(i.text=nr[i.text]),zn(t.parseFunction(),`internal`);throw new r(`Invalid token after macro prefix`,i)}}),N({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){let t=e.parser,n=e.funcName,i=t.gullet.popToken(),a=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new r(`Expected a control sequence`,i);let o=0,s,c=[[]];for(;t.gullet.future().text!==`{`;)if(i=t.gullet.popToken(),i.text===`#`){if(t.gullet.future().text===`{`){s=t.gullet.future(),c[o].push(`{`);break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new r(`Invalid argument number "`+i.text+`"`);if(parseInt(i.text)!==o+1)throw new r(`Argument number "`+i.text+`" out of order`);o++,c.push([])}else if(i.text===`EOF`)throw new r(`Expected a macro definition`);else c[o].push(i.text);let l=t.gullet.consumeArg().tokens;return s&&l.unshift(s),(n===`\\edef`||n===`\\xdef`)&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(a,{tokens:l,numArgs:o,delimiters:c},n===nr[n]),{type:`internal`,mode:t.mode}}}),N({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){let t=e.parser,n=e.funcName,r=rr(t.gullet.popToken());t.gullet.consumeSpaces();let i=ir(t);return ar(t,r,i,n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),N({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){let t=e.parser,n=e.funcName,r=rr(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return ar(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});let or=function(e,t,n){let r=Ge(Ye.math[e]&&Ye.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},sr=function(e,t,n,r){let i=n.havingBaseStyle(t),a=M(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},cr=function(e,t,n){let r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=w(i),e.height-=i,e.depth+=i},lr=function(e,t,n,r,i,a){let o=wt(e,`Main-Regular`,i,r),s=sr(o,t,r,a);return n&&cr(s,r,t),s},ur=function(e,t,n,r){return wt(e,`Size`+t+`-Regular`,n,r)},W=function(e,t,n,r,i,a){let o=ur(e,t,i,r),s=sr(M([`delimsizing`,`size`+t],[o],r),C.TEXT,r,a);return n&&cr(s,r,C.TEXT),s},dr=function(e,t,n){let r;return r=t===`Size1-Regular`?`delim-size1`:`delim-size4`,{type:`elem`,elem:M([`delimsizinginner`,r],[M([],[wt(e,t,n)])])}},fr=function(e,t,n){let r=Ve[`Size4-Regular`][e.charCodeAt(0)]?Ve[`Size4-Regular`][e.charCodeAt(0)][4]:Ve[`Size1-Regular`][e.charCodeAt(0)][4],i=new Ie(`inner`,ge(e,Math.round(1e3*t))),a=new Fe([i],{width:w(r),height:w(t),style:`width:`+w(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`}),o=At([],[a],n);return o.height=t,o.style.height=w(t),o.style.width=w(r),{type:`elem`,elem:o}},pr=.008,mr={type:`kern`,size:-1*pr},hr=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),gr=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),_r=function(e,t,n,r,i,a){let o,s,c,l,u=``,d=0;o=c=l=e,s=null;let f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):hr.has(e)?(c=`∣`,u=`vert`,d=333):gr.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);let p=or(o,f,i),m=p.height+p.depth,h=or(c,f,i),g=h.height+h.depth,_=or(l,f,i),v=_.height+_.depth,y=0,ee=1;if(s!==null){let e=or(s,f,i);y=e.height+e.depth,ee=2}let b=m+v+y,x=b+Math.max(0,Math.ceil((t-b)/(ee*g)))*ee*g,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);let te=x/2-S,ne=[];if(u.length>0){let e=x-m-v,t=Math.round(x*1e3),n=ve(u,Math.round(e*1e3)),i=new Ie(u,n),a=w(d/1e3),o=w(t/1e3),s=new Fe([i],{width:a,height:o,viewBox:`0 0 `+d+` `+t}),c=At([],[s],r);c.height=t/1e3,c.style.width=a,c.style.height=o,ne.push({type:`elem`,elem:c})}else{if(ne.push(dr(l,f,i)),ne.push(mr),s===null){let e=x-m-v+2*pr;ne.push(fr(c,e,r))}else{let e=(x-m-v-y)/2+2*pr;ne.push(fr(c,e,r)),ne.push(mr),ne.push(dr(s,f,i)),ne.push(mr),ne.push(fr(c,e,r))}ne.push(mr),ne.push(dr(o,f,i))}let re=r.havingBaseStyle(C.TEXT),ie=It({positionType:`bottom`,positionData:te,children:ne},re);return sr(M([`delimsizing`,`mult`],[ie],re),C.TEXT,r,a)},vr=.08,yr=function(e,t,n,r,i){let a=he(e,r,n),o=new Ie(e,a),s=new Fe([o],{width:`400em`,height:w(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`});return At([`hide-tail`],[s],i)},br=function(e,t){let n=t.havingBaseSizing(),r=kr(`\\surd`,e*n.sizeMultiplier,G,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+80,e<1?i=1:e<1.4&&(i=.7),s=(1+a+vr)/i,c=(1+a)/i,o=yr(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=1080*wr[r.size],c=(wr[r.size]+a)/i,s=(wr[r.size]+a+vr)/i,o=yr(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+vr,c=e+a,l=Math.floor(1e3*e+a)+80,o=yr(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=w(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},xr=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Sr=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Cr=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),wr=[0,1.2,1.8,2.4,3],Tr=function(e,t,n,i,a){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),xr.has(e)||Cr.has(e))return W(e,t,!1,n,i,a);if(Sr.has(e))return _r(e,wr[t],!1,n,i,a);throw new r(`Illegal delimiter: '`+e+`'`)},Er=[{type:`small`,style:C.SCRIPTSCRIPT},{type:`small`,style:C.SCRIPT},{type:`small`,style:C.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Dr=[{type:`small`,style:C.SCRIPTSCRIPT},{type:`small`,style:C.SCRIPT},{type:`small`,style:C.TEXT},{type:`stack`}],G=[{type:`small`,style:C.SCRIPTSCRIPT},{type:`small`,style:C.SCRIPT},{type:`small`,style:C.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Or=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`;{let t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)}},kr=function(e,t,n,r){let i=Math.min(2,3-r.style.size);for(let a=i;a<n.length;a++){let i=n[a];if(i.type===`stack`)break;let o=or(e,Or(i),`math`),s=o.height+o.depth;if(i.type===`small`){let e=r.havingBaseStyle(i.style);s*=e.sizeMultiplier}if(s>t)return i}return n[n.length-1]},Ar=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);let o;o=Cr.has(e)?Er:xr.has(e)?G:Dr;let s=kr(e,t,o,r);return s.type===`small`?lr(e,s.style,n,r,i,a):s.type===`large`?W(e,s.size,n,r,i,a):_r(e,t,n,r,i,a)},jr=function(e,t,n,r,i,a){let o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,c=Math.max(t-o,n+o),l=Math.max(c/500*901,2*c-s);return Ar(e,l,!0,r,i,a)},Mr={"\\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}},Nr=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function Pr(e){return`isMiddle`in e}function Fr(e,t){let n=Vn(e);if(n&&Nr.has(n.text))return n;throw n?new r(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new r(`Invalid delimiter type '`+e.type+`'`,e)}N({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{let n=Fr(F(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:Mr[e.funcName].size,mclass:Mr[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?M([e.mclass]):Tr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{let t=[];e.delim!==`.`&&t.push(un(e.delim,e.mode));let n=new H(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);let r=w(wr[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Ir(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}N({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{let n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new r(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:Fr(t[0],e).text,color:n}}}),N({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{let n=Fr(t[0],e),r=e.parser;++r.leftrightDepth;let i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);let a=zn(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Ir(e);let n=Zt(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1;for(let e=0;e<n.length;e++){let t=n[e];Pr(t)?a=!0:(r=Math.max(n[e].height,r),i=Math.max(n[e].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;let o;if(o=e.left===`.`?nn(t,[`mopen`]):jr(e.left,r,i,t,e.mode,[`mopen`]),n.unshift(o),a)for(let t=1;t<n.length;t++){let a=n[t];if(Pr(a)){let o=a.isMiddle;n[t]=jr(o.delim,r,i,o.options,e.mode,[])}}let s;if(e.right===`.`)s=nn(t,[`mclose`]);else{let n=e.rightColor?t.withColor(e.rightColor):t;s=jr(e.right,r,i,n,e.mode,[`mclose`])}return n.push(s),M([`minner`],n,t)},mathmlBuilder:(e,t)=>{Ir(e);let n=hn(e.body,t);if(e.left!==`.`){let t=new H(`mo`,[un(e.left,e.mode)]);t.setAttribute(`fence`,`true`),n.unshift(t)}if(e.right!==`.`){let t=new H(`mo`,[un(e.right,e.mode)]);t.setAttribute(`fence`,`true`),e.rightColor&&t.setAttribute(`mathcolor`,e.rightColor),n.push(t)}return dn(n)}}),N({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{let n=Fr(t[0],e);if(!e.parser.leftrightDepth)throw new r(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{let n;return e.delim===`.`?n=nn(t,[]):(n=Tr(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{let n=e.delim===`\\vert`||e.delim===`|`?un(`|`,`text`):un(e.delim,e.mode),r=new H(`mo`,[n]);return r.setAttribute(`fence`,`true`),r.setAttribute(`lspace`,`0.05em`),r.setAttribute(`rspace`,`0.05em`),r}}),N({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){let r=e.parser,i=e.funcName,a=zn(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{let n=Pt(B(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=d(e.body);if(r===`sout`)a=M([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){let e=we({number:.6,unit:`pt`},t),r=we({number:.35,unit:`ex`},t),s=t.havingBaseSizing();i/=s.sizeMultiplier;let c=n.height+n.depth+e+r;n.style.paddingLeft=w(c/2+e);let l=Math.floor(1e3*c*i),u=pe(l),d=new Fe([new Ie(`phase`,u)],{width:`400em`,height:w(l/1e3),viewBox:`0 0 400000 `+l,preserveAspectRatio:`xMinYMin slice`});a=At([`hide-tail`],[d],t),a.style.height=w(c),o=n.depth+e+r}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);let i,c,l=0;/box/.test(r)?(l=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),i=t.fontMetrics().fboxsep+(r===`colorbox`?0:l),c=i):r===`angl`?(l=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),i=4*l,c=Math.max(0,.25-n.depth)):(i=s?.2:0,c=i),a=Nn(n,r,i,c,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=w(l)):r===`angl`&&l!==.049&&(a.style.borderTopWidth=w(l),a.style.borderRightWidth=w(l)),o=n.depth+c,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}let c;if(e.backgroundColor)c=It({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]},t);else{let e=/cancel|phase/.test(r)?[`svg-align`]:[];c=It({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:e}]},t)}return/cancel/.test(r)&&(c.height=n.height,c.depth=n.depth),/cancel/.test(r)&&!s?M([`mord`,`cancel-lap`],[c],t):M([`mord`],[c],t)},mathmlBuilder:(e,t)=>{let n,r=new H(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[_n(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){let n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+w(n)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),N({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){let r=e.parser,i=e.funcName,a=zn(t[0],`color-token`).color,o=zn(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),N({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),N({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){let n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),N({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){let n=e.parser,r=e.funcName;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);let i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),N({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});let Lr={};function Rr(e){let t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i};for(let e=0;e<n.length;++e)Lr[n[e]]=s;a&&(Jt[t]=a),o&&(Yt[t]=o)}let zr={};function K(e,t){zr[e]=t}class Br{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new Br(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class Vr{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Vr(t,Br.range(this,e))}}function Hr(e){let t=[];e.consumeSpaces();let n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}let Ur=e=>{if(!e.parser.settings.displayMode)throw new r(`{`+e.envName+`} can be used only in display mode.`)},Wr=new Set([`gather`,`gather*`]);function Gr(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Kr(e,t,n){let i=t.hskipBeforeAndAfter,a=t.addJot,o=t.cols,s=t.arraystretch,c=t.colSeparationType,l=t.autoTag,u=t.singleRow,d=t.emptySingleRow,f=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),u||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!s){let t=e.gullet.expandMacroAsText(`\\arraystretch`);if(t==null)s=1;else if(s=parseFloat(t),!s||s<0)throw new r(`Invalid \\arraystretch: `+t)}e.gullet.beginGroup();let m=[],h=[m],g=[],_=[],v=l==null?void 0:[];function y(){l&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function ee(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Vr(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!l&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Hr(e));;){let t=e.parseExpression(!1,u?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();let i={type:`ordgroup`,mode:e.mode,body:t};n&&(i={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[i]}),m.push(i);let a=e.fetch().text;if(a===`&`){if(f&&m.length===f){if(u||c)throw new r(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(a===`\\end`){ee(),m.length===1&&i.type===`styling`&&i.body.length===1&&i.body[0].type===`ordgroup`&&i.body[0].body.length===0&&(h.length>1||!d)&&!Array.isArray(v?.[v.length-1])&&!(l&&v?.[v.length-1]===!0)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(a===`\\\\`){e.consume();let t;e.gullet.future().text!==` `&&(t=e.parseSizeGroup(!0)),g.push(t?t.value:null),ee(),_.push(Hr(e)),m=[],h.push(m),y()}else throw new r(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:a,arraystretch:s,body:h,cols:o,rowGaps:g,hskipBeforeAndAfter:i,hLinesBeforeRow:_,colSeparationType:c,tags:v,leqno:p}}function qr(e){return e.slice(0,1)===`d`?`display`:`text`}let Jr=function(e,t){let n,i,a=e.body.length,o=e.hLinesBeforeRow,s=0,c=Array(a),l=[],u=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;e.colSeparationType&&e.colSeparationType===`small`&&(f=.2778*(t.havingStyle(C.SCRIPT).sizeMultiplier/t.sizeMultiplier));let p=e.colSeparationType===`CD`?we({number:3,unit:`ex`},t):12*d,m=3*d,h=e.arraystretch*p,g=.7*h,_=.3*h,v=0;function y(e){for(let t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(o[0]),n=0;n<e.body.length;++n){let r=e.body[n],a=g,l=_;s<r.length&&(s=r.length);let u={cells:Array(r.length),height:0,depth:0,pos:0};for(i=0;i<r.length;++i){let e=B(r[i],t);l<e.depth&&(l=e.depth),a<e.height&&(a=e.height),u.cells[i]=e}let d=e.rowGaps[n],f=0;d&&(f=we(d,t),f>0&&(f+=_,l<f&&(l=f),f=0)),e.addJot&&n<e.body.length-1&&(l+=m),u.height=a,u.depth=l,v+=a,u.pos=v,v+=l+f,c[n]=u,y(o[n+1])}let ee=v/2+t.fontMetrics().axisHeight,b=e.cols||[],x=[],S,te,ne=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<a;++n){let r=c[n],i=r.pos-ee,a=e.tags[n],o;o=a===!0?M([`eqn-num`],[],t):a===!1?M([],[],t):M([],Zt(a,t,!0),t),o.depth=r.depth,o.height=r.height,ne.push({type:`elem`,elem:o,shift:i})}for(i=0,te=0;i<s||te<b.length;++i,++te){let o=b[te],l=!0;for(;(re=o)?.type===`separator`;){var re;if(l||(S=M([`arraycolsep`],[]),S.style.width=w(t.fontMetrics().doubleRuleSep),x.push(S)),o.separator===`|`||o.separator===`:`){let e=o.separator===`|`?`solid`:`dashed`,n=M([`vertical-separator`],[],t);n.style.height=w(v),n.style.borderRightWidth=w(u),n.style.borderRightStyle=e,n.style.margin=`0 `+w(-u/2);let r=v-ee;r&&(n.style.verticalAlign=w(-r)),x.push(n)}else throw new r(`Invalid separator type: `+o.separator);te++,o=b[te],l=!1}if(i>=s)continue;let d;(i>0||e.hskipBeforeAndAfter)&&(d=o?.pregap??f,d!==0&&(S=M([`arraycolsep`],[]),S.style.width=w(d),x.push(S)));let p=[];for(n=0;n<a;++n){let e=c[n],t=e.cells[i];if(!t)continue;let r=e.pos-ee;t.depth=e.depth,t.height=e.height,p.push({type:`elem`,elem:t,shift:r})}let m=It({positionType:`individualShift`,children:p},t),h=M([`col-align-`+(o?.align||`c`)],[m]);x.push(h),(i<s-1||e.hskipBeforeAndAfter)&&(d=o?.postgap??f,d!==0&&(S=M([`arraycolsep`],[]),S.style.width=w(d),x.push(S)))}let ie=M([`mtable`],x);if(l.length>0){let e=jt(`katex-hline`,t,u),n=jt(`katex-hdashline`,t,u),r=[{type:`elem`,elem:ie,shift:0}];for(;l.length>0;){let t=l.pop(),i=t.pos-ee;t.isDashed?r.push({type:`elem`,elem:n,shift:i}):r.push({type:`elem`,elem:e,shift:i})}ie=It({positionType:`individualShift`,children:r},t)}if(ne.length===0)return M([`mord`],[ie],t);{let e=It({positionType:`individualShift`,children:ne},t),n=M([`katex-tag`],[e],t);return Nt([ie,n])}},Yr={c:`center `,l:`left `,r:`right `},Xr=function(e,t){let n=[],r=new H(`mtd`,[],[`mtr-glue`]),i=new H(`mtd`,[],[`mml-eqn-num`]);for(let a=0;a<e.body.length;a++){let o=e.body[a],s=[];for(let e=0;e<o.length;e++)s.push(new H(`mtd`,[_n(o[e],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new H(`mtr`,s))}let a=new H(`mtable`,n),o=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);a.setAttribute(`rowspacing`,w(o));let s=``,c=``;if(e.cols&&e.cols.length>0){let t=e.cols,n=``,r=!1,i=0,o=t.length;t[0].type===`separator`&&(s+=`top `,i=1),t[t.length-1].type===`separator`&&(s+=`bottom `,--o);for(let e=i;e<o;e++){let i=t[e];i.type===`align`?(c+=Yr[i.align],r&&(n+=`none `),r=!0):i.type===`separator`&&(r&&=(n+=i.separator===`|`?`solid `:`dashed `,!1))}a.setAttribute(`columnalign`,c.trim()),/[sd]/.test(n)&&a.setAttribute(`columnlines`,n.trim())}if(e.colSeparationType===`align`){let t=e.cols||[],n=``;for(let e=1;e<t.length;e++)n+=e%2?`0em `:`1em `;a.setAttribute(`columnspacing`,n.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?a.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?a.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?a.setAttribute(`columnspacing`,`0.5em`):a.setAttribute(`columnspacing`,`1em`);let l=``,u=e.hLinesBeforeRow;s+=u[0].length>0?`left `:``,s+=u[u.length-1].length>0?`right `:``;for(let e=1;e<u.length-1;e++)l+=u[e].length===0?`none `:u[e][0]?`dashed `:`solid `;return/[sd]/.test(l)&&a.setAttribute(`rowlines`,l.trim()),s!==``&&(a=new H(`menclose`,[a]),a.setAttribute(`notation`,s.trim())),e.arraystretch&&e.arraystretch<1&&(a=new H(`mstyle`,[a]),a.setAttribute(`scriptlevel`,`1`)),a},Zr=function(e,t){e.envName.includes(`ed`)||Ur(e);let n=[],i=e.envName===`split`,a=Kr(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:Gr(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){let e=`Number of columns should be a positive integer`,n=Hn(t[0],e);if(!/^[0-9]+$/.test(n)||Number(n)<1)throw new r(e,t[0]);o=Number(n),s=o*2}let l=!s;a.body.forEach(function(e){for(let t=1;t<e.length;t+=2)zn(zn(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(l)s<e.length&&(s=e.length);else{let t=e.length/2;if(o<t)throw new r(`Too many math in a row: `+(`expected `+o+`, but got `+t),e[0])}});for(let e=0;e<s;++e){let t=`r`,r=0;e%2==1?t=`l`:e>0&&l&&(r=1),n[e]={type:`align`,align:t,pregap:r,postgap:0}}return a.colSeparationType=l?`align`:`alignat`,a};Rr({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){let n=(Vn(t[0])?[t[0]]:zn(t[0],`ordgroup`).body).map(function(e){let t=Bn(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new r(`Unknown column alignment: `+t,e)}),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Kr(e.parser,i,qr(e.envName))},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){let t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,i={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){let t=e.parser;if(t.consumeSpaces(),t.fetch().text===`[`){if(t.consume(),t.consumeSpaces(),n=t.fetch().text,!`lcr`.includes(n))throw new r(`Expected l or c or r`,t.nextToken);t.consume(),t.consumeSpaces(),t.expect(`]`),t.consume(),i.cols=[{type:`align`,align:n}]}}let a=Kr(e.parser,i,qr(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){let t=Kr(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){let n=(Vn(t[0])?[t[0]]:zn(t[0],`ordgroup`).body).map(function(e){let t=Bn(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new r(`Unknown column alignment: `+t,e)});if(n.length>1)throw new r(`{subarray} can contain only one column`);let i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},a=Kr(e.parser,i,`script`);if(a.body.length>0&&a.body[0].length>1)throw new r(`{subarray} can contain only one column`);return a},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){let t=Kr(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},qr(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Zr,htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Wr.has(e.envName)&&Ur(e);let t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Gr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Kr(e.parser,t,`display`)},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Zr,htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Ur(e);let t={autoTag:Gr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Kr(e.parser,t,`display`)},htmlBuilder:Jr,mathmlBuilder:Xr}),Rr({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Ur(e),tr(e.parser)},htmlBuilder:Jr,mathmlBuilder:Xr}),K(`\\nonumber`,`\\gdef\\@eqnsw{0}`),K(`\\notag`,`\\nonumber`),N({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new r(e.funcName+` valid only within array environment`)}});var Qr=Lr;N({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){let n=e.parser,i=e.funcName,a=t[0];if(a.type!==`ordgroup`)throw new r(`Invalid environment name`,a);let o=Hn(a,`Environment name should contain only text characters and spaces`,!0);if(i===`\\begin`){if(!Object.prototype.hasOwnProperty.call(Qr,o))throw new r(`No such environment: `+o,a);let e=Qr[o],t=n.parseArguments(`\\begin{`+o+`}`,e),i=t.args,s=t.optArgs,c={mode:n.mode,envName:o,parser:n},l=e.handler(c,i,s);n.expect(`\\end`,!1);let u=n.nextToken,d=zn(n.parseFunction(),`environment`);if(d.name!==o)throw new r(`Mismatch: \\begin{`+o+`} matched by \\end{`+d.name+`}`,u);return l}return{type:`environment`,mode:n.mode,name:o,nameGroup:a}}});let $r=(e,t)=>{let n=e.font,r=t.withFont(n);return B(e.body,r)},ei=(e,t)=>{let n=e.font,r=t.withFont(n);return _n(e.body,r)},ti={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};N({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=F(t[0]),a=r in ti?ti[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:$r,mathmlBuilder:ei}),N({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{let n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Yn(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:d(r)}}}),N({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});let ni=(e,t)=>{let n=t.style,r=n.fracNum(),i=n.fracDen(),a;a=t.havingStyle(r);let o=B(e.numer,a,t);if(e.continued){let e=8.5/t.fontMetrics().ptPerEm,n=3.5/t.fontMetrics().ptPerEm;o.height=o.height<e?e:o.height,o.depth=o.depth<n?n:o.depth}a=t.havingStyle(i);let s=B(e.denom,a,t),c,l,u;e.hasBarLine?(e.barSize?(l=we(e.barSize,t),c=jt(`frac-line`,t,l)):c=jt(`frac-line`,t),l=c.height,u=c.height):(c=null,l=0,u=t.fontMetrics().defaultRuleThickness);let d,f,p;n.size===C.DISPLAY.size?(d=t.fontMetrics().num1,f=l>0?3*u:7*u,p=t.fontMetrics().denom1):(l>0?(d=t.fontMetrics().num2,f=u):(d=t.fontMetrics().num3,f=3*u),p=t.fontMetrics().denom2);let m;if(c){let e=t.fontMetrics().axisHeight;d-o.depth-(e+.5*l)<f&&(d+=f-(d-o.depth-(e+.5*l))),e-.5*l-(s.height-p)<f&&(p+=f-(e-.5*l-(s.height-p)));let n=-(e-.5*l);m=It({positionType:`individualShift`,children:[{type:`elem`,elem:s,shift:p},{type:`elem`,elem:c,shift:n},{type:`elem`,elem:o,shift:-d}]},t)}else{let e=d-o.depth-(s.height-p);e<f&&(d+=.5*(f-e),p+=.5*(f-e)),m=It({positionType:`individualShift`,children:[{type:`elem`,elem:s,shift:p},{type:`elem`,elem:o,shift:-d}]},t)}a=t.havingStyle(n),m.height*=a.sizeMultiplier/t.sizeMultiplier,m.depth*=a.sizeMultiplier/t.sizeMultiplier;let h;h=n.size===C.DISPLAY.size?t.fontMetrics().delim1:n.size===C.SCRIPTSCRIPT.size?t.havingStyle(C.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2;let g,_;return g=e.leftDelim==null?nn(t,[`mopen`]):Ar(e.leftDelim,h,!0,t.havingStyle(n),e.mode,[`mopen`]),_=e.continued?M([]):e.rightDelim==null?nn(t,[`mclose`]):Ar(e.rightDelim,h,!0,t.havingStyle(n),e.mode,[`mclose`]),M([`mord`].concat(a.sizingClasses(t)),[g,M([`mfrac`],[m]),_],t)},ri=(e,t)=>{let n=new H(`mfrac`,[_n(e.numer,t),_n(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){let r=we(e.barSize,t);n.setAttribute(`linethickness`,w(r))}if(e.leftDelim!=null||e.rightDelim!=null){let t=[];if(e.leftDelim!=null){let n=new H(`mo`,[new on(e.leftDelim.replace(`\\`,``))]);n.setAttribute(`fence`,`true`),t.push(n)}if(t.push(n),e.rightDelim!=null){let n=new H(`mo`,[new on(e.rightDelim.replace(`\\`,``))]);n.setAttribute(`fence`,`true`),t.push(n)}return dn(t)}return n},ii=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;N({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}let l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),ii({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:ni,mathmlBuilder:ri}),N({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){let t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});let ai=[`display`,`text`,`script`,`scriptscript`],oi=function(e){let t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};N({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){let n=e.parser,r=t[4],i=t[5],a=F(t[0]),o=a.type===`atom`&&a.family===`open`?oi(a.text):null,s=F(t[1]),c=s.type===`atom`&&s.family===`close`?oi(s.text):null,l=zn(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);let f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){let e=zn(p.body[0],`textord`);f=ai[Number(e.text)]}}else p=zn(p,`textord`),f=ai[Number(p.text)];return ii({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),N({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){let n=e.parser;e.funcName;let r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:zn(t[0],`size`).value,token:r}}}),N({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{let n=e.parser;e.funcName;let r=t[0],i=zn(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));let a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});let si=(e,t)=>{let n=t.style,r,i;e.type===`supsub`?(r=e.sup?B(e.sup,t.havingStyle(n.sup()),t):B(e.sub,t.havingStyle(n.sub()),t),i=zn(e.base,`horizBrace`)):i=zn(e,`horizBrace`);let a=B(i.base,t.havingBaseStyle(C.DISPLAY)),o=Mn(i,t),s;if(s=i.isOver?It({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]},t):It({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]},t),r){let e=M([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?It({positionType:`firstBaseline`,children:[{type:`elem`,elem:e},{type:`kern`,size:.2},{type:`elem`,elem:r}]},t):It({positionType:`bottom`,positionData:e.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:e}]},t)}return M([`minner`,i.isOver?`mover`:`munder`],[s],t)};N({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){let n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:si,mathmlBuilder:(e,t)=>{let n=kn(e.label);return new H(e.isOver?`mover`:`munder`,[_n(e.base,t),n])}}),N({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=t[1],i=zn(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:I(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{let n=Zt(e.body,t,!1);return Mt(e.href,[],n,t)},mathmlBuilder:(e,t)=>{let n=gn(e.body,t);return n instanceof H||(n=new H(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),N({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=zn(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);let i=[];for(let e=0;e<r.length;e++){let t=r[e];t===`~`&&(t=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:t})}let a={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:I(a)}}}),N({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:I(t[0])}},htmlBuilder(e,t){let n=Zt(e.body,t.withFont(``),!1);return Nt(n)},mathmlBuilder(e,t){return new H(`mrow`,hn(e.body,t.withFont(``)))}}),N({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{let n=e.parser,i=e.funcName;e.token;let a=zn(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);let s,c={};switch(i){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:{let e=[],t=``;for(let n=0;n<a.length;n++)a.startsWith(`{,}`,n)?(t+=`,`,n+=2):a[n]===`,`?(e.push(t),t=``):t+=a[n];e.push(t);for(let t=0;t<e.length;t++){let n=e[t],i=n.indexOf(`=`);if(i<0)throw new r(`\\htmlData key/value '`+n+`' missing equals sign`);let a=n.slice(0,i),o=n.slice(i+1);c[`data-`+a.trim()]=o}s={command:`\\htmlData`,attributes:c};break}default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:I(o)}:n.formatUnsupportedCmd(i)},htmlBuilder:(e,t)=>{let n=Zt(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));let i=M(r,n,t);for(let t of Object.entries(e.attributes)){let e=t[0],n=t[1];e!==`class`&&i.setAttribute(e,n)}return i},mathmlBuilder:(e,t)=>gn(e.body,t)}),N({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:I(t[0]),mathml:I(t[1])}),htmlBuilder:(e,t)=>{let n=Zt(e.html,t,!1);return Nt(n)},mathmlBuilder:(e,t)=>gn(e.mathml,t)});let ci=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};{let t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new r(`Invalid size: '`+e+`' in \\includegraphics`);let n={number:+(t[1]+t[2]),unit:t[3]};if(!Ce(n))throw new r(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n}};N({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{let i=e.parser,a={number:0,unit:`em`},o={number:.9,unit:`em`},s={number:0,unit:`em`},c=``;if(n[0]){let e=zn(n[0],`raw`).string.split(`,`);for(let t=0;t<e.length;t++){let n=e[t].split(`=`);if(n.length===2){let e=n[1].trim();switch(n[0].trim()){case`alt`:c=e;break;case`width`:a=ci(e);break;case`height`:o=ci(e);break;case`totalheight`:s=ci(e);break;default:throw new r(`Invalid key: '`+n[0]+`' in \\includegraphics.`)}}}}let l=zn(t[0],`url`).url;return c===``&&(c=l,c=c.replace(/^.*[\\/]/,``),c=c.substring(0,c.lastIndexOf(`.`))),i.settings.isTrusted({command:`\\includegraphics`,url:l})?{type:`includegraphics`,mode:i.mode,alt:c,width:a,height:o,totalheight:s,src:l}:i.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{let n=we(e.height,t),r=0;e.totalheight.number>0&&(r=we(e.totalheight,t)-n);let i=0;e.width.number>0&&(i=we(e.width,t));let a={height:w(n+r)};i>0&&(a.width=w(i)),r>0&&(a.verticalAlign=w(-r));let o=new Me(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{let n=new H(`mglyph`,[]);n.setAttribute(`alt`,e.alt);let r=we(e.height,t),i=0;if(e.totalheight.number>0&&(i=we(e.totalheight,t)-r,n.setAttribute(`valign`,w(-i))),n.setAttribute(`height`,w(r+i)),e.width.number>0){let r=we(e.width,t);n.setAttribute(`width`,w(r))}return n.setAttribute(`src`,e.src),n}}),N({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){let n=e.parser,r=e.funcName,i=zn(t[0],`size`);if(n.settings.strict){let e=r[1]===`m`,t=i.value.unit===`mu`;e?(t||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):t&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Lt(e.dimension,t)},mathmlBuilder(e,t){let n=we(e.dimension,t);return new sn(n)}}),N({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{let n;e.alignment===`clap`?(n=M([],[B(e.body,t)]),n=M([`katex-inner`],[n],t)):n=M([`katex-inner`],[B(e.body,t)]);let r=M([`katex-fix`],[]),i=M([e.alignment],[n,r],t),a=M([`katex-strut`]);return a.style.height=w(i.height+i.depth),i.depth&&(a.style.verticalAlign=w(-i.depth)),i.children.unshift(a),i=M([`katex-thinbox`],[i],t),M([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{let n=new H(`mpadded`,[_n(e.body,t)]);if(e.alignment!==`rlap`){let t=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,t+`width`)}return n.setAttribute(`width`,`0px`),n}}),N({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){let n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);let a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),N({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new r(`Mismatched `+e.funcName)}});let li=(e,t)=>{switch(t.style.size){case C.DISPLAY.size:return e.display;case C.TEXT.size:return e.text;case C.SCRIPT.size:return e.script;case C.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};N({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:I(t[0]),text:I(t[1]),script:I(t[2]),scriptscript:I(t[3])}),htmlBuilder:(e,t)=>{let n=li(e,t),r=Zt(n,t,!1);return Nt(r)},mathmlBuilder:(e,t)=>{let n=li(e,t);return gn(n,t)}});let ui=(e,t,n,r,i,a,o)=>{e=M([],[e]);let s=n&&d(n),c,l;if(t){let e=B(t,r.havingStyle(i.sup()),r);l={elem:e,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-e.depth)}}if(n){let e=B(n,r.havingStyle(i.sub()),r);c={elem:e,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-e.height)}}let u;if(l&&c){let t=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;u=It({positionType:`bottom`,positionData:t,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:w(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:w(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else if(c){let t=e.height-o;u=It({positionType:`top`,positionData:t,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:w(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]},r)}else if(l){let t=e.depth+o;u=It({positionType:`bottom`,positionData:t,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:w(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;let f=[u];if(c&&a!==0&&!s){let e=M([`mspace`],[],r);e.style.marginRight=w(a),f.unshift(e)}return M([`mop`,`op-limits`],f,r)},di=new Set([`\\smallint`]),fi=(e,t)=>{let n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=zn(e.base,`op`),i=!0):a=zn(e,`op`);let o=t.style,s=!1;o.size===C.DISPLAY.size&&a.symbol&&!di.has(a.name)&&(s=!0);let c,l;if(a.symbol){let e=s?`Size2-Regular`:`Size1-Regular`,n=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(n=a.name.slice(1),a.name=n===`oiint`?`\\iint`:`\\iiint`),c=wt(a.name,e,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,n.length>0){let e=Vt(n+`Size`+(s?`2`:`1`),t);c=It({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:e,shift:s?.08:0}]},t),a.name=`\\`+n,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){let e=Zt(a.body,t,!0);e.length===1&&e[0]instanceof Pe?(c=e[0],c.classes[0]=`mop`):c=M([`mop`],e,t)}else{let e=[];for(let n=1;n<a.name.length;n++)e.push(Tt(a.name[n],a.mode,t));c=M([`mop`],e,t)}let u=0,d=0;return(c instanceof Pe||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(u=(c.height-c.depth)/2-t.fontMetrics().axisHeight,d=c.italic??0),i?ui(c,n,r,t,o,d,u):(u&&(c.style.position=`relative`,c.style.top=w(u)),c)},pi=(e,t)=>{let n;if(e.symbol)n=new H(`mo`,[un(e.name,e.mode)]),di.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new H(`mo`,hn(e.body,t));else{n=new H(`mi`,[new on(e.name.slice(1))]);let t=new H(`mo`,[un(`⁡`,`text`)]);n=e.parentIsSupSub?new H(`mrow`,[n,t]):an([n,t])}return n},mi={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};N({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{let n=e.parser,r=e.funcName;return r.length===1&&(r=mi[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:fi,mathmlBuilder:pi}),N({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{let n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:I(r)}}});let hi={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};N({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){let t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),N({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){let t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),N({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){let t=e.parser,n=e.funcName;return n.length===1&&(n=hi[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});let gi=(e,t)=>{let n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=zn(e.base,`operatorname`),i=!0):a=zn(e,`operatorname`);let o;if(a.body.length>0){let e=a.body.map(e=>{let t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),n=Zt(e,t.withFont(`mathrm`),!0);for(let e=0;e<n.length;e++){let t=n[e];t instanceof Pe&&(t.text=t.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=M([`mop`],n,t)}else o=M([`mop`],[],t);return i?ui(o,n,r,t,t.style,0,0):o};N({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{let n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:I(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:gi,mathmlBuilder:(e,t)=>{let n=hn(e.body,t.withFont(`mathrm`)),r=!0;for(let e=0;e<n.length;e++){let t=n[e];if(!(t instanceof sn)){if(t instanceof H)switch(t.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:{let e=t.children[0];t.children.length===1&&e instanceof on?e.text=e.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break}default:r=!1}else r=!1}}if(r){let e=n.map(e=>e.toText()).join(``);n=[new on(e)]}let i=new H(`mi`,n);i.setAttribute(`mathvariant`,`normal`);let a=new H(`mo`,[un(`⁡`,`text`)]);return e.parentIsSupSub?new H(`mrow`,[i,a]):an([i,a])}}),K(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),P({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Nt(Zt(e.body,t,!1)):M([`mord`],Zt(e.body,t,!0),t)},mathmlBuilder(e,t){return gn(e.body,t,!0)}}),N({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){let n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){let n=B(e.body,t.havingCrampedStyle()),r=jt(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=It({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]},t);return M([`mord`,`katex-overline`],[a],t)},mathmlBuilder(e,t){let n=new H(`mo`,[new on(`‾`)]);n.setAttribute(`stretchy`,`true`);let r=new H(`mover`,[_n(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),N({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:I(r)}},htmlBuilder:(e,t)=>{let n=Zt(e.body,t.withPhantom(),!1);return Nt(n)},mathmlBuilder:(e,t)=>{let n=hn(e.body,t);return new H(`mphantom`,n)}}),K(`\\hphantom`,`\\smash{\\phantom{#1}}`),N({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{let n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>{let n=M([`katex-inner`],[B(e.body,t.withPhantom())]),r=M([`katex-fix`],[]);return M([`mord`,`rlap`],[n,r],t)},mathmlBuilder:(e,t)=>{let n=hn(I(e.body),t),r=new H(`mphantom`,n),i=new H(`mpadded`,[r]);return i.setAttribute(`width`,`0px`),i}}),N({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){let n=e.parser,r=zn(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){let n=B(e.body,t),r=we(e.dy,t);return It({positionType:`shift`,positionData:-r,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){let n=new H(`mpadded`,[_n(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}});let _i=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]});N({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:_i,htmlBuilder(e,t){return M([`mord`,`reflectbox`],[B(e.body,t)],t)},mathmlBuilder(e,t){return _n(e.body,t)}}),N({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:_i}),N({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),N({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){let r=e.parser,i=n[0],a=zn(t[0],`size`),o=zn(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&zn(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){let n=M([`mord`,`katex-rule`],[],t),r=we(e.width,t),i=we(e.height,t),a=e.shift?we(e.shift,t):0;return n.style.borderRightWidth=w(r),n.style.borderTopWidth=w(i),n.style.bottom=w(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){let n=we(e.width,t),r=we(e.height,t),i=e.shift?we(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new H(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,w(n)),o.setAttribute(`height`,w(r));let s=new H(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,w(i)):(s.setAttribute(`height`,w(i)),s.setAttribute(`depth`,w(-i))),s.setAttribute(`voffset`,w(i)),s}});function vi(e,t,n){let r=Zt(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier;for(let e=0;e<r.length;e++){let a=r[e].classes.indexOf(`katex-sizing`);a<0?Array.prototype.push.apply(r[e].classes,t.sizingClasses(n)):r[e].classes[a+1]===`reset-size`+t.size&&(r[e].classes[a+1]=`reset-size`+n.size),r[e].height*=i,r[e].depth*=i}return Nt(r)}let yi=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];N({type:`sizing`,names:yi,numArgs:0,allowedInText:!0,handler:(e,t)=>{let n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:yi.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{let n=t.havingSize(e.size);return vi(e.body,n,t)},mathmlBuilder:(e,t)=>{let n=t.havingSize(e.size),r=hn(e.body,n),i=new H(`mstyle`,r);return i.setAttribute(`mathsize`,w(n.sizeMultiplier)),i}}),N({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{let r=e.parser,i=!1,a=!1,o=n[0]&&zn(n[0],`ordgroup`);if(o){let e;for(let t=0;t<o.body.length;++t){let n=o.body[t];if(e=Bn(n).text,e===`t`)i=!0;else if(e===`b`)a=!0;else{i=!1,a=!1;break}}}else i=!0,a=!0;let s=t[0];return{type:`smash`,mode:r.mode,body:s,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{let n=M([],[B(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return M([`mord`,`katex-smash`],[n],t);if(n.children)for(let t=0;t<n.children.length;t++)e.smashHeight&&(n.children[t].height=0),e.smashDepth&&(n.children[t].depth=0);let r=It({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]},t);return M([`mord`],[r],t)},mathmlBuilder:(e,t)=>{let n=new H(`mpadded`,[_n(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),N({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){let r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){let n=B(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Pt(n,t);let r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<C.TEXT.id&&(i=t.fontMetrics().xHeight);let a=r+i/4,o=n.height+n.depth+a+r,s=br(o,t),c=s.span,l=s.ruleWidth,u=s.advanceWidth,d=c.height-l;d>n.height+n.depth+a&&(a=(a+d-n.height-n.depth)/2);let f=c.height-n.height-a-l;n.style.paddingLeft=w(u);let p=It({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+f)},{type:`elem`,elem:c},{type:`kern`,size:l}]},t);if(e.index){let n=t.havingStyle(C.SCRIPTSCRIPT),r=B(e.index,n,t),i=.6*(p.height-p.depth),a=It({positionType:`shift`,positionData:-i,children:[{type:`elem`,elem:r}]},t),o=M([`katex-root`],[a]);return M([`mord`,`sqrt`],[o,p],t)}return M([`mord`,`sqrt`],[p],t)},mathmlBuilder(e,t){let n=e.body,r=e.index;return r?new H(`mroot`,[_n(n,t),_n(r,t)]):new H(`msqrt`,[_n(n,t)])}});let bi={display:C.DISPLAY,text:C.TEXT,script:C.SCRIPT,scriptscript:C.SCRIPTSCRIPT};function xi(e){return e in bi}N({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){let n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!xi(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){let n=bi[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),vi(e.body,r,t)},mathmlBuilder(e,t){let n=bi[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));let i=hn(e.body,r),a=new H(`mstyle`,i),o={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return a.setAttribute(`scriptlevel`,o[0]),a.setAttribute(`displaystyle`,o[1]),a}});let Si=function(e,t){let n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===C.DISPLAY.size||n.alwaysHandleSupSub)?fi:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===C.DISPLAY.size||n.limits)?gi:null:n.type===`accent`?d(n.base)?Wn:null:n.type===`horizBrace`&&!e.sub===n.isOver?si:null:null};P({type:`supsub`,htmlBuilder(e,t){let n=Si(e,t);if(n)return n(e,t);let r=e.base,i=e.sup,a=e.sub,o=B(r,t),s,c,l=t.fontMetrics(),u=0,f=0,p=r&&d(r);if(i){let e=t.havingStyle(t.style.sup());s=B(i,e,t),p||(u=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(a){let e=t.havingStyle(t.style.sub());c=B(a,e,t),p||(f=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let m;m=t.style===C.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2;let h=t.sizeMultiplier,g=w(.5/l.ptPerEm/h),_=null;if(c){let t=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Pe||t)&&(_=w(-(o.italic??0)))}let v;if(s&&c){u=Math.max(u,m,s.depth+.25*l.xHeight),f=Math.max(f,l.sub2);let e=4*l.defaultRuleThickness;if(u-s.depth-(c.height-f)<e){f=e-(u-s.depth)+c.height;let t=.8*l.xHeight-(u-s.depth);t>0&&(u+=t,f-=t)}let n=[{type:`elem`,elem:c,shift:f,marginRight:g,marginLeft:_},{type:`elem`,elem:s,shift:-u,marginRight:g}];v=It({positionType:`individualShift`,children:n},t)}else if(c)f=Math.max(f,l.sub1,c.height-.8*l.xHeight),v=It({positionType:`shift`,positionData:f,children:[{type:`elem`,elem:c,marginLeft:_,marginRight:g}]},t);else if(s)u=Math.max(u,m,s.depth+.25*l.xHeight),v=It({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:g}]},t);else throw Error(`supsub must have either sup or sub.`);let y=tn(o,`right`)||`mord`;return M([y],[o,M([`msupsub`],[v])],t)},mathmlBuilder(e,t){let n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);let a=[_n(e.base,t)];e.sub&&a.push(_n(e.sub,t)),e.sup&&a.push(_n(e.sup,t));let o;if(n)o=r?`mover`:`munder`;else if(!e.sub){let n=e.base;o=n&&n.type===`op`&&n.limits&&(t.style===C.DISPLAY||n.alwaysHandleSupSub)||n&&n.type===`operatorname`&&n.alwaysHandleSupSub&&(n.limits||t.style===C.DISPLAY)?`mover`:`msup`}else if(e.sup){let n=e.base;o=n&&n.type===`op`&&n.limits&&t.style===C.DISPLAY||n&&n.type===`operatorname`&&n.alwaysHandleSupSub&&(t.style===C.DISPLAY||n.limits)?`munderover`:`msubsup`}else{let n=e.base;o=n&&n.type===`op`&&n.limits&&(t.style===C.DISPLAY||n.alwaysHandleSupSub)||n&&n.type===`operatorname`&&n.alwaysHandleSupSub&&(n.limits||t.style===C.DISPLAY)?`munder`:`msub`}return new H(o,a)}}),P({type:`atom`,htmlBuilder(e,t){return Tt(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){let n=new H(`mo`,[un(e.text,e.mode)]);if(e.family===`bin`){let r=pn(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});let Ci={mi:`italic`,mn:`normal`,mtext:`normal`};P({type:`mathord`,htmlBuilder(e,t){return j(e,t)},mathmlBuilder(e,t){let n=new H(`mi`,[un(e.text,e.mode,t)]),r=pn(e,t)||`italic`;return r!==Ci[n.type]&&n.setAttribute(`mathvariant`,r),n}}),P({type:`textord`,htmlBuilder(e,t){return j(e,t)},mathmlBuilder(e,t){let n=un(e.text,e.mode,t),r=pn(e,t)||`normal`,i;return i=e.mode===`text`?new H(`mtext`,[n]):/[0-9]/.test(e.text)?new H(`mn`,[n]):e.text===`\\prime`?new H(`mo`,[n]):new H(`mi`,[n]),r!==Ci[i.type]&&i.setAttribute(`mathvariant`,r),i}});let wi=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),Ti=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);P({type:`spacing`,htmlBuilder(e,t){let n=Ti.get(e.text),i=wi.get(e.text);if(n){let r=n.className||``;if(e.mode===`text`){let n=j(e,t);return n.classes.push(r),n}return M([`mspace`,r],[Tt(e.text,e.mode,t)],t)}if(i)return M([`mspace`,i],[],t);throw new r(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){let n;if(Ti.has(e.text))n=new H(`mtext`,[new on(`\xA0`)]);else if(wi.has(e.text))return new H(`mspace`);else throw new r(`Unknown type of space "`+e.text+`"`);return n}});let Ei=()=>{let e=new H(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};P({type:`tag`,mathmlBuilder(e,t){let n=new H(`mtable`,[new H(`mtr`,[Ei(),new H(`mtd`,[gn(e.body,t)]),Ei(),new H(`mtd`,[gn(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});let Di={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Oi={"\\textbf":`textbf`,"\\textmd":`textmd`},ki={"\\textit":`textit`,"\\textup":`textup`},Ai=(e,t)=>{let n=e.font;return n?Di[n]?t.withTextFontFamily(Di[n]):Oi[n]?t.withTextFontWeight(Oi[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(ki[n]):t};N({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){let n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:I(i),font:r}},htmlBuilder(e,t){let n=Ai(e,t),r=Zt(e.body,n,!0);return M([`mord`,`text`],r,n)},mathmlBuilder(e,t){let n=Ai(e,t);return gn(e.body,n)}}),N({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){let n=B(e.body,t),r=jt(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=It({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]},t);return M([`mord`,`katex-underline`],[a],t)},mathmlBuilder(e,t){let n=new H(`mo`,[new on(`‾`)]);n.setAttribute(`stretchy`,`true`);let r=new H(`munder`,[_n(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),N({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){let n=B(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return It({positionType:`shift`,positionData:i,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){let n=new H(`mpadded`,[_n(e.body,t)],[`vcenter`]);return new H(`mrow`,[n])}}),N({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new r(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){let n=ji(e),r=[],i=t.havingStyle(t.style.text());for(let t=0;t<n.length;t++){let a=n[t];a===`~`&&(a=`\\textasciitilde`),r.push(wt(a,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return M([`mord`,`text`].concat(i.sizingClasses(t)),Ot(r),i)},mathmlBuilder(e,t){let n=new on(ji(e)),r=new H(`mtext`,[n]);return r.setAttribute(`mathvariant`,`monospace`),r}});let ji=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`);var Mi=qt;let Ni=`\\\\[^\ud800-\udfff]`,Pi=RegExp(`[̀-ͯ]+$`),Fi=`([ \r
257
+ ]+)|\\\\(
258
+ |[ \r ]+
259
+ ?)[ \r ]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*`+`|[\ud800-\udbff][\udc00-\udfff]`+`[̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r
260
+ ]*`+(`|`+Ni+`)`);class Ii{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Fi,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){let e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Vr(`EOF`,new Br(this,t,t));let n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new r(`Unexpected character: '`+e[t]+`'`,new Vr(e[t],new Br(this,t,t+1)));let i=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[i]===14){let t=e.indexOf(`
261
+ `,this.tokenRegex.lastIndex);return t===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=t+1,this.lex()}return new Vr(i,new Br(this,t,this.tokenRegex.lastIndex))}}class Li{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new r(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);let e=this.undefStack.pop();for(let t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{let t=this.undefStack[this.undefStack.length-1];t&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}}var Ri=zr;K(`\\noexpand`,function(e){let t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),K(`\\expandafter`,function(e){let t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),K(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),K(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),K(`\\@ifnextchar`,function(e){let t=e.consumeArgs(3);e.consumeSpaces();let n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),K(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),K(`\\TextOrMath`,function(e){let t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});let zi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};K(`\\char`,function(e){let t=e.popToken(),n,i=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)i=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new r("\\char` missing argument");else i=t.text.charCodeAt(0)}else n=10;if(n){if(i=zi[t.text],i==null||i>=n)throw new r(`Invalid base-`+n+` digit `+t.text);let a;for(;(a=zi[e.future().text])!=null&&a<n;)i*=n,i+=a,e.popToken()}return`\\@char{`+i+`}`});let Bi=(e,t,n,i)=>{let a=e.consumeArg().tokens;if(a.length!==1)throw new r(`\\newcommand's first argument must be a macro name`);let o=a[0].text,s=e.isDefined(o);if(s&&!t)throw new r(`\\newcommand{`+o+`} attempting to redefine `+(o+`; use \\renewcommand`));if(!s&&!n)throw new r(`\\renewcommand{`+o+`} when command `+o+` does not yet exist; use \\newcommand`);let c=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text===`[`){let t=``,n=e.expandNextToken();for(;n.text!==`]`&&n.text!==`EOF`;)t+=n.text,n=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new r(`Invalid number of arguments: `+t);c=parseInt(t),a=e.consumeArg().tokens}return s&&i||e.macros.set(o,{tokens:a,numArgs:c}),``};K(`\\newcommand`,e=>Bi(e,!1,!0,!1)),K(`\\renewcommand`,e=>Bi(e,!0,!1,!1)),K(`\\providecommand`,e=>Bi(e,!0,!0,!0)),K(`\\message`,e=>{let t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),K(`\\errmessage`,e=>{let t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),K(`\\show`,e=>{let t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Mi[n],Ye.math[n],Ye.text[n]),``}),K(`\\bgroup`,`{`),K(`\\egroup`,`}`),K(`~`,`\\nobreakspace`),K(`\\lq`,"`"),K(`\\rq`,`'`),K(`\\aa`,`\\r a`),K(`\\AA`,`\\r A`),K(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),K(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),K(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),K(`ℬ`,`\\mathscr{B}`),K(`ℰ`,`\\mathscr{E}`),K(`ℱ`,`\\mathscr{F}`),K(`ℋ`,`\\mathscr{H}`),K(`ℐ`,`\\mathscr{I}`),K(`ℒ`,`\\mathscr{L}`),K(`ℳ`,`\\mathscr{M}`),K(`ℛ`,`\\mathscr{R}`),K(`ℭ`,`\\mathfrak{C}`),K(`ℌ`,`\\mathfrak{H}`),K(`ℨ`,`\\mathfrak{Z}`),K(`\\Bbbk`,`\\Bbb{k}`),K(`\\llap`,`\\mathllap{\\textrm{#1}}`),K(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),K(`\\clap`,`\\mathclap{\\textrm{#1}}`),K(`\\mathstrut`,`\\vphantom{(}`),K(`\\underbar`,`\\underline{\\text{#1}}`),K(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),K(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),K(`\\ne`,`\\neq`),K(`≠`,`\\neq`),K(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),K(`∉`,`\\notin`),K(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),K(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),K(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),K(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),K(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),K(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),K(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),K(`⟂`,`\\perp`),K(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),K(`∌`,`\\notni`),K(`⌜`,`\\ulcorner`),K(`⌝`,`\\urcorner`),K(`⌞`,`\\llcorner`),K(`⌟`,`\\lrcorner`),K(`©`,`\\copyright`),K(`®`,`\\textregistered`),K(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),K(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),K(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),K(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),K(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),K(`⋮`,`\\vdots`),K(`\\varGamma`,`\\mathit{\\Gamma}`),K(`\\varDelta`,`\\mathit{\\Delta}`),K(`\\varTheta`,`\\mathit{\\Theta}`),K(`\\varLambda`,`\\mathit{\\Lambda}`),K(`\\varXi`,`\\mathit{\\Xi}`),K(`\\varPi`,`\\mathit{\\Pi}`),K(`\\varSigma`,`\\mathit{\\Sigma}`),K(`\\varUpsilon`,`\\mathit{\\Upsilon}`),K(`\\varPhi`,`\\mathit{\\Phi}`),K(`\\varPsi`,`\\mathit{\\Psi}`),K(`\\varOmega`,`\\mathit{\\Omega}`),K(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),K(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),K(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),K(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),K(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),K(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),K(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),K(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);let Vi={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Hi=new Set([`bin`,`rel`]);K(`\\dots`,function(e){let t=`\\dotso`,n=e.expandAfterFuture().text;return n in Vi?t=Vi[n]:(n.slice(0,4)===`\\not`||n in Ye.math&&Hi.has(Ye.math[n].group))&&(t=`\\dotsb`),t});let Ui={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};K(`\\dotso`,function(e){return e.future().text in Ui?`\\ldots\\,`:`\\ldots`}),K(`\\dotsc`,function(e){let t=e.future().text;return t in Ui&&t!==`,`?`\\ldots\\,`:`\\ldots`}),K(`\\cdots`,function(e){return e.future().text in Ui?`\\@cdots\\,`:`\\@cdots`}),K(`\\dotsb`,`\\cdots`),K(`\\dotsm`,`\\cdots`),K(`\\dotsi`,`\\!\\cdots`),K(`\\dotsx`,`\\ldots\\,`),K(`\\DOTSI`,`\\relax`),K(`\\DOTSB`,`\\relax`),K(`\\DOTSX`,`\\relax`),K(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),K(`\\,`,`\\tmspace+{3mu}{.1667em}`),K(`\\thinspace`,`\\,`),K(`\\>`,`\\mskip{4mu}`),K(`\\:`,`\\tmspace+{4mu}{.2222em}`),K(`\\medspace`,`\\:`),K(`\\;`,`\\tmspace+{5mu}{.2777em}`),K(`\\thickspace`,`\\;`),K(`\\!`,`\\tmspace-{3mu}{.1667em}`),K(`\\negthinspace`,`\\!`),K(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),K(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),K(`\\enspace`,`\\kern.5em `),K(`\\enskip`,`\\hskip.5em\\relax`),K(`\\quad`,`\\hskip1em\\relax`),K(`\\qquad`,`\\hskip2em\\relax`),K(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),K(`\\tag@paren`,`\\tag@literal{({#1})}`),K(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new r(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),K(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),K(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),K(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),K(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),K(`\\newline`,`\\\\\\relax`),K(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);let Wi=w(Ve[`Main-Regular`][84][1]-.7*Ve[`Main-Regular`][65][1]);K(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Wi+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),K(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Wi+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),K(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),K(`\\@hspace`,`\\hskip #1\\relax`),K(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),K(`\\ordinarycolon`,`:`),K(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),K(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),K(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),K(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),K(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),K(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),K(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),K(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),K(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),K(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),K(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),K(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),K(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),K(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),K(`∷`,`\\dblcolon`),K(`∹`,`\\eqcolon`),K(`≔`,`\\coloneqq`),K(`≕`,`\\eqqcolon`),K(`⩴`,`\\Coloneqq`),K(`\\ratio`,`\\vcentcolon`),K(`\\coloncolon`,`\\dblcolon`),K(`\\colonequals`,`\\coloneqq`),K(`\\coloncolonequals`,`\\Coloneqq`),K(`\\equalscolon`,`\\eqqcolon`),K(`\\equalscoloncolon`,`\\Eqqcolon`),K(`\\colonminus`,`\\coloneq`),K(`\\coloncolonminus`,`\\Coloneq`),K(`\\minuscolon`,`\\eqcolon`),K(`\\minuscoloncolon`,`\\Eqcolon`),K(`\\coloncolonapprox`,`\\Colonapprox`),K(`\\coloncolonsim`,`\\Colonsim`),K(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),K(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),K(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),K(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),K(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),K(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),K(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),K(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),K(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),K(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),K(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),K(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),K(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),K(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),K(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),K(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),K(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),K(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),K(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),K(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),K(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),K(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),K(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),K(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),K(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),K(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),K(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),K(`\\imath`,`\\html@mathml{\\@imath}{ı}`),K(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),K(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),K(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),K(`⟦`,`\\llbracket`),K(`⟧`,`\\rrbracket`),K(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),K(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),K(`↤`,`\\mapsfrom`),K(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),K(`⦃`,`\\lBrace`),K(`⦄`,`\\rBrace`),K(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),K(`⦵`,`\\minuso`),K(`\\darr`,`\\downarrow`),K(`\\dArr`,`\\Downarrow`),K(`\\Darr`,`\\Downarrow`),K(`\\lang`,`\\langle`),K(`\\rang`,`\\rangle`),K(`\\uarr`,`\\uparrow`),K(`\\uArr`,`\\Uparrow`),K(`\\Uarr`,`\\Uparrow`),K(`\\N`,`\\mathbb{N}`),K(`\\R`,`\\mathbb{R}`),K(`\\Z`,`\\mathbb{Z}`),K(`\\alef`,`\\aleph`),K(`\\alefsym`,`\\aleph`),K(`\\Alpha`,`\\mathrm{A}`),K(`\\Beta`,`\\mathrm{B}`),K(`\\bull`,`\\bullet`),K(`\\Chi`,`\\mathrm{X}`),K(`\\clubs`,`\\clubsuit`),K(`\\cnums`,`\\mathbb{C}`),K(`\\Complex`,`\\mathbb{C}`),K(`\\Dagger`,`\\ddagger`),K(`\\diamonds`,`\\diamondsuit`),K(`\\empty`,`\\emptyset`),K(`\\Epsilon`,`\\mathrm{E}`),K(`\\Eta`,`\\mathrm{H}`),K(`\\exist`,`\\exists`),K(`\\harr`,`\\leftrightarrow`),K(`\\hArr`,`\\Leftrightarrow`),K(`\\Harr`,`\\Leftrightarrow`),K(`\\hearts`,`\\heartsuit`),K(`\\image`,`\\Im`),K(`\\infin`,`\\infty`),K(`\\Iota`,`\\mathrm{I}`),K(`\\isin`,`\\in`),K(`\\Kappa`,`\\mathrm{K}`),K(`\\larr`,`\\leftarrow`),K(`\\lArr`,`\\Leftarrow`),K(`\\Larr`,`\\Leftarrow`),K(`\\lrarr`,`\\leftrightarrow`),K(`\\lrArr`,`\\Leftrightarrow`),K(`\\Lrarr`,`\\Leftrightarrow`),K(`\\Mu`,`\\mathrm{M}`),K(`\\natnums`,`\\mathbb{N}`),K(`\\Nu`,`\\mathrm{N}`),K(`\\Omicron`,`\\mathrm{O}`),K(`\\plusmn`,`\\pm`),K(`\\rarr`,`\\rightarrow`),K(`\\rArr`,`\\Rightarrow`),K(`\\Rarr`,`\\Rightarrow`),K(`\\real`,`\\Re`),K(`\\reals`,`\\mathbb{R}`),K(`\\Reals`,`\\mathbb{R}`),K(`\\Rho`,`\\mathrm{P}`),K(`\\sdot`,`\\cdot`),K(`\\sect`,`\\S`),K(`\\spades`,`\\spadesuit`),K(`\\sub`,`\\subset`),K(`\\sube`,`\\subseteq`),K(`\\supe`,`\\supseteq`),K(`\\Tau`,`\\mathrm{T}`),K(`\\thetasym`,`\\vartheta`),K(`\\weierp`,`\\wp`),K(`\\Zeta`,`\\mathrm{Z}`),K(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),K(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),K(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),K(`\\bra`,`\\mathinner{\\langle{#1}|}`),K(`\\ket`,`\\mathinner{|{#1}\\rangle}`),K(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),K(`\\Bra`,`\\left\\langle#1\\right|`),K(`\\Ket`,`\\left|#1\\right\\rangle`);let Gi=e=>t=>{let n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();let c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));let a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));let l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};K(`\\bra@ket`,Gi(!1)),K(`\\bra@set`,Gi(!0)),K(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),K(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),K(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),K(`\\angln`,`{\\angl n}`),K(`\\blue`,`\\textcolor{##6495ed}{#1}`),K(`\\orange`,`\\textcolor{##ffa500}{#1}`),K(`\\pink`,`\\textcolor{##ff00af}{#1}`),K(`\\red`,`\\textcolor{##df0030}{#1}`),K(`\\green`,`\\textcolor{##28ae7b}{#1}`),K(`\\gray`,`\\textcolor{gray}{#1}`),K(`\\purple`,`\\textcolor{##9d38bd}{#1}`),K(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),K(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),K(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),K(`\\blueD`,`\\textcolor{##11accd}{#1}`),K(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),K(`\\tealA`,`\\textcolor{##94fff5}{#1}`),K(`\\tealB`,`\\textcolor{##26edd5}{#1}`),K(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),K(`\\tealD`,`\\textcolor{##01a995}{#1}`),K(`\\tealE`,`\\textcolor{##208170}{#1}`),K(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),K(`\\greenB`,`\\textcolor{##8af281}{#1}`),K(`\\greenC`,`\\textcolor{##74cf70}{#1}`),K(`\\greenD`,`\\textcolor{##1fab54}{#1}`),K(`\\greenE`,`\\textcolor{##0d923f}{#1}`),K(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),K(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),K(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),K(`\\goldD`,`\\textcolor{##e07d10}{#1}`),K(`\\goldE`,`\\textcolor{##a75a05}{#1}`),K(`\\redA`,`\\textcolor{##fca9a9}{#1}`),K(`\\redB`,`\\textcolor{##ff8482}{#1}`),K(`\\redC`,`\\textcolor{##f9685d}{#1}`),K(`\\redD`,`\\textcolor{##e84d39}{#1}`),K(`\\redE`,`\\textcolor{##bc2612}{#1}`),K(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),K(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),K(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),K(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),K(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),K(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),K(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),K(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),K(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),K(`\\purpleE`,`\\textcolor{##543b78}{#1}`),K(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),K(`\\mintB`,`\\textcolor{##edf2df}{#1}`),K(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),K(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),K(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),K(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),K(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),K(`\\grayE`,`\\textcolor{##babec2}{#1}`),K(`\\grayF`,`\\textcolor{##888d93}{#1}`),K(`\\grayG`,`\\textcolor{##626569}{#1}`),K(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),K(`\\grayI`,`\\textcolor{##21242c}{#1}`),K(`\\kaBlue`,`\\textcolor{##314453}{#1}`),K(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);let Ki={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class qi{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Li(Ri,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ii(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new Vr(`EOF`,n.loc)),this.pushTokens(r),new Vr(``,Br.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){let t=[],n=e&&e.length>0;n||this.consumeSpaces();let i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),t.push(a),a.text===`{`)++o;else if(a.text===`}`){if(--o,o===-1)throw new r(`Extra }`,a)}else if(a.text===`EOF`)throw new r(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[s]:`}`)+`'`,a);if(e&&n){if((o===0||o===1&&e[s]===`{`)&&a.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}}while(o!==0||n);return i.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new r(`The length of delimiters doesn't match the number of args!`);let n=t[0];for(let e=0;e<n.length;e++){let t=this.popToken();if(n[e]!==t.text)throw new r(`Use of the macro doesn't match its definition`,t)}}let n=[];for(let r=0;r<e;r++)n.push(this.consumeArg(t&&t[r+1]).tokens);return n}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new r(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){let t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]===`\\`&&!this.isDefined(n))throw new r(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);let a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(let e=a.length-1;e>=0;--e){let t=a[e];if(t.text===`#`){if(e===0)throw new r(`Incomplete placeholder at end of macro body`,t);if(t=a[--e],t.text===`#`)a.splice(e+1,1);else if(/^[1-9]$/.test(t.text))a.splice(e,2,...o[t.text-1]);else throw new r(`Not a valid argument number`,t)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){let e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Vr(e)]):void 0}expandTokens(e){let t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){let e=this.stack.pop();e.treatAsRelax&&=(e.noexpand=!1,!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){let t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){let t=this.macros.get(e);if(t==null)return t;if(e.length===1){let t=this.lexer.catcodes[e];if(t!=null&&t!==13)return}let n=typeof t==`function`?t(this):t;if(typeof n==`string`){let e=0;if(n.includes(`#`)){let t=n.replace(/##/g,``);for(;t.includes(`#`+(e+1));)++e}let t=new Ii(n,this.settings),r=[],i=t.lex();for(;i.text!==`EOF`;)r.push(i),i=t.lex();return r.reverse(),{tokens:r,numArgs:e}}return n}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Mi,e)||Object.prototype.hasOwnProperty.call(Ye.math,e)||Object.prototype.hasOwnProperty.call(Ye.text,e)||Object.prototype.hasOwnProperty.call(Ki,e)}isExpandable(e){let t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(Mi,e)&&!Mi[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}}let Ji=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Yi=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Xi={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Zi={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`};class Qi{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new qi(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new r(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{let e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){let t=this.nextToken;this.consume(),this.gullet.pushToken(new Vr(`}`)),this.gullet.pushTokens(e);let n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(e,t){let n=[];for(;;){this.mode===`math`&&this.consumeSpaces();let r=this.fetch();if(Qi.endOfExpression.has(r.text)||t&&r.text===t||e&&Mi[r.text]&&Mi[r.text].infix)break;let i=this.parseAtom(t);if(!i)break;i.type!==`internal`&&n.push(i)}return this.mode===`text`&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){let t=-1,n;for(let i=0;i<e.length;i++){let a=e[i];if(a.type===`infix`){if(t!==-1)throw new r(`only one infix operator per group`,a.token);t=i,n=a.replaceWith}}if(t!==-1&&n){let r,i,a=e.slice(0,t),o=e.slice(t+1);r=a.length===1&&a[0].type===`ordgroup`?a[0]:{type:`ordgroup`,mode:this.mode,body:a},i=o.length===1&&o[0].type===`ordgroup`?o[0]:{type:`ordgroup`,mode:this.mode,body:o};let s;return s=n===`\\\\abovefrac`?this.callFunction(n,[r,e[t],i],[]):this.callFunction(n,[r,i],[]),[s]}return e}handleSupSubscript(e){let t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();let i;do i=this.parseGroup(e);while(i?.type===`internal`);if(!i)throw new r(`Expected group after '`+n+`'`,t);return i}formatUnsupportedCmd(e){let t=[];for(let n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});let n={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){let t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;let n,i;for(;;){this.consumeSpaces();let e=this.fetch();if(e.text===`\\limits`||e.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=e.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=e.text===`\\limits`);else throw new r(`Limit controls must follow a math operator`,e);this.consume()}else if(e.text===`^`){if(n)throw new r(`Double superscript`,e);n=this.handleSupSubscript(`superscript`)}else if(e.text===`_`){if(i)throw new r(`Double subscript`,e);i=this.handleSupSubscript(`subscript`)}else if(e.text===`'`){if(n)throw new r(`Double superscript`,e);let t={type:`textord`,mode:this.mode,text:`\\prime`},i=[t];for(this.consume();this.fetch().text===`'`;)i.push(t),this.consume();this.fetch().text===`^`&&i.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:i}}else if(Yi[e.text]){let t=Ji.test(e.text),r=[];for(r.push(new Vr(Yi[e.text])),this.consume();;){let e=this.fetch().text;if(!Yi[e]||Ji.test(e)!==t)break;r.unshift(new Vr(Yi[e])),this.consume()}let a=this.subparse(r);t?i={type:`ordgroup`,mode:`math`,body:a}:n={type:`ordgroup`,mode:`math`,body:a}}else break}return n&&i?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:i}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:i?{type:`supsub`,mode:this.mode,base:t,sub:i}:t}parseFunction(e,t){let n=this.fetch(),i=n.text,a=Mi[i];if(!a)return null;if(this.consume(),t&&t!==`atom`&&!a.allowedInArgument)throw new r(`Got function '`+i+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!a.allowedInText)throw new r(`Can't use function '`+i+`' in text mode`,n);if(this.mode===`math`&&a.allowedInMath===!1)throw new r(`Can't use function '`+i+`' in math mode`,n);let o=this.parseArguments(i,a),s=o.args,c=o.optArgs;return this.callFunction(i,s,c,n,e)}callFunction(e,t,n,i,a){let o={funcName:e,parser:this,token:i,breakOnTokenText:a},s=Mi[e];if(s&&s.handler)return s.handler(o,t,n);throw new r(`No function handler for `+e)}parseArguments(e,t){let n=t.numOptionalArgs??0,i=t.numArgs+n;if(i===0)return{args:[],optArgs:[]};let a=[],o=[];for(let s=0;s<i;s++){let i=t.argTypes?.[s],c=s<n;(`primitive`in t&&t.primitive&&i==null||t.type===`sqrt`&&s===1&&o[0]==null)&&(i=`primitive`);let l=this.parseGroupOfType(`argument to '`+e+`'`,i,c);if(c)o.push(l);else if(l!=null)a.push(l);else throw new r(`Null argument, please report this as a bug`)}return{args:a,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:{let e=this.parseArgumentGroup(n,`text`);return e==null?null:{type:`styling`,mode:e.mode,body:[e],style:`text`,resetFont:!0}}case`raw`:{let e=this.parseStringGroup(n);return e==null?null:{type:`raw`,mode:`text`,string:e.text}}case`primitive`:{if(n)throw new r(`A primitive argument cannot be optional`);let t=this.parseGroup(e);if(t==null)throw new r(`Expected group as `+e,this.fetch());return t}case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new r(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){let t=this.gullet.scanArgument(e);if(t==null)return null;let n=``,r;for(;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){let n=this.fetch(),i=n,a=``,o;for(;(o=this.fetch()).text!==`EOF`&&e.test(a+o.text);)i=o,a+=i.text,this.consume();if(a===``)throw new r(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(i,a)}parseColorGroup(e){let t=this.parseStringGroup(e);if(t==null)return null;let n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new r(`Invalid color: '`+t.text+`'`,t);let i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i=`#`+i),{type:`color-token`,mode:this.mode,color:i}}parseSizeGroup(e){let t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);let i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!i)throw new r(`Invalid size: '`+t.text+`'`,t);let a={number:+(i[1]+i[2]),unit:i[3]};if(!Ce(a))throw new r(`Invalid unit: '`+a.unit+`'`,t);return{type:`size`,mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);let t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;let n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){let n=this.gullet.scanArgument(e);if(n==null)return null;let r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();let i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();let a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){let n=this.fetch(),i=n.text,a;if(i===`{`||i===`\\begingroup`){this.consume();let e=i===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();let t=this.parseExpression(!1,e),r=this.fetch();this.expect(e),this.gullet.endGroup(),a={type:`ordgroup`,mode:this.mode,loc:Br.range(n,r),body:t,semisimple:i===`\\begingroup`||void 0}}else if(a=this.parseFunction(t,e)||this.parseSymbol(),a==null&&i[0]===`\\`&&!Object.prototype.hasOwnProperty.call(Ki,i)){if(this.settings.throwOnError)throw new r(`Undefined control sequence: `+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){let t=e.length-1;for(let n=0;n<t;++n){let r=e[n];if(r.type!==`textord`)continue;let i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){let i=e[n+2];n+1<t&&i&&i.type===`textord`&&i.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:Br.range(r,i),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:Br.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:Br.range(r,a),text:i+i}),--t)}}}parseSymbol(){let e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();let e=t.slice(5),n=e.charAt(0)===`*`;if(n&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new r(`\\verb assertion failed --
262
+ please report what input caused this bug`);return e=e.slice(1,-1),{type:`verb`,mode:`text`,body:e,star:n}}Object.prototype.hasOwnProperty.call(Zi,t[0])&&!Ye[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=Zi[t[0]]+t.slice(1));let n=Pi.exec(t);n&&(t=t.substring(0,n.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));let i;if(Ye[this.mode][t]){this.settings.strict&&this.mode===`math`&&st.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);let n=Ye[this.mode][t].group,r=Br.range(e),a;a=Rn(n)?{type:`atom`,mode:this.mode,family:n,loc:r,text:t}:{type:n,mode:this.mode,loc:r,text:t},i=a}else if(t.charCodeAt(0)>=128)this.settings.strict&&(oe(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),i={type:`textord`,mode:`text`,loc:Br.range(e),text:t};else return null;if(this.consume(),n)for(let t=0;t<n[0].length;t++){let a=n[0][t];if(!Xi[a])throw new r(`Unknown accent ' `+a+`'`,e);let o=Xi[a][this.mode]||Xi[a].text;if(!o)throw new r(`Accent `+a+` unsupported in `+this.mode+` mode`,e);i={type:`accent`,mode:this.mode,loc:Br.range(e),label:o,isStretchy:!1,isShifty:!0,base:i}}return i}}Qi.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var $i=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);let n=new Qi(e,t);delete n.gullet.macros.current[`\\df@tag`];let i=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new r(`\\tag works only in display equations`);i=[{type:`tag`,mode:`text`,body:i,tag:n.subparse([new Vr(`\\df@tag`)])}]}return i};let ea=function(e,t,n){t.textContent=``;let r=ia(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),ea=function(){throw new r(`KaTeX doesn't work in quirks mode.`)});let ta=function(e,t){return ia(e,t).toMarkup()},na=function(e,t){return $i(e,new _(t))},ra=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;let i=M([`katex-error`],[new Pe(t)]);return i.setAttribute(`title`,e.toString()),i.setAttribute(`style`,`color:`+n.errorColor),i},ia=function(e,t){let n=new _(t);try{let t=$i(e,n);return En(t,e,n)}catch(t){return ra(t,e,n)}};var aa={version:`0.18.10`,render:ea,renderToString:ta,ParseError:r,SETTINGS_SCHEMA:p,__parse:na,__renderToDomTree:ia,__renderToHTMLTree:function(e,t){let n=new _(t);try{let t=$i(e,n);return Dn(t,e,n)}catch(t){return ra(t,e,n)}},__setFontMetrics:We,__defineSymbol:E,__defineFunction:N,__defineMacro:K,__domTree:{Span:je,Anchor:T,SymbolNode:Pe,SvgNode:Fe,PathNode:Ie,LineNode:Le}};return t=t.default,t})()})})),je=oe(b(((e,t)=>{function n(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}function r(e,i){let a=r.mergeDelimiters(i&&i.delimiters),o=i&&i.outerSpace||!1,s=i&&i.katexOptions||{};s.throwOnError=s.throwOnError||!1,s.macros=s.macros||i&&i.macros,r.katex||=i&&typeof i.engine==`object`?i.engine:typeof t==`object`?Ae():{renderToString(){return`No math renderer found.`}};for(let t of a.inline)o&&`outerSpace`in t&&(t.outerSpace=!0),e.inline.ruler.before(`escape`,t.name,r.inline(t)),e.renderer.rules[t.name]=(e,n)=>t.tmpl.replace(/\$1/,r.render(e[n].content,!!t.displayMode,s));for(let t of a.block)e.block.ruler.before(`fence`,t.name,r.block(t)),e.renderer.rules[t.name]=(e,i)=>t.tmpl.replace(/\$2/,n(e[i].info)).replace(/\$1/,r.render(e[i].content,!0,s))}r.mergeDelimiters=function(e){let t=Array.isArray(e)?e:typeof e==`string`?[e]:[`dollars`],n={inline:[],block:[]};for(let e of t)e in r.rules&&(n.inline.push(...r.rules[e].inline),n.block.push(...r.rules[e].block));return n},r.inline=e=>function(t,n){let r=t.pos,i=t.src,a=i.startsWith(e.tag,e.rex.lastIndex=r)&&(!e.pre||e.pre(i,e.outerSpace,r))&&e.rex.exec(i),o=!!a&&r<e.rex.lastIndex&&(!e.post||e.post(i,e.outerSpace,e.rex.lastIndex-1));if(o){if(!n){let n=t.push(e.name,`math`,0);n.content=a[1],n.markup=e.tag}t.pos=e.rex.lastIndex}return o},r.block=e=>function(t,n,r,i){let a=t.bMarks[n]+t.tShift[n],o=t.src,s=o.startsWith(e.tag,e.rex.lastIndex=a)&&(!e.pre||e.pre(o,!1,a))&&e.rex.exec(o),c=!!s&&a<e.rex.lastIndex&&(!e.post||e.post(o,!1,e.rex.lastIndex-1));if(c&&!i){let i=e.rex.lastIndex-1,a;for(a=n;a<r&&!(i>=t.bMarks[a]+t.tShift[a]&&i<=t.eMarks[a]);a++);let o=t.lineMax,c=t.parentType;t.lineMax=a,t.parentType=`math`,c===`blockquote`&&(s[1]=s[1].replace(/(\n*?^(?:\s*>)+)/gm,``));let l=t.push(e.name,`math`,0);l.block=!0,l.tag=e.tag,l.markup=``,l.content=s[1],l.info=s[s.length-1],l.map=[n,a+1],t.parentType=c,t.lineMax=o,t.line=a+1}return c},r.render=function(e,t,i){i.displayMode=t;let a;try{a=r.katex.renderToString(e,i)}catch(t){a=n(`${e}:${t.message}`)}return a},r.use=function(e){return r.katex=e,r},r.inlineRuleNames=[`math_inline`,`math_inline_double`],r.blockRuleNames=[`math_block`,`math_block_eqno`],r.$_pre=(e,t,n)=>{let r=n>0&&e[n-1].charCodeAt(0);return t?!r||r===32:!r||r!==92&&(r<48||r>57)},r.$_post=(e,t,n)=>{let r=e[n+1]&&e[n+1].charCodeAt(0);return t?!r||r===32||r===46||r===44||r===59:!r||r<48||r>57},r.rules={brackets:{inline:[{name:`math_inline`,rex:/\\\((.+?)\\\)/gy,tmpl:`<eq>$1</eq>`,tag:`\\(`}],block:[{name:`math_block_eqno`,rex:/\\\[(((?!\\\]|\\\[)[\s\S])+?)\\\]\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\[`},{name:`math_block`,rex:/\\\[([\s\S]+?)\\\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\[`}]},doxygen:{inline:[{name:`math_inline`,rex:/\\f\$(.+?)\\f\$/gy,tmpl:`<eq>$1</eq>`,tag:`\\f$`}],block:[{name:`math_block_eqno`,rex:/\\f\[([^]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\f[`},{name:`math_block`,rex:/\\f\[([^]+?)\\f\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\f[`}]},gitlab:{inline:[{name:`math_inline`,rex:/\$`(.+?)`\$/gy,tmpl:`<eq>$1</eq>`,tag:"$`"}],block:[{name:`math_block_eqno`,rex:/`{3}math\s*([^`]+?)\s*?`{3}\s*\(([^)\r\n]+?)\)/gm,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s*([^`]*?)\s*`{3}/gm,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},julia:{inline:[{name:`math_inline`,rex:/`{2}([^`]+?)`{2}/gy,tmpl:`<eq>$1</eq>`,tag:"``"},{name:`math_inline`,rex:/\$((?:\S?)|(?:\S.*?\S))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,spaceEnclosed:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},kramdown:{inline:[{name:`math_inline`,rex:/\${2}(.+?)\${2}/gy,tmpl:`<eq>$1</eq>`,tag:`$$`}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]+?)\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]+?)\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]},beg_end:{inline:[],block:[{name:`math_block`,rex:/(\\(?:begin)\{([a-z]+)\}[\s\S]+?\\(?:end)\{\2\})/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\`}]},dollars:{inline:[{name:`math_inline_double`,rex:/\${2}([^$]*?[^\\])\${2}/gy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`,displayMode:!0,pre:r.$_pre,post:r.$_post},{name:`math_inline`,rex:/\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,outerSpace:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]*?[^\\])\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]*?[^\\])\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]}},typeof t==`object`&&t.exports&&(t.exports=r)}))(),1),T=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},Me=/([A-Z])/g,Ne=e=>e.replace(Me,`-$1`).toLowerCase(),Pe={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Fe=/[&><"']/g,Ie=e=>String(e).replace(Fe,e=>Pe[e]),Le=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?Le(e.body[0]):e:e.type===`font`?Le(e.body):e,Re=new Set([`mathord`,`textord`,`atom`]),ze=e=>Re.has(Le(e).type),Be=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Ve={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:e=>`#`+e},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:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function He(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Ue(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:He(Array.isArray(e.type)?e.type[0]:e.type)}function We(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?Ue(r):a?a(i):i}var Ge=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||={};for(var t of Object.keys(Ve)){var n=Ve[t];n&&We(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new T(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=Be(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Ke=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ze[Qe[this.id]]}sub(){return Ze[$e[this.id]]}fracNum(){return Ze[et[this.id]]}fracDen(){return Ze[tt[this.id]]}cramp(){return Ze[nt[this.id]]}text(){return Ze[rt[this.id]]}isTight(){return this.size>=2}},qe=0,Je=1,Ye=2,E=3,D=4,O=5,k=6,Xe=7,Ze=[new Ke(qe,0,!1),new Ke(Je,0,!0),new Ke(Ye,1,!1),new Ke(E,1,!0),new Ke(D,2,!1),new Ke(O,2,!0),new Ke(k,3,!1),new Ke(Xe,3,!0)],Qe=[D,O,D,O,k,Xe,k,Xe],$e=[O,O,O,O,Xe,Xe,Xe,Xe],et=[Ye,E,D,O,k,Xe,k,Xe],tt=[E,E,O,O,Xe,Xe,Xe,Xe],nt=[Je,Je,E,E,O,O,Xe,Xe],rt=[qe,Je,Ye,E,Ye,E,Ye,E],A={DISPLAY:Ze[qe],TEXT:Ze[Ye],SCRIPT:Ze[D],SCRIPTSCRIPT:Ze[k]},it=[{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 at(e){for(var t=0;t<it.length;t++)for(var n=it[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var ot=[];it.forEach(e=>e.blocks.forEach(e=>ot.push(...e)));function st(e){for(var t=0;t<ot.length;t+=2)if(e>=ot[t]&&e<=ot[t+1])return!0;return!1}var ct=e=>e+` `+e,lt=80,ut=function(e,t){return`M95,`+(622+e+t)+`
263
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
264
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
265
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
266
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
267
+ c69,-144,104.5,-217.7,106.5,-221
268
+ l`+e/2.075+` -`+e+`
269
+ c5.3,-9.3,12,-14,20,-14
270
+ H400000v`+(40+e)+`H845.2724
271
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
272
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
273
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},dt=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
274
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
275
+ c340,-704.7,510.7,-1060.3,512,-1067
276
+ l`+e/2.084+` -`+e+`
277
+ c4.7,-7.3,11,-11,19,-11
278
+ H40000v`+(40+e)+`H1012.3
279
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
280
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
281
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
282
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
283
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},ft=function(e,t){return`M983 `+(10+e+t)+`
284
+ l`+e/3.13+` -`+e+`
285
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
286
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
287
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
288
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
289
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
290
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
291
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
292
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},pt=function(e,t){return`M424,`+(2398+e+t)+`
293
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
294
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
295
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
296
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
297
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
298
+ v`+(40+e)+`H1014.6
299
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
300
+ c-2,6,-10,9,-24,9
301
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
302
+ h400000v`+(40+e)+`h-400000z`},mt=function(e,t){return`M473,`+(2713+e+t)+`
303
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
304
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
305
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
306
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
307
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
308
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
309
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},ht=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},gt=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
310
+ H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
311
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
312
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
313
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},_t=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=ut(t,lt);break;case`sqrtSize1`:r=dt(t,lt);break;case`sqrtSize2`:r=ft(t,lt);break;case`sqrtSize3`:r=pt(t,lt);break;case`sqrtSize4`:r=mt(t,lt);break;case`sqrtTall`:r=gt(t,lt,n)}return r},vt=function(e,t){switch(e){case`⎜`:return ct(`M291 0 H417 V`+t+` H291z`);case`∣`:return ct(`M145 0 H188 V`+t+` H145z`);case`∥`:return ct(`M145 0 H188 V`+t+` H145z`)+ct(`M367 0 H410 V`+t+` H367z`);case`⎟`:return ct(`M457 0 H583 V`+t+` H457z`);case`⎢`:return ct(`M319 0 H403 V`+t+` H319z`);case`⎥`:return ct(`M263 0 H347 V`+t+` H263z`);case`⎪`:return ct(`M384 0 H504 V`+t+` H384z`);case`⏐`:return ct(`M312 0 H355 V`+t+` H312z`);case`‖`:return ct(`M257 0 H300 V`+t+` H257z`)+ct(`M478 0 H521 V`+t+` H478z`);default:return``}},yt={doubleleftarrow:`M262 157
314
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
315
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
316
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
317
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
318
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
319
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
320
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
321
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
322
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
323
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
324
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
325
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
326
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
327
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
328
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
329
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
330
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
331
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
332
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
333
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
334
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
335
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
336
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
337
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
338
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
339
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
340
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
341
+ 435 0h399565z`,leftgroupunder:`M400000 262
342
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
343
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
344
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
345
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
346
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
347
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
348
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
349
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
350
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
351
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
352
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
353
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
354
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
355
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
356
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
357
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
358
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
359
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ct(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:ct(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:ct(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:ct(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
360
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
361
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
362
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ct(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
363
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
364
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
365
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
366
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
367
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
368
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
369
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
370
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
371
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
372
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
373
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
374
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
375
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
376
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
377
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
378
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
379
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
380
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
381
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
382
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
383
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
384
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
385
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
386
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
387
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
388
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
389
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
390
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
391
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
392
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
393
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
394
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
395
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
396
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
397
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
398
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
399
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
400
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
401
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
402
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
403
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
404
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
405
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
406
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
407
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
408
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
409
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
410
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
411
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ct(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:ct(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:ct(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
412
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
413
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
414
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
415
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
416
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
417
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
418
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
419
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
420
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
421
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
422
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
423
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
424
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
425
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
426
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
427
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
428
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
429
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
430
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
431
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
432
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
433
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
434
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
435
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
436
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
437
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
438
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
439
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
440
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
441
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
442
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
443
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
444
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
445
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
446
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
447
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
448
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
449
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
450
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
451
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
452
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
453
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
454
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
455
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
456
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
457
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
458
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
459
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
460
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
461
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
462
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
463
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
464
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
465
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
466
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
467
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
468
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
469
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
470
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
471
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
472
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
473
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
474
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
475
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
476
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
477
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
478
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
479
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
480
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
481
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
482
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
483
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
484
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},bt=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
485
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
486
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
487
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
488
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
489
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
490
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
491
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
492
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
493
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
494
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
495
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
496
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
497
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
498
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
499
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
500
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
501
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
502
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
503
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
504
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
505
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
506
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
507
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
508
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
509
+ 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
510
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
511
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
512
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function xt(e){return`toText`in e}var St=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(xt(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Ct={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},wt={ex:!0,em:!0,mu:!0},Tt=function(e){return typeof e!=`string`&&(e=e.unit),e in Ct||e in wt||e===`ex`},Et=function(e,t){var n;if(e.unit in Ct)n=Ct[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new T(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},j=function(e){return+e.toFixed(4)+`em`},Dt=function(e){return e.filter(e=>e).join(` `)},Ot=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=Ne(n)+`:`+r+`;`)}return t},kt=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},M=function(e){var t=document.createElement(e);t.className=Dt(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},At=/[\s"'>/=\x00-\x1f]/,jt=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+Ie(Dt(this.classes))+`"`);var n=Ot(this.style);n&&(t+=` style="`+Ie(n)+`"`);for(var r of Object.keys(this.attributes)){if(At.test(r))throw new T(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+Ie(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},Mt=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,kt.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return M.call(this,`span`)}toMarkup(){return jt.call(this,`span`)}},Nt=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kt.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return M.call(this,`a`)}toMarkup(){return jt.call(this,`a`)}},Pt=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}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="`+Ie(this.src)+`"`+(` alt="`+Ie(this.alt)+`"`),t=Ot(this.style);return t&&(e+=` style="`+Ie(t)+`"`),e+=`'/>`,e}},Ft={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},It=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=at(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Ft[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=j(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Dt(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=Ie(Dt(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+j(this.italic)+`;`),n+=Ot(this.style),n&&(e=!0,t+=` style="`+Ie(n)+`"`);var r=Ie(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},Lt=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Ie(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},Rt=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,yt[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+Ie(this.alternate)+`"/>`:`<path d="`+Ie(yt[this.pathName])+`"/>`}},zt=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Ie(this.attributes[t])+`"`;return e+=`/>`,e}};function Bt(e){if(e instanceof It)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Vt(e){if(e instanceof Mt)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Ht=e=>e instanceof Mt||e instanceof Nt||e instanceof St,Ut={"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]}},Wt={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]},Gt={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Kt(e,t){Ut[e]=t}function qt(e,t,n){if(!Ut[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Ut[t][r];if(!i&&e[0]in Gt&&(r=Gt[e[0]].charCodeAt(0),i=Ut[t][r]),!i&&n===`text`&&st(r)&&(i=Ut[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Jt={};function Yt(e){var t=e>=5?0:e>=3?1:2;if(!Jt[t]){var n=Jt[t]={cssEmPerMu:Wt.quad[t]/18};for(var r of Object.keys(Wt))n[r]=Wt[r][t]}return Jt[t]}var N={math:{},text:{}};function P(e,t,n,r,i,a){N[e][i]={font:t,group:n,replace:r},a&&r&&(N[e][r]=N[e][i])}var F=`math`,I=`text`,L=`main`,R=`ams`,Xt=`accent-token`,z=`bin`,Zt=`close`,Qt=`inner`,$t=`mathord`,en=`op-token`,tn=`open`,nn=`punct`,B=`rel`,rn=`spacing`,V=`textord`;P(F,L,B,`≡`,`\\equiv`,!0),P(F,L,B,`≺`,`\\prec`,!0),P(F,L,B,`≻`,`\\succ`,!0),P(F,L,B,`∼`,`\\sim`,!0),P(F,L,B,`⊥`,`\\perp`),P(F,L,B,`⪯`,`\\preceq`,!0),P(F,L,B,`⪰`,`\\succeq`,!0),P(F,L,B,`≃`,`\\simeq`,!0),P(F,L,B,`∣`,`\\mid`,!0),P(F,L,B,`≪`,`\\ll`,!0),P(F,L,B,`≫`,`\\gg`,!0),P(F,L,B,`≍`,`\\asymp`,!0),P(F,L,B,`∥`,`\\parallel`),P(F,L,B,`⋈`,`\\bowtie`,!0),P(F,L,B,`⌣`,`\\smile`,!0),P(F,L,B,`⊑`,`\\sqsubseteq`,!0),P(F,L,B,`⊒`,`\\sqsupseteq`,!0),P(F,L,B,`≐`,`\\doteq`,!0),P(F,L,B,`⌢`,`\\frown`,!0),P(F,L,B,`∋`,`\\ni`,!0),P(F,L,B,`∝`,`\\propto`,!0),P(F,L,B,`⊢`,`\\vdash`,!0),P(F,L,B,`⊣`,`\\dashv`,!0),P(F,L,B,`∋`,`\\owns`),P(F,L,nn,`.`,`\\ldotp`),P(F,L,nn,`⋅`,`\\cdotp`),P(F,L,nn,`⋅`,`·`),P(I,L,V,`⋅`,`·`),P(F,L,V,`#`,`\\#`),P(I,L,V,`#`,`\\#`),P(F,L,V,`&`,`\\&`),P(I,L,V,`&`,`\\&`),P(F,L,V,`ℵ`,`\\aleph`,!0),P(F,L,V,`∀`,`\\forall`,!0),P(F,L,V,`ℏ`,`\\hbar`,!0),P(F,L,V,`∃`,`\\exists`,!0),P(F,L,V,`∇`,`\\nabla`,!0),P(F,L,V,`♭`,`\\flat`,!0),P(F,L,V,`ℓ`,`\\ell`,!0),P(F,L,V,`♮`,`\\natural`,!0),P(F,L,V,`♣`,`\\clubsuit`,!0),P(F,L,V,`℘`,`\\wp`,!0),P(F,L,V,`♯`,`\\sharp`,!0),P(F,L,V,`♢`,`\\diamondsuit`,!0),P(F,L,V,`ℜ`,`\\Re`,!0),P(F,L,V,`♡`,`\\heartsuit`,!0),P(F,L,V,`ℑ`,`\\Im`,!0),P(F,L,V,`♠`,`\\spadesuit`,!0),P(F,L,V,`§`,`\\S`,!0),P(I,L,V,`§`,`\\S`),P(F,L,V,`¶`,`\\P`,!0),P(I,L,V,`¶`,`\\P`),P(F,L,V,`†`,`\\dag`),P(I,L,V,`†`,`\\dag`),P(I,L,V,`†`,`\\textdagger`),P(F,L,V,`‡`,`\\ddag`),P(I,L,V,`‡`,`\\ddag`),P(I,L,V,`‡`,`\\textdaggerdbl`),P(F,L,Zt,`⎱`,`\\rmoustache`,!0),P(F,L,tn,`⎰`,`\\lmoustache`,!0),P(F,L,Zt,`⟯`,`\\rgroup`,!0),P(F,L,tn,`⟮`,`\\lgroup`,!0),P(F,L,z,`∓`,`\\mp`,!0),P(F,L,z,`⊖`,`\\ominus`,!0),P(F,L,z,`⊎`,`\\uplus`,!0),P(F,L,z,`⊓`,`\\sqcap`,!0),P(F,L,z,`∗`,`\\ast`),P(F,L,z,`⊔`,`\\sqcup`,!0),P(F,L,z,`◯`,`\\bigcirc`,!0),P(F,L,z,`∙`,`\\bullet`,!0),P(F,L,z,`‡`,`\\ddagger`),P(F,L,z,`≀`,`\\wr`,!0),P(F,L,z,`⨿`,`\\amalg`),P(F,L,z,`&`,`\\And`),P(F,L,B,`⟵`,`\\longleftarrow`,!0),P(F,L,B,`⇐`,`\\Leftarrow`,!0),P(F,L,B,`⟸`,`\\Longleftarrow`,!0),P(F,L,B,`⟶`,`\\longrightarrow`,!0),P(F,L,B,`⇒`,`\\Rightarrow`,!0),P(F,L,B,`⟹`,`\\Longrightarrow`,!0),P(F,L,B,`↔`,`\\leftrightarrow`,!0),P(F,L,B,`⟷`,`\\longleftrightarrow`,!0),P(F,L,B,`⇔`,`\\Leftrightarrow`,!0),P(F,L,B,`⟺`,`\\Longleftrightarrow`,!0),P(F,L,B,`↦`,`\\mapsto`,!0),P(F,L,B,`⟼`,`\\longmapsto`,!0),P(F,L,B,`↗`,`\\nearrow`,!0),P(F,L,B,`↩`,`\\hookleftarrow`,!0),P(F,L,B,`↪`,`\\hookrightarrow`,!0),P(F,L,B,`↘`,`\\searrow`,!0),P(F,L,B,`↼`,`\\leftharpoonup`,!0),P(F,L,B,`⇀`,`\\rightharpoonup`,!0),P(F,L,B,`↙`,`\\swarrow`,!0),P(F,L,B,`↽`,`\\leftharpoondown`,!0),P(F,L,B,`⇁`,`\\rightharpoondown`,!0),P(F,L,B,`↖`,`\\nwarrow`,!0),P(F,L,B,`⇌`,`\\rightleftharpoons`,!0),P(F,R,B,`≮`,`\\nless`,!0),P(F,R,B,``,`\\@nleqslant`),P(F,R,B,``,`\\@nleqq`),P(F,R,B,`⪇`,`\\lneq`,!0),P(F,R,B,`≨`,`\\lneqq`,!0),P(F,R,B,``,`\\@lvertneqq`),P(F,R,B,`⋦`,`\\lnsim`,!0),P(F,R,B,`⪉`,`\\lnapprox`,!0),P(F,R,B,`⊀`,`\\nprec`,!0),P(F,R,B,`⋠`,`\\npreceq`,!0),P(F,R,B,`⋨`,`\\precnsim`,!0),P(F,R,B,`⪹`,`\\precnapprox`,!0),P(F,R,B,`≁`,`\\nsim`,!0),P(F,R,B,``,`\\@nshortmid`),P(F,R,B,`∤`,`\\nmid`,!0),P(F,R,B,`⊬`,`\\nvdash`,!0),P(F,R,B,`⊭`,`\\nvDash`,!0),P(F,R,B,`⋪`,`\\ntriangleleft`),P(F,R,B,`⋬`,`\\ntrianglelefteq`,!0),P(F,R,B,`⊊`,`\\subsetneq`,!0),P(F,R,B,``,`\\@varsubsetneq`),P(F,R,B,`⫋`,`\\subsetneqq`,!0),P(F,R,B,``,`\\@varsubsetneqq`),P(F,R,B,`≯`,`\\ngtr`,!0),P(F,R,B,``,`\\@ngeqslant`),P(F,R,B,``,`\\@ngeqq`),P(F,R,B,`⪈`,`\\gneq`,!0),P(F,R,B,`≩`,`\\gneqq`,!0),P(F,R,B,``,`\\@gvertneqq`),P(F,R,B,`⋧`,`\\gnsim`,!0),P(F,R,B,`⪊`,`\\gnapprox`,!0),P(F,R,B,`⊁`,`\\nsucc`,!0),P(F,R,B,`⋡`,`\\nsucceq`,!0),P(F,R,B,`⋩`,`\\succnsim`,!0),P(F,R,B,`⪺`,`\\succnapprox`,!0),P(F,R,B,`≆`,`\\ncong`,!0),P(F,R,B,``,`\\@nshortparallel`),P(F,R,B,`∦`,`\\nparallel`,!0),P(F,R,B,`⊯`,`\\nVDash`,!0),P(F,R,B,`⋫`,`\\ntriangleright`),P(F,R,B,`⋭`,`\\ntrianglerighteq`,!0),P(F,R,B,``,`\\@nsupseteqq`),P(F,R,B,`⊋`,`\\supsetneq`,!0),P(F,R,B,``,`\\@varsupsetneq`),P(F,R,B,`⫌`,`\\supsetneqq`,!0),P(F,R,B,``,`\\@varsupsetneqq`),P(F,R,B,`⊮`,`\\nVdash`,!0),P(F,R,B,`⪵`,`\\precneqq`,!0),P(F,R,B,`⪶`,`\\succneqq`,!0),P(F,R,B,``,`\\@nsubseteqq`),P(F,R,z,`⊴`,`\\unlhd`),P(F,R,z,`⊵`,`\\unrhd`),P(F,R,B,`↚`,`\\nleftarrow`,!0),P(F,R,B,`↛`,`\\nrightarrow`,!0),P(F,R,B,`⇍`,`\\nLeftarrow`,!0),P(F,R,B,`⇏`,`\\nRightarrow`,!0),P(F,R,B,`↮`,`\\nleftrightarrow`,!0),P(F,R,B,`⇎`,`\\nLeftrightarrow`,!0),P(F,R,B,`△`,`\\vartriangle`),P(F,R,V,`ℏ`,`\\hslash`),P(F,R,V,`▽`,`\\triangledown`),P(F,R,V,`◊`,`\\lozenge`),P(F,R,V,`Ⓢ`,`\\circledS`),P(F,R,V,`®`,`\\circledR`),P(I,R,V,`®`,`\\circledR`),P(F,R,V,`∡`,`\\measuredangle`,!0),P(F,R,V,`∄`,`\\nexists`),P(F,R,V,`℧`,`\\mho`),P(F,R,V,`Ⅎ`,`\\Finv`,!0),P(F,R,V,`⅁`,`\\Game`,!0),P(F,R,V,`‵`,`\\backprime`),P(F,R,V,`▲`,`\\blacktriangle`),P(F,R,V,`▼`,`\\blacktriangledown`),P(F,R,V,`■`,`\\blacksquare`),P(F,R,V,`⧫`,`\\blacklozenge`),P(F,R,V,`★`,`\\bigstar`),P(F,R,V,`∢`,`\\sphericalangle`,!0),P(F,R,V,`∁`,`\\complement`,!0),P(F,R,V,`ð`,`\\eth`,!0),P(I,L,V,`ð`,`ð`),P(F,R,V,`╱`,`\\diagup`),P(F,R,V,`╲`,`\\diagdown`),P(F,R,V,`□`,`\\square`),P(F,R,V,`□`,`\\Box`),P(F,R,V,`◊`,`\\Diamond`),P(F,R,V,`¥`,`\\yen`,!0),P(I,R,V,`¥`,`\\yen`,!0),P(F,R,V,`✓`,`\\checkmark`,!0),P(I,R,V,`✓`,`\\checkmark`),P(F,R,V,`ℶ`,`\\beth`,!0),P(F,R,V,`ℸ`,`\\daleth`,!0),P(F,R,V,`ℷ`,`\\gimel`,!0),P(F,R,V,`ϝ`,`\\digamma`,!0),P(F,R,V,`ϰ`,`\\varkappa`),P(F,R,tn,`┌`,`\\@ulcorner`,!0),P(F,R,Zt,`┐`,`\\@urcorner`,!0),P(F,R,tn,`└`,`\\@llcorner`,!0),P(F,R,Zt,`┘`,`\\@lrcorner`,!0),P(F,R,B,`≦`,`\\leqq`,!0),P(F,R,B,`⩽`,`\\leqslant`,!0),P(F,R,B,`⪕`,`\\eqslantless`,!0),P(F,R,B,`≲`,`\\lesssim`,!0),P(F,R,B,`⪅`,`\\lessapprox`,!0),P(F,R,B,`≊`,`\\approxeq`,!0),P(F,R,z,`⋖`,`\\lessdot`),P(F,R,B,`⋘`,`\\lll`,!0),P(F,R,B,`≶`,`\\lessgtr`,!0),P(F,R,B,`⋚`,`\\lesseqgtr`,!0),P(F,R,B,`⪋`,`\\lesseqqgtr`,!0),P(F,R,B,`≑`,`\\doteqdot`),P(F,R,B,`≓`,`\\risingdotseq`,!0),P(F,R,B,`≒`,`\\fallingdotseq`,!0),P(F,R,B,`∽`,`\\backsim`,!0),P(F,R,B,`⋍`,`\\backsimeq`,!0),P(F,R,B,`⫅`,`\\subseteqq`,!0),P(F,R,B,`⋐`,`\\Subset`,!0),P(F,R,B,`⊏`,`\\sqsubset`,!0),P(F,R,B,`≼`,`\\preccurlyeq`,!0),P(F,R,B,`⋞`,`\\curlyeqprec`,!0),P(F,R,B,`≾`,`\\precsim`,!0),P(F,R,B,`⪷`,`\\precapprox`,!0),P(F,R,B,`⊲`,`\\vartriangleleft`),P(F,R,B,`⊴`,`\\trianglelefteq`),P(F,R,B,`⊨`,`\\vDash`,!0),P(F,R,B,`⊪`,`\\Vvdash`,!0),P(F,R,B,`⌣`,`\\smallsmile`),P(F,R,B,`⌢`,`\\smallfrown`),P(F,R,B,`≏`,`\\bumpeq`,!0),P(F,R,B,`≎`,`\\Bumpeq`,!0),P(F,R,B,`≧`,`\\geqq`,!0),P(F,R,B,`⩾`,`\\geqslant`,!0),P(F,R,B,`⪖`,`\\eqslantgtr`,!0),P(F,R,B,`≳`,`\\gtrsim`,!0),P(F,R,B,`⪆`,`\\gtrapprox`,!0),P(F,R,z,`⋗`,`\\gtrdot`),P(F,R,B,`⋙`,`\\ggg`,!0),P(F,R,B,`≷`,`\\gtrless`,!0),P(F,R,B,`⋛`,`\\gtreqless`,!0),P(F,R,B,`⪌`,`\\gtreqqless`,!0),P(F,R,B,`≖`,`\\eqcirc`,!0),P(F,R,B,`≗`,`\\circeq`,!0),P(F,R,B,`≜`,`\\triangleq`,!0),P(F,R,B,`∼`,`\\thicksim`),P(F,R,B,`≈`,`\\thickapprox`),P(F,R,B,`⫆`,`\\supseteqq`,!0),P(F,R,B,`⋑`,`\\Supset`,!0),P(F,R,B,`⊐`,`\\sqsupset`,!0),P(F,R,B,`≽`,`\\succcurlyeq`,!0),P(F,R,B,`⋟`,`\\curlyeqsucc`,!0),P(F,R,B,`≿`,`\\succsim`,!0),P(F,R,B,`⪸`,`\\succapprox`,!0),P(F,R,B,`⊳`,`\\vartriangleright`),P(F,R,B,`⊵`,`\\trianglerighteq`),P(F,R,B,`⊩`,`\\Vdash`,!0),P(F,R,B,`∣`,`\\shortmid`),P(F,R,B,`∥`,`\\shortparallel`),P(F,R,B,`≬`,`\\between`,!0),P(F,R,B,`⋔`,`\\pitchfork`,!0),P(F,R,B,`∝`,`\\varpropto`),P(F,R,B,`◀`,`\\blacktriangleleft`),P(F,R,B,`∴`,`\\therefore`,!0),P(F,R,B,`∍`,`\\backepsilon`),P(F,R,B,`▶`,`\\blacktriangleright`),P(F,R,B,`∵`,`\\because`,!0),P(F,R,B,`⋘`,`\\llless`),P(F,R,B,`⋙`,`\\gggtr`),P(F,R,z,`⊲`,`\\lhd`),P(F,R,z,`⊳`,`\\rhd`),P(F,R,B,`≂`,`\\eqsim`,!0),P(F,L,B,`⋈`,`\\Join`),P(F,R,B,`≑`,`\\Doteq`,!0),P(F,R,z,`∔`,`\\dotplus`,!0),P(F,R,z,`∖`,`\\smallsetminus`),P(F,R,z,`⋒`,`\\Cap`,!0),P(F,R,z,`⋓`,`\\Cup`,!0),P(F,R,z,`⩞`,`\\doublebarwedge`,!0),P(F,R,z,`⊟`,`\\boxminus`,!0),P(F,R,z,`⊞`,`\\boxplus`,!0),P(F,R,z,`⋇`,`\\divideontimes`,!0),P(F,R,z,`⋉`,`\\ltimes`,!0),P(F,R,z,`⋊`,`\\rtimes`,!0),P(F,R,z,`⋋`,`\\leftthreetimes`,!0),P(F,R,z,`⋌`,`\\rightthreetimes`,!0),P(F,R,z,`⋏`,`\\curlywedge`,!0),P(F,R,z,`⋎`,`\\curlyvee`,!0),P(F,R,z,`⊝`,`\\circleddash`,!0),P(F,R,z,`⊛`,`\\circledast`,!0),P(F,R,z,`⋅`,`\\centerdot`),P(F,R,z,`⊺`,`\\intercal`,!0),P(F,R,z,`⋒`,`\\doublecap`),P(F,R,z,`⋓`,`\\doublecup`),P(F,R,z,`⊠`,`\\boxtimes`,!0),P(F,R,B,`⇢`,`\\dashrightarrow`,!0),P(F,R,B,`⇠`,`\\dashleftarrow`,!0),P(F,R,B,`⇇`,`\\leftleftarrows`,!0),P(F,R,B,`⇆`,`\\leftrightarrows`,!0),P(F,R,B,`⇚`,`\\Lleftarrow`,!0),P(F,R,B,`↞`,`\\twoheadleftarrow`,!0),P(F,R,B,`↢`,`\\leftarrowtail`,!0),P(F,R,B,`↫`,`\\looparrowleft`,!0),P(F,R,B,`⇋`,`\\leftrightharpoons`,!0),P(F,R,B,`↶`,`\\curvearrowleft`,!0),P(F,R,B,`↺`,`\\circlearrowleft`,!0),P(F,R,B,`↰`,`\\Lsh`,!0),P(F,R,B,`⇈`,`\\upuparrows`,!0),P(F,R,B,`↿`,`\\upharpoonleft`,!0),P(F,R,B,`⇃`,`\\downharpoonleft`,!0),P(F,L,B,`⊶`,`\\origof`,!0),P(F,L,B,`⊷`,`\\imageof`,!0),P(F,R,B,`⊸`,`\\multimap`,!0),P(F,R,B,`↭`,`\\leftrightsquigarrow`,!0),P(F,R,B,`⇉`,`\\rightrightarrows`,!0),P(F,R,B,`⇄`,`\\rightleftarrows`,!0),P(F,R,B,`↠`,`\\twoheadrightarrow`,!0),P(F,R,B,`↣`,`\\rightarrowtail`,!0),P(F,R,B,`↬`,`\\looparrowright`,!0),P(F,R,B,`↷`,`\\curvearrowright`,!0),P(F,R,B,`↻`,`\\circlearrowright`,!0),P(F,R,B,`↱`,`\\Rsh`,!0),P(F,R,B,`⇊`,`\\downdownarrows`,!0),P(F,R,B,`↾`,`\\upharpoonright`,!0),P(F,R,B,`⇂`,`\\downharpoonright`,!0),P(F,R,B,`⇝`,`\\rightsquigarrow`,!0),P(F,R,B,`⇝`,`\\leadsto`),P(F,R,B,`⇛`,`\\Rrightarrow`,!0),P(F,R,B,`↾`,`\\restriction`),P(F,L,V,`‘`,"`"),P(F,L,V,`$`,`\\$`),P(I,L,V,`$`,`\\$`),P(I,L,V,`$`,`\\textdollar`),P(F,L,V,`%`,`\\%`),P(I,L,V,`%`,`\\%`),P(F,L,V,`_`,`\\_`),P(I,L,V,`_`,`\\_`),P(I,L,V,`_`,`\\textunderscore`),P(F,L,V,`∠`,`\\angle`,!0),P(F,L,V,`∞`,`\\infty`,!0),P(F,L,V,`′`,`\\prime`),P(F,L,V,`△`,`\\triangle`),P(F,L,V,`Γ`,`\\Gamma`,!0),P(F,L,V,`Δ`,`\\Delta`,!0),P(F,L,V,`Θ`,`\\Theta`,!0),P(F,L,V,`Λ`,`\\Lambda`,!0),P(F,L,V,`Ξ`,`\\Xi`,!0),P(F,L,V,`Π`,`\\Pi`,!0),P(F,L,V,`Σ`,`\\Sigma`,!0),P(F,L,V,`Υ`,`\\Upsilon`,!0),P(F,L,V,`Φ`,`\\Phi`,!0),P(F,L,V,`Ψ`,`\\Psi`,!0),P(F,L,V,`Ω`,`\\Omega`,!0),P(F,L,V,`A`,`Α`),P(F,L,V,`B`,`Β`),P(F,L,V,`E`,`Ε`),P(F,L,V,`Z`,`Ζ`),P(F,L,V,`H`,`Η`),P(F,L,V,`I`,`Ι`),P(F,L,V,`K`,`Κ`),P(F,L,V,`M`,`Μ`),P(F,L,V,`N`,`Ν`),P(F,L,V,`O`,`Ο`),P(F,L,V,`P`,`Ρ`),P(F,L,V,`T`,`Τ`),P(F,L,V,`X`,`Χ`),P(F,L,V,`¬`,`\\neg`,!0),P(F,L,V,`¬`,`\\lnot`),P(F,L,V,`⊤`,`\\top`),P(F,L,V,`⊥`,`\\bot`),P(F,L,V,`∅`,`\\emptyset`),P(F,R,V,`∅`,`\\varnothing`),P(F,L,$t,`α`,`\\alpha`,!0),P(F,L,$t,`β`,`\\beta`,!0),P(F,L,$t,`γ`,`\\gamma`,!0),P(F,L,$t,`δ`,`\\delta`,!0),P(F,L,$t,`ϵ`,`\\epsilon`,!0),P(F,L,$t,`ζ`,`\\zeta`,!0),P(F,L,$t,`η`,`\\eta`,!0),P(F,L,$t,`θ`,`\\theta`,!0),P(F,L,$t,`ι`,`\\iota`,!0),P(F,L,$t,`κ`,`\\kappa`,!0),P(F,L,$t,`λ`,`\\lambda`,!0),P(F,L,$t,`μ`,`\\mu`,!0),P(F,L,$t,`ν`,`\\nu`,!0),P(F,L,$t,`ξ`,`\\xi`,!0),P(F,L,$t,`ο`,`\\omicron`,!0),P(F,L,$t,`π`,`\\pi`,!0),P(F,L,$t,`ρ`,`\\rho`,!0),P(F,L,$t,`σ`,`\\sigma`,!0),P(F,L,$t,`τ`,`\\tau`,!0),P(F,L,$t,`υ`,`\\upsilon`,!0),P(F,L,$t,`ϕ`,`\\phi`,!0),P(F,L,$t,`χ`,`\\chi`,!0),P(F,L,$t,`ψ`,`\\psi`,!0),P(F,L,$t,`ω`,`\\omega`,!0),P(F,L,$t,`ε`,`\\varepsilon`,!0),P(F,L,$t,`ϑ`,`\\vartheta`,!0),P(F,L,$t,`ϖ`,`\\varpi`,!0),P(F,L,$t,`ϱ`,`\\varrho`,!0),P(F,L,$t,`ς`,`\\varsigma`,!0),P(F,L,$t,`φ`,`\\varphi`,!0),P(F,L,z,`∗`,`*`,!0),P(F,L,z,`+`,`+`),P(F,L,z,`−`,`-`,!0),P(F,L,z,`⋅`,`\\cdot`,!0),P(F,L,z,`∘`,`\\circ`,!0),P(F,L,z,`÷`,`\\div`,!0),P(F,L,z,`±`,`\\pm`,!0),P(F,L,z,`×`,`\\times`,!0),P(F,L,z,`∩`,`\\cap`,!0),P(F,L,z,`∪`,`\\cup`,!0),P(F,L,z,`∖`,`\\setminus`,!0),P(F,L,z,`∧`,`\\land`),P(F,L,z,`∨`,`\\lor`),P(F,L,z,`∧`,`\\wedge`,!0),P(F,L,z,`∨`,`\\vee`,!0),P(F,L,V,`√`,`\\surd`),P(F,L,tn,`⟨`,`\\langle`,!0),P(F,L,tn,`∣`,`\\lvert`),P(F,L,tn,`∥`,`\\lVert`),P(F,L,Zt,`?`,`?`),P(F,L,Zt,`!`,`!`),P(F,L,Zt,`⟩`,`\\rangle`,!0),P(F,L,Zt,`∣`,`\\rvert`),P(F,L,Zt,`∥`,`\\rVert`),P(F,L,B,`=`,`=`),P(F,L,B,`:`,`:`),P(F,L,B,`≈`,`\\approx`,!0),P(F,L,B,`≅`,`\\cong`,!0),P(F,L,B,`≥`,`\\ge`),P(F,L,B,`≥`,`\\geq`,!0),P(F,L,B,`←`,`\\gets`),P(F,L,B,`>`,`\\gt`,!0),P(F,L,B,`∈`,`\\in`,!0),P(F,L,B,``,`\\@not`),P(F,L,B,`⊂`,`\\subset`,!0),P(F,L,B,`⊃`,`\\supset`,!0),P(F,L,B,`⊆`,`\\subseteq`,!0),P(F,L,B,`⊇`,`\\supseteq`,!0),P(F,R,B,`⊈`,`\\nsubseteq`,!0),P(F,R,B,`⊉`,`\\nsupseteq`,!0),P(F,L,B,`⊨`,`\\models`),P(F,L,B,`←`,`\\leftarrow`,!0),P(F,L,B,`≤`,`\\le`),P(F,L,B,`≤`,`\\leq`,!0),P(F,L,B,`<`,`\\lt`,!0),P(F,L,B,`→`,`\\rightarrow`,!0),P(F,L,B,`→`,`\\to`),P(F,R,B,`≱`,`\\ngeq`,!0),P(F,R,B,`≰`,`\\nleq`,!0),P(F,L,rn,`\xA0`,`\\ `),P(F,L,rn,`\xA0`,`\\space`),P(F,L,rn,`\xA0`,`\\nobreakspace`),P(I,L,rn,`\xA0`,`\\ `),P(I,L,rn,`\xA0`,` `),P(I,L,rn,`\xA0`,`\\space`),P(I,L,rn,`\xA0`,`\\nobreakspace`),P(F,L,rn,``,`\\nobreak`),P(F,L,rn,``,`\\allowbreak`),P(F,L,nn,`,`,`,`),P(F,L,nn,`;`,`;`),P(F,R,z,`⊼`,`\\barwedge`,!0),P(F,R,z,`⊻`,`\\veebar`,!0),P(F,L,z,`⊙`,`\\odot`,!0),P(F,L,z,`⊕`,`\\oplus`,!0),P(F,L,z,`⊗`,`\\otimes`,!0),P(F,L,V,`∂`,`\\partial`,!0),P(F,L,z,`⊘`,`\\oslash`,!0),P(F,R,z,`⊚`,`\\circledcirc`,!0),P(F,R,z,`⊡`,`\\boxdot`,!0),P(F,L,z,`△`,`\\bigtriangleup`),P(F,L,z,`▽`,`\\bigtriangledown`),P(F,L,z,`†`,`\\dagger`),P(F,L,z,`⋄`,`\\diamond`),P(F,L,z,`⋆`,`\\star`),P(F,L,z,`◃`,`\\triangleleft`),P(F,L,z,`▹`,`\\triangleright`),P(F,L,tn,`{`,`\\{`),P(I,L,V,`{`,`\\{`),P(I,L,V,`{`,`\\textbraceleft`),P(F,L,Zt,`}`,`\\}`),P(I,L,V,`}`,`\\}`),P(I,L,V,`}`,`\\textbraceright`),P(F,L,tn,`{`,`\\lbrace`),P(F,L,Zt,`}`,`\\rbrace`),P(F,L,tn,`[`,`\\lbrack`,!0),P(I,L,V,`[`,`\\lbrack`,!0),P(F,L,Zt,`]`,`\\rbrack`,!0),P(I,L,V,`]`,`\\rbrack`,!0),P(F,L,tn,`(`,`\\lparen`,!0),P(F,L,Zt,`)`,`\\rparen`,!0),P(I,L,V,`<`,`\\textless`,!0),P(I,L,V,`>`,`\\textgreater`,!0),P(F,L,tn,`⌊`,`\\lfloor`,!0),P(F,L,Zt,`⌋`,`\\rfloor`,!0),P(F,L,tn,`⌈`,`\\lceil`,!0),P(F,L,Zt,`⌉`,`\\rceil`,!0),P(F,L,V,`\\`,`\\backslash`),P(F,L,V,`∣`,`|`),P(F,L,V,`∣`,`\\vert`),P(I,L,V,`|`,`\\textbar`,!0),P(F,L,V,`∥`,`\\|`),P(F,L,V,`∥`,`\\Vert`),P(I,L,V,`∥`,`\\textbardbl`),P(I,L,V,`~`,`\\textasciitilde`),P(I,L,V,`\\`,`\\textbackslash`),P(I,L,V,`^`,`\\textasciicircum`),P(F,L,B,`↑`,`\\uparrow`,!0),P(F,L,B,`⇑`,`\\Uparrow`,!0),P(F,L,B,`↓`,`\\downarrow`,!0),P(F,L,B,`⇓`,`\\Downarrow`,!0),P(F,L,B,`↕`,`\\updownarrow`,!0),P(F,L,B,`⇕`,`\\Updownarrow`,!0),P(F,L,en,`∐`,`\\coprod`),P(F,L,en,`⋁`,`\\bigvee`),P(F,L,en,`⋀`,`\\bigwedge`),P(F,L,en,`⨄`,`\\biguplus`),P(F,L,en,`⋂`,`\\bigcap`),P(F,L,en,`⋃`,`\\bigcup`),P(F,L,en,`∫`,`\\int`),P(F,L,en,`∫`,`\\intop`),P(F,L,en,`∬`,`\\iint`),P(F,L,en,`∭`,`\\iiint`),P(F,L,en,`∏`,`\\prod`),P(F,L,en,`∑`,`\\sum`),P(F,L,en,`⨂`,`\\bigotimes`),P(F,L,en,`⨁`,`\\bigoplus`),P(F,L,en,`⨀`,`\\bigodot`),P(F,L,en,`∮`,`\\oint`),P(F,L,en,`∯`,`\\oiint`),P(F,L,en,`∰`,`\\oiiint`),P(F,L,en,`⨆`,`\\bigsqcup`),P(F,L,en,`∫`,`\\smallint`),P(I,L,Qt,`…`,`\\textellipsis`),P(F,L,Qt,`…`,`\\mathellipsis`),P(I,L,Qt,`…`,`\\ldots`,!0),P(F,L,Qt,`…`,`\\ldots`,!0),P(F,L,Qt,`⋯`,`\\@cdots`,!0),P(F,L,Qt,`⋱`,`\\ddots`,!0),P(F,L,V,`⋮`,`\\varvdots`),P(I,L,V,`⋮`,`\\varvdots`),P(F,L,Xt,`ˊ`,`\\acute`),P(F,L,Xt,`ˋ`,`\\grave`),P(F,L,Xt,`¨`,`\\ddot`),P(F,L,Xt,`~`,`\\tilde`),P(F,L,Xt,`ˉ`,`\\bar`),P(F,L,Xt,`˘`,`\\breve`),P(F,L,Xt,`ˇ`,`\\check`),P(F,L,Xt,`^`,`\\hat`),P(F,L,Xt,`⃗`,`\\vec`),P(F,L,Xt,`˙`,`\\dot`),P(F,L,Xt,`˚`,`\\mathring`),P(F,L,$t,``,`\\@imath`),P(F,L,$t,``,`\\@jmath`),P(F,L,V,`ı`,`ı`),P(F,L,V,`ȷ`,`ȷ`),P(I,L,V,`ı`,`\\i`,!0),P(I,L,V,`ȷ`,`\\j`,!0),P(I,L,V,`ß`,`\\ss`,!0),P(I,L,V,`æ`,`\\ae`,!0),P(I,L,V,`œ`,`\\oe`,!0),P(I,L,V,`ø`,`\\o`,!0),P(I,L,V,`Æ`,`\\AE`,!0),P(I,L,V,`Œ`,`\\OE`,!0),P(I,L,V,`Ø`,`\\O`,!0),P(I,L,Xt,`ˊ`,`\\'`),P(I,L,Xt,`ˋ`,"\\`"),P(I,L,Xt,`ˆ`,`\\^`),P(I,L,Xt,`˜`,`\\~`),P(I,L,Xt,`ˉ`,`\\=`),P(I,L,Xt,`˘`,`\\u`),P(I,L,Xt,`˙`,`\\.`),P(I,L,Xt,`¸`,`\\c`),P(I,L,Xt,`˚`,`\\r`),P(I,L,Xt,`ˇ`,`\\v`),P(I,L,Xt,`¨`,`\\"`),P(I,L,Xt,`˝`,`\\H`),P(I,L,Xt,`◯`,`\\textcircled`);var an={"--":!0,"---":!0,"``":!0,"''":!0};P(I,L,V,`–`,`--`,!0),P(I,L,V,`–`,`\\textendash`),P(I,L,V,`—`,`---`,!0),P(I,L,V,`—`,`\\textemdash`),P(I,L,V,`‘`,"`",!0),P(I,L,V,`‘`,`\\textquoteleft`),P(I,L,V,`’`,`'`,!0),P(I,L,V,`’`,`\\textquoteright`),P(I,L,V,`“`,"``",!0),P(I,L,V,`“`,`\\textquotedblleft`),P(I,L,V,`”`,`''`,!0),P(I,L,V,`”`,`\\textquotedblright`),P(F,L,V,`°`,`\\degree`,!0),P(I,L,V,`°`,`\\degree`),P(I,L,V,`°`,`\\textdegree`,!0),P(F,L,V,`£`,`\\pounds`),P(F,L,V,`£`,`\\mathsterling`,!0),P(I,L,V,`£`,`\\pounds`),P(I,L,V,`£`,`\\textsterling`,!0),P(F,R,V,`✠`,`\\maltese`),P(I,R,V,`✠`,`\\maltese`);for(var H=`0123456789/@."`,on=0;on<H.length;on++){var sn=H.charAt(on);P(F,L,V,sn,sn)}for(var cn=`0123456789!@*()-=+";:?/.,`,ln=0;ln<cn.length;ln++){var un=cn.charAt(ln);P(I,L,V,un,un)}for(var dn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,fn=0;fn<dn.length;fn++){var pn=dn.charAt(fn);P(F,L,$t,pn,pn),P(I,L,V,pn,pn)}P(F,R,V,`C`,`ℂ`),P(I,R,V,`C`,`ℂ`),P(F,R,V,`H`,`ℍ`),P(I,R,V,`H`,`ℍ`),P(F,R,V,`N`,`ℕ`),P(I,R,V,`N`,`ℕ`),P(F,R,V,`P`,`ℙ`),P(I,R,V,`P`,`ℙ`),P(F,R,V,`Q`,`ℚ`),P(I,R,V,`Q`,`ℚ`),P(F,R,V,`R`,`ℝ`),P(I,R,V,`R`,`ℝ`),P(F,R,V,`Z`,`ℤ`),P(I,R,V,`Z`,`ℤ`),P(F,L,$t,`h`,`ℎ`),P(I,L,$t,`h`,`ℎ`);for(var mn,hn=0;hn<dn.length;hn++){var gn=dn.charAt(hn);mn=String.fromCharCode(55349,56320+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56372+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56424+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56580+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56684+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56736+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56788+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56840+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56944+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),hn<26&&(mn=String.fromCharCode(55349,56632+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn),mn=String.fromCharCode(55349,56476+hn),P(F,L,$t,gn,mn),P(I,L,V,gn,mn))}mn=String.fromCharCode(55349,56668),P(F,L,$t,`k`,mn),P(I,L,V,`k`,mn);for(var _n=0;_n<10;_n++){var vn=_n.toString();mn=String.fromCharCode(55349,57294+_n),P(F,L,$t,vn,mn),P(I,L,V,vn,mn),mn=String.fromCharCode(55349,57314+_n),P(F,L,$t,vn,mn),P(I,L,V,vn,mn),mn=String.fromCharCode(55349,57324+_n),P(F,L,$t,vn,mn),P(I,L,V,vn,mn),mn=String.fromCharCode(55349,57334+_n),P(F,L,$t,vn,mn),P(I,L,V,vn,mn)}for(var yn=`ÐÞþ`,bn=0;bn<yn.length;bn++){var xn=yn.charAt(bn);P(F,L,$t,xn,xn),P(I,L,V,xn,xn)}var Sn={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Cn={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},wn={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},Tn={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},En={mathClass:``,textClass:``,font:``},Dn={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},On={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},kn={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},An={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},jn={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},Mn={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},Nn={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},Pn=[Sn,Sn,Cn,Cn,wn,wn,Tn,En,En,En,Dn,Dn,On,On,kn,kn,An,An,jn,jn,Mn,Mn,En,En,Nn,Nn],Fn=[Sn,En,An,jn,Nn],In=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return Pn[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return Fn[Math.floor((r-120782)/10)];if(r===120485||r===120486)return Pn[0];if(120486<r&&r<120782)return En;throw new T(`Unsupported character: `+e)},Ln=function(e,t,n){if(N[n][e]){var r=N[n][e].replace;r&&(e=r)}return{value:e,metrics:qt(e,t,n)}},Rn=function(e,t,n,r,i){var a=Ln(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new It(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new It(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},zn=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&Ln(e,`Main-Bold`,t).metrics?Rn(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||N[t][e].font===`main`?Rn(e,`Main-Regular`,t,n,r):Rn(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},Bn=function(e,t,n){return n!==`textord`&&Ln(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},Vn=function(e,t){var n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],o=t.font,s=t.fontFamily,c=t.fontWeight,l=t.fontShape,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=In(i);f=m.font,p=m[r+`Class`]}if(f)return Rn(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=Bn(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=er[o].fontName,g=[o]):(h=$n(s,c,l),g=[s,c,l]);if(Ln(i,h,r).metrics)return Rn(i,h,r,t,a.concat(g));if(Object.prototype.hasOwnProperty.call(an,i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(Rn(i[y],h,r,t,a.concat(g)));return Jn(v)}}if(n===`mathord`)return Rn(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var ee=N[r][i]&&N[r][i].font;if(ee===`ams`)return Rn(i,$n(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(ee===`main`||!ee)return Rn(i,$n(`textrm`,c,l),r,t,a.concat(c,l));var b=$n(ee,c,l);return Rn(i,b,r,t,a.concat(b,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},Hn=(e,t)=>{if(Dt(e.classes)!==Dt(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Un=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof It&&r instanceof It&&Hn(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},Wn=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},U=function(e,t,n,r){var i=new Mt(e,t,n,r);return Wn(i),i},Gn=(e,t,n,r)=>new Mt(e,t,n,r),Kn=function(e,t,n){var r=U([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=j(r.height),r.maxFontSize=1,r},qn=function(e,t,n,r){var i=new Nt(e,t,n,r);return Wn(i),i},Jn=function(e){var t=new St(e);return Wn(t),t},Yn=function(e,t){return e instanceof St?U([],[e],t):e},Xn=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw 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 Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},Zn=function(e,t){for(var n=Xn(e),r=n.children,i=n.depth,a=0,o=0;o<r.length;o++){var s=r[o];if(s.type===`elem`){var c=s.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var l=U([`pstrut`],[]);l.style.height=j(a);for(var u=[],d=i,f=i,p=i,m=0;m<r.length;m++){var h=r[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=U(_,[l,g],void 0,v);y.style.top=j(-a-p-g.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),f=Math.max(f,p)}var ee=U([`vlist`],u);ee.style.height=j(f);var b;if(d<0){var x=U([`vlist`],[U([],[])]);x.style.height=j(-d),b=[U([`vlist-r`],[ee,U([`vlist-s`],[new It(`​`)])]),U([`vlist-r`],[x])]}else b=[U([`vlist-r`],[ee])];var S=U([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=f,S.depth=-d,S},Qn=(e,t)=>{var n=U([`mspace`],[],t),r=Et(e,t);return n.style.marginRight=j(r),n},$n=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},er={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`}},tr={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},nr=function(e,t){var n=tr[e],r=n[0],i=n[1],a=n[2],o=Gn([`katex-overlay`],[new Lt([new Rt(r)],{width:j(i),height:j(a),style:`width:`+j(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=j(a),o.style.width=j(i),o},rr={number:3,unit:`mu`},ir={number:4,unit:`mu`},ar={number:5,unit:`mu`},or={mord:{mop:rr,mbin:ir,mrel:ar,minner:rr},mop:{mord:rr,mop:rr,mrel:ar,minner:rr},mbin:{mord:ir,mop:ir,mopen:ir,minner:ir},mrel:{mord:ar,mop:ar,mopen:ar,minner:ar},mopen:{},mclose:{mop:rr,mbin:ir,mrel:ar,minner:rr},mpunct:{mord:rr,mop:rr,mrel:ar,mopen:rr,mclose:rr,mpunct:rr,minner:rr},minner:{mord:rr,mop:rr,mbin:ir,mrel:ar,mopen:rr,mpunct:rr,minner:rr}},sr={mord:{mop:rr},mop:{mord:rr,mop:rr},mbin:{},mrel:{},mopen:{},mclose:{mop:rr},mpunct:{},minner:{mop:rr}},cr={},lr={},ur={};function W(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)cr[n[a]]=e;t&&(r&&(lr[t]=r),i&&(ur[t]=i))}function dr(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(lr[t]=n),r&&(ur[t]=r)}var fr=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},pr=function(e){return e.type===`ordgroup`?e.body:[e]},mr=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),hr=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),gr={display:A.DISPLAY,text:A.TEXT,script:A.SCRIPT,scriptscript:A.SCRIPTSCRIPT},_r={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},vr=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=wr(e[a],t);if(o instanceof St){var s=o.children;i.push(...s)}else i.push(o)}if(Un(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(gr[l.style]))}var u=U([r[0]||`leftmost`],[],t),d=U([r[1]||`rightmost`],[],t),f=n===`root`;return yr(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&hr.has(r)?t.classes[0]=`mord`:r===`mbin`&&mr.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),yr(i,(e,t)=>{var n=Sr(t),r=Sr(e),i=n&&r?e.hasClass(`mtight`)?sr[n]?.[r]:or[n]?.[r]:null;if(i)return Qn(i,c)},{node:u},d,f),i},yr=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=br(o);if(s)yr(s.children,t,n,null,i);else{var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`katex-newline`)&&(n.node=U([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},br=function(e){return e instanceof St||e instanceof Nt||e instanceof Mt&&e.hasClass(`enclosing`)?e:null},xr=function(e,t){var n=br(e);if(n){var r=n.children;if(r.length){if(t===`right`)return xr(r[r.length-1],`right`);if(t===`left`)return xr(r[0],`left`)}}return e},Sr=function(e,t){return e?(t&&(e=xr(e,t)),_r[e.classes[0]]||null):null},Cr=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return U(t.concat(n))},wr=function(e,t,n){if(!e)return U();if(lr[e.type]){var r=lr[e.type](e,t);if(n&&t.size!==n.size){r=U(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new T(`Got group of unknown type: '`+e.type+`'`)};function Tr(e,t){var n=U([`katex-base`],e,t),r=U([`katex-strut`]);return r.style.height=j(n.height+n.depth),n.depth&&(r.style.verticalAlign=j(-n.depth)),n.children.unshift(r),n}function Er(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=vr(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`katex-newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(Tr(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(Tr(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(Tr(o,t));var l;n?(l=Tr(vr(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=U([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=j(u.height+u.depth),u.depth&&(d.style.verticalAlign=j(-u.depth))}return u}function Dr(e){return new St(e)}var G=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=Dt(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof Or&&this.children[i+1]instanceof Or){for(var a=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof Or;)a+=this.children[++i].toText();e.appendChild(new Or(a).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=` `+n+`="`,e+=Ie(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+Ie(Dt(this.classes))+`"`),e+=`>`;for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},Or=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ie(this.toText())}toText(){return this.text}},kr=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`: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`,j(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+j(this.width)+`"/>`}toText(){return this.character?this.character:` `}},Ar=new Set([`\\imath`,`\\jmath`]),jr=new Set([`mrow`,`mtable`]),Mr=function(e,t,n){var r,i;return N[t][e]&&N[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(an,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=N[t][e].replace),new Or(e)},Nr=function(e){return e.length===1?e[0]:new G(`mrow`,e)},Pr={mathit:`italic`,boldsymbol:e=>e.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`},Fr=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=Pr[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(Ar.has(a))return null;if(N[r][a]){var o=N[r][a].replace;o&&(a=o)}var s=er[n].fontName;return qt(a,s,r)?er[n].variant:null};function Ir(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof Or&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof Or&&n.text===`,`}return!1}var Lr=function(e,t,n){if(e.length===1){var r=zr(e[0],t);return n&&r instanceof G&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=zr(e[o],t);if(s instanceof G&&a instanceof G){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)||s.type===`mn`&&a.type===`mn`||Ir(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&Ir(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||Ir(a))){var c=s.children[0];c instanceof G&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof Or&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof Or&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},Rr=function(e,t,n){return Nr(Lr(e,t,n))},zr=function(e,t){if(!e)return new G(`mrow`);if(ur[e.type])return ur[e.type](e,t);throw new T(`Got group of unknown type: '`+e.type+`'`)};function K(e,t,n,r,i){var a=Lr(e,n),o=a.length===1&&a[0]instanceof G&&jr.has(a[0].type)?a[0]:new G(`mrow`,a),s=new G(`annotation`,[new Or(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new G(`math`,[new G(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),U([i?`katex`:`katex-mathml`],[c])}var Br=[[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]],Vr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Hr=function(e,t){return t.size<2?e:Br[e-1][t.size-1]},Ur=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Vr[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Hr(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:Vr[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Hr(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Yt(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};Ur.BASESIZE=6;var Wr=function(e){return new Ur({style:e.displayMode?A.DISPLAY:A.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Gr=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=U(n,[e])}return e},Kr=function(e,t,n){var r=Wr(n),i;return n.output===`mathml`?K(e,t,r,n.displayMode,!0):(i=n.output===`html`?U([`katex`],[Er(e,r)]):U([`katex`],[K(e,t,r,n.displayMode,!1),Er(e,r)]),Gr(i,n))},qr=function(e,t,n){return Gr(U([`katex`],[Er(e,Wr(n))]),n)},Jr={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Yr=function(e){var t=new G(`mo`,[new Or(Jr[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Xr={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]},Zr=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Qr=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(Zr.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Gn([],[new Lt([new Rt(o)],{width:`100%`,height:j(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=Xr[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
513
+ `+h+` children.`);for(var v=0;v<h;v++){var y=new Lt([new Rt(d[v])],{width:`400em`,height:j(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),ee=Gn([g[v]],[y],t);if(h===1)return{span:ee,minWidth:f,height:m};ee.style.height=j(m),l.push(ee)}return{span:U([`katex-stretchy`],l,t),minWidth:f,height:m}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=j(o),a>0&&(i.style.minWidth=j(a)),i},$r=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=U([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new zt({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new zt({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Gn([],[new Lt(c,{width:`100%`,height:j(o)})],i)}return a.height=o,a.style.height=j(o),a},ei=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],ti=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],ni=new Set(ei),ri=new Set(ti);function ii(e){return ni.has(e)}function ai(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function oi(e){var t=si(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function si(e){return e.type===`atom`||ri.has(e.type)?e:null}function ci(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new T(t,e);return r}var li=e=>{if(e instanceof It)return e;if(Ht(e)&&e.children.length===1)return li(e.children[0])},ui=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=ai(e.base,`accent`),n=r.base,e.base=n,i=Vt(wr(e,t)),e.base=r):(r=ai(e,`accent`),n=r.base);var a=wr(n,t.havingCrampedStyle()),o=r.isShifty&&ze(n),s=0;o&&(s=li(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Qr(r,t),u=Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+j(2*s)+`)`,marginLeft:j(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=nr(`vec`,t),f=tr.vec[1]):(d=Vn({type:`textord`,mode:r.mode,text:r.label},t),d=Bt(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=U([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=j(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=U([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},di=(e,t)=>{var n=e.isStretchy?Yr(e.label):new G(`mo`,[Mr(e.label,e.mode)]),r=new G(`mover`,[zr(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},fi=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));W({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`],numArgs:1,handler:(e,t)=>{var n=fr(t[0]),r=!fi.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:ui,mathmlBuilder:di}),W({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),W({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=wr(e.base,t),r=Qr(e,t),i=e.label===`\\utilde`?.12:0;return U([`mord`,`accentunder`],[Zn({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Yr(e.label),r=new G(`munder`,[zr(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var pi=e=>{var t=new G(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};W({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`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Yn(wr(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Yn(wr(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Qr(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return U([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Yr(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=pi(zr(e.body,t));r=e.below?new G(`munderover`,[n,pi(zr(e.below,t)),i]):new G(`mover`,[n,i])}else e.below?r=new G(`munder`,[n,pi(zr(e.below,t))]):(r=pi(),r=new G(`mover`,[n,r]));return r}});function mi(e,t){var n=vr(e.body,t,!0);return U([e.mclass],n,t)}function hi(e,t){var n,r=Lr(e.body,t);return e.mclass===`minner`?n=new G(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new G(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new G(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}W({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:pr(i),isCharacterBox:ze(i)}},htmlBuilder:mi,mathmlBuilder:hi});var gi=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};W({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:gi(t[0]),body:pr(t[1]),isCharacterBox:ze(t[1])}}}),W({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:gi(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:pr(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:ze(c)}}}),W({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:gi(t[0]),body:pr(t[0])}},htmlBuilder(e,t){var n=vr(e.body,t,!0),r=U([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new G(`mstyle`,Lr(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var _i={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},vi=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),yi=e=>e.type===`textord`&&e.text===`@`,bi=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function xi(e,t,n){var r=_i[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function Si(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new T(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=vi(),c=0;c<o.length;c++)if(!yi(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=oi(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(bi(o[p],l)){f=!1,c=p;break}if(yi(o[p]))throw new T(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new T(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new T(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[xi(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=vi()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}W({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Yn(wr(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=j(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new G(`mrow`,[zr(e.label,t)]);return n=new G(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new G(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),W({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Yn(wr(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new G(`mrow`,[zr(e.fragment,t)])}}),W({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=ci(ai(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new T(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new T(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),W({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=ai(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:pr(i)}},htmlBuilder:(e,t)=>Jn(vr(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new G(`mstyle`,Lr(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),W({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=ai(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),W({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var r=e.parser,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&ai(i,`size`).value}},htmlBuilder(e,t){var n=U([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=j(Et(e.size,t)))),n},mathmlBuilder(e,t){var n=new G(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,j(Et(e.size,t)))),n}});var Ci={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},wi=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new T(`Expected a control sequence`,e);return t},Ti=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Ei=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};W({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(Ci[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Ci[r.text]),ai(t.parseFunction(),`internal`);throw new T(`Invalid token after macro prefix`,r)}}),W({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new T(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new T(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new T(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new T(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Ci[n]),{type:`internal`,mode:t.mode}}}),W({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=wi(t.gullet.popToken());return t.gullet.consumeSpaces(),Ei(t,r,Ti(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),W({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=wi(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Ei(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var Di=function(e,t,n){var r=qt(N.math[e]&&N.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Oi=function(e,t,n,r){var i=n.havingBaseStyle(t),a=U(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},ki=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=j(i),e.height-=i,e.depth+=i},Ai=function(e,t,n,r,i,a){var o=Oi(Rn(e,`Main-Regular`,i,r),t,r,a);return n&&ki(o,r,t),o},ji=function(e,t,n,r){return Rn(e,`Size`+t+`-Regular`,n,r)},Mi=function(e,t,n,r,i,a){var o=ji(e,t,i,r),s=Oi(U([`delimsizing`,`size`+t],[o],r),A.TEXT,r,a);return n&&ki(s,r,A.TEXT),s},Ni=function(e,t,n){return{type:`elem`,elem:U([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[U([],[Rn(e,t,n)])])}},Pi=function(e,t,n){var r=Ut[`Size4-Regular`][e.charCodeAt(0)]?Ut[`Size4-Regular`][e.charCodeAt(0)][4]:Ut[`Size1-Regular`][e.charCodeAt(0)][4],i=Gn([],[new Lt([new Rt(`inner`,vt(e,Math.round(1e3*t)))],{width:j(r),height:j(t),style:`width:`+j(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=j(t),i.style.width=j(r),{type:`elem`,elem:i}},Fi=.008,Ii={type:`kern`,size:-1*Fi},Li=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Ri=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),zi=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):Li.has(e)?(c=`∣`,u=`vert`,d=333):Ri.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=Di(o,f,i),m=p.height+p.depth,h=Di(c,f,i),g=h.height+h.depth,_=Di(l,f,i),v=_.height+_.depth,y=0,ee=1;if(s!==null){var b=Di(s,f,i);y=b.height+b.depth,ee=2}var x=m+v+y,S=x+Math.max(0,Math.ceil((t-x)/(ee*g)))*ee*g,te=r.fontMetrics().axisHeight;n&&(te*=r.sizeMultiplier);var ne=S/2-te,C=[];if(u.length>0){var re=S-m-v,ie=Math.round(S*1e3),ae=bt(u,Math.round(re*1e3)),oe=new Rt(u,ae),se=j(d/1e3),ce=j(ie/1e3),le=Gn([],[new Lt([oe],{width:se,height:ce,viewBox:`0 0 `+d+` `+ie})],r);le.height=ie/1e3,le.style.width=se,le.style.height=ce,C.push({type:`elem`,elem:le})}else{if(C.push(Ni(l,f,i)),C.push(Ii),s===null){var ue=S-m-v+2*Fi;C.push(Pi(c,ue,r))}else{var de=(S-m-v-y)/2+2*Fi;C.push(Pi(c,de,r)),C.push(Ii),C.push(Ni(s,f,i)),C.push(Ii),C.push(Pi(c,de,r))}C.push(Ii),C.push(Ni(o,f,i))}var fe=r.havingBaseStyle(A.TEXT);return Oi(U([`delimsizing`,`mult`],[Zn({positionType:`bottom`,positionData:ne,children:C})],fe),A.TEXT,r,a)},Bi=80,Vi=.08,Hi=function(e,t,n,r,i){return Gn([`hide-tail`],[new Lt([new Rt(e,_t(e,r,n))],{width:`400em`,height:j(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Ui=function(e,t){var n=t.havingBaseSizing(),r=$i(`\\surd`,e*n.sizeMultiplier,Zi,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+Bi,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Vi)/i,c=(1+a)/i,o=Hi(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+Bi)*qi[r.size],c=(qi[r.size]+a)/i,s=(qi[r.size]+a+Vi)/i,o=Hi(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Vi,c=e+a,l=Math.floor(1e3*e+a)+Bi,o=Hi(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=j(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Wi=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Gi=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Ki=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),qi=[0,1.2,1.8,2.4,3],Ji=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Wi.has(e)||Ki.has(e))return Mi(e,t,!1,n,r,i);if(Gi.has(e))return zi(e,qi[t],!1,n,r,i);throw new T(`Illegal delimiter: '`+e+`'`)},Yi=[{type:`small`,style:A.SCRIPTSCRIPT},{type:`small`,style:A.SCRIPT},{type:`small`,style:A.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Xi=[{type:`small`,style:A.SCRIPTSCRIPT},{type:`small`,style:A.SCRIPT},{type:`small`,style:A.TEXT},{type:`stack`}],Zi=[{type:`small`,style:A.SCRIPTSCRIPT},{type:`small`,style:A.SCRIPT},{type:`small`,style:A.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Qi=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 t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},$i=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=Di(e,Qi(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},ea=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Ki.has(e)?Yi:Wi.has(e)?Zi:Xi,s=$i(e,t,o,r);return s.type===`small`?Ai(e,s.style,n,r,i,a):s.type===`large`?Mi(e,s.size,n,r,i,a):zi(e,t,n,r,i,a)},ta=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return ea(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},na={"\\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}},ra=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function ia(e){return`isMiddle`in e}function aa(e,t){var n=si(e);if(n&&ra.has(n.text))return n;throw n?new T(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new T(`Invalid delimiter type '`+e.type+`'`,e)}W({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=aa(fr(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:na[e.funcName].size,mclass:na[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?U([e.mclass]):Ji(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(Mr(e.delim,e.mode));var n=new G(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=j(qi[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function oa(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}W({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new T(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:aa(t[0],e).text,color:n}}}),W({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=aa(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=ai(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{oa(e);for(var n=vr(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];ia(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?Cr(t,[`mopen`]):ta(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(ia(u)){var d=u.isMiddle;n[l]=ta(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=Cr(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=ta(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),U([`minner`],n,t)},mathmlBuilder:(e,t)=>{oa(e);var n=Lr(e.body,t);if(e.left!==`.`){var r=new G(`mo`,[Mr(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new G(`mo`,[Mr(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Nr(n)}}),W({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=aa(t[0],e);if(!e.parser.leftrightDepth)throw new T(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Cr(t,[]):(n=Ji(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new G(`mo`,[e.delim===`\\vert`||e.delim===`|`?Mr(`|`,`text`):Mr(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),W({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=ai(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Yn(wr(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=ze(e.body);if(r===`sout`)a=U([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Et({number:.6,unit:`pt`},t),l=Et({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=j(d/2+c);var f=Math.floor(1e3*d*i);a=Gn([`hide-tail`],[new Lt([new Rt(`phase`,ht(f))],{width:`400em`,height:j(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=j(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=$r(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=j(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=j(h),a.style.borderRightWidth=j(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?U([`mord`,`cancel-lap`],[g],t):U([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new G(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[zr(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+j(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),W({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=ai(t[0],`color-token`).color,o=ai(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),W({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),W({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),W({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),W({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var sa={};function ca(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)sa[n[c]]=s;a&&(lr[t]=a),o&&(ur[t]=o)}var la={};function q(e,t){la[e]=t}var ua=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},da=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,ua.range(this,t))}};function fa(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var pa=e=>{if(!e.parser.settings.displayMode)throw new T(`{`+e.envName+`} can be used only in display mode.`)},ma=new Set([`gather`,`gather*`]);function ha(e){if(!e.includes(`ed`))return!e.includes(`*`)}function ga(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new T(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function ee(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new da(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(fa(e));;){var b=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var x={type:`ordgroup`,mode:e.mode,body:b};n&&(x={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[x]}),m.push(x);var S=e.fetch().text;if(S===`&`){if(d&&m.length===d){if(l||s)throw new T(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(S===`\\end`){ee(),m.length===1&&x.type===`styling`&&x.body.length===1&&x.body[0].type===`ordgroup`&&x.body[0].body.length===0&&(h.length>1||!u)&&!Array.isArray(v?.[v.length-1])&&!(c&&v?.[v.length-1]===!0)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(S===`\\\\`){e.consume();var te=void 0;e.gullet.future().text!==` `&&(te=e.parseSizeGroup(!0)),g.push(te?te.value:null),ee(),_.push(fa(e)),m=[],h.push(m),y()}else throw new T(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function _a(e){return e.slice(0,1)===`d`?`display`:`text`}var va=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(A.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Et({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],ee=h,b=g;o<y.length&&(o=y.length);var x={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var S=wr(y[r],t);b<S.depth&&(b=S.depth),ee<S.height&&(ee=S.height),x.cells[r]=S}var te=e.rowGaps[n],ne=0;te&&(ne=Et(te,t),ne>0&&(ne+=g,b<ne&&(b=ne),ne=0)),e.addJot&&n<e.body.length-1&&(b+=p),x.height=ee,x.depth=b,_+=ee,x.pos=_,_+=b+ne,s[n]=x,v(a[n+1])}var C=_/2+t.fontMetrics().axisHeight,re=e.cols||[],ie=[],ae,oe,se=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ce=s[n],le=ce.pos-C,ue=e.tags[n],de=void 0;de=ue===!0?U([`eqn-num`],[],t):ue===!1?U([],[],t):U([],vr(ue,t,!0),t),de.depth=ce.depth,de.height=ce.height,se.push({type:`elem`,elem:de,shift:le})}for(r=0,oe=0;r<o||oe<re.length;++r,++oe){for(var fe=re[oe],pe=!0;(me=fe)?.type===`separator`;){var me;if(pe||(ae=U([`arraycolsep`],[]),ae.style.width=j(t.fontMetrics().doubleRuleSep),ie.push(ae)),fe.separator===`|`||fe.separator===`:`){var he=fe.separator===`|`?`solid`:`dashed`,ge=U([`vertical-separator`],[],t);ge.style.height=j(_),ge.style.borderRightWidth=j(l),ge.style.borderRightStyle=he,ge.style.margin=`0 `+j(-l/2);var _e=_-C;_e&&(ge.style.verticalAlign=j(-_e)),ie.push(ge)}else throw new T(`Invalid separator type: `+fe.separator);oe++,fe=re[oe],pe=!1}if(!(r>=o)){var ve=void 0;(r>0||e.hskipBeforeAndAfter)&&(ve=fe?.pregap??d,ve!==0&&(ae=U([`arraycolsep`],[]),ae.style.width=j(ve),ie.push(ae)));var ye=[];for(n=0;n<i;++n){var be=s[n],xe=be.cells[r];if(xe){var Se=be.pos-C;xe.depth=be.depth,xe.height=be.height,ye.push({type:`elem`,elem:xe,shift:Se})}}var Ce=Zn({positionType:`individualShift`,children:ye}),we=U([`col-align-`+(fe?.align||`c`)],[Ce]);ie.push(we),(r<o-1||e.hskipBeforeAndAfter)&&(ve=fe?.postgap??d,ve!==0&&(ae=U([`arraycolsep`],[]),ae.style.width=j(ve),ie.push(ae)))}}var w=U([`mtable`],ie);if(c.length>0){for(var Te=Kn(`katex-hline`,t,l),Ee=Kn(`katex-hdashline`,t,l),De=[{type:`elem`,elem:w,shift:0}];c.length>0;){var Oe=c.pop(),ke=Oe.pos-C;Oe.isDashed?De.push({type:`elem`,elem:Ee,shift:ke}):De.push({type:`elem`,elem:Te,shift:ke})}w=Zn({positionType:`individualShift`,children:De})}if(se.length===0)return U([`mord`],[w],t);var Ae=U([`katex-tag`],[Zn({positionType:`individualShift`,children:se})],t);return Jn([w,Ae])},ya={c:`center `,l:`left `,r:`right `},ba=function(e,t){for(var n=[],r=new G(`mtd`,[],[`mtr-glue`]),i=new G(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new G(`mtd`,[zr(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new G(`mtr`,s))}var l=new G(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,j(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=ya[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var ee=e.cols||[],b=``,x=1;x<ee.length;x++)b+=x%2?`0em `:`1em `;l.setAttribute(`columnspacing`,b.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var S=``,te=e.hLinesBeforeRow;d+=te[0].length>0?`left `:``,d+=te[te.length-1].length>0?`right `:``;for(var ne=1;ne<te.length-1;ne++)S+=te[ne].length===0?`none `:te[ne][0]?`dashed `:`solid `;return/[sd]/.test(S)&&l.setAttribute(`rowlines`,S.trim()),d!==``&&(l=new G(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new G(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},xa=function(e,t){e.envName.includes(`ed`)||pa(e);var n=[],r=e.envName===`split`,i=ga(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:ha(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){var c=`Number of columns should be a positive integer`,l=ci(t[0],c);if(!/^[0-9]+$/.test(l)||Number(l)<1)throw new T(c,t[0]);a=Number(l),o=a*2}var u=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)ai(ai(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(u)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new T(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var d=0;d<o;++d){var f=`r`,p=0;d%2==1?f=`l`:d>0&&u&&(p=1),n[d]={type:`align`,align:f,pregap:p,postgap:0}}return i.colSeparationType=u?`align`:`alignat`,i};ca({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(si(t[0])?[t[0]]:ai(t[0],`ordgroup`).body).map(function(e){var t=oi(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new T(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return ga(e.parser,r,_a(e.envName))},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new T(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=ga(e.parser,r,_a(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=ga(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(si(t[0])?[t[0]]:ai(t[0],`ordgroup`).body).map(function(e){var t=oi(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new T(`Unknown column alignment: `+t,e)});if(n.length>1)throw new T(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=ga(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new T(`{subarray} can contain only one column`);return i},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=ga(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},_a(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:xa,htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){ma.has(e.envName)&&pa(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:ha(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ga(e.parser,t,`display`)},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:xa,htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){pa(e);var t={autoTag:ha(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ga(e.parser,t,`display`)},htmlBuilder:va,mathmlBuilder:ba}),ca({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return pa(e),Si(e.parser)},htmlBuilder:va,mathmlBuilder:ba}),q(`\\nonumber`,`\\gdef\\@eqnsw{0}`),q(`\\notag`,`\\nonumber`),W({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new T(e.funcName+` valid only within array environment`)}});var Sa=sa;W({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new T(`Invalid environment name`,i);var a=ci(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(Sa,a))throw new T(`No such environment: `+a,i);var o=Sa[a],s=n.parseArguments(`\\begin{`+a+`}`,o),c=s.args,l=s.optArgs,u={mode:n.mode,envName:a,parser:n},d=o.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=ai(n.parseFunction(),`environment`);if(p.name!==a)throw new T(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var Ca=(e,t)=>{var n=e.font,r=t.withFont(n);return wr(e.body,r)},wa=(e,t)=>{var n=e.font,r=t.withFont(n);return zr(e.body,r)},Ta={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};W({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=fr(t[0]),a=r in Ta?Ta[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Ca,mathmlBuilder:wa}),W({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:gi(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:ze(r)}}}),W({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var Ea=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=wr(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=wr(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Et(e.barSize,t),u=Kn(`frac-line`,t,d)):u=Kn(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===A.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var ee=n.size===A.DISPLAY.size?t.fontMetrics().delim1:n.size===A.SCRIPTSCRIPT.size?t.havingStyle(A.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,b=e.leftDelim==null?Cr(t,[`mopen`]):ea(e.leftDelim,ee,!0,t.havingStyle(n),e.mode,[`mopen`]),x=e.continued?U([]):e.rightDelim==null?Cr(t,[`mclose`]):ea(e.rightDelim,ee,!0,t.havingStyle(n),e.mode,[`mclose`]);return U([`mord`].concat(a.sizingClasses(t)),[b,U([`mfrac`],[g]),x],t)},Da=(e,t)=>{var n=new G(`mfrac`,[zr(e.numer,t),zr(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Et(e.barSize,t);n.setAttribute(`linethickness`,j(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new G(`mo`,[new Or(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new G(`mo`,[new Or(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Nr(i)}return n},Oa=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;W({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),Oa({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Ea,mathmlBuilder:Da}),W({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var ka=[`display`,`text`,`script`,`scriptscript`],Aa=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};W({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=fr(t[0]),o=a.type===`atom`&&a.family===`open`?Aa(a.text):null,s=fr(t[1]),c=s.type===`atom`&&s.family===`close`?Aa(s.text):null,l=ai(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=ai(p.body[0],`textord`);f=ka[Number(m.text)]}}else p=ai(p,`textord`),f=ka[Number(p.text)];return Oa({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),W({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:ai(t[0],`size`).value,token:r}}}),W({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=ai(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var ja=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?wr(e.sup,t.havingStyle(n.sup()),t):wr(e.sub,t.havingStyle(n.sub()),t),i=ai(e.base,`horizBrace`)):i=ai(e,`horizBrace`);var a=wr(i.base,t.havingBaseStyle(A.DISPLAY)),o=Qr(i,t),s=i.isOver?Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):Zn({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=U([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):Zn({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return U([`minner`,i.isOver?`mover`:`munder`],[s],t)};W({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:ja,mathmlBuilder:(e,t)=>{var n=Yr(e.label);return new G(e.isOver?`mover`:`munder`,[zr(e.base,t),n])}}),W({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=ai(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:pr(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=vr(e.body,t,!1);return qn(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Rr(e.body,t);return n instanceof G||(n=new G(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),W({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=ai(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:pr(s)}}}),W({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:pr(t[0])}},htmlBuilder(e,t){return Jn(vr(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new G(`mrow`,Lr(e.body,t.withFont(``)))}}),W({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName;e.token;var i=ai(t[0],`raw`).string,a=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d<i.length;d++)i.startsWith(c,d)?(u+=`,`,d+=c.length-1):i[d]===`,`?(l.push(u),u=``):u+=i[d];l.push(u);for(var f=0;f<l.length;f++){var p=l[f],m=p.indexOf(`=`);if(m<0)throw new T(`\\htmlData key/value '`+p+`' missing equals sign`);var h=p.slice(0,m),g=p.slice(m+1);s[`data-`+h.trim()]=g}o={command:`\\htmlData`,attributes:s};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(o)?{type:`html`,mode:n.mode,attributes:s,body:pr(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=vr(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=U(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>Rr(e.body,t)}),W({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:pr(t[0]),mathml:pr(t[1])}),htmlBuilder:(e,t)=>Jn(vr(e.html,t,!1)),mathmlBuilder:(e,t)=>Rr(e.mathml,t)});var Ma=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new T(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Tt(n))throw new T(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};W({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=ai(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=Ma(d);break;case`height`:a=Ma(d);break;case`totalheight`:o=Ma(d);break;default:throw new T(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=ai(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Et(e.height,t),r=0;e.totalheight.number>0&&(r=Et(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Et(e.width,t));var a={height:j(n+r)};i>0&&(a.width=j(i)),r>0&&(a.verticalAlign=j(-r));var o=new Pt(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new G(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Et(e.height,t),i=0;if(e.totalheight.number>0&&(i=Et(e.totalheight,t)-r,n.setAttribute(`valign`,j(-i))),n.setAttribute(`height`,j(r+i)),e.width.number>0){var a=Et(e.width,t);n.setAttribute(`width`,j(a))}return n.setAttribute(`src`,e.src),n}}),W({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=ai(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Qn(e.dimension,t)},mathmlBuilder(e,t){return new kr(Et(e.dimension,t))}}),W({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=U([],[wr(e.body,t)]),n=U([`katex-inner`],[n],t)):n=U([`katex-inner`],[wr(e.body,t)]);var r=U([`katex-fix`],[]),i=U([e.alignment],[n,r],t),a=U([`katex-strut`]);return a.style.height=j(i.height+i.depth),i.depth&&(a.style.verticalAlign=j(-i.depth)),i.children.unshift(a),i=U([`katex-thinbox`],[i],t),U([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new G(`mpadded`,[zr(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),W({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),W({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new T(`Mismatched `+e.funcName)}});var Na=(e,t)=>{switch(t.style.size){case A.DISPLAY.size:return e.display;case A.TEXT.size:return e.text;case A.SCRIPT.size:return e.script;case A.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};W({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:pr(t[0]),text:pr(t[1]),script:pr(t[2]),scriptscript:pr(t[3])}),htmlBuilder:(e,t)=>Jn(vr(Na(e,t),t,!1)),mathmlBuilder:(e,t)=>Rr(Na(e,t),t)});var Pa=(e,t,n,r,i,a,o)=>{e=U([],[e]);var s=n&&ze(n),c,l;if(t){var u=wr(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=wr(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=Zn({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:j(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:j(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=Zn({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:j(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=Zn({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:j(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=U([`mspace`],[],r);m.style.marginRight=j(a),p.unshift(m)}return U([`mop`,`op-limits`],p,r)},Fa=new Set([`\\smallint`]),Ia=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=ai(e.base,`op`),i=!0):a=ai(e,`op`);var o=t.style,s=!1;o.size===A.DISPLAY.size&&a.symbol&&!Fa.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=Rn(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=nr(d+`Size`+(s?`2`:`1`),t);c=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=vr(a.body,t,!0);p.length===1&&p[0]instanceof It?(c=p[0],c.classes[0]=`mop`):c=U([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(zn(a.name[h],a.mode,t));c=U([`mop`],m,t)}var g=0,_=0;return(c instanceof It||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?Pa(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=j(g)),c)},La=(e,t)=>{var n;if(e.symbol)n=new G(`mo`,[Mr(e.name,e.mode)]),Fa.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new G(`mo`,Lr(e.body,t));else{n=new G(`mi`,[new Or(e.name.slice(1))]);var r=new G(`mo`,[Mr(`⁡`,`text`)]);n=e.parentIsSupSub?new G(`mrow`,[n,r]):Dr([n,r])}return n},Ra={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};W({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=Ra[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ia,mathmlBuilder:La}),W({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:pr(r)}}});var za={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};W({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),W({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),W({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=za[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var Ba=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=ai(e.base,`operatorname`),i=!0):a=ai(e,`operatorname`);var o;if(a.body.length>0){for(var s=vr(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof It&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=U([`mop`],s,t)}else o=U([`mop`],[],t);return i?Pa(o,n,r,t,t.style,0,0):o};W({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:pr(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ba,mathmlBuilder:(e,t)=>{for(var n=Lr(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof kr)){if(a instanceof G)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof Or?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new Or(n.map(e=>e.toText()).join(``))]);var s=new G(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new G(`mo`,[Mr(`⁡`,`text`)]);return e.parentIsSupSub?new G(`mrow`,[s,c]):Dr([s,c])}}),q(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),dr({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Jn(vr(e.body,t,!1)):U([`mord`],vr(e.body,t,!0),t)},mathmlBuilder(e,t){return Rr(e.body,t,!0)}}),W({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=wr(e.body,t.havingCrampedStyle()),r=Kn(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`katex-overline`],[Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new G(`mo`,[new Or(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new G(`mover`,[zr(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),W({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:pr(r)}},htmlBuilder:(e,t)=>Jn(vr(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new G(`mphantom`,Lr(e.body,t))}),q(`\\hphantom`,`\\smash{\\phantom{#1}}`),W({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>U([`mord`,`rlap`],[U([`katex-inner`],[wr(e.body,t.withPhantom())]),U([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new G(`mpadded`,[new G(`mphantom`,Lr(pr(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),W({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=ai(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=wr(e.body,t);return Zn({positionType:`shift`,positionData:-Et(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new G(`mpadded`,[zr(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}});var Va=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]});W({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:Va,htmlBuilder(e,t){return U([`mord`,`reflectbox`],[wr(e.body,t)],t)},mathmlBuilder(e,t){return zr(e.body,t)}}),W({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:Va}),W({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),W({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=ai(t[0],`size`),o=ai(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&ai(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=U([`mord`,`katex-rule`],[],t),r=Et(e.width,t),i=Et(e.height,t),a=e.shift?Et(e.shift,t):0;return n.style.borderRightWidth=j(r),n.style.borderTopWidth=j(i),n.style.bottom=j(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Et(e.width,t),r=Et(e.height,t),i=e.shift?Et(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new G(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,j(n)),o.setAttribute(`height`,j(r));var s=new G(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,j(i)):(s.setAttribute(`height`,j(i)),s.setAttribute(`depth`,j(-i))),s.setAttribute(`voffset`,j(i)),s}});function Ha(e,t,n){for(var r=vr(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return Jn(r)}var Ua=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];W({type:`sizing`,names:Ua,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Ua.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Ha(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new G(`mstyle`,Lr(e.body,n));return r.setAttribute(`mathsize`,j(n.sizeMultiplier)),r}}),W({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&ai(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=oi(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=U([],[wr(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return U([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return U([`mord`],[Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new G(`mpadded`,[zr(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),W({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=wr(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Yn(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<A.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=Ui(n.height+n.depth+a+r,t),s=o.span,c=o.ruleWidth,l=o.advanceWidth,u=s.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=j(l);var f=Zn({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(A.SCRIPTSCRIPT),m=wr(e.index,p,t);return U([`mord`,`sqrt`],[U([`katex-root`],[Zn({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return U([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new G(`mroot`,[zr(n,t),zr(r,t)]):new G(`msqrt`,[zr(n,t)])}});var Wa={display:A.DISPLAY,text:A.TEXT,script:A.SCRIPT,scriptscript:A.SCRIPTSCRIPT};function Ga(e){return e in Wa}W({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Ga(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Wa[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),Ha(e.body,r,t)},mathmlBuilder(e,t){var n=Wa[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new G(`mstyle`,Lr(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Ka=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===A.DISPLAY.size||n.alwaysHandleSupSub)?Ia:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===A.DISPLAY.size||n.limits)?Ba:null:n.type===`accent`?ze(n.base)?ui:null:n.type===`horizBrace`&&!e.sub===n.isOver?ja:null:null};dr({type:`supsub`,htmlBuilder(e,t){var n=Ka(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=wr(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&ze(r);if(i){var p=t.havingStyle(t.style.sup());s=wr(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=wr(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===A.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=j(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof It||y)&&(v=j(-(o.italic??0)))}var ee;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var b=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<b){d=b-(u-s.depth)+c.height;var x=.8*l.xHeight-(u-s.depth);x>0&&(u+=x,d-=x)}ee=Zn({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),ee=Zn({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),ee=Zn({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return U([Sr(o,`right`)||`mord`],[o,U([`msupsub`],[ee])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[zr(e.base,t)];e.sub&&a.push(zr(e.sub,t)),e.sup&&a.push(zr(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===A.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===A.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===A.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===A.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===A.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===A.DISPLAY)?`munder`:`msub`}return new G(o,a)}}),dr({type:`atom`,htmlBuilder(e,t){return zn(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new G(`mo`,[Mr(e.text,e.mode)]);if(e.family===`bin`){var r=Fr(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var qa={mi:`italic`,mn:`normal`,mtext:`normal`};dr({type:`mathord`,htmlBuilder(e,t){return Vn(e,t)},mathmlBuilder(e,t){var n=new G(`mi`,[Mr(e.text,e.mode,t)]),r=Fr(e,t)||`italic`;return r!==qa[n.type]&&n.setAttribute(`mathvariant`,r),n}}),dr({type:`textord`,htmlBuilder(e,t){return Vn(e,t)},mathmlBuilder(e,t){var n=Mr(e.text,e.mode,t),r=Fr(e,t)||`normal`,i=e.mode===`text`?new G(`mtext`,[n]):/[0-9]/.test(e.text)?new G(`mn`,[n]):e.text===`\\prime`?new G(`mo`,[n]):new G(`mi`,[n]);return r!==qa[i.type]&&i.setAttribute(`mathvariant`,r),i}});var Ja=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),Ya=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);dr({type:`spacing`,htmlBuilder(e,t){var n=Ya.get(e.text),r=Ja.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=Vn(e,t);return a.classes.push(i),a}return U([`mspace`,i],[zn(e.text,e.mode,t)],t)}if(r)return U([`mspace`,r],[],t);throw new T(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(Ya.has(e.text))n=new G(`mtext`,[new Or(`\xA0`)]);else if(Ja.has(e.text))return new G(`mspace`);else throw new T(`Unknown type of space "`+e.text+`"`);return n}});var Xa=()=>{var e=new G(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};dr({type:`tag`,mathmlBuilder(e,t){var n=new G(`mtable`,[new G(`mtr`,[Xa(),new G(`mtd`,[Rr(e.body,t)]),Xa(),new G(`mtd`,[Rr(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Za={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Qa={"\\textbf":`textbf`,"\\textmd":`textmd`},$a={"\\textit":`textit`,"\\textup":`textup`},eo=(e,t)=>{var n=e.font;return n?Za[n]?t.withTextFontFamily(Za[n]):Qa[n]?t.withTextFontWeight(Qa[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape($a[n]):t};W({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:pr(i),font:r}},htmlBuilder(e,t){var n=eo(e,t);return U([`mord`,`text`],vr(e.body,n,!0),n)},mathmlBuilder(e,t){var n=eo(e,t);return Rr(e.body,n)}}),W({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=wr(e.body,t),r=Kn(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`katex-underline`],[Zn({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new G(`mo`,[new Or(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new G(`munder`,[zr(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),W({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=wr(e.body,t),r=t.fontMetrics().axisHeight;return Zn({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new G(`mrow`,[new G(`mpadded`,[zr(e.body,t)],[`vcenter`])])}}),W({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new T(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=to(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(Rn(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return U([`mord`,`text`].concat(i.sizingClasses(t)),Un(r),i)},mathmlBuilder(e,t){var n=new G(`mtext`,[new Or(to(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var to=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),no=cr,ro=`[ \r
514
+ ]`,io=`\\\\[a-zA-Z@]+`,ao=`\\\\[^\ud800-\udfff]`,oo=`(`+io+`)`+ro+`*`,so=`\\\\(
515
+ |[ \r ]+
516
+ ?)[ \r ]*`,co=`[̀-ͯ]`,lo=RegExp(co+`+$`),uo=`(`+ro+`+)|`+(so+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(co+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(co+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+oo)+(`|`+ao+`)`),fo=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(uo,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new da(`EOF`,new ua(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new T(`Unexpected character: '`+e[t]+`'`,new da(e[t],new ua(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
517
+ `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new da(r,new ua(this,t,this.tokenRegex.lastIndex))}},po=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new T(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},mo=la;q(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),q(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),q(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),q(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),q(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),q(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),q(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var ho={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};q(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new T("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=ho[t.text],r==null||r>=n)throw new T(`Invalid base-`+n+` digit `+t.text);for(var i;(i=ho[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var go=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new T(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new T(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new T(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new T(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};q(`\\newcommand`,e=>go(e,!1,!0,!1)),q(`\\renewcommand`,e=>go(e,!0,!1,!1)),q(`\\providecommand`,e=>go(e,!0,!0,!0)),q(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),q(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),q(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),no[n],N.math[n],N.text[n]),``}),q(`\\bgroup`,`{`),q(`\\egroup`,`}`),q(`~`,`\\nobreakspace`),q(`\\lq`,"`"),q(`\\rq`,`'`),q(`\\aa`,`\\r a`),q(`\\AA`,`\\r A`),q(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),q(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),q(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),q(`ℬ`,`\\mathscr{B}`),q(`ℰ`,`\\mathscr{E}`),q(`ℱ`,`\\mathscr{F}`),q(`ℋ`,`\\mathscr{H}`),q(`ℐ`,`\\mathscr{I}`),q(`ℒ`,`\\mathscr{L}`),q(`ℳ`,`\\mathscr{M}`),q(`ℛ`,`\\mathscr{R}`),q(`ℭ`,`\\mathfrak{C}`),q(`ℌ`,`\\mathfrak{H}`),q(`ℨ`,`\\mathfrak{Z}`),q(`\\Bbbk`,`\\Bbb{k}`),q(`\\llap`,`\\mathllap{\\textrm{#1}}`),q(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),q(`\\clap`,`\\mathclap{\\textrm{#1}}`),q(`\\mathstrut`,`\\vphantom{(}`),q(`\\underbar`,`\\underline{\\text{#1}}`),q(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),q(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),q(`\\ne`,`\\neq`),q(`≠`,`\\neq`),q(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),q(`∉`,`\\notin`),q(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),q(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),q(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),q(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),q(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),q(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),q(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),q(`⟂`,`\\perp`),q(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),q(`∌`,`\\notni`),q(`⌜`,`\\ulcorner`),q(`⌝`,`\\urcorner`),q(`⌞`,`\\llcorner`),q(`⌟`,`\\lrcorner`),q(`©`,`\\copyright`),q(`®`,`\\textregistered`),q(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),q(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),q(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),q(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),q(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),q(`⋮`,`\\vdots`),q(`\\varGamma`,`\\mathit{\\Gamma}`),q(`\\varDelta`,`\\mathit{\\Delta}`),q(`\\varTheta`,`\\mathit{\\Theta}`),q(`\\varLambda`,`\\mathit{\\Lambda}`),q(`\\varXi`,`\\mathit{\\Xi}`),q(`\\varPi`,`\\mathit{\\Pi}`),q(`\\varSigma`,`\\mathit{\\Sigma}`),q(`\\varUpsilon`,`\\mathit{\\Upsilon}`),q(`\\varPhi`,`\\mathit{\\Phi}`),q(`\\varPsi`,`\\mathit{\\Psi}`),q(`\\varOmega`,`\\mathit{\\Omega}`),q(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),q(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),q(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),q(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),q(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),q(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),q(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),q(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var _o={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},vo=new Set([`bin`,`rel`]);q(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in _o?t=_o[n]:(n.slice(0,4)===`\\not`||n in N.math&&vo.has(N.math[n].group))&&(t=`\\dotsb`),t});var yo={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};q(`\\dotso`,function(e){return e.future().text in yo?`\\ldots\\,`:`\\ldots`}),q(`\\dotsc`,function(e){var t=e.future().text;return t in yo&&t!==`,`?`\\ldots\\,`:`\\ldots`}),q(`\\cdots`,function(e){return e.future().text in yo?`\\@cdots\\,`:`\\@cdots`}),q(`\\dotsb`,`\\cdots`),q(`\\dotsm`,`\\cdots`),q(`\\dotsi`,`\\!\\cdots`),q(`\\dotsx`,`\\ldots\\,`),q(`\\DOTSI`,`\\relax`),q(`\\DOTSB`,`\\relax`),q(`\\DOTSX`,`\\relax`),q(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),q(`\\,`,`\\tmspace+{3mu}{.1667em}`),q(`\\thinspace`,`\\,`),q(`\\>`,`\\mskip{4mu}`),q(`\\:`,`\\tmspace+{4mu}{.2222em}`),q(`\\medspace`,`\\:`),q(`\\;`,`\\tmspace+{5mu}{.2777em}`),q(`\\thickspace`,`\\;`),q(`\\!`,`\\tmspace-{3mu}{.1667em}`),q(`\\negthinspace`,`\\!`),q(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),q(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),q(`\\enspace`,`\\kern.5em `),q(`\\enskip`,`\\hskip.5em\\relax`),q(`\\quad`,`\\hskip1em\\relax`),q(`\\qquad`,`\\hskip2em\\relax`),q(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),q(`\\tag@paren`,`\\tag@literal{({#1})}`),q(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new T(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),q(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),q(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),q(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),q(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),q(`\\newline`,`\\\\\\relax`),q(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var bo=j(Ut[`Main-Regular`][84][1]-.7*Ut[`Main-Regular`][65][1]);q(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+bo+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),q(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+bo+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),q(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),q(`\\@hspace`,`\\hskip #1\\relax`),q(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),q(`\\ordinarycolon`,`:`),q(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),q(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),q(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),q(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),q(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),q(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),q(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),q(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),q(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),q(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),q(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),q(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),q(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),q(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),q(`∷`,`\\dblcolon`),q(`∹`,`\\eqcolon`),q(`≔`,`\\coloneqq`),q(`≕`,`\\eqqcolon`),q(`⩴`,`\\Coloneqq`),q(`\\ratio`,`\\vcentcolon`),q(`\\coloncolon`,`\\dblcolon`),q(`\\colonequals`,`\\coloneqq`),q(`\\coloncolonequals`,`\\Coloneqq`),q(`\\equalscolon`,`\\eqqcolon`),q(`\\equalscoloncolon`,`\\Eqqcolon`),q(`\\colonminus`,`\\coloneq`),q(`\\coloncolonminus`,`\\Coloneq`),q(`\\minuscolon`,`\\eqcolon`),q(`\\minuscoloncolon`,`\\Eqcolon`),q(`\\coloncolonapprox`,`\\Colonapprox`),q(`\\coloncolonsim`,`\\Colonsim`),q(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),q(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),q(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),q(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),q(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),q(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),q(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),q(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),q(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),q(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),q(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),q(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),q(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),q(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),q(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),q(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),q(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),q(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),q(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),q(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),q(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),q(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),q(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),q(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),q(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),q(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),q(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),q(`\\imath`,`\\html@mathml{\\@imath}{ı}`),q(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),q(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),q(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),q(`⟦`,`\\llbracket`),q(`⟧`,`\\rrbracket`),q(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),q(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),q(`↤`,`\\mapsfrom`),q(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),q(`⦃`,`\\lBrace`),q(`⦄`,`\\rBrace`),q(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),q(`⦵`,`\\minuso`),q(`\\darr`,`\\downarrow`),q(`\\dArr`,`\\Downarrow`),q(`\\Darr`,`\\Downarrow`),q(`\\lang`,`\\langle`),q(`\\rang`,`\\rangle`),q(`\\uarr`,`\\uparrow`),q(`\\uArr`,`\\Uparrow`),q(`\\Uarr`,`\\Uparrow`),q(`\\N`,`\\mathbb{N}`),q(`\\R`,`\\mathbb{R}`),q(`\\Z`,`\\mathbb{Z}`),q(`\\alef`,`\\aleph`),q(`\\alefsym`,`\\aleph`),q(`\\Alpha`,`\\mathrm{A}`),q(`\\Beta`,`\\mathrm{B}`),q(`\\bull`,`\\bullet`),q(`\\Chi`,`\\mathrm{X}`),q(`\\clubs`,`\\clubsuit`),q(`\\cnums`,`\\mathbb{C}`),q(`\\Complex`,`\\mathbb{C}`),q(`\\Dagger`,`\\ddagger`),q(`\\diamonds`,`\\diamondsuit`),q(`\\empty`,`\\emptyset`),q(`\\Epsilon`,`\\mathrm{E}`),q(`\\Eta`,`\\mathrm{H}`),q(`\\exist`,`\\exists`),q(`\\harr`,`\\leftrightarrow`),q(`\\hArr`,`\\Leftrightarrow`),q(`\\Harr`,`\\Leftrightarrow`),q(`\\hearts`,`\\heartsuit`),q(`\\image`,`\\Im`),q(`\\infin`,`\\infty`),q(`\\Iota`,`\\mathrm{I}`),q(`\\isin`,`\\in`),q(`\\Kappa`,`\\mathrm{K}`),q(`\\larr`,`\\leftarrow`),q(`\\lArr`,`\\Leftarrow`),q(`\\Larr`,`\\Leftarrow`),q(`\\lrarr`,`\\leftrightarrow`),q(`\\lrArr`,`\\Leftrightarrow`),q(`\\Lrarr`,`\\Leftrightarrow`),q(`\\Mu`,`\\mathrm{M}`),q(`\\natnums`,`\\mathbb{N}`),q(`\\Nu`,`\\mathrm{N}`),q(`\\Omicron`,`\\mathrm{O}`),q(`\\plusmn`,`\\pm`),q(`\\rarr`,`\\rightarrow`),q(`\\rArr`,`\\Rightarrow`),q(`\\Rarr`,`\\Rightarrow`),q(`\\real`,`\\Re`),q(`\\reals`,`\\mathbb{R}`),q(`\\Reals`,`\\mathbb{R}`),q(`\\Rho`,`\\mathrm{P}`),q(`\\sdot`,`\\cdot`),q(`\\sect`,`\\S`),q(`\\spades`,`\\spadesuit`),q(`\\sub`,`\\subset`),q(`\\sube`,`\\subseteq`),q(`\\supe`,`\\supseteq`),q(`\\Tau`,`\\mathrm{T}`),q(`\\thetasym`,`\\vartheta`),q(`\\weierp`,`\\wp`),q(`\\Zeta`,`\\mathrm{Z}`),q(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),q(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),q(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),q(`\\bra`,`\\mathinner{\\langle{#1}|}`),q(`\\ket`,`\\mathinner{|{#1}\\rangle}`),q(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),q(`\\Bra`,`\\left\\langle#1\\right|`),q(`\\Ket`,`\\left|#1\\right\\rangle`);var xo=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};q(`\\bra@ket`,xo(!1)),q(`\\bra@set`,xo(!0)),q(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),q(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),q(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),q(`\\angln`,`{\\angl n}`),q(`\\blue`,`\\textcolor{##6495ed}{#1}`),q(`\\orange`,`\\textcolor{##ffa500}{#1}`),q(`\\pink`,`\\textcolor{##ff00af}{#1}`),q(`\\red`,`\\textcolor{##df0030}{#1}`),q(`\\green`,`\\textcolor{##28ae7b}{#1}`),q(`\\gray`,`\\textcolor{gray}{#1}`),q(`\\purple`,`\\textcolor{##9d38bd}{#1}`),q(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),q(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),q(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),q(`\\blueD`,`\\textcolor{##11accd}{#1}`),q(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),q(`\\tealA`,`\\textcolor{##94fff5}{#1}`),q(`\\tealB`,`\\textcolor{##26edd5}{#1}`),q(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),q(`\\tealD`,`\\textcolor{##01a995}{#1}`),q(`\\tealE`,`\\textcolor{##208170}{#1}`),q(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),q(`\\greenB`,`\\textcolor{##8af281}{#1}`),q(`\\greenC`,`\\textcolor{##74cf70}{#1}`),q(`\\greenD`,`\\textcolor{##1fab54}{#1}`),q(`\\greenE`,`\\textcolor{##0d923f}{#1}`),q(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),q(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),q(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),q(`\\goldD`,`\\textcolor{##e07d10}{#1}`),q(`\\goldE`,`\\textcolor{##a75a05}{#1}`),q(`\\redA`,`\\textcolor{##fca9a9}{#1}`),q(`\\redB`,`\\textcolor{##ff8482}{#1}`),q(`\\redC`,`\\textcolor{##f9685d}{#1}`),q(`\\redD`,`\\textcolor{##e84d39}{#1}`),q(`\\redE`,`\\textcolor{##bc2612}{#1}`),q(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),q(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),q(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),q(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),q(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),q(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),q(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),q(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),q(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),q(`\\purpleE`,`\\textcolor{##543b78}{#1}`),q(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),q(`\\mintB`,`\\textcolor{##edf2df}{#1}`),q(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),q(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),q(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),q(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),q(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),q(`\\grayE`,`\\textcolor{##babec2}{#1}`),q(`\\grayF`,`\\textcolor{##888d93}{#1}`),q(`\\grayG`,`\\textcolor{##626569}{#1}`),q(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),q(`\\grayI`,`\\textcolor{##21242c}{#1}`),q(`\\kaBlue`,`\\textcolor{##314453}{#1}`),q(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var So={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Co=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new po(mo,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new fo(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new da(`EOF`,n.loc)),this.pushTokens(r),new da(``,ua.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new T(`Extra }`,i)}else if(i.text===`EOF`)throw new T(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new T(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new T(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new T(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new T(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new T(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new T(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new da(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new fo(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(no,e)||Object.prototype.hasOwnProperty.call(N.math,e)||Object.prototype.hasOwnProperty.call(N.text,e)||Object.prototype.hasOwnProperty.call(So,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(no,e)&&!no[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},wo=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,To=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Eo={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Do={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Oo=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new Co(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new T(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new da(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&no[i.text]&&no[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new T(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new T(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new T(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new T(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new T(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new T(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(To[i.text]){var s=wo.test(i.text),c=[];for(c.push(new da(To[i.text])),this.consume();;){var l=this.fetch().text;if(!To[l]||wo.test(l)!==s)break;c.unshift(new da(To[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=no[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new T(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new T(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new T(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=no[e];if(o&&o.handler)return o.handler(a,t,n);throw new T(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new T(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new T(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new T(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new T(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new T(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new T(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new T(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!Tt(i))throw new T(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:ua.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(So,r)){if(this.settings.throwOnError)throw new T(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:ua.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:ua.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:ua.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new T(`\\verb assertion failed --
518
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(Do,t[0])&&!N[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=Do[t[0]]+t.slice(1));var i=lo.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(N[this.mode][t]){this.settings.strict&&this.mode===`math`&&yn.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=N[this.mode][t].group,s=ua.range(e);a=ii(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(st(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:ua.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Eo[l])throw new T(`Unknown accent ' `+l+`'`,e);var u=Eo[l][this.mode]||Eo[l].text;if(!u)throw new T(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:ua.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Oo.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var ko=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Oo(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new T(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new da(`\\df@tag`)])}]}return r},Ao=function(e,t,n){t.textContent=``;var r=Po(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),Ao=function(){throw new T(`KaTeX doesn't work in quirks mode.`)});var jo=function(e,t){return Po(e,t).toMarkup()},Mo=function(e,t){return ko(e,new Ge(t))},No=function(e,t,n){if(n.throwOnError||!(e instanceof T))throw e;var r=U([`katex-error`],[new It(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Po=function(e,t){var n=new Ge(t);try{return Kr(ko(e,n),e,n)}catch(t){return No(t,e,n)}},Fo={version:`0.18.10`,render:Ao,renderToString:jo,ParseError:T,SETTINGS_SCHEMA:Ve,__parse:Mo,__renderToDomTree:Po,__renderToHTMLTree:function(e,t){var n=new Ge(t);try{return qr(ko(e,n),e,n)}catch(t){return No(t,e,n)}},__setFontMetrics:Kt,__defineSymbol:P,__defineFunction:W,__defineMacro:q,__domTree:{Span:Mt,Anchor:Nt,SymbolNode:It,SvgNode:Lt,PathNode:Rt,LineNode:zt}};function Io(e,t){this.v=e,this.k=t}function Lo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ro(e){if(Array.isArray(e))return e}function zo(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Bo(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
519
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vo(e,t){return Ro(e)||zo(e,t)||Ho(e,t)||Bo()}function Ho(e,t){if(e){if(typeof e==`string`)return Lo(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lo(e,t):void 0}}function Uo(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Io;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Uo.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Uo.prototype.next=function(e){return this._invoke(`next`,e)},Uo.prototype.throw=function(e){return this._invoke(`throw`,e)},Uo.prototype.return=function(e){return this._invoke(`return`,e)};var Wo=Object.entries,Go=Object.setPrototypeOf,Ko=Object.isFrozen,qo=Object.getPrototypeOf,Jo=Object.getOwnPropertyDescriptor,Yo=Object.freeze,Xo=Object.seal,Zo=Object.create,Qo=typeof Reflect<`u`&&Reflect,$o=Qo.apply,es=Qo.construct;Yo||=function(e){return e},Xo||=function(e){return e},$o||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},es||=function(e){return new e(...[...arguments].slice(1))};var ts=Ts(Array.prototype.forEach);Array.prototype.indexOf;var ns=Ts(Array.prototype.lastIndexOf),rs=Ts(Array.prototype.pop),is=Ts(Array.prototype.push),as=Ts(Array.prototype.slice),os=Ts(Array.prototype.splice),ss=Array.isArray,cs=Es(Set),ls=Ts(Set.prototype.add),us=Ts(Set.prototype.has),ds=Ts(String.prototype.toLowerCase),fs=Ts(String.prototype.toString),ps=Ts(String.prototype.match),ms=Ts(String.prototype.replace),hs=Ts(String.prototype.indexOf),gs=Ts(String.prototype.trim),_s=Ts(Number.prototype.toString),vs=Ts(Boolean.prototype.toString),ys=typeof BigInt>`u`?null:Ts(BigInt.prototype.toString),bs=typeof Symbol>`u`?null:Ts(Symbol.prototype.toString),xs=Ts(Object.prototype.hasOwnProperty),Ss=Ts(Object.prototype.toString),Cs=Ts(RegExp.prototype.test),ws=Es(TypeError);function Ts(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return $o(e,t,n)}}function Es(e){return function(){return es(e,[...arguments])}}function Ds(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ds;if(Go&&Go(e,null),!ss(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Ko(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Os(e){for(let t=0;t<e.length;t++)xs(e,t)||(e[t]=null);return e}function ks(e){let t=Zo(null);for(let r of Wo(e)){var n=Vo(r,2);let i=n[0],a=n[1];xs(e,i)&&(t[i]=ss(a)?Os(a):a&&typeof a==`object`&&a.constructor===Object?ks(a):a)}return t}function As(e){switch(typeof e){case`string`:return e;case`number`:return _s(e);case`boolean`:return vs(e);case`bigint`:return ys?ys(e):`0`;case`symbol`:return bs?bs(e):`Symbol()`;case`undefined`:return Ss(e);case`function`:case`object`:{if(e===null)return Ss(e);let t=e,n=js(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ss(e)}return Ss(e)}default:return Ss(e)}}function js(e,t){for(;e!==null;){let n=Jo(e,t);if(n){if(n.get)return Ts(n.get);if(typeof n.value==`function`)return Ts(n.value)}e=qo(e)}function n(){return null}return n}function Ms(e,t){for(;e!==null;){let n=Jo(e,t);if(n)return n.get?Ts(n.get):null;e=qo(e)}return null}function Ns(e){try{return Cs(e,``),!0}catch{return!1}}var Ps=Yo(`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`.split(`.`)),Fs=Yo(`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`.split(`.`)),Is=Yo([`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`]),Ls=Yo([`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`]),Rs=Yo(`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`.split(`.`)),zs=Yo([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Bs=Yo([`#text`]),Vs=Yo(`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`.split(`.`)),Hs=Yo(`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`.split(`.`)),Us=Yo(`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`.split(`.`)),Ws=Yo([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Gs=Xo(/{{[\w\W]*|^[\w\W]*}}/g),Ks=Xo(/<%[\w\W]*|^[\w\W]*%>/g),qs=Xo(/\${[\w\W]*/g),Js=Xo(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ys=Xo(/^aria-[\-\w]+$/),Xs=Xo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zs=Xo(/^(?:\w+script|data):/i),Qs=Xo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$s=Xo(/^html$/i),ec=Xo(/^[a-z][.\w]*(-[.\w]+)+$/i),tc=Xo(/<[/\w!]/g),nc=Xo(/<[/\w]/g),rc=Xo(/<\/no(script|embed|frames)/i),ic=Xo(/\/>/i),ac={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},oc=Yo(Ds({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),sc=function(){return typeof window>`u`?null:window},cc=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},lc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},uc=function(e,t,n,r){return xs(e,t)&&ss(e[t])?Ds(r.base?ks(r.base):{},e[t],r.transform):n},dc=function(e,t,n){let r=xs(e,t)?e[t]:void 0;return r&&typeof r==`object`?ks(r):n()};function fc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sc(),t=e=>fc(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==ac.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=js(d,`cloneNode`),p=js(d,`remove`),m=js(d,`removeAttributeNode`),h=js(d,`nextSibling`),g=js(d,`childNodes`),_=js(d,`parentNode`),v=js(d,`shadowRoot`),y=js(d,`attributes`),ee=o&&o.prototype?js(o.prototype,`nodeType`):null,b=o&&o.prototype?js(o.prototype,`nodeName`):null,x=o&&o.prototype?js(o.prototype,`ownerDocument`):null,S=function(e){return ee?ee(e):e.nodeType},te=function(e){return b?b(e):e.nodeName},ne=Ms(d,`namespaceURI`),C=function(e){return ne?ne(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let re,ie=``,ae,oe=!1,se=0,ce=function(){if(se>0)throw ws(`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.`)},le=function(e){ce(),se++;try{return re.createHTML(e)}finally{se--}},ue=function(e){ce(),se++;try{return re.createScriptURL(e)}finally{se--}},de=function(){return oe||=(ae=cc(u,i),!0),ae},fe=n,pe=fe.implementation,me=fe.createNodeIterator,he=fe.createDocumentFragment,ge=fe.getElementsByTagName,_e=r.importNode,ve=lc();t.isSupported=typeof Wo==`function`&&typeof _==`function`&&pe&&pe.createHTMLDocument!==void 0;let ye=Gs,be=Ks,xe=qs,Se=Js,Ce=Ys,we=Zs,w=Qs,Te=ec,Ee=Xs,De=null,Oe=Ds({},[...Ps,...Fs,...Is,...Rs,...Bs]),ke=null,Ae=Ds({},[...Vs,...Hs,...Us,...Ws]),je=Object.seal(Zo(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}})),T=null,Me=null,Ne=Object.seal(Zo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Pe=!0,Fe=!0,Ie=!1,Le=!0,Re=!1,ze=!0,Be=!1,Ve=!1,He=null,Ue=null,We=!1,Ge=!1,Ke=!1,qe=!1,Je=!0,Ye=!1,E=`user-content-`,D=!0,O=!1,k=null,Xe={},Ze=null,Qe=Ds({},`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`.split(`.`)),$e=null,et=Ds({},[`audio`,`video`,`img`,`source`,`image`,`track`]),tt=null,nt=Ds({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),rt=`http://www.w3.org/1998/Math/MathML`,A=`http://www.w3.org/2000/svg`,it=`http://www.w3.org/1999/xhtml`,at=it,ot=!1,st=null,ct=Ds({},[rt,A,it],fs),lt=Yo([`mi`,`mo`,`mn`,`ms`,`mtext`]),ut=Ds({},lt),dt=Yo([`annotation-xml`]),ft=Ds({},dt),pt=Ds({},[`title`,`style`,`font`,`a`,`script`]),mt=null,ht=[`application/xhtml+xml`,`text/html`],gt=null,_t=null,vt=n.createElement(`form`),yt=function(e){return e instanceof RegExp||e instanceof Function},bt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t&&_t===e)return;(!e||typeof e!=`object`)&&(e={}),e=ks(e),mt=ht.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,gt=mt===`application/xhtml+xml`?fs:ds,De=uc(e,`ALLOWED_TAGS`,Oe,{transform:gt}),ke=uc(e,`ALLOWED_ATTR`,Ae,{transform:gt}),st=uc(e,`ALLOWED_NAMESPACES`,ct,{transform:fs}),tt=uc(e,`ADD_URI_SAFE_ATTR`,nt,{transform:gt,base:nt}),$e=uc(e,`ADD_DATA_URI_TAGS`,et,{transform:gt,base:et}),Ze=uc(e,`FORBID_CONTENTS`,Qe,{transform:gt}),T=uc(e,`FORBID_TAGS`,ks({}),{transform:gt}),Me=uc(e,`FORBID_ATTR`,ks({}),{transform:gt}),Xe=xs(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ks(e.USE_PROFILES):e.USE_PROFILES:!1,Pe=e.ALLOW_ARIA_ATTR!==!1,Fe=e.ALLOW_DATA_ATTR!==!1,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=e.SAFE_FOR_TEMPLATES||!1,ze=e.SAFE_FOR_XML!==!1,Be=e.WHOLE_DOCUMENT||!1,Ge=e.RETURN_DOM||!1,Ke=e.RETURN_DOM_FRAGMENT||!1,qe=e.RETURN_TRUSTED_TYPE||!1,We=e.FORCE_BODY||!1,Je=e.SANITIZE_DOM!==!1,Ye=e.SANITIZE_NAMED_PROPS||!1,D=e.KEEP_CONTENT!==!1,O=e.IN_PLACE||!1,Ee=Ns(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Xs,at=typeof e.NAMESPACE==`string`?e.NAMESPACE:it,ut=dc(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Ds({},lt)),ft=dc(e,`HTML_INTEGRATION_POINTS`,()=>Ds({},dt));let t=dc(e,`CUSTOM_ELEMENT_HANDLING`,()=>Zo(null));if(je=Zo(null),xs(t,`tagNameCheck`)&&yt(t.tagNameCheck)&&(je.tagNameCheck=t.tagNameCheck),xs(t,`attributeNameCheck`)&&yt(t.attributeNameCheck)&&(je.attributeNameCheck=t.attributeNameCheck),xs(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(je.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Xo(je),Re&&(Fe=!1),Ke&&(Ge=!0),Xe&&(De=Ds({},Bs),ke=Zo(null),Xe.html===!0&&(Ds(De,Ps),Ds(ke,Vs)),Xe.svg===!0&&(Ds(De,Fs),Ds(ke,Hs),Ds(ke,Ws)),Xe.svgFilters===!0&&(Ds(De,Is),Ds(ke,Hs),Ds(ke,Ws)),Xe.mathMl===!0&&(Ds(De,Rs),Ds(ke,Us),Ds(ke,Ws))),Ne.tagCheck=null,Ne.attributeCheck=null,xs(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ne.tagCheck=e.ADD_TAGS:ss(e.ADD_TAGS)&&(De===Oe&&(De=ks(De)),Ds(De,e.ADD_TAGS,gt))),xs(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ne.attributeCheck=e.ADD_ATTR:ss(e.ADD_ATTR)&&(ke===Ae&&(ke=ks(ke)),Ds(ke,e.ADD_ATTR,gt))),xs(e,`ADD_FORBID_CONTENTS`)&&ss(e.ADD_FORBID_CONTENTS)&&(Ze===Qe&&(Ze=ks(Ze)),Ds(Ze,e.ADD_FORBID_CONTENTS,gt)),D&&(De[`#text`]=!0),Be&&Ds(De,[`html`,`head`,`body`]),De.table&&(Ds(De,[`tbody`]),delete T.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ws(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ws(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=re;re=e.TRUSTED_TYPES_POLICY;try{ie=le(``)}catch(e){throw re=t,e}}else e.TRUSTED_TYPES_POLICY===null?(re=void 0,ie=``):(re===void 0&&(re=de()),re&&typeof ie==`string`&&(ie=le(``)));Yo&&Yo(e),_t=e},xt=Ds({},[...Fs,...Is,...Ls]),St=Ds({},[...Rs,...zs]),Ct=function(e,t,n){return t.namespaceURI===it?e===`svg`:t.namespaceURI===rt?e===`svg`&&(n===`annotation-xml`||ut[n]):!!xt[e]},wt=function(e,t,n){return t.namespaceURI===it?e===`math`:t.namespaceURI===A?e===`math`&&ft[n]:!!St[e]},Tt=function(e,t,n){return t.namespaceURI===A&&!ft[n]||t.namespaceURI===rt&&!ut[n]?!1:!St[e]&&(pt[e]||!xt[e])},Et=function(e){let t=C(e),n=ds(te(e)),r=_(e),i,a;return r&&S(r)===ac.element?(i={namespaceURI:C(r)},a=ds(te(r))):(i={namespaceURI:at},a=`template`),st[t]?t===A?Ct(n,i,a):t===rt?wt(n,i,a):t===it?Tt(n,i,a):!!(mt===`application/xhtml+xml`&&st[t]):!1},j=function(e){is(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw ws(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Dt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Ot=function(e){jt(e);let t=g(e);t&&ts(as(t),e=>{try{p(e)}catch{}});let n=S(e)===ac.element?y(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&Dt(e,r,i)}},kt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}is(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Ge||Ke)try{j(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},M=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||ke[gt(i)]||Dt(e,r,i)}},At=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&S(e)===ac.element){let t=v(e);Kt(t)&&r.push(t)}let i=g(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},jt=function(e){At(e,e=>{S(e)===ac.element&&M(e)})},Mt=function(e){let t=[];return At(e,e=>{t.push(e)},!0),t},Nt=function(e,t){let n=cs();ts(Mt(e),e=>{S(e)===ac.element&&ls(n,e)}),ts(t,e=>{S(e)===ac.element&&!us(n,e)&&M(e)})},Pt=function(e,n){let r=!1;return ts(t.removed,t=>{t.element&&(r||=t.element===e,jt(t.element))}),Nt(e,n),r},Ft=function(e,t){let n=k,r=null,i=()=>(r||(r=cs(),ts(t,e=>{ls(r,e)})),r);for(let t=0;;t++){let r=Mt(e),a=[e],o=!1;if(ts(r,e=>{S(e)===ac.documentFragment?is(a,e):!o&&!us(n,e)&&(o=us(i(),e))}),!o)return;if(t>=8)throw ws(`the tree kept changing during in-place sanitization; refusing to return it`);ts(a,(t,n)=>{It(t,n>0,e,i())})}},It=function(e,t,n,r){let i=Vt(e),a;for(;a=i.nextNode();)us(r,a)&&!us(k,a)&&(t&&Jt(ve.uponSanitizeShadowNode,a,null),L(a,n),en(a,n),Kt(a.content)&&tn(a.content))},Lt=function(e){k&&ls(k,e)},Rt=function(e,t){return ze?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},zt=function(e){ze&&At(e,e=>{let t=S(e);if(t===ac.processingInstruction||t===ac.comment&&Cs(nc,e.data)){try{p(e)}catch{}return!1}if(t===ac.element){let t=e,n=gt(te(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Rt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},Bt=function(e){let t=null,r=null;if(We)e=`<remove></remove>`+e;else{let t=ps(e,/^[\r\n\t ]+/);r=t&&t[0]}mt===`application/xhtml+xml`&&at===it&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=re?le(e):e;if(at===it)try{t=new l().parseFromString(i,mt)}catch{}if(!t||!t.documentElement){t=pe.createDocument(at,`template`,null);try{t.documentElement.innerHTML=ot?ie:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),at===it?ge.call(t,Be?`html`:`body`)[0]:Be?t.documentElement:a},Vt=function(e){let t=x?x(e):e.ownerDocument;return me.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ht=function(e){return e=ms(e,ye,` `),e=ms(e,be,` `),e=ms(e,xe,` `),e},Ut=function(e){Wt(e);let t=e.querySelectorAll?.call(e,`template`);t&&ts(t,e=>{Kt(e.content)&&Ut(e.content)})},Wt=function(e){e.normalize();let t=x?x(e):e.ownerDocument,n=me.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ht(r.data),r=n.nextNode()},Gt=function(e){let t=b?b(e):null;return typeof t!=`string`||gt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==ee(e)||e.childNodes!==g(e)},Kt=function(e){if(!ee||typeof e!=`object`||!e)return!1;try{return ee(e)===ac.documentFragment}catch{return!1}},qt=function(e){if(!ee||typeof e!=`object`||!e)return!1;try{return typeof ee(e)==`number`}catch{return!1}};function Jt(e,n,r){e.length!==0&&ts(e,e=>{e.call(t,n,r,_t)})}let Yt=function(e,t){return!!(ze&&e.hasChildNodes()&&!qt(e.firstElementChild)&&Cs(tc,e.textContent)&&Cs(tc,e.innerHTML)||ze&&oc[t]&&S(e)===ac.element&&C(e)===it&&(qt(e.firstElementChild)||typeof e.textContent==`string`&&Cs(tc,e.textContent))||e.nodeType===ac.processingInstruction||ze&&e.nodeType===ac.comment&&Cs(nc,e.data))},N=function(e,t){return e instanceof RegExp?Cs(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},P=function(e,t,n){if(!T[t]&&z(t)&&N(je.tagNameCheck,t))return!1;if(D&&!Ze[t]&&!Ze[ds(t)]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return j(e),!0},F=function(e,t,n,r){return e.length===0?t:t===n||t===r?ks(t):t},I=function(e,t){return e===t||_(e)!==null?!1:(O&&jt(e),!0)},L=function(e,n){if(Lt(e),Jt(ve.beforeSanitizeElements,e,null),I(e,n))return!0;if(Gt(e))return j(e),!0;let r=gt(te(e));if(De=F(ve.uponSanitizeElement,De,Oe,He),Jt(ve.uponSanitizeElement,e,{tagName:r,allowedTags:De}),I(e,n))return!0;if(Yt(e,r))return j(e),!0;if(T[r]||!(Ne.tagCheck instanceof Function&&Ne.tagCheck(r))&&!De[r]){let t=P(e,r,n);return t===!1&&(Jt(ve.afterSanitizeElements,e,null),I(e,n))?!0:t}if(S(e)===ac.element&&!Et(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Cs(rc,e.innerHTML))return j(e),!0;if(Re&&e.nodeType===ac.text){let n=Ht(e.textContent);e.textContent!==n&&(is(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Jt(ve.afterSanitizeElements,e,null),I(e,n)},R=function(e,t,r){if(Me[t]||Rt(t,e)||Je&&(t===`id`||t===`name`)&&(r in n||r in vt))return!1;let i=ke[t]||Ne.attributeCheck instanceof Function&&Ne.attributeCheck(t,e);return Fe&&Cs(Se,t)||Pe&&Cs(Ce,t)?!0:i?tt[t]||Cs(Ee,ms(r,w,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&hs(r,`data:`)===0&&$e[e]||Ie&&!Cs(we,ms(r,w,``))?!0:!r:z(e)&&N(je.tagNameCheck,e)&&N(je.attributeNameCheck,t,e)||t===`is`&&je.allowCustomizedBuiltInElements&&N(je.tagNameCheck,r)},Xt=Ds({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),z=function(e){return!Xt[ds(e)]&&Cs(Te,e)},Zt=function(e,t,n,r){if(re&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return le(r);case`TrustedScriptURL`:return ue(r)}return r},Qt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Gt(e)||(j(e),!1)}catch{return kt(t,e),!1}},$t=function(e,t){return ze&&Cs(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:ds(e)===`attributename`&&ps(t,`href`)!==null},en=function(e,n){if(Jt(ve.beforeSanitizeAttributes,e,null),I(e,n))return;let r=e.attributes;if(!r||Gt(e))return;ke=F(ve.uponSanitizeAttribute,ke,Ae,Ue);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ke,forceKeepAttr:void 0},a=r.length,o=gt(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=gt(s),d=l,f=s===`value`?d:gs(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Jt(ve.uponSanitizeAttribute,e,i),f=i.attrValue,Ye&&(u===`id`||u===`name`)&&hs(f,E)!==0&&(kt(s,e,n),f=E+f,p=!0),$t(s,f)?kt(s,e,n):i.forceKeepAttr||(i.keepAttr?!Le&&Cs(ic,f)?kt(s,e,n):(Re&&(f=Ht(f)),R(o,u,f)?(f=Zt(o,u,c,f),f!==d&&Qt(e,s,c,f)&&p&&rs(t.removed)):kt(s,e,n)):kt(s,e,n))}Jt(ve.afterSanitizeAttributes,e,null),I(e,n)},tn=function(e){let t=null,n=Vt(e);for(Jt(ve.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Jt(ve.uponSanitizeShadowNode,t,null),L(t,e),en(t,e),Kt(t.content)&&tn(t.content),S(t)===ac.element){let e=v(t);Kt(e)&&(nn(e),tn(e))}Re&&Wt(e),Jt(ve.afterSanitizeShadowDOM,e,null)},nn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){tn(e.shadow);continue}let n=e.node,r=S(n)===ac.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&gt(e)===`template`){let e=n.content;Kt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Kt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(ot=!e,ot&&(e=`<!-->`),typeof e!=`string`&&!qt(e)&&(e=As(e),typeof e!=`string`))throw ws(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ve?(De=He,ke=Ue):bt(n),(ve.uponSanitizeElement.length>0||ve.uponSanitizeAttribute.length>0)&&(De=ks(De)),ve.uponSanitizeAttribute.length>0&&(ke=ks(ke)),t.removed=[];let c=O&&typeof e!=`string`&&qt(e),l=[],u=k;if(c){zt(e);let t=te(e);if(typeof t==`string`){let n=gt(t);if(!De[n]||T[n])throw Ot(e),ws(`root node is forbidden and cannot be sanitized in-place`)}if(Gt(e))throw Ot(e),ws(`root node is clobbered and cannot be sanitized in-place`);l=Mt(e),k=cs()}else if(qt(e))i=Bt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===ac.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),nn(i);else{if(!Ge&&!Re&&!Be&&e.indexOf(`<`)===-1)return re&&qe?le(e):e;if(i=Bt(e),!i)return Ge?null:qe?ie:``}i&&We&&j(i.firstChild);let d=c?e:i;try{c&&nn(e);let t=Vt(d);for(;o=t.nextNode();)L(o,d),en(o,d),Kt(o.content)&&tn(o.content);c&&Ft(e,l)}catch(t){throw c&&(Ot(e),Pt(e,l)),t}finally{k=u}if(c){if(Pt(e,l))throw ws(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Re&&Ut(e),e}if(Ge){if(Re&&Ut(i),Ke)for(s=he.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(ke.shadowroot||ke.shadowrootmode)&&(s=_e.call(r,s,!0)),s}let f=Be?i.outerHTML:i.innerHTML;return Be&&De[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Cs($s,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
520
+ `+f),Re&&(f=Ht(f)),re&&qe?le(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bt(e),Ve=!0,He=De,Ue=ke},t.clearConfig=function(){_t=null,Ve=!1,He=null,Ue=null,re=ae,ie=``},t.isValidAttribute=function(e,t,n){_t||bt({});let r=gt(e),i=gt(t);return typeof n==`string`&&($t(t,n)||!Le&&Cs(ic,n))?!1:R(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&xs(ve,e)&&is(ve[e],t)},t.removeHook=function(e,t){if(xs(ve,e)){if(t!==void 0){let n=ns(ve[e],t);return n===-1?void 0:os(ve[e],n,1)[0]}return rs(ve[e])}},t.removeHooks=function(e){xs(ve,e)&&(ve[e]=[])},t.removeAllHooks=function(){ve=lc()},t}var pc=fc(),mc=new Ee({html:!1,linkify:!0,typographer:!0}).use(je.default,{engine:Fo,delimiters:[`dollars`,`brackets`],katexOptions:{throwOnError:!1}});mc.renderer.rules.table_open=()=>`<div class="table-wrap"><table>`,mc.renderer.rules.table_close=()=>`</table></div>`;var hc=mc.renderer.rules.link_open??((e,t,n,r,i)=>i.renderToken(e,t,n));mc.renderer.rules.link_open=(e,t,n,r,i)=>{let a=e[t],o=a.attrGet(`href`)??``;return/^https?:/i.test(o)?(a.attrSet(`target`,`_blank`),a.attrSet(`rel`,`noopener`)):o.startsWith(`/`)&&/\.md(#.*)?$/.test(o)&&a.attrSet(`href`,`#/n`+o.replace(/\.md(#.*)?$/,``)),hc(e,t,n,r,i)};function gc(e){return pc.sanitize(mc.render(e||``),{ADD_ATTR:[`target`]})}var _c=1500,vc=e=>`isorite.draft.${e}`;function yc(e,t){try{if(t===void 0)return JSON.parse(localStorage.getItem(vc(e))??`null`);t?localStorage.setItem(vc(e),JSON.stringify(t)):localStorage.removeItem(vc(e))}catch{}return null}var bc=e=>typeof e==`string`?e:e==null?``:String(e),xc=class{id;#e=d(`loading`);get loaded(){return a(this.#e)}set loaded(e){_(this.#e,e,!0)}#t=d(`saved`);get saving(){return a(this.#t)}set saving(e){_(this.#t,e,!0)}#n=d(``);get message(){return a(this.#n)}set message(e){_(this.#n,e,!0)}#r=d(``);get text(){return a(this.#r)}set text(e){_(this.#r,e,!0)}#i=d(void 0);get theirs(){return a(this.#i)}set theirs(e){_(this.#i,e)}#a=d(0);get revision(){return a(this.#a)}set revision(e){_(this.#a,e,!0)}base=``;saved=``;timer=null;inFlight=null;stop=null;constructor(e){this.id=e}#o=x(()=>{try{return _e(this.text)[0]??{}}catch{return null}});get meta(){return a(this.#o)}set meta(e){_(this.#o,e)}#s=x(()=>{let e=this.meta??{};return{title:bc(e.title),type:bc(e.type),description:bc(e.description),tags:Array.isArray(e.tags)?e.tags.map(String).join(`, `):bc(e.tags)}});get fields(){return a(this.#s)}set fields(e){_(this.#s,e)}#c=x(()=>{try{return Te(this.text)[2]}catch{return this.text}});get body(){return a(this.#c)}set body(e){_(this.#c,e)}async open(){try{let e=await he.api.readNote(this.id),t=yc(this.id);this.take(e),t&&t.text!==e.text&&(this.text=t.text,t.base===e.version?this.changed():(this.theirs=e,this.saving=`conflict`,yc(this.id,t))),this.loaded=`ready`,this.stop=he.on(e=>this.hear(e))}catch(e){this.loaded=e instanceof pe&&e.status===404?`missing`:`error`,this.message=e.message}}async close(){this.stop?.(),await this.save()}adopt(e){this.take(e)}async restore(e){await this.settle(),this.take(await he.api.restore(this.id,e,this.base))}async move(e){await this.settle();let t=await he.api.moveNote(this.id,e,this.base);return this.stop?.(),t.id}async remove(){await this.settle(),await he.api.deleteNote(this.id,this.base),this.stop?.()}async settle(){if(this.saving!==`saved`&&await this.save(),this.saving!==`saved`)throw Error(this.message||`the note could not be saved first`)}take(e){this.text=this.saved=e.text,this.base=e.version,this.theirs=void 0,this.saving=`saved`,this.message=``,yc(this.id,null),this.revision++}setText(e){e!==this.text&&(this.text=e,this.changed())}setBody(e){e!==this.body&&this.setText(ge(this.text,{},e))}setFields(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.trim();t[n]=n===`tags`?e?e.split(`,`).map(e=>e.trim()).filter(Boolean):null:e||null}this.setMeta(t)}setMeta(e){try{this.setText(ge(this.text,e,null))}catch{}}changed(){yc(this.id,{base:this.base,text:this.text}),this.saving!==`conflict`&&(this.saving=`unsaved`,this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.save()},_c))}save(){return this.timer&&=(clearTimeout(this.timer),null),this.inFlight=(this.inFlight??Promise.resolve()).then(()=>this.send()),this.inFlight}async send(){if(this.loaded!==`ready`||this.saving===`conflict`||this.text===this.saved)return;let e=this.text;this.saving=`saving`;try{let t=await he.api.saveNote(this.id,{base:this.base,text:e});this.base=t.version,this.saved=e,this.message=``,this.text===e?(this.saving=`saved`,yc(this.id,null)):this.changed()}catch(t){if(t instanceof pe&&t.status===409&&t.current!==void 0){if(t.current?.text===e)return this.take(t.current);this.theirs=t.current,this.saving=`conflict`}else this.saving=`failed`,this.message=t.message,this.timer=setTimeout(()=>{this.save()},5e3)}}hear(e){e.type===`note-changed`&&e.id===this.id&&e.version!==this.base&&e.version!==ve(this.text)&&this.saving===`saved`&&he.api.readNote(this.id).then(e=>{this.saving===`saved`&&e.version!==this.base&&this.take(e)},()=>void 0)}keepMine(){let e=this.theirs;return e===void 0?Promise.resolve():(this.theirs=void 0,this.saving=`unsaved`,e===null?he.api.createNote(this.id,this.text).then(e=>this.take(e),e=>{this.saving=`failed`,this.message=e.message}):(this.base=e.version,this.saved=e.text,this.save()))}keepTheirs(){this.theirs&&this.take(this.theirs)}},Sc=[],Cc=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?Cc:Sc).push(n+=e[t])})();function wc(e){if(e<768)return!1;for(let t=0,n=Sc.length;;){let r=t+n>>1;if(e<Sc[r])n=r;else if(e>=Cc[r])t=r+1;else return!0;if(t==n)return!1}}function Tc(e){return e>=127462&&e<=127487}var Ec=8205;function Dc(e,t,n=!0,r=!0){return(n?Oc:kc)(e,t,r)}function Oc(e,t,n){if(t==e.length)return t;t&&jc(e.charCodeAt(t))&&Mc(e.charCodeAt(t-1))&&t--;let r=Ac(e,t);for(t+=Nc(r);t<e.length;){let i=Ac(e,t);if(r==Ec||i==Ec||n&&wc(i))t+=Nc(i),r=i;else if(Tc(i)){let n=0,r=t-2;for(;r>=0&&Tc(Ac(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function kc(e,t,n){for(;t>1;){let r=Oc(e,t-2,n);if(r<t)return r;t--}return 0}function Ac(e,t){let n=e.charCodeAt(t);if(!Mc(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return jc(r)?(n-55296<<10)+(r-56320)+65536:n}function jc(e){return e>=56320&&e<57344}function Mc(e){return e>=55296&&e<56320}function Nc(e){return e<65536?1:2}var Pc=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Wc(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Ic.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Wc(this,e,t);let n=[];return this.decompose(e,t,n,0),Ic.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Bc(this),i=new Bc(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new Bc(this,e)}iterRange(e,t=this.length){return new Vc(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Hc(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Fc(t):Ic.from(Fc.split(t,[]))}},Fc=class e extends Pc{constructor(e,t=Lc(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Uc(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(zc(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=Rc(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Wc(this,t,n);let i=Rc(this.text,Rc(r.text,zc(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Ic.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
521
+ `){[e,t]=Wc(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},Ic=class e extends Pc{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=Wc(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
522
+ `){[e,t]=Wc(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Fc(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Fc&&c&&(n=u[u.length-1])instanceof Fc&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Fc(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};Pc.empty=new Fc([``],0);function Lc(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Rc(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function zc(e,t,n){return Rc(e,[``],t,n)}var Bc=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Fc?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Fc?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
523
+ `,this;e--}else if(r instanceof Fc){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Fc?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Vc=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new Bc(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Hc=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(Pc.prototype[Symbol.iterator]=function(){return this.iter()},Bc.prototype[Symbol.iterator]=Vc.prototype[Symbol.iterator]=Hc.prototype[Symbol.iterator]=function(){return this});var Uc=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Wc(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Gc(e,t,n=!0,r=!0){return Dc(e,t,n,r)}function Kc(e){return e>=56320&&e<57344}function qc(e){return e>=55296&&e<56320}function Jc(e,t){let n=e.charCodeAt(t);if(!qc(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Kc(r)?(n-55296<<10)+(r-56320)+65536:n}function Yc(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function Xc(e){return e<65536?1:2}var Zc=/\r\n?|\n/,Qc=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(Qc||={}),$c=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){rl(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:al(this,e)}mapDesc(e,t=!1){return e.empty?this:il(this,e,t)}mapPos(e,t=-1,n=Qc.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=Qc.Simple&&c>=e&&(n==Qc.TrackDel&&r<e&&c>e||n==Qc.TrackBefore&&r<e||n==Qc.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},el=class e extends $c{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return rl(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return il(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(Pc.empty);r.push(a?t.slice(i,i+a):Pc.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:al(this,e,!0)}map(e,t=!1){return e.empty?this:il(this,e,t,!0)}iterChanges(e,t=!1){rl(this,e,t)}get desc(){return $c.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new ol(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);tl(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;tl(n,e,t),t>0&&nl(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);tl(n,e,-1),tl(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:$c.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&tl(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?Pc.of(l.split(r||Zc)):l:Pc.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&tl(i,e-o,-1),tl(i,s-e,d),nl(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(Pc.empty);r[e]=Pc.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function tl(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function nl(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Pc.empty);e.push(n)}}function rl(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=Pc.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function il(e,t,n,r=!1){let i=[],a=r?[]:null,o=new ol(e),s=new ol(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);tl(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(tl(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(tl(i,0,o.ins),a&&nl(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;tl(i,t,e<o.i?o.ins:0),a&&e<o.i&&nl(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?el.createSet(i,a):$c.create(i);else throw Error(`Mismatched change set lengths`)}function al(e,t,n=!1){let r=[],i=n?[]:null,a=new ol(e),o=new ol(t);for(let e=!1;;)if(a.done&&o.done)return i?el.createSet(r,i):$c.create(r);else if(a.ins==0)tl(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)tl(r,0,o.ins,e),i&&nl(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;tl(r,t,n,e),i&&n&&nl(i,r,o.text)}else o.ins==-1?(tl(r,a.off?0:a.len,t,e),i&&nl(i,r,a.textBit(t))):(tl(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&nl(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var ol=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Pc.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Pc.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},sl=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return J.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return J.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return J.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},J=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>sl.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return sl.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?sl.create(t,e,a|32,n):sl.create(e,t,a,n)}static undirectionalRange(e,t){return sl.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function cl(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var ll=0,ul=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=ll++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:dl),!!t.static,t.enables)}of(e){return new fl([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new fl(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new fl(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function dl(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var fl=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=ll++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||ml(e,c)){let r=t(e);if(a?!pl(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Dl(o,c);if(this.dependencies.every(t=>t instanceof ul?o.facet(t)===e.facet(t):t instanceof _l?o.field(t,!1)==e.field(t,!1):!0)||(a?pl(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function pl(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function ml(e,t){let n=!1;for(let r of t)El(e,r)&1&&(n=!0);return n}function hl(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Dl(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)El(e,t);return e.values[o]=s(e),1},update(e,n){if(!ml(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=ml(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&dl(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var gl=ul.define({static:!0}),_l=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(ll++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(gl).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(gl),i=n.facet(gl),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,gl.of({field:this,create:e})]}get extension(){return this}},vl={lowest:4,low:3,default:2,high:1,highest:0};function yl(e){return t=>new xl(t,e)}var bl={highest:yl(vl.highest),high:yl(vl.high),default:yl(vl.default),low:yl(vl.low),lowest:yl(vl.lowest)},xl=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Sl=class e{of(e){return new Cl(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Cl=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},wl=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Tl(t,n,o))e instanceof _l?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,dl(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>hl(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Tl(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Cl&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Cl){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof xl)a(e.inner,e.prec);else if(e instanceof _l)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof fl)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,vl.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,vl.default),r.reduce((e,t)=>e.concat(t))}function El(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Dl(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Ol=ul.define(),kl=ul.define({combine:e=>e.some(e=>e),static:!0}),Al=ul.define({combine:e=>e.length?e[0]:void 0,static:!0}),jl=ul.define(),Ml=ul.define(),Nl=ul.define(),Pl=ul.define({combine:e=>e.length?e[0]:!1}),Fl=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Il}},Il=class{of(e){return new Fl(this,e)}},Ll=class{constructor(e){this.map=e}of(e){return new Rl(this,e)}},Rl=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Ll(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Rl.reconfigure=Rl.define(),Rl.appendConfig=Rl.define();var zl=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&cl(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};zl.time=Fl.define(),zl.userEvent=Fl.define(),zl.addToHistory=Fl.define(),zl.remote=Fl.define();function Bl(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Vl(e,t,n){let r,i,a;return n?(r=t.changes,i=el.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Rl.mapEffects(e.effects,r).concat(Rl.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Hl(e,t,n){let r=t.selection,i=ql(t.annotations);return t.userEvent&&(i=i.concat(zl.userEvent.of(t.userEvent))),{changes:t.changes instanceof el?t.changes:el.of(t.changes||[],n,e.facet(Al)),selection:r&&(r instanceof J?r:J.single(r.anchor,r.head)),effects:ql(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Ul(e,t,n){let r=Hl(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Vl(r,Hl(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=zl.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Gl(n?Wl(i):i)}function Wl(e){let t=e.startState,n=!0;for(let r of t.facet(jl)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Bl(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=el.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=zl.create(t,r,e.selection&&e.selection.map(i),Rl.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Ml);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof zl?i:Array.isArray(i)&&i.length==1&&i[0]instanceof zl?i[0]:Ul(t,ql(i),!1)}return e}function Gl(e){let t=e.startState,n=t.facet(Nl),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Vl(r,Hl(t,a,e.changes.newLength),!0))}return r==e?e:zl.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Kl=[];function ql(e){return e==null?Kl:Array.isArray(e)?e:[e]}var Jl=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(Jl||={}),Yl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Xl;try{Xl=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function Zl(e){if(Xl)return Xl.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||Yl.test(n)))return!0}return!1}function Ql(e){return t=>{if(!/\S/.test(t))return Jl.Space;if(Zl(t))return Jl.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Jl.Word;return Jl.Other}}var $l=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)El(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`)}else return El(this,n),Dl(this,n)}update(...e){return Ul(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Sl.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Rl.reconfigure)?(n=null,r=e.value):e.is(Rl.appendConfig)&&(n=null,r=ql(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=wl.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(kl)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:J.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=ql(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Rl.mapEffects(a,c).concat(Rl.mapEffects(ql(o.effects),l))}return{changes:r,selection:J.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof el?t:el.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return Pc.of(t.split(this.facet(e.lineSeparator)||Zc))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(El(this,t),Dl(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof _l&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:J.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=wl.resolve(t.extensions||[],new Map),r=t.doc instanceof Pc?t.doc:Pc.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||Zc)),i=t.selection?t.selection instanceof J?t.selection:J.single(t.selection.anchor,t.selection.head):J.single(0);return cl(i,r.length),n.staticFacet(kl)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
524
+ `}get readOnly(){return this.facet(Pl)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Ol))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return Ql(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=Gc(t,a,!1);if(i(t.slice(e,a))!=Jl.Word)break;a=e}for(;o<r;){let e=Gc(t,o);if(i(t.slice(o,e))!=Jl.Word)break;o=e}return a==o?null:J.range(a+n,o+n)}};$l.allowMultipleSelections=kl,$l.tabSize=ul.define({combine:e=>e.length?e[0]:4}),$l.lineSeparator=Al,$l.readOnly=Pl,$l.phrases=ul.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),$l.languageData=Ol,$l.changeFilter=jl,$l.transactionFilter=Ml,$l.transactionExtender=Nl,Sl.reconfigure=Rl.define();function eu(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var tu=class{eq(e){return this==e}range(e,t=e){return ru.create(e,t,this)}};tu.prototype.startSide=tu.prototype.endSide=0,tu.prototype.point=!1,tu.prototype.mapMode=Qc.TrackDel;function nu(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var ru=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function iu(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var au=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return su(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},ou=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(iu)),this.isEmpty)return n.length?e.of(n):this;let s=new du(this,null,-1).goto(0),c=0,l=[],u=new lu;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(ru.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new lu,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[su(r)+su(n).length,su(su(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return fu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return fu.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=uu(a,o,n),c=new mu(a,s,i),l=new mu(o,s,i);n.iterGaps((e,t,n)=>hu(c,e,l,t,n,r)),n.empty&&n.length==0&&hu(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=uu(i,a),s=new mu(i,o,0).goto(n),c=new mu(a,o,0).goto(n);for(;;){if(s.to!=c.to||!gu(s.active,c.active)||s.point&&(!c.point||!nu(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new mu(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new lu;for(let r of e instanceof ru?[e]:t?cu(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=su(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};ou.empty=new ou([],[],null,-1);function su(e){return e[e.length-1]}function cu(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(iu(t,r)>0)return e.slice().sort(iu);t=r}return e}ou.empty.nextLayer=ou.empty;var lu=class e{finishChunk(e){this.chunks.push(new au(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(ou.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=ou.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function uu(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var du=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},fu=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new du(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)pu(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)pu(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),pu(this.heap,0)}}};function pu(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var mu=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=fu.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){_u(this.active,e),_u(this.activeTo,e),_u(this.activeRank,e),this.minActive=yu(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;vu(this.active,t,n),vu(this.activeTo,t,r),vu(this.activeRank,t,i),e&&vu(e,t,this.cursor.from),this.minActive=yu(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&_u(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function hu(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&nu(e.point,n.point)&&gu(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&=(a.boundChange(s),!1),d>s&&!gu(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function gu(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!nu(e[n],t[n]))return!1;return!0}function _u(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function vu(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function yu(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function bu(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Gc(e,i));return r}function xu(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=Gc(e,r)}return r===!0?-1:e.length}for(var Su=`ͼ`,Cu=typeof Symbol>`u`?`__ͼ`:Symbol.for(Su),wu=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),Tu=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},Eu=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
525
+ `)}static newName(){let e=Tu[Cu]||1;return Tu[Cu]=e+1,Su+e.toString(36)}static mount(e,t,n){let r=e[wu],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Ou(e,i),r.mount(Array.isArray(t)?t:[t],e)}},Du=new Map,Ou=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Du.get(n);if(t)return e[wu]=t;this.sheet=new r.CSSStyleSheet,Du.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[wu]=this}mount(e,t){let n=this.sheet,r=0,i=0,a=!1;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<i&&s>-1&&(this.modules.splice(s,1),a=!0,i--,s=-1),s==-1){if(this.modules.splice(i++,0,o),a=!0,n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(a){let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
526
+ `;this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},ku={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},Au={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},ju=typeof navigator<`u`&&/Mac/.test(navigator.platform),Mu=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Nu=0;Nu<10;Nu++)ku[48+Nu]=ku[96+Nu]=String(Nu);for(var Nu=1;Nu<=24;Nu++)ku[Nu+111]=`F`+Nu;for(var Nu=65;Nu<=90;Nu++)ku[Nu]=String.fromCharCode(Nu+32),Au[Nu]=String.fromCharCode(Nu);for(var Pu in ku)Au.hasOwnProperty(Pu)||(Au[Pu]=ku[Pu]);function Fu(e){var t=!(ju&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Mu&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Au:ku)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Iu=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},Lu=typeof document<`u`?document:{documentElement:{style:{}}},Ru=/Edge\/(\d+)/.exec(Iu.userAgent),zu=/MSIE \d/.test(Iu.userAgent),Bu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Iu.userAgent),Vu=!!(zu||Bu||Ru),Hu=!Vu&&/gecko\/(\d+)/i.test(Iu.userAgent),Uu=!Vu&&/Chrome\/(\d+)/.exec(Iu.userAgent),Wu=`webkitFontSmoothing`in Lu.documentElement.style,Gu=!Vu&&/Apple Computer/.test(Iu.vendor),Ku=Gu&&(/Mobile\/\w+/.test(Iu.userAgent)||Iu.maxTouchPoints>2),Y={mac:Ku||/Mac/.test(Iu.platform),windows:/Win/.test(Iu.platform),linux:/Linux|X11/.test(Iu.platform),ie:Vu,ie_version:zu?Lu.documentMode||6:Bu?+Bu[1]:Ru?+Ru[1]:0,gecko:Hu,gecko_version:Hu?+(/Firefox\/(\d+)/.exec(Iu.userAgent)||[0,0])[1]:0,chrome:!!Uu,chrome_version:Uu?+Uu[1]:0,ios:Ku,android:/Android\b/.test(Iu.userAgent),webkit:Wu,webkit_version:Wu?+(/\bAppleWebKit\/(\d+)/.exec(Iu.userAgent)||[0,0])[1]:0,safari:Gu,safari_version:Gu?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Iu.userAgent)||[0,0])[1]:0,tabSize:Lu.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function qu(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var Ju=Object.create(null);function Yu(e,t,n){if(e==t)return!0;e||=Ju,t||=Ju;let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function Xu(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function Zu(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Qu(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var $u=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},ed=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(ed||={}),td=class extends tu{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new nd(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new id(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=ad(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new id(e,n,r,t,e.widget||null,!0)}static line(e){return new rd(e)}static set(e,t=!1){return ou.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};td.none=ou.empty;var nd=class e extends td{constructor(e){let{start:t,end:n}=ad(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?qu(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Ju}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&Yu(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};nd.prototype.point=!1;var rd=class e extends td{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&Yu(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};rd.prototype.mapMode=Qc.TrackBefore,rd.prototype.point=!0;var id=class e extends td{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?Qc.TrackBefore:Qc.TrackAfter:Qc.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?ed.WidgetBefore:ed.WidgetAfter:ed.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&od(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};id.prototype.point=!0;function ad(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function od(e,t){return e==t||!!(e&&t&&e.compare(t))}function sd(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var cd=class e extends tu{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&Yu(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||Ju,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return ou.of(e,t)}};cd.prototype.startSide=cd.prototype.endSide=-1;var ld=e=>e.nodeType==1,ud=e=>e.nodeType==3;function dd(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function fd(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function pd(e,t){if(!t.anchorNode)return!1;try{return fd(e,t.anchorNode)}catch{return!1}}function md(e){return ud(e)?jd(e,0,e.nodeValue.length).getClientRects():ld(e)?e.getClientRects():[]}function hd(e,t,n,r){return n?vd(e,t,n,r,-1)||vd(e,t,n,r,1):!1}function gd(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function _d(e){return ld(e)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function vd(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:yd(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||!ld(n))return!1;t=gd(e)+(i<0?0:1),e=n}else if(ld(e)){if(e=e.childNodes[t+(i<0?-1:0)],ld(e)&&(e.nodeName==`IMG`||e.nodeName==`BR`||e.contentEditable==`false`))return!1;t=i<0?yd(e):0}else return!1}}function yd(e){return ud(e)?e.nodeValue.length:e.childNodes.length}function bd(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function xd(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Sd(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Cd(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(ld(u)){let e,f=u==c.body,p=1,m=1;if(f)e=xd(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Sd(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g){if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function wd(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(ld(a))!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var Td=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?yd(t):0),n,Math.min(e.focusOffset,n?yd(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function Ed(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)ld(n)&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function Dd(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var Od=null;Y.safari&&Y.safari_version>=26&&(Od=!1);function kd(e){if(e.setActive)return e.setActive();if(Od)return e.focus(Od);let t=Ed(e);e.focus(Od==null?{get preventScroll(){return Od={preventScroll:!0},!0}}:void 0),Od||(Od=!1,Dd(t))}var Ad;function jd(e,t,n=t){let r=Ad||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function Md(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function Nd(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function Pd(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,yd(n));;)if(r){if(!ld(n))return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=yd(n))}else if(n==e)return!0;else r=gd(n),n=n.parentNode}function Fd(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Id(e,t){for(let n=e,r=t;;)if(ud(n)&&r>0)return{node:n,offset:r};else if(ld(n)&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=yd(n)}else if(n.parentNode&&!_d(n))r=gd(n),n=n.parentNode;else return null}function Ld(e,t){for(let n=e,r=t;;)if(ud(n)&&r<n.nodeValue.length)return{node:n,offset:r};else if(ld(n)&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!_d(n))r=gd(n)+1,n=n.parentNode;else return null}var Rd=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,gd(t),n)}static after(t,n){return new e(t.parentNode,gd(t)+1,n)}},zd=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(zd||={}),Bd=zd.LTR,Vd=zd.RTL;function Hd(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Ud=Hd(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),Wd=Hd(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),Gd=Object.create(null),Kd=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Gd[t]=n,Gd[n]=-t}function qd(e){return e<=247?Ud[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Wd[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var Jd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Yd=class{get dir(){return this.level%2?Vd:Bd}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function Xd(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Xd(r.inner,i.inner))return!1}return!0}var Zd=[];function Qd(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=qd(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),Zd[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=Zd[e];if(i==128)e<s-1&&t==Zd[e+1]&&t&24?i=Zd[e]=t:Zd[e]=256;else if(i==64){let i=e+1;for(;i<s&&Zd[i]==64;)i++;let a=e&&t==8||i<n&&Zd[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)Zd[t]=a;e=i-1}else i==8&&r==1&&(Zd[e]=1);t=i,i&7&&(r=i)}}}function $d(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=Gd[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(Kd[e+1]==-r){let n=Kd[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(Zd[t]=Zd[Kd[e]]=r),s=e;break}}else if(Kd.length==189)break;else Kd[s++]=t,Kd[s++]=n,Kd[s++]=c}else if((o=Zd[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=Kd[t+2];if(n&2)break;if(e)Kd[t+2]|=2;else{if(n&4)break;Kd[t+2]|=4}}}}}function ef(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=Zd[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(Zd[o]==256)o++;else break;let l=a==1,u=l==((o<t?Zd[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),Zd[--t]=u;c=o}else a=o,c++}}}function tf(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=Zd[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(Zd[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new Yd(c,m.from,f)),nf(e,m.direction==Bd==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?Zd[p]!=s:Zd[p]==s))break;else p++;d?tf(e,c,p,r+1,i,d,o):c<p&&o.push(new Yd(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=Zd[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(Zd[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new Yd(m.to,c,f)),nf(e,m.direction==Bd==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?Zd[p-1]!=s:Zd[p-1]==s))break;else p--;d?tf(e,p,c,r+1,i,d,o):p<c&&o.push(new Yd(p,c,f)),c=p}}function nf(e,t,n,r,i,a,o){let s=t%2?2:1;Qd(e,i,a,r,s),$d(e,i,a,r,s),ef(i,a,r,s),tf(e,i,a,t,n,r,o)}function rf(e,t,n){if(!e)return[new Yd(0,0,+(t==Vd))];if(t==Bd&&!n.length&&!Jd.test(e))return af(e.length);if(n.length)for(;e.length>Zd.length;)Zd[Zd.length]=256;let r=[],i=t==Bd?0:1;return nf(e,i,i,n,0,e.length,r),r}function af(e){return[new Yd(0,e,0)]}var of=``;function sf(e,t,n,r,i){if(!e.length)return null;let a=r.head-e.from,o;if(r.head==e.from&&r.assoc<0){if(!i)return null;a=t[o=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;a=t[o=t.length-1].side(!0,n)}else o=Yd.find(t,a,r.bidiLevel??-1,r.assoc);let s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=Gc(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),of=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];if(l==c){if(!u)return i?J.cursor(e.to,1):J.cursor(e.from,-1);if(u.level+ +!i<s.level)return J.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level)}return J.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function cf(e,t,n){for(let r=t;r<n;r++){let t=qd(e.charCodeAt(r));if(t==1)return Bd;if(t==2||t==4)return Vd}return Bd}var lf=ul.define(),uf=ul.define(),df=ul.define(),ff=ul.define(),pf=ul.define(),mf=ul.define(),hf=ul.define(),gf=ul.define(),_f=ul.define(),vf=ul.define({combine:e=>e.some(e=>e)}),yf=ul.define({combine:e=>e.some(e=>e)}),bf=ul.define(),xf=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(J.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Sf=Rl.define({map:(e,t)=>e.map(t)}),Cf=Rl.define();function wf(e,t,n){let r=e.facet(ff);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Tf=ul.define({combine:e=>!e.length||e[0]}),Ef=0,Df=ul.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Of=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Df.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Df.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(Ef++,t,r,i,e=>{let t=[];return o&&t.push(Mf.of(t=>{let n=t.plugin(e);return n?o(n):td.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},kf=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){wf(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(wf(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){wf(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Af=ul.define(),jf=ul.define(),Mf=ul.define(),Nf=ul.define(),Pf=ul.define(),Ff=ul.define(),If=ul.define();function Lf(e,t){let n=e.state.facet(If);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return ou.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=cf(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Rf=ul.define();function zf(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Rf)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Bf=ul.define(),Vf=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},Hf=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=el.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Vf(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Uf=[],Wf=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Uf}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&Xu(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=gd(this.dom),r=this.length?e>0:t>0;return new Rd(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof qf)return e;return null}static get(e){return e.cmTile}},Gf=class extends Wf{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Kf(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Kf(r);this.length=a}};function Kf(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var qf=class extends Gf{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Wf.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof Jf)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},Jf=class e extends Gf{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Yf=class e extends Gf{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n=!1){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||n&&a.isHidden&&(t>0&&!(a.flags&32)||n&&Zf(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!(n&&d.isHidden)&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):Xf(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new Rd(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new Rd(e.dom,0);e==n.tile&&(a=!0)}}return new Rd(this.dom,0)}};function Xf(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=md(t);return n[n.length-1]||null}function Zf(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var Qf=class e extends Gf{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},$f=class e extends Wf{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?Y.chrome||Y.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=jd(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return Y.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:bd(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},ep=class e extends Wf{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return bd(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return bd(n,!r)}}get overrideDOMText(){if(!this.length)return Pc.empty;let{root:e}=this;if(!e)return Pc.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},tp=class extends Wf{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Pc.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:bd(r,t>0==n)}},np=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},rp=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},ip=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new $f(a.dom,a.text+e);t.parent=i}else i.append(r||$f.of(e,this.cache.find($f)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?mp(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof Qf&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(mp(n.dom)),r=i;else{let{dom:e}=n;this.cache.reused.get(n)&&Wf.get(n.dom)&&(e=mp(n.dom));let t=Qf.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=Wf.get(e.text);i&&this.cache.reused.set(i,2);let a=new $f(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=dp;let n=Yf.start(e,t||this.cache.find(Yf)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof Qf&&a.mark.eq(i))n=a,t--;else{let e=Qf.of(i,this.cache.find(Qf,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!lp(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(Y.ios&&lp(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(gp,0,32)||new ep(gp.toDOM(),0,gp,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new rp(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof Jf&&n.wrapper.eq(t.wrapper))e=n;else{let n=Jf.of(t.wrapper,this.cache.find(Jf,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(tp,void 0,1);return n&&(n.flags=t),n||new tp(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},ap=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},op=[ep,Yf,$f,Qf,tp,Jf,qf];for(let e=0;e<op.length;e++)op[e].bucket=e;var sp=class{constructor(e){this.view=e,this.buckets=op.map(()=>[]),this.index=op.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new ep(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},cp=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new sp(e),this.text=new ap(e.state.doc),this.builder=new ip(this.cache,new qf(e,e.contentDOM),ou.iter(n)),this.cache.reused.set(t,2),this.old=new np(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=pp(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?ep.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof tp)this.cache.add(e);else if(e instanceof Qf)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof Qf&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof Qf&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=ou.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof id){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?hp.block:hp.inline),c=up(a),l=this.cache.findWidget(i,t-e,c)||ep.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=fp(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Wf.get(r);if(r==this.view.contentDOM)break;e instanceof Qf?t.push(e):e?.isLine()?n=e:e instanceof Jf||(r.nodeName==`DIV`&&!n?n=new Yf(r,dp):n||t.push(Qf.of(new nd({tagName:r.nodeName.toLowerCase(),attributes:Qu(r)}),r)))}return n?{line:n,marks:t}:null}};function lp(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function up(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var dp={class:`cm-line`};function fp(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||={class:`cm-line`},n&&qu(n,e),r&&(e.class+=` `+r)),e}function pp(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof Qf&&t.push(r.mark)}return t}function mp(e){let t=Wf.get(e);return t&&t.setDOM(e.cloneNode()),e}var hp=class extends $u{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};hp.inline=new hp(`span`),hp.block=new hp(`div`);var gp=new class extends $u{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},_p=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=td.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new qf(e,e.contentDOM),this.updateInner([new Vf(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Op(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?xp(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Vf(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(Y.ie||Y.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=wp(i,this.decorations,e.changes);o.length&&(t=Vf.extendWithRanges(t,o));let s=Ep(a,this.blockWrappers,e.changes);return s.length&&(t=Vf.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new cp(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Wf.get(t.text)&&r.cache.reused.set(Wf.get(t.text),2),this.tile=r.run(e,t),vp(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=Y.chrome||Y.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof kp&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Cf)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Tf)||n.tabIndex>-1)&&pd(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),Y.gecko&&s.empty&&!this.hasComposition&&yp(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new Rd(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!hd(c.node,c.offset,u.anchorNode,u.anchorOffset)||!hd(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{Y.android&&Y.chrome&&n.contains(u.focusNode)&&Dp(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=dd(this.view.root);if(e){if(s.empty){if(Y.gecko){let e=Sp(c.node,c.offset);if(e&&e!=3){let t=(e==1?Id:Ld)(c.node,c.offset);t&&(c=new Rd(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new Rd(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Rd(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&hd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=dd(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=yd(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Wf.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof kp?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=Gc(e.text,t);if(n==t)return null;let r=jd(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==zd.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof Jf)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?md(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?zd.RTL:zd.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=md(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=md(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(td.replace({widget:new kp(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return td.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Mf).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(Pf).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(ou.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Nf).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(bf))try{if(t(this.view,e.range,e))return!0}catch(e){wf(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=zf(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(Cd(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==zd.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=Ed(e.dom);e.dom.scrollIntoView({block:`nearest`}),Dd(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){vp(this.tile)}};function vp(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)vp(n,t)}}function yp(e){return ld(e.node)&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function bp(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Id(n.focusNode,n.focusOffset),i=Ld(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Wf.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Wf.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function xp(e,t,n){let r=bp(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Vf(c.mapPos(a),c.mapPos(o),a,o),text:i}}function Sp(e,t){return ld(e)?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var Cp=class{constructor(){this.changes=[]}compareRange(e,t){sd(e,t,this.changes)}comparePoint(e,t){sd(e,t,this.changes)}boundChange(e){sd(e,e,this.changes)}};function wp(e,t,n){let r=new Cp;return ou.compare(e,t,n,r),r.changes}var Tp=class{constructor(){this.changes=[]}compareRange(e,t){sd(e,t,this.changes)}comparePoint(){}boundChange(e){sd(e,e,this.changes)}};function Ep(e,t,n){let r=new Tp;return ou.compare(e,t,n,r),r.changes}function Dp(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(ld(n)&&n.contentEditable==`false`)return!0;return!1}function Op(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var kp=class extends $u{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function Ap(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return J.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=Gc(i.text,a,!1):s=Gc(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=Gc(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=Gc(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return J.undirectionalRange(o+i.from,s+i.from)}function jp(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+xu(o,a,e.state.tabSize)}function Mp(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==ed.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function Np(e,t,n,r){let i=Mp(e,t.head,t.assoc||-1),a=!r||i.type!=ed.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==zd.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return J.cursor(o,n?-1:1)}return J.cursor(n?i.to:i.from,n?-1:1)}function Pp(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=sf(i,a,o,s,n),l=of;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
527
+ `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=n?J.cursor(i.from,-1):J.cursor(i.to,1)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function Fp(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==Jl.Space&&(i=t),i==t}}function Ip(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return J.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Vp(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return J.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return J.cursor(i.pos,i.assoc,void 0,o)}}function Lp(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function Rp(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Lp(e,i.from,0);t!=i.from&&(a=J.cursor(t,-1))}else{let t=Lp(e,i.from,-1),n=Lp(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?J.undirectionalRange(i.from,i.to):J.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?J.create(n,t.mainIndex):t}function zp(e,t,n){let r=Lp(e.state.facet(Ff).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:J.cursor(r,r<n.from?1:-1)}var Bp=class{constructor(e,t){this.pos=e,this.assoc=t}};function Vp(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Bp(0,1);if(c>e.viewState.docHeight)return new Bp(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==ed.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==ed.Text){let t=jp(e,i,l,o,s);return new Bp(t,t==l.from?1:-1)}}if(l.type!=ed.Text)return c<(l.top+l.bottom)/2?new Bp(l.from,1):new Bp(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new Hp(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var Hp=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Yd.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Yd.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1)){if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==zd.LTR)?-1:1)}}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==zd.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=Gc(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return jd(e.dom,i,a).getClientRects()});return r.after?new Bp(n[r.i+1],-1):new Bp(n[r.i],1)}scanTile(e,t){if(!e.length)return new Bp(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(ld(n.dom)?n.dom:jd(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Bp(n[r.i+1],-1):new Bp(a,1)}},Up=`￿`,Wp=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet($l.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Up}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Wf.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Wf.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:_d(r))||_d(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Kp(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Wf.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else ud(e)?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():ld(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(ud(e)?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Gp(e,n.node,n.offset)?t:0))}};function Gp(e,t,n){for(;;){if(!t||n<yd(t))return!1;if(t==e)return!0;n=gd(t)+1,t=t.parentNode}}function Kp(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=Wf.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var qp=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},Jp=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Yp(e.docView.tile,t,n,0))){let t=i||a?[]:em(e),n=new Wp(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=tm(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!fd(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!fd(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((Y.ios||Y.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(J.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=J.create([J.cursor(n,r)])}else this.newSel=J.single(r,n)}}};function Yp(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return Yp(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function Xp(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||Y.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,Up),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:Pc.of(t.text.slice(a.from-e,u).split(Up))}:(d=$p(l,t.text,s-e,c))&&(Y.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:Pc.of(t.text.slice(d.from,d.toB).split(Up))})}else r&&(!e.hasFocus&&i.facet(Tf)||nm(r,a))&&(r=null);if(!n&&!r)return!1;if((Y.mac||Y.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Pc.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:Y.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
528
+ `&&e.lineWrapping&&(r&&=J.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:Pc.of([` `])}),n)return Zp(e,n,r,o);if(r&&!nm(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=Rp(i.facet(Ff).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function Zp(e,t,n,r=-1){if(Y.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(Y.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&Md(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Md(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Md(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=Qp(e,t,n);return e.state.facet(mf).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function Qp(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Lp(i.facet(Ff).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:J.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&bp(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?J.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function $p(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function em(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new qp(n,r)),(i!=n||a!=r)&&t.push(new qp(i,a))),t}function tm(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n<0||r<0?null:n==r?J.create([J.cursor(r+t,-1)]):J.single(n+t,r+t)}function nm(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var rm=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Y.safari&&e.contentDOM.addEventListener(`input`,()=>null),Y.gecko&&Bm(e.contentDOM.ownerDocument)}handleEvent(e){_m(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=om(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&lm.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Y.android&&Y.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(Y.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(sm.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||cm.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};t.shiftKey&&Y.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&im(this.view.win)&&(t.shiftKey=!1);let n=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{this.pendingIOSKey==n&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Md(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Y.safari&&!Y.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function im(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function am(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){wf(n.state,e)}}}function om(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(am(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(am(t.value,r))}}for(let e in vm)n(e).handlers.push(vm[e]);for(let e in ym)n(e).observers.push(ym[e]);return t}var sm=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],cm=`dthko`,lm=[16,17,18,20,91,92,224,225],um=6;function dm(e){return Math.max(0,e)*.7+8}function fm(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var pm=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=wd(e.contentDOM),this.atoms=e.state.facet(Ff).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet($l.allowMultipleSelections)&&mm(e,t),this.dragging=gm(e,t)&&km(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&fm(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=zf(this.view);e.clientX-s.left<=r+um?t=-dm(r-e.clientX):e.clientX+s.right>=a-um&&(t=dm(e.clientX-a)),e.clientY-s.top<=i+um?n=-dm(i-e.clientY):e.clientY+s.bottom>=o-um&&(n=dm(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Rp(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function mm(e,t){let n=e.state.facet(lf);return n.length?n[0](t):Y.mac?t.metaKey:t.ctrlKey}function hm(e,t){let n=e.state.facet(uf);return n.length?n[0](t):Y.mac?!t.altKey:!t.ctrlKey}function gm(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=dd(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function _m(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Wf.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var vm=Object.create(null),ym=Object.create(null),bm=Y.ie&&Y.ie_version<15||Y.ios&&Y.webkit_version<604;function xm(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Cm(e,n.value)},50)}function Sm(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Cm(e,t){t=Sm(e.state,gf,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(Fm!=null&&n.selection.ranges.every(e=>e.empty)&&Fm==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:J.cursor(r.from+c.length,-1)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:J.cursor(e.from+t.length,-1)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}ym.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,Y.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},ym.wheel=ym.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},vm.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),ym.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},ym.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},ym.touchend=(e,t)=>{e.inputState.touchActive=!1},vm.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(df))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=Am(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new pm(e,t,n,r)),r&&e.observer.ignore(()=>{kd(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function wm(e,t,n,r){if(r==1)return J.cursor(t,n);if(r==2)return Ap(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,J.undirectionalRange(a,o)}}var Tm=Y.ie&&Y.ie_version<=11,Em=null,Dm=0,Om=0;function km(e){if(!Tm)return e.detail;let t=Em,n=Om;return Em=e,Om=Date.now(),Dm=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Dm+1)%3:1}function Am(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=km(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=wm(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=wm(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?J.range(i,a,l.assoc):J.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=jm(i,s.pos))?c:o?i.addRange(l):J.create([l])}}}function jm(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return J.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}vm.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=J.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,Sm(e.state,_f,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},vm.dragend=e=>(e.inputState.draggedContent=null,!1);function Mm(e,t,n,r){if(n=Sm(e.state,gf,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&hm(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}vm.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Mm(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return Mm(e,t,n,!0),!0}return!1},vm.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=bm?null:t.clipboardData;return n?(Cm(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(xm(e),!1)};function Nm(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function Pm(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Sm(e,_f,t.join(e.lineBreak)),ranges:n,linewise:r}}var Fm=null;vm.copy=vm.cut=(e,t)=>{if(!pd(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=Pm(e.state);if(!n&&!i)return!1;Fm=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=bm?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(Nm(e,n),!1)};var Im=Fl.define();function Lm(e,t){let n=[];for(let r of e.facet(hf)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Im.of(!0)}):null}function Rm(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Lm(e.state,t);n?e.dispatch(n):e.update([])}},10)}ym.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Rm(e)},ym.blur=e=>{e.observer.clearSelectionRange(),Rm(e)},ym.compositionstart=ym.compositionupdate=(e,t)=>{if(!e.observer.editContext&&(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;!t.empty&&e.lineBlockAt(t.from).from!=e.lineBlockAt(t.to).from&&!e.state.readOnly&&e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:`input`}),e.inputState.composing=0}},ym.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Y.chrome&&Y.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},ym.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},vm.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return Zp(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(Y.chrome&&Y.android&&(n=sm.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return Y.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),Y.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>ym.compositionend(e,t),20),!1};var zm=new Set;function Bm(e){zm.has(e)||(zm.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Vm=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],Hm=!1;function Um(){Hm=!1}var Wm=class{constructor(e){this.lineWrapping=e,this.doc=Pc.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Vm.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=Vm.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},Gm=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Km=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?ed.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof id?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},qm=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(qm||={}),Jm=.001,Ym=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Jm&&(Hm=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,qm.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,qm.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,qm.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=ih.build(n.setDoc(a),e,l,u);i=Xm(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new $m(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=!1;return t[n-1]==null?(o=!0,n--):t[n]??(o=!0,r++),new th(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function Xm(e,t){return e==t?e:(e.constructor!=t.constructor&&(Hm=!0),t)}Ym.prototype.size=1;var Zm=td.replace({}),Qm=class extends Ym{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Km(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Km(r,0,n,this.spaceAbove,Zm):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,qm.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},$m=class e extends Qm{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new Km(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof eh&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof eh?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Ym.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},eh=class e extends Ym{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new Km(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new Km(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==qm.ByHeight)return this.blockAt(e,n,r,i);if(t==qm.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new Km(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new Km(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new Km(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return Ym.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=Jm&&(s=-2);let c=new $m(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=Ym.of(r);return(s<0||Math.abs(c.height-this.height)>=Jm||Math.abs(s-this.heightMetrics(t,n).perLine)>=Jm)&&(Hm=!0),Xm(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},th=class extends Ym{constructor(e,t,n){super(e.length+ +!!t+n.length,e.height+n.height,+!!t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==qm.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==qm.ByPosNoHeight?qm.ByPosNoHeight:qm.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,qm.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,Math.min(t,c.from-1),n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(Math.max(e,c.to+1),t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&nh(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),nh(i,e)}return Ym.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Ym.of(this.break?[e,null,t]:[e,t]):(this.left=Xm(this.left,e),this.right=Xm(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function nh(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof eh&&(r=e[t+1])instanceof eh&&e.splice(t-1,3,new eh(n.length+1+r.length))}var rh=5,ih=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof $m?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new $m(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new Qm(a,r,n)):(a||i||r>=rh)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new $m(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new eh(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof $m)return e;let t=new $m(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof $m)&&!this.isCovered?this.nodes.push(new $m(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof $m&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return ou.spans(n,r,i,a,0),a.finish(r)}};function ah(e,t,n){let r=new oh;return ou.compare(e,t,n,r,0),r.changes}var oh=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&sd(e,t,this.changes,5)}};function sh(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(ld(t)){let n=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&n.overflow!=`visible`){let n=t.getBoundingClientRect();a=Math.max(a,n.left),o=Math.min(o,n.right),s=Math.max(s,n.top),c=Math.min(t==e.parentNode?i.innerHeight:c,n.bottom)}t=n.position==`absolute`||n.position==`fixed`?t.offsetParent:t.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function ch(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function lh(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var uh=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return td.replace({widget:new dh(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},dh=class extends $u{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},fh=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=vh,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=zd.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(jf).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new Wm(n),this.stateDeco=yh(t),this.heightMap=Ym.empty().applyChanges(this.stateDeco,Pc.empty,this.heightOracle.setDoc(t.doc),[new Vf(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=td.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new ph(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?vh:new bh(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(xh(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=yh(this.state);let r=e.changedRanges,i=Vf.extendWithRanges(r,ah(n,this.stateDeco,e?e.changes:el.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Um(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||Hm)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(yf)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?zd.RTL:zd.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=Sd(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=wd(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Fd(this.scrollParent||e.win);let m=(this.printing?lh:sh)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!ch(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),Um();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?Ym.empty().applyChanges(this.stateDeco,Pc.empty,this.heightOracle,[new Vf(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Gm(n.from,i))}Hm&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new ph(r.lineAt(a-n*1e3,qm.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,qm.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,qm.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new ph(r.lineAt(o-500,qm.ByHeight,i,0,0).from,r.lineAt(o+n+500,qm.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new ph(this.heightMap.lineAt(n,qm.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,qm.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,qm.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,qm.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new uh(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=zd.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=_h(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(J.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new uh(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=ed.Text)return;let i=mh(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=gh(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=hh(i,n),l=hh(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=gh(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=hh(i,f),l=hh(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=gh(r,n)-gh(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){uh.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=td.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];ou.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||xh(this.heightMap.lineAt(e,qm.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||xh(this.heightMap.lineAt(this.scaler.fromDOM(e),qm.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return xh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},ph=class{constructor(e,t){this.from=e,this.to=t}};function mh(e,t,n){let r=[],i=e,a=0;return ou.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function hh({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function gh(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function _h(e,t){for(let n of e)if(t(n))return n}var vh={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function yh(e){let t=e.facet(Mf).filter(e=>typeof e!=`function`),n=e.facet(Pf).filter(e=>typeof e!=`function`);return n.length&&t.push(ou.join(n)),t}var bh=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,qm.ByPos,e,0,0).top,o=t.lineAt(i,qm.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function xh(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Km(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>xh(e,t)):e._content)}var Sh=ul.define({combine:e=>e.join(` `)}),Ch=ul.define({combine:e=>e.indexOf(!0)>-1}),wh=Eu.newName(),Th=Eu.newName(),Eh=Eu.newName(),Dh={"&light":`.`+Th,"&dark":`.`+Eh};function Oh(e,t,n){return new Eu(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var kh=Oh(`.`+wh,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`baseline`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},Dh),Ah={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},jh=Y.ie&&Y.ie_version<=11,Mh=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Td,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(Y.ie&&Y.ie_version<=11||Y.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Y.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Y.chrome&&Y.chrome_version<126)&&(this.editContext=new Ih(e),e.state.facet(Tf)&&(e.contentDOM.editContext=this.editContext.editContext)),jh&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Tf)?n.root.activeElement!=this.dom:!pd(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);i&&i.isWidget()&&i.widget.ignoreEvent(e)?t||(this.selectionChanged=!1):(Y.ie&&Y.ie_version<=11||Y.android&&Y.chrome)&&!n.state.selection.main.empty&&r.focusNode&&hd(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=dd(e.root);if(!t)return!1;let n=Y.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Fh(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=pd(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Pd(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(ld(n))!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,Ah),jh&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),jh&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Md(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&pd(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Jp(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=Xp(this.view,n);return this.view.state==r&&(n.domChanged||t)&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=Nh(t,e.previousSibling||e.target.previousSibling,-1),r=Nh(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Tf)!=e.state.facet(Tf)&&(e.view.contentDOM.editContext=e.state.facet(Tf)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Nh(e,t,n){for(;t;){let r=Wf.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function Ph(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return hd(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Fh(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Ph(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?Ph(e,n):null}var Ih=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=$p(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=J.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));nm(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:Pc.of(n.text.slice(l.from,l.toB).split(`
529
+ `))};if((Y.mac||Y.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:Pc.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);Zp(e,u,J.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(td.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Cf.of(td.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=dd(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},X=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Nd(e.parent)||document,this.viewState=new fh(this,e.state||$l.create(e)),e.scrollTo&&e.scrollTo.is(Sf)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Df).map(e=>new kf(e));for(let e of this.plugins)e.update(this);this.observer=new Mh(this),this.inputState=new rm(this),this.inputState.ensureHandlers(this.plugins),this.docView=new _p(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof zl?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(Im))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=Lm(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet($l.phrases)!=this.state.facet($l.phrases))return this.setState(a);i=Hf.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new xf(t.empty?t:J.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(Sf)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=zh.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Bf)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(Sh)!=i.state.facet(Sh)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(pf))try{e(i)}catch(e){wf(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Xp(this,u)&&l.force&&Md(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new fh(this,e),this.plugins=e.facet(Df).map(e=>new kf(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new _p(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Df),n=e.state.facet(Df);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new kf(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){wf(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Fd(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return wf(this.state,e),Rh}}),u=Hf.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=Rh)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){wf(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(Y.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(pf))e(t)}get themeClasses(){return wh+` `+(this.state.facet(Ch)?Eh:Th)+` `+this.state.facet(Sh)}updateAttrs(){let e=Bh(this,Af,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Tf)?`true`:`false`,class:`cm-content`,style:`${Y.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Bh(this,jf,t);let n=this.observer.ignore(()=>{let n=Zu(this.contentDOM,this.contentAttrs,t),r=Zu(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&=(this.announceDOM.textContent=``,this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=`\xA0`},200),!1);let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Bf);let t=this.state.facet(e.cspNonce);Eu.mount(this.root,this.styleModules.concat(kh).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return zp(this,e,Pp(this,e,t,n))}moveByGroup(e,t){return zp(this,e,Pp(this,e,t,t=>Fp(this,e.head,t)))}visualLineSide(e,t){return t?J.cursor(e.to,1):J.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return Np(this,e,t,n)}moveVertically(e,t,n){return zp(this,e,Ip(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Vp(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Vp(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[Yd.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==zd.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(vf)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Lh)return af(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Xd(r.isolates,n=Lf(this,e))))return r.order;n||=Lf(this,e);let r=rf(e.text,t,n);return this.bidiCache.push(new zh(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||Y.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{kd(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Sf.of(new xf(typeof e==`number`?J.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Sf.of(new xf(J.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Of.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Of.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Eu.newName(),r=[Sh.of(n),Bf.of(Oh(`.${n}`,e))];return t&&t.dark&&r.push(Ch.of(!0)),r}static baseTheme(e){return bl.lowest(Bf.of(Oh(`.`+wh,e,Dh)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Wf.get(t)||Wf.get(e))?.root?.view||null}};X.styleModule=Bf,X.inputHandler=mf,X.clipboardInputFilter=gf,X.clipboardOutputFilter=_f,X.scrollHandler=bf,X.focusChangeEffect=hf,X.perLineTextDirection=vf,X.exceptionSink=ff,X.updateListener=pf,X.editable=Tf,X.mouseSelectionStyle=df,X.dragMovesSelection=uf,X.clickAddsSelectionRange=lf,X.decorations=Mf,X.blockWrappers=Nf,X.outerDecorations=Pf,X.atomicRanges=Ff,X.bidiIsolatedRanges=If,X.cursorScrollMargin=ul.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),X.scrollMargins=Rf,X.darkTheme=Ch,X.cspNonce=ul.define({combine:e=>e.length?e[0]:``}),X.contentAttributes=jf,X.editorAttributes=Af,X.lineWrapping=X.contentAttributes.of({class:`cm-lineWrapping`}),X.announce=Rl.define();var Lh=4096,Rh={},zh=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:zd.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function Bh(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&qu(a,n)}return n}var Vh=Y.mac?`mac`:Y.windows?`win`:Y.linux?`linux`:`key`;function Hh(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function Uh(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var Wh=bl.default(X.domEventHandlers({keydown(e,t){return Qh(qh(t.state),e,t,`editor`)}})),Gh=ul.define({enables:Wh}),Kh=new WeakMap;function qh(e){let t=e.facet(Gh),n=Kh.get(t);return n||Kh.set(t,n=Xh(t.reduce((e,t)=>e.concat(t),[]))),n}var Jh=null,Yh=4e3;function Xh(e,t=Vh){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>Hh(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=Jh={view:t,prefix:n,scope:e};return setTimeout(()=>{Jh==r&&(Jh=null)},Yh),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,Zh))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var Zh=null;function Qh(e,t,n,r){Zh=t;let i=Fu(t),a=Xc(Jc(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;Jh&&Jh.view==n&&Jh.scope==r&&(o=Jh.prefix+` `,lm.indexOf(t.keyCode)<0&&(c=!0,Jh=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+Uh(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Y.windows&&t.ctrlKey&&t.altKey)&&!(Y.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=ku[t.keyCode])&&p!=i?(d(f[o+Uh(p,t,!0)])||t.shiftKey&&(m=Au[t.keyCode])!=i&&m!=p&&d(f[o+Uh(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+Uh(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),Zh=null,s}var $h=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=eg(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}return ng(t,n,r)}};function eg(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==zd.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function tg(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function ng(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==zd.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=eg(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=Mp(e,r,1),m=Mp(e,i,-1),h=p.type==ed.Text?p:null,g=m.type==ed.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=tg(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=tg(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):ee(p,!1),r=g?y(null,n.to,g):ee(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(_(d,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==ed.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function _(e,n,r,i){return new $h(t,e-c.left,n-c.top,Math.max(0,r-e),i-n)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(_(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,o=-1e9,s=[];function c(t,n,c,l,u){let p=e.coordsAtPos(t,t==r.to?-2:2),m=e.coordsAtPos(c,c==r.from?2:-2);p&&m&&(i=Math.min(p.top,m.top,i),o=Math.max(p.bottom,m.bottom,o),u==zd.LTR?s.push(a&&n?d:p.left,a&&l?f:m.right):s.push(!a&&l?d:m.left,!a&&n?f:p.right))}let l=t??r.from,u=n??r.to;for(let r of e.visibleRanges)if(r.to>l&&r.from<u)for(let i=Math.max(r.from,l),a=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,s=o.to+r.from;if(e>=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function ee(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function rg(e,t){return e.constructor==t.constructor&&e.eq(t)}var ig=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ag)!=e.state.facet(ag)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(ag);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>!rg(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,Y.webkit&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},ag=ul.define();function og(e){return[Of.define(t=>new ig(t,e)),ag.of(e)]}var sg=!Y.ios,cg=ul.define({combine(e){return eu(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function lg(e={}){return[cg.of(e),dg,pg,hg,yf.of(!0)]}function ug(e){return e.startState.facet(cg)!=e.state.facet(cg)}var dg=og({above:!0,markers(e){let{state:t}=e,n=t.facet(cg),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(a&&Y.ios&&n.iosSelectionHandles)){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:J.cursor(i.head,i.assoc);for(let i of $h.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=ug(e);return n&&fg(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){fg(t.state,e)},class:`cm-cursorLayer`});function fg(e,t){t.style.animationDuration=e.facet(cg).cursorBlinkRate+`ms`}var pg=og({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let i of r)if(!i.empty&&(sg||i!=n))for(let n of $h.forRange(e,`cm-selectionBackground`,i))t.push(n);if(Y.ios&&!n.empty&&e.state.facet(cg).iosSelectionHandles){for(let r of $h.forRange(e,`cm-selectionHandle cm-selectionHandle-start`,J.cursor(n.from,1)))t.push(r);for(let r of $h.forRange(e,`cm-selectionHandle cm-selectionHandle-end`,J.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||ug(e)},class:`cm-selectionLayer`}),mg=Y.gecko&&Y.gecko_version==153?`#ffffff01`:`transparent`,hg=bl.highest(X.theme({".cm-line":{...sg?{"& ::selection, &::selection":{backgroundColor:`${mg} !important`}}:{},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,...sg?{"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}:{}}}}));/x/.unicode;var gg=class extends $u{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?md(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=bd(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}};function _g(e){let t=Of.fromClass(class{constructor(t){this.view=t,this.placeholder=e?td.set([td.widget({widget:new gg(e),side:1}).range(0)]):td.none}get decorations(){return this.view.state.doc.length?td.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,X.contentAttributes.of({"aria-placeholder":e})]:t}var vg=`-10000px`,yg=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)a[n]=this.createTooltipView(r,n?a[n-1]:null),o&&(o[n]=!!r.above);else{let r=a[n]=this.tooltipViews[s];o&&(o[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)a.indexOf(e)<0&&(this.removeTooltipView(e),(n=e.destroy)==null||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}};function bg(e){let t=e.dom.ownerDocument.documentElement,n=t.clientWidth,r=getComputedStyle(t);if(!/stable/.test(r.scrollbarGutter||``))return{left:0,right:n};let i=t.getBoundingClientRect(),a=e.win.scrollX;return{left:Math.max(0,i.left+a-parseFloat(r.marginLeft)),right:Math.min(n,i.right+a+parseFloat(r.marginRight))}}function xg(e){let{left:t,right:n}=bg(e);return{top:0,left:t,right:n,bottom:e.dom.ownerDocument.documentElement.clientHeight}}var Sg=ul.define({combine:e=>({position:Y.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||xg})}),Cg=new WeakMap,wg=Of.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Sg);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new yg(e,Og,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(Sg);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add(`cm-tooltip`),e.arrow&&!n.dom.querySelector(`.cm-tooltip > .cm-tooltip-arrow`)){let e=document.createElement(`div`);e.className=`cm-tooltip-arrow`,n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=vg,n.dom.style.left=`0px`,this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener(`resize`,this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)==null||e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)==null||t.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1,r=0;if(this.position==`fixed`&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Y.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||this.position==`absolute`){if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState)}else r=bg(this.view).left;let i=this.view.scrollDOM.getBoundingClientRect(),a=zf(this.view);return{visible:{left:i.left+a.left,top:i.top+a.top,right:i.right-a.right,bottom:i.bottom-a.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(Sg).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n,fixedLeft:r}}writeMeasure(e){if(e.makeAbsolute){this.madeAbsolute=!0,this.position=`absolute`;for(let e of this.manager.tooltipViews)e.dom.style.position=`absolute`}let{visible:t,space:n,scaleX:r,scaleY:i}=e,a=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],c=this.manager.tooltipViews[o],{dom:l}=c,u=e.pos[o],d=e.size[o];if(!u||s.clip!==!1&&(u.bottom<=Math.max(t.top,n.top)||u.top>=Math.min(t.bottom,n.bottom)||u.right<Math.max(t.left,n.left)-.1||u.left>Math.min(t.right,n.right)+.1)){l.style.top=vg;continue}let f=s.arrow?c.dom.querySelector(`.cm-tooltip-arrow`):null,p=f?7:0,m=d.right-d.left,h=Cg.get(c)??d.bottom-d.top,g=c.offset||Dg,_=this.view.textDirection==zd.LTR,v=d.width>n.right-n.left?_?n.left:n.right-d.width:_?Math.max(n.left,Math.min(u.left-(f?14:0)+g.x,n.right-m)):Math.min(Math.max(n.left,u.left-m+(f?14:0)-g.x),n.right-m),y=this.above[o];!s.strictSide&&(y?u.top-h-p-g.y<n.top:u.bottom+h+p+g.y>n.bottom)&&y==n.bottom-u.bottom>u.top-n.top&&(y=this.above[o]=!y);let ee=(y?u.top-n.top:n.bottom-u.bottom)-p;if(ee<h&&c.resize!==!1){if(ee<this.view.defaultLineHeight){l.style.top=vg;continue}Cg.set(c,h),l.style.height=(h=ee)/i+`px`}else l.style.height&&(l.style.height=``);let b=y?u.top-h-p-g.y:u.bottom+p+g.y,x=v+m;if(c.overlap!==!0)for(let e of a)e.left<x&&e.right>v&&e.top<b+h&&e.bottom>b&&(b=y?e.top-h-2-p:e.bottom+p+2);if(this.position==`absolute`?(l.style.top=(b-e.parent.top)/i+`px`,Tg(l,(v-e.parent.left)/r)):(l.style.top=b/i+`px`,Tg(l,(v-e.fixedLeft)/r)),f){let e=u.left+(_?g.x:-g.x)-(v+14-7);f.style.left=e/r+`px`}c.overlap!==!0&&a.push({left:v,top:b,right:x,bottom:b+h}),l.classList.toggle(`cm-tooltip-above`,y),l.classList.toggle(`cm-tooltip-below`,!y),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=vg}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Tg(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+`px`)}var Eg=X.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:`border-box`},"&light .cm-tooltip":{border:`1px solid #bbb`,backgroundColor:`#f5f5f5`},"&light .cm-tooltip-section:not(:first-child)":{borderTop:`1px solid #bbb`},"&dark .cm-tooltip":{backgroundColor:`#333338`,color:`white`},".cm-tooltip-arrow":{height:`7px`,width:`14px`,position:`absolute`,zIndex:-1,overflow:`hidden`,"&:before, &:after":{content:`''`,position:`absolute`,width:0,height:0,borderLeft:`7px solid transparent`,borderRight:`7px solid transparent`},".cm-tooltip-above &":{bottom:`-7px`,"&:before":{borderTop:`7px solid #bbb`},"&:after":{borderTop:`7px solid #f5f5f5`,bottom:`1px`}},".cm-tooltip-below &":{top:`-7px`,"&:before":{borderBottom:`7px solid #bbb`},"&:after":{borderBottom:`7px solid #f5f5f5`,top:`1px`}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:`#333338`,borderBottomColor:`#333338`},"&:after":{borderTopColor:`transparent`,borderBottomColor:`transparent`}}}),Dg={x:0,y:0},Og=ul.define({enables:[wg,Eg]});function kg(e,t){let n=e.plugin(wg);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var Ag=class extends tu{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Ag.prototype.elementClass=``,Ag.prototype.toDOM=void 0,Ag.prototype.mapMode=Qc.TrackBefore,Ag.prototype.startSide=Ag.prototype.endSide=-1,Ag.prototype.point=!0;var jg=1024,Mg=0,Ng=class{constructor(e,t){this.from=e,this.to=t}},Pg=class{constructor(e={}){this.id=Mg++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=Lg.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Pg.closedBy=new Pg({deserialize:e=>e.split(` `)}),Pg.openedBy=new Pg({deserialize:e=>e.split(` `)}),Pg.group=new Pg({deserialize:e=>e.split(` `)}),Pg.isolate=new Pg({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),Pg.contextHash=new Pg({perNode:!0}),Pg.lookAhead=new Pg({perNode:!0}),Pg.mounted=new Pg({perNode:!0});var Fg=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Pg.mounted.id]}},Ig=Object.create(null),Lg=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):Ig,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(Pg.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(Pg.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};Lg.none=new Lg(``,Object.create(null),0,8);var Rg=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new Lg(e.name,r,e.id,e.flags):e)}return new e(n)}},zg=new WeakMap,Bg=new WeakMap,Vg;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(Vg||={});var Hg=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=Fg.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new n_(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new n_(zg.get(this)||this.topNode);return r.moveTo(e,t),zg.set(this,r._tree),r}get topNode(){return new Jg(this,0,0,null)}resolve(e,t=0){let n=Kg(zg.get(this)||this.topNode,e,t,!1);return zg.set(this,n),n}resolveInner(e,t=0){let n=Kg(Bg.get(this)||this.topNode,e,t,!0);return Bg.set(this,n),n}resolveStack(e,t=0){return t_(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&Vg.IncludeAnonymous)>0;for(let e=this.cursor(a|Vg.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:s_(Lg.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(Lg.none,t,n,r)))}static build(e){return i_(e)}};Hg.empty=new Hg(Lg.none,[],[],0);var Ug=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},Wg=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Lg.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(Gg(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function Gg(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Kg(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof Jg&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:Vg.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof Jg&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var qg=class{cursor(e=0){return new n_(this,e)}getChild(e,t=null,n=null){let r=Yg(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return Yg(this,e,t,n)}resolve(e,t=0){return Kg(this,e,t,!1)}resolveInner(e,t=0){return Kg(this,e,t,!0)}matchContext(e){return Xg(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},Jg=class e extends qg{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&Vg.EnterBracketed&&l instanceof Hg&&(d=Fg.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||Gg(i,r,u,u+l.length)){if(l instanceof Wg){if(a&Vg.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new Qg(new Zg(o,l,t,u),null,e)}else if(a&Vg.IncludeAnonymous||!l.type.isAnonymous||r_(l)){let s;if(!(a&Vg.IgnoreMounts)&&(s=Fg.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&Vg.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&Vg.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&Vg.IgnoreOverlays)&&(i=Fg.get(this._tree))&&i.overlay){let a=t-this.from,o=r&Vg.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Yg(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function Xg(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var Zg=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Qg=class e extends qg{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&Vg.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new Hg(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function $g(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof Jg&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new e_(i,n)}var e_=class{constructor(e,t){this.heads=e,this.node=t}get next(){return $g(this.heads)}};function t_(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof Jg?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=Fg.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new Jg(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(Kg(o,t,n,!1))}}return i?$g(i):r}var n_=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Vg.EnterBracketed,e instanceof Jg)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof Jg?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Vg.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Vg.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Vg.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Vg.IncludeAnonymous||e instanceof Wg||!e.type.isAnonymous||r_(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Qg(this.buffer,t,this.stack[e]);return this.bufferNode=new Qg(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Xg(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Xg(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function r_(e){return e.children.some(e=>e instanceof Wg||!e.type.isAnonymous||r_(e))}function i_(e){let{buffer:t,nodeSet:n,maxBufferLength:r=jg,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new Ug(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,ee){let{id:b,start:x,end:S,size:te}=o,ne=l,C=c;if(te<0){if(o.next(),te==-1){let t=i[b];_.push(t),v.push(x-e);return}if(te==-3){c=b;return}if(te==-4){l=b;return}throw RangeError(`Unrecognized record size: ${te}`)}let re=s[b],ie,ae,oe=x-e;if(S-x<=r&&(ae=h(o.pos-t,y))){let t=new Uint16Array(ae.size-ae.skip),r=o.pos-ae.size,i=t.length;for(;o.pos>r;)i=g(ae.start,t,i);ie=new Wg(t,S-ae.start,n),oe=ae.start-e}else{let e=o.pos-te;o.next();let t=[],n=[],i=b>=a?b:-1,s=0,c=S;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,x,s,o.end,c,i,ne,C),s=t.length,c=o.end),o.next()):ee>2500?d(x,e,t,n):u(x,e,t,n,i,ee+1);if(i>=0&&s>0&&s<t.length&&p(t,n,x,s,x,c,i,ne,C),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(re,C);ie=s_(re,t,n,0,t.length,0,S-x,e,e)}else ie=m(re,t,n,S-x,ne-S,C)}_.push(ie),v.push(oe)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new Wg(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof Hg){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(Pg.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[Pg.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[Pg.lookAhead,i];o=o?[e].concat(o):[e]}return new Hg(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new Hg(s[e.topID],_.reverse(),v.reverse(),y)}var a_=new WeakMap;function o_(e,t){if(!e.isAnonymous||t instanceof Wg||t.type!=e)return 1;let n=a_.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Hg)){n=1;break}n+=o_(e,r)}a_.set(t,n)}return n}function s_(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=o_(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=o_(e,t[s]);for(s++;s<i;s++){let n=o_(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(s_(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var c_=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},l_=class{startParse(e,t,n){return typeof e==`string`&&(e=new u_(e)),n=n?n.length?n.map(e=>new Ng(e.from,e.to)):[new Ng(0,0)]:[new Ng(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},u_=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function d_(e){return(t,n,r,i)=>new g_(t,e,n,r,i)}var f_=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function p_(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError(`Invalid inner parse ranges given: `+JSON.stringify(e))}var m_=class{constructor(e,t,n,r,i,a,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}},h_=new Pg({perNode:!0}),g_=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new Hg(e.type,e.children,e.positions,e.length,e.propValues.concat([[h_,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Pg.mounted.id]=new Fg(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new x_(this.fragments),t=null,n=null,r=new n_(new Jg(this.baseTree,this.ranges[0].from,0,null),Vg.IncludeAnonymous|Vg.IgnoreMounts);scan:for(let i,a;;){let o=!0,s;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(t){let e=t.mounts.find(e=>e.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,a=n.to+e.pos;i>=r.from&&a<=r.to&&!t.ranges.some(e=>e.from<a&&e.to>i)&&t.ranges.push({from:i,to:a})}}o=!1}else if(n&&(a=__(n.ranges,r.from,r.to)))o=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(y_(r),t&&t.depth++,n&&n.depth++);let a=e.findMounts(r.from,i.parser);if(typeof i.overlay==`function`)t=new m_(i.parser,i.overlay,a,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let e=S_(this.ranges,i.overlay||(r.from<r.to?[new Ng(r.from,r.to)]:[]));e.length&&p_(e),(e.length||!i.overlay)&&this.inner.push(new f_(i.parser,e.length?i.parser.startParse(this.input,w_(a,e),e):i.parser.startParse(``),i.overlay?i.overlay.map(e=>new Ng(e.from-r.from,e.to-r.from)):null,!!i.bracketed,r.tree,e.length?e[0].from:r.from)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):o=!1}}else if(t&&(s=t.predicate(r))&&(s===!0&&(s=new Ng(r.from,r.to)),s.from<s.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==s.from?t.ranges[e]={from:t.ranges[e].from,to:s.to}:t.ranges.push(s)}if(o&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break scan;if(t&&!--t.depth){let e=S_(this.ranges,t.ranges);e.length&&(p_(e),this.inner.splice(t.index,0,new f_(t.parser,t.parser.startParse(this.input,w_(t.mounts,e),e),t.ranges.map(e=>new Ng(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function __(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function v_(e,t,n,r,i,a){if(t<n){let o=e.buffer[t+1];r.push(e.slice(t,n,o)),i.push(o-a)}}function y_(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),o=i.children[a],s=o.buffer,c=[a];function l(e,r,i,a,u,d){let f=n[d],p=[],m=[];v_(o,e,f,p,m,a);let h=s[f+1],g=s[f+2];c.push(p.length);let _=d?l(f+4,s[f+3],o.set.types[s[f]],h,g-h,d-1):t.toTree();return p.push(_),m.push(h-a),v_(o,s[f+3],r,p,m,a),new Hg(i,p,m,u)}i.children[a]=l(0,s.length,Lg.none,0,o.length,n.length-1);for(let t of c){let n=e.tree.children[t],r=e.tree.positions[t];e.yield(new Jg(n,r+e.from,t,e._tree))}}var b_=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Vg.IncludeAnonymous|Vg.IgnoreMounts|Vg.ExcludeBuffers)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)if(!(t.to>=n&&t.enter(n,1,Vg.IncludeAnonymous|Vg.IgnoreOverlays|Vg.ExcludeBuffers))){if(t.to<=n)t.next(!1)||(this.done=!0);else break}}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Hg)t=t.children[0];else break}return!1}},x_=class{constructor(e){if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let t=this.curFrag=e[0];this.curTo=t.tree.prop(h_)??t.to,this.inner=new b_(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=e.tree.prop(h_)??e.to,this.inner=new b_(e.tree,-e.offset)}}findMounts(e,t){let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=e.tree?.prop(Pg.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}};function S_(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let o=e[i-1].to,s=e[i].from;for(;a<r.length;a++){let e=r[a];if(e.from>=s)break;e.to<=o||(n||(r=n=t.slice()),e.from<o?(n[a]=new Ng(e.from,o),e.to>s&&n.splice(a+1,0,new Ng(s,e.to))):e.to>s?n[a--]=new Ng(s,e.to):n.splice(a--,1))}}return r}function C_(e,t,n,r){let i=0,a=0,o=!1,s=!1,c=-1e9,l=[];for(;;){let u=i==e.length?1e9:o?e[i].to:e[i].from,d=a==t.length?1e9:s?t[a].to:t[a].from;if(o!=s){let e=Math.max(c,n),t=Math.min(u,d,r);e<t&&l.push(new Ng(e,t))}if(c=Math.min(u,d),c==1e9)break;u==c&&(o?(o=!1,i++):o=!0),d==c&&(s?(s=!1,a++):s=!0)}return l}function w_(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let e=r+(i.overlay?i.overlay[0].from:0),o=e+i.tree.length,s=Math.max(a.from,e),c=Math.min(a.to,o);if(i.overlay){let o=C_(t,i.overlay.map(e=>new Ng(e.from+r,e.to+r)),s,c);for(let t=0,r=s;;t++){let s=t==o.length,l=s?c:o[t].from;if(l>r&&n.push(new c_(r,l,i.tree,-e,a.from>=r||a.openStart,a.to<=l||a.openEnd)),s)break;r=o[t].to}}else n.push(new c_(s,c,i.tree,-e,a.from>=e||a.openStart,a.to<=o||a.openEnd))}return n}var T_=0,E_=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=T_++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new O_(e);return e=>e.modified.indexOf(t)>-1?e:O_.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},D_=0,O_=class e{constructor(e){this.name=e,this.instances=[],this.id=D_++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&k_(n,e.modified));if(r)return r;let i=[],a=new E_(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=A_(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function k_(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function A_(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function j_(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new N_(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return M_.add(t)}var M_=new Pg({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new N_(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),N_=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};N_.empty=new N_([],2,null);function P_(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function F_(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function I_(e,t,n,r=0,i=e.length){let a=new L_(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var L_=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=R_(e)||N_.empty,u=F_(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(Pg.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function R_(e){let t=e.type.prop(M_);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Z=E_.define,z_=Z(),B_=Z(),V_=Z(B_),H_=Z(B_),U_=Z(),W_=Z(U_),G_=Z(U_),K_=Z(),q_=Z(K_),J_=Z(),Y_=Z(),X_=Z(),Z_=Z(X_),Q_=Z(),Q={comment:z_,lineComment:Z(z_),blockComment:Z(z_),docComment:Z(z_),name:B_,variableName:Z(B_),typeName:V_,tagName:Z(V_),propertyName:H_,attributeName:Z(H_),className:Z(B_),labelName:Z(B_),namespace:Z(B_),macroName:Z(B_),literal:U_,string:W_,docString:Z(W_),character:Z(W_),attributeValue:Z(W_),number:G_,integer:Z(G_),float:Z(G_),bool:Z(U_),regexp:Z(U_),escape:Z(U_),color:Z(U_),url:Z(U_),keyword:J_,self:Z(J_),null:Z(J_),atom:Z(J_),unit:Z(J_),modifier:Z(J_),operatorKeyword:Z(J_),controlKeyword:Z(J_),definitionKeyword:Z(J_),moduleKeyword:Z(J_),operator:Y_,derefOperator:Z(Y_),arithmeticOperator:Z(Y_),logicOperator:Z(Y_),bitwiseOperator:Z(Y_),compareOperator:Z(Y_),updateOperator:Z(Y_),definitionOperator:Z(Y_),typeOperator:Z(Y_),controlOperator:Z(Y_),punctuation:X_,separator:Z(X_),bracket:Z_,angleBracket:Z(Z_),squareBracket:Z(Z_),paren:Z(Z_),brace:Z(Z_),content:K_,heading:q_,heading1:Z(q_),heading2:Z(q_),heading3:Z(q_),heading4:Z(q_),heading5:Z(q_),heading6:Z(q_),contentSeparator:Z(K_),list:Z(K_),quote:Z(K_),emphasis:Z(K_),strong:Z(K_),link:Z(K_),monospace:Z(K_),strikethrough:Z(K_),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:Q_,documentMeta:Z(Q_),annotation:Z(Q_),processingInstruction:Z(Q_),definition:E_.defineModifier(`definition`),constant:E_.defineModifier(`constant`),function:E_.defineModifier(`function`),standard:E_.defineModifier(`standard`),local:E_.defineModifier(`local`),special:E_.defineModifier(`special`)};for(let e in Q){let t=Q[e];t instanceof E_&&(t.name=e)}P_([{tag:Q.link,class:`tok-link`},{tag:Q.heading,class:`tok-heading`},{tag:Q.emphasis,class:`tok-emphasis`},{tag:Q.strong,class:`tok-strong`},{tag:Q.keyword,class:`tok-keyword`},{tag:Q.atom,class:`tok-atom`},{tag:Q.bool,class:`tok-bool`},{tag:Q.url,class:`tok-url`},{tag:Q.labelName,class:`tok-labelName`},{tag:Q.inserted,class:`tok-inserted`},{tag:Q.deleted,class:`tok-deleted`},{tag:Q.literal,class:`tok-literal`},{tag:Q.string,class:`tok-string`},{tag:Q.number,class:`tok-number`},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],class:`tok-string2`},{tag:Q.variableName,class:`tok-variableName`},{tag:Q.local(Q.variableName),class:`tok-variableName tok-local`},{tag:Q.definition(Q.variableName),class:`tok-variableName tok-definition`},{tag:Q.special(Q.variableName),class:`tok-variableName2`},{tag:Q.definition(Q.propertyName),class:`tok-propertyName tok-definition`},{tag:Q.typeName,class:`tok-typeName`},{tag:Q.namespace,class:`tok-namespace`},{tag:Q.className,class:`tok-className`},{tag:Q.macroName,class:`tok-macroName`},{tag:Q.propertyName,class:`tok-propertyName`},{tag:Q.operator,class:`tok-operator`},{tag:Q.comment,class:`tok-comment`},{tag:Q.meta,class:`tok-meta`},{tag:Q.invalid,class:`tok-invalid`},{tag:Q.punctuation,class:`tok-punctuation`}]);var $_=new Pg;function ev(e){return ul.define({combine:e?t=>t.concat(e):void 0})}var tv=new Pg,nv=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,$l.prototype.hasOwnProperty(`tree`)||Object.defineProperty($l.prototype,"tree",{get(){return iv(this)}}),this.parser=t,this.extension=[pv.of(this),$l.languageData.of((e,t,n)=>{let r=rv(e,t,n),i=r.type.prop($_);if(!i)return[];let a=e.facet(i),o=r.type.prop(tv);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return rv(e,t,n).type.prop($_)==this.data}findRegions(e){let t=e.facet(pv);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop($_)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(Pg.mounted);if(i){if(i.tree.prop($_)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof Hg&&r(i,e.positions[n]+t)}};return r(iv(e),0),n}get allowsNesting(){return!0}};nv.setState=Rl.define();function rv(e,t,n){let r=e.facet(pv),i=iv(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,Vg.ExcludeBuffers|Vg.EnterBracketed))e.type.isTop&&(i=e);return i}function iv(e){let t=e.field(nv.state,!1);return t?t.tree:Hg.empty}var av=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},ov=null,sv=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],Hg.empty,0,r,[],null)}startParse(){return this.parser.startParse(new av(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Hg.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(c_.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(c_.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ov;ov=this;try{return e()}finally{ov=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=cv(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=c_.applyChanges(r,e),i=Hg.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=cv(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends l_{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=ov;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new Hg(Lg.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ov}};function cv(e,t,n){return c_.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var lv=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=sv.create(t.facet(pv).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};nv.state=_l.define({create:lv.init,update(e,t){for(let e of t.effects)if(e.is(nv.setState))return e.value;return t.startState.facet(pv)==t.state.facet(pv)?e.apply(t):lv.init(t.state)}});var uv=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(uv=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var dv=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,fv=Of.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(nv.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(nv.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=uv(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(nv.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!dv?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>dv&&dv()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:nv.setState.of(new lv(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>wf(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pv=ul.define({combine(e){return e.length?e[0]:null},enables:e=>[nv.state,fv,X.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),mv=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},hv=class e{constructor(e,t,n,r,i,a=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=r,this.loadFunc=i,this.support=a,this.loading=null}load(){return this.loading||=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e})}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw RangeError(`Must pass either 'load' or 'support' to LanguageDescription.of`);n=()=>Promise.resolve(r)}return new e(t.name,(t.alias||[]).concat(t.name).map(e=>e.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n){for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t}return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let n of e)if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let r=t.indexOf(e);if(r>-1&&(e.length>2||!/\w/.test(t[r-1])&&!/\w/.test(t[r+e.length])))return n}return null}},gv=ul.define(),_v=ul.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function vv(e){let t=e.facet(_v);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function yv(e,t){let n=``,r=e.tabSize,i=e.facet(_v)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function bv(e,t){e instanceof $l&&(e=new xv(e));for(let n of e.state.facet(gv)){let r=n(e,t);if(r!==void 0)return r}let n=iv(e.state);return n.length>=t?Cv(e,n,t):null}var xv=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=vv(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return bu(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Sv=new Pg;function Cv(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return wv(r,e,n)}function wv(e,t,n){for(let r=e;r;r=r.next){let e=Ev(r.node);if(e)return e(Ov.create(t,n,r))}return 0}function Tv(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Ev(e){let t=e.type.prop(Sv);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(Pg.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>jv(e,!0,1,void 0,n&&!Tv(e)?t.from:void 0)}return e.parent==null?Dv:null}function Dv(){return 0}var Ov=class e extends xv{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(kv(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return wv(this.context.next,this.base,this.pos)}};function kv(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Av(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function jv(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Av(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var Mv=ul.define(),Nv=new Pg,Pv=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=Eu.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof nv?e=>e.prop($_)==a.data:a?e=>e==a:void 0,this.style=P_(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Eu(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},Fv=ul.define(),Iv=ul.define({combine(e){return e.length?[e[0]]:null}});function Lv(e){let t=e.facet(Fv);return t.length?t:e.facet(Iv)}function Rv(e,t){let n=[Bv],r;return e instanceof Pv&&(e.module&&n.push(X.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(Iv.of(e)):r?n.push(Fv.computeN([X.darkTheme],t=>t.facet(X.darkTheme)==(r==`dark`)?[e]:[])):n.push(Fv.of(e)),n}var zv=class{constructor(e){this.markCache=Object.create(null),this.tree=iv(e.state),this.decorations=this.buildDeco(e,Lv(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=iv(e.state),n=Lv(e.state),r=n!=Lv(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return td.none;let n=new lu;for(let{from:r,to:i}of e.visibleRanges)I_(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=td.mark({class:r})))},r,i);return n.finish()}},Bv=bl.high(Of.fromClass(zv,{decorations:e=>e.decorations}));Q.meta,Q.link,Q.heading,Q.emphasis,Q.strong,Q.strikethrough,Q.keyword,Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName,Q.literal,Q.inserted,Q.string,Q.deleted,Q.regexp,Q.escape,Q.string,Q.variableName,Q.variableName,Q.typeName,Q.namespace,Q.className,Q.variableName,Q.macroName,Q.propertyName,Q.comment,Q.invalid;var Vv=1e4,Hv=`()[]{}`,Uv=new Pg;function Wv(e,t,n){let r=e.prop(t<0?Pg.openedBy:Pg.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function Gv(e){let t=e.type.prop(Uv);return t?t(e.node):e}function Kv(e,t,n,r={}){let i=r.maxScanDistance||Vv,a=r.brackets||Hv,o=iv(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=Wv(r.type,n,a);if(i&&r.from<r.to){let o=Gv(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return qv(e,t,n,r,o,i,a)}}return Jv(e,t,n,o,s.type,i,a)}function qv(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=Gv(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Wv(u.type,n,o))l++;else if(Wv(u.type,-n,o)){if(l==0){let e=Gv(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function Jv(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var Yv=Object.create(null),Xv=[Lg.none],Zv=[],Qv=Object.create(null),$v=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])$v[e]=ty(Yv,t);function ey(e,t){Zv.indexOf(e)>-1||(Zv.push(e),console.warn(t))}function ty(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||Q[n];r?typeof r==`function`?t.length?t=t.map(r):ey(n,`Modifier ${n} used at start of tag`):t.length?ey(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:ey(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=Qv[i];if(a)return a.id;let o=Qv[i]=Lg.define({id:Xv.length,name:r,props:[j_({[r]:n})]});return Xv.push(o),o.id}zd.RTL,zd.LTR;var ny=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=iv(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(cy(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function ry(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function iy(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=ry(t)+ry(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function ay(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:iy(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}var oy=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function sy(e){return e.selection.main.from}function cy(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var ly=Fl.define();function uy(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:J.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var dy=new WeakMap;function fy(e){if(!Array.isArray(e))return e;let t=dy.get(e);return t||dy.set(e,t=ay(e)),t}var py=Rl.define(),my=Rl.define(),hy=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Jc(e,t),r=Xc(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(Jc(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=Jc(e,0),i=Xc(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=Jc(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=Xc(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=Jc(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=Yc(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=Xc(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?Xc(Jc(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},gy=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},_y=ul.define({combine(e){return eu(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:yy,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>vy(e(n),t(n)),optionClass:(e,t)=>n=>vy(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function vy(e,t){return e?t?e+` `+t:e:t}function yy(e,t,n,r,i,a){let o=e.textDirection==zd.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var by=Rl.define();function xy(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function Sy(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var Cy=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(_y);this.optionContent=xy(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Sy(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:by.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(_y).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:my.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=Sy(r.length,i,e.state.facet(_y).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Sy(t.options.length,t.selected,this.view.state.facet(_y).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>wf(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Ty(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(_y).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function wy(e,t){return n=>new Cy(n,e,t)}function Ty(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function Ey(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function Dy(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(_y);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new oy(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new gy(n):new hy(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new oy(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):Ey(e.completion)>Ey(c)&&(s[s.length-1]=e),c=e.completion}return s}var Oy=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,Ny(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=Dy(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(_y).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,Ny(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Hy,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ky=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Py,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(_y),i=(r.override||n.languageDataAt(`autocomplete`,sy(n)).map(fy)).map(e=>(this.active.find(t=>t.source==e)||new Iy(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(zy));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Ay(i,this.active)||o?a=Oy.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new Iy(e.source,0):e));for(let e of t.effects)e.is(by)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?jy:My}};function Ay(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var jy={"aria-autocomplete":`list`},My={};function Ny(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Py=[];function Fy(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(ly);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var Iy=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=Fy(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(py))i=new e(i.source,1,n.value);else if(n.is(my))i=new e(i.source,0);else if(n.is(zy))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(sy(e.state))}},Ly=class e extends Iy{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=sy(t.state);if(o>a||!r||n&2&&(sy(t.startState)==this.from||o<this.limit))return new Iy(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return Ry(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new ny(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??sy(t.state)):new Iy(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new Iy(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function Ry(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):cy(e,!0).test(i)}var zy=Rl.define({map(e,t){return e.map(e=>e.map(t))}}),By=_l.define({create(){return ky.start()},update(e,t){return e.update(t)},provide:e=>[Og.from(e,e=>e.tooltip),X.contentAttributes.from(e,e=>e.attrs)]});function Vy(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(By).active.find(e=>e.source==t.source);return r instanceof Ly&&(typeof n==`string`?e.dispatch({...uy(e.state,n,r.from,r.to),annotations:ly.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var Hy=wy(By,Vy);function Uy(e,t=`option`){return n=>{let r=n.state.field(By,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(_y).interactionDelay)return!1;let i=1,a;t==`page`&&(a=kg(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:by.of(s)}),!0}}var Wy=e=>{let t=e.state.field(By,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(_y).interactionDelay?!1:Vy(e,t.open.options[t.open.selected])},Gy=e=>e.state.field(By,!1)?(e.dispatch({effects:py.of(!0)}),!0):!1,Ky=e=>{let t=e.state.field(By,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:my.of(null)}),!0)},qy=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Jy=50,Yy=1e3,Xy=Of.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(By).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(By),n=e.state.facet(_y);if(!e.selectionSet&&!e.docChanged&&e.startState.field(By)==t)return;let r=e.transactions.some(e=>{let t=Fy(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Jy&&Date.now()-n.time>Yy){for(let e of n.context.abortListeners)try{e()}catch(e){wf(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(py)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(By);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_y).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new ny(t,sy(t),e.explicit,this.view),r=new qy(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:my.of(null)}),wf(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_y).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(_y),n=this.view.state.field(By);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=sy(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new Ly(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new Iy(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:zy.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(By,!1);if(t&&t.tooltip&&this.view.state.facet(_y).closeOnBlur){let n=t.open&&kg(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:my.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:py.of(!1)}),20),this.composing=0}}}),Zy=typeof navigator==`object`&&/Win/.test(navigator.platform),Qy=bl.highest(X.domEventHandlers({keydown(e,t){let n=t.state.field(By,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Zy&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&Vy(t,r),!1}})),$y=X.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),eb={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},tb=Rl.define({map(e,t){return t.mapPos(e,-1,Qc.TrackAfter)??void 0}}),nb=new class extends tu{};nb.startSide=1,nb.endSide=-1;var rb=_l.define({create(){return ou.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(tb)&&(e=e.update({add:[nb.range(n.value,n.value+1)]}));return e}});function ib(){return[lb,rb]}var ab=`()[]{}<>«»»«[]{}`;function ob(e){for(let t=0;t<16;t+=2)if(ab.charCodeAt(t)==e)return ab.charAt(t+1);return Yc(e<128?e:e+1)}function sb(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||eb}var cb=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),lb=X.inputHandler.of((e,t,n,r)=>{if((cb?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&Xc(Jc(r,0))==1||t!=i.from||n!=i.to)return!1;let a=db(e.state,r);return a?(e.dispatch(a),!0):!1}),ub=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=sb(e,e.selection.main.head).brackets||eb.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=mb(e.doc,t.head);for(let i of n)if(i==r&&pb(e.doc,t.head)==ob(Jc(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:J.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function db(e,t){let n=sb(e,e.selection.main.head),r=n.brackets||eb.brackets;for(let i of r){let a=ob(Jc(i,0));if(t==i)return a==i?_b(e,i,r.indexOf(i+i+i)>-1,n):hb(e,i,a,n.before||eb.before);if(t==a&&fb(e,e.selection.main.from))return gb(e,i,a)}return null}function fb(e,t){let n=!1;return e.field(rb).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function pb(e,t){let n=e.sliceString(t,t+2);return n.slice(0,Xc(Jc(n,0)))}function mb(e,t){let n=e.sliceString(t-2,t);return Xc(Jc(n,0))==n.length?n:n.slice(1)}function hb(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:tb.of(a.to+t.length),range:J.range(a.anchor+t.length,a.head+t.length)};let o=pb(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:tb.of(a.head+t.length),range:J.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function gb(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&pb(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:J.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function _b(e,t,n,r){let i=r.stringPrefixes||eb.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:tb.of(r.to+t.length),range:J.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=pb(e.doc,o),c;if(s==t){if(vb(e,o))return{changes:{insert:t+t,from:o},effects:tb.of(o+t.length),range:J.cursor(o+t.length)};if(fb(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:J.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=bb(e,o-2*t.length,i))>-1&&vb(e,c))return{changes:{insert:t+t+t+t,from:o},effects:tb.of(o+t.length),range:J.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=Jl.Word&&bb(e,o,i)>-1&&!yb(e,o,t,i))return{changes:{insert:t+t,from:o},effects:tb.of(o+t.length),range:J.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function vb(e,t){let n=iv(e).resolveInner(t+1);return n.parent&&n.from==t}function yb(e,t,n,r){let i=iv(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function bb(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=Jl.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=Jl.Word)return n}return-1}function xb(e={}){return[Qy,By,_y.of(e),Xy,Cb,$y]}var Sb=[{key:`Ctrl-Space`,run:Gy},{mac:"Alt-`",run:Gy},{mac:`Alt-i`,run:Gy},{key:`Escape`,run:Ky},{key:`ArrowDown`,run:Uy(!0)},{key:`ArrowUp`,run:Uy(!1)},{key:`PageDown`,run:Uy(!0,`page`)},{key:`PageUp`,run:Uy(!1,`page`)},{key:`Enter`,run:Wy}],Cb=bl.highest(Gh.computeN([_y],e=>e.facet(_y).defaultKeymap?[Sb]:[])),wb=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=kb(e.state,n.from);return r.line?Eb(e):r.block?Ob(e):!1};function Tb(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var Eb=Tb(Pb,0),Db=Tb(Nb,0),Ob=Tb((e,t)=>Nb(e,t,Mb(t)),0);function kb(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var Ab=50;function jb(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-Ab,r),o=e.sliceDoc(i,i+Ab),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+Ab),d=e.sliceDoc(i-Ab,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function Mb(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function Nb(e,t,n=t.selection.ranges){let r=n.map(e=>kb(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>jb(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function Pb(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=kb(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var Fb=Fl.define(),Ib=Fl.define(),Lb=ul.define(),Rb=ul.define({combine(e){return eu(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),zb=_l.define({create(){return ix.empty},update(e,t){let n=t.state.facet(Rb),r=t.annotation(Fb);if(r){let i=Kb.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?qb(o,o.length,n.minDepth,i):$b(o,t.startState.selection),new ix(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(Ib);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(zl.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=Kb.fromTransaction(t),o=t.annotation(zl.time),s=t.annotation(zl.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new ix(e.done.map(Kb.fromJSON),e.undone.map(Kb.fromJSON))}});function Bb(e={}){return[zb,Rb.of(e),X.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?Hb:e.inputType==`historyRedo`?Ub:null;return n?(e.preventDefault(),n(t)):!1}})]}function Vb(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(zb,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var Hb=Vb(0,!1),Ub=Vb(1,!1),Wb=Vb(0,!0),Gb=Vb(1,!0),Kb=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&el.fromJSON(t.changes),[],t.mapped&&$c.fromJSON(t.mapped),t.startSelection&&J.fromJSON(t.startSelection),t.selectionsAfter.map(J.fromJSON))}static fromTransaction(t,n){let r=Zb;for(let e of t.startState.facet(Lb)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Zb)}static selection(t){return new e(void 0,Zb,void 0,void 0,t)}};function qb(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function Jb(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Yb(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Xb(e,t){return e.length?t.length?e.concat(t):e:t}var Zb=[],Qb=200;function $b(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Qb));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),qb(e,e.length-1,1e9,n.setSelAfter(r)))}return[Kb.selection([t])]}function ex(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function tx(e,t){if(!e.length)return e;let n=e.length,r=Zb;for(;n;){let i=nx(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Kb.selection(r)]:Zb}function nx(e,t,n){let r=Xb(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Zb,n);if(!e.changes)return Kb.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new Kb(i,Rl.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var rx=/^(input\.type|delete)($|\.)/,ix=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||rx.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,Jb(s.changes,t.changes))||r==`input.type.compose`)?qb(o,o.length-1,i.minDepth,new Kb(t.changes.compose(s.changes),Xb(Rl.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Zb)):qb(o,o.length,i.minDepth,t),new e(o,Zb,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Zb;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Yb(a[a.length-1],t)?this:new e($b(this.done,t),this.undone,n,r)}addMapping(t){return new e(tx(this.done,t),tx(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Fb.of({side:e,rest:ex(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Zb:r.slice(0,r.length-1);return i.mapped&&(n=tx(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Fb.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};ix.empty=new ix(Zb,Zb);var ax=[{key:`Mod-z`,run:Hb,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:Ub,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:Ub,preventDefault:!0},{key:`Mod-u`,run:Wb,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:Gb,preventDefault:!0}];function ox(e,t){return J.create(e.ranges.map(t),e.mainIndex)}function sx(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function cx({state:e,dispatch:t},n){let r=ox(e.selection,n);return!r.eq(e.selection,!0)&&(t(sx(e,r)),!0)}function lx(e,t){return J.cursor(t?e.to:e.from)}function ux(e,t){return cx(e,n=>n.empty?e.moveByChar(n,t):lx(n,t))}function dx(e){return e.textDirectionAt(e.state.selection.main.head)==zd.LTR}var fx=e=>ux(e,!dx(e)),px=e=>ux(e,dx(e));function mx(e,t){return cx(e,n=>n.empty?e.moveByGroup(n,t):lx(n,t))}var hx=e=>mx(e,!dx(e)),gx=e=>mx(e,dx(e));typeof Intl<`u`&&Intl.Segmenter;function _x(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function vx(e,t,n){let r=iv(e).resolveInner(t.head),i=n?Pg.closedBy:Pg.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;_x(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Kv(e,r.from,1):Kv(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,J.cursor(s,n?-1:1)}var yx=e=>cx(e,t=>vx(e.state,t,!dx(e))),bx=e=>cx(e,t=>vx(e.state,t,dx(e)));function xx(e,t){return cx(e,n=>{if(!n.empty)return lx(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var Sx=e=>xx(e,!1),Cx=e=>xx(e,!0);function wx(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(X.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function Tx(e,t){let n=wx(e),{state:r}=e,i=ox(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):lx(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=X.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(sx(r,i),{effects:a}),!0}var Ex=e=>Tx(e,!1),Dx=e=>Tx(e,!0);function Ox(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=J.cursor(r.from+n))}return i}var kx=e=>cx(e,t=>Ox(e,t,!0)),Ax=e=>cx(e,t=>Ox(e,t,!1)),jx=e=>cx(e,t=>Ox(e,t,!dx(e))),Mx=e=>cx(e,t=>Ox(e,t,dx(e))),Nx=e=>cx(e,t=>e.moveToLineBoundary(t,!1,!1)),Px=e=>cx(e,t=>e.moveToLineBoundary(t,!0,!1));function Fx(e,t,n){let r=!1,i=ox(e.selection,t=>{let i=Kv(e,t.head,-1)||Kv(e,t.head,1)||t.head>0&&Kv(e,t.head-1,1)||t.head<e.doc.length&&Kv(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?J.range(t.anchor,a):J.cursor(a)});return r?(t(sx(e,i)),!0):!1}var Ix=({state:e,dispatch:t})=>Fx(e,t,!1);function Lx(e,t,n){let r=ox(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=J.range(e.head,e.anchor));let r=n(e);return J.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(sx(e.state,r)),!0)}function Rx(e,t){return Lx(e,t,n=>e.moveByChar(n,t))}var zx=e=>Rx(e,!dx(e)),Bx=e=>Rx(e,dx(e));function Vx(e,t){return Lx(e,t,n=>e.moveByGroup(n,t))}var Hx=e=>Vx(e,!dx(e)),Ux=e=>Vx(e,dx(e)),Wx=e=>{let t=!dx(e);return Lx(e,t,n=>vx(e.state,n,t))},Gx=e=>{let t=dx(e);return Lx(e,t,n=>vx(e.state,n,t))};function Kx(e,t){return Lx(e,t,n=>e.moveVertically(n,t))}var qx=e=>Kx(e,!1),Jx=e=>Kx(e,!0);function Yx(e,t){return Lx(e,t,n=>e.moveVertically(n,t,wx(e).height))}var Xx=e=>Yx(e,!1),Zx=e=>Yx(e,!0),Qx=e=>Lx(e,!0,t=>Ox(e,t,!0)),$x=e=>Lx(e,!1,t=>Ox(e,t,!1)),eS=e=>{let t=!dx(e);return Lx(e,t,n=>Ox(e,n,t))},tS=e=>{let t=dx(e);return Lx(e,t,n=>Ox(e,n,t))},nS=e=>Lx(e,!1,t=>J.cursor(e.lineBlockAt(t.head).from)),rS=e=>Lx(e,!0,t=>J.cursor(e.lineBlockAt(t.head).to)),iS=({state:e,dispatch:t})=>(t(sx(e,{anchor:0})),!0),aS=({state:e,dispatch:t})=>(t(sx(e,{anchor:e.doc.length})),!0),oS=({state:e,dispatch:t})=>(t(sx(e,{anchor:e.selection.main.anchor,head:0})),!0),sS=({state:e,dispatch:t})=>(t(sx(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),cS=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),lS=({state:e,dispatch:t})=>{let n=OS(e).map(({from:t,to:n})=>J.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:J.create(n),userEvent:`select`})),!0},uS=({state:e,dispatch:t})=>{let n=ox(e.selection,t=>{let n=iv(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return J.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(sx(e,n)),!0)};function dS(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(sx(n,J.create(i,i.length-1))),!0)}var fS=e=>dS(e,!1),pS=e=>dS(e,!0),mS=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=J.create([n.main]):n.main.empty||(r=J.create([J.cursor(n.main.head)])),r?(t(sx(e,r)),!0):!1};function hS(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=gS(e,o,!1)):o>i&&(n=`delete.forward`,o=gS(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=gS(e,i,!1),a=gS(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:J.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?X.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function gS(e,t,n){if(e instanceof X)for(let r of e.state.facet(X.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var _S=(e,t,n)=>hS(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=bu(s,a.tabSize)%vv(a)||vv(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=Gc(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Gc(o.text,c-o.from,!1,!1)+o.from);return c}),vS=e=>_S(e,!1,!0),yS=e=>_S(e,!0,!1),bS=(e,t)=>hS(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Gc(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),xS=e=>bS(e,!1),SS=e=>bS(e,!0),CS=e=>hS(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),wS=e=>hS(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),TS=e=>hS(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),ES=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Pc.of([``,``])},range:J.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},DS=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Gc(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:Gc(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:J.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function OS(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function kS(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of OS(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(J.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(J.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:J.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var AS=({state:e,dispatch:t})=>kS(e,t,!1),jS=({state:e,dispatch:t})=>kS(e,t,!0);function MS(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of OS(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var NS=({state:e,dispatch:t})=>MS(e,t,!1),PS=({state:e,dispatch:t})=>MS(e,t,!0),FS=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(OS(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=ox(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function IS(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=iv(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Pg.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var LS=zS(!1),RS=zS(!0);function zS(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&IS(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new xv(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=bv(s,r);for(c??=bu(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,yv(t,c)];return o&&l.push(yv(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:Pc.of(l)},range:J.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function BS(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:J.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var VS=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new xv(e,{overrideIndentation:e=>n[e]??-1}),i=BS(e,(t,i,a)=>{let o=bv(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=yv(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},HS=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(BS(e,(t,n)=>{n.push({from:t.from,insert:e.facet(_v)})}),{userEvent:`input.indent`})),!0),US=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(BS(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=bu(r,e.tabSize),a=0,o=yv(e,Math.max(0,i-vv(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),WS=e=>(e.setTabFocusMode(),!0),GS=[{key:`Ctrl-b`,run:fx,shift:zx,preventDefault:!0},{key:`Ctrl-f`,run:px,shift:Bx},{key:`Ctrl-p`,run:Sx,shift:qx},{key:`Ctrl-n`,run:Cx,shift:Jx},{key:`Ctrl-a`,run:Nx,shift:nS},{key:`Ctrl-e`,run:Px,shift:rS},{key:`Ctrl-d`,run:yS},{key:`Ctrl-h`,run:vS},{key:`Ctrl-k`,run:CS},{key:`Ctrl-Alt-h`,run:xS},{key:`Ctrl-o`,run:ES},{key:`Ctrl-t`,run:DS},{key:`Ctrl-v`,run:Dx}],KS=[{key:`ArrowLeft`,run:fx,shift:zx,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:hx,shift:Hx,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:jx,shift:eS,preventDefault:!0},{key:`ArrowRight`,run:px,shift:Bx,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:gx,shift:Ux,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:Mx,shift:tS,preventDefault:!0},{key:`ArrowUp`,run:Sx,shift:qx,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:iS,shift:oS},{mac:`Ctrl-ArrowUp`,run:Ex,shift:Xx},{key:`ArrowDown`,run:Cx,shift:Jx,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:aS,shift:sS},{mac:`Ctrl-ArrowDown`,run:Dx,shift:Zx},{key:`PageUp`,run:Ex,shift:Xx},{key:`PageDown`,run:Dx,shift:Zx},{key:`Home`,run:Ax,shift:$x,preventDefault:!0},{key:`Mod-Home`,run:iS,shift:oS},{key:`End`,run:kx,shift:Qx,preventDefault:!0},{key:`Mod-End`,run:aS,shift:sS},{key:`Enter`,run:LS,shift:LS},{key:`Mod-a`,run:cS},{key:`Backspace`,run:vS,shift:vS,preventDefault:!0},{key:`Delete`,run:yS,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:xS,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:SS,preventDefault:!0},{mac:`Mod-Backspace`,run:wS,preventDefault:!0},{mac:`Mod-Delete`,run:TS,preventDefault:!0}].concat(GS.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),qS=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:yx,shift:Wx},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:bx,shift:Gx},{key:`Alt-ArrowUp`,run:AS},{key:`Shift-Alt-ArrowUp`,run:NS},{key:`Alt-ArrowDown`,run:jS},{key:`Shift-Alt-ArrowDown`,run:PS},{key:`Mod-Alt-ArrowUp`,run:fS},{key:`Mod-Alt-ArrowDown`,run:pS},{key:`Escape`,run:mS},{key:`Mod-Enter`,run:RS},{key:`Alt-l`,mac:`Ctrl-l`,run:lS},{key:`Mod-i`,run:uS,preventDefault:!0},{key:`Mod-[`,run:US},{key:`Mod-]`,run:HS},{key:`Mod-Alt-\\`,run:VS},{key:`Shift-Mod-k`,run:FS},{key:`Shift-Mod-\\`,run:Ix},{key:`Mod-/`,run:wb},{key:`Alt-A`,mac:`Ctrl-A`,run:Db},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:WS}].concat(KS),JS={key:`Tab`,run:HS,shift:US},YS=class e{static create(t,n,r,i,a){let o=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,o,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[Pg.contextHash,r]]}addChild(e,t){e.prop(Pg.contextHash)!=this.hash&&(e=new Hg(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new Hg(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new Hg(Lg.none,e,t,n,this.hashProp)})}},$;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})($||={});var XS=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},ZS=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return tC(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function QS(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==$.OrderedList?cC:sC)(n,t,!1);return r>0&&(e.type!=$.BulletList||aC(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var $S={[$.Blockquote](e,t,n){return n.next==62&&(n.markers.push(IC($.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(eC(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[$.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[$.OrderedList]:QS,[$.BulletList]:QS,[$.Document](){return!0}};function eC(e){return e==32||e==9||e==10||e==13}function tC(e,t=0){for(;t<e.length&&eC(e.charCodeAt(t));)t++;return t}function nC(e,t,n){for(;t>n&&eC(e.charCodeAt(t-1));)t--;return t}function rC(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function iC(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function aC(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!eC(n))return-1}return n&&e.next==45&&uC(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(SC.SetextHeading)>-1||r<3?-1:1}function oC(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function sC(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||eC(e.text.charCodeAt(e.pos+1)))&&(!n||oC(t,$.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function cC(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!eC(e.text.charCodeAt(r+1))||n&&!oC(t,$.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function lC(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function uC(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&eC(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var dC=/^[ \t]*$/,fC=/-->/,pC=/\?>/,mC=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,fC],[/^\s*<\?/,pC],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,dC],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,dC]];function hC(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=mC.length-+!!n;e<t;e++)if(mC[e][0].test(r))return e;return-1}function gC(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),i=e.countIndent(r,t,n);return i>=n+5||r==e.text.length?n+1:i}function _C(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==$.CodeText?e[r].to=n:e.push(IC($.CodeText,t,n))}var vC={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(_C(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){_C(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==$.CodeText?_C(o,e.from,e.to):o.push(e);s=[]}_C(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&_C(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=$.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish($.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=rC(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=nC(t.text,t.text.length,o),c=[IC($.CodeMark,r,r+a)];o<s&&c.push(IC($.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&_C(c,e.lineStart-1,e.lineStart),c.push(IC($.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}{o=!0,n||(_C(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(_C(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish($.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=iC(t);return n<0?!1:(e.startContext($.Blockquote,t.pos),e.addNode($.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(aC(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode($.HorizontalRule,n),!0},BulletList(e,t){let n=sC(t,e,!1);if(n<0)return!1;e.block.type!=$.BulletList&&e.startContext($.BulletList,t.basePos,t.next);let r=gC(t,t.pos+1);return e.startContext($.ListItem,t.basePos,r-t.baseIndent),e.addNode($.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=cC(t,e,!1);if(n<0)return!1;e.block.type!=$.OrderedList&&e.startContext($.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=gC(t,t.pos+n);return e.startContext($.ListItem,t.basePos,r-t.baseIndent),e.addNode($.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=lC(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=nC(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!eC(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write($.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write($.HeaderMark,o-r,a-r);let c=s.finish($.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=hC(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=mC[n][1],a=[],o=i!=dC;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==fC?$.CommentBlock:i==pC?$.ProcessingInstructionBlock:$.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},yC=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
530
+ `+t.scrub(),i=this.advance(r);return i>-1&&i<r.length&&this.complete(e,n,i)}finish(e,t){return(this.stage==2||this.stage==3)&&tC(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,n){return e.addLeafElement(t,IC($.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(JC(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(IC($.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(KC(e,tC(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=tC(e,this.pos),n=0;if(t>this.pos){let r=qC(e,t,this.start);if(r){let t=bC(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=bC(e,this.pos),n>0&&n<e.length?n:-1}else return bC(e,this.pos)}};function bC(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!eC(n))return-1}return t}var xC=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:uC(t),i=t.next;if(r<0)return!1;let a=IC($.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,IC(i==61?$.SetextHeading1:$.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},SC={LinkReference(e,t){return t.content.charCodeAt(0)==91?new yC(t):null},SetextHeading(){return new xC}},CC=[(e,t)=>lC(t)>=0,(e,t)=>rC(t)>=0,(e,t)=>iC(t)>=0,(e,t)=>sC(t,e,!0)>=0,(e,t)=>cC(t,e,!0)>=0,(e,t)=>aC(t,e,!0)>=0,(e,t)=>hC(t,e,!0)>=0],wC={text:``,end:0},TC=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new ZS,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=YS.create($.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new QC(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new XS(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
531
+ `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=$C(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=wC;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+$[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
532
+ `?``:t;else{let e=t.indexOf(`
533
+ `);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=YS.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new Hg(this.parser.nodeSet.types[e],MC,MC,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(XC(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?EC(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=XC(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish($.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?IC(this.parser.getNodeType(e),t,n,r):new FC(e,t)}get buffer(){return new NC(this.parser.nodeSet)}};function EC(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=EC(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new Hg(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var DC=class e extends l_{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new TC(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=kC(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(OC(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=$.ATXHeading1&&c<=$.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(Lg.define({id:c,name:n,props:l&&[[Pg.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof E_?t[n]=s:Object.assign(t,s))}r=new Rg(e),t&&(r=r.extend(j_(t)))}if(OC(n.props)&&(r=r.extend(...n.props)),OC(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(OC(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?AC(s,e.before):e.after?AC(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&u.push(e.endLeaf)}if(OC(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?AC(l,e.before):e.after?AC(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(d=d.concat(n.wrap)),new e(r,a,o,s,u,i,c,l,d)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new YC(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function OC(e){return e!=null&&e.length>0}function kC(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=kC(e[0]);if(e.length==1)return t;let n=kC(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||MC).concat(t||MC),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function AC(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var jC=[Lg.none];for(let e=1,t;t=$[e];e++)jC[e]=Lg.define({id:e,name:t,props:e>=$.Escape?[]:[[Pg.group,e in $S?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var MC=[],NC=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return Hg.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},PC=class{constructor(e,t,n,r=MC){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new NC(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},FC=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return MC}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function IC(e,t,n,r){return new PC(e,t,n,r)}var LC={resolve:`Emphasis`,mark:`EmphasisMark`},RC={resolve:`Emphasis`,mark:`EmphasisMark`},zC={},BC={},VC=class{constructor(e,t,n,r,i=n-t){this.type=e,this.from=t,this.to=n,this.side=r,this.size=i}},HC=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,UC=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{UC=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var WC={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(HC.charCodeAt(t)==r)return e.append(IC($.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(IC($.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(IC($.InlineCode,n,r+1,[IC($.CodeMark,n,n+i),IC($.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(IC($.Autolink,n,n+1+i[0].length,[IC($.LinkMark,n,n+1),IC($.URL,n+1,n+i[0].length),IC($.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(IC($.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(IC($.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(IC($.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=UC.test(i),s=UC.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new VC(t==95?LC:RC,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(IC($.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(IC($.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new VC(zC,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new VC(BC,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof VC&&(r.type==zC||r.type==BC)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=GC(e,i,r.type==zC?$.Link:$.Image,r.from,n+1);if(r.type==zC)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof VC&&t.type==zC&&(t.side=0)}return a.to}}return-1}};function GC(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(IC($.LinkMark,r,r+(n==$.Image?2:1))),t.push(IC($.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=KC(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=qC(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(IC($.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(IC($.LinkMark,n,s)))}else if(o==91){let n=JC(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return IC(n,r,s,t)}function KC(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return IC($.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(eC(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?IC($.URL,t+n,i+n):i==e.length&&null}}function qC(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return IC($.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function JC(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return!r&&IC($.LinkLabel,t+n,a+1+n);else{if(r&&!eC(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var YC=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new VC(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof VC&&(t.type==zC||t.type==BC))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof VC&&n.type.resolve&&n.side&2))continue;let r=n.type==LC||n.type==RC,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof VC&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.size+n.size)%3==0&&(e.size%3||n.size%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof PC&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new VC(a.type,a.from,l,a.side,a.size):null,(this.parts[t]=r&&n.to!=u?new VC(n.type,u,n.to,n.side,n.size):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof PC&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof VC&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof VC?t:null}skipSpace(e){return tC(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?IC(this.parser.getNodeType(e),t,n,r):new FC(e,t)}};YC.linkStart=zC,YC.imageStart=BC,YC.emphasisAsterisk=RC,YC.emphasisUnderscore=LC;function XC(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof PC&&(n[r]=new PC(t.type,t.from,t.to,XC(t.children,[e])))}else n.splice(r++,0,e)}return n}var ZC=[$.CodeBlock,$.ListItem,$.OrderedList,$.BulletList],QC=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
534
+ `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Pg.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=$C(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new Hg(e.parser.nodeSet.types[$.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(ZC.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function $C(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var ew=j_({"Blockquote/...":Q.quote,HorizontalRule:Q.contentSeparator,"ATXHeading1/... SetextHeading1/...":Q.heading1,"ATXHeading2/... SetextHeading2/...":Q.heading2,"ATXHeading3/...":Q.heading3,"ATXHeading4/...":Q.heading4,"ATXHeading5/...":Q.heading5,"ATXHeading6/...":Q.heading6,"Comment CommentBlock":Q.comment,Escape:Q.escape,Entity:Q.character,"Emphasis/...":Q.emphasis,"StrongEmphasis/...":Q.strong,"Link/... Image/...":Q.link,"OrderedList/... BulletList/...":Q.list,"BlockQuote/...":Q.quote,"InlineCode CodeText":Q.monospace,"URL Autolink":Q.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Q.processingInstruction,"CodeInfo LinkLabel":Q.labelName,LinkTitle:Q.string,Paragraph:Q.content}),tw=new DC(new Rg(jC).extend(ew),Object.keys(vC).map(e=>vC[e]),Object.keys(vC).map(e=>SC[e]),Object.keys(vC),CC,$S,Object.keys(WC).map(e=>WC[e]),Object.keys(WC),[]);function nw(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function rw(e){let{codeParser:t,htmlParser:n}=e;return{wrap:d_((e,r)=>{let i=e.type.id;if(t&&(i==$.CodeBlock||i==$.FencedCode)){let n=``;if(i==$.FencedCode){let t=e.node.getChild($.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==$.CodeText,bracketed:i==$.FencedCode}}else if(n&&(i==$.HTMLBlock||i==$.HTMLTag||i==$.CommentBlock))return{parser:n,overlay:nw(e.node,e.from,e.to)};return null})}}var iw={resolve:`Strikethrough`,mark:`StrikethroughMark`},aw={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":Q.strikethrough}},{name:`StrikethroughMark`,style:Q.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=UC.test(r),c=UC.test(i);return e.addDelimiter(iw,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function ow(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function sw(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var cw=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,lw=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&cw.test(r=t.text.slice(t.pos))){let i=[];ow(e,n.content,0,i,n.start)==ow(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];ow(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},uw={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":Q.heading}},`TableRow`,{name:`TableCell`,style:Q.content},{name:`TableDelimiter`,style:Q.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return sw(t.content,0)?new lw:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof lw)||!sw(t.text,t.basePos))return!1;let r=e.peekLine();return cw.test(r)&&ow(e,t.text,t.basePos)==ow(e,r,t.basePos)},before:`SetextHeading`}]},dw=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},fw={defineNodes:[{name:`Task`,block:!0,style:Q.list},{name:`TaskMarker`,style:Q.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new dw:null},after:`SetextHeading`}]},pw=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,mw=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,hw=/[\w-]+\.[\w-]+($|[/:])/,gw=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,_w=/\/[a-zA-Z\d@.]+/gy;function vw(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function yw(e,t){mw.lastIndex=t;let n=mw.exec(e);if(!n||hw.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&vw(e,t,r,`)`)>vw(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function bw(e,t){gw.lastIndex=t;let n=gw.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var xw=[uw,fw,aw,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;pw.lastIndex=r;let i=pw.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=yw(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=bw(e.text,r):(a=bw(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(_w.lastIndex=a,i=_w.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Sw(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),eC(s))break}return-1}}var Cw={defineNodes:[{name:`Superscript`,style:Q.special(Q.content)},{name:`SuperscriptMark`,style:Q.processingInstruction}],parseInline:[{name:`Superscript`,parse:Sw(94,`Superscript`,`SuperscriptMark`)}]},ww={defineNodes:[{name:`Subscript`,style:Q.special(Q.content)},{name:`SubscriptMark`,style:Q.processingInstruction}],parseInline:[{name:`Subscript`,parse:Sw(126,`Subscript`,`SubscriptMark`)}]},Tw={defineNodes:[{name:`Emoji`,style:Q.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},Ew=Lg.define({id:0,name:`Document`,top:!0}),Dw=class extends l_{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new Hg(Ew,[],[],i-r)}}},Ow=new nv(ev(),new Dw,[],`html`);function kw(e){return new mv(Ow)}function Aw(){return null}var jw=ev({commentTokens:{block:{open:`<!--`,close:`-->`}}}),Mw=new Pg,Nw=tw.configure({props:[Nv.add(e=>!e.is(`Block`)||e.is(`Document`)||Pw(e)!=null||Fw(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Mw.add(Pw),Sv.add({Document:()=>null}),$_.add({Document:jw})]});function Pw(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Fw(e){return e.name==`OrderedList`||e.name==`BulletList`}function Iw(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Pw(e.type))!=null&&r<=t)break;n=e}return n.to}var Lw=Mv.of((e,t,n)=>{for(let r=iv(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(Mw);if(e==null)continue;let t=Iw(r,e);if(t>n)return{from:n,to:t}}return null});function Rw(e){return new nv(jw,e,[],`markdown`)}var zw=Rw(Nw),Bw=Rw(Nw.configure([xw,ww,Cw,Tw,{props:[Nv.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Vw(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):hv.matchLanguageName(e,n,!0),t instanceof hv)return t.support?t.support.language.parser:sv.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var Hw=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+Ww(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function Uw(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new Hw(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new Hw(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new Hw(i.parent,s,s+t,a[1],e,n,i))}}return r}function Ww(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Gw(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=Ww(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function Kw(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(_v)!=` `)return e;let r=bu(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var qw=((e={})=>({state:t,dispatch:n})=>{let r=iv(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!Bw.isActiveAt(t,n.from,-1)&&!Bw.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=Uw(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&Gw(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&Gw(e.item,i,r),{range:J.cursor(t+n.length),changes:r}}{let e=Xw(c,t,s);return{range:J.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&Gw(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?bu(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=Kw(p,t),Yw(l.node,t.doc)&&(p=Xw(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:J.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)})();function Jw(e){return e.name==`QuoteMark`||e.name==`ListMark`}function Yw(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function Xw(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?bu(n.text,4,e[t+1].from)-r.length:null,t<i);return Kw(r,t)}function Zw(e,t){let n=e.resolveInner(t,-1),r=t;Jw(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(Jw(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var Qw=[{key:`Enter`,run:qw},{key:`Backspace`,run:({state:e,dispatch:t})=>{let n=iv(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&Bw.isActiveAt(e,t.from)){let t=a.lineAt(i),r=Uw(Zw(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:J.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(bu(t.text,4,n.to)-bu(t.text,4,n.from));return r==t.from&&(i=Kw(i,e)),{range:J.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:J.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)}}],$w=kw({matchClosingTags:!1});function eT(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=zw,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=$w}=e;if(!(i instanceof DC))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,Lw],u;o&&l.push(aT),n instanceof mv?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?Vw(t,u):void 0;c.push(rw({codeParser:d,htmlParser:s.language.parser})),r&&l.push(bl.high(Gh.of(Qw)));let f=Rw(i.configure(c));return a&&l.push(f.data.of({autocomplete:tT})),new mv(f,l)}function tT(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=iv(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:rT(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var nT=null;function rT(){if(nT)return nT;let e=Aw(new ny($l.create({extensions:$w}),0,!0));return nT=e?e.options:[]}var iT=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,aT=X.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!Bw.isActiveAt(t.state,n.from,1)))return!1;let i=iv(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||iT.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),oT=class extends $u{kind;source;at;beneath;constructor(e,t,n,r){super(),this.kind=e,this.source=t,this.at=n,this.beneath=r}eq(e){return e.kind===this.kind&&e.source===this.source&&e.at===this.at&&e.beneath===this.beneath}toDOM(e){let t=document.createElement(`div`);t.className=`cm-lp-block cm-lp-${this.kind}${this.beneath?` cm-lp-beneath`:``}`;let n=document.createElement(`div`);return n.className=`prose`,t.append(n),n.innerHTML=gc(this.source),this.beneath||(t.title=`Click to edit`,t.addEventListener(`mousedown`,t=>{t.preventDefault(),e.dispatch({selection:{anchor:this.at},scrollIntoView:!0}),e.focus()})),t}ignoreEvent(){return!0}get estimatedHeight(){return this.kind===`maths`?60:120}};function sT(e){let t=[],n=e.selection.ranges;return iv(e).iterate({enter:r=>{let i=null,a=``;if(r.name===`BlockMath`)i=`maths`,a=e.sliceDoc(r.from,r.to);else if(r.name===`Table`)i=`table`,a=e.sliceDoc(r.from,r.to);else if(r.name===`Document`||r.name===`Blockquote`||/List|ListItem/.test(r.name))return;if(!i)return!1;let o=e.doc.lineAt(r.from).from,s=e.doc.lineAt(r.to).to;return n.some(e=>e.to>=o&&e.from<=s)?i!==`table`&&a.trim()&&t.push(td.widget({widget:new oT(i,a,r.from,!0),block:!0,side:1}).range(s)):t.push(td.replace({widget:new oT(i,a,r.from,!1),block:!0}).range(o,s)),!1}}),td.set(t,!0)}var cT=_l.define({create:sT,update(e,t){return t.docChanged||t.selection||iv(t.startState)!==iv(t.state)?sT(t.state):e},provide:e=>X.decorations.from(e)}),lT=X.theme({".cm-lp-block":{padding:`0`,cursor:`text`},".cm-lp-block .katex-display > .katex":{fontSize:`1.17em`},".cm-lp-block .prose":{maxWidth:`none`},".cm-lp-block .prose > :last-child, .cm-lp-block .table-wrap":{marginBottom:`0`},".cm-lp-block .katex-display":{margin:`0`},".cm-lp-beneath":{borderLeft:`2px solid var(--line)`,paddingLeft:`12px`,marginTop:`4px`,opacity:`.9`},".cm-lp-block:not(.cm-lp-beneath):hover":{outline:`1px dashed var(--line)`,outlineOffset:`2px`}});function uT(e,t){let{state:n}=e,r=t.length;return e.dispatch(n.changeByRange(e=>{let i=n.sliceDoc(e.from-r,e.from),a=n.sliceDoc(e.to,e.to+r);return i===t&&a===t?{changes:[{from:e.from-r,to:e.from},{from:e.to,to:e.to+r}],range:J.range(e.from-r,e.to-r)}:{changes:[{from:e.from,insert:t},{from:e.to,insert:t}],range:J.range(e.from+r,e.to+r)}}),{scrollIntoView:!0,userEvent:`input`}),!0}function dT(e){let{state:t}=e,n=new Map;for(let e of t.selection.ranges)for(let r=e.from;r<=e.to;){let e=t.doc.lineAt(r);n.set(e.number,{from:e.from,text:e.text}),r=e.to+1}return[...n.values()]}function fT(e){let t=dT(e).map(({from:e,text:t})=>{let n=/^(#{1,6}) /.exec(t),r=n?n[1].length:0,i=r>=3?``:`#`.repeat(r+1)+` `;return{from:e,to:e+(n?n[0].length:0),insert:i}});return e.dispatch({changes:t,scrollIntoView:!0,userEvent:`input`}),!0}function pT(e){let t=dT(e),n=t.every(({text:e})=>/^\s*[-*+] /.test(e)),r=t.map(({from:e,text:t})=>{if(n){let n=/^(\s*)[-*+] /.exec(t);return{from:e+n[1].length,to:e+n[0].length}}return{from:e+/^\s*/.exec(t)[0].length,insert:`- `}});return e.dispatch({changes:r,scrollIntoView:!0,userEvent:`input`}),!0}function mT(e){let{state:t}=e,n=t.selection.main;if(n.empty)e.dispatch({changes:{from:n.from,insert:`[[]]`},selection:{anchor:n.from+2},userEvent:`input`});else{let r=t.sliceDoc(n.from,n.to);e.dispatch({changes:{from:n.from,to:n.to,insert:`[${r}]()`},selection:{anchor:n.from+r.length+3},userEvent:`input`})}return Gy(e),!0}function hT(e,t){switch(t){case`bold`:return uT(e,`**`);case`italic`:return uT(e,`*`);case`maths`:return uT(e,`$`);case`heading`:return fT(e);case`list`:return pT(e);case`link`:return mT(e);case`undo`:return Hb(e);case`redo`:return Ub(e)}}var gT=[{key:`Mod-b`,preventDefault:!0,run:e=>hT(e,`bold`)},{key:`Mod-i`,preventDefault:!0,run:e=>hT(e,`italic`)},{key:`Mod-k`,preventDefault:!0,run:e=>hT(e,`link`)},{key:`Mod-Shift-m`,preventDefault:!0,run:e=>hT(e,`maths`)},{key:`Mod-Shift-h`,preventDefault:!0,run:e=>hT(e,`heading`)},{key:`Mod-Shift-8`,preventDefault:!0,run:e=>hT(e,`list`)}],_T=[`requires`,`uses`,`see also`];function vT(e){if(!e||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`#`))return null;let t=e.split(`#`)[0].split(`?`)[0];return/\.html?$/i.test(t)?`artifact`:/\.(png|jpe?g|gif|svg|webp|avif)$/i.test(t)?`image`:/\.md$/i.test(t)||t.endsWith(`/`)?`note`:null}function yT(e,t){let n=iv(e);for(let r of[-1,1])for(let i=n.resolveInner(t,r);i;i=i.parent){if(i.name!==`Link`&&i.name!==`Image`)continue;let t=i.getChild(`URL`);if(!t)break;let n=e.sliceDoc(t.from,t.to),r=vT(n);if(!r)return null;let a=i.getChild(`LinkTitle`),o=a?e.sliceDoc(a.from,a.to):null;return{from:i.from,to:i.to,embed:i.name===`Image`,url:n,urlTo:t.to,title:o===null?null:o.replace(/^["'(]|["')]$/g,``),titleFrom:a?a.from:t.to,titleTo:a?a.to:t.to,kind:r}}return null}var bT=e=>e.kind===`note`||e.kind===`artifact`&&!e.embed;function xT(e,t,n){let r=[];return iv(e).iterate({from:t,to:n,enter:i=>{if(i.name!==`Link`&&i.name!==`Image`)return;if(i.from<t||i.to>n)return!1;let a=yT(e,i.from+1);return a&&a.from===i.from&&bT(a)&&r.push(a),!1}}),r}var ST=(e,t)=>e.filter(e=>wT(e)!==t).map(e=>ET(e,t)),CT=e=>(e??``).trim().toLowerCase().replace(/[-_]/g,` `),wT=e=>_T.includes(CT(e.title))?CT(e.title):CT(e.title)===`seealso`?`see also`:null,TT=e=>CT(e.title)===`left`?`left`:`center`;function ET(e,t){return t===null?{from:e.urlTo,to:e.titleTo,insert:``}:e.titleFrom===e.titleTo?{from:e.urlTo,insert:` "${t}"`}:{from:e.titleFrom,to:e.titleTo,insert:`"${t}"`}}function DT(e,t){if(e.embed===t)return[];let n=[t?{from:e.from,insert:`!`}:{from:e.from,to:e.from+1,insert:``}];return e.title!==null&&(e.kind===`image`||wT(e)!==null)&&n.push(ET(e,null)),n}var OT=(e,t)=>e.dispatch({changes:t,userEvent:`input.link`});function kT(e){let t=[..._T.map(t=>({label:t[0].toUpperCase()+t.slice(1),on:wT(e)===t,run:(e,n)=>OT(e,ET(n,t)),hint:t===`requires`?`This note cannot be followed without it: it shapes the Atlas and the study order`:t===`uses`?`It draws on it: it shapes the Atlas`:`Related reading: shown, but it does not shape the Atlas`})),{label:`Unrated`,on:wT(e)===null,run:(e,t)=>OT(e,ET(t,null)),hint:`No rating: counted as uses`}];if(e.kind===`note`)return t;let n=[{label:`Shown here`,on:e.embed,run:(e,t)=>OT(e,DT(t,!0)),hint:e.kind===`image`?`The picture is shown in the note`:`The artifact is shown in the note, working`},{label:`Link`,on:!e.embed,run:(e,t)=>OT(e,DT(t,!1)),hint:`A link to it; it opens on its own`}];return e.kind===`image`?e.embed?[...n,{label:`Centre`,on:TT(e)===`center`,run:(e,t)=>OT(e,ET(t,null)),hint:`In the middle, 80% of the text's width`},{label:`Left`,on:TT(e)===`left`,run:(e,t)=>OT(e,ET(t,`left`)),hint:`At the left, 80% of the text's width`}]:n:e.embed?n:[...n,...t]}function AT(e){let t=t=>e.every(e=>wT(e)===t),n=e.length;return[..._T.map(e=>({label:e[0].toUpperCase()+e.slice(1),on:t(e),run:t=>OT(t,ST(xT(t.state,t.state.selection.main.from,t.state.selection.main.to),e)),hint:`Rate all ${n} links ${e}`})),{label:`Unrated`,on:t(null),run:e=>OT(e,ST(xT(e.state,e.state.selection.main.from,e.state.selection.main.to),null)),hint:`Take the rating from all ${n} links`}]}function jT(e){let t=wT(e[0]),n=e.every(e=>wT(e)===t);return`${e.length} links, ${n?t??`unrated`:`mixed`}`}function MT(e){return e.kind===`note`?wT(e)?wT(e)[0].toUpperCase()+wT(e).slice(1):`Unrated`:e.embed?e.kind===`image`?TT(e)===`left`?`Shown, left`:`Shown, centre`:`Shown here`:wT(e)?`Link, ${wT(e)}`:`Link`}var NT=(e,t)=>e===t||!!e&&!!t&&e.from===t.from&&e.to===t.to&&e.title===t.title&&e.embed===t.embed,PT=class{view;layer;button;menu;leader;path;link=null;hover=null;many=[];open=!1;at=0;constructor(e){this.view=e,this.layer=document.createElement(`div`),this.layer.className=`cm-link-control`,this.layer.hidden=!0,this.leader=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.leader.setAttribute(`class`,`cm-link-leader`),this.leader.setAttribute(`aria-hidden`,`true`),this.path=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.leader.append(this.path),this.button=document.createElement(`button`),this.button.type=`button`,this.button.className=`cm-link-button`,this.button.setAttribute(`aria-haspopup`,`menu`),this.button.addEventListener(`mousedown`,e=>e.preventDefault()),this.button.addEventListener(`click`,()=>this.toggle(!this.open,!1)),this.menu=document.createElement(`div`),this.menu.className=`cm-link-menu`,this.menu.setAttribute(`role`,`menu`),this.menu.hidden=!0,this.menu.tabIndex=-1,this.menu.addEventListener(`keydown`,e=>this.keys(e)),this.layer.append(this.leader,this.button,this.menu),e.dom.append(this.layer),e.dom.addEventListener(`mousemove`,this.onMove),e.dom.addEventListener(`mouseleave`,this.onLeave)}onMove=e=>{if(this.open||this.layer.contains(e.target))return;let t=this.view.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t===null?null:yT(this.view.state,t);NT(n,this.hover)||(this.hover=n,this.view.requestMeasure(this.measure))};onLeave=e=>{this.open||this.layer.contains(e.relatedTarget)||this.hover&&(this.hover=null,this.view.requestMeasure(this.measure))};selected(){let e=this.view.state.selection.main;if(e.empty)return[];let t=xT(this.view.state,e.from,e.to);return t.length>=2?t:[]}current(){let e=this.view.state.selection.main,t=this.selected();return t.length?t[0]:yT(this.view.state,e.head)??(e.empty?this.hover:null)}update(e){e.docChanged&&(this.hover=null),(e.docChanged||e.selectionSet||e.geometryChanged||e.viewportChanged||e.focusChanged)&&this.view.requestMeasure(this.measure)}measure={key:`link-control`,read:e=>{let t=this.current();if(!t)return null;let n=this.selected(),r=e.dom.getBoundingClientRect(),i=e.contentDOM.getBoundingClientRect(),a=e.coordsAtPos(Math.max(t.from,t.to-1),1)??e.coordsAtPos(t.to,-1);if(n.length){let t=Math.max(r.top,0),i=Math.min(r.bottom,window.innerHeight);a=null;for(let r=n.length-1;r>=0&&!a;r--){let o=e.coordsAtPos(Math.max(n[r].from,n[r].to-1),1);o&&o.top>=t&&o.bottom<=i-34&&(a=o)}a??=e.coordsAtPos(Math.max(n[0].from,n[0].to-1),1)}return a?{l:t,many:n,x:a.right-r.left,y:(a.top+a.bottom)/2-r.top,right:i.right-r.left,width:r.width}:null},write:e=>{if(!e){this.link=null,this.many=[],this.layer.hidden=!0,this.toggle(!1,!1);return}let t=e.many.length?jT(e.many):MT(e.l),n=!NT(e.l,this.link)||e.many.length!==this.many.length||t!==this.button.textContent;this.link=e.l,this.many=e.many,this.layer.hidden=!1,this.button.textContent=t,this.button.title=e.many.length?`Rate all the selected links (Alt+L)`:`What this link is (Alt+L)`,this.button.setAttribute(`aria-label`,e.many.length?`${t}. Rate them all`:`This link: ${t}. Change it`);let r=this.button.offsetWidth||90,i=e.width-e.right>=r+20,a=i?e.right+14:Math.max(0,e.width-r-2),o=i?e.y-13:e.y+12;this.button.style.transform=`translate(${Math.round(a)}px, ${Math.round(o)}px)`,this.menu.style.transform=`translate(${Math.round(Math.min(a,e.width-250))}px, ${Math.round(o+30)}px)`;let s=a,c=o+13;this.path.setAttribute(`d`,i?`M${e.x+3} ${e.y} H${Math.max(e.x+3,s-3)}`:`M${e.x+3} ${e.y} V${c} H${s-3}`),n&&this.open&&(this.fill(),this.mark(this.at))}};fill(){let e=this.link;e&&this.menu.replaceChildren(...(this.many.length?AT(this.many):kT(e)).map((t,n)=>{let r=document.createElement(`button`);return r.type=`button`,r.tabIndex=-1,r.id=`cm-link-choice-${n}`,r.addEventListener(`mousedown`,e=>e.preventDefault()),r.addEventListener(`mousemove`,()=>this.mark(n)),r.setAttribute(`role`,`menuitemradio`),r.setAttribute(`aria-checked`,String(t.on)),r.title=t.hint,r.innerHTML=`<b></b><span></span>`,r.querySelector(`b`).textContent=t.label,r.querySelector(`span`).textContent=t.hint,r.addEventListener(`click`,()=>{let n=this.current()??e;t.run(this.view,n),this.toggle(!1,!0)}),r}))}toggle(e,t){if(e&&(this.link=this.current()??this.link,this.many=this.selected()),!e||this.link){if(this.open=e,this.menu.hidden=!e,this.layer.classList.toggle(`open`,e),this.button.setAttribute(`aria-expanded`,String(e)),e){this.fill();let e=[...this.menu.querySelectorAll(`button`)];this.mark(Math.max(0,e.findIndex(e=>e.getAttribute(`aria-checked`)===`true`))),this.menu.focus()}else t&&this.view.focus()}}mark(e){let t=[...this.menu.querySelectorAll(`button`)];this.at=t.length?(e+t.length)%t.length:0,t.forEach((e,t)=>e.classList.toggle(`on`,t===this.at)),this.menu.setAttribute(`aria-activedescendant`,t[this.at]?.id??``)}keys(e){let t=[...this.menu.querySelectorAll(`button`)],n=!0;if(e.key===`Escape`)this.toggle(!1,!0);else if(e.key===`Enter`||e.key===` `)t[this.at]?.click();else if(e.key===`ArrowDown`)this.mark(this.at+1);else if(e.key===`ArrowUp`)this.mark(this.at-1);else if(e.key===`Home`)this.mark(0);else if(e.key===`End`)this.mark(t.length-1);else if(e.key===`Tab`)this.toggle(!1,!0);else if(e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let r=t.findIndex(t=>t.textContent.toLowerCase().startsWith(e.key.toLowerCase()));r>=0?this.mark(r):n=!1}else n=!1;n&&(e.preventDefault(),e.stopPropagation())}destroy(){this.view.dom.removeEventListener(`mousemove`,this.onMove),this.view.dom.removeEventListener(`mouseleave`,this.onLeave),this.layer.remove()}},FT=Of.fromClass(PT),IT=e=>t=>{let n=yT(t.state,t.state.selection.main.head);return n?(e(t,n),!0):!1},LT=e=>t=>{let n=t.state.selection.main,r=n.empty?[]:xT(t.state,n.from,n.to);return r.length>=2?(OT(t,ST(r,e)),!0):IT((t,n)=>{bT(n)&&OT(t,ET(n,e))})(t)},RT=[{key:`Alt-l`,run:e=>{let t=e.plugin(FT);return!t||!t.current()?!1:(t.toggle(!0,!1),!0)}},{key:`Alt-1`,run:LT(`requires`)},{key:`Alt-2`,run:LT(`uses`)},{key:`Alt-3`,run:LT(`see also`)},{key:`Alt-0`,run:LT(null)},{key:`Alt-e`,run:IT((e,t)=>{t.kind!==`note`&&OT(e,DT(t,!t.embed))})}],zT=[FT,X.baseTheme({"&":{position:`relative`},".cm-link-control":{position:`absolute`,inset:`0`,pointerEvents:`none`,zIndex:`4`,overflow:`visible`},".cm-link-control[hidden]":{display:`none`},".cm-link-leader":{position:`absolute`,left:`0`,top:`0`,width:`100%`,height:`100%`,overflow:`visible`},".cm-link-leader path":{fill:`none`,stroke:`var(--lattice)`,strokeWidth:`1.75`,strokeDasharray:`.1 5`,strokeLinecap:`round`,opacity:`.7`},".cm-link-control:hover .cm-link-leader path, .cm-link-control:focus-within .cm-link-leader path, .cm-link-control.open .cm-link-leader path":{opacity:`1`,animation:`cm-link-run .6s linear infinite`},"@keyframes cm-link-run":{to:{strokeDashoffset:`-5.1`}},"@media (prefers-reduced-motion: reduce)":{".cm-link-leader path":{animation:`none !important`}},".cm-link-button":{position:`absolute`,left:`0`,top:`0`,pointerEvents:`auto`,height:`26px`,padding:`0 9px`,font:`12.5px var(--font-ui)`,whiteSpace:`nowrap`,color:`var(--text)`,background:`var(--ground-1)`,border:`1px solid var(--lattice)`,cursor:`pointer`},".cm-link-button:hover, .cm-link-button[aria-expanded=true]":{background:`var(--lattice-soft)`},".cm-link-button:focus-visible":{outline:`2px solid var(--focus-ring)`,outlineOffset:`2px`},".cm-link-menu":{position:`absolute`,left:`0`,top:`0`,pointerEvents:`auto`,width:`248px`,padding:`4px`,background:`var(--ground-1)`,border:`1px solid var(--line)`,display:`grid`,gap:`1px`},".cm-link-menu[hidden]":{display:`none`},".cm-link-menu button":{display:`grid`,gap:`1px`,textAlign:`left`,padding:`6px 8px 6px 24px`,background:`none`,border:`0`,color:`var(--text)`,font:`13.5px var(--font-ui)`,cursor:`pointer`,position:`relative`},".cm-link-menu button b":{fontWeight:`600`},".cm-link-menu button span":{fontSize:`12px`,color:`var(--text-faint)`,lineHeight:`1.3`},".cm-link-menu button[aria-checked=true]::before":{content:`"●"`,position:`absolute`,left:`8px`,top:`7px`,fontSize:`10px`,color:`var(--lattice)`},".cm-link-menu:focus":{outline:`none`},".cm-link-menu button.on":{background:`var(--lattice-soft)`},".cm-link-menu:focus-visible button.on":{outline:`2px solid var(--focus-ring)`,outlineOffset:`-2px`}}),Gh.of(RT)];function BT(e){return t=>{let n=t.matchBefore(/\[\[[^\]\n]*$/);if(!n)return null;let r=e().map(e=>({label:e.title,detail:e.folder,apply:(t,n,r,i)=>{let a=`[${e.title}](/${e.id}.md)`,o=r-2,s=t.state.sliceDoc(i,i+2)===`]]`?i+2:i;t.dispatch({changes:{from:o,to:s,insert:a},selection:{anchor:o+a.length}})}}));return{from:n.from+2,options:r,filter:!0,validFor:/^[^\]\n]*$/}}}function VT(e){return t=>{let n=t.matchBefore(/\]\([^)\s]*$/);return n?{from:n.from+2,options:e().map(e=>({label:`/${e.id}.md`,detail:e.title})),validFor:/^[^)\s]*$/}:null}}function HT(e){return xb({override:[BT(e),VT(e)],icons:!1,activateOnTyping:!0})}var UT=36,WT=92,GT=40,KT=/^\$\$([^$]*?[^\\])\$\$/,qT=/^\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$(?!\d)/,JT=/^\\\((.+?)\\\)/,YT=/^\$\$([^$]*?[^\\])\$\$(?:[ \t]*\([^)\s]+?\))?(?=[ \t]*(?:\n|$))/,XT=/^\\\[([\s\S]+?)\\\](?:[ \t]*\([^)$\r\n]+?\))?(?=[ \t]*(?:\n|$))/;function ZT(e,t,n){if(t===UT){if(n>e.offset&&e.char(n-1)===WT)return-1;let t=e.slice(n,e.end),r=(t.charCodeAt(1)===UT?KT:qT).exec(t);return r?e.addElement(e.elt(`InlineMath`,n,n+r[0].length,[e.elt(`MathMark`,n,n+(r[0].startsWith(`$$`)?2:1)),e.elt(`MathMark`,n+r[0].length-(r[0].startsWith(`$$`)?2:1),n+r[0].length)])):-1}if(t===WT&&e.char(n+1)===GT){let t=JT.exec(e.slice(n,e.end));if(!t)return-1;let r=n+t[0].length;return e.addElement(e.elt(`InlineMath`,n,r,[e.elt(`MathMark`,n,n+2),e.elt(`MathMark`,r-2,r)]))}return-1}var QT=2e4;function $T(e,t){let n=t.text.slice(t.pos),r=n.startsWith(`$$`)?YT:n.startsWith(`\\[`)?XT:null;if(!r)return!1;let i=e.lineStart+t.pos,a=e.input,o=r.exec(a.read(i,Math.min(a.length,i+QT)));if(!o)return!1;let s=i+o[0].length;for(;e.lineStart+t.text.length<s&&e.nextLine(););return e.addElement(e.elt(`BlockMath`,i,s)),e.nextLine(),!0}var eE={defineNodes:[{name:`InlineMath`,style:Q.special(Q.content)},{name:`BlockMath`,block:!0,style:Q.special(Q.content)},{name:`MathMark`,style:Q.processingInstruction}],parseInline:[{name:`InlineMath`,parse:ZT,before:`Escape`}],parseBlock:[{name:`BlockMath`,parse:$T,before:`FencedCode`}]};function tE(e){let t;return(t=/^\$\$([\s\S]*?)\$\$/.exec(e))||(t=/^\\\[([\s\S]*?)\\\]/.exec(e))?{tex:t[1],display:!0}:(t=/^\\\(([\s\S]*?)\\\)$/.exec(e))||(t=/^\$([\s\S]*?)\$$/.exec(e))?{tex:t[1],display:!1}:{tex:e,display:!1}}var nE=class extends $u{eq(){return!0}toDOM(){let e=document.createElement(`span`);return e.className=`cm-lp-bullet`,e.textContent=`•`,e}},rE=class extends $u{eq(){return!0}toDOM(){let e=document.createElement(`span`);return e.className=`cm-lp-hr`,e}},iE=class extends $u{source;constructor(e){super(),this.source=e}eq(e){return e.source===this.source}toDOM(){let e=document.createElement(`span`);e.className=`cm-lp-imaths`;let{tex:t,display:n}=tE(this.source);return e.innerHTML=Fo.renderToString(t,{displayMode:n,throwOnError:!1}),e}},aE=td.replace({}),oE=td.replace({widget:new nE}),sE=td.replace({widget:new rE}),cE=e=>td.mark({class:e}),lE=e=>td.line({class:e});function uE(e,t){let n=new Set;if(!t)return n;for(let t of e.selection.ranges){let r=e.doc.lineAt(t.from).number,i=e.doc.lineAt(t.to).number;for(let e=r;e<=i;e++)n.add(e)}return n}function dE(e){let{state:t}=e,n=uE(t,e.hasFocus),r=e=>n.has(t.doc.lineAt(e).number),i=[],a=(e,n,r)=>{for(let a=t.doc.lineAt(e).number,o=t.doc.lineAt(n).number;a<=o;a++)i.push(lE(r).range(t.doc.line(a).from))},o=e.visibleRanges;if(o.length){let e=o[0].from,s=o[o.length-1].to,c=/^ {0,3}([-*_])(?: *\1){2,} *$/,l=t.doc.lineAt(e).number,u=t.doc.lineAt(s).number,d=e=>e>=1&&e<=t.doc.lines?t.doc.line(e).text:``;for(let e=l;e<=u;e++){let r=t.doc.line(e);if(r.length!==0||/Code|Math|HTML|Comment/.test(iv(t).resolveInner(r.from,1).name))continue;let a=e>1&&t.doc.line(e-1).length===0&&!n.has(e),o=c.test(d(e-1))||c.test(d(e+1));i.push(lE(a?`cm-lp-gap cm-lp-gap-more`:o?`cm-lp-gap cm-lp-gap-rule`:`cm-lp-gap`).range(r.from))}iv(t).iterate({from:e,to:s,enter:e=>{let n=e.name,o=/^(?:ATX|Setext)Heading(\d)$/.exec(n);if(o)a(e.from,e.to,`cm-lp-h${o[1]}`);else switch(n){case`HeaderMark`:{if(r(e.from))break;if((e.node.parent?.name??``).startsWith(`SetextHeading`)){i.push(aE.range(t.doc.lineAt(e.from).from,e.to));break}let n=t.sliceDoc(e.to,e.to+1)===` `?e.to+1:e.to;n>e.from&&i.push(aE.range(e.from,n));break}case`EmphasisMark`:case`StrikethroughMark`:r(e.from)||i.push(aE.range(e.from,e.to));break;case`Emphasis`:i.push(cE(`cm-lp-em`).range(e.from,e.to));break;case`StrongEmphasis`:i.push(cE(`cm-lp-strong`).range(e.from,e.to));break;case`Strikethrough`:i.push(cE(`cm-lp-strike`).range(e.from,e.to));break;case`InlineCode`:if(i.push(cE(`cm-lp-code`).range(e.from,e.to)),!r(e.from)){let t=e.node;for(let e=t.firstChild;e;e=e.nextSibling)e.name===`CodeMark`&&i.push(aE.range(e.from,e.to))}return!1;case`InlineMath`:return r(e.from)?i.push(cE(`cm-lp-mathsrc`).range(e.from,e.to)):i.push(td.replace({widget:new iE(t.sliceDoc(e.from,e.to))}).range(e.from,e.to)),!1;case`BlockMath`:case`Table`:return a(e.from,e.to,`cm-lp-codeblock`),!1;case`Link`:{let t=e.node,n=[],a=!1;for(let e=t.firstChild;e;e=e.nextSibling)e.name===`LinkMark`&&n.push(e),e.name===`URL`&&(a=!0);let o=n[0],s=n[1];o&&s&&s.from>o.to&&i.push(cE(`cm-lp-link`).range(o.to,s.from)),!r(e.from)&&a&&o&&s&&(i.push(aE.range(o.from,o.to)),i.push(aE.range(s.from,e.to)));break}case`ListMark`:{let n=t.sliceDoc(e.from,e.to);!r(e.from)&&/^[-*+]$/.test(n)?i.push(oE.range(e.from,e.to)):i.push(cE(`cm-lp-listmark`).range(e.from,e.to));break}case`TaskMarker`:i.push(cE(`cm-lp-task`).range(e.from,e.to));break;case`Blockquote`:a(e.from,e.to,`cm-lp-quote`);break;case`QuoteMark`:if(!r(e.from)){let n=t.sliceDoc(e.to,e.to+1)===` `?e.to+1:e.to;i.push(aE.range(e.from,n))}break;case`HorizontalRule`:r(e.from)||(i.push(sE.range(e.from,e.to)),a(e.from,e.to,`cm-lp-ruleline`));break;case`FencedCode`:case`CodeBlock`:return a(e.from,e.to,`cm-lp-codeblock`),!1;case`HTMLBlock`:case`CommentBlock`:return a(e.from,e.to,`cm-lp-codeblock`),!1}}})}i.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide);let s=new lu;for(let e of i)s.add(e.from,e.to,e.value);return s.finish()}var fE=Of.fromClass(class{decorations;constructor(e){this.decorations=dE(e)}update(e){(e.docChanged||e.viewportChanged||e.selectionSet||e.focusChanged||iv(e.startState)!==iv(e.state))&&(this.decorations=dE(e.view))}},{decorations:e=>e.decorations}),pE=X.theme({".cm-scroller":{fontFamily:`var(--font-text)`,fontSize:`var(--text-size)`,lineHeight:`1.55`},".cm-lp-gap":{lineHeight:`20px`},".cm-lp-gap-rule":{lineHeight:`10px`},".cm-lp-gap-more":{lineHeight:`4px`},".cm-lp-ruleline":{lineHeight:`12px`},".cm-content":{fontVariationSettings:`"opsz" 18`},".cm-lp-h1, .cm-lp-h2, .cm-lp-h3, .cm-lp-h4, .cm-lp-h5, .cm-lp-h6":{fontWeight:`600`,lineHeight:`1.3`,fontVariationSettings:`"opsz" 36`,paddingTop:`.5em !important`},".cm-lp-h1":{fontSize:`26px`},".cm-lp-h2":{fontSize:`22px`},".cm-lp-h3":{fontSize:`19px`},".cm-lp-h4":{fontSize:`17px`,fontWeight:`700`},".cm-lp-em":{fontStyle:`italic`},".cm-lp-strong":{fontWeight:`700`},".cm-lp-strike":{textDecoration:`line-through`},".cm-lp-code":{fontFamily:`var(--font-mono)`,fontSize:`.86em`,background:`color-mix(in srgb, var(--text) 8%, transparent)`,padding:`.1em .2em`},".cm-lp-link":{color:`var(--lattice)`,textDecoration:`underline`,textUnderlineOffset:`2px`},".cm-lp-bullet":{color:`var(--text-faint)`,display:`inline-block`,minWidth:`1ch`},".cm-lp-listmark, .cm-lp-task":{color:`var(--text-faint)`,fontFamily:`var(--font-mono)`},".cm-lp-quote":{borderLeft:`3px solid var(--lattice)`,paddingLeft:`14px !important`,color:`var(--text-soft)`},".cm-lp-codeblock":{fontFamily:`var(--font-mono)`,fontSize:`13px`,lineHeight:`20px`,background:`color-mix(in srgb, var(--line) 38%, transparent)`,borderLeft:`2px solid var(--line-strong)`,padding:`0 16px !important`},".cm-lp-mathsrc":{fontFamily:`var(--font-mono)`,fontSize:`.86em`,color:`var(--text-soft)`},".cm-lp-imaths .katex":{fontSize:`1.05em`},".cm-lp-imaths .katex-display":{margin:`0`,padding:`6px 0`},".cm-lp-imaths .katex-display > .katex":{fontSize:`1.17em`},".cm-lp-hr":{display:`inline-block`,width:`100%`,borderTop:`1px solid var(--line)`,verticalAlign:`middle`}});function mE(e){let t=e.split(`#`)[0];return t.startsWith(`/`)&&t.endsWith(`.md`)?t.slice(1,-3):null}var hE=Rl.define(),gE=Rl.define(),_E=[_l.define({create:()=>td.none,update(e,t){for(let e of t.effects){if(!e.is(gE))continue;let n=t.state.doc,r=e.value;if(!r)return td.none;let i=td.line({class:`cm-touched cm-touched-${r.who}`});return td.set([...new Set(r.lines)].filter(e=>e>=0&&e<n.lines&&n.line(e+1).text.trim()!==``).sort((e,t)=>e-t).map(e=>i.range(n.line(e+1).from)))}return t.docChanged?e.map(t.changes):e},provide:e=>X.decorations.from(e)}),X.theme({".cm-line.cm-touched-you":{background:`var(--lattice-soft)`,boxShadow:`-10px 0 0 var(--lattice-soft), -13px 0 0 var(--lattice), 10px 0 0 var(--lattice-soft)`},".cm-line.cm-touched-iso":{background:`var(--growth-soft)`,boxShadow:`-10px 0 0 var(--growth-soft), -13px 0 0 var(--growth), 10px 0 0 var(--growth-soft)`}})],vE=Rl.define(),yE=class extends $u{key;mount;block;down=null;watch=null;constructor(e,t,n){super(),this.key=e,this.mount=t,this.block=n}eq(e){return e.key===this.key&&e.block===this.block}toDOM(e){let t=document.createElement(this.block?`div`:`span`);return t.className=this.block?`cm-overlay`:`cm-iso-change`,t.contentEditable=`false`,this.down=this.mount(t,this.key),this.watch=new ResizeObserver(()=>e.requestMeasure()),this.watch.observe(t),t}destroy(){this.watch?.disconnect(),this.watch=null,this.down?.(),this.down=null}ignoreEvent(){return!0}get estimatedHeight(){return this.block?120:-1}};function bE(e){return[_l.define({create:()=>td.none,update(t,n){for(let t of n.effects){if(!t.is(hE))continue;let r=n.state.doc;return td.set(t.value.map(t=>{let n=t.line>=r.lines,i=n?r.length:r.line(Math.max(1,t.line+1)).from;return td.widget({widget:new yE(t.key,e,!0),block:!0,side:n?1:-1}).range(i)}),!0)}return n.docChanged?t.map(n.changes):t},provide:e=>X.decorations.from(e)}),_l.define({create:()=>td.none,update(t,n){for(let t of n.effects){if(!t.is(vE))continue;let r=n.state.doc.length,i=[];for(let e of t.value.marks){let t=Math.max(0,Math.min(r,e.from)),n=Math.max(0,Math.min(r,e.to));n>t&&i.push(td.mark({class:`cm-iso-${e.kind}`}).range(t,n))}for(let n of t.value.inline)i.push(td.widget({widget:new yE(n.key,e,!1),side:1}).range(Math.max(0,Math.min(r,n.at))));return td.set(i,!0)}return n.docChanged?t.map(n.changes):t},provide:e=>X.decorations.from(e)}),X.theme({".cm-overlay":{cursor:`default`,userSelect:`text`,padding:`10px 0`,display:`flow-root`,whiteSpace:`normal`},".cm-iso-picked":{background:`var(--lattice-soft)`,boxShadow:`inset 0 -2px 0 var(--lattice)`,cursor:`pointer`},".cm-iso-old":{textDecoration:`line-through`,textDecorationColor:`var(--text-faint)`,color:`var(--text-faint)`},".cm-iso-old *":{color:`var(--text-faint) !important`},".cm-iso-change":{cursor:`default`},".cm-iso-question":{fontFamily:`var(--font-text)`,fontSize:`23px`,lineHeight:`1.4`},"@media (max-width: 600px)":{".cm-iso-question":{fontSize:`18px`,lineHeight:`1.55`}},".cm-line:has(.cm-iso-working)":{paddingTop:`12px`},".cm-iso-working":{fontFamily:`var(--font-ui)`,fontSize:`12px`,fontWeight:`400`,color:`var(--text-faint)`,textTransform:`lowercase`,letterSpacing:`0`},".cm-iso-working::before":{content:`'your '`},".cm-iso-working *":{fontSize:`12px !important`,color:`var(--text-faint) !important`,fontWeight:`400 !important`},".cm-iso-answer":{background:`var(--lattice-soft)`,boxShadow:`0 0 0 4px var(--lattice-soft)`,borderBottom:`2px solid var(--lattice)`},".cm-iso-right":{borderBottom:`3px double var(--malachite)`},".cm-iso-wrong":{borderBottom:`2px solid var(--rose)`}})]}var xE=X.theme({".cm-scroller":{fontFamily:`var(--font-mono)`,fontSize:`14px`,lineHeight:`1.6`}}),SE=X.theme({"&":{color:`var(--text)`,backgroundColor:`transparent`,fontSize:`16px`},"&.cm-focused":{outline:`none`},".cm-scroller":{overflow:`visible`},".cm-content":{padding:`12px 0 40vh`,caretColor:`var(--lattice)`},".cm-line":{padding:`0 2px`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--lattice)`,borderLeftWidth:`2px`},".cm-selectionBackground":{backgroundColor:`color-mix(in srgb, var(--lattice) 22%, transparent) !important`},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`color-mix(in srgb, var(--lattice) 40%, transparent) !important`},".cm-placeholder":{color:`var(--text-faint)`},".cm-tooltip-autocomplete":{background:`var(--ground-1)`,border:`1px solid var(--line-strong)`,fontFamily:`var(--font-ui)`,fontSize:`13px`},".cm-tooltip.cm-tooltip-autocomplete > ul":{fontFamily:`var(--font-ui)`,maxHeight:`16em`},".cm-tooltip-autocomplete > ul > li":{padding:`6px 10px !important`,lineHeight:`1.3`},".cm-tooltip-autocomplete > ul > li[aria-selected]":{background:`var(--lattice-soft)`,color:`var(--text)`},".cm-completionDetail":{color:`var(--text-faint)`,fontStyle:`normal`,marginLeft:`10px`}}),CE=Pv.define([{tag:Q.heading,fontWeight:`700`,color:`var(--text)`},{tag:Q.strong,fontWeight:`700`},{tag:Q.emphasis,fontStyle:`italic`},{tag:Q.strikethrough,textDecoration:`line-through`},{tag:[Q.link,Q.url],color:`var(--lattice)`},{tag:[Q.processingInstruction,Q.punctuation,Q.contentSeparator],color:`var(--text-faint)`},{tag:Q.monospace,color:`var(--text-soft)`},{tag:Q.quote,color:`var(--text-soft)`,fontStyle:`italic`}]);function wE(e){let t=e.selection.main;return{line:e.doc.lineAt(t.to).number-1,from:t.from,to:t.to}}function TE(e,t){return new X({state:$l.create({doc:t.doc,extensions:[Bb(),lg(),X.lineWrapping,eT({base:Bw,extensions:[eE],completeHTMLTags:!1}),Rv(CE),SE,...t.source?[xE]:[fE,pE,cT,lT,zT],ib(),$l.languageData.of(()=>[{closeBrackets:{brackets:[`(`,`[`]}}]),...t.mountOverlay?[bE(t.mountOverlay)]:[],_E,...t.readOnly?[$l.readOnly.of(!0),X.editable.of(!1)]:[],HT(t.notes),_g(t.placeholder??`Write the note here. # for a heading, [[ to link to another note, $x$ for maths.`),X.contentAttributes.of({"aria-label":t.label,spellcheck:`true`,autocapitalize:`sentences`,autocorrect:`on`}),Gh.of([{key:`Mod-s`,preventDefault:!0,run:()=>(t.onSave(),!0)},{key:`Mod-Enter`,preventDefault:!0,run:e=>(t.onAsk?.(wE(e.state)),!!t.onAsk)},...gT,...ub,...Sb,JS,...qS,...ax]),X.domEventHandlers((()=>{let e=(e,n)=>{if(!t.picking?.())return;let r=e.state.selection,i=r.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to}));i.length?(t.onPick?.(i),setTimeout(()=>e.dispatch({selection:{anchor:Math.min(r.main.head,e.state.doc.length)}}),0)):n&&t.onUnpick?.(r.main.head)};return{mouseup:(t,n)=>(e(n,t.detail===1),!1),touchend:(t,n)=>(e(n,!1),!1),keyup:(t,n)=>(t.key===`Shift`&&e(n,!1),!1)}})()),X.domEventHandlers({mousedown(e,n){if(!t.onFollow||!(e.ctrlKey||e.metaKey)||e.button!==0)return!1;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=r===null?null:yT(n.state,r),a=i&&!i.embed?mE(i.url):null;return a!==null&&(e.preventDefault(),t.onFollow(a),!0)}}),X.updateListener.of(e=>{e.docChanged&&t.onChange(e.state.doc.toString()),t.onCursor&&(e.selectionSet||e.docChanged)&&t.onCursor(wE(e.state))})]}),parent:e})}function EE(e,t){if(t===e.state.doc.toString())return;let n=Math.min(e.state.selection.main.head,t.length);e.dispatch({changes:{from:0,to:e.state.doc.length,insert:t},selection:{anchor:n}})}var DE=e(`<button class="link faint svelte-192cp36" type="button">[ clear ]</button>`),OE=e(`<span class="soft picked svelte-192cp36" role="status"> </span> <!>`,1),kE=e(`<button type="button" role="radio" class="svelte-192cp36"> </button>`),AE=e(`<div class="between svelte-192cp36"><div class="foot svelte-192cp36"><span class="tiers svelte-192cp36" role="radiogroup" aria-label="What to ask for"><button type="button" role="radio" class="svelte-192cp36">text here</button> <button type="button" role="radio" class="svelte-192cp36">rewrite a selection</button></span> <!></div> <div class="ask svelte-192cp36"><i class="dia open svelte-192cp36" aria-hidden="true"></i> <textarea rows="1" aria-label="Ask Iso" class="svelte-192cp36"></textarea></div> <div class="foot svelte-192cp36"><span class="tiers svelte-192cp36" role="radiogroup" aria-label="Tier"></span> <span class="grow"></span> <button class="link faint svelte-192cp36" type="button">[ cancel ]</button> <button class="btn primary" type="button">send to Iso</button></div></div>`),jE=e(`<div class="prose said svelte-192cp36"></div>`),ME=e(`<span class="faint"> </span>`),NE=e(`<div class="between working svelte-192cp36" aria-live="polite"><!> <div class="foot svelte-192cp36"><i class="dia svelte-192cp36" aria-hidden="true"></i> <span class="soft doing svelte-192cp36"> <!></span> <span class="grow"></span> <button class="link svelte-192cp36" type="button">[ stop ]</button></div></div>`),PE=e(`<div class="between stopped svelte-192cp36" role="alert"><p class="bad svelte-192cp36"> </p> <div class="foot svelte-192cp36"><span class="grow"></span><button class="link svelte-192cp36" type="button">[ dismiss ]</button></div></div>`),FE=e(`<p class="soft lost svelte-192cp36"><span class="strike svelte-192cp36"> </span> </p>`),IE=e(`<div class="between stopped svelte-192cp36"><p class="label"> </p> <!> <div class="foot svelte-192cp36"><span class="grow"></span><button class="btn remove" type="button">remove</button></div></div>`),LE=e(`<p class="label">The place this was written for is no longer in the note, so it is shown here. Keeping it adds it at the end.</p>`),RE=e(`<textarea class="revision svelte-192cp36" aria-label="Iso's text, to edit"></textarea>`),zE=e(`<p class="soft asked svelte-192cp36"> </p>`),BE=e(`<p class="label"> </p>`),VE=e(`<button class="btn edit" type="button">done</button>`),HE=e(`<button class="btn edit" type="button">edit</button>`),UE=e(`<div class="between svelte-192cp36"><!> <!> <!> <div class="foot svelte-192cp36"><i class="dia svelte-192cp36" aria-hidden="true"></i> <span class="faces svelte-192cp36" role="radiogroup" aria-label="Show"><button type="button" role="radio" class="svelte-192cp36">answer</button> <button type="button" role="radio" class="svelte-192cp36">prompt</button></span> <span class="grow"></span> <button class="btn keep" type="button">keep</button> <!> <button class="btn remove" type="button">remove</button></div></div>`);function WE(e,n){v(n,!0);let c=te(n,`iso`,7),p=x(()=>n.key.startsWith(`p:`)?c().proposals.find(e=>e.id===n.key.slice(2)):void 0),h=x(()=>a(p)&&c().editing?.id===a(p).id?c().editing:null),b=x(()=>!!a(p)&&c().busy===a(p)?.id),S=x(()=>c().changes.filter(e=>!e.at)),ie=d(``),oe=d(`answer`),de=d(void 0);i(()=>{n.key===`prompt`&&f().then(()=>a(de)?.focus())});let fe=x(()=>c().asking?.steps.at(-1)?.said??``),pe=x(()=>(c().asking?.regions.length??0)>0),me=x(()=>c().prompt?.mode===`rewrite`),he=x(()=>c().prompt?.regions.length??0),ge=x(()=>!!a(ie).trim()&&(!a(me)||a(he)>0));function _e(e){e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),c().ask(a(ie))):e.key===`Escape`&&(e.preventDefault(),c().prompt=null)}var ve=C(),ye=se(ve),be=e=>{var n=AE(),i=s(n),d=s(i),f=s(d),p=g(f,2);re(d);var h=g(d,2),v=e=>{var n=OE(),i=se(n),s=o(i,!0),d=g(i,2),f=e=>{var t=DE();u(`click`,t,()=>c().clearPicked()),l(e,t)};t(d,e=>{a(he)&&e(f)}),m(()=>r(s,a(he)===0?`select text in the note: each selection is added`:`${a(he)} ${a(he)===1?`passage`:`passages`} chosen · select more, or click one to drop it`)),l(e,n)};t(h,e=>{a(me)&&e(v)}),re(i);var y=g(i,2),b=g(s(y),2);ae(b),ce(b,e=>_(de,e),()=>a(de)),re(y);var x=g(y,2),S=s(x);ue(S,20,()=>[`low`,`mid`,`max`],e=>e,(e,t)=>{var n=kE(),i=o(n,!0);m(()=>{le(n,`aria-checked`,c().tier===t),r(i,t)}),u(`click`,n,()=>c().setTier(t)),l(e,n)}),re(S);var te=g(S,4),ne=g(te,2);re(x),re(n),m(()=>{le(f,`aria-checked`,!a(me)),le(p,`aria-checked`,a(me)),le(b,`placeholder`,a(me)?`say how Iso should rewrite what you chose`:`ask Iso for text here`),ne.disabled=!a(ge)}),u(`click`,f,()=>c().setMode(`insert`)),u(`click`,p,()=>c().setMode(`rewrite`)),u(`keydown`,b,_e),ee(b,()=>a(ie),e=>_(ie,e)),u(`click`,te,()=>c().prompt=null),u(`click`,ne,()=>c().ask(a(ie))),l(e,n)},xe=e=>{var n=NE(),i=s(n),d=e=>{var t=jE();y(t,()=>gc(c().asking.text),!0),re(t),l(e,t)};t(i,e=>{c().asking.text&&!a(pe)&&e(d)});var f=g(i,2),p=g(s(f),2),h=s(p,!0),_=g(h),v=e=>{var t=ME(),n=o(t);m(()=>r(n,`· ${a(fe)??``}`)),l(e,t)};t(_,e=>{a(fe)&&e(v)}),re(p);var ee=g(p,4);re(f),re(n),m(()=>r(h,c().asking.text?a(pe)?`Iso is rewriting`:`Iso is writing`:`Iso is thinking`)),u(`click`,ee,()=>c().halt()),l(e,n)},Se=e=>{var t=PE(),n=s(t),i=o(n,!0),a=g(n,2),d=g(s(a));re(a),re(t),m(()=>r(i,c().failed.message)),u(`click`,d,()=>c().failed=null),l(e,t)},Ce=e=>{var t=IE(),n=s(t),i=o(n),d=g(n,2);ue(d,17,()=>a(S),e=>e.key,(e,t)=>{var n=FE(),i=s(n),c=o(i,!0),u=g(i);re(n),m((e,t)=>{r(c,e),r(u,` → ${t??``}`)},[()=>a(t).proposal.regions[a(t).k].old.text.trim(),()=>a(t).proposal.regions[a(t).k].new.trim()||`(taken out)`]),l(e,n)});var f=g(d,2),p=g(s(f));re(f),re(t),m(()=>r(i,`${a(S).length===1?`One change Iso offered is`:`${a(S).length} changes Iso offered are`} for text that is no longer in the note as it was, so ${a(S).length===1?`it`:`they`} cannot be kept.`)),u(`click`,p,()=>{for(let e of a(S))c().discardChange(e)}),l(e,t)},we=e=>{var n=UE(),i=s(n),d=e=>{var t=LE();l(e,t)},f=x(()=>!c().placed(a(p)));t(i,e=>{a(f)&&e(d)});var v=g(i,2),S=e=>{var t=RE();ae(t),m(e=>le(t,`rows`,e),[()=>Math.max(3,a(h).text.split(`
535
+ `).length+1)]),ee(t,()=>a(h).text,e=>a(h).text=e),l(e,t)},te=e=>{var t=zE(),n=o(t,!0);m(()=>r(n,a(p).asked)),l(e,t)},ne=e=>{var t=jE();y(t,()=>gc(a(p).text),!0),re(t),l(e,t)};t(v,e=>{a(h)?e(S):a(oe)===`prompt`?e(te,1):e(ne,-1)});var C=g(v,2),ie=e=>{var t=BE(),n=o(t,!0);m(()=>r(n,a(p).notice)),l(e,t)};t(C,e=>{a(p).notice&&e(ie)});var se=g(C,2),ce=g(s(se),2),ue=s(ce),de=g(ue,2);re(ce);var fe=g(ce,4),pe=g(fe,2),me=e=>{var t=VE();u(`click`,t,()=>c().done(a(p))),l(e,t)},he=e=>{var t=HE();m(()=>t.disabled=a(b)),u(`click`,t,()=>{_(oe,`answer`),c().edit(a(p))}),l(e,t)};t(pe,e=>{a(h)?e(me):e(he,-1)});var ge=g(pe,2);re(se),re(n),m(()=>{le(n,`data-proposal`,a(p).id),le(ue,`aria-checked`,a(oe)===`answer`),le(de,`aria-checked`,a(oe)===`prompt`),fe.disabled=a(b),ge.disabled=a(b)}),u(`click`,ue,()=>_(oe,`answer`)),u(`click`,de,()=>_(oe,`prompt`)),u(`click`,fe,()=>c().keep(a(p))),u(`click`,ge,()=>c().discard(a(p))),l(e,n)};t(ye,e=>{n.key===`prompt`?e(be):n.key===`asking`&&c().asking?e(xe,1):n.key===`failed`&&c().failed?e(Se,2):n.key===`lost`&&a(S).length?e(Ce,3):a(p)&&e(we,4)}),l(e,ve),ne()}c([`click`,`keydown`]);var GE=e(`<span class="label who svelte-1o10yjh"> </span>`),KE=e(`<!> <span class="act svelte-1o10yjh"><button class="keep svelte-1o10yjh" type="button" aria-label="Keep this change">keep</button><button class="remove svelte-1o10yjh" type="button" aria-label="Remove this change">remove</button></span>`,1),qE=e(`<pre class="new svelte-1o10yjh"> </pre>`),JE=e(`<span class="gone svelte-1o10yjh">the passage above is taken out</span>`),YE=e(`<div><!> <div class="foot svelte-1o10yjh"><i class="dia svelte-1o10yjh" aria-hidden="true"></i><span class="label">in place of the lines struck through above</span><span class="grow"></span><!></div></div>`),XE=e(`<span class="new svelte-1o10yjh"> </span>`),ZE=e(`<span class="gone svelte-1o10yjh">taken out</span>`),QE=e(`<span class="change svelte-1o10yjh"><!> <!></span>`);function $E(e,n){v(n,!0);let i=e=>{var i=KE(),d=se(i),h=e=>{var t=GE(),n=o(t,!0);m(()=>{le(t,`title`,a(c)?.proposal.asked),r(n,a(p))}),l(e,t)};t(d,e=>{a(p)&&e(h)});var _=g(d,2),v=s(_),y=g(v);re(_),m(()=>{v.disabled=a(f),y.disabled=a(f)}),u(`click`,v,()=>a(c)&&n.iso.keepChange(a(c))),u(`click`,y,()=>a(c)&&n.iso.discardChange(a(c))),l(e,i)},c=x(()=>n.iso.changes.find(e=>e.key===n.key)),d=x(()=>a(c)?a(c).proposal.regions[a(c).k].new:``),f=x(()=>n.iso.busy===n.key||n.iso.busy===`all`),p=x(()=>a(c)?we(a(c).proposal.who):``);var h=C(),_=se(h),y=e=>{var u=YE();let f;var p=s(u),h=e=>{var t=qE(),n=o(t,!0);m(e=>r(n,e),[()=>a(d).replace(/^\n+|\s+$/g,``)]),l(e,t)},_=x(()=>a(d).trim()),v=e=>{var t=JE();l(e,t)};t(p,e=>{a(_)?e(h):e(v,-1)});var y=g(p,2),ee=g(s(y),3);i(ee),re(y),re(u),m(()=>{f=S(u,1,`change block svelte-1o10yjh`,null,f,{code:a(c).code}),le(u,`data-change`,n.key)}),l(e,u)},ee=e=>{var c=QE(),u=s(c),f=e=>{var t=XE(),n=o(t,!0);m(e=>r(n,e),[()=>a(d).trim()]),l(e,t)},p=x(()=>a(d).trim()),h=e=>{var t=ZE();l(e,t)};t(u,e=>{a(p)?e(f):e(h,-1)});var _=g(u,2);i(_),re(c),m(()=>le(c,`data-change`,n.key)),l(e,c)};t(_,e=>{a(c)?.block?e(y):a(c)&&e(ee,1)}),l(e,h),ne()}c([`click`]);var eD=e(`<span class="chip malachite"> </span>`),tD=e(`<span class="chip rose"> </span>`),nD=e(`<!> <!>`,1),rD=e(`<span class="label svelte-17b7tee">only what you marked is your answer</span>`),iD=e(`<span class="label svelte-17b7tee">select a part of your working to mark it as your answer</span>`),aD=e(`<span class="head svelte-17b7tee"><!></span>`),oD=e(`<span class="label tag svelte-17b7tee">your answer</span>`),sD=e(`<span class="wrong tag svelte-17b7tee">× wrong</span>`);function cD(e,n){v(n,!0);var i=C(),a=se(i),c=e=>{var i=aD(),a=s(i),c=e=>{var i=nD(),a=se(i),s=e=>{var t=eD(),i=o(t);m(()=>r(i,`${n.exercise.counts.right??``} right`)),l(e,t)};t(a,e=>{n.exercise.counts.right&&e(s)});var c=g(a,2),u=e=>{var t=tD(),i=o(t);m(()=>r(i,`× ${n.exercise.counts.wrong??``} wrong`)),l(e,t)};t(c,e=>{n.exercise.counts.wrong&&e(u)}),l(e,i)},u=e=>{var t=rD();l(e,t)},d=e=>{var t=iD();l(e,t)};t(a,e=>{n.exercise.marks.length?e(c):n.exercise.answerAt?e(u,1):e(d,-1)}),re(i),l(e,i)},u=e=>{var t=oD();l(e,t)},d=e=>{var t=sD();l(e,t)};t(a,e=>{n.key===`x:head`?e(c):n.key===`x:answer`?e(u,1):e(d,-1)}),l(e,i),ne()}var lD=e(`<div></div>`);function uD(e,t){v(t,!0);let r=te(t,`iso`,7),o=te(t,`touched`,3,null),s,c=d(void 0),u=x(()=>t.source||!r()?{lines:0,chars:0}:r().head),f=x(()=>{if(!r())return{blocks:[],marks:[],inline:[]};let e=e=>t=>({kind:e,from:t.from-a(u).chars,to:t.to-a(u).chars}),n=[],i=[];if(t.exercise?.is&&!t.source){let r=t.note.text,o=/^##[ \t]+Working[ \t]*$/m.exec(r.slice(a(u).chars)),s=o?a(u).chars+o.index:r.length,c=r.slice(a(u).chars,s),l=a(u).chars+(c.length-c.trimStart().length),d=a(u).chars+c.trimEnd().length;if(d>l&&n.push(e(`question`)({from:l,to:d})),o){let t=s+o[0].length;n.push(e(`working`)({from:r.indexOf(`Working`,s),to:t})),i.push({key:`x:head`,at:t-a(u).chars})}for(let[r,o]of t.exercise.marks.entries())n.push(e(o.mark)(o)),o.mark===`wrong`&&i.push({key:`x:wrong:${r}`,at:o.to-a(u).chars});let f=t.exercise.answerAt,p=f&&t.exercise.marks.some(e=>e.from<=f.from&&f.to<=e.to);f&&!p&&n.push(e(`answer`)(f)),f&&i.push({key:`x:answer`,at:f.to-a(u).chars})}return{blocks:r().layout.blocks.map(e=>({key:e.key,line:Math.max(0,e.line-a(u).lines)})).sort((e,t)=>e.line-t.line),marks:[...r().layout.picked.map(e(`picked`)),...r().layout.old.map(e(`old`)),...n].filter(e=>e.to>0),inline:[...r().layout.inline.map(e=>({key:e.key,at:e.at-a(u).chars})),...i].filter(e=>e.at>=0)}});ie(()=>{let e=TE(s,{doc:t.source?t.note.text:t.note.body,source:t.source,label:t.source?`The note's file`:`The note`,notes:()=>he.listing.notes.filter(e=>e.id!==t.note.id).map(e=>({id:e.id,title:e.title,folder:e.dir})),onChange:e=>t.source?t.note.setText(e):t.note.setBody(e),onSave:()=>{t.note.save()},onFollow:e=>{fe(me(e))},...r()?{onAsk:e=>r().promptAt(e.line+a(u).lines,{from:e.from+a(u).chars,to:e.to+a(u).chars}),onCursor:e=>{r().cursor={line:e.line+a(u).lines,from:e.from+a(u).chars,to:e.to+a(u).chars}},picking:()=>r().picking,onPick:e=>r().pick(e.map(e=>({from:e.from+a(u).chars,to:e.to+a(u).chars}))),onUnpick:e=>r().unpick(e+a(u).chars),mountOverlay:(e,i)=>{if(i.startsWith(`x:`)&&t.exercise){let r=p(cD,{target:e,props:{exercise:t.exercise,key:i}});return()=>{n(r)}}let a=p(i.startsWith(`r:`)?$E:WE,{target:e,props:{iso:r(),key:i}});return()=>{n(a)}}}:{placeholder:de(()=>t.placeholder)??`Write what you understand, what you do not, and what you want from Iso. [[ links a note it should rest on.`}});return _(c,e),()=>e.destroy()}),i(()=>{t.note.revision,de(()=>{a(c)&&EE(a(c),t.source?t.note.text:t.note.body)})}),i(()=>{let e=o(),t=a(u).lines;a(c)&&a(c).dispatch({effects:gE.of(e?{who:e.who,lines:e.lines.map(e=>e-t)}:null)})}),i(()=>{let{blocks:e,marks:t,inline:n}=a(f);a(c)&&a(c).dispatch({effects:[hE.of(e),vE.of({marks:t,inline:n})]})});var h=lD();let g;ce(h,e=>s=e,()=>s),m(()=>g=S(h,1,`editor svelte-hrl8lz`,null,g,{source:t.source})),l(e,h),ne()}export{gc as a,xc as i,TE as n,ke as o,gE as r,uD as t};